refactor: Linting substrings

This commit is contained in:
jstoobysmith 2024-07-12 16:22:06 -04:00
parent cee38b7be8
commit ac1132c7ca
40 changed files with 133 additions and 132 deletions

View file

@ -76,7 +76,7 @@ def toSMSpecies (i : Fin 6) : MSSMCharges.Charges →ₗ[] MSSMSpecies.Charge
lemma toSMSpecies_toSpecies_inv (i : Fin 6) (f : (Fin 6 → Fin 3 → ) × (Fin 2 → )) :
(toSMSpecies i) (toSpecies.symm f) = f.1 i := by
change (Prod.fst ∘ toSpecies ∘ toSpecies.symm ) _ i= f.1 i
change (Prod.fst ∘ toSpecies ∘ toSpecies.symm) _ i= f.1 i
simp
/-- The `Q` charges as a map `Fin 3 → `. -/

View file

@ -56,7 +56,7 @@ def proj (T : MSSMACC.LinSols) : MSSMACC.AnomalyFreePerp :=
lemma proj_val (T : MSSMACC.LinSols) :
(proj T).val = (dot B₃.val T.val - dot Y₃.val T.val) • Y₃.val +
( (dot Y₃.val T.val - 2 * dot B₃.val T.val)) • B₃.val +
(dot Y₃.val T.val - 2 * dot B₃.val T.val) • B₃.val +
dot Y₃.val B₃.val • T.val := by
rfl
@ -110,7 +110,7 @@ lemma quad_self_proj (T : MSSMACC.Sols) :
lemma quad_proj (T : MSSMACC.Sols) :
quadBiLin (proj T.1.1).val (proj T.1.1).val = 2 * dot Y₃.val B₃.val *
((dot B₃.val T.val - dot Y₃.val T.val) * quadBiLin Y₃.val T.val +
(dot Y₃.val T.val - 2 * dot B₃.val T.val) * quadBiLin B₃.val T.val ) := by
(dot Y₃.val T.val - 2 * dot B₃.val T.val) * quadBiLin B₃.val T.val) := by
nth_rewrite 1 [proj_val]
repeat rw [quadBiLin.map_add₁]
repeat rw [quadBiLin.map_smul₁]
@ -159,7 +159,7 @@ lemma cube_proj_proj_self (T : MSSMACC.Sols) :
cubeTriLin (proj T.1.1).val (proj T.1.1).val T.val =
2 * dot Y₃.val B₃.val *
((dot B₃.val T.val - dot Y₃.val T.val) * cubeTriLin T.val T.val Y₃.val +
( dot Y₃.val T.val- 2 * dot B₃.val T.val) * cubeTriLin T.val T.val B₃.val) := by
(dot Y₃.val T.val - 2 * dot B₃.val T.val) * cubeTriLin T.val T.val B₃.val) := by
rw [proj_val]
rw [cubeTriLin.map_add₁, cubeTriLin.map_add₂]
erw [lineY₃B₃_doublePoint]

View file

@ -155,23 +155,23 @@ def α₁ (T : MSSMACC.AnomalyFreePerp) : :=
(3 * cubeTriLin T.val T.val B₃.val * quadBiLin T.val T.val -
2 * cubeTriLin T.val T.val T.val * quadBiLin B₃.val T.val)
/-- A helper function to simplify following expressions. -/
def α₂ (T : MSSMACC.AnomalyFreePerp) : :=
(2 * cubeTriLin T.val T.val T.val * quadBiLin Y₃.val T.val -
3 * cubeTriLin T.val T.val Y₃.val * quadBiLin T.val T.val)
/-- A helper function to simplify following expressions. -/
def α₂ (T : MSSMACC.AnomalyFreePerp) : :=
(2 * cubeTriLin T.val T.val T.val * quadBiLin Y₃.val T.val -
3 * cubeTriLin T.val T.val Y₃.val * quadBiLin T.val T.val)
/-- A helper function to simplify following expressions. -/
def α₃ (T : MSSMACC.AnomalyFreePerp) : :=
6 * ((cubeTriLin T.val T.val Y₃.val) * quadBiLin B₃.val T.val -
(cubeTriLin T.val T.val B₃.val) * quadBiLin Y₃.val T.val)
/-- A helper function to simplify following expressions. -/
def α₃ (T : MSSMACC.AnomalyFreePerp) : :=
6 * ((cubeTriLin T.val T.val Y₃.val) * quadBiLin B₃.val T.val -
(cubeTriLin T.val T.val B₃.val) * quadBiLin Y₃.val T.val)
lemma lineQuad_cube (R : MSSMACC.AnomalyFreePerp) (c₁ c₂ c₃ : ) :
accCube (lineQuad R c₁ c₂ c₃).val =
- 4 * ( c₁ * quadBiLin B₃.val R.val - c₂ * quadBiLin Y₃.val R.val) ^ 2 *
( α₁ R * c₁ + α₂ R * c₂ + α₃ R * c₃ ) := by
rw [lineQuad_val]
rw [planeY₃B₃_cubic, α₁, α₂, α₃]
ring
lemma lineQuad_cube (R : MSSMACC.AnomalyFreePerp) (c₁ c₂ c₃ : ) :
accCube (lineQuad R c₁ c₂ c₃).val =
- 4 * (c₁ * quadBiLin B₃.val R.val - c₂ * quadBiLin Y₃.val R.val) ^ 2 *
(α₁ R * c₁ + α₂ R * c₂ + α₃ R * c₃) := by
rw [lineQuad_val]
rw [planeY₃B₃_cubic, α₁, α₂, α₃]
ring
/-- The line in the plane spanned by `Y₃`, `B₃` and `R` which is in the cubic. -/
def lineCube (R : MSSMACC.AnomalyFreePerp) (a₁ a₂ a₃ : ) :

View file

@ -147,7 +147,7 @@ def InCubeSolProp (R : MSSMACC.Sols) : Prop :=
that solution satisfies `inCubeSolProp`. It appears in the definition of `inLineEqProj`. -/
def cubicCoeff (T : MSSMACC.Sols) : :=
3 * (dot Y₃.val B₃.val) ^ 3 * (cubeTriLin T.val T.val Y₃.val ^ 2 +
cubeTriLin T.val T.val B₃.val ^ 2 )
cubeTriLin T.val T.val B₃.val ^ 2)
lemma inCubeSolProp_iff_cubicCoeff_zero (T : MSSMACC.Sols) :
InCubeSolProp T ↔ cubicCoeff T = 0 := by

View file

@ -60,7 +60,7 @@ lemma chargeMap_toSpecies (f : PermGroup) (S : MSSMCharges.Charges) (j : Fin 6)
@[simp]
def repCharges : Representation PermGroup (MSSMCharges).Charges where
toFun f := chargeMap f⁻¹
map_mul' f g :=by
map_mul' f g := by
simp only [PermGroup, mul_inv_rev]
apply LinearMap.ext
intro S

View file

@ -51,22 +51,19 @@ def accCubeTriLinSymm {n : } : TriLinearSymm (PureU1Charges n).Charges := Tri
rw [← Finset.sum_add_distrib]
apply Fintype.sum_congr
intro i
ring
)
ring)
(by
intro S L T
simp only [PureU1Charges_numberCharges]
apply Fintype.sum_congr
intro i
ring
)
ring)
(by
intro S L T
simp only [PureU1Charges_numberCharges]
apply Fintype.sum_congr
intro i
ring
)
ring)
/-- The cubic anomaly equation. -/
@[simp]

View file

@ -117,7 +117,7 @@ def coordinateMap : ((PureU1 n.succ).LinSols) ≃ₗ[] Fin n →₀ where
exact Rat.mul_zero (f k)
simp
/-- The basis of `LinSols`.-/
/-- The basis of `LinSols`. -/
noncomputable
def asBasis : Basis (Fin n) ((PureU1 n.succ).LinSols) where
repr := coordinateMap

View file

@ -191,7 +191,7 @@ lemma AFL_odd_noBoundary {A : (PureU1 (2 * n + 1)).LinSols} (h : ConstAbsSorted
lemma AFL_odd_zero {A : (PureU1 (2 * n + 1)).LinSols} (h : ConstAbsSorted A.val) :
A.val (0 : Fin (2 * n + 1)) = 0 := by
by_contra hn
exact (AFL_odd_noBoundary h hn ) (AFL_hasBoundary h hn)
exact (AFL_odd_noBoundary h hn) (AFL_hasBoundary h hn)
theorem AFL_odd (A : (PureU1 (2 * n + 1)).LinSols) (h : ConstAbsSorted A.val) :
A = 0 := by

View file

@ -689,7 +689,7 @@ lemma P!_in_span (f : Fin n → ) : P! f ∈ Submodule.span (Set.range ba
use f
rfl
lemma smul_basis!AsCharges_in_span (S : (PureU1 (2 * n.succ )).LinSols) (j : Fin n) :
lemma smul_basis!AsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : Fin n) :
(S.val (δ!₂ j) - S.val (δ!₁ j)) • basis!AsCharges j ∈
Submodule.span (Set.range basis!AsCharges) := by
apply Submodule.smul_mem

View file

@ -69,7 +69,7 @@ lemma line_in_cubic_P_P_P! {S : (PureU1 (2 * n.succ)).LinSols} (h : LineInCubic
/-- We say a `LinSol` satisfies `lineInCubicPerm` if all its permutations satisfy `lineInCubic`. -/
def LineInCubicPerm (S : (PureU1 (2 * n.succ)).LinSols) : Prop :=
∀ (M : (FamilyPermutations (2 * n.succ)).group ),
∀ (M : (FamilyPermutations (2 * n.succ)).group),
LineInCubic ((FamilyPermutations (2 * n.succ)).linSolRep M S)
/-- If `lineInCubicPerm S` then `lineInCubic S`. -/
@ -104,7 +104,7 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ)).LinSols}
rw [accCubeTriLinSymm.map_add₃, h1, accCubeTriLinSymm.map_smul₃] at h2
simpa using h2
lemma P_P_P!_accCube' {S : (PureU1 (2 * n.succ.succ )).LinSols}
lemma P_P_P!_accCube' {S : (PureU1 (2 * n.succ.succ)).LinSols}
(f : Fin n.succ.succ → ) (g : Fin n.succ → ) (hS : S.val = Pa f g) :
accCubeTriLinSymm (P f) (P f) (basis!AsCharges (Fin.last n)) =
- (S.val (δ!₂ (Fin.last n)) + S.val (δ!₁ (Fin.last n))) * (2 * S.val δ!₄ +
@ -114,12 +114,12 @@ lemma P_P_P!_accCube' {S : (PureU1 (2 * n.succ.succ )).LinSols}
have h2 := Pa_δ!₁ f g (Fin.last n)
have h3 := Pa_δ!₂ f g (Fin.last n)
simp at h1 h2 h3
have hl : f (Fin.succ (Fin.last (n ))) = - Pa f g δ!₄ := by
have hl : f (Fin.succ (Fin.last n)) = - Pa f g δ!₄ := by
simp_all only [Fin.succ_last, neg_neg]
erw [hl] at h2
have hg : g (Fin.last n) = Pa f g (δ!₁ (Fin.last n)) + Pa f g δ!₄ := by
linear_combination -(1 * h2)
have hll : f (Fin.castSucc (Fin.last (n ))) =
have hll : f (Fin.castSucc (Fin.last n)) =
- (Pa f g (δ!₂ (Fin.last n)) + Pa f g (δ!₁ (Fin.last n)) + Pa f g δ!₄) := by
linear_combination h3 - 1 * hg
rw [← hS] at hl hll

View file

@ -93,7 +93,7 @@ lemma genericCase_exists (S : (PureU1 (2 * n.succ)).Sols)
rw [hS'.1, hS'.2] at hC
exact hC' hC
/-- A proposition on a solution which is true if `accCubeTriLinSymm (P g, P g, P! f) = 0`.-/
/-- 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 :=
∀ (g : Fin n.succ → ) (f : Fin n → ) (_ : S.val = P g + P! f) ,
accCubeTriLinSymm (P g) (P g) (P! f) = 0
@ -125,7 +125,7 @@ theorem generic_case {S : (PureU1 (2 * n.succ)).Sols} (h : GenericCase S) :
rw [parameterization]
apply ACCSystem.Sols.ext
rw [parameterizationAsLinear_val]
change S.val = _ • ( _ • P g + _• P! f)
change S.val = _ • (_ • P g + _• P! f)
rw [anomalyFree_param _ _ hS]
rw [neg_neg, ← smul_add, smul_smul, inv_mul_cancel, one_smul]
exact hS

View file

@ -52,7 +52,7 @@ lemma lineInPlaneCond_perm {S : (PureU1 (n)).LinSols} (hS : LineInPlaneCond S)
not_false_eq_true]
lemma lineInPlaneCond_eq_last' {S : (PureU1 (n.succ.succ)).LinSols} (hS : LineInPlaneCond S)
(h : ¬ (S.val ((Fin.last n).castSucc))^2 = (S.val ((Fin.last n).succ))^2 ) :
(h : ¬ (S.val ((Fin.last n).castSucc))^2 = (S.val ((Fin.last n).succ))^2) :
(2 - n) * S.val (Fin.last (n + 1)) =
- (2 - n)* S.val (Fin.castSucc (Fin.last n)) := by
erw [sq_eq_sq_iff_eq_or_eq_neg] at h

View file

@ -43,7 +43,7 @@ lemma cube_for_linSol (S : (PureU1 3).LinSols) :
lemma three_sol_zero (S : (PureU1 3).Sols) : S.val (0 : Fin 3) = 0 S.val (1 : Fin 3) = 0
S.val (2 : Fin 3) = 0 := (cube_for_linSol S.1.1).mpr S.cubicSol
/-- Given a `LinSol` with a charge equal to zero a `Sol`.-/
/-- Given a `LinSol` with a charge equal to zero a `Sol`. -/
def solOfLinear (S : (PureU1 3).LinSols)
(hS : S.val (0 : Fin 3) = 0 S.val (1 : Fin 3) = 0 S.val (2 : Fin 3) = 0) :
(PureU1 3).Sols :=

View file

@ -58,12 +58,12 @@ lemma line_in_cubic_P_P_P! {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S
∀ (g : Fin n → ) (f : Fin n → ) (_ : S.val = P g + P! f),
accCubeTriLinSymm (P g) (P g) (P! f) = 0 := by
intro g f hS
linear_combination 2 / 3 * (lineInCubic_expand h g f hS 1 1 ) -
(lineInCubic_expand h g f hS 1 2 ) / 6
linear_combination 2 / 3 * (lineInCubic_expand h g f hS 1 1) -
(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 + 1)).LinSols) : Prop :=
∀ (M : (FamilyPermutations (2 * n + 1)).group ),
∀ (M : (FamilyPermutations (2 * n + 1)).group),
LineInCubic ((FamilyPermutations (2 * n + 1)).linSolRep M S)
/-- If `lineInCubicPerm S` then `lineInCubic S`. -/

View file

@ -124,7 +124,7 @@ theorem generic_case {S : (PureU1 (2 * n.succ + 1)).Sols} (h : GenericCase S) :
rw [parameterization]
apply ACCSystem.Sols.ext
rw [parameterizationAsLinear_val]
change S.val = _ • ( _ • P g + _• P! f)
change S.val = _ • (_ • P g + _• P! f)
rw [anomalyFree_param _ _ hS]
rw [neg_neg, ← smul_add, smul_smul, inv_mul_cancel, one_smul]
exact hS

View file

@ -51,7 +51,7 @@ open PureU1Charges in
@[simp]
def permCharges {n : } : Representation (PermGroup n) (PureU1 n).Charges where
toFun f := chargeMap f⁻¹
map_mul' f g :=by
map_mul' f g := by
simp only [PermGroup, mul_inv_rev]
apply LinearMap.ext
intro S
@ -214,7 +214,7 @@ lemma permTwo_fst : (permTwo hij hij').toFun i' = i := by
lemma permTwo_snd : (permTwo hij hij').toFun j' = j := by
rw [permTwo, permOfInjection]
have ht := Equiv.extendSubtype_apply_of_mem
((permTwoInj hij' ).toEquivRange.symm.trans
((permTwoInj hij').toEquivRange.symm.trans
(permTwoInj hij).toEquivRange) j' (permTwoInj_snd hij')
simp at ht
simp [ht, permTwoInj_snd_apply]
@ -303,16 +303,15 @@ lemma Prop_two (P : × → Prop) {S : (PureU1 n).LinSols}
{a b : Fin n} (hab : a ≠ b)
(h : ∀ (f : (FamilyPermutations n).group),
P ((((FamilyPermutations n).linSolRep f S).val a),
(((FamilyPermutations n).linSolRep f S).val b)
)) : ∀ (i j : Fin n) (_ : i ≠ j),
(((FamilyPermutations n).linSolRep f S).val b))) : ∀ (i j : Fin n) (_ : i ≠ j),
P (S.val i, S.val j) := by
intro i j hij
have h1 := h (permTwo hij hab ).symm
have h1 := h (permTwo hij hab).symm
rw [FamilyPermutations_anomalyFreeLinear_apply, FamilyPermutations_anomalyFreeLinear_apply] at h1
simp at h1
change P
(S.val ((permTwo hij hab ).toFun a),
S.val ((permTwo hij hab ).toFun b)) at h1
(S.val ((permTwo hij hab).toFun a),
S.val ((permTwo hij hab).toFun b)) at h1
erw [permTwo_fst,permTwo_snd] at h1
exact h1
@ -321,9 +320,8 @@ lemma Prop_three (P : × × → Prop) {S : (PureU1 n).LinSols}
(h : ∀ (f : (FamilyPermutations n).group),
P ((((FamilyPermutations n).linSolRep f S).val a),(
(((FamilyPermutations n).linSolRep f S).val b),
(((FamilyPermutations n).linSolRep f S).val c)
))) : ∀ (i j k : Fin n) (_ : i ≠ j) (_ : j ≠ k) (_ : i ≠ k),
P (S.val i, (S.val j, S.val k)) := by
(((FamilyPermutations n).linSolRep f S).val c)))) : ∀ (i j k : Fin n)
(_ : i ≠ j) (_ : j ≠ k) (_ : i ≠ k), P (S.val i, (S.val j, S.val k)) := by
intro i j k hij hjk hik
have h1 := h (permThree hij hjk hik hab hbc hac).symm
rw [FamilyPermutations_anomalyFreeLinear_apply, FamilyPermutations_anomalyFreeLinear_apply,

View file

@ -54,9 +54,9 @@ lemma charges_eq_toSpecies_eq (S T : (SMCharges n).Charges) :
apply toSpeciesEquiv.injective
exact (Set.eqOn_univ (toSpeciesEquiv S) (toSpeciesEquiv T)).mp fun ⦃x⦄ _ => h x
lemma toSMSpecies_toSpecies_inv (i : Fin 5) (f : (Fin 5 → Fin n → ) ) :
lemma toSMSpecies_toSpecies_inv (i : Fin 5) (f : Fin 5 → Fin n → ) :
(toSpecies i) (toSpeciesEquiv.symm f) = f i := by
change (toSpeciesEquiv ∘ toSpeciesEquiv.symm ) _ i= f i
change (toSpeciesEquiv ∘ toSpeciesEquiv.symm) _ i= f i
simp
/-- The `Q` charges as a map `Fin n → `. -/
@ -272,8 +272,7 @@ def cubeTriLin : TriLinearSymm (SMCharges n).Charges := TriLinearSymm.mk₃
intro i
repeat erw [map_smul]
simp [HSMul.hSMul, SMul.smul]
ring
)
ring)
(by
intro S T R L
simp only
@ -282,22 +281,19 @@ def cubeTriLin : TriLinearSymm (SMCharges n).Charges := TriLinearSymm.mk₃
intro i
repeat erw [map_add]
simp only [ACCSystemCharges.chargesAddCommMonoid_add, toSpecies_apply, Fin.isValue]
ring
)
ring)
(by
intro S T L
simp only [SMSpecies_numberCharges, toSpecies_apply, Fin.isValue]
apply Fintype.sum_congr
intro i
ring
)
ring)
(by
intro S T L
simp only [SMSpecies_numberCharges, toSpecies_apply, Fin.isValue]
apply Fintype.sum_congr
intro i
ring
)
ring)
/-- The cubic acc. -/
@[simp]

View file

@ -100,7 +100,7 @@ def speciesFamilyUniversial (n : ) :
/-- The embedding of the `1`-family charges into the `n`-family charges in
a universal manor. -/
def familyUniversal ( n : ) : (SMCharges 1).Charges →ₗ[] (SMCharges n).Charges :=
def familyUniversal (n : ) : (SMCharges 1).Charges →ₗ[] (SMCharges n).Charges :=
chargesMapOfSpeciesMap (speciesFamilyUniversial n)
end SM

View file

@ -183,7 +183,8 @@ lemma grav (S : linearParameters) :
end linearParameters
/-- The parameters for solutions to the linear ACCs with the condition that Q and E are non-zero.-/
/-- The parameters for solutions to the linear ACCs with the condition that Q and E are
non-zero. -/
structure linearParametersQENeqZero where
/-- The parameter `x`. -/
x :
@ -291,7 +292,7 @@ lemma cubic_v_or_w_zero (S : linearParametersQENeqZero) (h : accCube (bijection
exact h2 h
lemma cubic_v_zero (S : linearParametersQENeqZero) (h : accCube (bijection S).1.val = 0)
(hv : S.v = 0 ) : S.w = -1 := by
(hv : S.v = 0) : S.w = -1 := by
rw [S.cubic, hv] at h
simp at h
have h' : (S.w + 1) * (1 * S.w * S.w + (-1) * S.w + 1) = 0 := by
@ -309,7 +310,7 @@ lemma cubic_v_zero (S : linearParametersQENeqZero) (h : accCube (bijection S).1.
exact eq_neg_of_add_eq_zero_left h'
lemma cube_w_zero (S : linearParametersQENeqZero) (h : accCube (bijection S).1.val = 0)
(hw : S.w = 0 ) : S.v = -1 := by
(hw : S.w = 0) : S.v = -1 := by
rw [S.cubic, hw] at h
simp at h
have h' : (S.v + 1) * (1 * S.v * S.v + (-1) * S.v + 1) = 0 := by

View file

@ -36,7 +36,7 @@ instance : Group (PermGroup n) := Pi.group
/-- The image of an element of `permGroup n` under the representation on charges. -/
@[simps!]
def chargeMap (f : PermGroup n) : (SMCharges n).Charges →ₗ[] (SMCharges n).Charges where
toFun S := toSpeciesEquiv.symm (fun i => toSpecies i S ∘ f i )
toFun S := toSpeciesEquiv.symm (fun i => toSpecies i S ∘ f i)
map_add' _ _ := rfl
map_smul' _ _ := rfl
@ -44,7 +44,7 @@ def chargeMap (f : PermGroup n) : (SMCharges n).Charges →ₗ[] (SMCharges n
@[simp]
def repCharges {n : } : Representation (PermGroup n) (SMCharges n).Charges where
toFun f := chargeMap f⁻¹
map_mul' f g :=by
map_mul' f g := by
simp only [PermGroup, mul_inv_rev]
apply LinearMap.ext
intro S

View file

@ -31,7 +31,7 @@ namespace SMνCharges
variable {n : }
/-- An equivalence between `(SMνCharges n).charges` and `(Fin 6 → Fin n → )`
splitting the charges into species.-/
splitting the charges into species. -/
@[simps!]
def toSpeciesEquiv : (SMνCharges n).Charges ≃ (Fin 6 → Fin n → ) :=
((Equiv.curry _ _ _).symm.trans ((@finProdFinEquiv 6 n).arrowCongr (Equiv.refl ))).symm
@ -54,9 +54,9 @@ lemma charges_eq_toSpecies_eq (S T : (SMνCharges n).Charges) :
funext i
exact h i
lemma toSMSpecies_toSpecies_inv (i : Fin 6) (f : (Fin 6 → Fin n → ) ) :
lemma toSMSpecies_toSpecies_inv (i : Fin 6) (f : Fin 6 → Fin n → ) :
(toSpecies i) (toSpeciesEquiv.symm f) = f i := by
change (toSpeciesEquiv ∘ toSpeciesEquiv.symm ) _ i = f i
change (toSpeciesEquiv ∘ toSpeciesEquiv.symm) _ i = f i
simp
lemma toSpecies_one (S : (SMνCharges 1).Charges) (j : Fin 6) :

View file

@ -24,12 +24,11 @@ open BigOperators
namespace PlaneSeven
/-- A charge assignment forming one of the basis elements of the plane. -/
def B₀ : (SM 3).Charges := toSpeciesEquiv.invFun ( fun s => fun i =>
def B₀ : (SM 3).Charges := toSpeciesEquiv.invFun (fun s => fun i =>
match s, i with
| 0, 0 => 1
| 0, 1 => - 1
| _, _ => 0
)
| _, _ => 0)
lemma B₀_cubic (S T : (SM 3).Charges) : cubeTriLin B₀ S T =
6 * (S (0 : Fin 18) * T (0 : Fin 18) - S (1 : Fin 18) * T (1 : Fin 18)) := by
@ -37,12 +36,11 @@ lemma B₀_cubic (S T : (SM 3).Charges) : cubeTriLin B₀ S T =
ring
/-- A charge assignment forming one of the basis elements of the plane. -/
def B₁ : (SM 3).Charges := toSpeciesEquiv.invFun ( fun s => fun i =>
def B₁ : (SM 3).Charges := toSpeciesEquiv.invFun (fun s => fun i =>
match s, i with
| 1, 0 => 1
| 1, 1 => - 1
| _, _ => 0
)
| _, _ => 0)
lemma B₁_cubic (S T : (SM 3).Charges) : cubeTriLin B₁ S T =
3 * (S (3 : Fin 18) * T (3 : Fin 18) - S (4 : Fin 18) * T (4 : Fin 18)) := by
@ -50,12 +48,11 @@ lemma B₁_cubic (S T : (SM 3).Charges) : cubeTriLin B₁ S T =
ring
/-- A charge assignment forming one of the basis elements of the plane. -/
def B₂ : (SM 3).Charges := toSpeciesEquiv.invFun ( fun s => fun i =>
def B₂ : (SM 3).Charges := toSpeciesEquiv.invFun (fun s => fun i =>
match s, i with
| 2, 0 => 1
| 2, 1 => - 1
| _, _ => 0
)
| _, _ => 0)
lemma B₂_cubic (S T : (SM 3).Charges) : cubeTriLin B₂ S T =
3 * (S (6 : Fin 18) * T (6 : Fin 18) - S (7 : Fin 18) * T (7 : Fin 18)) := by
@ -63,12 +60,11 @@ lemma B₂_cubic (S T : (SM 3).Charges) : cubeTriLin B₂ S T =
ring
/-- A charge assignment forming one of the basis elements of the plane. -/
def B₃ : (SM 3).Charges := toSpeciesEquiv.invFun ( fun s => fun i =>
def B₃ : (SM 3).Charges := toSpeciesEquiv.invFun (fun s => fun i =>
match s, i with
| 3, 0 => 1
| 3, 1 => - 1
| _, _ => 0
)
| _, _ => 0)
lemma B₃_cubic (S T : (SM 3).Charges) : cubeTriLin B₃ S T =
2 * (S (9 : Fin 18) * T (9 : Fin 18) - S (10 : Fin 18) * T (10 : Fin 18)) := by
@ -77,12 +73,11 @@ lemma B₃_cubic (S T : (SM 3).Charges) : cubeTriLin B₃ S T =
rfl
/-- A charge assignment forming one of the basis elements of the plane. -/
def B₄ : (SM 3).Charges := toSpeciesEquiv.invFun ( fun s => fun i =>
def B₄ : (SM 3).Charges := toSpeciesEquiv.invFun (fun s => fun i =>
match s, i with
| 4, 0 => 1
| 4, 1 => - 1
| _, _ => 0
)
| _, _ => 0)
lemma B₄_cubic (S T : (SM 3).Charges) : cubeTriLin B₄ S T =
(S (12 : Fin 18) * T (12 : Fin 18) - S (13 : Fin 18) * T (13 : Fin 18)) := by
@ -91,12 +86,11 @@ lemma B₄_cubic (S T : (SM 3).Charges) : cubeTriLin B₄ S T =
rfl
/-- A charge assignment forming one of the basis elements of the plane. -/
def B₅ : (SM 3).Charges := toSpeciesEquiv.invFun ( fun s => fun i =>
def B₅ : (SM 3).Charges := toSpeciesEquiv.invFun (fun s => fun i =>
match s, i with
| 5, 0 => 1
| 5, 1 => - 1
| _, _ => 0
)
| _, _ => 0)
lemma B₅_cubic (S T : (SM 3).Charges) : cubeTriLin B₅ S T =
(S (15 : Fin 18) * T (15 : Fin 18) - S (16 : Fin 18) * T (16 : Fin 18)) := by
@ -105,12 +99,11 @@ lemma B₅_cubic (S T : (SM 3).Charges) : cubeTriLin B₅ S T =
rfl
/-- A charge assignment forming one of the basis elements of the plane. -/
def B₆ : (SM 3).Charges := toSpeciesEquiv.invFun ( fun s => fun i =>
def B₆ : (SM 3).Charges := toSpeciesEquiv.invFun (fun s => fun i =>
match s, i with
| 1, 2 => 1
| 2, 2 => -1
| _, _ => 0
)
| _, _ => 0)
lemma B₆_cubic (S T : (SM 3).Charges) : cubeTriLin B₆ S T =
3 * (S (5 : Fin 18) * T (5 : Fin 18) - S (8 : Fin 18) * T (8 : Fin 18)) := by

View file

@ -36,7 +36,7 @@ instance : Group (PermGroup n) := Pi.group
/-- The image of an element of `permGroup n` under the representation on charges. -/
@[simps!]
def chargeMap (f : PermGroup n) : (SMνCharges n).Charges →ₗ[] (SMνCharges n).Charges where
toFun S := toSpeciesEquiv.symm (fun i => toSpecies i S ∘ f i )
toFun S := toSpeciesEquiv.symm (fun i => toSpecies i S ∘ f i)
map_add' _ _ := rfl
map_smul' _ _ := rfl

View file

@ -289,7 +289,7 @@ instance diagramVertexPropDecidable
@decidable_of_decidable_of_iff _ _
(@Fintype.decidableForallFintype _ _ (fun _ => @Fintype.decidableExistsFintype _ _
(fun _ => @And.decidable _ _ _ (@Fintype.decidablePiFintype _ _
(fun _ => P.preFeynmanRuleDecEq𝓱𝓔) _ _ _)) _ ) _)
(fun _ => P.preFeynmanRuleDecEq𝓱𝓔) _ _ _)) _) _)
(P.diagramVertexProp_iff F f).symm
instance diagramEdgePropDecidable
@ -299,7 +299,7 @@ instance diagramEdgePropDecidable
@decidable_of_decidable_of_iff _ _
(@Fintype.decidableForallFintype _ _ (fun _ => @Fintype.decidableExistsFintype _ _
(fun _ => @And.decidable _ _ _ (@Fintype.decidablePiFintype _ _
(fun _ => P.preFeynmanRuleDecEq𝓱𝓔) _ _ _)) _ ) _)
(fun _ => P.preFeynmanRuleDecEq𝓱𝓔) _ _ _)) _) _)
(P.diagramEdgeProp_iff F f).symm
end PreFeynmanRule
@ -717,7 +717,7 @@ instance [IsFiniteDiagram F] : DecidableRel F.AdjRelation := fun _ _ =>
@Fintype.decidableExistsFintype _ _ (fun _ => @Fintype.decidableExistsFintype _ _ (
fun _ => @And.decidable _ _ (instDecidableEq𝓔OfIsFiniteDiagram _ _) $
@And.decidable _ _ (instDecidableEq𝓥OfIsFiniteDiagram _ _)
(instDecidableEq𝓥OfIsFiniteDiagram _ _)) _ ) _
(instDecidableEq𝓥OfIsFiniteDiagram _ _)) _) _
/-- From a Feynman diagram the simple graph showing those vertices which are connected. -/
def toSimpleGraph : SimpleGraph F.𝓥 where

View file

@ -109,7 +109,7 @@ instance (i : Fin 2) : Module (EdgeVertexMomentaMap F i) :=
| 0 => instModuleRealEdgeMomenta F
| 1 => instModuleRealVertexMomenta F
/-- The direct sum of `EdgeMomenta` and `VertexMomenta`.-/
/-- The direct sum of `EdgeMomenta` and `VertexMomenta`. -/
def EdgeVertexMomenta : Type := DirectSum (Fin 2) (EdgeVertexMomentaMap F)
instance : AddCommGroup F.EdgeVertexMomenta := DirectSum.instAddCommGroup _

View file

@ -236,7 +236,7 @@ lemma td (V : CKMMatrix) (a b c d e f : ) :
simp only [Fin.isValue, cons_val', cons_val_zero, empty_val', cons_val_fin_one, vecCons_const,
cons_val_two, tail_val', head_val', cons_val_one, head_cons, tail_cons, head_fin_const,
zero_mul, add_zero, mul_zero]
change (0 * _ + _ ) * _ + (0 * _ + _ ) * 0 = _
change (0 * _ + _) * _ + (0 * _ + _) * 0 = _
simp only [Fin.isValue, zero_mul, zero_add, mul_zero, add_zero]
rw [exp_add]
ring_nf

View file

@ -227,9 +227,9 @@ lemma fstRowThdColRealCond_holds_up_to_equiv (V : CKMMatrix) :
obtain ⟨τ, hτ⟩ := V.uRow_cross_cRow_eq_tRow
let U : CKMMatrix := phaseShiftApply V
0
(- τ + arg [V]ud + arg [V]us + arg [V]tb )
(- τ + arg [V]cb + arg [V]ud + arg [V]us )
(- arg [V]ud )
(- τ + arg [V]ud + arg [V]us + arg [V]tb)
(- τ + arg [V]cb + arg [V]ud + arg [V]us)
(- arg [V]ud)
(- arg [V]us)
(τ - arg [V]ud - arg [V]us - arg [V]cb - arg [V]tb)
have hUV : Quotient.mk CKMMatrixSetoid U = ⟦V⟧ := by
@ -262,7 +262,7 @@ lemma ubOnePhaseCond_hold_up_to_equiv_of_ub_one {V : CKMMatrix} (hb : ¬ ([V]ud
(hV : FstRowThdColRealCond V) :
∃ (U : CKMMatrix), V ≈ U ∧ ubOnePhaseCond U:= by
let U : CKMMatrix := phaseShiftApply V 0 0 (- Real.pi + arg [V]cd + arg [V]cs + arg [V]ub)
(Real.pi - arg [V]cd ) (- arg [V]cs) (- arg [V]ub )
(Real.pi - arg [V]cd) (- arg [V]cs) (- arg [V]ub)
use U
have hUV : Quotient.mk CKMMatrixSetoid U= ⟦V⟧ := by
simp only [Quotient.eq]
@ -318,7 +318,7 @@ lemma ubOnePhaseCond_hold_up_to_equiv_of_ub_one {V : CKMMatrix} (hb : ¬ ([V]ud
lemma cd_of_fstRowThdColRealCond {V : CKMMatrix} (hb : [V]ud ≠ 0 [V]us ≠ 0)
(hV : FstRowThdColRealCond V) :
[V]cd = (- VtbAbs ⟦V⟧ * VusAbs ⟦V⟧ / (VudAbs ⟦V⟧ ^2 + VusAbs ⟦V⟧ ^2)) +
(- VubAbs ⟦V⟧ * VudAbs ⟦V⟧ * VcbAbs ⟦V⟧ / (VudAbs ⟦V⟧ ^2 + VusAbs ⟦V⟧ ^2 ))
(- VubAbs ⟦V⟧ * VudAbs ⟦V⟧ * VcbAbs ⟦V⟧ / (VudAbs ⟦V⟧ ^2 + VusAbs ⟦V⟧ ^2))
* cexp (- arg [V]ub * I) := by
have hτ : [V]t = cexp ((0 : ) * I) • (conj ([V]u) ×₃ conj ([V]c)) := by
simp only [ofReal_zero, zero_mul, exp_zero, one_smul]

View file

@ -84,7 +84,7 @@ lemma ud_us_neq_zero_iff_ub_neq_one (V : CKMMatrix) :
simp_all
have h1 := Complex.abs.nonneg [V]ub
rw [h2] at h1
have h2 : ¬ 0 ≤ ( -1 : ) := by simp
have h2 : ¬ 0 ≤ (-1 : ) := by simp
exact h2 h1
lemma normSq_Vud_plus_normSq_Vus_neq_zero_ {V : CKMMatrix} (hb : [V]ud ≠ 0 [V]us ≠ 0) :
@ -100,7 +100,7 @@ lemma normSq_Vud_plus_normSq_Vus_neq_zero_ {V : CKMMatrix} (hb : [V]ud ≠ 0
exact hb h2
have h3 := Complex.abs.nonneg [V]ub
rw [h2] at h3
have h2 : ¬ 0 ≤ ( -1 : ) := by simp
have h2 : ¬ 0 ≤ (-1 : ) := by simp
exact h2 h3
lemma VAbsub_neq_zero_Vud_Vus_neq_zero {V : Quotient CKMMatrixSetoid}
@ -154,11 +154,11 @@ lemma fst_row_orthog_thd_row (V : CKMMatrix) :
lemma Vcd_mul_conj_Vud (V : CKMMatrix) :
[V]cd * conj [V]ud = -[V]cs * conj [V]us - [V]cb * conj [V]ub := by
linear_combination (V.fst_row_orthog_snd_row )
linear_combination (V.fst_row_orthog_snd_row)
lemma Vcs_mul_conj_Vus (V : CKMMatrix) :
[V]cs * conj [V]us = - [V]cd * conj [V]ud - [V]cb * conj [V]ub := by
linear_combination (V.fst_row_orthog_snd_row )
linear_combination V.fst_row_orthog_snd_row
end orthogonal
@ -344,7 +344,7 @@ lemma cb_tb_neq_zero_iff_ub_neq_one (V : CKMMatrix) :
simp_all
have h1 := Complex.abs.nonneg [V]ub
rw [h2] at h1
have h2 : ¬ 0 ≤ ( -1 : ) := by simp
have h2 : ¬ 0 ≤ (-1 : ) := by simp
exact h2 h1
lemma VAbs_fst_col_eq_one_snd_eq_zero {V : Quotient CKMMatrixSetoid} {i : Fin 3}

View file

@ -240,7 +240,7 @@ lemma cRow_cross_tRow_eq_uRow (V : CKMMatrix) :
lemma uRow_cross_cRow_eq_tRow (V : CKMMatrix) :
∃ (τ : ), [V]t = cexp (τ * I) • (conj ([V]u) ×₃ conj ([V]c)) := by
obtain ⟨g, hg⟩ := (mem_span_range_iff_exists_fun ).mp (Basis.mem_span (rowBasis V)
(conj ([V]u) ×₃ conj ([V]c)) )
(conj ([V]u) ×₃ conj ([V]c)))
rw [Fin.sum_univ_three, rowBasis] at hg
simp at hg
have h0 := congrArg (fun X => conj [V]u ⬝ᵥ X) hg
@ -307,20 +307,20 @@ def ucCross : Fin 3 → :=
conj [phaseShiftApply V a b c d e f]u ×₃ conj [phaseShiftApply V a b c d e f]c
lemma ucCross_fst (V : CKMMatrix) : (ucCross V a b c d e f) 0 =
cexp ((- a * I) + (- b * I) + ( - e * I) + (- f * I)) * (conj [V]u ×₃ conj [V]c) 0 := by
cexp ((- a * I) + (- b * I) + (- e * I) + (- f * I)) * (conj [V]u ×₃ conj [V]c) 0 := by
simp [ucCross, crossProduct, Nat.succ_eq_add_one, Nat.reduceAdd, Fin.isValue,
LinearMap.mk₂_apply, Pi.conj_apply, cons_val_zero, neg_mul, uRow, us, ub, cRow, cs, cb,
exp_add, exp_sub, ← exp_conj, conj_ofReal]
ring
lemma ucCross_snd (V : CKMMatrix) : (ucCross V a b c d e f) 1 =
cexp ((- a * I) + (- b * I) + ( - d * I) + (- f * I)) * (conj [V]u ×₃ conj [V]c) 1 := by
cexp ((- a * I) + (- b * I) + (- d * I) + (- f * I)) * (conj [V]u ×₃ conj [V]c) 1 := by
simp [ucCross, crossProduct, uRow, us, ub, cRow, cs, cb, ud, cd, exp_add,
exp_sub, ← exp_conj, conj_ofReal]
ring
lemma ucCross_thd (V : CKMMatrix) : (ucCross V a b c d e f) 2 =
cexp ((- a * I) + (- b * I) + ( - d * I) + (- e * I)) * (conj [V]u ×₃ conj [V]c) 2 := by
cexp ((- a * I) + (- b * I) + (- d * I) + (- e * I)) * (conj [V]u ×₃ conj [V]c) 2 := by
simp [ucCross, crossProduct, uRow, us, ub, cRow, cs, cb, ud, cd, exp_add, exp_sub,
← exp_conj, conj_ofReal]
ring

View file

@ -373,8 +373,8 @@ lemma mulExpδ₁₃_on_param_abs (V : CKMMatrix) (δ₁₃ : ) :
complexAbs_sin_θ₂₃, complexAbs_cos_θ₂₃]
lemma mulExpδ₁₃_on_param_neq_zero_arg (V : CKMMatrix) (δ₁₃ : )
(h1 : mulExpδ₁₃ ⟦standParam (θ₁₂ ⟦V⟧) (θ₁₃ ⟦V⟧) (θ₂₃ ⟦V⟧) δ₁₃⟧ ≠ 0 ) :
cexp (arg ( mulExpδ₁₃ ⟦standParam (θ₁₂ ⟦V⟧) (θ₁₃ ⟦V⟧) (θ₂₃ ⟦V⟧) δ₁₃⟧ ) * I) =
(h1 : mulExpδ₁₃ ⟦standParam (θ₁₂ ⟦V⟧) (θ₁₃ ⟦V⟧) (θ₂₃ ⟦V⟧) δ₁₃⟧ ≠ 0) :
cexp (arg (mulExpδ₁₃ ⟦standParam (θ₁₂ ⟦V⟧) (θ₁₃ ⟦V⟧) (θ₂₃ ⟦V⟧) δ₁₃⟧) * I) =
cexp (δ₁₃ * I) := by
have h1a := mulExpδ₁₃_on_param_δ₁₃ V δ₁₃
have habs := mulExpδ₁₃_on_param_abs V δ₁₃
@ -383,7 +383,7 @@ lemma mulExpδ₁₃_on_param_neq_zero_arg (V : CKMMatrix) (δ₁₃ : )
rw [habs, h1a]
ring_nf
nth_rewrite 1 [← abs_mul_exp_arg_mul_I (mulExpδ₁₃
⟦standParam (θ₁₂ ⟦V⟧) (θ₁₃ ⟦V⟧) (θ₂₃ ⟦V⟧) δ₁₃⟧ )] at h2
⟦standParam (θ₁₂ ⟦V⟧) (θ₁₃ ⟦V⟧) (θ₂₃ ⟦V⟧) δ₁₃⟧)] at h2
have habs_neq_zero :
(Complex.abs (mulExpδ₁₃ ⟦standParam (θ₁₂ ⟦V⟧) (θ₁₃ ⟦V⟧) (θ₂₃ ⟦V⟧) δ₁₃⟧) : ) ≠ 0 := by
simp only [ne_eq, ofReal_eq_zero, map_eq_zero]
@ -505,7 +505,7 @@ lemma eq_standParam_of_fstRowThdColRealCond {V : CKMMatrix} (hb : [V]ud ≠ 0
rw [ud_us_neq_zero_iff_ub_neq_one] at hb
simp [VAbs, hb]
have h1 : ofReal (√(VAbs 0 0 ⟦V⟧ ^ 2 + VAbs 0 1 ⟦V⟧ ^ 2) *
↑√(VAbs 0 0 ⟦V⟧ ^ 2 + VAbs 0 1 ⟦V⟧ ^ 2)) = ofReal ((VAbs 0 0 ⟦V⟧ ^ 2 + VAbs 0 1 ⟦V⟧ ^ 2) ) := by
↑√(VAbs 0 0 ⟦V⟧ ^ 2 + VAbs 0 1 ⟦V⟧ ^ 2)) = ofReal (VAbs 0 0 ⟦V⟧ ^ 2 + VAbs 0 1 ⟦V⟧ ^ 2) := by
rw [Real.mul_self_sqrt ]
apply add_nonneg (sq_nonneg _) (sq_nonneg _)
simp at h1

View file

@ -70,7 +70,7 @@ def mk₂ (f : V × V → ) (map_smul : ∀ a S T, f (a • S, T) = a * f (S,
simp only
rw [swap, map_add]
exact Mathlib.Tactic.LinearCombination.add_pf (swap T1 S) (swap T2 S)
map_smul' :=by
map_smul' := by
intro a T
simp only [eq_ratCast, Rat.cast_eq_id, id_eq, smul_eq_mul]
rw [swap, map_smul]
@ -173,7 +173,7 @@ namespace TriLinearSymm
open BigOperators
variable {V : Type} [AddCommMonoid V] [Module V]
instance instFun : FunLike (TriLinearSymm V) V (V →ₗ[] V →ₗ[] ) where
instance instFun : FunLike (TriLinearSymm V) V (V →ₗ[] V →ₗ[] ) where
coe f := f.toFun
coe_injective' f g h := by
cases f

View file

@ -183,12 +183,12 @@ def toEnd (A : SO(3)) : End (EuclideanSpace (Fin 3)) :=
lemma one_is_eigenvalue (A : SO(3)) : A.toEnd.HasEigenvalue 1 := by
rw [End.hasEigenvalue_iff_mem_spectrum]
erw [AlgEquiv.spectrum_eq (Matrix.toLinAlgEquiv (EuclideanSpace.basisFun (Fin 3) ).toBasis ) A.1]
erw [AlgEquiv.spectrum_eq (Matrix.toLinAlgEquiv (EuclideanSpace.basisFun (Fin 3) ).toBasis) A.1]
exact one_in_spectrum A
lemma exists_stationary_vec (A : SO(3)) :
∃ (v : EuclideanSpace (Fin 3)),
Orthonormal (({0} : Set (Fin 3)).restrict (fun _ => v ))
Orthonormal (({0} : Set (Fin 3)).restrict (fun _ => v))
∧ A.toEnd v = v := by
obtain ⟨v, hv⟩ := End.HasEigenvalue.exists_hasEigenvector $ one_is_eigenvalue A
have hvn : ‖v‖ ≠ 0 := norm_ne_zero_iff.mpr hv.2

View file

@ -239,7 +239,7 @@ open LorentzVector
-/
/-- The first column of a lorentz matrix as a `NormOneLorentzVector`. -/
/-- The first column of a Lorentz matrix as a `NormOneLorentzVector`. -/
@[simps!]
def toNormOneLorentzVector (Λ : LorentzGroup d) : NormOneLorentzVector d :=
⟨Λ.1 *ᵥ timeVec, by rw [NormOneLorentzVector.mem_iff, Λ.2, minkowskiMetric.on_timeVec]⟩

View file

@ -150,7 +150,7 @@ lemma mul_not_othchron_of_not_othchron_othchron {Λ Λ' : LorentzGroup d} (h :
rw [IsOrthochronous_iff_futurePointing] at h h'
exact NormOneLorentzVector.FuturePointing.metric_reflect_not_mem_mem h h'
/-- The homomorphism from `lorentzGroup` to `ℤ₂` whose kernel are the Orthochronous elements. -/
/-- The homomorphism from `LorentzGroup` to `ℤ₂` whose kernel are the Orthochronous elements. -/
def orthchroRep : LorentzGroup d →* ℤ₂ where
toFun := orthchroMap
map_one' := orthchroMap_IsOrthochronous (by simp [IsOrthochronous])

View file

@ -122,7 +122,7 @@ lemma IsProper_iff (Λ : LorentzGroup d) : IsProper Λ ↔ detRep Λ = 1 := by
rw [detRep_apply, detRep_apply, detContinuous_eq_iff_det_eq]
simp only [IsProper, lorentzGroupIsGroup_one_coe, det_one]
lemma id_IsProper : (@IsProper d) 1 := by
lemma id_IsProper : @IsProper d 1 := by
simp [IsProper]
lemma isProper_on_connected_component {Λ Λ' : LorentzGroup d} (h : Λ' ∈ connectedComponent Λ) :

View file

@ -75,12 +75,12 @@ noncomputable def toSelfAdjointMatrix :
ext i j
fin_cases i <;> fin_cases j <;>
field_simp [fromSelfAdjointMatrix', toMatrix, conj_ofReal]
exact conj_eq_iff_re.mp (congrArg (fun M => M 0 0) $ selfAdjoint.mem_iff.mp x.2 )
exact conj_eq_iff_re.mp (congrArg (fun M => M 0 0) $ selfAdjoint.mem_iff.mp x.2)
have h01 := congrArg (fun M => M 0 1) $ selfAdjoint.mem_iff.mp x.2
simp only [Fin.isValue, star_apply, RCLike.star_def] at h01
rw [← h01, RCLike.conj_eq_re_sub_im]
rfl
exact conj_eq_iff_re.mp (congrArg (fun M => M 1 1) $ selfAdjoint.mem_iff.mp x.2 )
exact conj_eq_iff_re.mp (congrArg (fun M => M 1 1) $ selfAdjoint.mem_iff.mp x.2)
map_add' x y := by
ext i j : 2
simp only [toSelfAdjointMatrix'_coe, add_apply, ofReal_add, of_apply, cons_val', empty_val',

View file

@ -190,7 +190,7 @@ lemma self_spaceReflection_eq_zero_iff : ⟪v, v.spaceReflection⟫ₘ = 0 ↔ v
/-- The metric tensor is non-degenerate. -/
lemma nondegenerate : (∀ w, ⟪w, v⟫ₘ = 0) ↔ v = 0 := by
refine Iff.intro (fun h => ?_) (fun h => ?_)
· exact (self_spaceReflection_eq_zero_iff _ ).mp ((symm _ _).trans $ h v.spaceReflection)
· exact (self_spaceReflection_eq_zero_iff _).mp ((symm _ _).trans $ h v.spaceReflection)
· simp [h]
/-!

View file

@ -95,7 +95,7 @@ lemma smooth_innerProd (φ1 φ2 : HiggsField) : Smooth 𝓘(, SpaceTime) 𝓘
/-- Given a `HiggsField`, the map `SpaceTime → ` obtained by taking the square norm of the
pointwise Higgs vector. -/
@[simp]
def normSq (φ : HiggsField) : SpaceTime → := fun x => ( ‖φ x‖ ^ 2)
def normSq (φ : HiggsField) : SpaceTime → := fun x => ‖φ x‖ ^ 2
/-- Notation for the norm squared of a Higgs field. -/
scoped[StandardModel.HiggsField] notation "‖" φ1 "‖_H ^ 2" => normSq φ1

View file

@ -34,7 +34,7 @@ open SpaceTime
/-- The Higgs potential of the form `- μ² * |φ|² + 𝓵 * |φ|⁴`. -/
@[simp]
def potential (μ2 𝓵 : ) (φ : HiggsField) (x : SpaceTime) : :=
def potential (μ2 𝓵 : ) (φ : HiggsField) (x : SpaceTime) : :=
- μ2 * ‖φ‖_H ^ 2 x + 𝓵 * ‖φ‖_H ^ 2 x * ‖φ‖_H ^ 2 x
/-!
@ -94,7 +94,7 @@ lemma snd_term_nonneg (φ : HiggsField) (x : SpaceTime) :
and_self]
lemma as_quad (μ2 𝓵 : ) (φ : HiggsField) (x : SpaceTime) :
𝓵 * ‖φ‖_H ^ 2 x * ‖φ‖_H ^ 2 x + (- μ2 ) * ‖φ‖_H ^ 2 x + (- potential μ2 𝓵 φ x) = 0 := by
𝓵 * ‖φ‖_H ^ 2 x * ‖φ‖_H ^ 2 x + (- μ2) * ‖φ‖_H ^ 2 x + (- potential μ2 𝓵 φ x) = 0 := by
simp only [normSq, neg_mul, potential, neg_add_rev, neg_neg]
ring
@ -237,7 +237,7 @@ lemma IsMinOn_iff_of_μSq_nonpos {μ2 : } (hμ2 : μ2 ≤ 0) :
have h0 := isMinOn_univ_iff.mp h 0
have h1 := bounded_below_of_μSq_nonpos h𝓵 hμ2 φ x
simp only at h0
rw [(eq_bound_iff_of_μSq_nonpos h𝓵 hμ2 0 0 ).mpr (by rfl)] at h0
rw [(eq_bound_iff_of_μSq_nonpos h𝓵 hμ2 0 0).mpr (by rfl)] at h0
exact (Real.partialOrder.le_antisymm _ _ h1 h0).symm
· exact eq_bound_IsMinOn_of_μSq_nonpos h𝓵 hμ2 φ x

View file

@ -46,6 +46,19 @@ def doubleSpaceLinter : HepLeanTextLinter := fun lines ↦ Id.run do
else none)
errors.toArray
/-- Substring linter. -/
def substringLinter (s : String) : HepLeanTextLinter := fun lines ↦ Id.run do
let enumLines := (lines.toList.enumFrom 1)
let errors := enumLines.filterMap (fun (lno, l) ↦
if String.containsSubstr l s then
let k := (Substring.findAllSubstr l s).toList.getLast?
let col := match k with
| none => 1
| some k => String.offsetOfPos l k.stopPos
some (s!" Found instance of substring {s}.", lno, col)
else none)
errors.toArray
structure HepLeanErrorContext where
/-- The underlying `message`. -/
error : String
@ -64,7 +77,8 @@ def hepLeanLintFile (path : FilePath) : IO Bool := do
let lines ← IO.FS.lines path
let allOutput := (Array.map (fun lint ↦
(Array.map (fun (e, n, c) ↦ HepLeanErrorContext.mk e n c path)) (lint lines)))
#[doubleEmptyLineLinter, doubleSpaceLinter]
#[doubleEmptyLineLinter, doubleSpaceLinter, substringLinter ".-/", substringLinter " )",
substringLinter "( ", substringLinter "=by", substringLinter " def "]
let errors := allOutput.flatten
printErrors errors
return errors.size > 0
@ -72,7 +86,7 @@ def hepLeanLintFile (path : FilePath) : IO Bool := do
def main (_ : List String) : IO UInt32 := do
initSearchPath (← findSysroot)
let mods : Name := `HepLean
let imp : Import := {module := mods}
let imp : Import := {module := mods}
let mFile ← findOLean imp.module
unless (← mFile.pathExists) do
throw <| IO.userError s!"object file '{mFile}' of module {imp.module} does not exist"
@ -85,4 +99,6 @@ def main (_ : List String) : IO UInt32 := do
warned := true
if warned then
throw <| IO.userError s!"Errors found."
else
IO.println "No linting issues found."
return 0