Native electron–photon support from ParticleFamilyE8Actions
DefinitionMarkovScatteringJoint_NativeSupport_04markov-scattering
Source context for the measured electron–photon line, carrying these native mathematical modules and their certified helper results: ParticleFamilyE8Actions, ParticleFamilyE8D5Data, ParticleD5, ParticleFamilyE8D5.
Definition code
import Definitions.Def_MarkovScatteringJoint_NativeSupport_03B
import Definitions.Def_MarkovScatteringJoint_NativeSupport_01
import Mathlib.Data.Fintype.Pi
section
/-! The two family classes are exchanged by negation. The matter and family
generators act on separate coordinates of each 27-by-3 sector. -/
namespace MarkovScattering.ParticleFamily.E8
def opposite (x : Root) : Root := ⟨239-x.val, by omega⟩
private theorem all_roots (P : Root → Bool) (h : (List.finRange 240).all P = true) (x : Root) :
P x = true := (List.all_eq_true.mp h) x (by simp)
set_option maxRecDepth 18000 in
set_option maxHeartbeats 18000000 in
theorem opposite_coordinates (x : Root) : root (opposite x) = fun j => -root x j := by
funext j
have h : (List.finRange 240).all (fun x => (List.finRange 8).all
(fun j => decide (root (opposite x) j = -root x j))) = true := by decide
exact of_decide_eq_true ((List.all_eq_true.mp (all_roots _ h x)) j (by simp))
set_option maxRecDepth 18000 in
set_option maxHeartbeats 18000000 in
theorem opposite_swaps_matter (hand : Bool) (x : MatterSector hand) :
component (opposite x) = matterClass (!hand) := by
have h (b : Bool) : (List.finRange 240).all (fun x => decide
(component x = matterClass b → component (opposite x) = matterClass (!b))) = true := by
cases b <;> decide
exact (of_decide_eq_true (all_roots _ (h hand) x)) x.2
def sectorAction (hand : Bool) (i : Generator) (x : MatterSector hand) : MatterSector hand :=
⟨subsystemAction i x, (subsystem_preserves i x).trans x.2⟩
/-- Apply an E6 generator in a fixed family. The resulting matter label is
the same for every family. -/
def matterAction (hand : Bool) (i : Generator) (u : Fin 27) : Fin 27 :=
matterIndex hand (subsystemAction i (productRoot hand (u,0)))
/-- Apply an A2 generator at a fixed matter weight. The resulting family
label is the same for every matter weight. -/
def familyAction (hand : Bool) (i : Generator) (v : Fin 3) : Fin 3 :=
familyIndex hand (subsystemAction i (productRoot hand (0,v)))
private def checkAction (hand : Bool) (x : Root) (i : Generator) : Bool :=
decide (component x = matterClass hand →
(matterIndex hand (subsystemAction i x), familyIndex hand (subsystemAction i x)) =
if i.val < 6 then (matterAction hand i (matterIndex hand x), familyIndex hand x)
else (matterIndex hand x, familyAction hand i (familyIndex hand x)))
set_option maxRecDepth 18000 in
set_option maxHeartbeats 18000000 in
theorem product_action (hand : Bool) (x : MatterSector hand) (i : Generator) :
matterProduct hand (sectorAction hand i x) =
if i.val < 6 then (matterAction hand i (matterProduct hand x).1, (matterProduct hand x).2)
else ((matterProduct hand x).1, familyAction hand i (matterProduct hand x).2) := by
have h (b : Bool) : (List.finRange 240).all (fun x => (List.finRange 8).all (checkAction b x)) =
true := by cases b <;> decide
exact (of_decide_eq_true ((List.all_eq_true.mp (all_roots _ (h hand) x)) i (by simp))) x.2
/-- The two A2 simple reflections are the two adjacent transpositions in
some ordering of the three family weights, and each has exactly one fixed weight. -/
theorem family_two_generators :
∀ b : Bool, (∃ u v w : Fin 3, u ≠ v ∧ v ≠ w ∧ u ≠ w ∧
familyAction b 6 u = v ∧ familyAction b 6 v = u ∧ familyAction b 6 w = w ∧
familyAction b 7 u = u ∧ familyAction b 7 v = w ∧ familyAction b 7 w = v) := by
decide
end MarkovScattering.ParticleFamily.E8
end
section
/-! Packed descent and inverse tables for the D5 restriction of each 27. -/
namespace MarkovScattering.ParticleFamily.E8D5Data
open E8Data
def d5Label2 : ℕ → ℕ := field 2 0x22aaa6a56a9655
def d5Depth2 : ℕ → ℕ := field 5 0x2408399441884731483104a41842010c80
def d5Next2 : ℕ → ℕ := field 3 0x8384468b8a34630404e0
def d5Seed2 : ℕ → ℕ := field 5 0x1019
def spinInverse2 : ℕ → ℕ := field 5 0x52609001a5001805ec02001003dc00250038015
def spinSign2 : ℤ := -1
def d5Label3 : ℕ → ℕ := field 2 0x1565aa56a6aaa2
def d5Depth3 : ℕ → ℕ := field 5 0x883124213148810c84188073142310400
def d5Next3 : ℕ → ℕ := field 3 0x634487124e4643804680
def d5Seed3 : ℕ → ℕ := field 5 0x121
def spinInverse3 : ℕ → ℕ := field 5 0x18e0400008000200c80b000a02d800464098005
def spinSign3 : ℤ := 1
end MarkovScattering.ParticleFamily.E8D5Data
end
section
/-!
The (D_5) half-spin weight set consists of sign vectors with an even
number of minus signs, divided by two. The Levi (A_2 \times A_1)
uses the coordinate transpositions (0 1), (1 2), (0 2), and (3 4).
The count in each block labels the resulting classes. This models the
chosen orbit and Levi, with arbitrary strictly positive reflection rates.
-/
open scoped BigOperators
namespace MarkovScattering.ParticleD5
abbrev Signs := Fin 5 → Bool
/-- A true bit marks a minus sign. -/
def minus (b : Bool) : ℕ := if b then 1 else 0
def colour (x : Signs) : ℕ := minus (x 0) + minus (x 1) + minus (x 2)
def weak (x : Signs) : ℕ := minus (x 3) + minus (x 4)
def EvenSigns (x : Signs) : Prop := (colour x + weak x) % 2 = 0
instance (x : Signs) : Decidable (EvenSigns x) :=
inferInstanceAs (Decidable ((colour x + weak x) % 2 = 0))
abbrev Spinor := {x : Signs // EvenSigns x}
/-- Ordered endpoints of the positive roots of the chosen Levi. -/
def rootPorts (i : Fin 4) : Fin 5 × Fin 5 :=
if i = 0 then (0, 1)
else if i = 1 then (1, 2)
else if i = 2 then (0, 2)
else (3, 4)
def portSwap (i : Fin 4) : Equiv.Perm (Fin 5) :=
Equiv.swap (rootPorts i).1 (rootPorts i).2
def reflectSigns (i : Fin 4) (x : Signs) : Signs := x ∘ portSwap i
/-- Twice the Cartesian coordinates of a half-spin weight. -/
def twiceWeight (x : Signs) (k : Fin 5) : ℤ := if x k then -1 else 1
/-- Cartesian coordinates of the Levi root (e_a-e_b). -/
def root (i : Fin 4) (k : Fin 5) : ℤ :=
if k = (rootPorts i).1 then 1
else if k = (rootPorts i).2 then -1
else 0
/-- The signed-coordinate permutation agrees with the norm-two root reflection
on the scaled weights. The difference of the two coordinates is the pairing
with the root. -/
theorem reflection_formula : ∀ (i : Fin 4) (x : Signs) (k : Fin 5),
twiceWeight (reflectSigns i x) k = twiceWeight x k -
(twiceWeight x (rootPorts i).1 - twiceWeight x (rootPorts i).2) * root i k := by
decide
theorem counts_reflect : ∀ (i : Fin 4) (x : Signs),
(colour (reflectSigns i x), weak (reflectSigns i x)) = (colour x, weak x) := by
decide
private theorem reflectSigns_involutive : ∀ (i : Fin 4) (x : Signs),
reflectSigns i (reflectSigns i x) = x := by
decide
def reflect (i : Fin 4) (x : Spinor) : Spinor :=
⟨reflectSigns i x.1, by
have h := counts_reflect i x.1
unfold EvenSigns
rw [show colour (reflectSigns i x.1) = colour x.1 from congrArg Prod.fst h,
show weak (reflectSigns i x.1) = weak x.1 from congrArg Prod.snd h]
exact x.2⟩
def reflection (i : Fin 4) : Equiv.Perm Spinor :=
{ toFun := reflect i
invFun := reflect i
left_inv := fun x => Subtype.ext (reflectSigns_involutive i x.1)
right_inv := fun x => Subtype.ext (reflectSigns_involutive i x.1) }
noncomputable def weightedWalk (rate : Fin 4 → ℝ) (nonneg : ∀ i, 0 ≤ rate i)
(total_pos : 0 < ∑ i, rate i) : ParticleWalk.Walk Spinor (Fin 4) where
reflection := reflection
involutive := fun i x => Subtype.ext (reflectSigns_involutive i x.1)
rate := rate
nonneg := nonneg
total_pos := total_pos
noncomputable def walk (rate : Fin 4 → ℝ) (pos : ∀ i, 0 < rate i) :
ParticleWalk.Walk Spinor (Fin 4) :=
weightedWalk rate (fun i => (pos i).le)
(Finset.sum_pos (fun i _ => pos i) Finset.univ_nonempty)
def counts (x : Spinor) : ℕ × ℕ := (colour x.1, weak x.1)
/-- At most one colour transposition and at most one weak transposition suffice. -/
def changeColour (i : Fin 4) (x : Spinor) : Spinor :=
if i = 3 then x else reflect i x
def changeWeak (i : Bool) (x : Spinor) : Spinor :=
if i then reflect 3 x else x
set_option maxRecDepth 4000 in
set_option maxHeartbeats 4000000 in
theorem counts_complete : ∀ x y : Spinor, counts x = counts y →
∃ (i : Fin 4) (j : Bool), changeWeak j (changeColour i x) = y := by
decide
variable (rate : Fin 4 → ℝ) (pos : ∀ i, 0 < rate i)
private theorem reaches_reflect (i : Fin 4) (x : Spinor) :
(walk rate pos).Reaches x (reflect i x) :=
(walk rate pos).reaches_append ((walk rate pos).reaches_self x)
(((walk rate pos).kernel_pos_iff _ _).2 ⟨i, pos i, rfl⟩)
theorem reaches_iff_counts (x y : Spinor) :
(walk rate pos).Reaches x y ↔ counts x = counts y := by
let W := walk rate pos
constructor
· exact W.reaches_preserves counts (fun i _ x => counts_reflect i x.1)
· intro h
obtain ⟨i, j, rfl⟩ := counts_complete x y h
apply W.reaches_trans (y := changeColour i x)
· unfold changeColour
split
· exact W.reaches_self x
· exact reaches_reflect rate pos i x
· cases j
· exact W.reaches_self _
· exact reaches_reflect rate pos 3 _
theorem communicates_iff_counts (x y : Spinor) :
(walk rate pos).Communicates x y ↔ counts x = counts y := by
exact ((walk rate pos).communicates_iff_reaches x y).trans (reaches_iff_counts rate pos x y)
/-- The two central charge coordinates in integral units. -/
def sixHypercharge (x : Spinor) : ℤ := 3 * (weak x.1 : ℤ) - 2 * (colour x.1 : ℤ)
def threeBaryonMinusLepton (x : Spinor) : ℤ := 3 - 2 * (colour x.1 : ℤ)
/-- The hypercharge and baryon-minus-lepton formulas written in twice-weight
coordinates. In the original coordinates these are
(Y=(x_0+x_1+x_2)/3-(x_3+x_4)/2) and
(B-L=2(x_0+x_1+x_2)/3). -/
theorem central_charge_formulas : ∀ x : Spinor,
let colourSum := twiceWeight x.1 0 + twiceWeight x.1 1 + twiceWeight x.1 2
let weakSum := twiceWeight x.1 3 + twiceWeight x.1 4
2 * sixHypercharge x = 2 * colourSum - 3 * weakSum ∧
threeBaryonMinusLepton x = colourSum := by
decide
/-- The matter labels of the six classes in Theorem 6, Table 4.1. -/
inductive Matter where
| quarkDoublet | antiUp | antiDown | leptonDoublet | positronType | neutrinoPartner
deriving DecidableEq, Repr
def label (x : Spinor) : Matter :=
match counts x with
| (1, 1) => .quarkDoublet
| (2, 0) => .antiUp
| (2, 2) => .antiDown
| (3, 1) => .leptonDoublet
| (0, 2) => .positronType
| _ => .neutrinoPartner
def classCounts : Matter → ℕ × ℕ
| .quarkDoublet => (1, 1)
| .antiUp => (2, 0)
| .antiDown => (2, 2)
| .leptonDoublet => (3, 1)
| .positronType => (0, 2)
| .neutrinoPartner => (0, 0)
theorem label_counts : ∀ x : Spinor, classCounts (label x) = counts x := by
decide
theorem communicates_iff_label (x y : Spinor) :
(walk rate pos).Communicates x y ↔ label x = label y := by
rw [communicates_iff_counts]
exact ⟨fun h => by unfold label; rw [h],
fun h => (label_counts x).symm.trans ((congrArg classCounts h).trans (label_counts y))⟩
def classSize : Matter → ℕ
| .quarkDoublet => 6
| .antiUp | .antiDown => 3
| .leptonDoublet => 2
| .positronType | .neutrinoPartner => 1
def classCharges : Matter → ℤ × ℤ
| .quarkDoublet => (1, 1)
| .antiUp => (-4, -1)
| .antiDown => (2, -1)
| .leptonDoublet => (-3, -3)
| .positronType => (6, 3)
| .neutrinoPartner => (0, 3)
theorem label_charges : ∀ x : Spinor,
(sixHypercharge x, threeBaryonMinusLepton x) = classCharges (label x) := by
decide
theorem class_sizes (m : Matter) :
(Finset.univ.filter fun x : Spinor => label x = m).card = classSize m := by
cases m <;> decide
end MarkovScattering.ParticleD5
end
section
/-! Restrict a 27 in the E8 → E6 × A2 family to D5. The result has
a singlet, a vector and a half-spin sector in every family. -/
namespace MarkovScattering.ParticleFamily.E8
open E8D5Data
open scoped BigOperators
/-- The E6 simple roots of Bourbaki indices 2–6 comprise D5. -/
def d5Generator (j : Fin 5) : Generator := Fin.castLE (by decide) j.succ
def d5Action (hand : Bool) (j : Fin 5) (x : Fin 27) : Fin 27 :=
matterAction hand (d5Generator j) x
private theorem d5_involutive (hand : Bool) (j : Fin 5) :
Function.Involutive (d5Action hand j) := by
have h (b : Bool) : ∀ (i : Fin 5) (x : Fin 27), d5Action b i (d5Action b i x) = x := by
cases b <;> decide
exact h hand j
/-- Representatives 0, 1 and 2 correspond to singlet, vector, and spinor. -/
def branch (hand : Bool) (x : Fin 27) : Fin 3 :=
Fin.ofNat 3 ((if hand then d5Label3 else d5Label2) x.val)
def spinGrad (hand : Bool) : ℤ := if hand then spinSign3 else spinSign2
private def depth (hand : Bool) (x : Fin 27) : ℕ :=
(if hand then d5Depth3 else d5Depth2) x.val
private def next (hand : Bool) (x : Fin 27) : Fin 5 :=
Fin.ofNat 5 ((if hand then d5Next3 else d5Next2) x.val)
private def seed (hand : Bool) (c : Fin 3) : Fin 27 :=
Fin.ofNat 27 ((if hand then d5Seed3 else d5Seed2) c.val)
set_option maxRecDepth 5000 in
private def d5Certificate (hand : Bool) : ClassCertificate (d5Action hand) (branch hand) where
representative := seed hand
depth := depth hand
nextMove := next hand
preserves := by cases hand <;> decide
depth_zero := by cases hand <;> decide
descends := by cases hand <;> decide
def d5Walk (hand : Bool) (rate : Fin 5 → ℝ) (pos : ∀ i, 0 < rate i) :
ParticleWalk.Walk (Fin 27) (Fin 5) where
reflection i := ⟨d5Action hand i, d5Action hand i, d5_involutive hand i, d5_involutive hand i⟩
involutive := d5_involutive hand
rate := rate
nonneg i := (pos i).le
total_pos := Finset.sum_pos (fun i _ => pos i) Finset.univ_nonempty
/-- With the A2 generators off, the D5 branches at a fixed family are exactly
the communicating classes, for every positive D5 rate assignment. -/
theorem d5_communicates_iff (hand : Bool) (rate : Fin 5 → ℝ) (pos : ∀ i, 0 < rate i)
(x y : Fin 27) :
(d5Walk hand rate pos).Communicates x y ↔ branch hand x = branch hand y :=
(d5Certificate hand).communicates_iff (d5Walk hand rate pos) pos _ x y
def branchSize (hand : Bool) (c : Fin 3) : ℕ :=
((List.finRange 27).filter fun x => branch hand x == c).length
theorem branch_sizes : ∀ (hand : Bool) (c : Fin 3),
branchSize hand c = (![1,10,16] : Fin 3 → ℕ) c := by decide
/-- Cartesian twice-weight read from the five D5 simple-root pairings.
The root order is (e₃+e₄, e₃−e₄, e₂−e₃, e₁−e₂, e₀−e₁). -/
def d5Cartesian (hand : Bool) (x : Fin 27) : Fin 5 → ℤ :=
let p := matterPairingVector hand x
let w3 := p 1 + p 2
let w4 := p 1 - p 2
let w2 := w3 + 2*p 3
let w1 := w2 + 2*p 4
let w0 := w1 + 2*p 5
![w0,w1,w2,w3,w4]
/-- Independent coordinate shape check for the singlet, vector and spinor. -/
theorem branch_shapes : ∀ (hand : Bool) (x : Fin 27),
(branch hand x = 0 → d5Cartesian hand x = 0) ∧
(branch hand x = 1 → ∃ j : Fin 5, ∃ b : Bool,
d5Cartesian hand x = fun i => if i = j then (if b then 2 else -2) else 0) ∧
(branch hand x = 2 → ∀ j, d5Cartesian hand x j = 1 ∨ d5Cartesian hand x j = -1) := by
decide
/-- The spin sector has odd parity in the first 81 and even parity in the
second 81. Its charge conjugate uses the negative weight. -/
def spinBits (hand : Bool) (x : Fin 27) : ParticleD5.Signs :=
fun i => spinGrad hand * d5Cartesian hand x i == -1
abbrev SpinBranch (hand : Bool) := {x : Fin 27 // branch hand x = 2}
private theorem spin_even : ∀ (hand : Bool) (x : Fin 27),
branch hand x = 2 → ParticleD5.EvenSigns (spinBits hand x) := by
decide
def spinWeight (hand : Bool) (x : SpinBranch hand) : ParticleD5.Spinor :=
⟨spinBits hand x, spin_even hand x x.2⟩
private def signIndex (s : ParticleD5.Signs) : ℕ :=
(List.finRange 5).foldl (fun n i => n + (if s i then 2^i.val else 0)) 0
private def spinPreimage (hand : Bool) (s : ParticleD5.Signs) : Fin 27 :=
Fin.ofNat 27 ((if hand then spinInverse3 else spinInverse2) (signIndex s))
private theorem spin_left : ∀ (hand : Bool) (x : Fin 27), branch hand x = 2 →
spinPreimage hand (spinBits hand x) = x := by decide
private theorem spin_right : ∀ (hand : Bool) (s : ParticleD5.Spinor),
branch hand (spinPreimage hand s.1) = 2 ∧ spinBits hand (spinPreimage hand s.1) = s.1 := by
decide
/-- Each 16 is the explicit D5 even half-spin model, with charge conjugation
on the odd branch. No multiplicities are lost by the coordinate projection. -/
def spinEquiv (hand : Bool) : SpinBranch hand ≃ ParticleD5.Spinor where
toFun := spinWeight hand
invFun s := ⟨spinPreimage hand s.1, (spin_right hand s).1⟩
left_inv x := Subtype.ext (spin_left hand x x.2)
right_inv s := Subtype.ext (spin_right hand s).2
/-- The imported half-spin coordinate convention is the actual Cartesian
weight of this branch, up to the stated overall conjugation. -/
theorem spinEquiv_coordinates : ∀ (hand : Bool) (x : SpinBranch hand) (j : Fin 5),
ParticleD5.twiceWeight (spinEquiv hand x).1 j = spinGrad hand * d5Cartesian hand x j := by
decide
end MarkovScattering.ParticleFamily.E8
end
Source