refactor: Change case of type and props

This commit is contained in:
jstoobysmith 2024-06-26 11:54:02 -04:00
parent 18b83f582e
commit f7a638d32e
58 changed files with 695 additions and 696 deletions

View file

@ -135,7 +135,7 @@ lemma δ!₂_δ₂ (j : Fin n) : δ!₂ j = δ₂ j.castSucc := by
end theδs
/-- The first part of the basis as charges. -/
def basisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).charges :=
def basisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).Charges :=
fun i =>
if i = δ₁ j then
1
@ -146,7 +146,7 @@ def basisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).charges :=
0
/-- The second part of the basis as charges. -/
def basis!AsCharges (j : Fin n) : (PureU1 (2 * n.succ)).charges :=
def basis!AsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges :=
fun i =>
if i = δ!₁ j then
1
@ -357,13 +357,13 @@ lemma swap!_as_add {S S' : (PureU1 (2 * n.succ)).LinSols} (j : Fin n)
simp
/-- 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
def P (f : Fin n.succ → ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • basisAsCharges i
/-- 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
def P! (f : Fin n → ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • basis!AsCharges i
/-- 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
def Pa (f : Fin n.succ → ) (g : Fin n → ) : (PureU1 (2 * n.succ)).Charges := P f + P! g
lemma P_δ₁ (f : Fin n.succ → ) (j : Fin n.succ) : P f (δ₁ j) = f j := by
rw [P, sum_of_charges]
@ -727,7 +727,7 @@ lemma span_basis_swap! {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n)
exact hS
lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols)
(hS : vectorLikeEven S.val) :
(hS : VectorLikeEven S.val) :
∃ (M : (FamilyPermutations (2 * n.succ)).group),
(FamilyPermutations (2 * n.succ)).linSolRep M S
∈ Submodule.span (Set.range basis) := by

View file

@ -36,11 +36,11 @@ open VectorLikeEvenPlane
/-- A property on `LinSols`, satisfied if every point on the line between the two planes
in the basis through that point is in the cubic. -/
def lineInCubic (S : (PureU1 (2 * n.succ)).LinSols) : Prop :=
def LineInCubic (S : (PureU1 (2 * n.succ)).LinSols) : Prop :=
∀ (g : Fin n.succ → ) (f : Fin n → ) (_ : S.val = Pa g f) (a b : ) ,
accCube (2 * n.succ) (a • P g + b • P! f) = 0
lemma lineInCubic_expand {S : (PureU1 (2 * n.succ)).LinSols} (h : lineInCubic S) :
lemma lineInCubic_expand {S : (PureU1 (2 * n.succ)).LinSols} (h : LineInCubic S) :
∀ (g : Fin n.succ → ) (f : Fin n → ) (_ : S.val = Pa g f) (a b : ) ,
3 * a * b * (a * accCubeTriLinSymm (P g) (P g) (P! f)
+ b * accCubeTriLinSymm (P! f) (P! f) (P g)) = 0 := by
@ -60,7 +60,7 @@ lemma lineInCubic_expand {S : (PureU1 (2 * n.succ)).LinSols} (h : lineInCubic S)
for any functions `g : Fin n.succ → ` and `f : Fin n → `, if `S.val = P g + P! f`,
then `accCubeTriLinSymm.toFun (P g, P g, P! f) = 0`.
-/
lemma line_in_cubic_P_P_P! {S : (PureU1 (2 * n.succ)).LinSols} (h : lineInCubic S) :
lemma line_in_cubic_P_P_P! {S : (PureU1 (2 * n.succ)).LinSols} (h : LineInCubic S) :
∀ (g : Fin n.succ → ) (f : Fin n → ) (_ : S.val = P g + P! f),
accCubeTriLinSymm (P g) (P g) (P! f) = 0 := by
intro g f hS
@ -68,28 +68,28 @@ lemma line_in_cubic_P_P_P! {S : (PureU1 (2 * n.succ)).LinSols} (h : lineInCubic
(lineInCubic_expand h g f hS 1 2) / 6
/-- We say a `LinSol` satisfies `lineInCubicPerm` if all its permutations satisfy `lineInCubic`. -/
def lineInCubicPerm (S : (PureU1 (2 * n.succ)).LinSols) : Prop :=
def LineInCubicPerm (S : (PureU1 (2 * n.succ)).LinSols) : Prop :=
∀ (M : (FamilyPermutations (2 * n.succ)).group ),
lineInCubic ((FamilyPermutations (2 * n.succ)).linSolRep M S)
LineInCubic ((FamilyPermutations (2 * n.succ)).linSolRep M S)
/-- If `lineInCubicPerm S` then `lineInCubic S`. -/
lemma lineInCubicPerm_self {S : (PureU1 (2 * n.succ)).LinSols}
(hS : lineInCubicPerm S) : lineInCubic S := hS 1
(hS : LineInCubicPerm S) : LineInCubic S := hS 1
/-- If `lineInCubicPerm S` then `lineInCubicPerm (M S)` for all permutations `M`. -/
lemma lineInCubicPerm_permute {S : (PureU1 (2 * n.succ)).LinSols}
(hS : lineInCubicPerm S) (M' : (FamilyPermutations (2 * n.succ)).group) :
lineInCubicPerm ((FamilyPermutations (2 * n.succ)).linSolRep M' S) := by
rw [lineInCubicPerm]
(hS : LineInCubicPerm S) (M' : (FamilyPermutations (2 * n.succ)).group) :
LineInCubicPerm ((FamilyPermutations (2 * n.succ)).linSolRep M' S) := by
rw [LineInCubicPerm]
intro M
change lineInCubic
change LineInCubic
(((FamilyPermutations (2 * n.succ)).linSolRep M *
(FamilyPermutations (2 * n.succ)).linSolRep M') S)
erw [← (FamilyPermutations (2 * n.succ)).linSolRep.map_mul M M']
exact hS (M * M')
lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ)).LinSols}
(LIC : lineInCubicPerm S) :
(LIC : LineInCubicPerm S) :
∀ (j : Fin n) (g : Fin n.succ → ) (f : Fin n → ) (_ : S.val = Pa g f) ,
(S.val (δ!₂ j) - S.val (δ!₁ j))
* accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) = 0 := by
@ -127,8 +127,8 @@ lemma P_P_P!_accCube' {S : (PureU1 (2 * n.succ.succ )).LinSols}
ring
lemma lineInCubicPerm_last_cond {S : (PureU1 (2 * n.succ.succ)).LinSols}
(LIC : lineInCubicPerm S) :
lineInPlaneProp
(LIC : LineInCubicPerm S) :
LineInPlaneProp
((S.val (δ!₂ (Fin.last n))), ((S.val (δ!₁ (Fin.last n))), (S.val δ!₄))) := by
obtain ⟨g, f, hfg⟩ := span_basis S
have h1 := lineInCubicPerm_swap LIC (Fin.last n) g f hfg
@ -146,8 +146,8 @@ lemma lineInCubicPerm_last_cond {S : (PureU1 (2 * n.succ.succ)).LinSols}
exact h1
lemma lineInCubicPerm_last_perm {S : (PureU1 (2 * n.succ.succ)).LinSols}
(LIC : lineInCubicPerm S) : lineInPlaneCond S := by
refine @Prop_three (2 * n.succ.succ) lineInPlaneProp S (δ!₂ (Fin.last n)) (δ!₁ (Fin.last n))
(LIC : LineInCubicPerm S) : LineInPlaneCond S := by
refine @Prop_three (2 * n.succ.succ) LineInPlaneProp S (δ!₂ (Fin.last n)) (δ!₁ (Fin.last n))
δ!₄ ?_ ?_ ?_ ?_
simp [Fin.ext_iff, δ!₂, δ!₁]
simp [Fin.ext_iff, δ!₂, δ!₄]
@ -157,15 +157,15 @@ lemma lineInCubicPerm_last_perm {S : (PureU1 (2 * n.succ.succ)).LinSols}
exact lineInCubicPerm_last_cond (lineInCubicPerm_permute LIC M)
lemma lineInCubicPerm_constAbs {S : (PureU1 (2 * n.succ.succ)).Sols}
(LIC : lineInCubicPerm S.1.1) : constAbs S.val :=
(LIC : LineInCubicPerm S.1.1) : ConstAbs S.val :=
linesInPlane_constAbs_AF S (lineInCubicPerm_last_perm LIC)
theorem lineInCubicPerm_vectorLike {S : (PureU1 (2 * n.succ.succ)).Sols}
(LIC : lineInCubicPerm S.1.1) : vectorLikeEven S.val :=
(LIC : LineInCubicPerm S.1.1) : VectorLikeEven S.val :=
ConstAbs.boundary_value_even S.1.1 (lineInCubicPerm_constAbs LIC)
theorem lineInCubicPerm_in_plane (S : (PureU1 (2 * n.succ.succ)).Sols)
(LIC : lineInCubicPerm S.1.1) : ∃ (M : (FamilyPermutations (2 * n.succ.succ)).group),
(LIC : LineInCubicPerm S.1.1) : ∃ (M : (FamilyPermutations (2 * n.succ.succ)).group),
(FamilyPermutations (2 * n.succ.succ)).linSolRep M S.1.1
∈ Submodule.span (Set.range basis) :=
vectorLikeEven_in_span S.1.1 (lineInCubicPerm_vectorLike LIC)

View file

@ -79,13 +79,13 @@ lemma anomalyFree_param {S : (PureU1 (2 * n.succ)).Sols}
/-- A proposition on a solution which is true if `accCubeTriLinSymm (P g, P g, P! f) ≠ 0`.
In this case our parameterization above will be able to recover this point. -/
def genericCase (S : (PureU1 (2 * n.succ)).Sols) : Prop :=
def GenericCase (S : (PureU1 (2 * n.succ)).Sols) : Prop :=
∀ (g : Fin n.succ → ) (f : Fin n → ) (_ : S.val = P g + P! f) ,
accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0
lemma genericCase_exists (S : (PureU1 (2 * n.succ)).Sols)
(hs : ∃ (g : Fin n.succ → ) (f : Fin n → ), S.val = P g + P! f ∧
accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0) : genericCase S := by
accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0) : GenericCase S := by
intro g f hS hC
obtain ⟨g', f', hS', hC'⟩ := hs
rw [hS] at hS'
@ -94,13 +94,13 @@ lemma genericCase_exists (S : (PureU1 (2 * n.succ)).Sols)
exact hC' hC
/-- A proposition on a solution which is true if `accCubeTriLinSymm (P g, P g, P! f) = 0`.-/
def specialCase (S : (PureU1 (2 * n.succ)).Sols) : Prop :=
def SpecialCase (S : (PureU1 (2 * n.succ)).Sols) : Prop :=
∀ (g : Fin n.succ → ) (f : Fin n → ) (_ : S.val = P g + P! f) ,
accCubeTriLinSymm (P g) (P g) (P! f) = 0
lemma specialCase_exists (S : (PureU1 (2 * n.succ)).Sols)
(hs : ∃ (g : Fin n.succ → ) (f : Fin n → ), S.val = P g + P! f ∧
accCubeTriLinSymm (P g) (P g) (P! f) = 0) : specialCase S := by
accCubeTriLinSymm (P g) (P g) (P! f) = 0) : SpecialCase S := by
intro g f hS
obtain ⟨g', f', hS', hC'⟩ := hs
rw [hS] at hS'
@ -109,7 +109,7 @@ lemma specialCase_exists (S : (PureU1 (2 * n.succ)).Sols)
exact hC'
lemma generic_or_special (S : (PureU1 (2 * n.succ)).Sols) :
genericCase S specialCase S := by
GenericCase S SpecialCase S := by
obtain ⟨g, f, h⟩ := span_basis S.1.1
have h1 : accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0
accCubeTriLinSymm (P g) (P g) (P! f) = 0 := by
@ -118,7 +118,7 @@ lemma generic_or_special (S : (PureU1 (2 * n.succ)).Sols) :
exact Or.inl (genericCase_exists S ⟨g, f, h, h1⟩)
exact Or.inr (specialCase_exists S ⟨g, f, h, h1⟩)
theorem generic_case {S : (PureU1 (2 * n.succ)).Sols} (h : genericCase S) :
theorem generic_case {S : (PureU1 (2 * n.succ)).Sols} (h : GenericCase S) :
∃ g f a, S = parameterization g f a := by
obtain ⟨g, f, hS⟩ := span_basis S.1.1
use g, f, (accCubeTriLinSymm (P! f) (P! f) (P g))⁻¹
@ -136,7 +136,7 @@ theorem generic_case {S : (PureU1 (2 * n.succ)).Sols} (h : genericCase S) :
lemma special_case_lineInCubic {S : (PureU1 (2 * n.succ)).Sols}
(h : specialCase S) : lineInCubic S.1.1 := by
(h : SpecialCase S) : LineInCubic S.1.1 := by
intro g f hS a b
erw [TriLinearSymm.toCubic_add]
rw [HomogeneousCubic.map_smul, HomogeneousCubic.map_smul]
@ -155,15 +155,15 @@ lemma special_case_lineInCubic {S : (PureU1 (2 * n.succ)).Sols}
lemma special_case_lineInCubic_perm {S : (PureU1 (2 * n.succ)).Sols}
(h : ∀ (M : (FamilyPermutations (2 * n.succ)).group),
specialCase ((FamilyPermutations (2 * n.succ)).solAction.toFun S M)) :
lineInCubicPerm S.1.1 := by
SpecialCase ((FamilyPermutations (2 * n.succ)).solAction.toFun S M)) :
LineInCubicPerm S.1.1 := by
intro M
exact special_case_lineInCubic (h M)
theorem special_case {S : (PureU1 (2 * n.succ.succ)).Sols}
(h : ∀ (M : (FamilyPermutations (2 * n.succ.succ)).group),
specialCase ((FamilyPermutations (2 * n.succ.succ)).solAction.toFun S M)) :
SpecialCase ((FamilyPermutations (2 * n.succ.succ)).solAction.toFun S M)) :
∃ (M : (FamilyPermutations (2 * n.succ.succ)).group),
((FamilyPermutations (2 * n.succ.succ)).solAction.toFun S M).1.1
∈ Submodule.span (Set.range basis) :=