PhysLean/HepLean/AnomalyCancellation/PureU1/Even/BasisLinear.lean

740 lines
26 KiB
Text
Raw Normal View History

2024-04-18 11:09:21 -04:00
/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
2024-07-12 16:39:44 -04:00
Released under Apache 2.0 license as described in the file LICENSE.
2024-04-18 11:09:21 -04:00
Authors: Joseph Tooby-Smith
-/
2024-07-30 08:07:47 -04:00
import HepLean.AnomalyCancellation.PureU1.Sorts
2024-04-18 11:09:21 -04:00
import HepLean.AnomalyCancellation.PureU1.BasisLinear
import HepLean.AnomalyCancellation.PureU1.VectorLike
import Mathlib.Logic.Equiv.Fin
/-!
# Basis of `LinSols` in the even case
2024-05-21 14:07:53 +02:00
We give a basis of `LinSols` in the even case. This basis has the special property
2024-04-18 11:09:21 -04:00
that splits into two planes on which every point is a solution to the ACCs.
-/
universe v u
open Nat
2024-07-12 11:23:02 -04:00
open Finset
2024-04-18 11:09:21 -04:00
open BigOperators
namespace PureU1
variable {n : }
namespace VectorLikeEvenPlane
lemma n_cond₂ (n : ) : 1 + ((n + n) + 1) = 2 * n.succ := by
linarith
section theδs
/-- A helper function for what follows. -/
def δ₁ (j : Fin n.succ) : Fin (2 * n.succ) := Fin.cast (split_equal n.succ) (Fin.castAdd n.succ j)
/-- A helper function for what follows. -/
def δ₂ (j : Fin n.succ) : Fin (2 * n.succ) := Fin.cast (split_equal n.succ) (Fin.natAdd n.succ j)
/-- A helper function for what follows. -/
def δ!₁ (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n)
(Fin.natAdd 1 (Fin.castAdd 1 (Fin.castAdd n j)))
/-- A helper function for what follows. -/
def δ!₂ (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n)
(Fin.natAdd 1 (Fin.castAdd 1 (Fin.natAdd n j)))
/-- A helper function for what follows. -/
def δ!₃ : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.castAdd ((n + n) + 1) 0))
/-- A helper function for what follows. -/
def δ!₄ : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.natAdd 1 (Fin.natAdd (n + n) 0)))
lemma ext_δ (S T : Fin (2 * n.succ) → ) (h1 : ∀ i, S (δ₁ i) = T (δ₁ i))
2024-07-12 11:23:02 -04:00
(h2 : ∀ i, S (δ₂ i) = T (δ₂ i)) : S = T := by
2024-04-18 11:09:21 -04:00
funext i
by_cases hi : i.val < n.succ
· let j : Fin n.succ := ⟨i, hi⟩
have h2 := h1 j
2024-08-30 10:43:29 -04:00
have h3 : δ₁ j = i := rfl
rw [h3] at h2
exact h2
· let j : Fin n.succ := ⟨i - n.succ, by omega⟩
have h2 := h2 j
have h3 : δ₂ j = i := by
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, δ₂, Fin.ext_iff, Fin.coe_cast, Fin.coe_natAdd]
omega
rw [h3] at h2
exact h2
2024-04-18 11:09:21 -04:00
2024-07-12 11:23:02 -04:00
lemma sum_δ₁_δ₂ (S : Fin (2 * n.succ) → ) :
2024-04-18 11:09:21 -04:00
∑ i, S i = ∑ i : Fin n.succ, ((S ∘ δ₁) i + (S ∘ δ₂) i) := by
have h1 : ∑ i, S i = ∑ i : Fin (n.succ + n.succ), S (Fin.cast (split_equal n.succ) i) := by
2024-06-07 08:41:49 -04:00
rw [Finset.sum_equiv (Fin.castOrderIso (split_equal n.succ)).symm.toEquiv]
2024-08-30 11:52:27 -04:00
· intro i
simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv]
· exact fun _ _=> rfl
2024-08-31 18:08:43 +02:00
rw [h1, Fin.sum_univ_add, Finset.sum_add_distrib]
2024-04-18 11:09:21 -04:00
rfl
2024-07-12 11:23:02 -04:00
lemma sum_δ₁_δ₂' (S : Fin (2 * n.succ) → ) :
2024-04-18 11:09:21 -04:00
∑ i, S i = ∑ i : Fin n.succ, ((S ∘ δ₁) i + (S ∘ δ₂) i) := by
have h1 : ∑ i, S i = ∑ i : Fin (n.succ + n.succ), S (Fin.cast (split_equal n.succ) i) := by
2024-06-07 08:41:49 -04:00
rw [Finset.sum_equiv (Fin.castOrderIso (split_equal n.succ)).symm.toEquiv]
2024-08-30 11:52:27 -04:00
· intro i
simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv]
· exact fun _ _ => rfl
2024-08-31 18:08:43 +02:00
rw [h1, Fin.sum_univ_add, Finset.sum_add_distrib]
2024-04-18 11:09:21 -04:00
rfl
2024-07-12 11:23:02 -04:00
lemma sum_δ!₁_δ!₂ (S : Fin (2 * n.succ) → ) :
∑ i, S i = S δ!₃ + S δ!₄ + ∑ i : Fin n, ((S ∘ δ!₁) i + (S ∘ δ!₂) i) := by
2024-04-18 11:09:21 -04:00
have h1 : ∑ i, S i = ∑ i : Fin (1 + ((n + n) + 1)), S (Fin.cast (n_cond₂ n) i) := by
2024-06-07 08:41:49 -04:00
rw [Finset.sum_equiv (Fin.castOrderIso (n_cond₂ n)).symm.toEquiv]
2024-08-30 11:52:27 -04:00
· intro i
simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv]
· exact fun _ _ => rfl
2024-04-18 11:09:21 -04:00
rw [h1]
rw [Fin.sum_univ_add, Fin.sum_univ_add, Fin.sum_univ_add, Finset.sum_add_distrib]
2024-04-18 11:20:15 -04:00
simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply]
2024-04-18 11:09:21 -04:00
repeat rw [Rat.add_assoc]
apply congrArg
rw [Rat.add_comm]
rw [← Rat.add_assoc]
nth_rewrite 2 [Rat.add_comm]
repeat rw [Rat.add_assoc]
nth_rewrite 2 [Rat.add_comm]
rfl
2024-08-30 11:52:27 -04:00
lemma δ!₃_δ₁0 : @δ!₃ n = δ₁ 0 := rfl
2024-04-18 11:09:21 -04:00
lemma δ!₄_δ₂Last: @δ!₄ n = δ₂ (Fin.last n) := by
rw [Fin.ext_iff]
2024-08-30 11:52:27 -04:00
simp only [succ_eq_add_one, δ!₄, Fin.isValue, Fin.coe_cast, Fin.coe_natAdd, Fin.coe_fin_one,
add_zero, δ₂, Fin.natAdd_last, Fin.val_last]
2024-04-18 11:09:21 -04:00
omega
lemma δ!₁_δ₁ (j : Fin n) : δ!₁ j = δ₁ j.succ := by
rw [Fin.ext_iff, δ₁, δ!₁]
2024-04-18 11:20:15 -04:00
simp only [Fin.coe_cast, Fin.coe_natAdd, Fin.coe_castAdd, Fin.val_succ]
2024-04-18 11:09:21 -04:00
ring
lemma δ!₂_δ₂ (j : Fin n) : δ!₂ j = δ₂ j.castSucc := by
rw [Fin.ext_iff, δ₂, δ!₂]
2024-04-18 11:20:15 -04:00
simp only [Fin.coe_cast, Fin.coe_natAdd, Fin.coe_castAdd, Fin.coe_castSucc]
2024-04-18 11:09:21 -04:00
ring_nf
rw [Nat.succ_eq_add_one]
ring
end theδs
/-- The first part of the basis as charges. -/
def basisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).Charges :=
2024-04-18 11:09:21 -04:00
fun i =>
if i = δ₁ j then
1
else
if i = δ₂ j then
- 1
else
0
/-- The second part of the basis as charges. -/
def basis!AsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges :=
2024-04-18 11:09:21 -04:00
fun i =>
if i = δ!₁ j then
1
else
if i = δ!₂ j then
- 1
else
0
lemma basis_on_δ₁_self (j : Fin n.succ) : basisAsCharges j (δ₁ j) = 1 := by
simp [basisAsCharges]
lemma basis!_on_δ!₁_self (j : Fin n) : basis!AsCharges j (δ!₁ j) = 1 := by
simp [basis!AsCharges]
lemma basis_on_δ₁_other {k j : Fin n.succ} (h : k ≠ j) :
basisAsCharges k (δ₁ j) = 0 := by
2024-10-12 08:16:24 +00:00
simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges, δ₁, succ_eq_add_one, δ₂]
2024-04-18 11:09:21 -04:00
split
· rename_i h1
rw [Fin.ext_iff] at h1
simp_all
rw [Fin.ext_iff] at h
simp_all
· split
· rename_i h1 h2
simp_all
rw [Fin.ext_iff] at h2
2024-09-04 09:17:37 -04:00
simp only [Fin.coe_cast, Fin.coe_castAdd, Fin.coe_natAdd] at h2
omega
· rfl
2024-04-18 11:09:21 -04:00
2024-07-12 11:23:02 -04:00
lemma basis_on_other {k : Fin n.succ} {j : Fin (2 * n.succ)} (h1 : j ≠ δ₁ k) (h2 : j ≠ δ₂ k) :
2024-04-18 11:09:21 -04:00
basisAsCharges k j = 0 := by
2024-09-04 09:17:37 -04:00
simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges]
2024-04-18 11:09:21 -04:00
simp_all only [ne_eq, ↓reduceIte]
2024-07-12 11:23:02 -04:00
lemma basis!_on_other {k : Fin n} {j : Fin (2 * n.succ)} (h1 : j ≠ δ!₁ k) (h2 : j ≠ δ!₂ k) :
2024-04-18 11:09:21 -04:00
basis!AsCharges k j = 0 := by
2024-09-04 09:17:37 -04:00
simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges]
2024-04-18 11:09:21 -04:00
simp_all only [ne_eq, ↓reduceIte]
lemma basis!_on_δ!₁_other {k j : Fin n} (h : k ≠ j) :
basis!AsCharges k (δ!₁ j) = 0 := by
2024-09-04 09:17:37 -04:00
simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges]
simp only [δ!₁, succ_eq_add_one, δ!₂]
2024-04-18 11:09:21 -04:00
split
· rename_i h1
rw [Fin.ext_iff] at h1
simp_all
rw [Fin.ext_iff] at h
simp_all
· split
· rename_i h1 h2
simp_all
rw [Fin.ext_iff] at h2
2024-09-04 09:17:37 -04:00
simp only [Fin.coe_cast, Fin.coe_natAdd, Fin.coe_castAdd, add_right_inj] at h2
omega
· rfl
2024-04-18 11:09:21 -04:00
lemma basis_δ₂_eq_minus_δ₁ (j i : Fin n.succ) :
basisAsCharges j (δ₂ i) = - basisAsCharges j (δ₁ i) := by
2024-09-04 09:17:37 -04:00
simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges, δ₂, δ₁]
2024-04-18 11:09:21 -04:00
split <;> split
any_goals split
any_goals rfl
2024-04-18 11:09:21 -04:00
any_goals split
any_goals rfl
all_goals
rename_i h1 h2
rw [Fin.ext_iff] at h1 h2
simp_all
all_goals
rename_i h3
rw [Fin.ext_iff] at h3
simp_all
2024-04-18 11:09:21 -04:00
all_goals omega
lemma basis!_δ!₂_eq_minus_δ!₁ (j i : Fin n) :
basis!AsCharges j (δ!₂ i) = - basis!AsCharges j (δ!₁ i) := by
2024-09-04 09:17:37 -04:00
simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges, δ!₂, δ!₁]
2024-04-18 11:09:21 -04:00
split <;> split
any_goals split
any_goals split
any_goals rfl
all_goals rename_i h1 h2
all_goals rw [Fin.ext_iff] at h1 h2
all_goals simp_all
· subst h1
exact Fin.elim0 i
2024-04-18 11:09:21 -04:00
all_goals rename_i h3
all_goals rw [Fin.ext_iff] at h3
all_goals simp_all
all_goals omega
lemma basis_on_δ₂_self (j : Fin n.succ) : basisAsCharges j (δ₂ j) = - 1 := by
rw [basis_δ₂_eq_minus_δ₁, basis_on_δ₁_self]
lemma basis!_on_δ!₂_self (j : Fin n) : basis!AsCharges j (δ!₂ j) = - 1 := by
rw [basis!_δ!₂_eq_minus_δ!₁, basis!_on_δ!₁_self]
lemma basis_on_δ₂_other {k j : Fin n.succ} (h : k ≠ j) : basisAsCharges k (δ₂ j) = 0 := by
rw [basis_δ₂_eq_minus_δ₁, basis_on_δ₁_other h]
rfl
lemma basis!_on_δ!₂_other {k j : Fin n} (h : k ≠ j) : basis!AsCharges k (δ!₂ j) = 0 := by
rw [basis!_δ!₂_eq_minus_δ!₁, basis!_on_δ!₁_other h]
rfl
lemma basis!_on_δ!₃ (j : Fin n) : basis!AsCharges j δ!₃ = 0 := by
2024-09-04 09:17:37 -04:00
simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges]
split<;> rename_i h
· simp only [δ!₃, succ_eq_add_one, Fin.isValue, δ!₁, Fin.ext_iff, Fin.coe_cast, Fin.coe_castAdd,
Fin.coe_fin_one, Fin.coe_natAdd] at h
omega
· split <;> rename_i h2
· simp only [δ!₃, succ_eq_add_one, Fin.isValue, δ!₂, Fin.ext_iff, Fin.coe_cast,
Fin.coe_castAdd, Fin.coe_fin_one, Fin.coe_natAdd] at h2
omega
· rfl
2024-04-18 11:09:21 -04:00
lemma basis!_on_δ!₄ (j : Fin n) : basis!AsCharges j δ!₄ = 0 := by
2024-09-04 09:17:37 -04:00
simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges]
2024-04-18 11:09:21 -04:00
split <;> rename_i h
· rw [Fin.ext_iff] at h
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, δ!₄, Fin.isValue, Fin.coe_cast, Fin.coe_natAdd, Fin.coe_fin_one,
add_zero, δ!₁, Fin.coe_castAdd, add_right_inj] at h
omega
· split <;> rename_i h2
· rw [Fin.ext_iff] at h2
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, δ!₄, Fin.isValue, Fin.coe_cast, Fin.coe_natAdd, Fin.coe_fin_one,
add_zero, δ!₂, Fin.coe_castAdd, add_right_inj] at h2
omega
· rfl
2024-04-18 11:09:21 -04:00
lemma basis_linearACC (j : Fin n.succ) : (accGrav (2 * n.succ)) (basisAsCharges j) = 0 := by
rw [accGrav]
2024-04-18 11:20:15 -04:00
simp only [LinearMap.coe_mk, AddHom.coe_mk]
2024-04-18 11:09:21 -04:00
rw [sum_δ₁_δ₂]
simp [basis_δ₂_eq_minus_δ₁]
lemma basis!_linearACC (j : Fin n) : (accGrav (2 * n.succ)) (basis!AsCharges j) = 0 := by
rw [accGrav]
2024-04-18 11:20:15 -04:00
simp only [LinearMap.coe_mk, AddHom.coe_mk]
2024-04-18 11:09:21 -04:00
rw [sum_δ!₁_δ!₂, basis!_on_δ!₃, basis!_on_δ!₄]
simp [basis!_δ!₂_eq_minus_δ!₁]
lemma basis_accCube (j : Fin n.succ) :
accCube (2 * n.succ) (basisAsCharges j) = 0 := by
rw [accCube_explicit, sum_δ₁_δ₂]
apply Finset.sum_eq_zero
intro i _
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, Function.comp_apply, basis_δ₂_eq_minus_δ₁]
2024-04-18 11:09:21 -04:00
ring
lemma basis!_accCube (j : Fin n) :
accCube (2 * n.succ) (basis!AsCharges j) = 0 := by
rw [accCube_explicit, sum_δ!₁_δ!₂]
rw [basis!_on_δ!₄, basis!_on_δ!₃]
2024-04-18 11:20:15 -04:00
simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply,
zero_add]
2024-04-18 11:09:21 -04:00
apply Finset.sum_eq_zero
intro i _
2024-09-04 09:17:37 -04:00
simp only [basis!_δ!₂_eq_minus_δ!₁]
2024-04-18 11:09:21 -04:00
ring
/-- The first part of the basis as `LinSols`. -/
@[simps!]
def basis (j : Fin n.succ) : (PureU1 (2 * n.succ)).LinSols :=
⟨basisAsCharges j, by
intro i
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, PureU1_numberLinear] at i
2024-04-18 11:09:21 -04:00
match i with
| 0 =>
exact basis_linearACC j⟩
/-- The second part of the basis as `LinSols`. -/
@[simps!]
def basis! (j : Fin n) : (PureU1 (2 * n.succ)).LinSols :=
⟨basis!AsCharges j, by
intro i
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, PureU1_numberLinear] at i
2024-04-18 11:09:21 -04:00
match i with
| 0 =>
exact basis!_linearACC j⟩
/-- The whole basis as `LinSols`. -/
def basisa : (Fin n.succ) ⊕ (Fin n) → (PureU1 (2 * n.succ)).LinSols := fun i =>
match i with
| .inl i => basis i
| .inr i => basis! i
/-- Swapping the elements δ!₁ j and δ!₂ j is equivalent to adding a vector basis!AsCharges j. -/
lemma swap!_as_add {S S' : (PureU1 (2 * n.succ)).LinSols} (j : Fin n)
(hS : ((FamilyPermutations (2 * n.succ)).linSolRep
2024-07-12 11:23:02 -04:00
(pairSwap (δ!₁ j) (δ!₂ j))) S = S') :
2024-04-18 11:09:21 -04:00
S'.val = S.val + (S.val (δ!₂ j) - S.val (δ!₁ j)) • basis!AsCharges j := by
funext i
rw [← hS, FamilyPermutations_anomalyFreeLinear_apply]
2024-07-12 11:23:02 -04:00
by_cases hi : i = δ!₁ j
· subst hi
simp [HSMul.hSMul, basis!_on_δ!₁_self, pairSwap_inv_fst]
· by_cases hi2 : i = δ!₂ j
· simp [HSMul.hSMul, hi2, basis!_on_δ!₂_self, pairSwap_inv_snd]
2024-09-04 09:17:37 -04:00
· simp only [succ_eq_add_one, Equiv.invFun_as_coe, HSMul.hSMul,
ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul]
rw [basis!_on_other hi hi2]
change S.val ((pairSwap (δ!₁ j) (δ!₂ j)).invFun i) =_
erw [pairSwap_inv_other (Ne.symm hi) (Ne.symm hi2)]
simp
2024-04-18 11:09:21 -04:00
/-- A point in the span of the first part of the basis as a charge. -/
def P (f : Fin n.succ → ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • basisAsCharges i
2024-04-18 11:09:21 -04:00
/-- A point in the span of the second part of the basis as a charge. -/
def P! (f : Fin n → ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • basis!AsCharges i
2024-04-18 11:09:21 -04:00
/-- A point in the span of the basis as a charge. -/
def Pa (f : Fin n.succ → ) (g : Fin n → ) : (PureU1 (2 * n.succ)).Charges := P f + P! g
2024-04-18 11:09:21 -04:00
lemma P_δ₁ (f : Fin n.succ → ) (j : Fin n.succ) : P f (δ₁ j) = f j := by
rw [P, sum_of_charges]
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul]
2024-04-18 11:09:21 -04:00
rw [Finset.sum_eq_single j]
· rw [basis_on_δ₁_self]
2024-08-30 10:43:29 -04:00
exact Rat.mul_one (f j)
· intro k _ hkj
rw [basis_on_δ₁_other hkj]
2024-08-30 10:43:29 -04:00
exact Rat.mul_zero (f k)
· simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff]
2024-04-18 11:09:21 -04:00
2024-07-12 11:23:02 -04:00
lemma P!_δ!₁ (f : Fin n → ) (j : Fin n) : P! f (δ!₁ j) = f j := by
2024-04-18 11:09:21 -04:00
rw [P!, sum_of_charges]
2024-09-04 09:17:37 -04:00
simp only [HSMul.hSMul, SMul.smul]
2024-04-18 11:09:21 -04:00
rw [Finset.sum_eq_single j]
· rw [basis!_on_δ!₁_self]
2024-08-30 10:43:29 -04:00
exact Rat.mul_one (f j)
· intro k _ hkj
rw [basis!_on_δ!₁_other hkj]
2024-08-30 10:43:29 -04:00
exact Rat.mul_zero (f k)
· simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff]
2024-04-18 11:09:21 -04:00
2024-04-18 11:20:15 -04:00
lemma Pa_δ!₁ (f : Fin n.succ → ) (g : Fin n → ) (j : Fin n) :
Pa f g (δ!₁ j) = f j.succ + g j := by
2024-04-18 11:09:21 -04:00
rw [Pa]
2024-04-18 11:20:15 -04:00
simp only [ACCSystemCharges.chargesAddCommMonoid_add]
2024-04-18 11:09:21 -04:00
rw [P!_δ!₁, δ!₁_δ₁, P_δ₁]
lemma P_δ₂ (f : Fin n.succ → ) (j : Fin n.succ) : P f (δ₂ j) = - f j := by
rw [P, sum_of_charges]
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul]
2024-04-18 11:09:21 -04:00
rw [Finset.sum_eq_single j]
· simp only [basis_on_δ₂_self, mul_neg, mul_one]
· intro k _ hkj
simp only [basis_on_δ₂_other hkj, mul_zero]
· simp
2024-04-18 11:09:21 -04:00
lemma P!_δ!₂ (f : Fin n → ) (j : Fin n) : P! f (δ!₂ j) = - f j := by
rw [P!, sum_of_charges]
2024-09-04 09:17:37 -04:00
simp only [HSMul.hSMul, SMul.smul]
2024-04-18 11:09:21 -04:00
rw [Finset.sum_eq_single j]
· rw [basis!_on_δ!₂_self]
2024-08-30 10:43:29 -04:00
exact mul_neg_one (f j)
· intro k _ hkj
rw [basis!_on_δ!₂_other hkj]
2024-08-30 10:43:29 -04:00
exact Rat.mul_zero (f k)
· simp
2024-04-18 11:09:21 -04:00
lemma Pa_δ!₂ (f : Fin n.succ → ) (g : Fin n → ) (j : Fin n) :
Pa f g (δ!₂ j) = - f j.castSucc - g j := by
rw [Pa]
2024-04-18 11:20:15 -04:00
simp only [ACCSystemCharges.chargesAddCommMonoid_add]
2024-04-18 11:09:21 -04:00
rw [P!_δ!₂, δ!₂_δ₂, P_δ₂]
ring
lemma P!_δ!₃ (f : Fin n → ) : P! f (δ!₃) = 0 := by
rw [P!, sum_of_charges]
simp [HSMul.hSMul, SMul.smul, basis!_on_δ!₃]
2024-07-12 11:23:02 -04:00
lemma Pa_δ!₃ (f : Fin n.succ → ) (g : Fin n → ) : Pa f g (δ!₃) = f 0 := by
2024-04-18 11:09:21 -04:00
rw [Pa]
2024-04-18 11:20:15 -04:00
simp only [ACCSystemCharges.chargesAddCommMonoid_add]
2024-04-18 11:09:21 -04:00
rw [P!_δ!₃, δ!₃_δ₁0, P_δ₁]
2024-08-30 10:43:29 -04:00
exact Rat.add_zero (f 0)
2024-04-18 11:09:21 -04:00
lemma P!_δ!₄ (f : Fin n → ) : P! f (δ!₄) = 0 := by
rw [P!, sum_of_charges]
simp [HSMul.hSMul, SMul.smul, basis!_on_δ!₄]
2024-07-12 11:23:02 -04:00
lemma Pa_δ!₄ (f : Fin n.succ → ) (g : Fin n → ) : Pa f g (δ!₄) = - f (Fin.last n) := by
2024-04-18 11:09:21 -04:00
rw [Pa]
2024-04-18 11:20:15 -04:00
simp only [ACCSystemCharges.chargesAddCommMonoid_add]
2024-04-18 11:09:21 -04:00
rw [P!_δ!₄, δ!₄_δ₂Last, P_δ₂]
2024-08-30 10:43:29 -04:00
exact Rat.add_zero (-f (Fin.last n))
2024-04-18 11:09:21 -04:00
2024-07-12 11:23:02 -04:00
lemma P_δ₁_δ₂ (f : Fin n.succ → ) : P f ∘ δ₂ = - P f ∘ δ₁ := by
2024-04-18 11:09:21 -04:00
funext j
2024-04-18 11:20:15 -04:00
simp only [PureU1_numberCharges, Function.comp_apply, Pi.neg_apply]
2024-04-18 11:09:21 -04:00
rw [P_δ₁, P_δ₂]
lemma P_linearACC (f : Fin n.succ → ) : (accGrav (2 * n.succ)) (P f) = 0 := by
rw [accGrav]
2024-04-18 11:20:15 -04:00
simp only [LinearMap.coe_mk, AddHom.coe_mk]
2024-04-18 11:09:21 -04:00
rw [sum_δ₁_δ₂]
simp [P_δ₂, P_δ₁]
lemma P_accCube (f : Fin n.succ → ) : accCube (2 * n.succ) (P f) = 0 := by
rw [accCube_explicit, sum_δ₁_δ₂]
apply Finset.sum_eq_zero
intro i _
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, Function.comp_apply, P_δ₁, P_δ₂]
2024-04-18 11:09:21 -04:00
ring
lemma P!_accCube (f : Fin n → ) : accCube (2 * n.succ) (P! f) = 0 := by
rw [accCube_explicit, sum_δ!₁_δ!₂, P!_δ!₃, P!_δ!₄]
2024-04-18 11:20:15 -04:00
simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply,
zero_add]
2024-04-18 11:09:21 -04:00
apply Finset.sum_eq_zero
intro i _
2024-09-04 09:17:37 -04:00
simp only [P!_δ!₁, P!_δ!₂]
2024-04-18 11:09:21 -04:00
ring
lemma P_P_P!_accCube (g : Fin n.succ → ) (j : Fin n) :
accCubeTriLinSymm (P g) (P g) (basis!AsCharges j)
2024-04-18 11:09:21 -04:00
= g (j.succ) ^ 2 - g (j.castSucc) ^ 2 := by
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges,
TriLinearSymm.mk₃_toFun_apply_apply]
2024-04-18 11:09:21 -04:00
rw [sum_δ!₁_δ!₂, basis!_on_δ!₃, basis!_on_δ!₄]
2024-04-18 11:20:15 -04:00
simp only [mul_zero, add_zero, Function.comp_apply, zero_add]
2024-04-18 11:09:21 -04:00
rw [Finset.sum_eq_single j, basis!_on_δ!₁_self, basis!_on_δ!₂_self]
2024-09-04 09:17:37 -04:00
· simp only [δ!₁_δ₁, mul_one, δ!₂_δ₂, mul_neg]
rw [P_δ₁, P_δ₂]
ring
· intro k _ hkj
erw [basis!_on_δ!₁_other hkj.symm, basis!_on_δ!₂_other hkj.symm]
simp only [mul_zero, add_zero]
· simp
2024-04-18 11:09:21 -04:00
lemma P_P!_P!_accCube (g : Fin n → ) (j : Fin n.succ) :
accCubeTriLinSymm (P! g) (P! g) (basisAsCharges j)
2024-07-12 11:23:02 -04:00
= (P! g (δ₁ j))^2 - (P! g (δ₂ j))^2 := by
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges,
TriLinearSymm.mk₃_toFun_apply_apply]
2024-04-18 11:09:21 -04:00
rw [sum_δ₁_δ₂]
2024-04-18 11:20:15 -04:00
simp only [Function.comp_apply]
2024-04-18 11:09:21 -04:00
rw [Finset.sum_eq_single j, basis_on_δ₁_self, basis_on_δ₂_self]
2024-09-04 09:17:37 -04:00
· simp only [mul_one, mul_neg]
ring
· intro k _ hkj
erw [basis_on_δ₁_other hkj.symm, basis_on_δ₂_other hkj.symm]
simp only [mul_zero, add_zero]
· simp
2024-04-18 11:09:21 -04:00
lemma P_zero (f : Fin n.succ → ) (h : P f = 0) : ∀ i, f i = 0 := by
intro i
erw [← P_δ₁ f]
rw [h]
rfl
lemma P!_zero (f : Fin n → ) (h : P! f = 0) : ∀ i, f i = 0 := by
intro i
rw [← P!_δ!₁ f]
rw [h]
rfl
lemma Pa_zero (f : Fin n.succ → ) (g : Fin n → ) (h : Pa f g = 0) :
∀ i, f i = 0 := by
have h₃ := Pa_δ!₃ f g
rw [h] at h₃
change 0 = f 0 at h₃
intro i
have hinduc (iv : ) (hiv : iv < n.succ) : f ⟨iv, hiv⟩ = 0 := by
induction iv
exact h₃.symm
rename_i iv hi
2024-08-30 11:52:27 -04:00
have hivi : iv < n.succ := lt_of_succ_lt hiv
2024-04-18 11:09:21 -04:00
have hi2 := hi hivi
2024-08-30 11:52:27 -04:00
have h1 := Pa_δ!₁ f g ⟨iv, succ_lt_succ_iff.mp hiv⟩
have h2 := Pa_δ!₂ f g ⟨iv, succ_lt_succ_iff.mp hiv⟩
2024-04-18 11:09:21 -04:00
rw [h] at h1 h2
2024-09-04 09:17:37 -04:00
simp only [Fin.succ_mk, succ_eq_add_one, Fin.castSucc_mk] at h1 h2
2024-04-18 11:09:21 -04:00
erw [hi2] at h2
change 0 = _ at h2
2024-09-04 09:17:37 -04:00
simp only [neg_zero, zero_sub, zero_eq_neg] at h2
2024-04-18 11:09:21 -04:00
rw [h2] at h1
2024-08-30 10:43:29 -04:00
exact self_eq_add_left.mp h1
2024-04-18 11:09:21 -04:00
exact hinduc i.val i.prop
lemma Pa_zero! (f : Fin n.succ → ) (g : Fin n → ) (h : Pa f g = 0) :
∀ i, g i = 0 := by
have hf := Pa_zero f g h
rw [Pa, P] at h
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h
2024-04-18 11:09:21 -04:00
exact P!_zero g h
/-- A point in the span of the first part of the basis. -/
def P' (f : Fin n.succ → ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • basis i
/-- A point in the span of the second part of the basis. -/
def P!' (f : Fin n → ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • basis! i
/-- A point in the span of the whole basis. -/
def Pa' (f : (Fin n.succ) ⊕ (Fin n) → ) : (PureU1 (2 * n.succ)).LinSols :=
∑ i, f i • basisa i
lemma Pa'_P'_P!' (f : (Fin n.succ) ⊕ (Fin n) → ) :
2024-07-19 17:00:32 -04:00
Pa' f = P' (f ∘ Sum.inl) + P!' (f ∘ Sum.inr) := by
2024-04-18 11:09:21 -04:00
exact Fintype.sum_sum_type _
lemma P'_val (f : Fin n.succ → ) : (P' f).val = P f := by
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, P', P]
2024-04-18 11:09:21 -04:00
funext i
rw [sum_of_anomaly_free_linear, sum_of_charges]
2024-08-30 10:43:29 -04:00
rfl
2024-04-18 11:09:21 -04:00
lemma P!'_val (f : Fin n → ) : (P!' f).val = P! f := by
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, P!', P!]
2024-04-18 11:09:21 -04:00
funext i
rw [sum_of_anomaly_free_linear, sum_of_charges]
2024-08-30 10:43:29 -04:00
rfl
2024-04-18 11:09:21 -04:00
theorem basis_linear_independent : LinearIndependent (@basis n) := by
apply Fintype.linearIndependent_iff.mpr
intro f h
change P' f = 0 at h
2024-08-30 10:11:55 -04:00
have h1 : (P' f).val = 0 :=
(AddSemiconjBy.eq_zero_iff (ACCSystemLinear.LinSols.val 0)
(congrFun (congrArg HAdd.hAdd (congrArg ACCSystemLinear.LinSols.val (id (Eq.symm h))))
(ACCSystemLinear.LinSols.val 0))).mp rfl
2024-04-18 11:09:21 -04:00
rw [P'_val] at h1
exact P_zero f h1
theorem basis!_linear_independent : LinearIndependent (@basis! n) := by
apply Fintype.linearIndependent_iff.mpr
intro f h
change P!' f = 0 at h
2024-08-30 10:11:55 -04:00
have h1 : (P!' f).val = 0 :=
(AddSemiconjBy.eq_zero_iff (ACCSystemLinear.LinSols.val 0)
(congrFun (congrArg HAdd.hAdd (congrArg ACCSystemLinear.LinSols.val (id (Eq.symm h))))
(ACCSystemLinear.LinSols.val 0))).mp rfl
2024-04-18 11:09:21 -04:00
rw [P!'_val] at h1
exact P!_zero f h1
theorem basisa_linear_independent : LinearIndependent (@basisa n) := by
apply Fintype.linearIndependent_iff.mpr
intro f h
change Pa' f = 0 at h
2024-08-30 10:11:55 -04:00
have h1 : (Pa' f).val = 0 :=
(AddSemiconjBy.eq_zero_iff (ACCSystemLinear.LinSols.val 0)
(congrFun (congrArg HAdd.hAdd (congrArg ACCSystemLinear.LinSols.val (id (Eq.symm h))))
(ACCSystemLinear.LinSols.val 0))).mp rfl
2024-04-18 11:09:21 -04:00
rw [Pa'_P'_P!'] at h1
change (P' (f ∘ Sum.inl)).val + (P!' (f ∘ Sum.inr)).val = 0 at h1
rw [P!'_val, P'_val] at h1
change Pa (f ∘ Sum.inl) (f ∘ Sum.inr) = 0 at h1
have hf := Pa_zero (f ∘ Sum.inl) (f ∘ Sum.inr) h1
have hg := Pa_zero! (f ∘ Sum.inl) (f ∘ Sum.inr) h1
intro i
simp_all
cases i
· simp_all
· simp_all
2024-04-18 11:09:21 -04:00
2024-07-12 11:23:02 -04:00
lemma Pa'_eq (f f' : (Fin n.succ) ⊕ (Fin n) → ) : Pa' f = Pa' f' ↔ f = f' := by
refine Iff.intro (fun h => (funext (fun i => ?_))) (fun h => ?_)
· rw [Pa', Pa'] at h
have h1 : ∑ i : Fin (succ n) ⊕ Fin n, (f i + (- f' i)) • basisa i = 0 := by
simp only [add_smul, neg_smul]
rw [Finset.sum_add_distrib]
rw [h]
rw [← Finset.sum_add_distrib]
simp
have h2 : ∀ i, (f i + (- f' i)) = 0 := by
exact Fintype.linearIndependent_iff.mp (@basisa_linear_independent n)
(fun i => f i + -f' i) h1
have h2i := h2 i
linarith
· rw [h]
2024-04-18 11:09:21 -04:00
2024-07-09 19:22:16 -04:00
/-! TODO: Replace the definition of `join` with a Mathlib definition, most likely `Sum.elim`. -/
/-- A helper function for what follows. -/
2024-07-12 11:23:02 -04:00
def join (g : Fin n.succ → ) (f : Fin n → ) : (Fin n.succ) ⊕ (Fin n) → := fun i =>
2024-04-18 11:09:21 -04:00
match i with
| .inl i => g i
| .inr i => f i
lemma join_ext (g g' : Fin n.succ → ) (f f' : Fin n → ) :
join g f = join g' f' ↔ g = g' ∧ f = f' := by
refine Iff.intro (fun h => ?_) (fun h => ?_)
· apply And.intro (funext (fun i => congr_fun h (Sum.inl i)))
(funext (fun i => congr_fun h (Sum.inr i)))
· rw [h.left, h.right]
2024-04-18 11:09:21 -04:00
lemma join_Pa (g g' : Fin n.succ → ) (f f' : Fin n → ) :
2024-04-18 11:20:15 -04:00
Pa' (join g f) = Pa' (join g' f') ↔ Pa g f = Pa g' f' := by
refine Iff.intro (fun h => ?_) (fun h => ?_)
· rw [Pa'_eq, join_ext] at h
rw [h.left, h.right]
· apply ACCSystemLinear.LinSols.ext
rw [Pa'_P'_P!', Pa'_P'_P!']
simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val]
exact h
2024-04-18 11:09:21 -04:00
lemma Pa_eq (g g' : Fin n.succ → ) (f f' : Fin n → ) :
Pa g f = Pa g' f' ↔ g = g' ∧ f = f' := by
rw [← join_Pa, ← join_ext]
2024-04-18 11:09:21 -04:00
exact Pa'_eq _ _
2024-07-12 11:23:02 -04:00
lemma basisa_card : Fintype.card ((Fin n.succ) ⊕ (Fin n)) =
2024-04-18 11:09:21 -04:00
FiniteDimensional.finrank (PureU1 (2 * n.succ)).LinSols := by
erw [BasisLinear.finrank_AnomalyFreeLinear]
2024-04-18 11:20:15 -04:00
simp only [Fintype.card_sum, Fintype.card_fin, mul_eq]
2024-08-30 11:52:27 -04:00
exact split_odd n
2024-04-18 11:09:21 -04:00
2024-07-15 14:52:50 -04:00
/-- The basis formed out of our `basisa` vectors. -/
2024-04-18 11:09:21 -04:00
noncomputable def basisaAsBasis :
Basis (Fin (succ n) ⊕ Fin n) (PureU1 (2 * succ n)).LinSols :=
basisOfLinearIndependentOfCardEqFinrank (@basisa_linear_independent n) basisa_card
lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) :
2024-07-12 11:23:02 -04:00
∃ (g : Fin n.succ → ) (f : Fin n → ), S.val = P g + P! f := by
2024-04-18 11:09:21 -04:00
have h := (mem_span_range_iff_exists_fun ).mp (Basis.mem_span basisaAsBasis S)
obtain ⟨f, hf⟩ := h
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank,
Fintype.sum_sum_type] at hf
2024-04-18 11:09:21 -04:00
change P' _ + P!' _ = S at hf
use f ∘ Sum.inl
use f ∘ Sum.inr
rw [← hf]
2024-09-04 09:17:37 -04:00
simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val]
2024-04-18 11:09:21 -04:00
rfl
lemma P!_in_span (f : Fin n → ) : P! f ∈ Submodule.span (Set.range basis!AsCharges) := by
2024-07-19 17:00:32 -04:00
rw [(mem_span_range_iff_exists_fun )]
use f
rfl
2024-04-18 11:09:21 -04:00
2024-07-12 16:22:06 -04:00
lemma smul_basis!AsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : Fin n) :
2024-04-18 11:09:21 -04:00
(S.val (δ!₂ j) - S.val (δ!₁ j)) • basis!AsCharges j ∈
Submodule.span (Set.range basis!AsCharges) := by
apply Submodule.smul_mem
apply SetLike.mem_of_subset
· exact Submodule.subset_span
· simp_all only [Set.mem_range, exists_apply_eq_apply]
2024-04-18 11:09:21 -04:00
lemma span_basis_swap! {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n)
(hS : ((FamilyPermutations (2 * n.succ)).linSolRep
(pairSwap (δ!₁ j) (δ!₂ j))) S = S') (g : Fin n.succ → ) (f : Fin n → )
2024-07-19 17:00:32 -04:00
(h : S.val = P g + P! f) : ∃ (g' : Fin n.succ → ) (f' : Fin n → ),
S'.val = P g' + P! f' ∧ P! f' = P! f +
(S.val (δ!₂ j) - S.val (δ!₁ j)) • basis!AsCharges j ∧ g' = g := by
2024-04-18 11:09:21 -04:00
let X := P! f + (S.val (δ!₂ j) - S.val (δ!₁ j)) • basis!AsCharges j
2024-07-12 11:23:02 -04:00
have hX : X ∈ Submodule.span (Set.range (basis!AsCharges)) := by
2024-04-18 11:09:21 -04:00
apply Submodule.add_mem
exact (P!_in_span f)
exact (smul_basis!AsCharges_in_span S j)
have hXsum := (mem_span_range_iff_exists_fun ).mp hX
obtain ⟨f', hf'⟩ := hXsum
use g
use f'
change P! f' = _ at hf'
erw [hf']
2024-04-18 11:20:15 -04:00
simp only [and_self, and_true]
2024-04-18 11:09:21 -04:00
change S'.val = P g + (P! f + _)
rw [← add_assoc, ← h]
apply swap!_as_add at hS
exact hS
lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols)
2024-07-19 17:00:32 -04:00
(hS : VectorLikeEven S.val) : ∃ (M : (FamilyPermutations (2 * n.succ)).group),
(FamilyPermutations (2 * n.succ)).linSolRep M S ∈ Submodule.span (Set.range basis) := by
2024-04-18 11:09:21 -04:00
use (Tuple.sort S.val).symm
change sortAFL S ∈ Submodule.span (Set.range basis)
rw [mem_span_range_iff_exists_fun ]
let f : Fin n.succ → := fun i => (sortAFL S).val (δ₁ i)
use f
apply ACCSystemLinear.LinSols.ext
rw [sortAFL_val]
erw [P'_val]
apply ext_δ
· intro i
rw [P_δ₁]
rfl
· intro i
rw [P_δ₂]
have ht := hS i
change sort S.val (δ₁ i) = - sort S.val (δ₂ i) at ht
have h : sort S.val (δ₂ i) = - sort S.val (δ₁ i) := by
rw [ht]
ring
rw [h]
rfl
2024-04-18 11:09:21 -04:00
end VectorLikeEvenPlane
end PureU1