From ec61389fc012de5510a8801d1dbbb812ba5fcb26 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:33:17 +0000 Subject: [PATCH 01/22] Initial plan From 0d66d40a07c1f950e67dc249473114df7b2613f0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:40:16 +0000 Subject: [PATCH 02/22] Extract charge splitting definitions to ChargeSplits.lean Extract Section A (charge splitting definitions) from Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean into a new file Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean. The new file contains all definitions and lemmas from the theDeltas section: oddFst, oddSnd, oddMid, oddShiftFst, oddShiftSnd, oddShiftZero, oddShiftShiftZero, oddShiftShiftFst, oddShiftShiftMid, oddShiftShiftSnd, and all lemmas relating the splittings together. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Odd/BasisLinear/ChargeSplits.lean | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean new file mode 100644 index 000000000..6d7edebd9 --- /dev/null +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean @@ -0,0 +1,210 @@ +/- +Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.VectorLike +/-! +# Charge splits for the odd case basis +-/ + +@[expose] public section + +open Module Nat Finset BigOperators + +namespace PureU1 + +variable {n : ℕ} + +namespace VectorLikeOddPlane + +/-! + +## A. Splitting the charges up into groups + +We have `2 * n + 1` charges, which we split up in the following ways: + +`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` + +``` +| evenShiftZero (0) | evenShiftFst j (1 to n) | + evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | +``` + +-/ + +section theDeltas + +/-! + +### A.1. The symmetric split: Spltting the charges up via `(n + 1) + 1` + +-/ + +lemma odd_shift_eq (n : ℕ) : (1 + n) + n = 2 * n +1 := by + omega + +/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the first `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddFst (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.castAdd n (Fin.castAdd 1 j)) + +/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the second `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddSnd (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.natAdd (n+1) j) + +/-- The element representing `1` in `Fin ((n + 1) + n)`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddMid : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.castAdd n (Fin.natAdd n 1)) + +lemma sum_odd (S : Fin (2 * n + 1) → ℚ) : + ∑ i, S i = S oddMid + ∑ i : Fin n, ((S ∘ oddFst) i + (S ∘ oddSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (n + 1 + n), S (Fin.cast (split_odd n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (split_odd n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1] + rw [Fin.sum_univ_add, Fin.sum_univ_add] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + nth_rewrite 2 [add_comm] + rw [add_assoc] + rw [Finset.sum_add_distrib] + rfl + +/-! + +### A.2. The shifted split: Spltting the charges up via `1 + n + n` + +-/ + +/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the first `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftFst (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.natAdd 1 j)) + +/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the second `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftSnd (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.natAdd (1 + n) j) + +/-- The element representing the `1` in `Fin (1 + n + n)`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftZero : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.castAdd n 1)) + +lemma sum_oddShift (S : Fin (2 * n + 1) → ℚ) : + ∑ i, S i = S oddShiftZero + ∑ i : Fin n, ((S ∘ oddShiftFst) i + (S ∘ oddShiftSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin ((1+n)+n), S (Fin.cast (odd_shift_eq n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (odd_shift_eq n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1, Fin.sum_univ_add, Fin.sum_univ_add] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + rw [add_assoc, Finset.sum_add_distrib] + rfl + +/-! + +### A.3. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` + +-/ + +lemma odd_shift_shift_eq (n : ℕ) : ((1+n)+1) + n.succ = 2 * n.succ + 1 := by + omega + +/-- The element representing the first `1` in `Fin (1 + n + 1 + n.succ)` casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftZero : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.castAdd n 1))) + +/-- The inclusion of `Fin n` into `Fin (1 + n + 1 + n.succ)` via the first `n` and casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftFst (j : Fin n) : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.natAdd 1 j))) + +/-- The element representing the second `1` in `Fin (1 + n + 1 + n.succ)` casted + to `2 * n.succ + 1`. -/ +def oddShiftShiftMid : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.natAdd (1+n) 1)) + +/-- The inclusion of `Fin n.succ` into `Fin (1 + n + 1 + n.succ)` via the `n.succ` and casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftSnd (j : Fin n.succ) : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.natAdd ((1+n)+1) j) + +/-! + +### A.4. Relating the splittings together + +-/ +lemma oddShiftShiftZero_eq_oddFst_zero : @oddShiftShiftZero n = oddFst 0 := + Fin.rev_inj.mp rfl + +lemma oddShiftShiftZero_eq_oddShiftZero : @oddShiftShiftZero n = oddShiftZero := rfl + +lemma oddShiftShiftFst_eq_oddFst_succ (j : Fin n) : + oddShiftShiftFst j = oddFst j.succ := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, + oddFst, Fin.val_succ] + exact Nat.add_comm 1 ↑j + +lemma oddShiftShiftFst_eq_oddShiftFst_castSucc (j : Fin n) : + oddShiftShiftFst j = oddShiftFst j.castSucc := by + rfl + +lemma oddShiftShiftMid_eq_oddMid : @oddShiftShiftMid n = oddMid := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, + Fin.val_natAdd, Fin.val_eq_zero, add_zero, oddMid] + exact Nat.add_comm 1 n + +lemma oddShiftShiftMid_eq_oddShiftFst_last : oddShiftShiftMid = oddShiftFst (Fin.last n) := by + rfl + +lemma oddShiftShiftSnd_eq_oddSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddSnd j := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] + exact Nat.add_comm 1 n + +lemma oddShiftShiftSnd_eq_oddShiftSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddShiftSnd j := by + rw [Fin.ext_iff] + rfl + +lemma oddSnd_eq_oddShiftSnd (j : Fin n) : oddSnd j = oddShiftSnd j := by + rw [Fin.ext_iff] + simp only [oddSnd, Fin.val_cast, Fin.val_natAdd, oddShiftSnd, add_left_inj] + exact Nat.add_comm n 1 + +lemma oddShiftZero_eq_oddFst : oddShiftZero = oddFst (0 : Fin n.succ) := by + ext + simp [oddShiftZero, oddFst] + +lemma oddShiftFst_castSucc_eq_oddFst_succ (j : Fin n) : + oddShiftFst j.castSucc = oddFst j.succ := by + rw [Fin.ext_iff] + simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddFst, Fin.val_succ] + exact Nat.add_comm 1 ↑j + +lemma oddShiftFst_last_eq_oddMid : oddShiftFst (Fin.last n) = oddMid := by + rw [Fin.ext_iff] + simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddMid, Fin.val_last] + exact Nat.add_comm 1 n + +lemma oddShiftSnd_eq_oddSnd (j : Fin n) : oddShiftSnd j = oddSnd j := by + rw [Fin.ext_iff] + simp only [oddShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] + ring + +end theDeltas + +end VectorLikeOddPlane + +end PureU1 From 54c42f8c13a7a85e71800ffe8cde1b7c34fe5e71 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:43:31 +0000 Subject: [PATCH 03/22] Extract symmetric plane (Section B) into SymmPlane.lean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract Section B (the first/symmetric plane) from Odd/BasisLinear.lean into a new file at Odd/BasisLinear/SymmPlane.lean, renaming all identifiers with symm- prefixes (e.g. basisAsCharges → symmBasisAsCharges, P → Psymm, basis → symmBasis, etc.) and updating all internal references accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Odd/BasisLinear/SymmPlane.lean | 253 ++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean new file mode 100644 index 000000000..8b94ead29 --- /dev/null +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean @@ -0,0 +1,253 @@ +/- +Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ChargeSplits +/-! +# The symmetric plane for the odd case basis +-/ + +@[expose] public section + +open Module Nat Finset BigOperators + +namespace PureU1 + +variable {n : ℕ} + +namespace VectorLikeOddPlane + +/-! + +## B. The symmetric plane + +-/ + +/-! + +### B.1. The basis vectors of the symmetric plane as charges + +-/ + +/-- The basis vectors of the symmetric plane as charge assignments. -/ +def symmBasisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := + fun i => + if i = oddFst j then + 1 + else + if i = oddSnd j then + - 1 + else + 0 + +/-! + +### B.2. Components of the basis vectors as charges + +-/ + +lemma symmBasis_on_oddFst_self (j : Fin n) : symmBasisAsCharges j (oddFst j) = 1 := by + simp [symmBasisAsCharges] + +lemma symmBasis_on_oddFst_other {k j : Fin n} (h : k ≠ j) : + symmBasisAsCharges k (oddFst j) = 0 := by + simp only [symmBasisAsCharges, PureU1_numberCharges] + simp only [oddFst, oddSnd] + 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 + simp only [Fin.val_castAdd, Fin.val_natAdd] at h2 + omega + · rfl + +lemma symmBasis_on_other {k : Fin n} {j : Fin (2 * n + 1)} (h1 : j ≠ oddFst k) + (h2 : j ≠ oddSnd k) : + symmBasisAsCharges k j = 0 := by + simp only [symmBasisAsCharges, PureU1_numberCharges] + simp_all only [ne_eq, ↓reduceIte] + +lemma symmBasis_oddSnd_eq_minus_oddFst (j i : Fin n) : + symmBasisAsCharges j (oddSnd i) = - symmBasisAsCharges j (oddFst i) := by + simp only [symmBasisAsCharges, PureU1_numberCharges, oddSnd, oddFst] + split <;> split + any_goals split + any_goals split + any_goals rfl + all_goals + rename_i h1 h2 + rw [Fin.ext_iff] at h1 h2 + simp_all only [Fin.cast_inj, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, neg_neg, + add_eq_right, AddLeftCancelMonoid.add_eq_zero, one_ne_zero, and_false, not_false_eq_true] + all_goals + rename_i h3 + rw [Fin.ext_iff] at h3 + simp_all only [Fin.val_natAdd, Fin.val_castAdd, add_eq_right, + AddLeftCancelMonoid.add_eq_zero, one_ne_zero, and_false, not_false_eq_true] + all_goals + omega + +lemma symmBasis_on_oddSnd_self (j : Fin n) : symmBasisAsCharges j (oddSnd j) = - 1 := by + rw [symmBasis_oddSnd_eq_minus_oddFst, symmBasis_on_oddFst_self] + +lemma symmBasis_on_oddSnd_other {k j : Fin n} (h : k ≠ j) : + symmBasisAsCharges k (oddSnd j) = 0 := by + rw [symmBasis_oddSnd_eq_minus_oddFst, symmBasis_on_oddFst_other h] + rfl + +lemma symmBasis_on_oddMid (j : Fin n) : symmBasisAsCharges j oddMid = 0 := by + simp only [symmBasisAsCharges, PureU1_numberCharges] + split <;> rename_i h + · rw [Fin.ext_iff] at h + simp only [oddMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, Fin.val_eq_zero, + add_zero, oddFst] at h + omega + · split <;> rename_i h2 + · rw [Fin.ext_iff] at h2 + simp only [oddMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, oddSnd] at h2 + omega + · rfl + +/-! + +### B.3. The basis vectors satisfy the linear ACCs + +-/ + +lemma symmBasis_linearACC (j : Fin n) : + (accGrav (2 * n + 1)) (symmBasisAsCharges j) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + erw [sum_odd] + simp [symmBasis_oddSnd_eq_minus_oddFst, symmBasis_on_oddMid] + +/-! + +### B.4. The basis vectors as `LinSols` + +-/ + +/-- The basis vectors of the symmetric plane as `LinSols`. -/ +@[simps!] +def symmBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := + ⟨symmBasisAsCharges j, by + intro i + simp only [PureU1_numberLinear] at i + match i with + | 0 => + exact symmBasis_linearACC j⟩ + +/-! + +### B.5. The inclusion of the symmetric plane into charges + +-/ + +/-- A point in the span of the symmetric plane basis as a charge. -/ +def Psymm (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • symmBasisAsCharges i + +/-! + +### B.6. Components of the symmetric plane + +-/ + +lemma Psymm_oddFst (f : Fin n → ℚ) (j : Fin n) : Psymm f (oddFst j) = f j := by + rw [Psymm, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [symmBasis_on_oddFst_self] + exact Rat.mul_one (f j) + · intro k _ hkj + rw [symmBasis_on_oddFst_other hkj] + exact Rat.mul_zero (f k) + · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] + +lemma Psymm_oddSnd (f : Fin n → ℚ) (j : Fin n) : Psymm f (oddSnd j) = - f j := by + rw [Psymm, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [symmBasis_on_oddSnd_self] + exact mul_neg_one (f j) + · intro k _ hkj + rw [symmBasis_on_oddSnd_other hkj] + exact Rat.mul_zero (f k) + · simp + +lemma Psymm_oddMid (f : Fin n → ℚ) : Psymm f oddMid = 0 := by + rw [Psymm, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, symmBasis_on_oddMid] + +/-! + +### B.7. Points on the symmetric plane satisfy the ACCs + +-/ + +lemma Psymm_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (Psymm f) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_odd] + simp [Psymm_oddSnd, Psymm_oddFst, Psymm_oddMid] + +set_option backward.isDefEq.respectTransparency false in +lemma Psymm_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (Psymm f) = 0 := by + rw [accCube_explicit, sum_odd, Psymm_oddMid] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, + zero_add] + apply Finset.sum_eq_zero + intro i _ + simp only [Psymm_oddFst, Psymm_oddSnd] + ring + +/-! + +### B.8. Kernel of the inclusion into charges + +-/ + +lemma Psymm_zero (f : Fin n → ℚ) (h : Psymm f = 0) : ∀ i, f i = 0 := by + intro i + erw [← Psymm_oddFst f] + rw [h] + rfl + +/-- A point in the span of the symmetric plane basis. -/ +def Psymm' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • symmBasis i + +lemma Psymm'_val (f : Fin n → ℚ) : (Psymm' f).val = Psymm f := by + simp only [Psymm', Psymm] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + +/-! + +### B.9. The basis vectors are linearly independent + +-/ + +theorem symmBasis_linear_independent : LinearIndependent ℚ (@symmBasis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change Psymm' f = 0 at h + have h1 : (Psymm' 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 + rw [Psymm'_val] at h1 + exact Psymm_zero f h1 + +end VectorLikeOddPlane + +end PureU1 From fbb3bccea1ef46d118f72a38b0f22b692a6ff68d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:52:44 +0000 Subject: [PATCH 04/22] Extract shifted plane (Section C) into ShiftPlane.lean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract the shifted plane content (lines 494-747) from BasisLinear.lean into a new file BasisLinear/ShiftPlane.lean, following the same pattern as SymmPlane.lean. All names are updated: - basis! → shiftBasis - P! → Pshift Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Odd/BasisLinear/ShiftPlane.lean | 279 ++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean new file mode 100644 index 000000000..eb57e756b --- /dev/null +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean @@ -0,0 +1,279 @@ +/- +Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ChargeSplits +/-! +# The shifted plane for the odd case basis +-/ + +@[expose] public section + +open Module Nat Finset BigOperators + +namespace PureU1 + +variable {n : ℕ} + +namespace VectorLikeOddPlane + +/-! + +## C. The shifted plane + +-/ + +/-! + +### C.1. The basis vectors of the shifted plane as charges + +-/ + +/-- The basis vectors of the shifted plane as charge assignments. -/ +def shiftBasisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := + fun i => + if i = oddShiftFst j then + 1 + else + if i = oddShiftSnd j then + - 1 + else + 0 + +/-! + +### C.2. Components of the basis vectors as charges + +-/ + +lemma shiftBasis_on_oddShiftFst_self (j : Fin n) : shiftBasisAsCharges j (oddShiftFst j) = 1 := by + simp [shiftBasisAsCharges] + +lemma shiftBasis_on_oddShiftFst_other {k j : Fin n} (h : k ≠ j) : + shiftBasisAsCharges k (oddShiftFst j) = 0 := by + simp only [shiftBasisAsCharges, PureU1_numberCharges] + simp only [oddShiftFst, oddShiftSnd] + 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 + simp only [Fin.val_castAdd, Fin.val_natAdd] at h2 + omega + rfl + +lemma shiftBasis_on_other {k : Fin n} {j : Fin (2 * n + 1)} + (h1 : j ≠ oddShiftFst k) (h2 : j ≠ oddShiftSnd k) : + shiftBasisAsCharges k j = 0 := by + simp only [shiftBasisAsCharges, PureU1_numberCharges] + simp_all only [ne_eq, ↓reduceIte] + +lemma shiftBasis_oddShiftSnd_eq_minus_oddShiftFst (j i : Fin n) : + shiftBasisAsCharges j (oddShiftSnd i) = - shiftBasisAsCharges j (oddShiftFst i) := by + simp only [shiftBasisAsCharges, PureU1_numberCharges, oddShiftSnd, oddShiftFst] + 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 + all_goals rename_i h3 + all_goals rw [Fin.ext_iff] at h3 + all_goals simp_all + all_goals omega + +lemma shiftBasis_on_oddShiftSnd_self (j : Fin n) : shiftBasisAsCharges j (oddShiftSnd j) = - 1 := by + rw [shiftBasis_oddShiftSnd_eq_minus_oddShiftFst, shiftBasis_on_oddShiftFst_self] + +lemma shiftBasis_on_oddShiftSnd_other {k j : Fin n} (h : k ≠ j) : + shiftBasisAsCharges k (oddShiftSnd j) = 0 := by + rw [shiftBasis_oddShiftSnd_eq_minus_oddShiftFst, shiftBasis_on_oddShiftFst_other h] + rfl + +lemma shiftBasis_on_oddShiftZero (j : Fin n) : shiftBasisAsCharges j oddShiftZero = 0 := by + simp only [shiftBasisAsCharges, PureU1_numberCharges] + split <;> rename_i h + · rw [Fin.ext_iff] at h + simp only [oddShiftZero, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, + oddShiftFst, Fin.val_natAdd] at h + omega + · split <;> rename_i h2 + · rw [Fin.ext_iff] at h2 + simp only [oddShiftZero, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, + oddShiftSnd, Fin.val_natAdd] at h2 + omega + · rfl + +/-! + +### C.3. The basis vectors satisfy the linear ACCs + +-/ + +lemma shiftBasis_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (shiftBasisAsCharges j) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_oddShift, shiftBasis_on_oddShiftZero] + simp [shiftBasis_oddShiftSnd_eq_minus_oddShiftFst] + +/-! + +### C.4. The basis vectors as `LinSols` + +-/ + +/-- The basis vectors of the shifted plane as `LinSols`. -/ +@[simps!] +def shiftBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := + ⟨shiftBasisAsCharges j, by + intro i + simp only [PureU1_numberLinear] at i + match i with + | 0 => + exact shiftBasis_linearACC j⟩ + +/-! + +### C.5. Permutations equal adding basis vectors + +-/ + +/-- Swapping the elements oddShiftFst j and oddShiftSnd j is equivalent to adding a vector + shiftBasisAsCharges j. -/ +lemma swapShift_as_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) + (hS : ((FamilyPermutations (2 * n + 1)).linSolRep + (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') : + S'.val = S.val + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j := by + funext i + rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] + by_cases hi : i = oddShiftFst j + · subst hi + simp [HSMul.hSMul, shiftBasis_on_oddShiftFst_self, Equiv.swap_apply_left] + · by_cases hi2 : i = oddShiftSnd j + · subst hi2 + simp [HSMul.hSMul, shiftBasis_on_oddShiftSnd_self, Equiv.swap_apply_right] + · simp only [Equiv.invFun_as_coe, HSMul.hSMul, ACCSystemCharges.chargesAddCommMonoid_add, + ACCSystemCharges.chargesModule_smul] + rw [shiftBasis_on_other hi hi2] + aesop + +/-! + +### C.6. The inclusion of the shifted plane into charges + +-/ + +/-- A point in the span of the shifted plane basis as a charge. -/ +def Pshift (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • shiftBasisAsCharges i + +/-! + +### C.7. Components of the shifted plane + +-/ + +lemma Pshift_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : Pshift f (oddShiftFst j) = f j := by + rw [Pshift, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [shiftBasis_on_oddShiftFst_self] + exact Rat.mul_one (f j) + · intro k _ hkj + rw [shiftBasis_on_oddShiftFst_other hkj] + exact Rat.mul_zero (f k) + · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] + +lemma Pshift_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : Pshift f (oddShiftSnd j) = - f j := by + rw [Pshift, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [shiftBasis_on_oddShiftSnd_self] + exact mul_neg_one (f j) + · intro k _ hkj + rw [shiftBasis_on_oddShiftSnd_other hkj] + exact Rat.mul_zero (f k) + · simp + +lemma Pshift_oddShiftZero (f : Fin n → ℚ) : Pshift f oddShiftZero = 0 := by + rw [Pshift, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, shiftBasis_on_oddShiftZero] + +/-! + +### C.8. Points on the shifted plane satisfy the ACCs + +-/ + +lemma Pshift_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (Pshift f) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_oddShift] + simp [Pshift_oddShiftSnd, Pshift_oddShiftFst, Pshift_oddShiftZero] + +set_option backward.isDefEq.respectTransparency false in +lemma Pshift_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (Pshift f) = 0 := by + rw [accCube_explicit, sum_oddShift, Pshift_oddShiftZero] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] + apply Finset.sum_eq_zero + intro i _ + simp only [Pshift_oddShiftFst, Pshift_oddShiftSnd] + ring + +/-! + +### C.9. Kernel of the inclusion into charges + +-/ + +lemma Pshift_zero (f : Fin n → ℚ) (h : Pshift f = 0) : ∀ i, f i = 0 := by + intro i + rw [← Pshift_oddShiftFst f] + rw [h] + rfl + +/-! + +### C.10. The inclusion of the shifted plane into LinSols + +-/ + +/-- A point in the span of the shifted plane basis. -/ +def Pshift' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • shiftBasis i + +lemma Pshift'_val (f : Fin n → ℚ) : (Pshift' f).val = Pshift f := by + simp only [Pshift', Pshift] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + +/-! + +### C.11. The basis vectors are linearly independent + +-/ + +theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change Pshift' f = 0 at h + have h1 : (Pshift' 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 + rw [Pshift'_val] at h1 + exact Pshift_zero f h1 + +end VectorLikeOddPlane + +end PureU1 From cd0ecf4267f0d7b75c3118a76e717d81987fa209 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:54:54 +0000 Subject: [PATCH 05/22] Extract charge splitting definitions into ChargeSplits.lean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract Section A (charge splitting definitions) from Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean into a new file Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean. This includes: - A.1: evenFst, evenSnd, ext_even, sum_even - A.2: n_cond₂, evenShiftFst, evenShiftSnd, evenShiftZero, evenShiftLast, sum_evenShift - A.3: All relating lemmas between the two splittings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Even/BasisLinear/ChargeSplits.lean | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean new file mode 100644 index 000000000..3b76d59d6 --- /dev/null +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean @@ -0,0 +1,158 @@ +/- +Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.VectorLike +/-! + +# Charge splits for the even case basis + +-/ + +@[expose] public section + +open Nat Module Finset BigOperators + +namespace PureU1 + +variable {n : ℕ} + +namespace VectorLikeEvenPlane + +/-! + +## A. Splitting the charges up into groups + +We have `2 * n.succ` charges, which we split up in the following ways: + +`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` + +``` +| evenShiftZero (0) | evenShiftFst j (1 to n) | + evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | +``` + +-/ + +/-! + +### A.1. The even split: Spltting the charges up via `n.succ + n.succ` + +-/ + +/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the first `n.succ`, + casted into `Fin (2 * n.succ)`. -/ +def evenFst (j : Fin n.succ) : Fin (2 * n.succ) := + Fin.cast (split_equal n.succ) (Fin.castAdd n.succ j) + +/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the second `n.succ`, + casted into `Fin (2 * n.succ)`. -/ +def evenSnd (j : Fin n.succ) : Fin (2 * n.succ) := + Fin.cast (split_equal n.succ) (Fin.natAdd n.succ j) + +lemma ext_even (S T : Fin (2 * n.succ) → ℚ) (h1 : ∀ i, S (evenFst i) = T (evenFst i)) + (h2 : ∀ i, S (evenSnd i) = T (evenSnd i)) : S = T := by + funext i + by_cases hi : i.val < n.succ + · let j : Fin n.succ := ⟨i, hi⟩ + have h2 := h1 j + have h3 : evenFst 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 : evenSnd j = i := by + simp only [succ_eq_add_one, evenSnd, Fin.ext_iff, Fin.val_cast, Fin.val_natAdd, j] + omega + rw [h3] at h2 + exact h2 + +lemma sum_even (S : Fin (2 * n.succ) → ℚ) : + ∑ i, S i = ∑ i : Fin n.succ, ((S ∘ evenFst) i + (S ∘ evenSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (n.succ + n.succ), S (Fin.cast (split_equal n.succ) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (split_equal n.succ)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _=> rfl + rw [h1, Fin.sum_univ_add, Finset.sum_add_distrib] + rfl + +/-! + +### A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` + +-/ + +lemma n_cond₂ (n : ℕ) : 1 + ((n + n) + 1) = 2 * n.succ := by + linarith + +/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the first `n`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftFst (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) + (Fin.natAdd 1 (Fin.castAdd 1 (Fin.castAdd n j))) + +/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the second `n`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftSnd (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) + (Fin.natAdd 1 (Fin.castAdd 1 (Fin.natAdd n j))) + +/-- The element of `Fin (1 + (n + n + 1))` corresponding to the first `1`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftZero : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.castAdd ((n + n) + 1) 0)) + +/-- The element of `Fin (1 + (n + n + 1))` corresponding to the second `1`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftLast : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.natAdd 1 (Fin.natAdd (n + n) 0))) + +lemma sum_evenShift (S : Fin (2 * n.succ) → ℚ) : + ∑ i, S i = S evenShiftZero + S evenShiftLast + + ∑ i : Fin n, ((S ∘ evenShiftFst) i + (S ∘ evenShiftSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (1 + ((n + n) + 1)), S (Fin.cast (n_cond₂ n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (n_cond₂ n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1] + rw [Fin.sum_univ_add, Fin.sum_univ_add, Fin.sum_univ_add, Finset.sum_add_distrib] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + 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 + +/-! + +### A.3. Lemmas relating the two splittings + +-/ +lemma evenShiftZero_eq_evenFst_zero : @evenShiftZero n = evenFst 0 := rfl + +lemma evenShiftLast_eq_evenSnd_last: @evenShiftLast n = evenSnd (Fin.last n) := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, evenSnd, Fin.natAdd_last, Fin.val_last] + omega + +lemma evenShiftFst_eq_evenFst_succ (j : Fin n) : evenShiftFst j = evenFst j.succ := by + rw [Fin.ext_iff, evenFst, evenShiftFst] + simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_succ] + ring + +lemma evenShiftSnd_eq_evenSnd_castSucc (j : Fin n) : evenShiftSnd j = evenSnd j.castSucc := by + rw [Fin.ext_iff, evenSnd, evenShiftSnd] + simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_castSucc] + ring_nf + rw [Nat.succ_eq_add_one] + ring + +end VectorLikeEvenPlane + +end PureU1 From a98c1e87cad6495c5909a28c87119fecb95d2a6c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 14:02:20 +0000 Subject: [PATCH 06/22] Extract symmetric plane (Section B) into SymmPlane.lean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract Section B (lines 221-474) from BasisLinear.lean into a new file BasisLinear/SymmPlane.lean, renaming all definitions with symm prefix (e.g. basisAsCharges → symmBasisAsCharges, P → Psymm, etc.) and updating all internal references and documentation accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Even/BasisLinear/SymmPlane.lean | 281 ++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean new file mode 100644 index 000000000..75cab6bc9 --- /dev/null +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean @@ -0,0 +1,281 @@ +/- +Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ChargeSplits +/-! + +# The symmetric plane for the even case basis + +-/ + +@[expose] public section + +open Nat Module Finset BigOperators + +namespace PureU1 + +variable {n : ℕ} + +namespace VectorLikeEvenPlane + +/-! + +## B. The symmetric plane + +-/ + +/-! + +### B.1. The basis vectors of the symmetric plane as charges + +-/ + +/-- The basis vectors of the symmetric plane as charges. -/ +def symmBasisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).Charges := + fun i => + if i = evenFst j then + 1 + else + if i = evenSnd j then + - 1 + else + 0 + +/-! + +### B.2. Components of the basis vectors + +-/ + +lemma symmBasis_on_evenFst_self (j : Fin n.succ) : symmBasisAsCharges j (evenFst j) = 1 := by + simp [symmBasisAsCharges] + +lemma symmBasis_on_evenFst_other {k j : Fin n.succ} (h : k ≠ j) : + symmBasisAsCharges k (evenFst j) = 0 := by + simp only [symmBasisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenFst, evenSnd] + 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 only [succ_eq_add_one, ne_eq, Fin.natAdd_eq_addNat, Fin.cast_inj, neg_eq_zero, + one_ne_zero] + rw [Fin.ext_iff] at h2 + simp only [Fin.val_castAdd, Fin.val_addNat] at h2 + omega + · rfl + +lemma symmBasis_on_other {k : Fin n.succ} {j : Fin (2 * n.succ)} (h1 : j ≠ evenFst k) + (h2 : j ≠ evenSnd k) : symmBasisAsCharges k j = 0 := by + simp only [symmBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] + simp_all only [ne_eq, ↓reduceIte] + +lemma symmBasis_evenSnd_eq_neg_evenFst (j i : Fin n.succ) : + symmBasisAsCharges j (evenSnd i) = - symmBasisAsCharges j (evenFst i) := by + simp only [symmBasisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenSnd, evenFst] + split <;> split + any_goals split + any_goals rfl + 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 + all_goals omega + +lemma symmBasis_on_evenSnd_self (j : Fin n.succ) : symmBasisAsCharges j (evenSnd j) = - 1 := by + rw [symmBasis_evenSnd_eq_neg_evenFst, symmBasis_on_evenFst_self] + +lemma symmBasis_on_evenSnd_other {k j : Fin n.succ} (h : k ≠ j) : symmBasisAsCharges k (evenSnd j) = 0 := by + rw [symmBasis_evenSnd_eq_neg_evenFst, symmBasis_on_evenFst_other h] + rfl + +/-! + +### B.3. The basis vectors satisfy the linear ACCs + +-/ + +lemma symmBasis_linearACC (j : Fin n.succ) : (accGrav (2 * n.succ)) (symmBasisAsCharges j) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_even] + simp [symmBasis_evenSnd_eq_neg_evenFst] +/-! + +### B.4. The basis vectors satisfy the cubic ACC + +-/ +lemma symmBasis_accCube (j : Fin n.succ) : + accCube (2 * n.succ) (symmBasisAsCharges j) = 0 := by + rw [accCube_explicit, sum_even] + apply Finset.sum_eq_zero + intro i _ + simp only [succ_eq_add_one, Function.comp_apply, symmBasis_evenSnd_eq_neg_evenFst] + ring + +/-! + +### B.5. The basis vectors as linear solutions + +-/ + +/-- The basis vectors of the symmetric plane as `LinSols`. -/ +@[simps!] +def symmBasis (j : Fin n.succ) : (PureU1 (2 * n.succ)).LinSols := + ⟨symmBasisAsCharges j, by + intro i + simp only [succ_eq_add_one, PureU1_numberLinear] at i + match i with + | 0 => + exact symmBasis_linearACC j⟩ + +/-! + +### B.6. The inclusion of the symmetric plane into charges + +-/ + +/-- A point in the span of the symmetric plane basis as a charge. -/ +def Psymm (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • symmBasisAsCharges i + +/-! + +### B.7. Components of the inclusion into charges + +-/ + +lemma Psymm_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : Psymm f (evenFst j) = f j := by + rw [Psymm, sum_of_charges] + simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [symmBasis_on_evenFst_self] + exact Rat.mul_one (f j) + · intro k _ hkj + rw [symmBasis_on_evenFst_other hkj] + exact Rat.mul_zero (f k) + · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] + +lemma Psymm_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : Psymm f (evenSnd j) = - f j := by + rw [Psymm, sum_of_charges] + simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · simp only [symmBasis_on_evenSnd_self, mul_neg, mul_one] + · intro k _ hkj + simp only [symmBasis_on_evenSnd_other hkj, mul_zero] + · simp + +lemma Psymm_evenSnd_evenFst (f : Fin n.succ → ℚ) : Psymm f ∘ evenSnd = - Psymm f ∘ evenFst := by + funext j + simp only [PureU1_numberCharges, Function.comp_apply, Pi.neg_apply] + rw [Psymm_evenFst, Psymm_evenSnd] + +/-! + +### B.8. The inclusion into charges satisfies the linear and cubic ACCs + +-/ + +lemma Psymm_linearACC (f : Fin n.succ → ℚ) : (accGrav (2 * n.succ)) (Psymm f) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_even] + simp [Psymm_evenSnd, Psymm_evenFst] + +lemma Psymm_accCube (f : Fin n.succ → ℚ) : accCube (2 * n.succ) (Psymm f) = 0 := by + rw [accCube_explicit, sum_even] + apply Finset.sum_eq_zero + intro i _ + simp only [succ_eq_add_one, Function.comp_apply, Psymm_evenFst, Psymm_evenSnd] + ring + +/-! + +### B.9. Kernel of the inclusion into charges + +-/ + +lemma Psymm_zero (f : Fin n.succ → ℚ) (h : Psymm f = 0) : ∀ i, f i = 0 := by + intro i + erw [← Psymm_evenFst f] + rw [h] + rfl + +/-! + +### B.10. The inclusion of the plane into linear solutions + +-/ + +/-- A point in the span of the symmetric plane basis. -/ +def Psymm' (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • symmBasis i + +lemma Psymm'_val (f : Fin n.succ → ℚ) : (Psymm' f).val = Psymm f := by + simp only [succ_eq_add_one, Psymm', Psymm] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + +/-! + +### B.11. The basis vectors are linearly independent + +-/ + +theorem symmBasis_linear_independent : LinearIndependent ℚ (@symmBasis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change Psymm' f = 0 at h + have h1 : (Psymm' 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 + rw [Psymm'_val] at h1 + exact Psymm_zero f h1 + +/-! + +### B.12. Every vector-like even solution is in the span of the basis of the symmetric plane + +-/ + +lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols) + (hS : VectorLikeEven S.val) : ∃ (M : (FamilyPermutations (2 * n.succ)).group), + (FamilyPermutations (2 * n.succ)).linSolRep M S ∈ Submodule.span ℚ (Set.range symmBasis) := by + use (Tuple.sort S.val).symm + change sortAFL S ∈ Submodule.span ℚ (Set.range symmBasis) + rw [Submodule.mem_span_range_iff_exists_fun ℚ] + let f : Fin n.succ → ℚ := fun i => (sortAFL S).val (evenFst i) + use f + apply ACCSystemLinear.LinSols.ext + rw [sortAFL_val] + erw [Psymm'_val] + apply ext_even + · intro i + rw [Psymm_evenFst] + rfl + · intro i + rw [Psymm_evenSnd] + have ht := hS i + change sort S.val (evenFst i) = - sort S.val (evenSnd i) at ht + have h : sort S.val (evenSnd i) = - sort S.val (evenFst i) := by + rw [ht] + ring + rw [h] + rfl + +end VectorLikeEvenPlane + +end PureU1 From 8721883229422716a8987c2ab239f4f9c8b2af9a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 14:05:14 +0000 Subject: [PATCH 07/22] Extract shifted plane section into ShiftPlane.lean with renamed identifiers Extract Section C (the shifted plane) from BasisLinear.lean into its own file at BasisLinear/ShiftPlane.lean. All identifiers are renamed to use and the evenShftSnd typo is fixed to evenShiftSnd. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Even/BasisLinear/ShiftPlane.lean | 329 ++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean new file mode 100644 index 000000000..150bac7e7 --- /dev/null +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean @@ -0,0 +1,329 @@ +/- +Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ChargeSplits +/-! + +# The shifted plane for the even case basis + +-/ + +@[expose] public section + +open Nat Module Finset BigOperators + +namespace PureU1 + +variable {n : ℕ} + +namespace VectorLikeEvenPlane + +/-! + +## C. The shifted plane + +-/ + +/-- The basis vectors of the shifted plane as charges. -/ +def shiftBasisAsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges := + fun i => + if i = evenShiftFst j then + 1 + else + if i = evenShiftSnd j then + - 1 + else + 0 +/-! + +### C.2. Components of the vectors + +-/ + +lemma shiftBasis_on_evenShiftFst_self (j : Fin n) : shiftBasisAsCharges j (evenShiftFst j) = 1 := by + simp [shiftBasisAsCharges] + +lemma shiftBasis_on_other {k : Fin n} {j : Fin (2 * n.succ)} (h1 : j ≠ evenShiftFst k) + (h2 : j ≠ evenShiftSnd k) : shiftBasisAsCharges k j = 0 := by + simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] + simp_all only [ne_eq, ↓reduceIte] + +lemma shiftBasis_on_evenShiftFst_other {k j : Fin n} (h : k ≠ j) : + shiftBasisAsCharges k (evenShiftFst j) = 0 := by + simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] + simp only [evenShiftFst, succ_eq_add_one, evenShiftSnd] + 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 + simp only [Fin.val_castAdd, Fin.val_addNat] at h2 + omega + · rfl + +lemma shiftBasis_evenShiftSnd_eq_neg_evenShiftFst (j i : Fin n) : + shiftBasisAsCharges j (evenShiftSnd i) = - shiftBasisAsCharges j (evenShiftFst i) := by + simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenShiftSnd, evenShiftFst] + split <;> split + any_goals split + any_goals split + any_goals rfl + all_goals + rename_i h1 h2 + rw [Fin.ext_iff] at h1 h2 + simp_all only [Fin.natAdd_eq_addNat, Fin.cast_inj, Fin.val_cast, Fin.val_natAdd, + Fin.val_castAdd, add_right_inj, Fin.val_addNat, add_eq_left] + · subst h1 + exact Fin.elim0 i + all_goals + rename_i h3 + rw [Fin.ext_iff] at h3 + simp_all only [Fin.val_natAdd, Fin.val_castAdd, Fin.val_addNat, not_true_eq_false] + all_goals + omega + +lemma shiftBasis_on_evenShiftSnd_self (j : Fin n) : shiftBasisAsCharges j (evenShiftSnd j) = - 1 := by + rw [shiftBasis_evenShiftSnd_eq_neg_evenShiftFst, shiftBasis_on_evenShiftFst_self] + +lemma shiftBasis_on_evenShiftSnd_other {k j : Fin n} (h : k ≠ j) : + shiftBasisAsCharges k (evenShiftSnd j) = 0 := by + rw [shiftBasis_evenShiftSnd_eq_neg_evenShiftFst, shiftBasis_on_evenShiftFst_other h] + rfl + +lemma shiftBasis_on_evenShiftZero (j : Fin n) : shiftBasisAsCharges j evenShiftZero = 0 := by + simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] + split<;> rename_i h + · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftFst, Fin.ext_iff, + Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, Fin.val_natAdd] at h + omega + · split <;> rename_i h2 + · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftSnd, Fin.ext_iff, + Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, Fin.val_natAdd] at h2 + omega + · rfl + +lemma shiftBasis_on_evenShiftLast (j : Fin n) : shiftBasisAsCharges j evenShiftLast = 0 := by + simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] + split <;> rename_i h + · rw [Fin.ext_iff] at h + simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, evenShiftFst, Fin.val_castAdd, add_right_inj] at h + omega + · split <;> rename_i h2 + · rw [Fin.ext_iff] at h2 + simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, evenShiftSnd, Fin.val_castAdd, add_right_inj] at h2 + omega + · rfl + +/-! + +### C.3. The vectors satisfy the linear ACCs + +-/ + +lemma shiftBasis_linearACC (j : Fin n) : (accGrav (2 * n.succ)) (shiftBasisAsCharges j) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_evenShift, shiftBasis_on_evenShiftZero, shiftBasis_on_evenShiftLast] + simp [shiftBasis_evenShiftSnd_eq_neg_evenShiftFst] + +/-! + +### C.4. The vectors satisfy the cubic ACC + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma shiftBasis_accCube (j : Fin n) : + accCube (2 * n.succ) (shiftBasisAsCharges j) = 0 := by + rw [accCube_explicit, sum_evenShift] + rw [shiftBasis_on_evenShiftLast, shiftBasis_on_evenShiftZero] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, + zero_add] + apply Finset.sum_eq_zero + intro i _ + simp only [shiftBasis_evenShiftSnd_eq_neg_evenShiftFst] + ring + +/-! + +### C.6. The vectors as linear solutions + +-/ +/-- The basis vectors of the shifted plane as `LinSols`. -/ +@[simps!] +def shiftBasis (j : Fin n) : (PureU1 (2 * n.succ)).LinSols := + ⟨shiftBasisAsCharges j, by + intro i + simp only [succ_eq_add_one, PureU1_numberLinear] at i + match i with + | 0 => + exact shiftBasis_linearACC j⟩ + +/-! + +### C.7. The inclusion of the shifted plane into charges + +-/ + +/-- A point in the span of the shifted plane basis as a charge. -/ +def Pshift (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • shiftBasisAsCharges i + +/-! + +### C.8. Components of the inclusion into charges + +-/ + +lemma Pshift_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : Pshift f (evenShiftFst j) = f j := by + rw [Pshift, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [shiftBasis_on_evenShiftFst_self] + exact Rat.mul_one (f j) + · intro k _ hkj + rw [shiftBasis_on_evenShiftFst_other hkj] + exact Rat.mul_zero (f k) + · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] + +lemma Pshift_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : Pshift f (evenShiftSnd j) = - f j := by + rw [Pshift, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [shiftBasis_on_evenShiftSnd_self] + exact mul_neg_one (f j) + · intro k _ hkj + rw [shiftBasis_on_evenShiftSnd_other hkj] + exact Rat.mul_zero (f k) + · simp + +lemma Pshift_evenShiftZero (f : Fin n → ℚ) : Pshift f (evenShiftZero) = 0 := by + rw [Pshift, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, shiftBasis_on_evenShiftZero] + +lemma Pshift_evenShiftLast (f : Fin n → ℚ) : Pshift f evenShiftLast = 0 := by + rw [Pshift, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, shiftBasis_on_evenShiftLast] + +/-! + +### C.9. The inclusion into charges satisfies the cubic ACC + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma Pshift_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (Pshift f) = 0 := by + rw [accCube_explicit, sum_evenShift, Pshift_evenShiftZero, Pshift_evenShiftLast] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, + zero_add] + apply Finset.sum_eq_zero + intro i _ + simp only [Pshift_evenShiftFst, Pshift_evenShiftSnd] + ring + +/-! + +### C.10. Kernel of the inclusion into charges + +-/ + +lemma Pshift_zero (f : Fin n → ℚ) (h : Pshift f = 0) : ∀ i, f i = 0 := by + intro i + rw [← Pshift_evenShiftFst f] + rw [h] + rfl + +/-! + +### C.11. The inclusion of the shifted plane into the span of the basis + +-/ + +lemma Pshift_in_span (f : Fin n → ℚ) : Pshift f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by + rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] + use f + rfl + +/-! + +### C.12. The inclusion of the plane into linear solutions + +-/ + +/-- A point in the span of the shifted plane basis. -/ +def Pshift' (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • shiftBasis i + +lemma Pshift'_val (f : Fin n → ℚ) : (Pshift' f).val = Pshift f := by + simp only [succ_eq_add_one, Pshift', Pshift] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + +/-! + +### C.13. The basis vectors are linearly independent + +-/ + +theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change Pshift' f = 0 at h + have h1 : (Pshift' 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 + rw [Pshift'_val] at h1 + exact Pshift_zero f h1 + +/-! + +### C.14. Properties of the basis vectors relating to the span + +-/ + +lemma smul_shiftBasisAsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : Fin n) : + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j ∈ + Submodule.span ℚ (Set.range shiftBasisAsCharges) := by + apply Submodule.smul_mem + apply SetLike.mem_of_subset + · exact Submodule.subset_span + · simp_all only [Set.mem_range, exists_apply_eq_apply] + +/-! + +### C.15. Permutations as additions of basis vectors + +-/ + +/-- Swapping the elements evenShiftFst j and evenShiftSnd j is equivalent to + adding a vector shiftBasisAsCharges j. -/ +lemma swapShift_as_add {S S' : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) + (hS : ((FamilyPermutations (2 * n.succ)).linSolRep + (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') : + S'.val = S.val + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j := by + funext i + rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] + by_cases hi : i = evenShiftFst j + · subst hi + simp [HSMul.hSMul, shiftBasis_on_evenShiftFst_self, Equiv.swap_apply_left] + · by_cases hi2 : i = evenShiftSnd j + · simp [HSMul.hSMul, hi2, shiftBasis_on_evenShiftSnd_self, Equiv.swap_apply_right] + · simp only [succ_eq_add_one, Equiv.invFun_as_coe, HSMul.hSMul, + ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul] + rw [shiftBasis_on_other hi hi2] + aesop + +end VectorLikeEvenPlane + +end PureU1 From a7000cf5f4713a9fdcb5c37f3dda79d0ff01f7b2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 14:13:41 +0000 Subject: [PATCH 08/22] Refactor Odd/BasisLinear.lean: extract sections A-C, rename to Psymm/Pshift - Remove sections A, B, C (now in ChargeSplits, SymmPlane, ShiftPlane) - Import SymmPlane and ShiftPlane publicly - Update module doc to reflect new structure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../AnomalyCancellation/Odd/BasisLinear.lean | 791 ++---------------- 1 file changed, 55 insertions(+), 736 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean index 7257d0bb6..605e20d28 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean @@ -5,8 +5,8 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear -public import Physlib.QFT.QED.AnomalyCancellation.VectorLike +public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.SymmPlane +public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ShiftPlane /-! # Splitting the linear solutions in the odd case into two ACC-satisfying planes @@ -16,43 +16,22 @@ We split the linear solutions of `PureU1 (2 * n + 1)` into two planes, where every point in either plane satisfies both the linear and cubic anomaly cancellation conditions. +The two planes are named after the charge-index splitting they are built from: +- The **symmetric plane** (`SymmPlane`): basis vectors pair charges at positions from the + symmetric split `(n + 1) + n`. +- The **shifted plane** (`ShiftPlane`): basis vectors pair charges at positions from the + shifted split `1 + n + n`. + ## ii. Key results -- `P'` : The inclusion of the first plane into linear solutions -- `P_accCube` : The statement that chares from the first plane satisfy the cubic ACC -- `P!'` : The inclusion of the second plane. -- `P!_accCube` : The statement that charges from the second plane satisfy the cubic ACC +- `Psymm'` : The inclusion of the symmetric plane into linear solutions. +- `Psymm_accCube` : The statement that charges from the symmetric plane satisfy the cubic ACC. +- `Pshift'` : The inclusion of the shifted plane into linear solutions. +- `Pshift_accCube` : The statement that charges from the shifted plane satisfy the cubic ACC. - `span_basis` : Every linear solution is the sum of a point from each plane. ## iii. Table of contents -- A. Splitting the charges up into groups - - A.1. The symmetric split: Spltting the charges up via `(n + 1) + 1` - - A.2. The shifted split: Spltting the charges up via `1 + n + n` - - A.3. The shifte shifted split: Spltting the charges up via `((1+n)+1) + n.succ` - - A.4. Relating the splittings together -- B. The first plane - - B.1. The basis vectors of the first plane as charges - - B.2. Components of the basis vectors as charges - - B.3. The basis vectors satisfy the linear ACCs - - B.4. The basis vectors as `LinSols` - - B.5. The inclusion of the first plane into charges - - B.6. Components of the first plane - - B.7. Points on the first plane satisfies the ACCs - - B.8. Kernel of the inclusion into charges - - B.9. The basis vectors are linearly independent -- C. The second plane - - C.1. The basis vectors of the second plane as charges - - C.2. Components of the basis vectors as charges - - C.3. The basis vectors satisfy the linear ACCs - - C.4. The basis vectors as `LinSols` - - C.5. Permutations equal adding basis vectors - - C.6. The inclusion of the second plane into charges - - C.7. Components of the second plane - - C.8. Points on the second plane satisfies the ACCs - - C.9. Kernel of the inclusion into charges - - C.10. The inclusion of the second plane into LinSols - - C.11. The basis vectors are linearly independent - D. The mixed cubic ACC from points in both planes - E. The combined basis - E.1. The combined basis as `LinSols` @@ -64,7 +43,7 @@ conditions. - E.7. Injectivity of the inclusion into linear solutions - E.8. Cardinality of the basis - E.9. The basis vectors as a basis -- F. Every Lienar solution is the sum of a point from each plane +- F. Every linear solution is the sum of a point from each plane - F.1. Relation under permutations ## iv. References @@ -85,684 +64,22 @@ namespace VectorLikeOddPlane /-! -## A. Splitting the charges up into groups - -We have `2 * n + 1` charges, which we split up in the following ways: - -`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` - -``` -| evenShiftZero (0) | evenShiftFst j (1 to n) | - evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | -``` - --/ - -section theDeltas - -/-! - -### A.1. The symmetric split: Spltting the charges up via `(n + 1) + 1` - --/ - -lemma odd_shift_eq (n : ℕ) : (1 + n) + n = 2 * n +1 := by - omega - -/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the first `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddFst (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.castAdd n (Fin.castAdd 1 j)) - -/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the second `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddSnd (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.natAdd (n+1) j) - -/-- The element representing `1` in `Fin ((n + 1) + n)`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddMid : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.castAdd n (Fin.natAdd n 1)) - -lemma sum_odd (S : Fin (2 * n + 1) → ℚ) : - ∑ i, S i = S oddMid + ∑ i : Fin n, ((S ∘ oddFst) i + (S ∘ oddSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (n + 1 + n), S (Fin.cast (split_odd n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (split_odd n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1] - rw [Fin.sum_univ_add, Fin.sum_univ_add] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - nth_rewrite 2 [add_comm] - rw [add_assoc] - rw [Finset.sum_add_distrib] - rfl - -/-! - -### A.2. The shifted split: Spltting the charges up via `1 + n + n` - --/ - -/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the first `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftFst (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.natAdd 1 j)) - -/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the second `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftSnd (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.natAdd (1 + n) j) - -/-- The element representing the `1` in `Fin (1 + n + n)`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftZero : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.castAdd n 1)) - -lemma sum_oddShift (S : Fin (2 * n + 1) → ℚ) : - ∑ i, S i = S oddShiftZero + ∑ i : Fin n, ((S ∘ oddShiftFst) i + (S ∘ oddShiftSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin ((1+n)+n), S (Fin.cast (odd_shift_eq n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (odd_shift_eq n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1, Fin.sum_univ_add, Fin.sum_univ_add] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - rw [add_assoc, Finset.sum_add_distrib] - rfl - -/-! - -### A.3. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` - --/ - -lemma odd_shift_shift_eq (n : ℕ) : ((1+n)+1) + n.succ = 2 * n.succ + 1 := by - omega - -/-- The element representing the first `1` in `Fin (1 + n + 1 + n.succ)` casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftZero : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.castAdd n 1))) - -/-- The inclusion of `Fin n` into `Fin (1 + n + 1 + n.succ)` via the first `n` and casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftFst (j : Fin n) : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.natAdd 1 j))) - -/-- The element representing the second `1` in `Fin (1 + n + 1 + n.succ)` casted - to `2 * n.succ + 1`. -/ -def oddShiftShiftMid : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.natAdd (1+n) 1)) - -/-- The inclusion of `Fin n.succ` into `Fin (1 + n + 1 + n.succ)` via the `n.succ` and casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftSnd (j : Fin n.succ) : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.natAdd ((1+n)+1) j) - -/-! - -### A.4. Relating the splittings together - --/ -lemma oddShiftShiftZero_eq_oddFst_zero : @oddShiftShiftZero n = oddFst 0 := - Fin.rev_inj.mp rfl - -lemma oddShiftShiftZero_eq_oddShiftZero : @oddShiftShiftZero n = oddShiftZero := rfl - -lemma oddShiftShiftFst_eq_oddFst_succ (j : Fin n) : - oddShiftShiftFst j = oddFst j.succ := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, - oddFst, Fin.val_succ] - exact Nat.add_comm 1 ↑j - -lemma oddShiftShiftFst_eq_oddShiftFst_castSucc (j : Fin n) : - oddShiftShiftFst j = oddShiftFst j.castSucc := by - rfl - -lemma oddShiftShiftMid_eq_oddMid : @oddShiftShiftMid n = oddMid := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, - Fin.val_natAdd, Fin.val_eq_zero, add_zero, oddMid] - exact Nat.add_comm 1 n - -lemma oddShiftShiftMid_eq_oddShiftFst_last : oddShiftShiftMid = oddShiftFst (Fin.last n) := by - rfl - -lemma oddShiftShiftSnd_eq_oddSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddSnd j := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] - exact Nat.add_comm 1 n - -lemma oddShiftShiftSnd_eq_oddShiftSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddShiftSnd j := by - rw [Fin.ext_iff] - rfl - -lemma oddSnd_eq_oddShiftSnd (j : Fin n) : oddSnd j = oddShiftSnd j := by - rw [Fin.ext_iff] - simp only [oddSnd, Fin.val_cast, Fin.val_natAdd, oddShiftSnd, add_left_inj] - exact Nat.add_comm n 1 - -lemma oddShiftZero_eq_oddFst : oddShiftZero = oddFst (0 : Fin n.succ) := by - ext - simp [oddShiftZero, oddFst] - -lemma oddShiftFst_castSucc_eq_oddFst_succ (j : Fin n) : - oddShiftFst j.castSucc = oddFst j.succ := by - rw [Fin.ext_iff] - simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddFst, Fin.val_succ] - exact Nat.add_comm 1 ↑j - -lemma oddShiftFst_last_eq_oddMid : oddShiftFst (Fin.last n) = oddMid := by - rw [Fin.ext_iff] - simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddMid, Fin.val_last] - exact Nat.add_comm 1 n - -lemma oddShiftSnd_eq_oddSnd (j : Fin n) : oddShiftSnd j = oddSnd j := by - rw [Fin.ext_iff] - simp only [oddShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] - ring - -end theDeltas - -/-! - -## B. The first plane - --/ - -/-! - -### B.1. The basis vectors of the first plane as charges - --/ - -/-- The first part of the basis as charge assignments. -/ -def basisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := - fun i => - if i = oddFst j then - 1 - else - if i = oddSnd j then - - 1 - else - 0 - -/-! - -### B.2. Components of the basis vectors as charges - --/ - -lemma basis_on_oddFst_self (j : Fin n) : basisAsCharges j (oddFst j) = 1 := by - simp [basisAsCharges] - -lemma basis_on_oddFst_other {k j : Fin n} (h : k ≠ j) : - basisAsCharges k (oddFst j) = 0 := by - simp only [basisAsCharges, PureU1_numberCharges] - simp only [oddFst, oddSnd] - 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 - simp only [Fin.val_castAdd, Fin.val_natAdd] at h2 - omega - · rfl - -lemma basis_on_other {k : Fin n} {j : Fin (2 * n + 1)} (h1 : j ≠ oddFst k) (h2 : j ≠ oddSnd k) : - basisAsCharges k j = 0 := by - simp only [basisAsCharges, PureU1_numberCharges] - simp_all only [ne_eq, ↓reduceIte] - -lemma basis_oddSnd_eq_minus_oddFst (j i : Fin n) : - basisAsCharges j (oddSnd i) = - basisAsCharges j (oddFst i) := by - simp only [basisAsCharges, PureU1_numberCharges, oddSnd, oddFst] - split <;> split - any_goals split - any_goals split - any_goals rfl - all_goals - rename_i h1 h2 - rw [Fin.ext_iff] at h1 h2 - simp_all only [Fin.cast_inj, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, neg_neg, - add_eq_right, AddLeftCancelMonoid.add_eq_zero, one_ne_zero, and_false, not_false_eq_true] - all_goals - rename_i h3 - rw [Fin.ext_iff] at h3 - simp_all only [Fin.val_natAdd, Fin.val_castAdd, add_eq_right, - AddLeftCancelMonoid.add_eq_zero, one_ne_zero, and_false, not_false_eq_true] - all_goals - omega - -lemma basis_on_oddSnd_self (j : Fin n) : basisAsCharges j (oddSnd j) = - 1 := by - rw [basis_oddSnd_eq_minus_oddFst, basis_on_oddFst_self] - -lemma basis_on_oddSnd_other {k j : Fin n} (h : k ≠ j) : basisAsCharges k (oddSnd j) = 0 := by - rw [basis_oddSnd_eq_minus_oddFst, basis_on_oddFst_other h] - rfl - -lemma basis_on_oddMid (j : Fin n) : basisAsCharges j oddMid = 0 := by - simp only [basisAsCharges, PureU1_numberCharges] - split <;> rename_i h - · rw [Fin.ext_iff] at h - simp only [oddMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, Fin.val_eq_zero, - add_zero, oddFst] at h - omega - · split <;> rename_i h2 - · rw [Fin.ext_iff] at h2 - simp only [oddMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, oddSnd] at h2 - omega - · rfl - -/-! - -### B.3. The basis vectors satisfy the linear ACCs - --/ - -lemma basis_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (basisAsCharges j) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - erw [sum_odd] - simp [basis_oddSnd_eq_minus_oddFst, basis_on_oddMid] - -/-! - -### B.4. The basis vectors as `LinSols` - --/ - -/-- The first part of the basis as `LinSols`. -/ -@[simps!] -def basis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := - ⟨basisAsCharges j, by - intro i - simp only [PureU1_numberLinear] at i - match i with - | 0 => - exact basis_linearACC j⟩ - -/-! - -### B.5. The inclusion of the first plane into charges - --/ - -/-- A point in the span of the first part of the basis as a charge. -/ -def P (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • basisAsCharges i - -/-! - -### B.6. Components of the first plane - --/ - -lemma P_oddFst (f : Fin n → ℚ) (j : Fin n) : P f (oddFst j) = f j := by - rw [P, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis_on_oddFst_self] - exact Rat.mul_one (f j) - · intro k _ hkj - rw [basis_on_oddFst_other hkj] - exact Rat.mul_zero (f k) - · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] - -lemma P_oddSnd (f : Fin n → ℚ) (j : Fin n) : P f (oddSnd j) = - f j := by - rw [P, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis_on_oddSnd_self] - exact mul_neg_one (f j) - · intro k _ hkj - rw [basis_on_oddSnd_other hkj] - exact Rat.mul_zero (f k) - · simp - -lemma P_oddMid (f : Fin n → ℚ) : P f oddMid = 0 := by - rw [P, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, basis_on_oddMid] - -/-! - -### B.7. Points on the first plane satisfies the ACCs - --/ - -lemma P_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (P f) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_odd] - simp [P_oddSnd, P_oddFst, P_oddMid] - -set_option backward.isDefEq.respectTransparency false in -lemma P_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (P f) = 0 := by - rw [accCube_explicit, sum_odd, P_oddMid] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] - apply Finset.sum_eq_zero - intro i _ - simp only [P_oddFst, P_oddSnd] - ring - -/-! - -### B.8. Kernel of the inclusion into charges - --/ - -lemma P_zero (f : Fin n → ℚ) (h : P f = 0) : ∀ i, f i = 0 := by - intro i - erw [← P_oddFst f] - rw [h] - rfl - -/-- A point in the span of the first part of the basis. -/ -def P' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basis i - -lemma P'_val (f : Fin n → ℚ) : (P' f).val = P f := by - simp only [P', P] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### B.9. The basis vectors are linearly independent - --/ - -theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change P' f = 0 at h - 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 - rw [P'_val] at h1 - exact P_zero f h1 - -/-! - -## C. The second plane - --/ - -/-! - -### C.1. The basis vectors of the second plane as charges - --/ - -/-- The second part of the basis as charge assignments. -/ -def basis!AsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := - fun i => - if i = oddShiftFst j then - 1 - else - if i = oddShiftSnd j then - - 1 - else - 0 - -/-! - -### C.2. Components of the basis vectors as charges - --/ - -lemma basis!_on_oddShiftFst_self (j : Fin n) : basis!AsCharges j (oddShiftFst j) = 1 := by - simp [basis!AsCharges] - -lemma basis!_on_oddShiftFst_other {k j : Fin n} (h : k ≠ j) : - basis!AsCharges k (oddShiftFst j) = 0 := by - simp only [basis!AsCharges, PureU1_numberCharges] - simp only [oddShiftFst, oddShiftSnd] - 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 - simp only [Fin.val_castAdd, Fin.val_natAdd] at h2 - omega - rfl - -lemma basis!_on_other {k : Fin n} {j : Fin (2 * n + 1)} - (h1 : j ≠ oddShiftFst k) (h2 : j ≠ oddShiftSnd k) : - basis!AsCharges k j = 0 := by - simp only [basis!AsCharges, PureU1_numberCharges] - simp_all only [ne_eq, ↓reduceIte] - -lemma basis!_oddShiftSnd_eq_minus_oddShiftFst (j i : Fin n) : - basis!AsCharges j (oddShiftSnd i) = - basis!AsCharges j (oddShiftFst i) := by - simp only [basis!AsCharges, PureU1_numberCharges, oddShiftSnd, oddShiftFst] - 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 - all_goals rename_i h3 - all_goals rw [Fin.ext_iff] at h3 - all_goals simp_all - all_goals omega - -lemma basis!_on_oddShiftSnd_self (j : Fin n) : basis!AsCharges j (oddShiftSnd j) = - 1 := by - rw [basis!_oddShiftSnd_eq_minus_oddShiftFst, basis!_on_oddShiftFst_self] - -lemma basis!_on_oddShiftSnd_other {k j : Fin n} (h : k ≠ j) : - basis!AsCharges k (oddShiftSnd j) = 0 := by - rw [basis!_oddShiftSnd_eq_minus_oddShiftFst, basis!_on_oddShiftFst_other h] - rfl - -lemma basis!_on_oddShiftZero (j : Fin n) : basis!AsCharges j oddShiftZero = 0 := by - simp only [basis!AsCharges, PureU1_numberCharges] - split <;> rename_i h - · rw [Fin.ext_iff] at h - simp only [oddShiftZero, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, - oddShiftFst, Fin.val_natAdd] at h - omega - · split <;> rename_i h2 - · rw [Fin.ext_iff] at h2 - simp only [oddShiftZero, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, - oddShiftSnd, Fin.val_natAdd] at h2 - omega - · rfl - -/-! - -### C.3. The basis vectors satisfy the linear ACCs - --/ - -lemma basis!_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (basis!AsCharges j) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_oddShift, basis!_on_oddShiftZero] - simp [basis!_oddShiftSnd_eq_minus_oddShiftFst] - -/-! - -### C.4. The basis vectors as `LinSols` - --/ - -/-- The second part of the basis as `LinSols`. -/ -@[simps!] -def basis! (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := - ⟨basis!AsCharges j, by - intro i - simp only [PureU1_numberLinear] at i - match i with - | 0 => - exact basis!_linearACC j⟩ - -/-! - -### C.5. Permutations equal adding basis vectors - --/ - -/-- Swapping the elements oddShiftFst j and oddShiftSnd j is equivalent to adding a vector - basis!AsCharges j. -/ -lemma swap!_as_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) - (hS : ((FamilyPermutations (2 * n + 1)).linSolRep - (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') : - S'.val = S.val + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j := by - funext i - rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] - by_cases hi : i = oddShiftFst j - · subst hi - simp [HSMul.hSMul, basis!_on_oddShiftFst_self, Equiv.swap_apply_left] - · by_cases hi2 : i = oddShiftSnd j - · subst hi2 - simp [HSMul.hSMul,basis!_on_oddShiftSnd_self, Equiv.swap_apply_right] - · simp only [Equiv.invFun_as_coe, HSMul.hSMul, ACCSystemCharges.chargesAddCommMonoid_add, - ACCSystemCharges.chargesModule_smul] - rw [basis!_on_other hi hi2] - aesop - -/-! - -### C.6. The inclusion of the second plane into charges - --/ - -/-- A point in the span of the second part of the basis as a charge. -/ -def P! (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • basis!AsCharges i - -/-! - -### C.7. Components of the second plane - --/ - -lemma P!_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : P! f (oddShiftFst j) = f j := by - rw [P!, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis!_on_oddShiftFst_self] - exact Rat.mul_one (f j) - · intro k _ hkj - rw [basis!_on_oddShiftFst_other hkj] - exact Rat.mul_zero (f k) - · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] - -lemma P!_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : P! f (oddShiftSnd j) = - f j := by - rw [P!, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis!_on_oddShiftSnd_self] - exact mul_neg_one (f j) - · intro k _ hkj - rw [basis!_on_oddShiftSnd_other hkj] - exact Rat.mul_zero (f k) - · simp - -lemma P!_oddShiftZero (f : Fin n → ℚ) : P! f oddShiftZero = 0 := by - rw [P!, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, basis!_on_oddShiftZero] - -/-! - -### C.8. Points on the second plane satisfies the ACCs - --/ - -lemma P!_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (P! f) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_oddShift] - simp [P!_oddShiftSnd, P!_oddShiftFst, P!_oddShiftZero] - -set_option backward.isDefEq.respectTransparency false in -lemma P!_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (P! f) = 0 := by - rw [accCube_explicit, sum_oddShift, P!_oddShiftZero] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] - apply Finset.sum_eq_zero - intro i _ - simp only [P!_oddShiftFst, P!_oddShiftSnd] - ring - -/-! - -### C.9. Kernel of the inclusion into charges - --/ - -lemma P!_zero (f : Fin n → ℚ) (h : P! f = 0) : ∀ i, f i = 0 := by - intro i - rw [← P!_oddShiftFst f] - rw [h] - rfl - -/-! - -### C.10. The inclusion of the second plane into LinSols - --/ - -/-- A point in the span of the second part of the basis. -/ -def P!' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basis! i - -lemma P!'_val (f : Fin n → ℚ) : (P!' f).val = P! f := by - simp only [P!', P!] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### C.11. The basis vectors are linearly independent - --/ - -theorem basis!_linear_independent : LinearIndependent ℚ (@basis! n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change P!' f = 0 at h - 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 - rw [P!'_val] at h1 - exact P!_zero f h1 - -/-! - ## D. The mixed cubic ACC from points in both planes -/ set_option backward.isDefEq.respectTransparency false in -lemma P_P_P!_accCube (g : Fin n → ℚ) (j : Fin n) : - accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) - = (P g (oddShiftFst j))^2 - (g j)^2 := by +lemma Psymm_Psymm_shiftBasis_accCube (g : Fin n → ℚ) (j : Fin n) : + accCubeTriLinSymm (Psymm g) (Psymm g) (shiftBasisAsCharges j) + = (Psymm g (oddShiftFst j))^2 - (g j)^2 := by simp only [accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_oddShift, basis!_on_oddShiftZero] + rw [sum_oddShift, shiftBasis_on_oddShiftZero] simp only [mul_zero, Function.comp_apply, zero_add] - rw [Finset.sum_eq_single j, basis!_on_oddShiftFst_self, basis!_on_oddShiftSnd_self] - · rw [← oddSnd_eq_oddShiftSnd, P_oddSnd] + rw [Finset.sum_eq_single j, shiftBasis_on_oddShiftFst_self, shiftBasis_on_oddShiftSnd_self] + · rw [← oddSnd_eq_oddShiftSnd, Psymm_oddSnd] ring · intro k _ hkj - erw [basis!_on_oddShiftFst_other hkj.symm, basis!_on_oddShiftSnd_other hkj.symm] + erw [shiftBasis_on_oddShiftFst_other hkj.symm, shiftBasis_on_oddShiftSnd_other hkj.symm] simp only [mul_zero, add_zero] · simp @@ -781,8 +98,8 @@ lemma P_P_P!_accCube (g : Fin n → ℚ) (j : Fin n) : /-- The whole basis as `LinSols`. -/ def basisa : Fin n ⊕ Fin n → (PureU1 (2 * n + 1)).LinSols := fun i => match i with - | .inl i => basis i - | .inr i => basis! i + | .inl i => symmBasis i + | .inr i => shiftBasis i /-! @@ -791,7 +108,7 @@ def basisa : Fin n ⊕ Fin n → (PureU1 (2 * n + 1)).LinSols := fun i => -/ /-- A point in the span of the basis as a charge. -/ -def Pa (f : Fin n → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := P f + P! g +def Pa (f : Fin n → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := Psymm f + Pshift g /-! @@ -804,7 +121,7 @@ lemma Pa_oddShiftShiftZero (f g : Fin n.succ → ℚ) : Pa f g oddShiftShiftZero simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftZero_eq_oddFst_zero] rw [oddShiftShiftZero_eq_oddShiftZero] - rw [P!_oddShiftZero, oddShiftZero_eq_oddFst, P_oddFst] + rw [Pshift_oddShiftZero, oddShiftZero_eq_oddFst, Psymm_oddFst] exact Rat.add_zero (f 0) lemma Pa_oddShiftShiftFst (f g : Fin n.succ → ℚ) (j : Fin n) : @@ -813,14 +130,14 @@ lemma Pa_oddShiftShiftFst (f g : Fin n.succ → ℚ) (j : Fin n) : simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftFst_eq_oddFst_succ] rw [oddShiftShiftFst_eq_oddShiftFst_castSucc] - rw [P!_oddShiftFst, oddShiftFst_castSucc_eq_oddFst_succ, P_oddFst] + rw [Pshift_oddShiftFst, oddShiftFst_castSucc_eq_oddFst_succ, Psymm_oddFst] lemma Pa_oddShiftShiftMid (f g : Fin n.succ → ℚ) : Pa f g oddShiftShiftMid = g (Fin.last n) := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftMid_eq_oddMid] rw [oddShiftShiftMid_eq_oddShiftFst_last] - rw [P!_oddShiftFst, oddShiftFst_last_eq_oddMid, P_oddMid] + rw [Pshift_oddShiftFst, oddShiftFst_last_eq_oddMid, Psymm_oddMid] exact Rat.zero_add (g (Fin.last n)) lemma Pa_oddShiftShiftSnd (f g : Fin n.succ → ℚ) (j : Fin n.succ) : @@ -829,7 +146,7 @@ lemma Pa_oddShiftShiftSnd (f g : Fin n.succ → ℚ) (j : Fin n.succ) : simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftSnd_eq_oddSnd] rw [oddShiftShiftSnd_eq_oddShiftSnd] - rw [P!_oddShiftSnd, oddShiftSnd_eq_oddSnd, P_oddSnd] + rw [Pshift_oddShiftSnd, oddShiftSnd_eq_oddSnd, Psymm_oddSnd] ring /-! @@ -860,12 +177,12 @@ lemma Pa_zero (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : exact h2.symm exact hinduc i.val i.prop -lemma Pa_zero! (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : +lemma Pa_zero_shift (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : ∀ i, g i = 0 := by have hf := Pa_zero f g h - rw [Pa, P] at h + rw [Pa, Psymm] at h simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h - exact P!_zero g h + exact Pshift_zero g h /-! @@ -877,8 +194,8 @@ lemma Pa_zero! (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : def Pa' (f : (Fin n) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basisa i -lemma Pa'_P'_P!' (f : (Fin n) ⊕ (Fin n) → ℚ) : - Pa' f = P' (f ∘ Sum.inl) + P!' (f ∘ Sum.inr) := by +lemma Pa'_Psymm'_Pshift' (f : (Fin n) ⊕ (Fin n) → ℚ) : + Pa' f = Psymm' (f ∘ Sum.inl) + Pshift' (f ∘ Sum.inr) := by exact Fintype.sum_sum_type _ /-! @@ -895,12 +212,12 @@ theorem basisa_linear_independent : LinearIndependent ℚ (@basisa n.succ) := by (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 - 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 + rw [Pa'_Psymm'_Pshift'] at h1 + change (Psymm' (f ∘ Sum.inl)).val + (Pshift' (f ∘ Sum.inr)).val = 0 at h1 + rw [Pshift'_val, Psymm'_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 + have hg := Pa_zero_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 intro i simp_all only [succ_eq_add_one, Function.comp_apply] cases i @@ -936,8 +253,9 @@ lemma Pa'_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : · rw [Pa'_eq, Sum.elim_eq_iff] 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] + rw [Pa'_Psymm'_Pshift', Pa'_Psymm'_Pshift'] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, Psymm'_val, + Pshift'_val] exact h lemma Pa_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : @@ -971,21 +289,22 @@ noncomputable def basisaAsBasis : /-! -## F. Every Lienar solution is the sum of a point from each plane +## F. Every linear solution is the sum of a point from each plane -/ lemma span_basis (S : (PureU1 (2 * n.succ + 1)).LinSols) : - ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f := by + ∃ (g f : Fin n.succ → ℚ), S.val = Psymm g + Pshift f := by have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisaAsBasis S) obtain ⟨f, hf⟩ := h simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, Fintype.sum_sum_type] at hf - change P' _ + P!' _ = S at hf + change Psymm' _ + Pshift' _ = S at hf use f ∘ Sum.inl use f ∘ Sum.inr rw [← hf] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, Psymm'_val, + Pshift'_val] rfl /-! @@ -994,24 +313,24 @@ lemma span_basis (S : (PureU1 (2 * n.succ + 1)).LinSols) : -/ -lemma span_basis_swap! {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) +lemma span_basis_swapShift {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) (hS : ((FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') (g f : Fin n.succ → ℚ) - (hS1 : S.val = P g + P! f) : ∃ (g' f' : Fin n.succ → ℚ), - S'.val = P g' + P! f' ∧ P! f' = P! f + - (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j ∧ g' = g := by - let X := P! f + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j - have hf : P! f ∈ Submodule.span ℚ (Set.range basis!AsCharges) := by + (hS1 : S.val = Psymm g + Pshift f) : ∃ (g' f' : Fin n.succ → ℚ), + S'.val = Psymm g' + Pshift f' ∧ Pshift f' = Pshift f + + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by + let X := Pshift f + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j + have hf : Pshift f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] use f rfl - have hP : (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j ∈ - Submodule.span ℚ (Set.range basis!AsCharges) := by + have hP : (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∈ + Submodule.span ℚ (Set.range shiftBasisAsCharges) := by apply Submodule.smul_mem apply SetLike.mem_of_subset apply Submodule.subset_span simp_all only [Set.mem_range, exists_apply_eq_apply] - have hX : X ∈ Submodule.span ℚ (Set.range (basis!AsCharges)) := by + have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by apply Submodule.add_mem exact hf exact hP @@ -1019,11 +338,11 @@ lemma span_basis_swap! {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) obtain ⟨f', hf'⟩ := hXsum use g use f' - change P! f' = _ at hf' + change Pshift f' = _ at hf' erw [hf'] simp only [and_self, and_true, X] rw [← add_assoc, ← hS1] - apply swap!_as_add at hS + apply swapShift_as_add at hS exact hS end VectorLikeOddPlane From 8b52b554fa881123b4a81e3d2af3b808d744f5f2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 14:21:00 +0000 Subject: [PATCH 09/22] Rewrite Even/BasisLinear.lean: extract sections A-C to submodules, rename identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed imports to public import SymmPlane and ShiftPlane submodules - Removed sections A (ChargeSplits), B (SymmPlane), C (ShiftPlane) - Kept sections D, E, F with updated references - Fixed typo Pa_evenShitZero → Pa_evenShiftZero - Renamed Pa_zero! → Pa_zero_shift - Partially updated Even/LineInCubic.lean references Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../AnomalyCancellation/Even/BasisLinear.lean | 826 ++---------------- .../AnomalyCancellation/Even/LineInCubic.lean | 24 +- 2 files changed, 70 insertions(+), 780 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean index d36052459..64147e5da 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean @@ -5,8 +5,8 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear -public import Physlib.QFT.QED.AnomalyCancellation.VectorLike +public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.SymmPlane +public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ShiftPlane /-! # Splitting the linear solutions in the even case into two ACC-satisfying planes @@ -17,47 +17,22 @@ We split the linear solutions of `PureU1 (2 * n.succ)` into two planes, where every point in either plane satisfies both the linear and cubic anomaly cancellation conditions. +The two planes are named after the charge-index splitting they are built from: +- The **symmetric plane** (`SymmPlane`): basis vectors pair charges at positions from the + symmetric (even) split `n.succ + n.succ`. +- The **shifted plane** (`ShiftPlane`): basis vectors pair charges at positions from the + shifted even split `1 + (n + n + 1)`. + ## ii. Key results -- `P'` : The inclusion of the first plane into linear solutions -- `P_accCube` : The statement that chares from the first plane satisfy the cubic ACC -- `P!'` : The inclusion of the second plane. -- `P!_accCube` : The statement that charges from the second plane satisfy the cubic ACC +- `Psymm'` : The inclusion of the symmetric plane into linear solutions. +- `Psymm_accCube` : The statement that charges from the symmetric plane satisfy the cubic ACC. +- `Pshift'` : The inclusion of the shifted plane into linear solutions. +- `Pshift_accCube` : The statement that charges from the shifted plane satisfy the cubic ACC. - `span_basis` : Every linear solution is the sum of a point from each plane. ## iii. Table of contents -- A. Splitting the charges up into groups - - A.1. The even split: Spltting the charges up via `n.succ + n.succ` - - A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` - - A.3. Lemmas relating the two splittings -- B. The first plane - - B.1. The basis vectors of the first plane as charges - - B.2. Components of the basis vectors - - B.3. The basis vectors satisfy the linear ACCs - - B.4. The basis vectors satisfy the cubic ACC - - B.5. The basis vectors as linear solutions - - B.6. The inclusion of the first plane into charges - - B.7. Components of the inclusion into charges - - B.8. The inclusion into charges satisfies the linear and cubic ACCs - - B.9. Kernel of the inclusion into charges - - B.10. The inclusion of the plane into linear solutions - - B.11. The basis vectors are linearly independent - - B.12. Every vector-like even solution is in the span of the basis of the first plane -- C. The vectors of the basis spanning the second plane, via the shifted even split - - C.2. Components of the vectors - - C.3. The vectors satisfy the linear ACCs - - C.4. The vectors satisfy the cubic ACC - - C.6. The vectors as linear solutions - - C.7. The inclusion of the second plane into charges - - C.8. Components of the inclusion into charges - - C.9. The inclusion into charges satisfies the cubic ACC - - C.10. Kernel of the inclusion into charges - - C.11. The inclusion of the second plane into the span of the basis - - C.12. The inclusion of the plane into linear solutions - - C.13. The basis vectors are linearly independent - - C.14. Properties of the basis vectors relating to the span - - C.15. Permutations as additions of basis vectors - D. Mixed cubic ACCs involving points from both planes - E. The combined basis - E.1. As a map into linear solutions @@ -69,7 +44,7 @@ conditions. - E.7. Injectivity of the inclusion into linear solutions - E.8. Cardinality of the basis - E.9. The basis vectors as a basis -- F. Every Lienar solution is the sum of a point from each plane +- F. Every linear solution is the sum of a point from each plane - F.1. Relation under permutations ## iv. References @@ -90,725 +65,40 @@ namespace VectorLikeEvenPlane /-! -## A. Splitting the charges up into groups - -We have `2 * n.succ` charges, which we split up in the following ways: - -`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` - -``` -| evenShiftZero (0) | evenShiftFst j (1 to n) | - evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | -``` - --/ - -/-! - -### A.1. The even split: Spltting the charges up via `n.succ + n.succ` - --/ - -/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the first `n.succ`, - casted into `Fin (2 * n.succ)`. -/ -def evenFst (j : Fin n.succ) : Fin (2 * n.succ) := - Fin.cast (split_equal n.succ) (Fin.castAdd n.succ j) - -/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the second `n.succ`, - casted into `Fin (2 * n.succ)`. -/ -def evenSnd (j : Fin n.succ) : Fin (2 * n.succ) := - Fin.cast (split_equal n.succ) (Fin.natAdd n.succ j) - -lemma ext_even (S T : Fin (2 * n.succ) → ℚ) (h1 : ∀ i, S (evenFst i) = T (evenFst i)) - (h2 : ∀ i, S (evenSnd i) = T (evenSnd i)) : S = T := by - funext i - by_cases hi : i.val < n.succ - · let j : Fin n.succ := ⟨i, hi⟩ - have h2 := h1 j - have h3 : evenFst 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 : evenSnd j = i := by - simp only [succ_eq_add_one, evenSnd, Fin.ext_iff, Fin.val_cast, Fin.val_natAdd, j] - omega - rw [h3] at h2 - exact h2 - -lemma sum_even (S : Fin (2 * n.succ) → ℚ) : - ∑ i, S i = ∑ i : Fin n.succ, ((S ∘ evenFst) i + (S ∘ evenSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (n.succ + n.succ), S (Fin.cast (split_equal n.succ) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (split_equal n.succ)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _=> rfl - rw [h1, Fin.sum_univ_add, Finset.sum_add_distrib] - rfl - -/-! - -### A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` - --/ - -lemma n_cond₂ (n : ℕ) : 1 + ((n + n) + 1) = 2 * n.succ := by - linarith - -/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the first `n`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftFst (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) - (Fin.natAdd 1 (Fin.castAdd 1 (Fin.castAdd n j))) - -/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the second `n`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftSnd (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) - (Fin.natAdd 1 (Fin.castAdd 1 (Fin.natAdd n j))) - -/-- The element of `Fin (1 + (n + n + 1))` corresponding to the first `1`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftZero : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.castAdd ((n + n) + 1) 0)) - -/-- The element of `Fin (1 + (n + n + 1))` corresponding to the second `1`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftLast : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.natAdd 1 (Fin.natAdd (n + n) 0))) - -lemma sum_evenShift (S : Fin (2 * n.succ) → ℚ) : - ∑ i, S i = S evenShiftZero + S evenShiftLast + - ∑ i : Fin n, ((S ∘ evenShiftFst) i + (S ∘ evenShiftSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (1 + ((n + n) + 1)), S (Fin.cast (n_cond₂ n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (n_cond₂ n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1] - rw [Fin.sum_univ_add, Fin.sum_univ_add, Fin.sum_univ_add, Finset.sum_add_distrib] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - 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 - -/-! - -### A.3. Lemmas relating the two splittings - --/ -lemma evenShiftZero_eq_evenFst_zero : @evenShiftZero n = evenFst 0 := rfl - -lemma evenShiftLast_eq_evenSnd_last: @evenShiftLast n = evenSnd (Fin.last n) := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, evenSnd, Fin.natAdd_last, Fin.val_last] - omega - -lemma evenShiftFst_eq_evenFst_succ (j : Fin n) : evenShiftFst j = evenFst j.succ := by - rw [Fin.ext_iff, evenFst, evenShiftFst] - simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_succ] - ring - -lemma evenShiftSnd_eq_evenSnd_castSucc (j : Fin n) : evenShiftSnd j = evenSnd j.castSucc := by - rw [Fin.ext_iff, evenSnd, evenShiftSnd] - simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_castSucc] - ring_nf - rw [Nat.succ_eq_add_one] - ring - -/-! - -## B. The first plane - --/ - -/-! - -### B.1. The basis vectors of the first plane as charges - --/ - -/-- The first part of the basis as charges. -/ -def basisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).Charges := - fun i => - if i = evenFst j then - 1 - else - if i = evenSnd j then - - 1 - else - 0 - -/-! - -### B.2. Components of the basis vectors - --/ - -lemma basis_on_evenFst_self (j : Fin n.succ) : basisAsCharges j (evenFst j) = 1 := by - simp [basisAsCharges] - -lemma basis_on_evenFst_other {k j : Fin n.succ} (h : k ≠ j) : - basisAsCharges k (evenFst j) = 0 := by - simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenFst, evenSnd] - 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 only [succ_eq_add_one, ne_eq, Fin.natAdd_eq_addNat, Fin.cast_inj, neg_eq_zero, - one_ne_zero] - rw [Fin.ext_iff] at h2 - simp only [Fin.val_castAdd, Fin.val_addNat] at h2 - omega - · rfl - -lemma basis_on_other {k : Fin n.succ} {j : Fin (2 * n.succ)} (h1 : j ≠ evenFst k) - (h2 : j ≠ evenSnd k) : basisAsCharges k j = 0 := by - simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges] - simp_all only [ne_eq, ↓reduceIte] - -lemma basis_evenSnd_eq_neg_evenFst (j i : Fin n.succ) : - basisAsCharges j (evenSnd i) = - basisAsCharges j (evenFst i) := by - simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenSnd, evenFst] - split <;> split - any_goals split - any_goals rfl - 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 - all_goals omega - -lemma basis_on_evenSnd_self (j : Fin n.succ) : basisAsCharges j (evenSnd j) = - 1 := by - rw [basis_evenSnd_eq_neg_evenFst, basis_on_evenFst_self] - -lemma basis_on_evenSnd_other {k j : Fin n.succ} (h : k ≠ j) : basisAsCharges k (evenSnd j) = 0 := by - rw [basis_evenSnd_eq_neg_evenFst, basis_on_evenFst_other h] - rfl - -/-! - -### B.3. The basis vectors satisfy the linear ACCs - --/ - -lemma basis_linearACC (j : Fin n.succ) : (accGrav (2 * n.succ)) (basisAsCharges j) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_even] - simp [basis_evenSnd_eq_neg_evenFst] -/-! - -### B.4. The basis vectors satisfy the cubic ACC - --/ -lemma basis_accCube (j : Fin n.succ) : - accCube (2 * n.succ) (basisAsCharges j) = 0 := by - rw [accCube_explicit, sum_even] - apply Finset.sum_eq_zero - intro i _ - simp only [succ_eq_add_one, Function.comp_apply, basis_evenSnd_eq_neg_evenFst] - ring - -/-! - -### B.5. The basis vectors as linear solutions - --/ - -/-- 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 - simp only [succ_eq_add_one, PureU1_numberLinear] at i - match i with - | 0 => - exact basis_linearACC j⟩ - -/-! - -### B.6. The inclusion of the first plane into charges - --/ - -/-- 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 - -/-! - -### B.7. Components of the inclusion into charges - --/ - -lemma P_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : P f (evenFst j) = f j := by - rw [P, sum_of_charges] - simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis_on_evenFst_self] - exact Rat.mul_one (f j) - · intro k _ hkj - rw [basis_on_evenFst_other hkj] - exact Rat.mul_zero (f k) - · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] - -lemma P_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : P f (evenSnd j) = - f j := by - rw [P, sum_of_charges] - simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · simp only [basis_on_evenSnd_self, mul_neg, mul_one] - · intro k _ hkj - simp only [basis_on_evenSnd_other hkj, mul_zero] - · simp - -lemma P_evenSnd_evenFst (f : Fin n.succ → ℚ) : P f ∘ evenSnd = - P f ∘ evenFst := by - funext j - simp only [PureU1_numberCharges, Function.comp_apply, Pi.neg_apply] - rw [P_evenFst, P_evenSnd] - -/-! - -### B.8. The inclusion into charges satisfies the linear and cubic ACCs - --/ - -lemma P_linearACC (f : Fin n.succ → ℚ) : (accGrav (2 * n.succ)) (P f) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_even] - simp [P_evenSnd, P_evenFst] - -lemma P_accCube (f : Fin n.succ → ℚ) : accCube (2 * n.succ) (P f) = 0 := by - rw [accCube_explicit, sum_even] - apply Finset.sum_eq_zero - intro i _ - simp only [succ_eq_add_one, Function.comp_apply, P_evenFst, P_evenSnd] - ring - -/-! - -### B.9. Kernel of the inclusion into charges - --/ - -lemma P_zero (f : Fin n.succ → ℚ) (h : P f = 0) : ∀ i, f i = 0 := by - intro i - erw [← P_evenFst f] - rw [h] - rfl - -/-! - -### B.10. The inclusion of the plane into linear solutions - --/ - -/-- 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 - -lemma P'_val (f : Fin n.succ → ℚ) : (P' f).val = P f := by - simp only [succ_eq_add_one, P', P] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### B.11. The basis vectors are linearly independent - --/ - -theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change P' f = 0 at h - 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 - rw [P'_val] at h1 - exact P_zero f h1 - -/-! - -### B.12. Every vector-like even solution is in the span of the basis of the first plane - --/ - -lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols) - (hS : VectorLikeEven S.val) : ∃ (M : (FamilyPermutations (2 * n.succ)).group), - (FamilyPermutations (2 * n.succ)).linSolRep M S ∈ Submodule.span ℚ (Set.range basis) := by - use (Tuple.sort S.val).symm - change sortAFL S ∈ Submodule.span ℚ (Set.range basis) - rw [Submodule.mem_span_range_iff_exists_fun ℚ] - let f : Fin n.succ → ℚ := fun i => (sortAFL S).val (evenFst i) - use f - apply ACCSystemLinear.LinSols.ext - rw [sortAFL_val] - erw [P'_val] - apply ext_even - · intro i - rw [P_evenFst] - rfl - · intro i - rw [P_evenSnd] - have ht := hS i - change sort S.val (evenFst i) = - sort S.val (evenSnd i) at ht - have h : sort S.val (evenSnd i) = - sort S.val (evenFst i) := by - rw [ht] - ring - rw [h] - rfl - -/-! - -## C. The vectors of the basis spanning the second plane, via the shifted even split - --/ - -/-- The second part of the basis as charges. -/ -def basis!AsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges := - fun i => - if i = evenShiftFst j then - 1 - else - if i = evenShiftSnd j then - - 1 - else - 0 -/-! - -### C.2. Components of the vectors - --/ - -lemma basis!_on_evenShiftFst_self (j : Fin n) : basis!AsCharges j (evenShiftFst j) = 1 := by - simp [basis!AsCharges] - -lemma basis!_on_other {k : Fin n} {j : Fin (2 * n.succ)} (h1 : j ≠ evenShiftFst k) - (h2 : j ≠ evenShiftSnd k) : basis!AsCharges k j = 0 := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] - simp_all only [ne_eq, ↓reduceIte] - -lemma basis!_on_evenShiftFst_other {k j : Fin n} (h : k ≠ j) : - basis!AsCharges k (evenShiftFst j) = 0 := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] - simp only [evenShiftFst, succ_eq_add_one, evenShiftSnd] - 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 - simp only [Fin.val_castAdd, Fin.val_addNat] at h2 - omega - · rfl - -lemma basis!_evenShftSnd_eq_neg_evenShiftFst (j i : Fin n) : - basis!AsCharges j (evenShiftSnd i) = - basis!AsCharges j (evenShiftFst i) := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges, evenShiftSnd, evenShiftFst] - split <;> split - any_goals split - any_goals split - any_goals rfl - all_goals - rename_i h1 h2 - rw [Fin.ext_iff] at h1 h2 - simp_all only [Fin.natAdd_eq_addNat, Fin.cast_inj, Fin.val_cast, Fin.val_natAdd, - Fin.val_castAdd, add_right_inj, Fin.val_addNat, add_eq_left] - · subst h1 - exact Fin.elim0 i - all_goals - rename_i h3 - rw [Fin.ext_iff] at h3 - simp_all only [Fin.val_natAdd, Fin.val_castAdd, Fin.val_addNat, not_true_eq_false] - all_goals - omega - -lemma basis!_on_evenShiftSnd_self (j : Fin n) : basis!AsCharges j (evenShiftSnd j) = - 1 := by - rw [basis!_evenShftSnd_eq_neg_evenShiftFst, basis!_on_evenShiftFst_self] - -lemma basis!_on_evenShiftSnd_other {k j : Fin n} (h : k ≠ j) : - basis!AsCharges k (evenShiftSnd j) = 0 := by - rw [basis!_evenShftSnd_eq_neg_evenShiftFst, basis!_on_evenShiftFst_other h] - rfl - -lemma basis!_on_evenShiftZero (j : Fin n) : basis!AsCharges j evenShiftZero = 0 := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] - split<;> rename_i h - · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftFst, Fin.ext_iff, - Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, Fin.val_natAdd] at h - omega - · split <;> rename_i h2 - · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftSnd, Fin.ext_iff, - Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, Fin.val_natAdd] at h2 - omega - · rfl - -lemma basis!_on_evenShiftLast (j : Fin n) : basis!AsCharges j evenShiftLast = 0 := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] - split <;> rename_i h - · rw [Fin.ext_iff] at h - simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, evenShiftFst, Fin.val_castAdd, add_right_inj] at h - omega - · split <;> rename_i h2 - · rw [Fin.ext_iff] at h2 - simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, evenShiftSnd, Fin.val_castAdd, add_right_inj] at h2 - omega - · rfl - -/-! - -### C.3. The vectors satisfy the linear ACCs - --/ - -lemma basis!_linearACC (j : Fin n) : (accGrav (2 * n.succ)) (basis!AsCharges j) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_evenShift, basis!_on_evenShiftZero, basis!_on_evenShiftLast] - simp [basis!_evenShftSnd_eq_neg_evenShiftFst] - -/-! - -### C.4. The vectors satisfy the cubic ACC - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma basis!_accCube (j : Fin n) : - accCube (2 * n.succ) (basis!AsCharges j) = 0 := by - rw [accCube_explicit, sum_evenShift] - rw [basis!_on_evenShiftLast, basis!_on_evenShiftZero] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, - zero_add] - apply Finset.sum_eq_zero - intro i _ - simp only [basis!_evenShftSnd_eq_neg_evenShiftFst] - ring - -/-! - -### C.6. The vectors as linear solutions - --/ -/-- 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 - simp only [succ_eq_add_one, PureU1_numberLinear] at i - match i with - | 0 => - exact basis!_linearACC j⟩ - -/-! - -### C.7. The inclusion of the second plane into charges - --/ - -/-- 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 - -/-! - -### C.8. Components of the inclusion into charges - --/ - -lemma P!_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : P! f (evenShiftFst j) = f j := by - rw [P!, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis!_on_evenShiftFst_self] - exact Rat.mul_one (f j) - · intro k _ hkj - rw [basis!_on_evenShiftFst_other hkj] - exact Rat.mul_zero (f k) - · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] - -lemma P!_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : P! f (evenShiftSnd j) = - f j := by - rw [P!, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis!_on_evenShiftSnd_self] - exact mul_neg_one (f j) - · intro k _ hkj - rw [basis!_on_evenShiftSnd_other hkj] - exact Rat.mul_zero (f k) - · simp - -lemma P!_evenShiftZero (f : Fin n → ℚ) : P! f (evenShiftZero) = 0 := by - rw [P!, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, basis!_on_evenShiftZero] - -lemma P!_evenShiftLast (f : Fin n → ℚ) : P! f evenShiftLast = 0 := by - rw [P!, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, basis!_on_evenShiftLast] - -/-! - -### C.9. The inclusion into charges satisfies the cubic ACC - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma P!_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (P! f) = 0 := by - rw [accCube_explicit, sum_evenShift, P!_evenShiftZero, P!_evenShiftLast] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, - zero_add] - apply Finset.sum_eq_zero - intro i _ - simp only [P!_evenShiftFst, P!_evenShiftSnd] - ring - -/-! - -### C.10. Kernel of the inclusion into charges - --/ - -lemma P!_zero (f : Fin n → ℚ) (h : P! f = 0) : ∀ i, f i = 0 := by - intro i - rw [← P!_evenShiftFst f] - rw [h] - rfl - -/-! - -### C.11. The inclusion of the second plane into the span of the basis - --/ - -lemma P!_in_span (f : Fin n → ℚ) : P! f ∈ Submodule.span ℚ (Set.range basis!AsCharges) := by - rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] - use f - rfl - -/-! - -### C.12. The inclusion of the plane into linear solutions - --/ - -/-- 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 - -lemma P!'_val (f : Fin n → ℚ) : (P!' f).val = P! f := by - simp only [succ_eq_add_one, P!', P!] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### C.13. The basis vectors are linearly independent - --/ - -theorem basis!_linear_independent : LinearIndependent ℚ (@basis! n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change P!' f = 0 at h - 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 - rw [P!'_val] at h1 - exact P!_zero f h1 - -/-! - -### C.14. Properties of the basis vectors relating to the span - --/ - -lemma smul_basis!AsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : Fin n) : - (S.val (evenShiftSnd j) - S.val (evenShiftFst 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] - -/-! - -### C.15. Permutations as additions of basis vectors - --/ - -/-- Swapping the elements evenShiftFst j and evenShiftSnd 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 - (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') : - S'.val = S.val + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j := by - funext i - rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] - by_cases hi : i = evenShiftFst j - · subst hi - simp [HSMul.hSMul, basis!_on_evenShiftFst_self, Equiv.swap_apply_left] - · by_cases hi2 : i = evenShiftSnd j - · simp [HSMul.hSMul, hi2, basis!_on_evenShiftSnd_self, Equiv.swap_apply_right] - · simp only [succ_eq_add_one, Equiv.invFun_as_coe, HSMul.hSMul, - ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul] - rw [basis!_on_other hi hi2] - aesop -/-! - ## D. Mixed cubic ACCs involving points from both planes -/ set_option backward.isDefEq.respectTransparency false in -lemma P_P_P!_accCube (g : Fin n.succ → ℚ) (j : Fin n) : - accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) +lemma Psymm_Psymm_shiftBasis_accCube (g : Fin n.succ → ℚ) (j : Fin n) : + accCubeTriLinSymm (Psymm g) (Psymm g) (shiftBasisAsCharges j) = g (j.succ) ^ 2 - g (j.castSucc) ^ 2 := by simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_evenShift, basis!_on_evenShiftZero, basis!_on_evenShiftLast] + rw [sum_evenShift, shiftBasis_on_evenShiftZero, shiftBasis_on_evenShiftLast] simp only [mul_zero, add_zero, Function.comp_apply, zero_add] - rw [Finset.sum_eq_single j, basis!_on_evenShiftFst_self, basis!_on_evenShiftSnd_self] + rw [Finset.sum_eq_single j, shiftBasis_on_evenShiftFst_self, shiftBasis_on_evenShiftSnd_self] · simp only [evenShiftFst_eq_evenFst_succ, mul_one, evenShiftSnd_eq_evenSnd_castSucc, mul_neg] - rw [P_evenFst, P_evenSnd] + rw [Psymm_evenFst, Psymm_evenSnd] ring · intro k _ hkj - erw [basis!_on_evenShiftFst_other hkj.symm, basis!_on_evenShiftSnd_other hkj.symm] + erw [shiftBasis_on_evenShiftFst_other hkj.symm, shiftBasis_on_evenShiftSnd_other hkj.symm] simp only [mul_zero, add_zero] · simp set_option backward.isDefEq.respectTransparency false in -lemma P_P!_P!_accCube (g : Fin n → ℚ) (j : Fin n.succ) : - accCubeTriLinSymm (P! g) (P! g) (basisAsCharges j) - = (P! g (evenFst j))^2 - (P! g (evenSnd j))^2 := by +lemma Psymm_Pshift_Pshift_accCube (g : Fin n → ℚ) (j : Fin n.succ) : + accCubeTriLinSymm (Pshift g) (Pshift g) (symmBasisAsCharges j) + = (Pshift g (evenFst j))^2 - (Pshift g (evenSnd j))^2 := by simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] rw [sum_even] simp only [Function.comp_apply] - rw [Finset.sum_eq_single j, basis_on_evenFst_self, basis_on_evenSnd_self] + rw [Finset.sum_eq_single j, symmBasis_on_evenFst_self, symmBasis_on_evenSnd_self] · simp only [mul_one, mul_neg] ring · intro k _ hkj - erw [basis_on_evenFst_other hkj.symm, basis_on_evenSnd_other hkj.symm] + erw [symmBasis_on_evenFst_other hkj.symm, symmBasis_on_evenSnd_other hkj.symm] simp only [mul_zero, add_zero] · simp @@ -826,8 +116,8 @@ lemma P_P!_P!_accCube (g : Fin n → ℚ) (j : Fin n.succ) : /-- 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 + | .inl i => symmBasis i + | .inr i => shiftBasis i /-! @@ -836,7 +126,7 @@ def basisa : (Fin n.succ) ⊕ (Fin n) → (PureU1 (2 * n.succ)).LinSols := fun 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 := Psymm f + Pshift g /-! @@ -848,26 +138,26 @@ lemma Pa_evenShiftFst (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : Pa f g (evenShiftFst j) = f j.succ + g j := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [P!_evenShiftFst, evenShiftFst_eq_evenFst_succ, P_evenFst] + rw [Pshift_evenShiftFst, evenShiftFst_eq_evenFst_succ, Psymm_evenFst] lemma Pa_evenShiftSnd (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : Pa f g (evenShiftSnd j) = - f j.castSucc - g j := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [P!_evenShiftSnd, evenShiftSnd_eq_evenSnd_castSucc, P_evenSnd] + rw [Pshift_evenShiftSnd, evenShiftSnd_eq_evenSnd_castSucc, Psymm_evenSnd] ring -lemma Pa_evenShitZero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : Pa f g (evenShiftZero) = f 0 := by +lemma Pa_evenShiftZero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : Pa f g (evenShiftZero) = f 0 := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [P!_evenShiftZero, evenShiftZero_eq_evenFst_zero, P_evenFst] + rw [Pshift_evenShiftZero, evenShiftZero_eq_evenFst_zero, Psymm_evenFst] exact Rat.add_zero (f 0) lemma Pa_evenShiftLast (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : Pa f g (evenShiftLast) = - f (Fin.last n) := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [P!_evenShiftLast, evenShiftLast_eq_evenSnd_last, P_evenSnd] + rw [Pshift_evenShiftLast, evenShiftLast_eq_evenSnd_last, Psymm_evenSnd] exact Rat.add_zero (-f (Fin.last n)) /-! @@ -879,7 +169,7 @@ lemma Pa_evenShiftLast (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : set_option backward.isDefEq.respectTransparency false in lemma Pa_zero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : ∀ i, f i = 0 := by - have h₃ := Pa_evenShitZero f g + have h₃ := Pa_evenShiftZero f g rw [h] at h₃ change 0 = f 0 at h₃ intro i @@ -900,12 +190,12 @@ lemma Pa_zero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : exact right_eq_add.mp h1 exact hinduc i.val i.prop -lemma Pa_zero! (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : +lemma Pa_zero_shift (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 + rw [Pa, Psymm] at h simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h - exact P!_zero g h + exact Pshift_zero g h /-! @@ -916,8 +206,8 @@ lemma Pa_zero! (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : 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) → ℚ) : - Pa' f = P' (f ∘ Sum.inl) + P!' (f ∘ Sum.inr) := by +lemma Pa'_Psymm'_Pshift' (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : + Pa' f = Psymm' (f ∘ Sum.inl) + Pshift' (f ∘ Sum.inr) := by exact Fintype.sum_sum_type _ /-! @@ -934,12 +224,12 @@ theorem basisa_linear_independent : LinearIndependent ℚ (@basisa n) := by (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 - 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 + rw [Pa'_Psymm'_Pshift'] at h1 + change (Psymm' (f ∘ Sum.inl)).val + (Pshift' (f ∘ Sum.inr)).val = 0 at h1 + rw [Pshift'_val, Psymm'_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 + have hg := Pa_zero_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 intro i simp_all cases i @@ -973,8 +263,8 @@ lemma Pa'_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : · rw [Pa'_eq, Sum.elim_eq_iff] 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] + rw [Pa'_Psymm'_Pshift', Pa'_Psymm'_Pshift'] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, Psymm'_val, Pshift'_val] exact h lemma Pa_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : @@ -1007,21 +297,21 @@ noncomputable def basisaAsBasis : /-! -## F. Every Lienar solution is the sum of a point from each plane +## F. Every linear solution is the sum of a point from each plane -/ lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) : - ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = P g + P! f := by + ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = Psymm g + Pshift f := by have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisaAsBasis S) obtain ⟨f, hf⟩ := h simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, Fintype.sum_sum_type] at hf - change P' _ + P!' _ = S at hf + change Psymm' _ + Pshift' _ = S at hf use f ∘ Sum.inl use f ∘ Sum.inr rw [← hf] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, Psymm'_val, Pshift'_val] rfl /-! @@ -1029,26 +319,26 @@ lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) : ### F.1. Relation under permutations -/ -lemma span_basis_swap! {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) +lemma span_basis_swapShift {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) (hS : ((FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') (g : Fin n.succ → ℚ) (f : Fin n → ℚ) - (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 (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j ∧ g' = g := by - let X := P! f + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j - have hX : X ∈ Submodule.span ℚ (Set.range (basis!AsCharges)) := by + (h : S.val = Psymm g + Pshift f) : ∃ (g' : Fin n.succ → ℚ) (f' : Fin n → ℚ), + S'.val = Psymm g' + Pshift f' ∧ Pshift f' = Pshift f + + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by + let X := Pshift f + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j + have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by apply Submodule.add_mem - exact (P!_in_span f) - exact (smul_basis!AsCharges_in_span S j) + exact (Pshift_in_span f) + exact (smul_shiftBasisAsCharges_in_span S j) have hXsum := (Submodule.mem_span_range_iff_exists_fun ℚ).mp hX obtain ⟨f', hf'⟩ := hXsum use g use f' - change P! f' = _ at hf' + change Pshift f' = _ at hf' erw [hf'] simp only [and_self, and_true, X] rw [← add_assoc, ← h] - apply swap!_as_add at hS + apply swapShift_as_add at hS exact hS end VectorLikeEvenPlane diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean index 337937d6f..b7b85c114 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean @@ -37,27 +37,27 @@ open VectorLikeEvenPlane in the basis through that point is in the cubic. -/ 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 + accCube (2 * n.succ) (a • Psymm g + b • Pshift f) = 0 set_option backward.isDefEq.respectTransparency false in 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 + 3 * a * b * (a * accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) + + b * accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g)) = 0 := by intro g f hS a b have h1 := h g f hS a b - change accCubeTriLinSymm.toCubic (a • P g + b • P! f) = 0 at h1 + change accCubeTriLinSymm.toCubic (a • Psymm g + b • Pshift f) = 0 at h1 simp only [TriLinearSymm.toCubic_add] at h1 simp only [HomogeneousCubic.map_smul, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] at h1 conv_lhs at h1 => enter [1, 1, 1, 2] change accCube _ _ - rw [P_accCube] + rw [Psymm_accCube] conv_lhs at h1 => enter [1, 1, 2, 2] change accCube _ _ - rw [P!_accCube] + rw [Pshift_accCube] rw [← h1] ring @@ -100,13 +100,13 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ)).LinSols} (LIC : LineInCubicPerm S) : ∀ (j : Fin n) (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = Pa g f), (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) - * accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) = 0 := by + * accCubeTriLinSymm (Psymm g) (Psymm g) (shiftBasisAsCharges j) = 0 := by intro j g f h let S' := (FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j)) S have hSS' : ((FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S' := rfl - obtain ⟨g', f', hall⟩ := span_basis_swap! j hSS' g f h + obtain ⟨g', f', hall⟩ := span_basis_swapShift j hSS' g f h have h1 := line_in_cubic_P_P_P! (lineInCubicPerm_self LIC) g f h have h2 := line_in_cubic_P_P_P! (lineInCubicPerm_self (lineInCubicPerm_permute LIC @@ -115,13 +115,13 @@ 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 Psymm_Psymm_shiftBasis_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)) = + accCubeTriLinSymm (Psymm f) (Psymm f) (shiftBasisAsCharges (Fin.last n)) = - (S.val (evenShiftSnd (Fin.last n)) + S.val (evenShiftFst (Fin.last n))) * (2 * S.val evenShiftLast + S.val (evenShiftSnd (Fin.last n)) + S.val (evenShiftFst (Fin.last n))) := by - rw [P_P_P!_accCube f (Fin.last n)] + rw [Psymm_Psymm_shiftBasis_accCube f (Fin.last n)] have h1 := Pa_evenShiftLast f g have h2 := Pa_evenShiftFst f g (Fin.last n) have h3 := Pa_evenShiftSnd f g (Fin.last n) @@ -146,7 +146,7 @@ lemma lineInCubicPerm_last_cond {S : (PureU1 (2 * n.succ.succ)).LinSols} (S.val evenShiftLast))) := by obtain ⟨g, f, hfg⟩ := span_basis S have h1 := lineInCubicPerm_swap LIC (Fin.last n) g f hfg - rw [P_P_P!_accCube' g f hfg] at h1 + rw [Psymm_Psymm_shiftBasis_accCube' g f hfg] at h1 simp only [Nat.succ_eq_add_one, neg_add_rev, mul_eq_zero] at h1 cases h1 <;> rename_i h1 · left From 2d4ecf87fbdfd8258f90fb22f0219340b91b2c4b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 14:25:06 +0000 Subject: [PATCH 10/22] Rename plane definitions and split BasisLinear files for QED anomaly cancellation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename first plane: basis/P/P' → symmBasis/Psymm/Psymm' (symmetric plane) Rename second plane: basis!/P!/P!' → shiftBasis/Pshift/Pshift' (shifted plane) Split into ChargeSplits.lean, SymmPlane.lean, ShiftPlane.lean sub-files Update downstream references in LineInCubic and Parameterization files Agent-Logs-Url: https://github.com/leanprover-community/physlib/sessions/b925f308-353b-4b1d-9802-a285d5d40e54 Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Even/BasisLinear/ChargeSplits.lean | 10 ++++ .../Even/BasisLinear/ShiftPlane.lean | 13 +++++ .../Even/BasisLinear/SymmPlane.lean | 15 ++++++ .../AnomalyCancellation/Even/LineInCubic.lean | 18 +++---- .../Odd/BasisLinear/ChargeSplits.lean | 10 ++++ .../Odd/BasisLinear/ShiftPlane.lean | 13 +++++ .../Odd/BasisLinear/SymmPlane.lean | 13 +++++ .../AnomalyCancellation/Odd/LineInCubic.lean | 36 ++++++------- .../Odd/Parameterization.lean | 50 +++++++++---------- 9 files changed, 126 insertions(+), 52 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean index 3b76d59d6..d611a2fb2 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean @@ -11,6 +11,16 @@ public import Physlib.QFT.QED.AnomalyCancellation.VectorLike # Charge splits for the even case basis +We define two ways of splitting the `2 * n.succ` charge indices into groups: + +- The **symmetric (even) split** decomposes the charges via `n.succ + n.succ`, giving index maps + `evenFst` and `evenSnd`. +- The **shifted even split** decomposes the charges via `1 + (n + n + 1)`, giving index maps + `evenShiftFst`, `evenShiftSnd`, `evenShiftZero`, and `evenShiftLast`. + +These two splittings give rise to the two planes of ACC-satisfying basis vectors defined in +`SymmPlane` and `ShiftPlane`, which are named after the splitting they use. + -/ @[expose] public section diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean index 150bac7e7..3835d0c02 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean @@ -10,6 +10,19 @@ public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ChargeSplits # The shifted plane for the even case basis +The shifted plane is the span of basis vectors `shiftBasis`, each of which has charge `+1` at +position `evenShiftFst j` and charge `-1` at position `evenShiftSnd j`. It is called "shifted" +because these positions come from the **shifted even split** of the `2 * n.succ` charge indices +into `1 + (n + n + 1)` (see `ChargeSplits`). + +## Key results + +- `shiftBasisAsCharges` : The basis vectors as charge assignments. +- `shiftBasis` : The basis vectors as `LinSols`. +- `Pshift` : The inclusion of the shifted plane into charges. +- `Pshift_accCube` : Charges from the shifted plane satisfy the cubic ACC. +- `Pshift'` : The inclusion of the shifted plane into linear solutions. + -/ @[expose] public section diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean index 75cab6bc9..5276fab88 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean @@ -10,6 +10,21 @@ public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ChargeSplits # The symmetric plane for the even case basis +The symmetric plane is the span of basis vectors `symmBasis`, each of which has charge `+1` at +position `evenFst j` and charge `-1` at position `evenSnd j`. It is called "symmetric" because +these positions come from the **symmetric (even) split** of the `2 * n.succ` charge indices into +`n.succ + n.succ` (see `ChargeSplits`). + +## Key results + +- `symmBasisAsCharges` : The basis vectors as charge assignments. +- `symmBasis` : The basis vectors as `LinSols`. +- `Psymm` : The inclusion of the symmetric plane into charges. +- `Psymm_accCube` : Charges from the symmetric plane satisfy the cubic ACC. +- `Psymm'` : The inclusion of the symmetric plane into linear solutions. +- `vectorLikeEven_in_span` : Every vector-like even solution is in the span of the symmetric + plane. + -/ @[expose] public section diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean index b7b85c114..7eba93a2b 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean @@ -16,7 +16,7 @@ if the line through that point and through the two different planes formed by th `LinSols` lies in the cubic. We show that for a solution all its permutations satisfy this property, then there exists -a permutation for which it lies in the plane spanned by the first part of the basis. +a permutation for which it lies in the plane spanned by the symmetric part of the basis. The main reference for this file is: @@ -64,12 +64,12 @@ lemma lineInCubic_expand {S : (PureU1 (2 * n.succ)).LinSols} (h : LineInCubic S) /-- This lemma states that for a given `S` of type `(PureU1 (2 * n.succ)).AnomalyFreeLinear` and a proof `h` that the line through `S` lies on a cubic curve, -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`. +for any functions `g : Fin n.succ → ℚ` and `f : Fin n → ℚ`, if `S.val = Psymm g + Pshift f`, +then `accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0`. -/ -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 +lemma line_in_cubic_Psymm_Psymm_Pshift {S : (PureU1 (2 * n.succ)).LinSols} (h : LineInCubic S) : + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = Psymm g + Pshift f), + accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift 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 @@ -107,8 +107,8 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ)).LinSols} have hSS' : ((FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S' := rfl obtain ⟨g', f', hall⟩ := span_basis_swapShift j hSS' g f h - have h1 := line_in_cubic_P_P_P! (lineInCubicPerm_self LIC) g f h - have h2 := line_in_cubic_P_P_P! + have h1 := line_in_cubic_Psymm_Psymm_Pshift (lineInCubicPerm_self LIC) g f h + have h2 := line_in_cubic_Psymm_Psymm_Pshift (lineInCubicPerm_self (lineInCubicPerm_permute LIC (Equiv.swap (evenShiftFst j) (evenShiftSnd j)))) g' f' hall.1 rw [hall.2.1, hall.2.2] at h2 @@ -180,7 +180,7 @@ theorem lineInCubicPerm_vectorLike {S : (PureU1 (2 * n.succ.succ)).Sols} theorem lineInCubicPerm_in_plane (S : (PureU1 (2 * n.succ.succ)).Sols) (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) := + ∈ Submodule.span ℚ (Set.range symmBasis) := vectorLikeEven_in_span S.1.1 (lineInCubicPerm_vectorLike LIC) end Even diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean index 6d7edebd9..a19364009 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean @@ -9,6 +9,16 @@ public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear public import Physlib.QFT.QED.AnomalyCancellation.VectorLike /-! # Charge splits for the odd case basis + +We define two ways of splitting the `2 * n + 1` charge indices into groups: + +- The **symmetric split** decomposes the charges via `(n + 1) + n`, giving index maps + `oddFst`, `oddSnd`, and `oddMid`. +- The **shifted split** decomposes the charges via `1 + n + n`, giving index maps + `oddShiftFst`, `oddShiftSnd`, and `oddShiftZero`. + +These two splittings give rise to the two planes of ACC-satisfying basis vectors defined in +`SymmPlane` and `ShiftPlane`, which are named after the splitting they use. -/ @[expose] public section diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean index eb57e756b..affe3ebec 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean @@ -8,6 +8,19 @@ module public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ChargeSplits /-! # The shifted plane for the odd case basis + +The shifted plane is the span of basis vectors `shiftBasis`, each of which has charge `+1` at +position `oddShiftFst j` and charge `-1` at position `oddShiftSnd j`. It is called "shifted" +because these positions come from the **shifted split** of the `2 * n + 1` charge indices into +`1 + n + n` (see `ChargeSplits`). + +## Key results + +- `shiftBasisAsCharges` : The basis vectors as charge assignments. +- `shiftBasis` : The basis vectors as `LinSols`. +- `Pshift` : The inclusion of the shifted plane into charges. +- `Pshift_accCube` : Charges from the shifted plane satisfy the cubic ACC. +- `Pshift'` : The inclusion of the shifted plane into linear solutions. -/ @[expose] public section diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean index 8b94ead29..aa1bf25ca 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean @@ -8,6 +8,19 @@ module public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ChargeSplits /-! # The symmetric plane for the odd case basis + +The symmetric plane is the span of basis vectors `symmBasis`, each of which has charge `+1` at +position `oddFst j` and charge `-1` at position `oddSnd j`. It is called "symmetric" because +these positions come from the **symmetric split** of the `2 * n + 1` charge indices into +`(n + 1) + n` (see `ChargeSplits`). + +## Key results + +- `symmBasisAsCharges` : The basis vectors as charge assignments. +- `symmBasis` : The basis vectors as `LinSols`. +- `Psymm` : The inclusion of the symmetric plane into charges. +- `Psymm_accCube` : Charges from the symmetric plane satisfy the cubic ACC. +- `Psymm'` : The inclusion of the symmetric plane into linear solutions. -/ @[expose] public section diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean index a2115ba7f..e1f930139 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean @@ -36,29 +36,29 @@ open VectorLikeOddPlane in the basis through that point is in the cubic. -/ def LineInCubic (S : (PureU1 (2 * n + 1)).LinSols) : Prop := ∀ (g f : Fin n → ℚ) (_ : S.val = Pa g f) (a b : ℚ), - accCube (2 * n + 1) (a • P g + b • P! f) = 0 + accCube (2 * n + 1) (a • Psymm g + b • Pshift f) = 0 set_option backward.isDefEq.respectTransparency false in /-- The condition that a linear solution sits on a line between the two planes within the cubic expands into a on `accCubeTriLinSymm` applied to the points within the planes. -/ lemma lineInCubic_expand {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S) : - ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = P g + P! f) (a b : ℚ), - 3 * a * b * (a * accCubeTriLinSymm (P g) (P g) (P! f) - + b * accCubeTriLinSymm (P! f) (P! f) (P g)) = 0 := by + ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = Psymm g + Pshift f) (a b : ℚ), + 3 * a * b * (a * accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) + + b * accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g)) = 0 := by intro g f hS a b have h1 := h g f hS a b - change accCubeTriLinSymm.toCubic (a • P g + b • P! f) = 0 at h1 + change accCubeTriLinSymm.toCubic (a • Psymm g + b • Pshift f) = 0 at h1 simp only [TriLinearSymm.toCubic_add] at h1 simp only [HomogeneousCubic.map_smul, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] at h1 - erw [P_accCube, P!_accCube] at h1 + erw [Psymm_accCube, Pshift_accCube] at h1 rw [← h1] ring -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 +lemma line_in_cubic_Psymm_Psymm_Pshift {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S) : + ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = Psymm g + Pshift f), + accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift 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 @@ -83,31 +83,31 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ + 1)).LinSols} (LIC : LineInCubicPerm S) : ∀ (j : Fin n.succ) (g f : Fin n.succ → ℚ) (_ : S.val = Pa g f), (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) - * accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) = 0 := by + * accCubeTriLinSymm (Psymm g) (Psymm g) (shiftBasisAsCharges j) = 0 := by intro j g f h let S' := (FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j)) S have hSS' : ((FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S' := rfl - obtain ⟨g', f', hall⟩ := span_basis_swap! j hSS' g f h - have h1 := line_in_cubic_P_P_P! (lineInCubicPerm_self LIC) g f h - have h2 := line_in_cubic_P_P_P! (lineInCubicPerm_self (lineInCubicPerm_permute LIC + obtain ⟨g', f', hall⟩ := span_basis_swapShift j hSS' g f h + have h1 := line_in_cubic_Psymm_Psymm_Pshift (lineInCubicPerm_self LIC) g f h + have h2 := line_in_cubic_Psymm_Psymm_Pshift (lineInCubicPerm_self (lineInCubicPerm_permute LIC (Equiv.swap (oddShiftFst j) (oddShiftSnd j)))) g' f' hall.1 rw [hall.2.1, hall.2.2] at h2 rw [accCubeTriLinSymm.map_add₃, h1, accCubeTriLinSymm.map_smul₃] at h2 simpa using h2 -lemma P_P_P!_accCube' {S : (PureU1 (2 * n.succ.succ + 1)).LinSols} +lemma Psymm_Psymm_shiftBasis_accCube' {S : (PureU1 (2 * n.succ.succ + 1)).LinSols} (f g : Fin n.succ.succ → ℚ) (hS : S.val = Pa f g) : - accCubeTriLinSymm (P f) (P f) (basis!AsCharges 0) = + accCubeTriLinSymm (Psymm f) (Psymm f) (shiftBasisAsCharges 0) = (S.val (oddShiftFst 0) + S.val (oddShiftSnd 0)) * (2 * S.val oddShiftZero + S.val (oddShiftFst 0) + S.val (oddShiftSnd 0)) := by - rw [P_P_P!_accCube f 0] + rw [Psymm_Psymm_shiftBasis_accCube f 0] rw [← Pa_oddShiftShiftZero f g] rw [← hS] have ht : oddShiftFst (0 : Fin n.succ.succ) = oddFst 1 := rfl nth_rewrite 1 [ht] - rw [P_oddFst] + rw [Psymm_oddFst] have h1 := Pa_oddShiftShiftZero f g have h4 := Pa_oddShiftShiftSnd f g 0 have h2 := Pa_oddShiftShiftFst f g 0 @@ -126,7 +126,7 @@ lemma lineInCubicPerm_last_cond {S : (PureU1 (2 * n.succ.succ+1)).LinSols} LineInPlaneProp ((S.val (oddShiftSnd 0)), ((S.val (oddShiftFst 0)), (S.val oddShiftZero))) := by obtain ⟨g, f, hfg⟩ := span_basis S have h1 := lineInCubicPerm_swap LIC 0 g f hfg - rw [P_P_P!_accCube' g f hfg] at h1 + rw [Psymm_Psymm_shiftBasis_accCube' g f hfg] at h1 simp only [Nat.succ_eq_add_one, mul_eq_zero] at h1 cases h1 <;> rename_i h1 · left diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean index 567fbb4a6..dd8b9435c 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean @@ -30,16 +30,16 @@ open VectorLikeOddPlane show that this can be extended to a complete solution. -/ def parameterizationAsLinear (g f : Fin n → ℚ) (a : ℚ) : (PureU1 (2 * n + 1)).LinSols := - a • ((accCubeTriLinSymm (P! f) (P! f) (P g)) • P' g + - (- accCubeTriLinSymm (P g) (P g) (P! f)) • P!' f) + a • ((accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g)) • Psymm' g + + (- accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f)) • Pshift' f) lemma parameterizationAsLinear_val (g f : Fin n → ℚ) (a : ℚ) : (parameterizationAsLinear g f a).val = - a • ((accCubeTriLinSymm (P! f) (P! f) (P g)) • P g + - (- accCubeTriLinSymm (P g) (P g) (P! f)) • P! f) := by + a • ((accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g)) • Psymm g + + (- accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f)) • Pshift f) := by rw [parameterizationAsLinear] - change a • (_ • (P' g).val + _ • (P!' f).val) = _ - rw [P'_val, P!'_val] + change a • (_ • (Psymm' g).val + _ • (Pshift' f).val) = _ + rw [Psymm'_val, Pshift'_val] set_option backward.isDefEq.respectTransparency false in /-- The parameterization satisfies the cubic ACC. -/ @@ -50,7 +50,7 @@ lemma parameterizationCharge_cube (g f : Fin n → ℚ) (a : ℚ) : rw [HomogeneousCubic.map_smul] rw [TriLinearSymm.toCubic_add] rw [HomogeneousCubic.map_smul, HomogeneousCubic.map_smul] - erw [P_accCube g, P!_accCube f] + erw [Psymm_accCube g, Pshift_accCube f] rw [accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] @@ -63,26 +63,26 @@ def parameterization (g f : Fin n → ℚ) (a : ℚ) : parameterizationCharge_cube g f a⟩ lemma anomalyFree_param {S : (PureU1 (2 * n + 1)).Sols} - (g f : Fin n → ℚ) (hS : S.val = P g + P! f) : - accCubeTriLinSymm (P g) (P g) (P! f) = - - accCubeTriLinSymm (P! f) (P! f) (P g) := by + (g f : Fin n → ℚ) (hS : S.val = Psymm g + Pshift f) : + accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = + - accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g) := by have hC := S.cubicSol rw [hS] at hC - change (accCube (2 * n + 1)) (P g + P! f) = 0 at hC + change (accCube (2 * n + 1)) (Psymm g + Pshift f) = 0 at hC erw [TriLinearSymm.toCubic_add] at hC - erw [P_accCube] at hC - erw [P!_accCube] at hC + erw [Psymm_accCube] at hC + erw [Pshift_accCube] at hC linear_combination hC / 3 -/-- 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 (Psymm g, Psymm g, Pshift f) ≠ 0`. In this case our parameterization above will be able to recover this point. -/ def GenericCase (S : (PureU1 (2 * n.succ + 1)).Sols) : Prop := - ∀ (g f : Fin n.succ → ℚ) (_ : S.val = P g + P! f), - accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0 + ∀ (g f : Fin n.succ → ℚ) (_ : S.val = Psymm g + Pshift f), + accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) ≠ 0 lemma genericCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) - (hs : ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f ∧ - accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0) : GenericCase S := by + (hs : ∃ (g f : Fin n.succ → ℚ), S.val = Psymm g + Pshift f ∧ + accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) ≠ 0) : GenericCase S := by intro g f hS hC obtain ⟨g', f', hS', hC'⟩ := hs rw [hS] at hS' @@ -90,15 +90,15 @@ lemma genericCase_exists (S : (PureU1 (2 * n.succ + 1)).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 (Psymm g, Psymm g, Pshift f) = 0`. In this case we will show that S is zero if it is true for all permutations. -/ def SpecialCase (S : (PureU1 (2 * n.succ + 1)).Sols) : Prop := - ∀ (g f : Fin n.succ → ℚ) (_ : S.val = P g + P! f), - accCubeTriLinSymm (P g) (P g) (P! f) = 0 + ∀ (g f : Fin n.succ → ℚ) (_ : S.val = Psymm g + Pshift f), + accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0 lemma specialCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) - (hs : ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f ∧ - accCubeTriLinSymm (P g) (P g) (P! f) = 0) : SpecialCase S := by + (hs : ∃ (g f : Fin n.succ → ℚ), S.val = Psymm g + Pshift f ∧ + accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0) : SpecialCase S := by intro g f hS obtain ⟨g', f', hS', hC'⟩ := hs rw [hS] at hS' @@ -109,8 +109,8 @@ lemma specialCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) lemma generic_or_special (S : (PureU1 (2 * n.succ + 1)).Sols) : 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 + have h1 : accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) ≠ 0 ∨ + accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0 := by exact ne_or_eq _ _ cases h1 <;> rename_i h1 · exact Or.inl (genericCase_exists S ⟨g, f, h, h1⟩) From d6b4943073d9d1b2374287eeddbbc9bd42bf5539 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:03:53 +0000 Subject: [PATCH 11/22] Add SymmPlane.lean: symmetric plane for even anomaly cancellation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract section A.1 (even split definitions) and section B (first plane) from BasisLinear.lean into a new SymmPlane.lean file with renamed definitions: - basisAsCharges → symmBasisAsCharges - basis → symmBasis - P → symmPlane - P' → symmPlaneLinSols - basis_linear_independent → symmBasis_linear_independent and all related lemma names updated accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../AnomalyCancellation/Even/BasisLinear.lean | 826 ++++++++++++++++-- .../Even/BasisLinear/SymmPlane.lean | 195 +++-- .../AnomalyCancellation/Even/LineInCubic.lean | 42 +- .../AnomalyCancellation/Odd/BasisLinear.lean | 791 +++++++++++++++-- .../AnomalyCancellation/Odd/LineInCubic.lean | 36 +- .../Odd/Parameterization.lean | 50 +- 6 files changed, 1706 insertions(+), 234 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean index 64147e5da..d36052459 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean @@ -5,8 +5,8 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.SymmPlane -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ShiftPlane +public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.VectorLike /-! # Splitting the linear solutions in the even case into two ACC-satisfying planes @@ -17,22 +17,47 @@ We split the linear solutions of `PureU1 (2 * n.succ)` into two planes, where every point in either plane satisfies both the linear and cubic anomaly cancellation conditions. -The two planes are named after the charge-index splitting they are built from: -- The **symmetric plane** (`SymmPlane`): basis vectors pair charges at positions from the - symmetric (even) split `n.succ + n.succ`. -- The **shifted plane** (`ShiftPlane`): basis vectors pair charges at positions from the - shifted even split `1 + (n + n + 1)`. - ## ii. Key results -- `Psymm'` : The inclusion of the symmetric plane into linear solutions. -- `Psymm_accCube` : The statement that charges from the symmetric plane satisfy the cubic ACC. -- `Pshift'` : The inclusion of the shifted plane into linear solutions. -- `Pshift_accCube` : The statement that charges from the shifted plane satisfy the cubic ACC. +- `P'` : The inclusion of the first plane into linear solutions +- `P_accCube` : The statement that chares from the first plane satisfy the cubic ACC +- `P!'` : The inclusion of the second plane. +- `P!_accCube` : The statement that charges from the second plane satisfy the cubic ACC - `span_basis` : Every linear solution is the sum of a point from each plane. ## iii. Table of contents +- A. Splitting the charges up into groups + - A.1. The even split: Spltting the charges up via `n.succ + n.succ` + - A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` + - A.3. Lemmas relating the two splittings +- B. The first plane + - B.1. The basis vectors of the first plane as charges + - B.2. Components of the basis vectors + - B.3. The basis vectors satisfy the linear ACCs + - B.4. The basis vectors satisfy the cubic ACC + - B.5. The basis vectors as linear solutions + - B.6. The inclusion of the first plane into charges + - B.7. Components of the inclusion into charges + - B.8. The inclusion into charges satisfies the linear and cubic ACCs + - B.9. Kernel of the inclusion into charges + - B.10. The inclusion of the plane into linear solutions + - B.11. The basis vectors are linearly independent + - B.12. Every vector-like even solution is in the span of the basis of the first plane +- C. The vectors of the basis spanning the second plane, via the shifted even split + - C.2. Components of the vectors + - C.3. The vectors satisfy the linear ACCs + - C.4. The vectors satisfy the cubic ACC + - C.6. The vectors as linear solutions + - C.7. The inclusion of the second plane into charges + - C.8. Components of the inclusion into charges + - C.9. The inclusion into charges satisfies the cubic ACC + - C.10. Kernel of the inclusion into charges + - C.11. The inclusion of the second plane into the span of the basis + - C.12. The inclusion of the plane into linear solutions + - C.13. The basis vectors are linearly independent + - C.14. Properties of the basis vectors relating to the span + - C.15. Permutations as additions of basis vectors - D. Mixed cubic ACCs involving points from both planes - E. The combined basis - E.1. As a map into linear solutions @@ -44,7 +69,7 @@ The two planes are named after the charge-index splitting they are built from: - E.7. Injectivity of the inclusion into linear solutions - E.8. Cardinality of the basis - E.9. The basis vectors as a basis -- F. Every linear solution is the sum of a point from each plane +- F. Every Lienar solution is the sum of a point from each plane - F.1. Relation under permutations ## iv. References @@ -65,40 +90,725 @@ namespace VectorLikeEvenPlane /-! +## A. Splitting the charges up into groups + +We have `2 * n.succ` charges, which we split up in the following ways: + +`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` + +``` +| evenShiftZero (0) | evenShiftFst j (1 to n) | + evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | +``` + +-/ + +/-! + +### A.1. The even split: Spltting the charges up via `n.succ + n.succ` + +-/ + +/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the first `n.succ`, + casted into `Fin (2 * n.succ)`. -/ +def evenFst (j : Fin n.succ) : Fin (2 * n.succ) := + Fin.cast (split_equal n.succ) (Fin.castAdd n.succ j) + +/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the second `n.succ`, + casted into `Fin (2 * n.succ)`. -/ +def evenSnd (j : Fin n.succ) : Fin (2 * n.succ) := + Fin.cast (split_equal n.succ) (Fin.natAdd n.succ j) + +lemma ext_even (S T : Fin (2 * n.succ) → ℚ) (h1 : ∀ i, S (evenFst i) = T (evenFst i)) + (h2 : ∀ i, S (evenSnd i) = T (evenSnd i)) : S = T := by + funext i + by_cases hi : i.val < n.succ + · let j : Fin n.succ := ⟨i, hi⟩ + have h2 := h1 j + have h3 : evenFst 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 : evenSnd j = i := by + simp only [succ_eq_add_one, evenSnd, Fin.ext_iff, Fin.val_cast, Fin.val_natAdd, j] + omega + rw [h3] at h2 + exact h2 + +lemma sum_even (S : Fin (2 * n.succ) → ℚ) : + ∑ i, S i = ∑ i : Fin n.succ, ((S ∘ evenFst) i + (S ∘ evenSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (n.succ + n.succ), S (Fin.cast (split_equal n.succ) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (split_equal n.succ)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _=> rfl + rw [h1, Fin.sum_univ_add, Finset.sum_add_distrib] + rfl + +/-! + +### A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` + +-/ + +lemma n_cond₂ (n : ℕ) : 1 + ((n + n) + 1) = 2 * n.succ := by + linarith + +/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the first `n`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftFst (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) + (Fin.natAdd 1 (Fin.castAdd 1 (Fin.castAdd n j))) + +/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the second `n`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftSnd (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) + (Fin.natAdd 1 (Fin.castAdd 1 (Fin.natAdd n j))) + +/-- The element of `Fin (1 + (n + n + 1))` corresponding to the first `1`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftZero : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.castAdd ((n + n) + 1) 0)) + +/-- The element of `Fin (1 + (n + n + 1))` corresponding to the second `1`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftLast : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.natAdd 1 (Fin.natAdd (n + n) 0))) + +lemma sum_evenShift (S : Fin (2 * n.succ) → ℚ) : + ∑ i, S i = S evenShiftZero + S evenShiftLast + + ∑ i : Fin n, ((S ∘ evenShiftFst) i + (S ∘ evenShiftSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (1 + ((n + n) + 1)), S (Fin.cast (n_cond₂ n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (n_cond₂ n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1] + rw [Fin.sum_univ_add, Fin.sum_univ_add, Fin.sum_univ_add, Finset.sum_add_distrib] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + 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 + +/-! + +### A.3. Lemmas relating the two splittings + +-/ +lemma evenShiftZero_eq_evenFst_zero : @evenShiftZero n = evenFst 0 := rfl + +lemma evenShiftLast_eq_evenSnd_last: @evenShiftLast n = evenSnd (Fin.last n) := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, evenSnd, Fin.natAdd_last, Fin.val_last] + omega + +lemma evenShiftFst_eq_evenFst_succ (j : Fin n) : evenShiftFst j = evenFst j.succ := by + rw [Fin.ext_iff, evenFst, evenShiftFst] + simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_succ] + ring + +lemma evenShiftSnd_eq_evenSnd_castSucc (j : Fin n) : evenShiftSnd j = evenSnd j.castSucc := by + rw [Fin.ext_iff, evenSnd, evenShiftSnd] + simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_castSucc] + ring_nf + rw [Nat.succ_eq_add_one] + ring + +/-! + +## B. The first plane + +-/ + +/-! + +### B.1. The basis vectors of the first plane as charges + +-/ + +/-- The first part of the basis as charges. -/ +def basisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).Charges := + fun i => + if i = evenFst j then + 1 + else + if i = evenSnd j then + - 1 + else + 0 + +/-! + +### B.2. Components of the basis vectors + +-/ + +lemma basis_on_evenFst_self (j : Fin n.succ) : basisAsCharges j (evenFst j) = 1 := by + simp [basisAsCharges] + +lemma basis_on_evenFst_other {k j : Fin n.succ} (h : k ≠ j) : + basisAsCharges k (evenFst j) = 0 := by + simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenFst, evenSnd] + 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 only [succ_eq_add_one, ne_eq, Fin.natAdd_eq_addNat, Fin.cast_inj, neg_eq_zero, + one_ne_zero] + rw [Fin.ext_iff] at h2 + simp only [Fin.val_castAdd, Fin.val_addNat] at h2 + omega + · rfl + +lemma basis_on_other {k : Fin n.succ} {j : Fin (2 * n.succ)} (h1 : j ≠ evenFst k) + (h2 : j ≠ evenSnd k) : basisAsCharges k j = 0 := by + simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges] + simp_all only [ne_eq, ↓reduceIte] + +lemma basis_evenSnd_eq_neg_evenFst (j i : Fin n.succ) : + basisAsCharges j (evenSnd i) = - basisAsCharges j (evenFst i) := by + simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenSnd, evenFst] + split <;> split + any_goals split + any_goals rfl + 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 + all_goals omega + +lemma basis_on_evenSnd_self (j : Fin n.succ) : basisAsCharges j (evenSnd j) = - 1 := by + rw [basis_evenSnd_eq_neg_evenFst, basis_on_evenFst_self] + +lemma basis_on_evenSnd_other {k j : Fin n.succ} (h : k ≠ j) : basisAsCharges k (evenSnd j) = 0 := by + rw [basis_evenSnd_eq_neg_evenFst, basis_on_evenFst_other h] + rfl + +/-! + +### B.3. The basis vectors satisfy the linear ACCs + +-/ + +lemma basis_linearACC (j : Fin n.succ) : (accGrav (2 * n.succ)) (basisAsCharges j) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_even] + simp [basis_evenSnd_eq_neg_evenFst] +/-! + +### B.4. The basis vectors satisfy the cubic ACC + +-/ +lemma basis_accCube (j : Fin n.succ) : + accCube (2 * n.succ) (basisAsCharges j) = 0 := by + rw [accCube_explicit, sum_even] + apply Finset.sum_eq_zero + intro i _ + simp only [succ_eq_add_one, Function.comp_apply, basis_evenSnd_eq_neg_evenFst] + ring + +/-! + +### B.5. The basis vectors as linear solutions + +-/ + +/-- 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 + simp only [succ_eq_add_one, PureU1_numberLinear] at i + match i with + | 0 => + exact basis_linearACC j⟩ + +/-! + +### B.6. The inclusion of the first plane into charges + +-/ + +/-- 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 + +/-! + +### B.7. Components of the inclusion into charges + +-/ + +lemma P_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : P f (evenFst j) = f j := by + rw [P, sum_of_charges] + simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [basis_on_evenFst_self] + exact Rat.mul_one (f j) + · intro k _ hkj + rw [basis_on_evenFst_other hkj] + exact Rat.mul_zero (f k) + · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] + +lemma P_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : P f (evenSnd j) = - f j := by + rw [P, sum_of_charges] + simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · simp only [basis_on_evenSnd_self, mul_neg, mul_one] + · intro k _ hkj + simp only [basis_on_evenSnd_other hkj, mul_zero] + · simp + +lemma P_evenSnd_evenFst (f : Fin n.succ → ℚ) : P f ∘ evenSnd = - P f ∘ evenFst := by + funext j + simp only [PureU1_numberCharges, Function.comp_apply, Pi.neg_apply] + rw [P_evenFst, P_evenSnd] + +/-! + +### B.8. The inclusion into charges satisfies the linear and cubic ACCs + +-/ + +lemma P_linearACC (f : Fin n.succ → ℚ) : (accGrav (2 * n.succ)) (P f) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_even] + simp [P_evenSnd, P_evenFst] + +lemma P_accCube (f : Fin n.succ → ℚ) : accCube (2 * n.succ) (P f) = 0 := by + rw [accCube_explicit, sum_even] + apply Finset.sum_eq_zero + intro i _ + simp only [succ_eq_add_one, Function.comp_apply, P_evenFst, P_evenSnd] + ring + +/-! + +### B.9. Kernel of the inclusion into charges + +-/ + +lemma P_zero (f : Fin n.succ → ℚ) (h : P f = 0) : ∀ i, f i = 0 := by + intro i + erw [← P_evenFst f] + rw [h] + rfl + +/-! + +### B.10. The inclusion of the plane into linear solutions + +-/ + +/-- 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 + +lemma P'_val (f : Fin n.succ → ℚ) : (P' f).val = P f := by + simp only [succ_eq_add_one, P', P] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + +/-! + +### B.11. The basis vectors are linearly independent + +-/ + +theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change P' f = 0 at h + 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 + rw [P'_val] at h1 + exact P_zero f h1 + +/-! + +### B.12. Every vector-like even solution is in the span of the basis of the first plane + +-/ + +lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols) + (hS : VectorLikeEven S.val) : ∃ (M : (FamilyPermutations (2 * n.succ)).group), + (FamilyPermutations (2 * n.succ)).linSolRep M S ∈ Submodule.span ℚ (Set.range basis) := by + use (Tuple.sort S.val).symm + change sortAFL S ∈ Submodule.span ℚ (Set.range basis) + rw [Submodule.mem_span_range_iff_exists_fun ℚ] + let f : Fin n.succ → ℚ := fun i => (sortAFL S).val (evenFst i) + use f + apply ACCSystemLinear.LinSols.ext + rw [sortAFL_val] + erw [P'_val] + apply ext_even + · intro i + rw [P_evenFst] + rfl + · intro i + rw [P_evenSnd] + have ht := hS i + change sort S.val (evenFst i) = - sort S.val (evenSnd i) at ht + have h : sort S.val (evenSnd i) = - sort S.val (evenFst i) := by + rw [ht] + ring + rw [h] + rfl + +/-! + +## C. The vectors of the basis spanning the second plane, via the shifted even split + +-/ + +/-- The second part of the basis as charges. -/ +def basis!AsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges := + fun i => + if i = evenShiftFst j then + 1 + else + if i = evenShiftSnd j then + - 1 + else + 0 +/-! + +### C.2. Components of the vectors + +-/ + +lemma basis!_on_evenShiftFst_self (j : Fin n) : basis!AsCharges j (evenShiftFst j) = 1 := by + simp [basis!AsCharges] + +lemma basis!_on_other {k : Fin n} {j : Fin (2 * n.succ)} (h1 : j ≠ evenShiftFst k) + (h2 : j ≠ evenShiftSnd k) : basis!AsCharges k j = 0 := by + simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] + simp_all only [ne_eq, ↓reduceIte] + +lemma basis!_on_evenShiftFst_other {k j : Fin n} (h : k ≠ j) : + basis!AsCharges k (evenShiftFst j) = 0 := by + simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] + simp only [evenShiftFst, succ_eq_add_one, evenShiftSnd] + 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 + simp only [Fin.val_castAdd, Fin.val_addNat] at h2 + omega + · rfl + +lemma basis!_evenShftSnd_eq_neg_evenShiftFst (j i : Fin n) : + basis!AsCharges j (evenShiftSnd i) = - basis!AsCharges j (evenShiftFst i) := by + simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges, evenShiftSnd, evenShiftFst] + split <;> split + any_goals split + any_goals split + any_goals rfl + all_goals + rename_i h1 h2 + rw [Fin.ext_iff] at h1 h2 + simp_all only [Fin.natAdd_eq_addNat, Fin.cast_inj, Fin.val_cast, Fin.val_natAdd, + Fin.val_castAdd, add_right_inj, Fin.val_addNat, add_eq_left] + · subst h1 + exact Fin.elim0 i + all_goals + rename_i h3 + rw [Fin.ext_iff] at h3 + simp_all only [Fin.val_natAdd, Fin.val_castAdd, Fin.val_addNat, not_true_eq_false] + all_goals + omega + +lemma basis!_on_evenShiftSnd_self (j : Fin n) : basis!AsCharges j (evenShiftSnd j) = - 1 := by + rw [basis!_evenShftSnd_eq_neg_evenShiftFst, basis!_on_evenShiftFst_self] + +lemma basis!_on_evenShiftSnd_other {k j : Fin n} (h : k ≠ j) : + basis!AsCharges k (evenShiftSnd j) = 0 := by + rw [basis!_evenShftSnd_eq_neg_evenShiftFst, basis!_on_evenShiftFst_other h] + rfl + +lemma basis!_on_evenShiftZero (j : Fin n) : basis!AsCharges j evenShiftZero = 0 := by + simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] + split<;> rename_i h + · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftFst, Fin.ext_iff, + Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, Fin.val_natAdd] at h + omega + · split <;> rename_i h2 + · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftSnd, Fin.ext_iff, + Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, Fin.val_natAdd] at h2 + omega + · rfl + +lemma basis!_on_evenShiftLast (j : Fin n) : basis!AsCharges j evenShiftLast = 0 := by + simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] + split <;> rename_i h + · rw [Fin.ext_iff] at h + simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, evenShiftFst, Fin.val_castAdd, add_right_inj] at h + omega + · split <;> rename_i h2 + · rw [Fin.ext_iff] at h2 + simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, evenShiftSnd, Fin.val_castAdd, add_right_inj] at h2 + omega + · rfl + +/-! + +### C.3. The vectors satisfy the linear ACCs + +-/ + +lemma basis!_linearACC (j : Fin n) : (accGrav (2 * n.succ)) (basis!AsCharges j) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_evenShift, basis!_on_evenShiftZero, basis!_on_evenShiftLast] + simp [basis!_evenShftSnd_eq_neg_evenShiftFst] + +/-! + +### C.4. The vectors satisfy the cubic ACC + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma basis!_accCube (j : Fin n) : + accCube (2 * n.succ) (basis!AsCharges j) = 0 := by + rw [accCube_explicit, sum_evenShift] + rw [basis!_on_evenShiftLast, basis!_on_evenShiftZero] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, + zero_add] + apply Finset.sum_eq_zero + intro i _ + simp only [basis!_evenShftSnd_eq_neg_evenShiftFst] + ring + +/-! + +### C.6. The vectors as linear solutions + +-/ +/-- 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 + simp only [succ_eq_add_one, PureU1_numberLinear] at i + match i with + | 0 => + exact basis!_linearACC j⟩ + +/-! + +### C.7. The inclusion of the second plane into charges + +-/ + +/-- 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 + +/-! + +### C.8. Components of the inclusion into charges + +-/ + +lemma P!_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : P! f (evenShiftFst j) = f j := by + rw [P!, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [basis!_on_evenShiftFst_self] + exact Rat.mul_one (f j) + · intro k _ hkj + rw [basis!_on_evenShiftFst_other hkj] + exact Rat.mul_zero (f k) + · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] + +lemma P!_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : P! f (evenShiftSnd j) = - f j := by + rw [P!, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [basis!_on_evenShiftSnd_self] + exact mul_neg_one (f j) + · intro k _ hkj + rw [basis!_on_evenShiftSnd_other hkj] + exact Rat.mul_zero (f k) + · simp + +lemma P!_evenShiftZero (f : Fin n → ℚ) : P! f (evenShiftZero) = 0 := by + rw [P!, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, basis!_on_evenShiftZero] + +lemma P!_evenShiftLast (f : Fin n → ℚ) : P! f evenShiftLast = 0 := by + rw [P!, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, basis!_on_evenShiftLast] + +/-! + +### C.9. The inclusion into charges satisfies the cubic ACC + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma P!_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (P! f) = 0 := by + rw [accCube_explicit, sum_evenShift, P!_evenShiftZero, P!_evenShiftLast] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, + zero_add] + apply Finset.sum_eq_zero + intro i _ + simp only [P!_evenShiftFst, P!_evenShiftSnd] + ring + +/-! + +### C.10. Kernel of the inclusion into charges + +-/ + +lemma P!_zero (f : Fin n → ℚ) (h : P! f = 0) : ∀ i, f i = 0 := by + intro i + rw [← P!_evenShiftFst f] + rw [h] + rfl + +/-! + +### C.11. The inclusion of the second plane into the span of the basis + +-/ + +lemma P!_in_span (f : Fin n → ℚ) : P! f ∈ Submodule.span ℚ (Set.range basis!AsCharges) := by + rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] + use f + rfl + +/-! + +### C.12. The inclusion of the plane into linear solutions + +-/ + +/-- 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 + +lemma P!'_val (f : Fin n → ℚ) : (P!' f).val = P! f := by + simp only [succ_eq_add_one, P!', P!] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + +/-! + +### C.13. The basis vectors are linearly independent + +-/ + +theorem basis!_linear_independent : LinearIndependent ℚ (@basis! n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change P!' f = 0 at h + 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 + rw [P!'_val] at h1 + exact P!_zero f h1 + +/-! + +### C.14. Properties of the basis vectors relating to the span + +-/ + +lemma smul_basis!AsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : Fin n) : + (S.val (evenShiftSnd j) - S.val (evenShiftFst 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] + +/-! + +### C.15. Permutations as additions of basis vectors + +-/ + +/-- Swapping the elements evenShiftFst j and evenShiftSnd 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 + (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') : + S'.val = S.val + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j := by + funext i + rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] + by_cases hi : i = evenShiftFst j + · subst hi + simp [HSMul.hSMul, basis!_on_evenShiftFst_self, Equiv.swap_apply_left] + · by_cases hi2 : i = evenShiftSnd j + · simp [HSMul.hSMul, hi2, basis!_on_evenShiftSnd_self, Equiv.swap_apply_right] + · simp only [succ_eq_add_one, Equiv.invFun_as_coe, HSMul.hSMul, + ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul] + rw [basis!_on_other hi hi2] + aesop +/-! + ## D. Mixed cubic ACCs involving points from both planes -/ set_option backward.isDefEq.respectTransparency false in -lemma Psymm_Psymm_shiftBasis_accCube (g : Fin n.succ → ℚ) (j : Fin n) : - accCubeTriLinSymm (Psymm g) (Psymm g) (shiftBasisAsCharges j) +lemma P_P_P!_accCube (g : Fin n.succ → ℚ) (j : Fin n) : + accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) = g (j.succ) ^ 2 - g (j.castSucc) ^ 2 := by simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_evenShift, shiftBasis_on_evenShiftZero, shiftBasis_on_evenShiftLast] + rw [sum_evenShift, basis!_on_evenShiftZero, basis!_on_evenShiftLast] simp only [mul_zero, add_zero, Function.comp_apply, zero_add] - rw [Finset.sum_eq_single j, shiftBasis_on_evenShiftFst_self, shiftBasis_on_evenShiftSnd_self] + rw [Finset.sum_eq_single j, basis!_on_evenShiftFst_self, basis!_on_evenShiftSnd_self] · simp only [evenShiftFst_eq_evenFst_succ, mul_one, evenShiftSnd_eq_evenSnd_castSucc, mul_neg] - rw [Psymm_evenFst, Psymm_evenSnd] + rw [P_evenFst, P_evenSnd] ring · intro k _ hkj - erw [shiftBasis_on_evenShiftFst_other hkj.symm, shiftBasis_on_evenShiftSnd_other hkj.symm] + erw [basis!_on_evenShiftFst_other hkj.symm, basis!_on_evenShiftSnd_other hkj.symm] simp only [mul_zero, add_zero] · simp set_option backward.isDefEq.respectTransparency false in -lemma Psymm_Pshift_Pshift_accCube (g : Fin n → ℚ) (j : Fin n.succ) : - accCubeTriLinSymm (Pshift g) (Pshift g) (symmBasisAsCharges j) - = (Pshift g (evenFst j))^2 - (Pshift g (evenSnd j))^2 := by +lemma P_P!_P!_accCube (g : Fin n → ℚ) (j : Fin n.succ) : + accCubeTriLinSymm (P! g) (P! g) (basisAsCharges j) + = (P! g (evenFst j))^2 - (P! g (evenSnd j))^2 := by simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] rw [sum_even] simp only [Function.comp_apply] - rw [Finset.sum_eq_single j, symmBasis_on_evenFst_self, symmBasis_on_evenSnd_self] + rw [Finset.sum_eq_single j, basis_on_evenFst_self, basis_on_evenSnd_self] · simp only [mul_one, mul_neg] ring · intro k _ hkj - erw [symmBasis_on_evenFst_other hkj.symm, symmBasis_on_evenSnd_other hkj.symm] + erw [basis_on_evenFst_other hkj.symm, basis_on_evenSnd_other hkj.symm] simp only [mul_zero, add_zero] · simp @@ -116,8 +826,8 @@ lemma Psymm_Pshift_Pshift_accCube (g : Fin n → ℚ) (j : Fin n.succ) : /-- The whole basis as `LinSols`. -/ def basisa : (Fin n.succ) ⊕ (Fin n) → (PureU1 (2 * n.succ)).LinSols := fun i => match i with - | .inl i => symmBasis i - | .inr i => shiftBasis i + | .inl i => basis i + | .inr i => basis! i /-! @@ -126,7 +836,7 @@ def basisa : (Fin n.succ) ⊕ (Fin n) → (PureU1 (2 * n.succ)).LinSols := fun 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 := Psymm f + Pshift g +def Pa (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := P f + P! g /-! @@ -138,26 +848,26 @@ lemma Pa_evenShiftFst (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : Pa f g (evenShiftFst j) = f j.succ + g j := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [Pshift_evenShiftFst, evenShiftFst_eq_evenFst_succ, Psymm_evenFst] + rw [P!_evenShiftFst, evenShiftFst_eq_evenFst_succ, P_evenFst] lemma Pa_evenShiftSnd (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : Pa f g (evenShiftSnd j) = - f j.castSucc - g j := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [Pshift_evenShiftSnd, evenShiftSnd_eq_evenSnd_castSucc, Psymm_evenSnd] + rw [P!_evenShiftSnd, evenShiftSnd_eq_evenSnd_castSucc, P_evenSnd] ring -lemma Pa_evenShiftZero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : Pa f g (evenShiftZero) = f 0 := by +lemma Pa_evenShitZero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : Pa f g (evenShiftZero) = f 0 := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [Pshift_evenShiftZero, evenShiftZero_eq_evenFst_zero, Psymm_evenFst] + rw [P!_evenShiftZero, evenShiftZero_eq_evenFst_zero, P_evenFst] exact Rat.add_zero (f 0) lemma Pa_evenShiftLast (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : Pa f g (evenShiftLast) = - f (Fin.last n) := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [Pshift_evenShiftLast, evenShiftLast_eq_evenSnd_last, Psymm_evenSnd] + rw [P!_evenShiftLast, evenShiftLast_eq_evenSnd_last, P_evenSnd] exact Rat.add_zero (-f (Fin.last n)) /-! @@ -169,7 +879,7 @@ lemma Pa_evenShiftLast (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : set_option backward.isDefEq.respectTransparency false in lemma Pa_zero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : ∀ i, f i = 0 := by - have h₃ := Pa_evenShiftZero f g + have h₃ := Pa_evenShitZero f g rw [h] at h₃ change 0 = f 0 at h₃ intro i @@ -190,12 +900,12 @@ lemma Pa_zero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : exact right_eq_add.mp h1 exact hinduc i.val i.prop -lemma Pa_zero_shift (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : +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, Psymm] at h + rw [Pa, P] at h simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h - exact Pshift_zero g h + exact P!_zero g h /-! @@ -206,8 +916,8 @@ lemma Pa_zero_shift (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0 def Pa' (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • basisa i -lemma Pa'_Psymm'_Pshift' (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : - Pa' f = Psymm' (f ∘ Sum.inl) + Pshift' (f ∘ Sum.inr) := by +lemma Pa'_P'_P!' (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : + Pa' f = P' (f ∘ Sum.inl) + P!' (f ∘ Sum.inr) := by exact Fintype.sum_sum_type _ /-! @@ -224,12 +934,12 @@ theorem basisa_linear_independent : LinearIndependent ℚ (@basisa n) := by (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 - rw [Pa'_Psymm'_Pshift'] at h1 - change (Psymm' (f ∘ Sum.inl)).val + (Pshift' (f ∘ Sum.inr)).val = 0 at h1 - rw [Pshift'_val, Psymm'_val] at h1 + 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_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 + have hg := Pa_zero! (f ∘ Sum.inl) (f ∘ Sum.inr) h1 intro i simp_all cases i @@ -263,8 +973,8 @@ lemma Pa'_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : · rw [Pa'_eq, Sum.elim_eq_iff] at h rw [h.left, h.right] · apply ACCSystemLinear.LinSols.ext - rw [Pa'_Psymm'_Pshift', Pa'_Psymm'_Pshift'] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, Psymm'_val, Pshift'_val] + rw [Pa'_P'_P!', Pa'_P'_P!'] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val] exact h lemma Pa_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : @@ -297,21 +1007,21 @@ noncomputable def basisaAsBasis : /-! -## F. Every linear solution is the sum of a point from each plane +## F. Every Lienar solution is the sum of a point from each plane -/ lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) : - ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = Psymm g + Pshift f := by + ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = P g + P! f := by have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisaAsBasis S) obtain ⟨f, hf⟩ := h simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, Fintype.sum_sum_type] at hf - change Psymm' _ + Pshift' _ = S at hf + change P' _ + P!' _ = S at hf use f ∘ Sum.inl use f ∘ Sum.inr rw [← hf] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, Psymm'_val, Pshift'_val] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val] rfl /-! @@ -319,26 +1029,26 @@ lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) : ### F.1. Relation under permutations -/ -lemma span_basis_swapShift {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) +lemma span_basis_swap! {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) (hS : ((FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') (g : Fin n.succ → ℚ) (f : Fin n → ℚ) - (h : S.val = Psymm g + Pshift f) : ∃ (g' : Fin n.succ → ℚ) (f' : Fin n → ℚ), - S'.val = Psymm g' + Pshift f' ∧ Pshift f' = Pshift f + - (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by - let X := Pshift f + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j - have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by + (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 (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j ∧ g' = g := by + let X := P! f + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j + have hX : X ∈ Submodule.span ℚ (Set.range (basis!AsCharges)) := by apply Submodule.add_mem - exact (Pshift_in_span f) - exact (smul_shiftBasisAsCharges_in_span S j) + exact (P!_in_span f) + exact (smul_basis!AsCharges_in_span S j) have hXsum := (Submodule.mem_span_range_iff_exists_fun ℚ).mp hX obtain ⟨f', hf'⟩ := hXsum use g use f' - change Pshift f' = _ at hf' + change P! f' = _ at hf' erw [hf'] simp only [and_self, and_true, X] rw [← add_assoc, ← h] - apply swapShift_as_add at hS + apply swap!_as_add at hS exact hS end VectorLikeEvenPlane diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean index 5276fab88..866722a18 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean @@ -5,25 +5,50 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ChargeSplits +public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.VectorLike /-! -# The symmetric plane for the even case basis +# The symmetric plane for the even case -The symmetric plane is the span of basis vectors `symmBasis`, each of which has charge `+1` at -position `evenFst j` and charge `-1` at position `evenSnd j`. It is called "symmetric" because -these positions come from the **symmetric (even) split** of the `2 * n.succ` charge indices into -`n.succ + n.succ` (see `ChargeSplits`). +## i. Overview -## Key results +This module defines the *symmetric plane* for the even case of anomaly cancellation +in `PureU1 (2 * n.succ)`. It is called "symmetric" because these positions come from +the symmetric (even) split `n.succ + n.succ`, where the first and second halves are +paired symmetrically. -- `symmBasisAsCharges` : The basis vectors as charge assignments. +## ii. Key definitions and results + +- `symmBasisAsCharges` : The basis vectors of the symmetric plane as charges. - `symmBasis` : The basis vectors as `LinSols`. -- `Psymm` : The inclusion of the symmetric plane into charges. -- `Psymm_accCube` : Charges from the symmetric plane satisfy the cubic ACC. -- `Psymm'` : The inclusion of the symmetric plane into linear solutions. -- `vectorLikeEven_in_span` : Every vector-like even solution is in the span of the symmetric - plane. +- `symmPlane` : A point in the span of the symmetric basis as a charge, + i.e., the inclusion of the symmetric plane into charges. +- `symmPlaneLinSols` : The inclusion of the symmetric plane into linear solutions. +- `symmPlane_accCube` : Charges from the symmetric plane satisfy the cubic ACC. +- `symmBasis_linear_independent` : The symmetric basis vectors are linearly independent. +- `vectorLikeEven_in_span` : Every vector-like even solution is in the span of the symmetric basis. + +## iii. Table of contents + +- A.1. The even split: Splitting the charges up via `n.succ + n.succ` +- B. The first plane (symmetric plane) + - B.1. The basis vectors of the symmetric plane as charges + - B.2. Components of the basis vectors + - B.3. The basis vectors satisfy the linear ACCs + - B.4. The basis vectors satisfy the cubic ACC + - B.5. The basis vectors as linear solutions + - B.6. The inclusion of the symmetric plane into charges + - B.7. Components of the inclusion into charges + - B.8. The inclusion into charges satisfies the linear and cubic ACCs + - B.9. Kernel of the inclusion into charges + - B.10. The inclusion of the plane into linear solutions + - B.11. The basis vectors are linearly independent + - B.12. Every vector-like even solution is in the span of the basis of the symmetric plane + +## iv. References + +- https://arxiv.org/pdf/1912.04804.pdf -/ @@ -39,7 +64,50 @@ namespace VectorLikeEvenPlane /-! -## B. The symmetric plane +### A.1. The even split: Spltting the charges up via `n.succ + n.succ` + +-/ + +/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the first `n.succ`, + casted into `Fin (2 * n.succ)`. -/ +def evenFst (j : Fin n.succ) : Fin (2 * n.succ) := + Fin.cast (split_equal n.succ) (Fin.castAdd n.succ j) + +/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the second `n.succ`, + casted into `Fin (2 * n.succ)`. -/ +def evenSnd (j : Fin n.succ) : Fin (2 * n.succ) := + Fin.cast (split_equal n.succ) (Fin.natAdd n.succ j) + +lemma ext_even (S T : Fin (2 * n.succ) → ℚ) (h1 : ∀ i, S (evenFst i) = T (evenFst i)) + (h2 : ∀ i, S (evenSnd i) = T (evenSnd i)) : S = T := by + funext i + by_cases hi : i.val < n.succ + · let j : Fin n.succ := ⟨i, hi⟩ + have h2 := h1 j + have h3 : evenFst 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 : evenSnd j = i := by + simp only [succ_eq_add_one, evenSnd, Fin.ext_iff, Fin.val_cast, Fin.val_natAdd, j] + omega + rw [h3] at h2 + exact h2 + +lemma sum_even (S : Fin (2 * n.succ) → ℚ) : + ∑ i, S i = ∑ i : Fin n.succ, ((S ∘ evenFst) i + (S ∘ evenSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (n.succ + n.succ), S (Fin.cast (split_equal n.succ) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (split_equal n.succ)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _=> rfl + rw [h1, Fin.sum_univ_add, Finset.sum_add_distrib] + rfl + +/-! + +## B. The first plane (symmetric plane) -/ @@ -66,10 +134,11 @@ def symmBasisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).Charges := -/ -lemma symmBasis_on_evenFst_self (j : Fin n.succ) : symmBasisAsCharges j (evenFst j) = 1 := by +lemma symmBasisAsCharges_on_evenFst_self (j : Fin n.succ) : + symmBasisAsCharges j (evenFst j) = 1 := by simp [symmBasisAsCharges] -lemma symmBasis_on_evenFst_other {k j : Fin n.succ} (h : k ≠ j) : +lemma symmBasisAsCharges_on_evenFst_other {k j : Fin n.succ} (h : k ≠ j) : symmBasisAsCharges k (evenFst j) = 0 := by simp only [symmBasisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenFst, evenSnd] split @@ -87,12 +156,12 @@ lemma symmBasis_on_evenFst_other {k j : Fin n.succ} (h : k ≠ j) : omega · rfl -lemma symmBasis_on_other {k : Fin n.succ} {j : Fin (2 * n.succ)} (h1 : j ≠ evenFst k) +lemma symmBasisAsCharges_on_other {k : Fin n.succ} {j : Fin (2 * n.succ)} (h1 : j ≠ evenFst k) (h2 : j ≠ evenSnd k) : symmBasisAsCharges k j = 0 := by simp only [symmBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] simp_all only [ne_eq, ↓reduceIte] -lemma symmBasis_evenSnd_eq_neg_evenFst (j i : Fin n.succ) : +lemma symmBasisAsCharges_evenSnd_eq_neg_evenFst (j i : Fin n.succ) : symmBasisAsCharges j (evenSnd i) = - symmBasisAsCharges j (evenFst i) := by simp only [symmBasisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenSnd, evenFst] split <;> split @@ -110,11 +179,13 @@ lemma symmBasis_evenSnd_eq_neg_evenFst (j i : Fin n.succ) : simp_all all_goals omega -lemma symmBasis_on_evenSnd_self (j : Fin n.succ) : symmBasisAsCharges j (evenSnd j) = - 1 := by - rw [symmBasis_evenSnd_eq_neg_evenFst, symmBasis_on_evenFst_self] +lemma symmBasisAsCharges_on_evenSnd_self (j : Fin n.succ) : + symmBasisAsCharges j (evenSnd j) = - 1 := by + rw [symmBasisAsCharges_evenSnd_eq_neg_evenFst, symmBasisAsCharges_on_evenFst_self] -lemma symmBasis_on_evenSnd_other {k j : Fin n.succ} (h : k ≠ j) : symmBasisAsCharges k (evenSnd j) = 0 := by - rw [symmBasis_evenSnd_eq_neg_evenFst, symmBasis_on_evenFst_other h] +lemma symmBasisAsCharges_on_evenSnd_other {k j : Fin n.succ} (h : k ≠ j) : + symmBasisAsCharges k (evenSnd j) = 0 := by + rw [symmBasisAsCharges_evenSnd_eq_neg_evenFst, symmBasisAsCharges_on_evenFst_other h] rfl /-! @@ -123,22 +194,23 @@ lemma symmBasis_on_evenSnd_other {k j : Fin n.succ} (h : k ≠ j) : symmBasisAsC -/ -lemma symmBasis_linearACC (j : Fin n.succ) : (accGrav (2 * n.succ)) (symmBasisAsCharges j) = 0 := by +lemma symmBasisAsCharges_linearACC (j : Fin n.succ) : + (accGrav (2 * n.succ)) (symmBasisAsCharges j) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] rw [sum_even] - simp [symmBasis_evenSnd_eq_neg_evenFst] + simp [symmBasisAsCharges_evenSnd_eq_neg_evenFst] /-! ### B.4. The basis vectors satisfy the cubic ACC -/ -lemma symmBasis_accCube (j : Fin n.succ) : +lemma symmBasisAsCharges_accCube (j : Fin n.succ) : accCube (2 * n.succ) (symmBasisAsCharges j) = 0 := by rw [accCube_explicit, sum_even] apply Finset.sum_eq_zero intro i _ - simp only [succ_eq_add_one, Function.comp_apply, symmBasis_evenSnd_eq_neg_evenFst] + simp only [succ_eq_add_one, Function.comp_apply, symmBasisAsCharges_evenSnd_eq_neg_evenFst] ring /-! @@ -155,7 +227,7 @@ def symmBasis (j : Fin n.succ) : (PureU1 (2 * n.succ)).LinSols := simp only [succ_eq_add_one, PureU1_numberLinear] at i match i with | 0 => - exact symmBasis_linearACC j⟩ + exact symmBasisAsCharges_linearACC j⟩ /-! @@ -163,8 +235,9 @@ def symmBasis (j : Fin n.succ) : (PureU1 (2 * n.succ)).LinSols := -/ -/-- A point in the span of the symmetric plane basis as a charge. -/ -def Psymm (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • symmBasisAsCharges i +/-- A point in the span of the symmetric basis as a charge. -/ +def symmPlane (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).Charges := + ∑ i, f i • symmBasisAsCharges i /-! @@ -172,30 +245,33 @@ def Psymm (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i -/ -lemma Psymm_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : Psymm f (evenFst j) = f j := by - rw [Psymm, sum_of_charges] +lemma symmPlane_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : + symmPlane f (evenFst j) = f j := by + rw [symmPlane, sum_of_charges] simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] - · rw [symmBasis_on_evenFst_self] + · rw [symmBasisAsCharges_on_evenFst_self] exact Rat.mul_one (f j) · intro k _ hkj - rw [symmBasis_on_evenFst_other hkj] + rw [symmBasisAsCharges_on_evenFst_other hkj] exact Rat.mul_zero (f k) · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] -lemma Psymm_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : Psymm f (evenSnd j) = - f j := by - rw [Psymm, sum_of_charges] +lemma symmPlane_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : + symmPlane f (evenSnd j) = - f j := by + rw [symmPlane, sum_of_charges] simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] - · simp only [symmBasis_on_evenSnd_self, mul_neg, mul_one] + · simp only [symmBasisAsCharges_on_evenSnd_self, mul_neg, mul_one] · intro k _ hkj - simp only [symmBasis_on_evenSnd_other hkj, mul_zero] + simp only [symmBasisAsCharges_on_evenSnd_other hkj, mul_zero] · simp -lemma Psymm_evenSnd_evenFst (f : Fin n.succ → ℚ) : Psymm f ∘ evenSnd = - Psymm f ∘ evenFst := by +lemma symmPlane_evenSnd_evenFst (f : Fin n.succ → ℚ) : + symmPlane f ∘ evenSnd = - symmPlane f ∘ evenFst := by funext j simp only [PureU1_numberCharges, Function.comp_apply, Pi.neg_apply] - rw [Psymm_evenFst, Psymm_evenSnd] + rw [symmPlane_evenFst, symmPlane_evenSnd] /-! @@ -203,17 +279,19 @@ lemma Psymm_evenSnd_evenFst (f : Fin n.succ → ℚ) : Psymm f ∘ evenSnd = - P -/ -lemma Psymm_linearACC (f : Fin n.succ → ℚ) : (accGrav (2 * n.succ)) (Psymm f) = 0 := by +lemma symmPlane_linearACC (f : Fin n.succ → ℚ) : + (accGrav (2 * n.succ)) (symmPlane f) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] rw [sum_even] - simp [Psymm_evenSnd, Psymm_evenFst] + simp [symmPlane_evenSnd, symmPlane_evenFst] -lemma Psymm_accCube (f : Fin n.succ → ℚ) : accCube (2 * n.succ) (Psymm f) = 0 := by +lemma symmPlane_accCube (f : Fin n.succ → ℚ) : + accCube (2 * n.succ) (symmPlane f) = 0 := by rw [accCube_explicit, sum_even] apply Finset.sum_eq_zero intro i _ - simp only [succ_eq_add_one, Function.comp_apply, Psymm_evenFst, Psymm_evenSnd] + simp only [succ_eq_add_one, Function.comp_apply, symmPlane_evenFst, symmPlane_evenSnd] ring /-! @@ -222,9 +300,9 @@ lemma Psymm_accCube (f : Fin n.succ → ℚ) : accCube (2 * n.succ) (Psymm f) = -/ -lemma Psymm_zero (f : Fin n.succ → ℚ) (h : Psymm f = 0) : ∀ i, f i = 0 := by +lemma symmPlane_zero (f : Fin n.succ → ℚ) (h : symmPlane f = 0) : ∀ i, f i = 0 := by intro i - erw [← Psymm_evenFst f] + erw [← symmPlane_evenFst f] rw [h] rfl @@ -234,11 +312,13 @@ lemma Psymm_zero (f : Fin n.succ → ℚ) (h : Psymm f = 0) : ∀ i, f i = 0 := -/ -/-- A point in the span of the symmetric plane basis. -/ -def Psymm' (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • symmBasis i +/-- A point in the span of the symmetric basis as a linear solution. -/ +def symmPlaneLinSols (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).LinSols := + ∑ i, f i • symmBasis i -lemma Psymm'_val (f : Fin n.succ → ℚ) : (Psymm' f).val = Psymm f := by - simp only [succ_eq_add_one, Psymm', Psymm] +lemma symmPlaneLinSols_val (f : Fin n.succ → ℚ) : + (symmPlaneLinSols f).val = symmPlane f := by + simp only [succ_eq_add_one, symmPlaneLinSols, symmPlane] funext i rw [sum_of_anomaly_free_linear, sum_of_charges] rfl @@ -252,13 +332,13 @@ lemma Psymm'_val (f : Fin n.succ → ℚ) : (Psymm' f).val = Psymm f := by theorem symmBasis_linear_independent : LinearIndependent ℚ (@symmBasis n) := by apply Fintype.linearIndependent_iff.mpr intro f h - change Psymm' f = 0 at h - have h1 : (Psymm' f).val = 0 := + change symmPlaneLinSols f = 0 at h + have h1 : (symmPlaneLinSols 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 - rw [Psymm'_val] at h1 - exact Psymm_zero f h1 + rw [symmPlaneLinSols_val] at h1 + exact symmPlane_zero f h1 /-! @@ -268,7 +348,8 @@ theorem symmBasis_linear_independent : LinearIndependent ℚ (@symmBasis n) := b lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols) (hS : VectorLikeEven S.val) : ∃ (M : (FamilyPermutations (2 * n.succ)).group), - (FamilyPermutations (2 * n.succ)).linSolRep M S ∈ Submodule.span ℚ (Set.range symmBasis) := by + (FamilyPermutations (2 * n.succ)).linSolRep M S ∈ + Submodule.span ℚ (Set.range symmBasis) := by use (Tuple.sort S.val).symm change sortAFL S ∈ Submodule.span ℚ (Set.range symmBasis) rw [Submodule.mem_span_range_iff_exists_fun ℚ] @@ -276,13 +357,13 @@ lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols) use f apply ACCSystemLinear.LinSols.ext rw [sortAFL_val] - erw [Psymm'_val] + erw [symmPlaneLinSols_val] apply ext_even · intro i - rw [Psymm_evenFst] + rw [symmPlane_evenFst] rfl · intro i - rw [Psymm_evenSnd] + rw [symmPlane_evenSnd] have ht := hS i change sort S.val (evenFst i) = - sort S.val (evenSnd i) at ht have h : sort S.val (evenSnd i) = - sort S.val (evenFst i) := by diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean index 7eba93a2b..337937d6f 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean @@ -16,7 +16,7 @@ if the line through that point and through the two different planes formed by th `LinSols` lies in the cubic. We show that for a solution all its permutations satisfy this property, then there exists -a permutation for which it lies in the plane spanned by the symmetric part of the basis. +a permutation for which it lies in the plane spanned by the first part of the basis. The main reference for this file is: @@ -37,39 +37,39 @@ open VectorLikeEvenPlane in the basis through that point is in the cubic. -/ 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 • Psymm g + b • Pshift f) = 0 + accCube (2 * n.succ) (a • P g + b • P! f) = 0 set_option backward.isDefEq.respectTransparency false in 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 (Psymm g) (Psymm g) (Pshift f) - + b * accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g)) = 0 := by + 3 * a * b * (a * accCubeTriLinSymm (P g) (P g) (P! f) + + b * accCubeTriLinSymm (P! f) (P! f) (P g)) = 0 := by intro g f hS a b have h1 := h g f hS a b - change accCubeTriLinSymm.toCubic (a • Psymm g + b • Pshift f) = 0 at h1 + change accCubeTriLinSymm.toCubic (a • P g + b • P! f) = 0 at h1 simp only [TriLinearSymm.toCubic_add] at h1 simp only [HomogeneousCubic.map_smul, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] at h1 conv_lhs at h1 => enter [1, 1, 1, 2] change accCube _ _ - rw [Psymm_accCube] + rw [P_accCube] conv_lhs at h1 => enter [1, 1, 2, 2] change accCube _ _ - rw [Pshift_accCube] + rw [P!_accCube] rw [← h1] ring /-- This lemma states that for a given `S` of type `(PureU1 (2 * n.succ)).AnomalyFreeLinear` and a proof `h` that the line through `S` lies on a cubic curve, -for any functions `g : Fin n.succ → ℚ` and `f : Fin n → ℚ`, if `S.val = Psymm g + Pshift f`, -then `accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0`. +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_Psymm_Psymm_Pshift {S : (PureU1 (2 * n.succ)).LinSols} (h : LineInCubic S) : - ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = Psymm g + Pshift f), - accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0 := by +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 linear_combination 2 / 3 * (lineInCubic_expand h g f hS 1 1) - (lineInCubic_expand h g f hS 1 2) / 6 @@ -100,28 +100,28 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ)).LinSols} (LIC : LineInCubicPerm S) : ∀ (j : Fin n) (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = Pa g f), (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) - * accCubeTriLinSymm (Psymm g) (Psymm g) (shiftBasisAsCharges j) = 0 := by + * accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) = 0 := by intro j g f h let S' := (FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j)) S have hSS' : ((FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S' := rfl - obtain ⟨g', f', hall⟩ := span_basis_swapShift j hSS' g f h - have h1 := line_in_cubic_Psymm_Psymm_Pshift (lineInCubicPerm_self LIC) g f h - have h2 := line_in_cubic_Psymm_Psymm_Pshift + obtain ⟨g', f', hall⟩ := span_basis_swap! j hSS' g f h + have h1 := line_in_cubic_P_P_P! (lineInCubicPerm_self LIC) g f h + have h2 := line_in_cubic_P_P_P! (lineInCubicPerm_self (lineInCubicPerm_permute LIC (Equiv.swap (evenShiftFst j) (evenShiftSnd j)))) g' f' hall.1 rw [hall.2.1, hall.2.2] at h2 rw [accCubeTriLinSymm.map_add₃, h1, accCubeTriLinSymm.map_smul₃] at h2 simpa using h2 -lemma Psymm_Psymm_shiftBasis_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 (Psymm f) (Psymm f) (shiftBasisAsCharges (Fin.last n)) = + accCubeTriLinSymm (P f) (P f) (basis!AsCharges (Fin.last n)) = - (S.val (evenShiftSnd (Fin.last n)) + S.val (evenShiftFst (Fin.last n))) * (2 * S.val evenShiftLast + S.val (evenShiftSnd (Fin.last n)) + S.val (evenShiftFst (Fin.last n))) := by - rw [Psymm_Psymm_shiftBasis_accCube f (Fin.last n)] + rw [P_P_P!_accCube f (Fin.last n)] have h1 := Pa_evenShiftLast f g have h2 := Pa_evenShiftFst f g (Fin.last n) have h3 := Pa_evenShiftSnd f g (Fin.last n) @@ -146,7 +146,7 @@ lemma lineInCubicPerm_last_cond {S : (PureU1 (2 * n.succ.succ)).LinSols} (S.val evenShiftLast))) := by obtain ⟨g, f, hfg⟩ := span_basis S have h1 := lineInCubicPerm_swap LIC (Fin.last n) g f hfg - rw [Psymm_Psymm_shiftBasis_accCube' g f hfg] at h1 + rw [P_P_P!_accCube' g f hfg] at h1 simp only [Nat.succ_eq_add_one, neg_add_rev, mul_eq_zero] at h1 cases h1 <;> rename_i h1 · left @@ -180,7 +180,7 @@ theorem lineInCubicPerm_vectorLike {S : (PureU1 (2 * n.succ.succ)).Sols} theorem lineInCubicPerm_in_plane (S : (PureU1 (2 * n.succ.succ)).Sols) (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 symmBasis) := + ∈ Submodule.span ℚ (Set.range basis) := vectorLikeEven_in_span S.1.1 (lineInCubicPerm_vectorLike LIC) end Even diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean index 605e20d28..7257d0bb6 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean @@ -5,8 +5,8 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.SymmPlane -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ShiftPlane +public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.VectorLike /-! # Splitting the linear solutions in the odd case into two ACC-satisfying planes @@ -16,22 +16,43 @@ We split the linear solutions of `PureU1 (2 * n + 1)` into two planes, where every point in either plane satisfies both the linear and cubic anomaly cancellation conditions. -The two planes are named after the charge-index splitting they are built from: -- The **symmetric plane** (`SymmPlane`): basis vectors pair charges at positions from the - symmetric split `(n + 1) + n`. -- The **shifted plane** (`ShiftPlane`): basis vectors pair charges at positions from the - shifted split `1 + n + n`. - ## ii. Key results -- `Psymm'` : The inclusion of the symmetric plane into linear solutions. -- `Psymm_accCube` : The statement that charges from the symmetric plane satisfy the cubic ACC. -- `Pshift'` : The inclusion of the shifted plane into linear solutions. -- `Pshift_accCube` : The statement that charges from the shifted plane satisfy the cubic ACC. +- `P'` : The inclusion of the first plane into linear solutions +- `P_accCube` : The statement that chares from the first plane satisfy the cubic ACC +- `P!'` : The inclusion of the second plane. +- `P!_accCube` : The statement that charges from the second plane satisfy the cubic ACC - `span_basis` : Every linear solution is the sum of a point from each plane. ## iii. Table of contents +- A. Splitting the charges up into groups + - A.1. The symmetric split: Spltting the charges up via `(n + 1) + 1` + - A.2. The shifted split: Spltting the charges up via `1 + n + n` + - A.3. The shifte shifted split: Spltting the charges up via `((1+n)+1) + n.succ` + - A.4. Relating the splittings together +- B. The first plane + - B.1. The basis vectors of the first plane as charges + - B.2. Components of the basis vectors as charges + - B.3. The basis vectors satisfy the linear ACCs + - B.4. The basis vectors as `LinSols` + - B.5. The inclusion of the first plane into charges + - B.6. Components of the first plane + - B.7. Points on the first plane satisfies the ACCs + - B.8. Kernel of the inclusion into charges + - B.9. The basis vectors are linearly independent +- C. The second plane + - C.1. The basis vectors of the second plane as charges + - C.2. Components of the basis vectors as charges + - C.3. The basis vectors satisfy the linear ACCs + - C.4. The basis vectors as `LinSols` + - C.5. Permutations equal adding basis vectors + - C.6. The inclusion of the second plane into charges + - C.7. Components of the second plane + - C.8. Points on the second plane satisfies the ACCs + - C.9. Kernel of the inclusion into charges + - C.10. The inclusion of the second plane into LinSols + - C.11. The basis vectors are linearly independent - D. The mixed cubic ACC from points in both planes - E. The combined basis - E.1. The combined basis as `LinSols` @@ -43,7 +64,7 @@ The two planes are named after the charge-index splitting they are built from: - E.7. Injectivity of the inclusion into linear solutions - E.8. Cardinality of the basis - E.9. The basis vectors as a basis -- F. Every linear solution is the sum of a point from each plane +- F. Every Lienar solution is the sum of a point from each plane - F.1. Relation under permutations ## iv. References @@ -64,22 +85,684 @@ namespace VectorLikeOddPlane /-! +## A. Splitting the charges up into groups + +We have `2 * n + 1` charges, which we split up in the following ways: + +`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` + +``` +| evenShiftZero (0) | evenShiftFst j (1 to n) | + evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | +``` + +-/ + +section theDeltas + +/-! + +### A.1. The symmetric split: Spltting the charges up via `(n + 1) + 1` + +-/ + +lemma odd_shift_eq (n : ℕ) : (1 + n) + n = 2 * n +1 := by + omega + +/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the first `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddFst (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.castAdd n (Fin.castAdd 1 j)) + +/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the second `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddSnd (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.natAdd (n+1) j) + +/-- The element representing `1` in `Fin ((n + 1) + n)`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddMid : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.castAdd n (Fin.natAdd n 1)) + +lemma sum_odd (S : Fin (2 * n + 1) → ℚ) : + ∑ i, S i = S oddMid + ∑ i : Fin n, ((S ∘ oddFst) i + (S ∘ oddSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (n + 1 + n), S (Fin.cast (split_odd n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (split_odd n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1] + rw [Fin.sum_univ_add, Fin.sum_univ_add] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + nth_rewrite 2 [add_comm] + rw [add_assoc] + rw [Finset.sum_add_distrib] + rfl + +/-! + +### A.2. The shifted split: Spltting the charges up via `1 + n + n` + +-/ + +/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the first `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftFst (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.natAdd 1 j)) + +/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the second `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftSnd (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.natAdd (1 + n) j) + +/-- The element representing the `1` in `Fin (1 + n + n)`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftZero : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.castAdd n 1)) + +lemma sum_oddShift (S : Fin (2 * n + 1) → ℚ) : + ∑ i, S i = S oddShiftZero + ∑ i : Fin n, ((S ∘ oddShiftFst) i + (S ∘ oddShiftSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin ((1+n)+n), S (Fin.cast (odd_shift_eq n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (odd_shift_eq n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1, Fin.sum_univ_add, Fin.sum_univ_add] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + rw [add_assoc, Finset.sum_add_distrib] + rfl + +/-! + +### A.3. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` + +-/ + +lemma odd_shift_shift_eq (n : ℕ) : ((1+n)+1) + n.succ = 2 * n.succ + 1 := by + omega + +/-- The element representing the first `1` in `Fin (1 + n + 1 + n.succ)` casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftZero : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.castAdd n 1))) + +/-- The inclusion of `Fin n` into `Fin (1 + n + 1 + n.succ)` via the first `n` and casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftFst (j : Fin n) : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.natAdd 1 j))) + +/-- The element representing the second `1` in `Fin (1 + n + 1 + n.succ)` casted + to `2 * n.succ + 1`. -/ +def oddShiftShiftMid : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.natAdd (1+n) 1)) + +/-- The inclusion of `Fin n.succ` into `Fin (1 + n + 1 + n.succ)` via the `n.succ` and casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftSnd (j : Fin n.succ) : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.natAdd ((1+n)+1) j) + +/-! + +### A.4. Relating the splittings together + +-/ +lemma oddShiftShiftZero_eq_oddFst_zero : @oddShiftShiftZero n = oddFst 0 := + Fin.rev_inj.mp rfl + +lemma oddShiftShiftZero_eq_oddShiftZero : @oddShiftShiftZero n = oddShiftZero := rfl + +lemma oddShiftShiftFst_eq_oddFst_succ (j : Fin n) : + oddShiftShiftFst j = oddFst j.succ := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, + oddFst, Fin.val_succ] + exact Nat.add_comm 1 ↑j + +lemma oddShiftShiftFst_eq_oddShiftFst_castSucc (j : Fin n) : + oddShiftShiftFst j = oddShiftFst j.castSucc := by + rfl + +lemma oddShiftShiftMid_eq_oddMid : @oddShiftShiftMid n = oddMid := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, + Fin.val_natAdd, Fin.val_eq_zero, add_zero, oddMid] + exact Nat.add_comm 1 n + +lemma oddShiftShiftMid_eq_oddShiftFst_last : oddShiftShiftMid = oddShiftFst (Fin.last n) := by + rfl + +lemma oddShiftShiftSnd_eq_oddSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddSnd j := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] + exact Nat.add_comm 1 n + +lemma oddShiftShiftSnd_eq_oddShiftSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddShiftSnd j := by + rw [Fin.ext_iff] + rfl + +lemma oddSnd_eq_oddShiftSnd (j : Fin n) : oddSnd j = oddShiftSnd j := by + rw [Fin.ext_iff] + simp only [oddSnd, Fin.val_cast, Fin.val_natAdd, oddShiftSnd, add_left_inj] + exact Nat.add_comm n 1 + +lemma oddShiftZero_eq_oddFst : oddShiftZero = oddFst (0 : Fin n.succ) := by + ext + simp [oddShiftZero, oddFst] + +lemma oddShiftFst_castSucc_eq_oddFst_succ (j : Fin n) : + oddShiftFst j.castSucc = oddFst j.succ := by + rw [Fin.ext_iff] + simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddFst, Fin.val_succ] + exact Nat.add_comm 1 ↑j + +lemma oddShiftFst_last_eq_oddMid : oddShiftFst (Fin.last n) = oddMid := by + rw [Fin.ext_iff] + simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddMid, Fin.val_last] + exact Nat.add_comm 1 n + +lemma oddShiftSnd_eq_oddSnd (j : Fin n) : oddShiftSnd j = oddSnd j := by + rw [Fin.ext_iff] + simp only [oddShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] + ring + +end theDeltas + +/-! + +## B. The first plane + +-/ + +/-! + +### B.1. The basis vectors of the first plane as charges + +-/ + +/-- The first part of the basis as charge assignments. -/ +def basisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := + fun i => + if i = oddFst j then + 1 + else + if i = oddSnd j then + - 1 + else + 0 + +/-! + +### B.2. Components of the basis vectors as charges + +-/ + +lemma basis_on_oddFst_self (j : Fin n) : basisAsCharges j (oddFst j) = 1 := by + simp [basisAsCharges] + +lemma basis_on_oddFst_other {k j : Fin n} (h : k ≠ j) : + basisAsCharges k (oddFst j) = 0 := by + simp only [basisAsCharges, PureU1_numberCharges] + simp only [oddFst, oddSnd] + 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 + simp only [Fin.val_castAdd, Fin.val_natAdd] at h2 + omega + · rfl + +lemma basis_on_other {k : Fin n} {j : Fin (2 * n + 1)} (h1 : j ≠ oddFst k) (h2 : j ≠ oddSnd k) : + basisAsCharges k j = 0 := by + simp only [basisAsCharges, PureU1_numberCharges] + simp_all only [ne_eq, ↓reduceIte] + +lemma basis_oddSnd_eq_minus_oddFst (j i : Fin n) : + basisAsCharges j (oddSnd i) = - basisAsCharges j (oddFst i) := by + simp only [basisAsCharges, PureU1_numberCharges, oddSnd, oddFst] + split <;> split + any_goals split + any_goals split + any_goals rfl + all_goals + rename_i h1 h2 + rw [Fin.ext_iff] at h1 h2 + simp_all only [Fin.cast_inj, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, neg_neg, + add_eq_right, AddLeftCancelMonoid.add_eq_zero, one_ne_zero, and_false, not_false_eq_true] + all_goals + rename_i h3 + rw [Fin.ext_iff] at h3 + simp_all only [Fin.val_natAdd, Fin.val_castAdd, add_eq_right, + AddLeftCancelMonoid.add_eq_zero, one_ne_zero, and_false, not_false_eq_true] + all_goals + omega + +lemma basis_on_oddSnd_self (j : Fin n) : basisAsCharges j (oddSnd j) = - 1 := by + rw [basis_oddSnd_eq_minus_oddFst, basis_on_oddFst_self] + +lemma basis_on_oddSnd_other {k j : Fin n} (h : k ≠ j) : basisAsCharges k (oddSnd j) = 0 := by + rw [basis_oddSnd_eq_minus_oddFst, basis_on_oddFst_other h] + rfl + +lemma basis_on_oddMid (j : Fin n) : basisAsCharges j oddMid = 0 := by + simp only [basisAsCharges, PureU1_numberCharges] + split <;> rename_i h + · rw [Fin.ext_iff] at h + simp only [oddMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, Fin.val_eq_zero, + add_zero, oddFst] at h + omega + · split <;> rename_i h2 + · rw [Fin.ext_iff] at h2 + simp only [oddMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, oddSnd] at h2 + omega + · rfl + +/-! + +### B.3. The basis vectors satisfy the linear ACCs + +-/ + +lemma basis_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (basisAsCharges j) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + erw [sum_odd] + simp [basis_oddSnd_eq_minus_oddFst, basis_on_oddMid] + +/-! + +### B.4. The basis vectors as `LinSols` + +-/ + +/-- The first part of the basis as `LinSols`. -/ +@[simps!] +def basis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := + ⟨basisAsCharges j, by + intro i + simp only [PureU1_numberLinear] at i + match i with + | 0 => + exact basis_linearACC j⟩ + +/-! + +### B.5. The inclusion of the first plane into charges + +-/ + +/-- A point in the span of the first part of the basis as a charge. -/ +def P (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • basisAsCharges i + +/-! + +### B.6. Components of the first plane + +-/ + +lemma P_oddFst (f : Fin n → ℚ) (j : Fin n) : P f (oddFst j) = f j := by + rw [P, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [basis_on_oddFst_self] + exact Rat.mul_one (f j) + · intro k _ hkj + rw [basis_on_oddFst_other hkj] + exact Rat.mul_zero (f k) + · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] + +lemma P_oddSnd (f : Fin n → ℚ) (j : Fin n) : P f (oddSnd j) = - f j := by + rw [P, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [basis_on_oddSnd_self] + exact mul_neg_one (f j) + · intro k _ hkj + rw [basis_on_oddSnd_other hkj] + exact Rat.mul_zero (f k) + · simp + +lemma P_oddMid (f : Fin n → ℚ) : P f oddMid = 0 := by + rw [P, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, basis_on_oddMid] + +/-! + +### B.7. Points on the first plane satisfies the ACCs + +-/ + +lemma P_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (P f) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_odd] + simp [P_oddSnd, P_oddFst, P_oddMid] + +set_option backward.isDefEq.respectTransparency false in +lemma P_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (P f) = 0 := by + rw [accCube_explicit, sum_odd, P_oddMid] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] + apply Finset.sum_eq_zero + intro i _ + simp only [P_oddFst, P_oddSnd] + ring + +/-! + +### B.8. Kernel of the inclusion into charges + +-/ + +lemma P_zero (f : Fin n → ℚ) (h : P f = 0) : ∀ i, f i = 0 := by + intro i + erw [← P_oddFst f] + rw [h] + rfl + +/-- A point in the span of the first part of the basis. -/ +def P' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basis i + +lemma P'_val (f : Fin n → ℚ) : (P' f).val = P f := by + simp only [P', P] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + +/-! + +### B.9. The basis vectors are linearly independent + +-/ + +theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change P' f = 0 at h + 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 + rw [P'_val] at h1 + exact P_zero f h1 + +/-! + +## C. The second plane + +-/ + +/-! + +### C.1. The basis vectors of the second plane as charges + +-/ + +/-- The second part of the basis as charge assignments. -/ +def basis!AsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := + fun i => + if i = oddShiftFst j then + 1 + else + if i = oddShiftSnd j then + - 1 + else + 0 + +/-! + +### C.2. Components of the basis vectors as charges + +-/ + +lemma basis!_on_oddShiftFst_self (j : Fin n) : basis!AsCharges j (oddShiftFst j) = 1 := by + simp [basis!AsCharges] + +lemma basis!_on_oddShiftFst_other {k j : Fin n} (h : k ≠ j) : + basis!AsCharges k (oddShiftFst j) = 0 := by + simp only [basis!AsCharges, PureU1_numberCharges] + simp only [oddShiftFst, oddShiftSnd] + 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 + simp only [Fin.val_castAdd, Fin.val_natAdd] at h2 + omega + rfl + +lemma basis!_on_other {k : Fin n} {j : Fin (2 * n + 1)} + (h1 : j ≠ oddShiftFst k) (h2 : j ≠ oddShiftSnd k) : + basis!AsCharges k j = 0 := by + simp only [basis!AsCharges, PureU1_numberCharges] + simp_all only [ne_eq, ↓reduceIte] + +lemma basis!_oddShiftSnd_eq_minus_oddShiftFst (j i : Fin n) : + basis!AsCharges j (oddShiftSnd i) = - basis!AsCharges j (oddShiftFst i) := by + simp only [basis!AsCharges, PureU1_numberCharges, oddShiftSnd, oddShiftFst] + 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 + all_goals rename_i h3 + all_goals rw [Fin.ext_iff] at h3 + all_goals simp_all + all_goals omega + +lemma basis!_on_oddShiftSnd_self (j : Fin n) : basis!AsCharges j (oddShiftSnd j) = - 1 := by + rw [basis!_oddShiftSnd_eq_minus_oddShiftFst, basis!_on_oddShiftFst_self] + +lemma basis!_on_oddShiftSnd_other {k j : Fin n} (h : k ≠ j) : + basis!AsCharges k (oddShiftSnd j) = 0 := by + rw [basis!_oddShiftSnd_eq_minus_oddShiftFst, basis!_on_oddShiftFst_other h] + rfl + +lemma basis!_on_oddShiftZero (j : Fin n) : basis!AsCharges j oddShiftZero = 0 := by + simp only [basis!AsCharges, PureU1_numberCharges] + split <;> rename_i h + · rw [Fin.ext_iff] at h + simp only [oddShiftZero, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, + oddShiftFst, Fin.val_natAdd] at h + omega + · split <;> rename_i h2 + · rw [Fin.ext_iff] at h2 + simp only [oddShiftZero, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, + oddShiftSnd, Fin.val_natAdd] at h2 + omega + · rfl + +/-! + +### C.3. The basis vectors satisfy the linear ACCs + +-/ + +lemma basis!_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (basis!AsCharges j) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_oddShift, basis!_on_oddShiftZero] + simp [basis!_oddShiftSnd_eq_minus_oddShiftFst] + +/-! + +### C.4. The basis vectors as `LinSols` + +-/ + +/-- The second part of the basis as `LinSols`. -/ +@[simps!] +def basis! (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := + ⟨basis!AsCharges j, by + intro i + simp only [PureU1_numberLinear] at i + match i with + | 0 => + exact basis!_linearACC j⟩ + +/-! + +### C.5. Permutations equal adding basis vectors + +-/ + +/-- Swapping the elements oddShiftFst j and oddShiftSnd j is equivalent to adding a vector + basis!AsCharges j. -/ +lemma swap!_as_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) + (hS : ((FamilyPermutations (2 * n + 1)).linSolRep + (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') : + S'.val = S.val + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j := by + funext i + rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] + by_cases hi : i = oddShiftFst j + · subst hi + simp [HSMul.hSMul, basis!_on_oddShiftFst_self, Equiv.swap_apply_left] + · by_cases hi2 : i = oddShiftSnd j + · subst hi2 + simp [HSMul.hSMul,basis!_on_oddShiftSnd_self, Equiv.swap_apply_right] + · simp only [Equiv.invFun_as_coe, HSMul.hSMul, ACCSystemCharges.chargesAddCommMonoid_add, + ACCSystemCharges.chargesModule_smul] + rw [basis!_on_other hi hi2] + aesop + +/-! + +### C.6. The inclusion of the second plane into charges + +-/ + +/-- A point in the span of the second part of the basis as a charge. -/ +def P! (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • basis!AsCharges i + +/-! + +### C.7. Components of the second plane + +-/ + +lemma P!_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : P! f (oddShiftFst j) = f j := by + rw [P!, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [basis!_on_oddShiftFst_self] + exact Rat.mul_one (f j) + · intro k _ hkj + rw [basis!_on_oddShiftFst_other hkj] + exact Rat.mul_zero (f k) + · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] + +lemma P!_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : P! f (oddShiftSnd j) = - f j := by + rw [P!, sum_of_charges] + simp only [HSMul.hSMul, SMul.smul] + rw [Finset.sum_eq_single j] + · rw [basis!_on_oddShiftSnd_self] + exact mul_neg_one (f j) + · intro k _ hkj + rw [basis!_on_oddShiftSnd_other hkj] + exact Rat.mul_zero (f k) + · simp + +lemma P!_oddShiftZero (f : Fin n → ℚ) : P! f oddShiftZero = 0 := by + rw [P!, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, basis!_on_oddShiftZero] + +/-! + +### C.8. Points on the second plane satisfies the ACCs + +-/ + +lemma P!_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (P! f) = 0 := by + rw [accGrav] + simp only [LinearMap.coe_mk, AddHom.coe_mk] + rw [sum_oddShift] + simp [P!_oddShiftSnd, P!_oddShiftFst, P!_oddShiftZero] + +set_option backward.isDefEq.respectTransparency false in +lemma P!_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (P! f) = 0 := by + rw [accCube_explicit, sum_oddShift, P!_oddShiftZero] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] + apply Finset.sum_eq_zero + intro i _ + simp only [P!_oddShiftFst, P!_oddShiftSnd] + ring + +/-! + +### C.9. Kernel of the inclusion into charges + +-/ + +lemma P!_zero (f : Fin n → ℚ) (h : P! f = 0) : ∀ i, f i = 0 := by + intro i + rw [← P!_oddShiftFst f] + rw [h] + rfl + +/-! + +### C.10. The inclusion of the second plane into LinSols + +-/ + +/-- A point in the span of the second part of the basis. -/ +def P!' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basis! i + +lemma P!'_val (f : Fin n → ℚ) : (P!' f).val = P! f := by + simp only [P!', P!] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + +/-! + +### C.11. The basis vectors are linearly independent + +-/ + +theorem basis!_linear_independent : LinearIndependent ℚ (@basis! n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change P!' f = 0 at h + 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 + rw [P!'_val] at h1 + exact P!_zero f h1 + +/-! + ## D. The mixed cubic ACC from points in both planes -/ set_option backward.isDefEq.respectTransparency false in -lemma Psymm_Psymm_shiftBasis_accCube (g : Fin n → ℚ) (j : Fin n) : - accCubeTriLinSymm (Psymm g) (Psymm g) (shiftBasisAsCharges j) - = (Psymm g (oddShiftFst j))^2 - (g j)^2 := by +lemma P_P_P!_accCube (g : Fin n → ℚ) (j : Fin n) : + accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) + = (P g (oddShiftFst j))^2 - (g j)^2 := by simp only [accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_oddShift, shiftBasis_on_oddShiftZero] + rw [sum_oddShift, basis!_on_oddShiftZero] simp only [mul_zero, Function.comp_apply, zero_add] - rw [Finset.sum_eq_single j, shiftBasis_on_oddShiftFst_self, shiftBasis_on_oddShiftSnd_self] - · rw [← oddSnd_eq_oddShiftSnd, Psymm_oddSnd] + rw [Finset.sum_eq_single j, basis!_on_oddShiftFst_self, basis!_on_oddShiftSnd_self] + · rw [← oddSnd_eq_oddShiftSnd, P_oddSnd] ring · intro k _ hkj - erw [shiftBasis_on_oddShiftFst_other hkj.symm, shiftBasis_on_oddShiftSnd_other hkj.symm] + erw [basis!_on_oddShiftFst_other hkj.symm, basis!_on_oddShiftSnd_other hkj.symm] simp only [mul_zero, add_zero] · simp @@ -98,8 +781,8 @@ lemma Psymm_Psymm_shiftBasis_accCube (g : Fin n → ℚ) (j : Fin n) : /-- The whole basis as `LinSols`. -/ def basisa : Fin n ⊕ Fin n → (PureU1 (2 * n + 1)).LinSols := fun i => match i with - | .inl i => symmBasis i - | .inr i => shiftBasis i + | .inl i => basis i + | .inr i => basis! i /-! @@ -108,7 +791,7 @@ def basisa : Fin n ⊕ Fin n → (PureU1 (2 * n + 1)).LinSols := fun i => -/ /-- A point in the span of the basis as a charge. -/ -def Pa (f : Fin n → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := Psymm f + Pshift g +def Pa (f : Fin n → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := P f + P! g /-! @@ -121,7 +804,7 @@ lemma Pa_oddShiftShiftZero (f g : Fin n.succ → ℚ) : Pa f g oddShiftShiftZero simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftZero_eq_oddFst_zero] rw [oddShiftShiftZero_eq_oddShiftZero] - rw [Pshift_oddShiftZero, oddShiftZero_eq_oddFst, Psymm_oddFst] + rw [P!_oddShiftZero, oddShiftZero_eq_oddFst, P_oddFst] exact Rat.add_zero (f 0) lemma Pa_oddShiftShiftFst (f g : Fin n.succ → ℚ) (j : Fin n) : @@ -130,14 +813,14 @@ lemma Pa_oddShiftShiftFst (f g : Fin n.succ → ℚ) (j : Fin n) : simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftFst_eq_oddFst_succ] rw [oddShiftShiftFst_eq_oddShiftFst_castSucc] - rw [Pshift_oddShiftFst, oddShiftFst_castSucc_eq_oddFst_succ, Psymm_oddFst] + rw [P!_oddShiftFst, oddShiftFst_castSucc_eq_oddFst_succ, P_oddFst] lemma Pa_oddShiftShiftMid (f g : Fin n.succ → ℚ) : Pa f g oddShiftShiftMid = g (Fin.last n) := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftMid_eq_oddMid] rw [oddShiftShiftMid_eq_oddShiftFst_last] - rw [Pshift_oddShiftFst, oddShiftFst_last_eq_oddMid, Psymm_oddMid] + rw [P!_oddShiftFst, oddShiftFst_last_eq_oddMid, P_oddMid] exact Rat.zero_add (g (Fin.last n)) lemma Pa_oddShiftShiftSnd (f g : Fin n.succ → ℚ) (j : Fin n.succ) : @@ -146,7 +829,7 @@ lemma Pa_oddShiftShiftSnd (f g : Fin n.succ → ℚ) (j : Fin n.succ) : simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftSnd_eq_oddSnd] rw [oddShiftShiftSnd_eq_oddShiftSnd] - rw [Pshift_oddShiftSnd, oddShiftSnd_eq_oddSnd, Psymm_oddSnd] + rw [P!_oddShiftSnd, oddShiftSnd_eq_oddSnd, P_oddSnd] ring /-! @@ -177,12 +860,12 @@ lemma Pa_zero (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : exact h2.symm exact hinduc i.val i.prop -lemma Pa_zero_shift (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : +lemma Pa_zero! (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : ∀ i, g i = 0 := by have hf := Pa_zero f g h - rw [Pa, Psymm] at h + rw [Pa, P] at h simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h - exact Pshift_zero g h + exact P!_zero g h /-! @@ -194,8 +877,8 @@ lemma Pa_zero_shift (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : def Pa' (f : (Fin n) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basisa i -lemma Pa'_Psymm'_Pshift' (f : (Fin n) ⊕ (Fin n) → ℚ) : - Pa' f = Psymm' (f ∘ Sum.inl) + Pshift' (f ∘ Sum.inr) := by +lemma Pa'_P'_P!' (f : (Fin n) ⊕ (Fin n) → ℚ) : + Pa' f = P' (f ∘ Sum.inl) + P!' (f ∘ Sum.inr) := by exact Fintype.sum_sum_type _ /-! @@ -212,12 +895,12 @@ theorem basisa_linear_independent : LinearIndependent ℚ (@basisa n.succ) := by (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 - rw [Pa'_Psymm'_Pshift'] at h1 - change (Psymm' (f ∘ Sum.inl)).val + (Pshift' (f ∘ Sum.inr)).val = 0 at h1 - rw [Pshift'_val, Psymm'_val] at h1 + 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_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 + have hg := Pa_zero! (f ∘ Sum.inl) (f ∘ Sum.inr) h1 intro i simp_all only [succ_eq_add_one, Function.comp_apply] cases i @@ -253,9 +936,8 @@ lemma Pa'_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : · rw [Pa'_eq, Sum.elim_eq_iff] at h rw [h.left, h.right] · apply ACCSystemLinear.LinSols.ext - rw [Pa'_Psymm'_Pshift', Pa'_Psymm'_Pshift'] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, Psymm'_val, - Pshift'_val] + rw [Pa'_P'_P!', Pa'_P'_P!'] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val] exact h lemma Pa_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : @@ -289,22 +971,21 @@ noncomputable def basisaAsBasis : /-! -## F. Every linear solution is the sum of a point from each plane +## F. Every Lienar solution is the sum of a point from each plane -/ lemma span_basis (S : (PureU1 (2 * n.succ + 1)).LinSols) : - ∃ (g f : Fin n.succ → ℚ), S.val = Psymm g + Pshift f := by + ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f := by have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisaAsBasis S) obtain ⟨f, hf⟩ := h simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, Fintype.sum_sum_type] at hf - change Psymm' _ + Pshift' _ = S at hf + change P' _ + P!' _ = S at hf use f ∘ Sum.inl use f ∘ Sum.inr rw [← hf] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, Psymm'_val, - Pshift'_val] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val] rfl /-! @@ -313,24 +994,24 @@ lemma span_basis (S : (PureU1 (2 * n.succ + 1)).LinSols) : -/ -lemma span_basis_swapShift {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) +lemma span_basis_swap! {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) (hS : ((FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') (g f : Fin n.succ → ℚ) - (hS1 : S.val = Psymm g + Pshift f) : ∃ (g' f' : Fin n.succ → ℚ), - S'.val = Psymm g' + Pshift f' ∧ Pshift f' = Pshift f + - (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by - let X := Pshift f + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j - have hf : Pshift f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by + (hS1 : S.val = P g + P! f) : ∃ (g' f' : Fin n.succ → ℚ), + S'.val = P g' + P! f' ∧ P! f' = P! f + + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j ∧ g' = g := by + let X := P! f + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j + have hf : P! f ∈ Submodule.span ℚ (Set.range basis!AsCharges) := by rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] use f rfl - have hP : (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∈ - Submodule.span ℚ (Set.range shiftBasisAsCharges) := by + have hP : (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j ∈ + Submodule.span ℚ (Set.range basis!AsCharges) := by apply Submodule.smul_mem apply SetLike.mem_of_subset apply Submodule.subset_span simp_all only [Set.mem_range, exists_apply_eq_apply] - have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by + have hX : X ∈ Submodule.span ℚ (Set.range (basis!AsCharges)) := by apply Submodule.add_mem exact hf exact hP @@ -338,11 +1019,11 @@ lemma span_basis_swapShift {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.su obtain ⟨f', hf'⟩ := hXsum use g use f' - change Pshift f' = _ at hf' + change P! f' = _ at hf' erw [hf'] simp only [and_self, and_true, X] rw [← add_assoc, ← hS1] - apply swapShift_as_add at hS + apply swap!_as_add at hS exact hS end VectorLikeOddPlane diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean index e1f930139..a2115ba7f 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean @@ -36,29 +36,29 @@ open VectorLikeOddPlane in the basis through that point is in the cubic. -/ def LineInCubic (S : (PureU1 (2 * n + 1)).LinSols) : Prop := ∀ (g f : Fin n → ℚ) (_ : S.val = Pa g f) (a b : ℚ), - accCube (2 * n + 1) (a • Psymm g + b • Pshift f) = 0 + accCube (2 * n + 1) (a • P g + b • P! f) = 0 set_option backward.isDefEq.respectTransparency false in /-- The condition that a linear solution sits on a line between the two planes within the cubic expands into a on `accCubeTriLinSymm` applied to the points within the planes. -/ lemma lineInCubic_expand {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S) : - ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = Psymm g + Pshift f) (a b : ℚ), - 3 * a * b * (a * accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) - + b * accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g)) = 0 := by + ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = P g + P! f) (a b : ℚ), + 3 * a * b * (a * accCubeTriLinSymm (P g) (P g) (P! f) + + b * accCubeTriLinSymm (P! f) (P! f) (P g)) = 0 := by intro g f hS a b have h1 := h g f hS a b - change accCubeTriLinSymm.toCubic (a • Psymm g + b • Pshift f) = 0 at h1 + change accCubeTriLinSymm.toCubic (a • P g + b • P! f) = 0 at h1 simp only [TriLinearSymm.toCubic_add] at h1 simp only [HomogeneousCubic.map_smul, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] at h1 - erw [Psymm_accCube, Pshift_accCube] at h1 + erw [P_accCube, P!_accCube] at h1 rw [← h1] ring -lemma line_in_cubic_Psymm_Psymm_Pshift {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S) : - ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = Psymm g + Pshift f), - accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0 := by +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 @@ -83,31 +83,31 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ + 1)).LinSols} (LIC : LineInCubicPerm S) : ∀ (j : Fin n.succ) (g f : Fin n.succ → ℚ) (_ : S.val = Pa g f), (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) - * accCubeTriLinSymm (Psymm g) (Psymm g) (shiftBasisAsCharges j) = 0 := by + * accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) = 0 := by intro j g f h let S' := (FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j)) S have hSS' : ((FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S' := rfl - obtain ⟨g', f', hall⟩ := span_basis_swapShift j hSS' g f h - have h1 := line_in_cubic_Psymm_Psymm_Pshift (lineInCubicPerm_self LIC) g f h - have h2 := line_in_cubic_Psymm_Psymm_Pshift (lineInCubicPerm_self (lineInCubicPerm_permute LIC + obtain ⟨g', f', hall⟩ := span_basis_swap! j hSS' g f h + have h1 := line_in_cubic_P_P_P! (lineInCubicPerm_self LIC) g f h + have h2 := line_in_cubic_P_P_P! (lineInCubicPerm_self (lineInCubicPerm_permute LIC (Equiv.swap (oddShiftFst j) (oddShiftSnd j)))) g' f' hall.1 rw [hall.2.1, hall.2.2] at h2 rw [accCubeTriLinSymm.map_add₃, h1, accCubeTriLinSymm.map_smul₃] at h2 simpa using h2 -lemma Psymm_Psymm_shiftBasis_accCube' {S : (PureU1 (2 * n.succ.succ + 1)).LinSols} +lemma P_P_P!_accCube' {S : (PureU1 (2 * n.succ.succ + 1)).LinSols} (f g : Fin n.succ.succ → ℚ) (hS : S.val = Pa f g) : - accCubeTriLinSymm (Psymm f) (Psymm f) (shiftBasisAsCharges 0) = + accCubeTriLinSymm (P f) (P f) (basis!AsCharges 0) = (S.val (oddShiftFst 0) + S.val (oddShiftSnd 0)) * (2 * S.val oddShiftZero + S.val (oddShiftFst 0) + S.val (oddShiftSnd 0)) := by - rw [Psymm_Psymm_shiftBasis_accCube f 0] + rw [P_P_P!_accCube f 0] rw [← Pa_oddShiftShiftZero f g] rw [← hS] have ht : oddShiftFst (0 : Fin n.succ.succ) = oddFst 1 := rfl nth_rewrite 1 [ht] - rw [Psymm_oddFst] + rw [P_oddFst] have h1 := Pa_oddShiftShiftZero f g have h4 := Pa_oddShiftShiftSnd f g 0 have h2 := Pa_oddShiftShiftFst f g 0 @@ -126,7 +126,7 @@ lemma lineInCubicPerm_last_cond {S : (PureU1 (2 * n.succ.succ+1)).LinSols} LineInPlaneProp ((S.val (oddShiftSnd 0)), ((S.val (oddShiftFst 0)), (S.val oddShiftZero))) := by obtain ⟨g, f, hfg⟩ := span_basis S have h1 := lineInCubicPerm_swap LIC 0 g f hfg - rw [Psymm_Psymm_shiftBasis_accCube' g f hfg] at h1 + rw [P_P_P!_accCube' g f hfg] at h1 simp only [Nat.succ_eq_add_one, mul_eq_zero] at h1 cases h1 <;> rename_i h1 · left diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean index dd8b9435c..567fbb4a6 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean @@ -30,16 +30,16 @@ open VectorLikeOddPlane show that this can be extended to a complete solution. -/ def parameterizationAsLinear (g f : Fin n → ℚ) (a : ℚ) : (PureU1 (2 * n + 1)).LinSols := - a • ((accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g)) • Psymm' g + - (- accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f)) • Pshift' f) + a • ((accCubeTriLinSymm (P! f) (P! f) (P g)) • P' g + + (- accCubeTriLinSymm (P g) (P g) (P! f)) • P!' f) lemma parameterizationAsLinear_val (g f : Fin n → ℚ) (a : ℚ) : (parameterizationAsLinear g f a).val = - a • ((accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g)) • Psymm g + - (- accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f)) • Pshift f) := by + a • ((accCubeTriLinSymm (P! f) (P! f) (P g)) • P g + + (- accCubeTriLinSymm (P g) (P g) (P! f)) • P! f) := by rw [parameterizationAsLinear] - change a • (_ • (Psymm' g).val + _ • (Pshift' f).val) = _ - rw [Psymm'_val, Pshift'_val] + change a • (_ • (P' g).val + _ • (P!' f).val) = _ + rw [P'_val, P!'_val] set_option backward.isDefEq.respectTransparency false in /-- The parameterization satisfies the cubic ACC. -/ @@ -50,7 +50,7 @@ lemma parameterizationCharge_cube (g f : Fin n → ℚ) (a : ℚ) : rw [HomogeneousCubic.map_smul] rw [TriLinearSymm.toCubic_add] rw [HomogeneousCubic.map_smul, HomogeneousCubic.map_smul] - erw [Psymm_accCube g, Pshift_accCube f] + erw [P_accCube g, P!_accCube f] rw [accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] @@ -63,26 +63,26 @@ def parameterization (g f : Fin n → ℚ) (a : ℚ) : parameterizationCharge_cube g f a⟩ lemma anomalyFree_param {S : (PureU1 (2 * n + 1)).Sols} - (g f : Fin n → ℚ) (hS : S.val = Psymm g + Pshift f) : - accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = - - accCubeTriLinSymm (Pshift f) (Pshift f) (Psymm g) := by + (g f : Fin n → ℚ) (hS : S.val = P g + P! f) : + accCubeTriLinSymm (P g) (P g) (P! f) = + - accCubeTriLinSymm (P! f) (P! f) (P g) := by have hC := S.cubicSol rw [hS] at hC - change (accCube (2 * n + 1)) (Psymm g + Pshift f) = 0 at hC + change (accCube (2 * n + 1)) (P g + P! f) = 0 at hC erw [TriLinearSymm.toCubic_add] at hC - erw [Psymm_accCube] at hC - erw [Pshift_accCube] at hC + erw [P_accCube] at hC + erw [P!_accCube] at hC linear_combination hC / 3 -/-- A proposition on a solution which is true if `accCubeTriLinSymm (Psymm g, Psymm g, Pshift f) ≠ 0`. +/-- 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 + 1)).Sols) : Prop := - ∀ (g f : Fin n.succ → ℚ) (_ : S.val = Psymm g + Pshift f), - accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) ≠ 0 + ∀ (g f : Fin n.succ → ℚ) (_ : S.val = P g + P! f), + accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0 lemma genericCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) - (hs : ∃ (g f : Fin n.succ → ℚ), S.val = Psymm g + Pshift f ∧ - accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) ≠ 0) : GenericCase S := by + (hs : ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f ∧ + 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' @@ -90,15 +90,15 @@ lemma genericCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) rw [hS'.1, hS'.2] at hC exact hC' hC -/-- A proposition on a solution which is true if `accCubeTriLinSymm (Psymm g, Psymm g, Pshift f) = 0`. +/-- A proposition on a solution which is true if `accCubeTriLinSymm (P g, P g, P! f) ≠ 0`. In this case we will show that S is zero if it is true for all permutations. -/ def SpecialCase (S : (PureU1 (2 * n.succ + 1)).Sols) : Prop := - ∀ (g f : Fin n.succ → ℚ) (_ : S.val = Psymm g + Pshift f), - accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0 + ∀ (g f : Fin n.succ → ℚ) (_ : S.val = P g + P! f), + accCubeTriLinSymm (P g) (P g) (P! f) = 0 lemma specialCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) - (hs : ∃ (g f : Fin n.succ → ℚ), S.val = Psymm g + Pshift f ∧ - accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0) : SpecialCase S := by + (hs : ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f ∧ + 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,8 +109,8 @@ lemma specialCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) lemma generic_or_special (S : (PureU1 (2 * n.succ + 1)).Sols) : GenericCase S ∨ SpecialCase S := by obtain ⟨g, f, h⟩ := span_basis S.1.1 - have h1 : accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) ≠ 0 ∨ - accCubeTriLinSymm (Psymm g) (Psymm g) (Pshift f) = 0 := by + have h1 : accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0 ∨ + accCubeTriLinSymm (P g) (P g) (P! f) = 0 := by exact ne_or_eq _ _ cases h1 <;> rename_i h1 · exact Or.inl (genericCase_exists S ⟨g, f, h, h1⟩) From f6d2c3d222028b764eb49c43f8516f183f6a552d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:12:09 +0000 Subject: [PATCH 12/22] feat: extract shifted plane for even case into ShiftPlane.lean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract sections A.2, A.3, C, and D from BasisLinear.lean into a new ShiftPlane.lean module with descriptive renamings: - basis! (LinSols) → shiftBasis - P! → shiftPlane Also fixes the evenShftSnd typo to evenShiftSnd. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Even/BasisLinear/ShiftPlane.lean | 290 ++++++++++++++---- 1 file changed, 223 insertions(+), 67 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean index 3835d0c02..ed64f9611 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean @@ -5,23 +5,51 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ChargeSplits +public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.SymmPlane /-! -# The shifted plane for the even case basis +# The shifted plane for the even case -The shifted plane is the span of basis vectors `shiftBasis`, each of which has charge `+1` at -position `evenShiftFst j` and charge `-1` at position `evenShiftSnd j`. It is called "shifted" -because these positions come from the **shifted even split** of the `2 * n.succ` charge indices -into `1 + (n + n + 1)` (see `ChargeSplits`). +## i. Overview -## Key results +This module defines the *shifted plane* for the even case of anomaly cancellation +in `PureU1 (2 * n.succ)`. It is called "shifted" because these positions come from +the shifted even split `1 + (n + n + 1)`, where the charges are grouped around the +boundary rather than symmetrically. -- `shiftBasisAsCharges` : The basis vectors as charge assignments. +## ii. Key definitions and results + +- `shiftBasisAsCharges` : The basis vectors of the shifted plane as charges. - `shiftBasis` : The basis vectors as `LinSols`. -- `Pshift` : The inclusion of the shifted plane into charges. -- `Pshift_accCube` : Charges from the shifted plane satisfy the cubic ACC. -- `Pshift'` : The inclusion of the shifted plane into linear solutions. +- `shiftPlane` : A point in the span of the shifted basis as a charge, + i.e., the inclusion of the shifted plane into charges. +- `shiftPlaneLinSols` : The inclusion of the shifted plane into linear solutions. +- `shiftPlane_accCube` : Charges from the shifted plane satisfy the cubic ACC. +- `shiftBasis_linear_independent` : The shifted basis vectors are linearly independent. + +## iii. Table of contents + +- A.2. The shifted even split: Splitting the charges up via `1 + (n + n + 1)` +- A.3. Lemmas relating the two splittings +- C. The second plane (shifted plane) + - C.2. Components of the vectors + - C.3. The vectors satisfy the linear ACCs + - C.4. The vectors satisfy the cubic ACC + - C.6. The vectors as linear solutions + - C.7. The inclusion of the shifted plane into charges + - C.8. Components of the inclusion into charges + - C.9. The inclusion into charges satisfies the cubic ACC + - C.10. Kernel of the inclusion into charges + - C.11. The inclusion of the shifted plane into the span of the basis + - C.12. The inclusion of the plane into linear solutions + - C.13. The basis vectors are linearly independent + - C.14. Properties of the basis vectors relating to the span + - C.15. Permutations as additions of basis vectors +- D. Mixed cubic ACCs involving points from both planes + +## iv. References + +- https://arxiv.org/pdf/1912.04804.pdf -/ @@ -37,7 +65,79 @@ namespace VectorLikeEvenPlane /-! -## C. The shifted plane +### A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` + +-/ + +lemma n_cond₂ (n : ℕ) : 1 + ((n + n) + 1) = 2 * n.succ := by + linarith + +/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the first `n`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftFst (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) + (Fin.natAdd 1 (Fin.castAdd 1 (Fin.castAdd n j))) + +/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the second `n`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftSnd (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) + (Fin.natAdd 1 (Fin.castAdd 1 (Fin.natAdd n j))) + +/-- The element of `Fin (1 + (n + n + 1))` corresponding to the first `1`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftZero : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.castAdd ((n + n) + 1) 0)) + +/-- The element of `Fin (1 + (n + n + 1))` corresponding to the second `1`, + casted into `Fin (2 * n.succ)`. -/ +def evenShiftLast : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.natAdd 1 (Fin.natAdd (n + n) 0))) + +lemma sum_evenShift (S : Fin (2 * n.succ) → ℚ) : + ∑ i, S i = S evenShiftZero + S evenShiftLast + + ∑ i : Fin n, ((S ∘ evenShiftFst) i + (S ∘ evenShiftSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (1 + ((n + n) + 1)), S (Fin.cast (n_cond₂ n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (n_cond₂ n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1] + rw [Fin.sum_univ_add, Fin.sum_univ_add, Fin.sum_univ_add, Finset.sum_add_distrib] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + 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 + +/-! + +### A.3. Lemmas relating the two splittings + +-/ +lemma evenShiftZero_eq_evenFst_zero : @evenShiftZero n = evenFst 0 := rfl + +lemma evenShiftLast_eq_evenSnd_last: @evenShiftLast n = evenSnd (Fin.last n) := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, + Fin.val_eq_zero, add_zero, evenSnd, Fin.natAdd_last, Fin.val_last] + omega + +lemma evenShiftFst_eq_evenFst_succ (j : Fin n) : evenShiftFst j = evenFst j.succ := by + rw [Fin.ext_iff, evenFst, evenShiftFst] + simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_succ] + ring + +lemma evenShiftSnd_eq_evenSnd_castSucc (j : Fin n) : evenShiftSnd j = evenSnd j.castSucc := by + rw [Fin.ext_iff, evenSnd, evenShiftSnd] + simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_castSucc] + ring_nf + rw [Nat.succ_eq_add_one] + ring + +/-! + +## C. The vectors of the basis spanning the second plane, via the shifted even split -/ @@ -57,15 +157,16 @@ def shiftBasisAsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges := -/ -lemma shiftBasis_on_evenShiftFst_self (j : Fin n) : shiftBasisAsCharges j (evenShiftFst j) = 1 := by +lemma shiftBasisAsCharges_on_evenShiftFst_self (j : Fin n) : + shiftBasisAsCharges j (evenShiftFst j) = 1 := by simp [shiftBasisAsCharges] -lemma shiftBasis_on_other {k : Fin n} {j : Fin (2 * n.succ)} (h1 : j ≠ evenShiftFst k) +lemma shiftBasisAsCharges_on_other {k : Fin n} {j : Fin (2 * n.succ)} (h1 : j ≠ evenShiftFst k) (h2 : j ≠ evenShiftSnd k) : shiftBasisAsCharges k j = 0 := by simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] simp_all only [ne_eq, ↓reduceIte] -lemma shiftBasis_on_evenShiftFst_other {k j : Fin n} (h : k ≠ j) : +lemma shiftBasisAsCharges_on_evenShiftFst_other {k j : Fin n} (h : k ≠ j) : shiftBasisAsCharges k (evenShiftFst j) = 0 := by simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] simp only [evenShiftFst, succ_eq_add_one, evenShiftSnd] @@ -83,7 +184,7 @@ lemma shiftBasis_on_evenShiftFst_other {k j : Fin n} (h : k ≠ j) : omega · rfl -lemma shiftBasis_evenShiftSnd_eq_neg_evenShiftFst (j i : Fin n) : +lemma shiftBasisAsCharges_evenShiftSnd_eq_neg_evenShiftFst (j i : Fin n) : shiftBasisAsCharges j (evenShiftSnd i) = - shiftBasisAsCharges j (evenShiftFst i) := by simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenShiftSnd, evenShiftFst] split <;> split @@ -104,15 +205,19 @@ lemma shiftBasis_evenShiftSnd_eq_neg_evenShiftFst (j i : Fin n) : all_goals omega -lemma shiftBasis_on_evenShiftSnd_self (j : Fin n) : shiftBasisAsCharges j (evenShiftSnd j) = - 1 := by - rw [shiftBasis_evenShiftSnd_eq_neg_evenShiftFst, shiftBasis_on_evenShiftFst_self] +lemma shiftBasisAsCharges_on_evenShiftSnd_self (j : Fin n) : + shiftBasisAsCharges j (evenShiftSnd j) = - 1 := by + rw [shiftBasisAsCharges_evenShiftSnd_eq_neg_evenShiftFst, + shiftBasisAsCharges_on_evenShiftFst_self] -lemma shiftBasis_on_evenShiftSnd_other {k j : Fin n} (h : k ≠ j) : +lemma shiftBasisAsCharges_on_evenShiftSnd_other {k j : Fin n} (h : k ≠ j) : shiftBasisAsCharges k (evenShiftSnd j) = 0 := by - rw [shiftBasis_evenShiftSnd_eq_neg_evenShiftFst, shiftBasis_on_evenShiftFst_other h] + rw [shiftBasisAsCharges_evenShiftSnd_eq_neg_evenShiftFst, + shiftBasisAsCharges_on_evenShiftFst_other h] rfl -lemma shiftBasis_on_evenShiftZero (j : Fin n) : shiftBasisAsCharges j evenShiftZero = 0 := by +lemma shiftBasisAsCharges_on_evenShiftZero (j : Fin n) : + shiftBasisAsCharges j evenShiftZero = 0 := by simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] split<;> rename_i h · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftFst, Fin.ext_iff, @@ -124,7 +229,8 @@ lemma shiftBasis_on_evenShiftZero (j : Fin n) : shiftBasisAsCharges j evenShiftZ omega · rfl -lemma shiftBasis_on_evenShiftLast (j : Fin n) : shiftBasisAsCharges j evenShiftLast = 0 := by +lemma shiftBasisAsCharges_on_evenShiftLast (j : Fin n) : + shiftBasisAsCharges j evenShiftLast = 0 := by simp only [shiftBasisAsCharges, succ_eq_add_one, PureU1_numberCharges] split <;> rename_i h · rw [Fin.ext_iff] at h @@ -144,11 +250,12 @@ lemma shiftBasis_on_evenShiftLast (j : Fin n) : shiftBasisAsCharges j evenShiftL -/ -lemma shiftBasis_linearACC (j : Fin n) : (accGrav (2 * n.succ)) (shiftBasisAsCharges j) = 0 := by +lemma shiftBasisAsCharges_linearACC (j : Fin n) : + (accGrav (2 * n.succ)) (shiftBasisAsCharges j) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_evenShift, shiftBasis_on_evenShiftZero, shiftBasis_on_evenShiftLast] - simp [shiftBasis_evenShiftSnd_eq_neg_evenShiftFst] + rw [sum_evenShift, shiftBasisAsCharges_on_evenShiftZero, shiftBasisAsCharges_on_evenShiftLast] + simp [shiftBasisAsCharges_evenShiftSnd_eq_neg_evenShiftFst] /-! @@ -157,15 +264,15 @@ lemma shiftBasis_linearACC (j : Fin n) : (accGrav (2 * n.succ)) (shiftBasisAsCha -/ set_option backward.isDefEq.respectTransparency false in -lemma shiftBasis_accCube (j : Fin n) : +lemma shiftBasisAsCharges_accCube (j : Fin n) : accCube (2 * n.succ) (shiftBasisAsCharges j) = 0 := by rw [accCube_explicit, sum_evenShift] - rw [shiftBasis_on_evenShiftLast, shiftBasis_on_evenShiftZero] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, - zero_add] + rw [shiftBasisAsCharges_on_evenShiftLast, shiftBasisAsCharges_on_evenShiftZero] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, + Function.comp_apply, zero_add] apply Finset.sum_eq_zero intro i _ - simp only [shiftBasis_evenShiftSnd_eq_neg_evenShiftFst] + simp only [shiftBasisAsCharges_evenShiftSnd_eq_neg_evenShiftFst] ring /-! @@ -181,7 +288,7 @@ def shiftBasis (j : Fin n) : (PureU1 (2 * n.succ)).LinSols := simp only [succ_eq_add_one, PureU1_numberLinear] at i match i with | 0 => - exact shiftBasis_linearACC j⟩ + exact shiftBasisAsCharges_linearACC j⟩ /-! @@ -189,8 +296,9 @@ def shiftBasis (j : Fin n) : (PureU1 (2 * n.succ)).LinSols := -/ -/-- A point in the span of the shifted plane basis as a charge. -/ -def Pshift (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • shiftBasisAsCharges i +/-- A point in the span of the shifted basis as a charge. -/ +def shiftPlane (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := + ∑ i, f i • shiftBasisAsCharges i /-! @@ -198,35 +306,37 @@ def Pshift (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • -/ -lemma Pshift_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : Pshift f (evenShiftFst j) = f j := by - rw [Pshift, sum_of_charges] +lemma shiftPlane_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : + shiftPlane f (evenShiftFst j) = f j := by + rw [shiftPlane, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] - · rw [shiftBasis_on_evenShiftFst_self] + · rw [shiftBasisAsCharges_on_evenShiftFst_self] exact Rat.mul_one (f j) · intro k _ hkj - rw [shiftBasis_on_evenShiftFst_other hkj] + rw [shiftBasisAsCharges_on_evenShiftFst_other hkj] exact Rat.mul_zero (f k) · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] -lemma Pshift_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : Pshift f (evenShiftSnd j) = - f j := by - rw [Pshift, sum_of_charges] +lemma shiftPlane_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : + shiftPlane f (evenShiftSnd j) = - f j := by + rw [shiftPlane, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] - · rw [shiftBasis_on_evenShiftSnd_self] + · rw [shiftBasisAsCharges_on_evenShiftSnd_self] exact mul_neg_one (f j) · intro k _ hkj - rw [shiftBasis_on_evenShiftSnd_other hkj] + rw [shiftBasisAsCharges_on_evenShiftSnd_other hkj] exact Rat.mul_zero (f k) · simp -lemma Pshift_evenShiftZero (f : Fin n → ℚ) : Pshift f (evenShiftZero) = 0 := by - rw [Pshift, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, shiftBasis_on_evenShiftZero] +lemma shiftPlane_evenShiftZero (f : Fin n → ℚ) : shiftPlane f (evenShiftZero) = 0 := by + rw [shiftPlane, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, shiftBasisAsCharges_on_evenShiftZero] -lemma Pshift_evenShiftLast (f : Fin n → ℚ) : Pshift f evenShiftLast = 0 := by - rw [Pshift, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, shiftBasis_on_evenShiftLast] +lemma shiftPlane_evenShiftLast (f : Fin n → ℚ) : shiftPlane f evenShiftLast = 0 := by + rw [shiftPlane, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, shiftBasisAsCharges_on_evenShiftLast] /-! @@ -235,13 +345,13 @@ lemma Pshift_evenShiftLast (f : Fin n → ℚ) : Pshift f evenShiftLast = 0 := b -/ set_option backward.isDefEq.respectTransparency false in -lemma Pshift_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (Pshift f) = 0 := by - rw [accCube_explicit, sum_evenShift, Pshift_evenShiftZero, Pshift_evenShiftLast] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, - zero_add] +lemma shiftPlane_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (shiftPlane f) = 0 := by + rw [accCube_explicit, sum_evenShift, shiftPlane_evenShiftZero, shiftPlane_evenShiftLast] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, + Function.comp_apply, zero_add] apply Finset.sum_eq_zero intro i _ - simp only [Pshift_evenShiftFst, Pshift_evenShiftSnd] + simp only [shiftPlane_evenShiftFst, shiftPlane_evenShiftSnd] ring /-! @@ -250,9 +360,9 @@ lemma Pshift_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (Pshift f) = 0 : -/ -lemma Pshift_zero (f : Fin n → ℚ) (h : Pshift f = 0) : ∀ i, f i = 0 := by +lemma shiftPlane_zero (f : Fin n → ℚ) (h : shiftPlane f = 0) : ∀ i, f i = 0 := by intro i - rw [← Pshift_evenShiftFst f] + rw [← shiftPlane_evenShiftFst f] rw [h] rfl @@ -262,7 +372,8 @@ lemma Pshift_zero (f : Fin n → ℚ) (h : Pshift f = 0) : ∀ i, f i = 0 := by -/ -lemma Pshift_in_span (f : Fin n → ℚ) : Pshift f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by +lemma shiftPlane_in_span (f : Fin n → ℚ) : + shiftPlane f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] use f rfl @@ -273,11 +384,13 @@ lemma Pshift_in_span (f : Fin n → ℚ) : Pshift f ∈ Submodule.span ℚ (Set. -/ -/-- A point in the span of the shifted plane basis. -/ -def Pshift' (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • shiftBasis i +/-- A point in the span of the shifted basis as a linear solution. -/ +def shiftPlaneLinSols (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).LinSols := + ∑ i, f i • shiftBasis i -lemma Pshift'_val (f : Fin n → ℚ) : (Pshift' f).val = Pshift f := by - simp only [succ_eq_add_one, Pshift', Pshift] +lemma shiftPlaneLinSols_val (f : Fin n → ℚ) : + (shiftPlaneLinSols f).val = shiftPlane f := by + simp only [succ_eq_add_one, shiftPlaneLinSols, shiftPlane] funext i rw [sum_of_anomaly_free_linear, sum_of_charges] rfl @@ -291,13 +404,13 @@ lemma Pshift'_val (f : Fin n → ℚ) : (Pshift' f).val = Pshift f := by theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by apply Fintype.linearIndependent_iff.mpr intro f h - change Pshift' f = 0 at h - have h1 : (Pshift' f).val = 0 := + change shiftPlaneLinSols f = 0 at h + have h1 : (shiftPlaneLinSols 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 - rw [Pshift'_val] at h1 - exact Pshift_zero f h1 + rw [shiftPlaneLinSols_val] at h1 + exact shiftPlane_zero f h1 /-! @@ -324,18 +437,61 @@ lemma smul_shiftBasisAsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : lemma swapShift_as_add {S S' : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) (hS : ((FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') : - S'.val = S.val + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j := by + S'.val = S.val + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • + shiftBasisAsCharges j := by funext i rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] by_cases hi : i = evenShiftFst j · subst hi - simp [HSMul.hSMul, shiftBasis_on_evenShiftFst_self, Equiv.swap_apply_left] + simp [HSMul.hSMul, shiftBasisAsCharges_on_evenShiftFst_self, Equiv.swap_apply_left] · by_cases hi2 : i = evenShiftSnd j - · simp [HSMul.hSMul, hi2, shiftBasis_on_evenShiftSnd_self, Equiv.swap_apply_right] + · simp [HSMul.hSMul, hi2, shiftBasisAsCharges_on_evenShiftSnd_self, Equiv.swap_apply_right] · simp only [succ_eq_add_one, Equiv.invFun_as_coe, HSMul.hSMul, ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul] - rw [shiftBasis_on_other hi hi2] + rw [shiftBasisAsCharges_on_other hi hi2] aesop +/-! + +## D. Mixed cubic ACCs involving points from both planes + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n.succ → ℚ) (j : Fin n) : + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftBasisAsCharges j) + = g (j.succ) ^ 2 - g (j.castSucc) ^ 2 := by + simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, + TriLinearSymm.mk₃_toFun_apply_apply] + rw [sum_evenShift, shiftBasisAsCharges_on_evenShiftZero, shiftBasisAsCharges_on_evenShiftLast] + simp only [mul_zero, add_zero, Function.comp_apply, zero_add] + rw [Finset.sum_eq_single j, shiftBasisAsCharges_on_evenShiftFst_self, + shiftBasisAsCharges_on_evenShiftSnd_self] + · simp only [evenShiftFst_eq_evenFst_succ, mul_one, evenShiftSnd_eq_evenSnd_castSucc, mul_neg] + rw [symmPlane_evenFst, symmPlane_evenSnd] + ring + · intro k _ hkj + erw [shiftBasisAsCharges_on_evenShiftFst_other hkj.symm, + shiftBasisAsCharges_on_evenShiftSnd_other hkj.symm] + simp only [mul_zero, add_zero] + · simp + +set_option backward.isDefEq.respectTransparency false in +lemma shiftPlane_shiftPlane_symmBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n.succ) : + accCubeTriLinSymm (shiftPlane g) (shiftPlane g) (symmBasisAsCharges j) + = (shiftPlane g (evenFst j))^2 - (shiftPlane g (evenSnd j))^2 := by + simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, + TriLinearSymm.mk₃_toFun_apply_apply] + rw [sum_even] + simp only [Function.comp_apply] + rw [Finset.sum_eq_single j, symmBasisAsCharges_on_evenFst_self, + symmBasisAsCharges_on_evenSnd_self] + · simp only [mul_one, mul_neg] + ring + · intro k _ hkj + erw [symmBasisAsCharges_on_evenFst_other hkj.symm, + symmBasisAsCharges_on_evenSnd_other hkj.symm] + simp only [mul_zero, add_zero] + · simp end VectorLikeEvenPlane From 99db52c3186cb276017eb54be90ae391175697ff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:17:32 +0000 Subject: [PATCH 13/22] Rewrite SymmPlane.lean: include symmetric split defs and use correct imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include Section A.1 (symmetric split: odd_shift_eq, oddFst, oddSnd, oddMid, sum_odd) directly in SymmPlane.lean alongside Section B (symmetric plane). Import from BasisLinear and VectorLike directly instead of ChargeSplits. Apply all renamings consistently: - P → symmPlane, P' → symmPlaneLinSols - basisAsCharges → symmBasisAsCharges, basis → symmBasis - All lemma names updated to match (e.g. P_oddFst → symmPlane_oddFst) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Odd/BasisLinear/SymmPlane.lean | 187 ++++++++++++------ 1 file changed, 129 insertions(+), 58 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean index aa1bf25ca..b26b6880b 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean @@ -5,22 +5,43 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ChargeSplits +public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.VectorLike /-! -# The symmetric plane for the odd case basis +# The symmetric plane for the odd case -The symmetric plane is the span of basis vectors `symmBasis`, each of which has charge `+1` at -position `oddFst j` and charge `-1` at position `oddSnd j`. It is called "symmetric" because -these positions come from the **symmetric split** of the `2 * n + 1` charge indices into -`(n + 1) + n` (see `ChargeSplits`). +This file defines the symmetric plane for `PureU1 (2 * n + 1)`. + +The symmetric plane arises from the symmetric split `(n + 1) + n` of the `2 * n + 1` charges. +It is called "symmetric" because the positions (`oddFst`, `oddSnd`, `oddMid`) come from this +symmetric split, which divides the charges into two groups of size `n` and a middle element. + +## Main definitions + +- `symmPlane` : A point in the span of the symmetric basis as a charge assignment. +- `symmPlaneLinSols` : A point in the span of the symmetric basis as a linear solution. +- `symmBasis` : The basis vectors of the symmetric plane as `LinSols`. +- `symmBasisAsCharges` : The basis vectors of the symmetric plane as charges. ## Key results -- `symmBasisAsCharges` : The basis vectors as charge assignments. -- `symmBasis` : The basis vectors as `LinSols`. -- `Psymm` : The inclusion of the symmetric plane into charges. -- `Psymm_accCube` : Charges from the symmetric plane satisfy the cubic ACC. -- `Psymm'` : The inclusion of the symmetric plane into linear solutions. +- `symmPlane_accCube` : Charges from the symmetric plane satisfy the cubic ACC. +- `symmBasis_linear_independent` : The symmetric basis vectors are linearly independent. + +## Table of contents + +- A.1. The symmetric split: Splitting the charges up via `(n + 1) + n` +- B. The first plane (symmetric plane) + - B.1. The basis vectors of the first plane as charges + - B.2. Components of the basis vectors as charges + - B.3. The basis vectors satisfy the linear ACCs + - B.4. The basis vectors as `LinSols` + - B.5. The inclusion of the first plane into charges + - B.6. Components of the first plane + - B.7. Points on the first plane satisfies the ACCs + - B.8. Kernel of the inclusion into charges + - B.9. The basis vectors are linearly independent + -/ @[expose] public section @@ -35,17 +56,64 @@ namespace VectorLikeOddPlane /-! -## B. The symmetric plane +## A.1. The symmetric split: Splitting the charges up via `(n + 1) + n` + +We split `2 * n + 1` charges using the symmetric split `(n + 1) + n`. + +-/ + +section theDeltas + +lemma odd_shift_eq (n : ℕ) : (1 + n) + n = 2 * n +1 := by + omega + +/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the first `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddFst (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.castAdd n (Fin.castAdd 1 j)) + +/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the second `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddSnd (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.natAdd (n+1) j) + +/-- The element representing `1` in `Fin ((n + 1) + n)`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddMid : Fin (2 * n + 1) := + Fin.cast (split_odd n) (Fin.castAdd n (Fin.natAdd n 1)) + +lemma sum_odd (S : Fin (2 * n + 1) → ℚ) : + ∑ i, S i = S oddMid + ∑ i : Fin n, ((S ∘ oddFst) i + (S ∘ oddSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin (n + 1 + n), S (Fin.cast (split_odd n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (split_odd n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1] + rw [Fin.sum_univ_add, Fin.sum_univ_add] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + nth_rewrite 2 [add_comm] + rw [add_assoc] + rw [Finset.sum_add_distrib] + rfl + +end theDeltas + +/-! + +## B. The first plane (symmetric plane) + +The symmetric plane is constructed from the symmetric split `(n + 1) + n`. -/ /-! -### B.1. The basis vectors of the symmetric plane as charges +### B.1. The basis vectors of the first plane as charges -/ -/-- The basis vectors of the symmetric plane as charge assignments. -/ +/-- The first part of the basis as charge assignments. -/ def symmBasisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := fun i => if i = oddFst j then @@ -62,10 +130,10 @@ def symmBasisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := -/ -lemma symmBasis_on_oddFst_self (j : Fin n) : symmBasisAsCharges j (oddFst j) = 1 := by +lemma symmBasisAsCharges_on_oddFst_self (j : Fin n) : symmBasisAsCharges j (oddFst j) = 1 := by simp [symmBasisAsCharges] -lemma symmBasis_on_oddFst_other {k j : Fin n} (h : k ≠ j) : +lemma symmBasisAsCharges_on_oddFst_other {k j : Fin n} (h : k ≠ j) : symmBasisAsCharges k (oddFst j) = 0 := by simp only [symmBasisAsCharges, PureU1_numberCharges] simp only [oddFst, oddSnd] @@ -83,13 +151,13 @@ lemma symmBasis_on_oddFst_other {k j : Fin n} (h : k ≠ j) : omega · rfl -lemma symmBasis_on_other {k : Fin n} {j : Fin (2 * n + 1)} (h1 : j ≠ oddFst k) +lemma symmBasisAsCharges_on_other {k : Fin n} {j : Fin (2 * n + 1)} (h1 : j ≠ oddFst k) (h2 : j ≠ oddSnd k) : symmBasisAsCharges k j = 0 := by simp only [symmBasisAsCharges, PureU1_numberCharges] simp_all only [ne_eq, ↓reduceIte] -lemma symmBasis_oddSnd_eq_minus_oddFst (j i : Fin n) : +lemma symmBasisAsCharges_oddSnd_eq_minus_oddFst (j i : Fin n) : symmBasisAsCharges j (oddSnd i) = - symmBasisAsCharges j (oddFst i) := by simp only [symmBasisAsCharges, PureU1_numberCharges, oddSnd, oddFst] split <;> split @@ -109,15 +177,16 @@ lemma symmBasis_oddSnd_eq_minus_oddFst (j i : Fin n) : all_goals omega -lemma symmBasis_on_oddSnd_self (j : Fin n) : symmBasisAsCharges j (oddSnd j) = - 1 := by - rw [symmBasis_oddSnd_eq_minus_oddFst, symmBasis_on_oddFst_self] +lemma symmBasisAsCharges_on_oddSnd_self (j : Fin n) : + symmBasisAsCharges j (oddSnd j) = - 1 := by + rw [symmBasisAsCharges_oddSnd_eq_minus_oddFst, symmBasisAsCharges_on_oddFst_self] -lemma symmBasis_on_oddSnd_other {k j : Fin n} (h : k ≠ j) : +lemma symmBasisAsCharges_on_oddSnd_other {k j : Fin n} (h : k ≠ j) : symmBasisAsCharges k (oddSnd j) = 0 := by - rw [symmBasis_oddSnd_eq_minus_oddFst, symmBasis_on_oddFst_other h] + rw [symmBasisAsCharges_oddSnd_eq_minus_oddFst, symmBasisAsCharges_on_oddFst_other h] rfl -lemma symmBasis_on_oddMid (j : Fin n) : symmBasisAsCharges j oddMid = 0 := by +lemma symmBasisAsCharges_on_oddMid (j : Fin n) : symmBasisAsCharges j oddMid = 0 := by simp only [symmBasisAsCharges, PureU1_numberCharges] split <;> rename_i h · rw [Fin.ext_iff] at h @@ -137,12 +206,12 @@ lemma symmBasis_on_oddMid (j : Fin n) : symmBasisAsCharges j oddMid = 0 := by -/ -lemma symmBasis_linearACC (j : Fin n) : +lemma symmBasisAsCharges_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (symmBasisAsCharges j) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] erw [sum_odd] - simp [symmBasis_oddSnd_eq_minus_oddFst, symmBasis_on_oddMid] + simp [symmBasisAsCharges_oddSnd_eq_minus_oddFst, symmBasisAsCharges_on_oddMid] /-! @@ -150,7 +219,7 @@ lemma symmBasis_linearACC (j : Fin n) : -/ -/-- The basis vectors of the symmetric plane as `LinSols`. -/ +/-- The first part of the basis as `LinSols`. -/ @[simps!] def symmBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := ⟨symmBasisAsCharges j, by @@ -158,69 +227,70 @@ def symmBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := simp only [PureU1_numberLinear] at i match i with | 0 => - exact symmBasis_linearACC j⟩ + exact symmBasisAsCharges_linearACC j⟩ /-! -### B.5. The inclusion of the symmetric plane into charges +### B.5. The inclusion of the first plane into charges -/ -/-- A point in the span of the symmetric plane basis as a charge. -/ -def Psymm (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • symmBasisAsCharges i +/-- A point in the span of the first part of the basis as a charge. -/ +def symmPlane (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := + ∑ i, f i • symmBasisAsCharges i /-! -### B.6. Components of the symmetric plane +### B.6. Components of the first plane -/ -lemma Psymm_oddFst (f : Fin n → ℚ) (j : Fin n) : Psymm f (oddFst j) = f j := by - rw [Psymm, sum_of_charges] +lemma symmPlane_oddFst (f : Fin n → ℚ) (j : Fin n) : symmPlane f (oddFst j) = f j := by + rw [symmPlane, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] - · rw [symmBasis_on_oddFst_self] + · rw [symmBasisAsCharges_on_oddFst_self] exact Rat.mul_one (f j) · intro k _ hkj - rw [symmBasis_on_oddFst_other hkj] + rw [symmBasisAsCharges_on_oddFst_other hkj] exact Rat.mul_zero (f k) · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] -lemma Psymm_oddSnd (f : Fin n → ℚ) (j : Fin n) : Psymm f (oddSnd j) = - f j := by - rw [Psymm, sum_of_charges] +lemma symmPlane_oddSnd (f : Fin n → ℚ) (j : Fin n) : symmPlane f (oddSnd j) = - f j := by + rw [symmPlane, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] - · rw [symmBasis_on_oddSnd_self] + · rw [symmBasisAsCharges_on_oddSnd_self] exact mul_neg_one (f j) · intro k _ hkj - rw [symmBasis_on_oddSnd_other hkj] + rw [symmBasisAsCharges_on_oddSnd_other hkj] exact Rat.mul_zero (f k) · simp -lemma Psymm_oddMid (f : Fin n → ℚ) : Psymm f oddMid = 0 := by - rw [Psymm, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, symmBasis_on_oddMid] +lemma symmPlane_oddMid (f : Fin n → ℚ) : symmPlane f oddMid = 0 := by + rw [symmPlane, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, symmBasisAsCharges_on_oddMid] /-! -### B.7. Points on the symmetric plane satisfy the ACCs +### B.7. Points on the first plane satisfies the ACCs -/ -lemma Psymm_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (Psymm f) = 0 := by +lemma symmPlane_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (symmPlane f) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] rw [sum_odd] - simp [Psymm_oddSnd, Psymm_oddFst, Psymm_oddMid] + simp [symmPlane_oddSnd, symmPlane_oddFst, symmPlane_oddMid] set_option backward.isDefEq.respectTransparency false in -lemma Psymm_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (Psymm f) = 0 := by - rw [accCube_explicit, sum_odd, Psymm_oddMid] +lemma symmPlane_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (symmPlane f) = 0 := by + rw [accCube_explicit, sum_odd, symmPlane_oddMid] simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] apply Finset.sum_eq_zero intro i _ - simp only [Psymm_oddFst, Psymm_oddSnd] + simp only [symmPlane_oddFst, symmPlane_oddSnd] ring /-! @@ -229,17 +299,18 @@ lemma Psymm_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (Psymm f) = 0 := by -/ -lemma Psymm_zero (f : Fin n → ℚ) (h : Psymm f = 0) : ∀ i, f i = 0 := by +lemma symmPlane_zero (f : Fin n → ℚ) (h : symmPlane f = 0) : ∀ i, f i = 0 := by intro i - erw [← Psymm_oddFst f] + erw [← symmPlane_oddFst f] rw [h] rfl -/-- A point in the span of the symmetric plane basis. -/ -def Psymm' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • symmBasis i +/-- A point in the span of the first part of the basis. -/ +def symmPlaneLinSols (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := + ∑ i, f i • symmBasis i -lemma Psymm'_val (f : Fin n → ℚ) : (Psymm' f).val = Psymm f := by - simp only [Psymm', Psymm] +lemma symmPlaneLinSols_val (f : Fin n → ℚ) : (symmPlaneLinSols f).val = symmPlane f := by + simp only [symmPlaneLinSols, symmPlane] funext i rw [sum_of_anomaly_free_linear, sum_of_charges] rfl @@ -253,13 +324,13 @@ lemma Psymm'_val (f : Fin n → ℚ) : (Psymm' f).val = Psymm f := by theorem symmBasis_linear_independent : LinearIndependent ℚ (@symmBasis n) := by apply Fintype.linearIndependent_iff.mpr intro f h - change Psymm' f = 0 at h - have h1 : (Psymm' f).val = 0 := + change symmPlaneLinSols f = 0 at h + have h1 : (symmPlaneLinSols 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 - rw [Psymm'_val] at h1 - exact Psymm_zero f h1 + rw [symmPlaneLinSols_val] at h1 + exact symmPlane_zero f h1 end VectorLikeOddPlane From 9e7d286765b4b81c8fae13220c7937599a19738b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:26:46 +0000 Subject: [PATCH 14/22] refactor: rewrite ShiftPlane.lean with correct naming and complete content Replace the existing ShiftPlane.lean with a version that: - Imports SymmPlane instead of ChargeSplits - Includes sections A.2-A.4 (shifted split, shifted-shifted split, relating lemmas) - Adds section D (mixed cubic ACC: symmPlane_symmPlane_shiftBasisAsCharges_accCube) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Odd/BasisLinear/ShiftPlane.lean | 307 ++++++++++++++---- 1 file changed, 251 insertions(+), 56 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean index affe3ebec..d10adde43 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean @@ -5,22 +5,50 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ChargeSplits +public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.SymmPlane /-! -# The shifted plane for the odd case basis +# The shifted plane for the odd case -The shifted plane is the span of basis vectors `shiftBasis`, each of which has charge `+1` at -position `oddShiftFst j` and charge `-1` at position `oddShiftSnd j`. It is called "shifted" -because these positions come from the **shifted split** of the `2 * n + 1` charge indices into -`1 + n + n` (see `ChargeSplits`). +This file defines the shifted plane for `PureU1 (2 * n + 1)`. + +The shifted plane arises from the shifted split `1 + n + n` of the `2 * n + 1` charges. +It is called "shifted" because the positions (`oddShiftFst`, `oddShiftSnd`, `oddShiftZero`) +come from this shifted split, which places the distinguished element at position `0` rather +than in the middle. + +## Main definitions + +- `shiftBasisAsCharges` : The basis vectors of the shifted plane as charges. +- `shiftBasis` : The basis vectors of the shifted plane as `LinSols`. +- `shiftPlane` : A point in the span of the shifted basis as a charge assignment. +- `shiftPlaneLinSols` : A point in the span of the shifted basis as a linear solution. ## Key results -- `shiftBasisAsCharges` : The basis vectors as charge assignments. -- `shiftBasis` : The basis vectors as `LinSols`. -- `Pshift` : The inclusion of the shifted plane into charges. -- `Pshift_accCube` : Charges from the shifted plane satisfy the cubic ACC. -- `Pshift'` : The inclusion of the shifted plane into linear solutions. +- `shiftPlane_accCube` : Charges from the shifted plane satisfy the cubic ACC. +- `shiftBasis_linear_independent` : The shifted basis vectors are linearly independent. +- `symmPlane_symmPlane_shiftBasisAsCharges_accCube` : The mixed cubic ACC from points in both + planes. + +## Table of contents + +- A.2. The shifted split: Splitting the charges up via `1 + n + n` +- A.3. The shifted shifted split: Splitting the charges up via `((1+n)+1) + n.succ` +- A.4. Relating the splittings together +- C. The second plane (shifted plane) + - C.1. The basis vectors of the shifted plane as charges + - C.2. Components of the basis vectors as charges + - C.3. The basis vectors satisfy the linear ACCs + - C.4. The basis vectors as `LinSols` + - C.5. Permutations equal adding basis vectors + - C.6. The inclusion of the shifted plane into charges + - C.7. Components of the shifted plane + - C.8. Points on the shifted plane satisfy the ACCs + - C.9. Kernel of the inclusion into charges + - C.10. The inclusion of the shifted plane into LinSols + - C.11. The basis vectors are linearly independent +- D. The mixed cubic ACC from points in both planes + -/ @[expose] public section @@ -33,9 +61,139 @@ variable {n : ℕ} namespace VectorLikeOddPlane +section theDeltas + /-! -## C. The shifted plane +### A.2. The shifted split: Spltting the charges up via `1 + n + n` + +-/ + +/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the first `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftFst (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.natAdd 1 j)) + +/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the second `n`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftSnd (j : Fin n) : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.natAdd (1 + n) j) + +/-- The element representing the `1` in `Fin (1 + n + n)`. + This is then casted to `Fin (2 * n + 1)`. -/ +def oddShiftZero : Fin (2 * n + 1) := + Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.castAdd n 1)) + +lemma sum_oddShift (S : Fin (2 * n + 1) → ℚ) : + ∑ i, S i = S oddShiftZero + ∑ i : Fin n, ((S ∘ oddShiftFst) i + (S ∘ oddShiftSnd) i) := by + have h1 : ∑ i, S i = ∑ i : Fin ((1+n)+n), S (Fin.cast (odd_shift_eq n) i) := by + rw [Finset.sum_equiv (Fin.castOrderIso (odd_shift_eq n)).symm.toEquiv] + · intro i + simp only [mem_univ, Fin.castOrderIso, RelIso.coe_fn_toEquiv] + · exact fun _ _ => rfl + rw [h1, Fin.sum_univ_add, Fin.sum_univ_add] + simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] + rw [add_assoc, Finset.sum_add_distrib] + rfl + +/-! + +### A.3. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` + +-/ + +lemma odd_shift_shift_eq (n : ℕ) : ((1+n)+1) + n.succ = 2 * n.succ + 1 := by + omega + +/-- The element representing the first `1` in `Fin (1 + n + 1 + n.succ)` casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftZero : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.castAdd n 1))) + +/-- The inclusion of `Fin n` into `Fin (1 + n + 1 + n.succ)` via the first `n` and casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftFst (j : Fin n) : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.natAdd 1 j))) + +/-- The element representing the second `1` in `Fin (1 + n + 1 + n.succ)` casted + to `2 * n.succ + 1`. -/ +def oddShiftShiftMid : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.natAdd (1+n) 1)) + +/-- The inclusion of `Fin n.succ` into `Fin (1 + n + 1 + n.succ)` via the `n.succ` and casted + to `Fin (2 * n.succ + 1)`. -/ +def oddShiftShiftSnd (j : Fin n.succ) : Fin (2 * n.succ + 1) := + Fin.cast (odd_shift_shift_eq n) (Fin.natAdd ((1+n)+1) j) + +/-! + +### A.4. Relating the splittings together + +-/ +lemma oddShiftShiftZero_eq_oddFst_zero : @oddShiftShiftZero n = oddFst 0 := + Fin.rev_inj.mp rfl + +lemma oddShiftShiftZero_eq_oddShiftZero : @oddShiftShiftZero n = oddShiftZero := rfl + +lemma oddShiftShiftFst_eq_oddFst_succ (j : Fin n) : + oddShiftShiftFst j = oddFst j.succ := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, + oddFst, Fin.val_succ] + exact Nat.add_comm 1 ↑j + +lemma oddShiftShiftFst_eq_oddShiftFst_castSucc (j : Fin n) : + oddShiftShiftFst j = oddShiftFst j.castSucc := by + rfl + +lemma oddShiftShiftMid_eq_oddMid : @oddShiftShiftMid n = oddMid := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, + Fin.val_natAdd, Fin.val_eq_zero, add_zero, oddMid] + exact Nat.add_comm 1 n + +lemma oddShiftShiftMid_eq_oddShiftFst_last : oddShiftShiftMid = oddShiftFst (Fin.last n) := by + rfl + +lemma oddShiftShiftSnd_eq_oddSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddSnd j := by + rw [Fin.ext_iff] + simp only [succ_eq_add_one, oddShiftShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] + exact Nat.add_comm 1 n + +lemma oddShiftShiftSnd_eq_oddShiftSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddShiftSnd j := by + rw [Fin.ext_iff] + rfl + +lemma oddSnd_eq_oddShiftSnd (j : Fin n) : oddSnd j = oddShiftSnd j := by + rw [Fin.ext_iff] + simp only [oddSnd, Fin.val_cast, Fin.val_natAdd, oddShiftSnd, add_left_inj] + exact Nat.add_comm n 1 + +lemma oddShiftZero_eq_oddFst : oddShiftZero = oddFst (0 : Fin n.succ) := by + ext + simp [oddShiftZero, oddFst] + +lemma oddShiftFst_castSucc_eq_oddFst_succ (j : Fin n) : + oddShiftFst j.castSucc = oddFst j.succ := by + rw [Fin.ext_iff] + simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddFst, Fin.val_succ] + exact Nat.add_comm 1 ↑j + +lemma oddShiftFst_last_eq_oddMid : oddShiftFst (Fin.last n) = oddMid := by + rw [Fin.ext_iff] + simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddMid, Fin.val_last] + exact Nat.add_comm 1 n + +lemma oddShiftSnd_eq_oddSnd (j : Fin n) : oddShiftSnd j = oddSnd j := by + rw [Fin.ext_iff] + simp only [oddShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] + ring + +end theDeltas + +/-! + +## C. The second plane (shifted plane) -/ @@ -62,10 +220,11 @@ def shiftBasisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := -/ -lemma shiftBasis_on_oddShiftFst_self (j : Fin n) : shiftBasisAsCharges j (oddShiftFst j) = 1 := by +lemma shiftBasisAsCharges_on_oddShiftFst_self (j : Fin n) : + shiftBasisAsCharges j (oddShiftFst j) = 1 := by simp [shiftBasisAsCharges] -lemma shiftBasis_on_oddShiftFst_other {k j : Fin n} (h : k ≠ j) : +lemma shiftBasisAsCharges_on_oddShiftFst_other {k j : Fin n} (h : k ≠ j) : shiftBasisAsCharges k (oddShiftFst j) = 0 := by simp only [shiftBasisAsCharges, PureU1_numberCharges] simp only [oddShiftFst, oddShiftSnd] @@ -83,13 +242,13 @@ lemma shiftBasis_on_oddShiftFst_other {k j : Fin n} (h : k ≠ j) : omega rfl -lemma shiftBasis_on_other {k : Fin n} {j : Fin (2 * n + 1)} +lemma shiftBasisAsCharges_on_other {k : Fin n} {j : Fin (2 * n + 1)} (h1 : j ≠ oddShiftFst k) (h2 : j ≠ oddShiftSnd k) : shiftBasisAsCharges k j = 0 := by simp only [shiftBasisAsCharges, PureU1_numberCharges] simp_all only [ne_eq, ↓reduceIte] -lemma shiftBasis_oddShiftSnd_eq_minus_oddShiftFst (j i : Fin n) : +lemma shiftBasisAsCharges_oddShiftSnd_eq_minus_oddShiftFst (j i : Fin n) : shiftBasisAsCharges j (oddShiftSnd i) = - shiftBasisAsCharges j (oddShiftFst i) := by simp only [shiftBasisAsCharges, PureU1_numberCharges, oddShiftSnd, oddShiftFst] split <;> split @@ -106,15 +265,19 @@ lemma shiftBasis_oddShiftSnd_eq_minus_oddShiftFst (j i : Fin n) : all_goals simp_all all_goals omega -lemma shiftBasis_on_oddShiftSnd_self (j : Fin n) : shiftBasisAsCharges j (oddShiftSnd j) = - 1 := by - rw [shiftBasis_oddShiftSnd_eq_minus_oddShiftFst, shiftBasis_on_oddShiftFst_self] +lemma shiftBasisAsCharges_on_oddShiftSnd_self (j : Fin n) : + shiftBasisAsCharges j (oddShiftSnd j) = - 1 := by + rw [shiftBasisAsCharges_oddShiftSnd_eq_minus_oddShiftFst, + shiftBasisAsCharges_on_oddShiftFst_self] -lemma shiftBasis_on_oddShiftSnd_other {k j : Fin n} (h : k ≠ j) : +lemma shiftBasisAsCharges_on_oddShiftSnd_other {k j : Fin n} (h : k ≠ j) : shiftBasisAsCharges k (oddShiftSnd j) = 0 := by - rw [shiftBasis_oddShiftSnd_eq_minus_oddShiftFst, shiftBasis_on_oddShiftFst_other h] + rw [shiftBasisAsCharges_oddShiftSnd_eq_minus_oddShiftFst, + shiftBasisAsCharges_on_oddShiftFst_other h] rfl -lemma shiftBasis_on_oddShiftZero (j : Fin n) : shiftBasisAsCharges j oddShiftZero = 0 := by +lemma shiftBasisAsCharges_on_oddShiftZero (j : Fin n) : + shiftBasisAsCharges j oddShiftZero = 0 := by simp only [shiftBasisAsCharges, PureU1_numberCharges] split <;> rename_i h · rw [Fin.ext_iff] at h @@ -134,11 +297,12 @@ lemma shiftBasis_on_oddShiftZero (j : Fin n) : shiftBasisAsCharges j oddShiftZer -/ -lemma shiftBasis_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (shiftBasisAsCharges j) = 0 := by +lemma shiftBasisAsCharges_linearACC (j : Fin n) : + (accGrav (2 * n + 1)) (shiftBasisAsCharges j) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_oddShift, shiftBasis_on_oddShiftZero] - simp [shiftBasis_oddShiftSnd_eq_minus_oddShiftFst] + rw [sum_oddShift, shiftBasisAsCharges_on_oddShiftZero] + simp [shiftBasisAsCharges_oddShiftSnd_eq_minus_oddShiftFst] /-! @@ -154,7 +318,7 @@ def shiftBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := simp only [PureU1_numberLinear] at i match i with | 0 => - exact shiftBasis_linearACC j⟩ + exact shiftBasisAsCharges_linearACC j⟩ /-! @@ -167,18 +331,19 @@ def shiftBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := lemma swapShift_as_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) (hS : ((FamilyPermutations (2 * n + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') : - S'.val = S.val + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j := by + S'.val = S.val + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • + shiftBasisAsCharges j := by funext i rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] by_cases hi : i = oddShiftFst j · subst hi - simp [HSMul.hSMul, shiftBasis_on_oddShiftFst_self, Equiv.swap_apply_left] + simp [HSMul.hSMul, shiftBasisAsCharges_on_oddShiftFst_self, Equiv.swap_apply_left] · by_cases hi2 : i = oddShiftSnd j · subst hi2 - simp [HSMul.hSMul, shiftBasis_on_oddShiftSnd_self, Equiv.swap_apply_right] + simp [HSMul.hSMul, shiftBasisAsCharges_on_oddShiftSnd_self, Equiv.swap_apply_right] · simp only [Equiv.invFun_as_coe, HSMul.hSMul, ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul] - rw [shiftBasis_on_other hi hi2] + rw [shiftBasisAsCharges_on_other hi hi2] aesop /-! @@ -188,7 +353,8 @@ lemma swapShift_as_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) -/ /-- A point in the span of the shifted plane basis as a charge. -/ -def Pshift (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • shiftBasisAsCharges i +def shiftPlane (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := + ∑ i, f i • shiftBasisAsCharges i /-! @@ -196,31 +362,33 @@ def Pshift (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • -/ -lemma Pshift_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : Pshift f (oddShiftFst j) = f j := by - rw [Pshift, sum_of_charges] +lemma shiftPlane_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : + shiftPlane f (oddShiftFst j) = f j := by + rw [shiftPlane, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] - · rw [shiftBasis_on_oddShiftFst_self] + · rw [shiftBasisAsCharges_on_oddShiftFst_self] exact Rat.mul_one (f j) · intro k _ hkj - rw [shiftBasis_on_oddShiftFst_other hkj] + rw [shiftBasisAsCharges_on_oddShiftFst_other hkj] exact Rat.mul_zero (f k) · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] -lemma Pshift_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : Pshift f (oddShiftSnd j) = - f j := by - rw [Pshift, sum_of_charges] +lemma shiftPlane_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : + shiftPlane f (oddShiftSnd j) = - f j := by + rw [shiftPlane, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] - · rw [shiftBasis_on_oddShiftSnd_self] + · rw [shiftBasisAsCharges_on_oddShiftSnd_self] exact mul_neg_one (f j) · intro k _ hkj - rw [shiftBasis_on_oddShiftSnd_other hkj] + rw [shiftBasisAsCharges_on_oddShiftSnd_other hkj] exact Rat.mul_zero (f k) · simp -lemma Pshift_oddShiftZero (f : Fin n → ℚ) : Pshift f oddShiftZero = 0 := by - rw [Pshift, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, shiftBasis_on_oddShiftZero] +lemma shiftPlane_oddShiftZero (f : Fin n → ℚ) : shiftPlane f oddShiftZero = 0 := by + rw [shiftPlane, sum_of_charges] + simp [HSMul.hSMul, SMul.smul, shiftBasisAsCharges_on_oddShiftZero] /-! @@ -228,19 +396,21 @@ lemma Pshift_oddShiftZero (f : Fin n → ℚ) : Pshift f oddShiftZero = 0 := by -/ -lemma Pshift_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (Pshift f) = 0 := by +lemma shiftPlane_linearACC (f : Fin n → ℚ) : + (accGrav (2 * n + 1)) (shiftPlane f) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] rw [sum_oddShift] - simp [Pshift_oddShiftSnd, Pshift_oddShiftFst, Pshift_oddShiftZero] + simp [shiftPlane_oddShiftSnd, shiftPlane_oddShiftFst, shiftPlane_oddShiftZero] set_option backward.isDefEq.respectTransparency false in -lemma Pshift_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (Pshift f) = 0 := by - rw [accCube_explicit, sum_oddShift, Pshift_oddShiftZero] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] +lemma shiftPlane_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (shiftPlane f) = 0 := by + rw [accCube_explicit, sum_oddShift, shiftPlane_oddShiftZero] + simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, + zero_add] apply Finset.sum_eq_zero intro i _ - simp only [Pshift_oddShiftFst, Pshift_oddShiftSnd] + simp only [shiftPlane_oddShiftFst, shiftPlane_oddShiftSnd] ring /-! @@ -249,9 +419,9 @@ lemma Pshift_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (Pshift f) = 0 := -/ -lemma Pshift_zero (f : Fin n → ℚ) (h : Pshift f = 0) : ∀ i, f i = 0 := by +lemma shiftPlane_zero (f : Fin n → ℚ) (h : shiftPlane f = 0) : ∀ i, f i = 0 := by intro i - rw [← Pshift_oddShiftFst f] + rw [← shiftPlane_oddShiftFst f] rw [h] rfl @@ -262,10 +432,12 @@ lemma Pshift_zero (f : Fin n → ℚ) (h : Pshift f = 0) : ∀ i, f i = 0 := by -/ /-- A point in the span of the shifted plane basis. -/ -def Pshift' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • shiftBasis i +def shiftPlaneLinSols (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := + ∑ i, f i • shiftBasis i -lemma Pshift'_val (f : Fin n → ℚ) : (Pshift' f).val = Pshift f := by - simp only [Pshift', Pshift] +lemma shiftPlaneLinSols_val (f : Fin n → ℚ) : + (shiftPlaneLinSols f).val = shiftPlane f := by + simp only [shiftPlaneLinSols, shiftPlane] funext i rw [sum_of_anomaly_free_linear, sum_of_charges] rfl @@ -279,13 +451,36 @@ lemma Pshift'_val (f : Fin n → ℚ) : (Pshift' f).val = Pshift f := by theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by apply Fintype.linearIndependent_iff.mpr intro f h - change Pshift' f = 0 at h - have h1 : (Pshift' f).val = 0 := + change shiftPlaneLinSols f = 0 at h + have h1 : (shiftPlaneLinSols 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 - rw [Pshift'_val] at h1 - exact Pshift_zero f h1 + rw [shiftPlaneLinSols_val] at h1 + exact shiftPlane_zero f h1 + +/-! + +## D. The mixed cubic ACC from points in both planes + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n) : + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftBasisAsCharges j) + = (symmPlane g (oddShiftFst j))^2 - (g j)^2 := by + simp only [accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] + rw [sum_oddShift, shiftBasisAsCharges_on_oddShiftZero] + simp only [mul_zero, Function.comp_apply, zero_add] + rw [Finset.sum_eq_single j, shiftBasisAsCharges_on_oddShiftFst_self, + shiftBasisAsCharges_on_oddShiftSnd_self] + · rw [← oddSnd_eq_oddShiftSnd, symmPlane_oddSnd] + ring + · intro k _ hkj + erw [shiftBasisAsCharges_on_oddShiftFst_other hkj.symm, + shiftBasisAsCharges_on_oddShiftSnd_other hkj.symm] + simp only [mul_zero, add_zero] + · simp end VectorLikeOddPlane From 3cda1807852f8b9601dd53a6a03f73a34bb18f54 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:34:51 +0000 Subject: [PATCH 15/22] refactor(Even/BasisLinear): keep only sections E and F with renamed identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrite BasisLinear.lean to contain only the combined basis (sections E and F), importing SymmPlane and ShiftPlane via the ShiftPlane transitive import. All identifiers are renamed to the new convention: - P → symmPlane, P! → shiftPlane - P' → symmPlaneLinSols, P!' → shiftPlaneLinSols - basis → symmBasis, basis! → shiftBasis - Pa_zero! → Pa_zero_shift - Pa_evenShitZero → Pa_evenShiftZero (typo fix) - span_basis_swap! → span_basis_swapShift Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../AnomalyCancellation/Even/BasisLinear.lean | 863 ++---------------- 1 file changed, 61 insertions(+), 802 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean index d36052459..7ae26768f 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean @@ -5,60 +5,37 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear -public import Physlib.QFT.QED.AnomalyCancellation.VectorLike +public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ShiftPlane /-! -# Splitting the linear solutions in the even case into two ACC-satisfying planes +# The combined basis of the symmetric and shifted planes ## i. Overview -We split the linear solutions of `PureU1 (2 * n.succ)` into two planes, -where every point in either plane satisfies both the linear and cubic anomaly cancellation -conditions. +This module constructs the combined basis for the linear solutions of +`PureU1 (2 * n.succ)` by combining the two ACC-satisfying planes: + +- The *symmetric plane*, named after the symmetric (even) split `n.succ + n.succ`. + Its key results are `symmPlaneLinSols` (the inclusion into linear solutions) and + `symmPlane_accCube` (every point satisfies the cubic anomaly cancellation condition). + +- The *shifted plane*, named after the shifted split `1 + (n + n + 1)`. + Its key results are `shiftPlaneLinSols` (the inclusion into linear solutions) and + `shiftPlane_accCube` (every point satisfies the cubic anomaly cancellation condition). + +The main result is `span_basis`: every linear solution of `PureU1 (2 * n.succ)` can +be written as the sum of a point from the symmetric plane and a point from the shifted +plane. ## ii. Key results -- `P'` : The inclusion of the first plane into linear solutions -- `P_accCube` : The statement that chares from the first plane satisfy the cubic ACC -- `P!'` : The inclusion of the second plane. -- `P!_accCube` : The statement that charges from the second plane satisfy the cubic ACC -- `span_basis` : Every linear solution is the sum of a point from each plane. +- `basisa` : The combined basis vectors from both planes +- `basisa_linear_independent` : The combined basis vectors are linearly independent +- `basisaAsBasis` : The combined basis vectors form a basis +- `span_basis` : Every linear solution is the sum of a point from each plane ## iii. Table of contents -- A. Splitting the charges up into groups - - A.1. The even split: Spltting the charges up via `n.succ + n.succ` - - A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` - - A.3. Lemmas relating the two splittings -- B. The first plane - - B.1. The basis vectors of the first plane as charges - - B.2. Components of the basis vectors - - B.3. The basis vectors satisfy the linear ACCs - - B.4. The basis vectors satisfy the cubic ACC - - B.5. The basis vectors as linear solutions - - B.6. The inclusion of the first plane into charges - - B.7. Components of the inclusion into charges - - B.8. The inclusion into charges satisfies the linear and cubic ACCs - - B.9. Kernel of the inclusion into charges - - B.10. The inclusion of the plane into linear solutions - - B.11. The basis vectors are linearly independent - - B.12. Every vector-like even solution is in the span of the basis of the first plane -- C. The vectors of the basis spanning the second plane, via the shifted even split - - C.2. Components of the vectors - - C.3. The vectors satisfy the linear ACCs - - C.4. The vectors satisfy the cubic ACC - - C.6. The vectors as linear solutions - - C.7. The inclusion of the second plane into charges - - C.8. Components of the inclusion into charges - - C.9. The inclusion into charges satisfies the cubic ACC - - C.10. Kernel of the inclusion into charges - - C.11. The inclusion of the second plane into the span of the basis - - C.12. The inclusion of the plane into linear solutions - - C.13. The basis vectors are linearly independent - - C.14. Properties of the basis vectors relating to the span - - C.15. Permutations as additions of basis vectors -- D. Mixed cubic ACCs involving points from both planes - E. The combined basis - E.1. As a map into linear solutions - E.2. Inclusion of the span of the basis into charges @@ -69,7 +46,7 @@ conditions. - E.7. Injectivity of the inclusion into linear solutions - E.8. Cardinality of the basis - E.9. The basis vectors as a basis -- F. Every Lienar solution is the sum of a point from each plane +- F. Every linear solution is the sum of a point from each plane - F.1. Relation under permutations ## iv. References @@ -90,730 +67,6 @@ namespace VectorLikeEvenPlane /-! -## A. Splitting the charges up into groups - -We have `2 * n.succ` charges, which we split up in the following ways: - -`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` - -``` -| evenShiftZero (0) | evenShiftFst j (1 to n) | - evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | -``` - --/ - -/-! - -### A.1. The even split: Spltting the charges up via `n.succ + n.succ` - --/ - -/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the first `n.succ`, - casted into `Fin (2 * n.succ)`. -/ -def evenFst (j : Fin n.succ) : Fin (2 * n.succ) := - Fin.cast (split_equal n.succ) (Fin.castAdd n.succ j) - -/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the second `n.succ`, - casted into `Fin (2 * n.succ)`. -/ -def evenSnd (j : Fin n.succ) : Fin (2 * n.succ) := - Fin.cast (split_equal n.succ) (Fin.natAdd n.succ j) - -lemma ext_even (S T : Fin (2 * n.succ) → ℚ) (h1 : ∀ i, S (evenFst i) = T (evenFst i)) - (h2 : ∀ i, S (evenSnd i) = T (evenSnd i)) : S = T := by - funext i - by_cases hi : i.val < n.succ - · let j : Fin n.succ := ⟨i, hi⟩ - have h2 := h1 j - have h3 : evenFst 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 : evenSnd j = i := by - simp only [succ_eq_add_one, evenSnd, Fin.ext_iff, Fin.val_cast, Fin.val_natAdd, j] - omega - rw [h3] at h2 - exact h2 - -lemma sum_even (S : Fin (2 * n.succ) → ℚ) : - ∑ i, S i = ∑ i : Fin n.succ, ((S ∘ evenFst) i + (S ∘ evenSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (n.succ + n.succ), S (Fin.cast (split_equal n.succ) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (split_equal n.succ)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _=> rfl - rw [h1, Fin.sum_univ_add, Finset.sum_add_distrib] - rfl - -/-! - -### A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` - --/ - -lemma n_cond₂ (n : ℕ) : 1 + ((n + n) + 1) = 2 * n.succ := by - linarith - -/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the first `n`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftFst (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) - (Fin.natAdd 1 (Fin.castAdd 1 (Fin.castAdd n j))) - -/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the second `n`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftSnd (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) - (Fin.natAdd 1 (Fin.castAdd 1 (Fin.natAdd n j))) - -/-- The element of `Fin (1 + (n + n + 1))` corresponding to the first `1`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftZero : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.castAdd ((n + n) + 1) 0)) - -/-- The element of `Fin (1 + (n + n + 1))` corresponding to the second `1`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftLast : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.natAdd 1 (Fin.natAdd (n + n) 0))) - -lemma sum_evenShift (S : Fin (2 * n.succ) → ℚ) : - ∑ i, S i = S evenShiftZero + S evenShiftLast + - ∑ i : Fin n, ((S ∘ evenShiftFst) i + (S ∘ evenShiftSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (1 + ((n + n) + 1)), S (Fin.cast (n_cond₂ n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (n_cond₂ n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1] - rw [Fin.sum_univ_add, Fin.sum_univ_add, Fin.sum_univ_add, Finset.sum_add_distrib] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - 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 - -/-! - -### A.3. Lemmas relating the two splittings - --/ -lemma evenShiftZero_eq_evenFst_zero : @evenShiftZero n = evenFst 0 := rfl - -lemma evenShiftLast_eq_evenSnd_last: @evenShiftLast n = evenSnd (Fin.last n) := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, evenSnd, Fin.natAdd_last, Fin.val_last] - omega - -lemma evenShiftFst_eq_evenFst_succ (j : Fin n) : evenShiftFst j = evenFst j.succ := by - rw [Fin.ext_iff, evenFst, evenShiftFst] - simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_succ] - ring - -lemma evenShiftSnd_eq_evenSnd_castSucc (j : Fin n) : evenShiftSnd j = evenSnd j.castSucc := by - rw [Fin.ext_iff, evenSnd, evenShiftSnd] - simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_castSucc] - ring_nf - rw [Nat.succ_eq_add_one] - ring - -/-! - -## B. The first plane - --/ - -/-! - -### B.1. The basis vectors of the first plane as charges - --/ - -/-- The first part of the basis as charges. -/ -def basisAsCharges (j : Fin n.succ) : (PureU1 (2 * n.succ)).Charges := - fun i => - if i = evenFst j then - 1 - else - if i = evenSnd j then - - 1 - else - 0 - -/-! - -### B.2. Components of the basis vectors - --/ - -lemma basis_on_evenFst_self (j : Fin n.succ) : basisAsCharges j (evenFst j) = 1 := by - simp [basisAsCharges] - -lemma basis_on_evenFst_other {k j : Fin n.succ} (h : k ≠ j) : - basisAsCharges k (evenFst j) = 0 := by - simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenFst, evenSnd] - 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 only [succ_eq_add_one, ne_eq, Fin.natAdd_eq_addNat, Fin.cast_inj, neg_eq_zero, - one_ne_zero] - rw [Fin.ext_iff] at h2 - simp only [Fin.val_castAdd, Fin.val_addNat] at h2 - omega - · rfl - -lemma basis_on_other {k : Fin n.succ} {j : Fin (2 * n.succ)} (h1 : j ≠ evenFst k) - (h2 : j ≠ evenSnd k) : basisAsCharges k j = 0 := by - simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges] - simp_all only [ne_eq, ↓reduceIte] - -lemma basis_evenSnd_eq_neg_evenFst (j i : Fin n.succ) : - basisAsCharges j (evenSnd i) = - basisAsCharges j (evenFst i) := by - simp only [basisAsCharges, succ_eq_add_one, PureU1_numberCharges, evenSnd, evenFst] - split <;> split - any_goals split - any_goals rfl - 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 - all_goals omega - -lemma basis_on_evenSnd_self (j : Fin n.succ) : basisAsCharges j (evenSnd j) = - 1 := by - rw [basis_evenSnd_eq_neg_evenFst, basis_on_evenFst_self] - -lemma basis_on_evenSnd_other {k j : Fin n.succ} (h : k ≠ j) : basisAsCharges k (evenSnd j) = 0 := by - rw [basis_evenSnd_eq_neg_evenFst, basis_on_evenFst_other h] - rfl - -/-! - -### B.3. The basis vectors satisfy the linear ACCs - --/ - -lemma basis_linearACC (j : Fin n.succ) : (accGrav (2 * n.succ)) (basisAsCharges j) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_even] - simp [basis_evenSnd_eq_neg_evenFst] -/-! - -### B.4. The basis vectors satisfy the cubic ACC - --/ -lemma basis_accCube (j : Fin n.succ) : - accCube (2 * n.succ) (basisAsCharges j) = 0 := by - rw [accCube_explicit, sum_even] - apply Finset.sum_eq_zero - intro i _ - simp only [succ_eq_add_one, Function.comp_apply, basis_evenSnd_eq_neg_evenFst] - ring - -/-! - -### B.5. The basis vectors as linear solutions - --/ - -/-- 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 - simp only [succ_eq_add_one, PureU1_numberLinear] at i - match i with - | 0 => - exact basis_linearACC j⟩ - -/-! - -### B.6. The inclusion of the first plane into charges - --/ - -/-- 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 - -/-! - -### B.7. Components of the inclusion into charges - --/ - -lemma P_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : P f (evenFst j) = f j := by - rw [P, sum_of_charges] - simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis_on_evenFst_self] - exact Rat.mul_one (f j) - · intro k _ hkj - rw [basis_on_evenFst_other hkj] - exact Rat.mul_zero (f k) - · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] - -lemma P_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : P f (evenSnd j) = - f j := by - rw [P, sum_of_charges] - simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · simp only [basis_on_evenSnd_self, mul_neg, mul_one] - · intro k _ hkj - simp only [basis_on_evenSnd_other hkj, mul_zero] - · simp - -lemma P_evenSnd_evenFst (f : Fin n.succ → ℚ) : P f ∘ evenSnd = - P f ∘ evenFst := by - funext j - simp only [PureU1_numberCharges, Function.comp_apply, Pi.neg_apply] - rw [P_evenFst, P_evenSnd] - -/-! - -### B.8. The inclusion into charges satisfies the linear and cubic ACCs - --/ - -lemma P_linearACC (f : Fin n.succ → ℚ) : (accGrav (2 * n.succ)) (P f) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_even] - simp [P_evenSnd, P_evenFst] - -lemma P_accCube (f : Fin n.succ → ℚ) : accCube (2 * n.succ) (P f) = 0 := by - rw [accCube_explicit, sum_even] - apply Finset.sum_eq_zero - intro i _ - simp only [succ_eq_add_one, Function.comp_apply, P_evenFst, P_evenSnd] - ring - -/-! - -### B.9. Kernel of the inclusion into charges - --/ - -lemma P_zero (f : Fin n.succ → ℚ) (h : P f = 0) : ∀ i, f i = 0 := by - intro i - erw [← P_evenFst f] - rw [h] - rfl - -/-! - -### B.10. The inclusion of the plane into linear solutions - --/ - -/-- 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 - -lemma P'_val (f : Fin n.succ → ℚ) : (P' f).val = P f := by - simp only [succ_eq_add_one, P', P] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### B.11. The basis vectors are linearly independent - --/ - -theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change P' f = 0 at h - 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 - rw [P'_val] at h1 - exact P_zero f h1 - -/-! - -### B.12. Every vector-like even solution is in the span of the basis of the first plane - --/ - -lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols) - (hS : VectorLikeEven S.val) : ∃ (M : (FamilyPermutations (2 * n.succ)).group), - (FamilyPermutations (2 * n.succ)).linSolRep M S ∈ Submodule.span ℚ (Set.range basis) := by - use (Tuple.sort S.val).symm - change sortAFL S ∈ Submodule.span ℚ (Set.range basis) - rw [Submodule.mem_span_range_iff_exists_fun ℚ] - let f : Fin n.succ → ℚ := fun i => (sortAFL S).val (evenFst i) - use f - apply ACCSystemLinear.LinSols.ext - rw [sortAFL_val] - erw [P'_val] - apply ext_even - · intro i - rw [P_evenFst] - rfl - · intro i - rw [P_evenSnd] - have ht := hS i - change sort S.val (evenFst i) = - sort S.val (evenSnd i) at ht - have h : sort S.val (evenSnd i) = - sort S.val (evenFst i) := by - rw [ht] - ring - rw [h] - rfl - -/-! - -## C. The vectors of the basis spanning the second plane, via the shifted even split - --/ - -/-- The second part of the basis as charges. -/ -def basis!AsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges := - fun i => - if i = evenShiftFst j then - 1 - else - if i = evenShiftSnd j then - - 1 - else - 0 -/-! - -### C.2. Components of the vectors - --/ - -lemma basis!_on_evenShiftFst_self (j : Fin n) : basis!AsCharges j (evenShiftFst j) = 1 := by - simp [basis!AsCharges] - -lemma basis!_on_other {k : Fin n} {j : Fin (2 * n.succ)} (h1 : j ≠ evenShiftFst k) - (h2 : j ≠ evenShiftSnd k) : basis!AsCharges k j = 0 := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] - simp_all only [ne_eq, ↓reduceIte] - -lemma basis!_on_evenShiftFst_other {k j : Fin n} (h : k ≠ j) : - basis!AsCharges k (evenShiftFst j) = 0 := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] - simp only [evenShiftFst, succ_eq_add_one, evenShiftSnd] - 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 - simp only [Fin.val_castAdd, Fin.val_addNat] at h2 - omega - · rfl - -lemma basis!_evenShftSnd_eq_neg_evenShiftFst (j i : Fin n) : - basis!AsCharges j (evenShiftSnd i) = - basis!AsCharges j (evenShiftFst i) := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges, evenShiftSnd, evenShiftFst] - split <;> split - any_goals split - any_goals split - any_goals rfl - all_goals - rename_i h1 h2 - rw [Fin.ext_iff] at h1 h2 - simp_all only [Fin.natAdd_eq_addNat, Fin.cast_inj, Fin.val_cast, Fin.val_natAdd, - Fin.val_castAdd, add_right_inj, Fin.val_addNat, add_eq_left] - · subst h1 - exact Fin.elim0 i - all_goals - rename_i h3 - rw [Fin.ext_iff] at h3 - simp_all only [Fin.val_natAdd, Fin.val_castAdd, Fin.val_addNat, not_true_eq_false] - all_goals - omega - -lemma basis!_on_evenShiftSnd_self (j : Fin n) : basis!AsCharges j (evenShiftSnd j) = - 1 := by - rw [basis!_evenShftSnd_eq_neg_evenShiftFst, basis!_on_evenShiftFst_self] - -lemma basis!_on_evenShiftSnd_other {k j : Fin n} (h : k ≠ j) : - basis!AsCharges k (evenShiftSnd j) = 0 := by - rw [basis!_evenShftSnd_eq_neg_evenShiftFst, basis!_on_evenShiftFst_other h] - rfl - -lemma basis!_on_evenShiftZero (j : Fin n) : basis!AsCharges j evenShiftZero = 0 := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] - split<;> rename_i h - · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftFst, Fin.ext_iff, - Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, Fin.val_natAdd] at h - omega - · split <;> rename_i h2 - · simp only [evenShiftZero, succ_eq_add_one, Fin.isValue, evenShiftSnd, Fin.ext_iff, - Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, Fin.val_natAdd] at h2 - omega - · rfl - -lemma basis!_on_evenShiftLast (j : Fin n) : basis!AsCharges j evenShiftLast = 0 := by - simp only [basis!AsCharges, succ_eq_add_one, PureU1_numberCharges] - split <;> rename_i h - · rw [Fin.ext_iff] at h - simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, evenShiftFst, Fin.val_castAdd, add_right_inj] at h - omega - · split <;> rename_i h2 - · rw [Fin.ext_iff] at h2 - simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, evenShiftSnd, Fin.val_castAdd, add_right_inj] at h2 - omega - · rfl - -/-! - -### C.3. The vectors satisfy the linear ACCs - --/ - -lemma basis!_linearACC (j : Fin n) : (accGrav (2 * n.succ)) (basis!AsCharges j) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_evenShift, basis!_on_evenShiftZero, basis!_on_evenShiftLast] - simp [basis!_evenShftSnd_eq_neg_evenShiftFst] - -/-! - -### C.4. The vectors satisfy the cubic ACC - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma basis!_accCube (j : Fin n) : - accCube (2 * n.succ) (basis!AsCharges j) = 0 := by - rw [accCube_explicit, sum_evenShift] - rw [basis!_on_evenShiftLast, basis!_on_evenShiftZero] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, - zero_add] - apply Finset.sum_eq_zero - intro i _ - simp only [basis!_evenShftSnd_eq_neg_evenShiftFst] - ring - -/-! - -### C.6. The vectors as linear solutions - --/ -/-- 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 - simp only [succ_eq_add_one, PureU1_numberLinear] at i - match i with - | 0 => - exact basis!_linearACC j⟩ - -/-! - -### C.7. The inclusion of the second plane into charges - --/ - -/-- 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 - -/-! - -### C.8. Components of the inclusion into charges - --/ - -lemma P!_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : P! f (evenShiftFst j) = f j := by - rw [P!, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis!_on_evenShiftFst_self] - exact Rat.mul_one (f j) - · intro k _ hkj - rw [basis!_on_evenShiftFst_other hkj] - exact Rat.mul_zero (f k) - · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] - -lemma P!_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : P! f (evenShiftSnd j) = - f j := by - rw [P!, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis!_on_evenShiftSnd_self] - exact mul_neg_one (f j) - · intro k _ hkj - rw [basis!_on_evenShiftSnd_other hkj] - exact Rat.mul_zero (f k) - · simp - -lemma P!_evenShiftZero (f : Fin n → ℚ) : P! f (evenShiftZero) = 0 := by - rw [P!, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, basis!_on_evenShiftZero] - -lemma P!_evenShiftLast (f : Fin n → ℚ) : P! f evenShiftLast = 0 := by - rw [P!, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, basis!_on_evenShiftLast] - -/-! - -### C.9. The inclusion into charges satisfies the cubic ACC - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma P!_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (P! f) = 0 := by - rw [accCube_explicit, sum_evenShift, P!_evenShiftZero, P!_evenShiftLast] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, - zero_add] - apply Finset.sum_eq_zero - intro i _ - simp only [P!_evenShiftFst, P!_evenShiftSnd] - ring - -/-! - -### C.10. Kernel of the inclusion into charges - --/ - -lemma P!_zero (f : Fin n → ℚ) (h : P! f = 0) : ∀ i, f i = 0 := by - intro i - rw [← P!_evenShiftFst f] - rw [h] - rfl - -/-! - -### C.11. The inclusion of the second plane into the span of the basis - --/ - -lemma P!_in_span (f : Fin n → ℚ) : P! f ∈ Submodule.span ℚ (Set.range basis!AsCharges) := by - rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] - use f - rfl - -/-! - -### C.12. The inclusion of the plane into linear solutions - --/ - -/-- 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 - -lemma P!'_val (f : Fin n → ℚ) : (P!' f).val = P! f := by - simp only [succ_eq_add_one, P!', P!] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### C.13. The basis vectors are linearly independent - --/ - -theorem basis!_linear_independent : LinearIndependent ℚ (@basis! n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change P!' f = 0 at h - 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 - rw [P!'_val] at h1 - exact P!_zero f h1 - -/-! - -### C.14. Properties of the basis vectors relating to the span - --/ - -lemma smul_basis!AsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : Fin n) : - (S.val (evenShiftSnd j) - S.val (evenShiftFst 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] - -/-! - -### C.15. Permutations as additions of basis vectors - --/ - -/-- Swapping the elements evenShiftFst j and evenShiftSnd 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 - (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') : - S'.val = S.val + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j := by - funext i - rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] - by_cases hi : i = evenShiftFst j - · subst hi - simp [HSMul.hSMul, basis!_on_evenShiftFst_self, Equiv.swap_apply_left] - · by_cases hi2 : i = evenShiftSnd j - · simp [HSMul.hSMul, hi2, basis!_on_evenShiftSnd_self, Equiv.swap_apply_right] - · simp only [succ_eq_add_one, Equiv.invFun_as_coe, HSMul.hSMul, - ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul] - rw [basis!_on_other hi hi2] - aesop -/-! - -## D. Mixed cubic ACCs involving points from both planes - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma P_P_P!_accCube (g : Fin n.succ → ℚ) (j : Fin n) : - accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) - = g (j.succ) ^ 2 - g (j.castSucc) ^ 2 := by - simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, - TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_evenShift, basis!_on_evenShiftZero, basis!_on_evenShiftLast] - simp only [mul_zero, add_zero, Function.comp_apply, zero_add] - rw [Finset.sum_eq_single j, basis!_on_evenShiftFst_self, basis!_on_evenShiftSnd_self] - · simp only [evenShiftFst_eq_evenFst_succ, mul_one, evenShiftSnd_eq_evenSnd_castSucc, mul_neg] - rw [P_evenFst, P_evenSnd] - ring - · intro k _ hkj - erw [basis!_on_evenShiftFst_other hkj.symm, basis!_on_evenShiftSnd_other hkj.symm] - simp only [mul_zero, add_zero] - · simp - -set_option backward.isDefEq.respectTransparency false in -lemma P_P!_P!_accCube (g : Fin n → ℚ) (j : Fin n.succ) : - accCubeTriLinSymm (P! g) (P! g) (basisAsCharges j) - = (P! g (evenFst j))^2 - (P! g (evenSnd j))^2 := by - simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, - TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_even] - simp only [Function.comp_apply] - rw [Finset.sum_eq_single j, basis_on_evenFst_self, basis_on_evenSnd_self] - · simp only [mul_one, mul_neg] - ring - · intro k _ hkj - erw [basis_on_evenFst_other hkj.symm, basis_on_evenSnd_other hkj.symm] - simp only [mul_zero, add_zero] - · simp - -/-! - ## E. The combined basis -/ @@ -826,8 +79,8 @@ lemma P_P!_P!_accCube (g : Fin n → ℚ) (j : Fin n.succ) : /-- 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 + | .inl i => symmBasis i + | .inr i => shiftBasis i /-! @@ -836,7 +89,8 @@ def basisa : (Fin n.succ) ⊕ (Fin n) → (PureU1 (2 * n.succ)).LinSols := fun 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 := + symmPlane f + shiftPlane g /-! @@ -848,26 +102,27 @@ lemma Pa_evenShiftFst (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : Pa f g (evenShiftFst j) = f j.succ + g j := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [P!_evenShiftFst, evenShiftFst_eq_evenFst_succ, P_evenFst] + rw [shiftPlane_evenShiftFst, evenShiftFst_eq_evenFst_succ, symmPlane_evenFst] lemma Pa_evenShiftSnd (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : Pa f g (evenShiftSnd j) = - f j.castSucc - g j := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [P!_evenShiftSnd, evenShiftSnd_eq_evenSnd_castSucc, P_evenSnd] + rw [shiftPlane_evenShiftSnd, evenShiftSnd_eq_evenSnd_castSucc, symmPlane_evenSnd] ring -lemma Pa_evenShitZero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : Pa f g (evenShiftZero) = f 0 := by +lemma Pa_evenShiftZero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : + Pa f g (evenShiftZero) = f 0 := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [P!_evenShiftZero, evenShiftZero_eq_evenFst_zero, P_evenFst] + rw [shiftPlane_evenShiftZero, evenShiftZero_eq_evenFst_zero, symmPlane_evenFst] exact Rat.add_zero (f 0) lemma Pa_evenShiftLast (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : Pa f g (evenShiftLast) = - f (Fin.last n) := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [P!_evenShiftLast, evenShiftLast_eq_evenSnd_last, P_evenSnd] + rw [shiftPlane_evenShiftLast, evenShiftLast_eq_evenSnd_last, symmPlane_evenSnd] exact Rat.add_zero (-f (Fin.last n)) /-! @@ -879,7 +134,7 @@ lemma Pa_evenShiftLast (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : set_option backward.isDefEq.respectTransparency false in lemma Pa_zero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : ∀ i, f i = 0 := by - have h₃ := Pa_evenShitZero f g + have h₃ := Pa_evenShiftZero f g rw [h] at h₃ change 0 = f 0 at h₃ intro i @@ -900,12 +155,12 @@ lemma Pa_zero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : exact right_eq_add.mp h1 exact hinduc i.val i.prop -lemma Pa_zero! (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : +lemma Pa_zero_shift (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 + rw [Pa, symmPlane] at h simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h - exact P!_zero g h + exact shiftPlane_zero g h /-! @@ -916,8 +171,8 @@ lemma Pa_zero! (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : 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) → ℚ) : - Pa' f = P' (f ∘ Sum.inl) + P!' (f ∘ Sum.inr) := by +lemma Pa'_symmPlaneLinSols_shiftPlaneLinSols (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : + Pa' f = symmPlaneLinSols (f ∘ Sum.inl) + shiftPlaneLinSols (f ∘ Sum.inr) := by exact Fintype.sum_sum_type _ /-! @@ -934,12 +189,13 @@ theorem basisa_linear_independent : LinearIndependent ℚ (@basisa n) := by (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 - 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 + rw [Pa'_symmPlaneLinSols_shiftPlaneLinSols] at h1 + change (symmPlaneLinSols (f ∘ Sum.inl)).val + + (shiftPlaneLinSols (f ∘ Sum.inr)).val = 0 at h1 + rw [shiftPlaneLinSols_val, symmPlaneLinSols_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 + have hg := Pa_zero_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 intro i simp_all cases i @@ -973,8 +229,9 @@ lemma Pa'_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : · rw [Pa'_eq, Sum.elim_eq_iff] 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] + rw [Pa'_symmPlaneLinSols_shiftPlaneLinSols, Pa'_symmPlaneLinSols_shiftPlaneLinSols] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, + symmPlaneLinSols_val, shiftPlaneLinSols_val] exact h lemma Pa_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : @@ -1007,21 +264,22 @@ noncomputable def basisaAsBasis : /-! -## F. Every Lienar solution is the sum of a point from each plane +## F. Every linear solution is the sum of a point from each plane -/ lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) : - ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = P g + P! f := by + ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlane g + shiftPlane f := by have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisaAsBasis S) obtain ⟨f, hf⟩ := h simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, Fintype.sum_sum_type] at hf - change P' _ + P!' _ = S at hf + change symmPlaneLinSols _ + shiftPlaneLinSols _ = S at hf use f ∘ Sum.inl use f ∘ Sum.inr rw [← hf] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, + symmPlaneLinSols_val, shiftPlaneLinSols_val] rfl /-! @@ -1029,26 +287,27 @@ lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) : ### F.1. Relation under permutations -/ -lemma span_basis_swap! {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) +lemma span_basis_swapShift {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) (hS : ((FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') (g : Fin n.succ → ℚ) (f : Fin n → ℚ) - (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 (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j ∧ g' = g := by - let X := P! f + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • basis!AsCharges j - have hX : X ∈ Submodule.span ℚ (Set.range (basis!AsCharges)) := by + (h : S.val = symmPlane g + shiftPlane f) : ∃ (g' : Fin n.succ → ℚ) (f' : Fin n → ℚ), + S'.val = symmPlane g' + shiftPlane f' ∧ shiftPlane f' = shiftPlane f + + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by + let X := shiftPlane f + + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j + have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by apply Submodule.add_mem - exact (P!_in_span f) - exact (smul_basis!AsCharges_in_span S j) + exact (shiftPlane_in_span f) + exact (smul_shiftBasisAsCharges_in_span S j) have hXsum := (Submodule.mem_span_range_iff_exists_fun ℚ).mp hX obtain ⟨f', hf'⟩ := hXsum use g use f' - change P! f' = _ at hf' + change shiftPlane f' = _ at hf' erw [hf'] simp only [and_self, and_true, X] rw [← add_assoc, ← h] - apply swap!_as_add at hS + apply swapShift_as_add at hS exact hS end VectorLikeEvenPlane From c4f83c33728f71bad2b6ef0fc2944b5b355b2bec Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:41:19 +0000 Subject: [PATCH 16/22] refactor: Odd/BasisLinear.lean to only contain sections E and F with renamed identifiers imports from ShiftPlane and renamed identifiers (symmPlane, shiftPlane, symmPlaneLinSols, shiftPlaneLinSols, symmBasis, shiftBasis, etc.). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../AnomalyCancellation/Odd/BasisLinear.lean | 816 ++---------------- 1 file changed, 51 insertions(+), 765 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean index 7257d0bb6..cba83a447 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean @@ -5,55 +5,23 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear -public import Physlib.QFT.QED.AnomalyCancellation.VectorLike +public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ShiftPlane /-! -# Splitting the linear solutions in the odd case into two ACC-satisfying planes +# The combined basis for the odd case -## i. Overview +This file combines the symmetric and shifted planes into a single basis for the linear solutions +of `PureU1 (2 * n + 1)`. Every linear solution is the sum of a point from each plane. -We split the linear solutions of `PureU1 (2 * n + 1)` into two planes, -where every point in either plane satisfies both the linear and cubic anomaly cancellation -conditions. +## Key results -## ii. Key results - -- `P'` : The inclusion of the first plane into linear solutions -- `P_accCube` : The statement that chares from the first plane satisfy the cubic ACC -- `P!'` : The inclusion of the second plane. -- `P!_accCube` : The statement that charges from the second plane satisfy the cubic ACC - `span_basis` : Every linear solution is the sum of a point from each plane. +- `symmPlaneLinSols` : The inclusion of the symmetric plane into linear solutions. +- `shiftPlaneLinSols` : The inclusion of the shifted plane into linear solutions. +- `basisa_linear_independent` : The combined basis vectors are linearly independent. +- `basisaAsBasis` : The combined basis as a `Basis`. + +## Table of contents -## iii. Table of contents - -- A. Splitting the charges up into groups - - A.1. The symmetric split: Spltting the charges up via `(n + 1) + 1` - - A.2. The shifted split: Spltting the charges up via `1 + n + n` - - A.3. The shifte shifted split: Spltting the charges up via `((1+n)+1) + n.succ` - - A.4. Relating the splittings together -- B. The first plane - - B.1. The basis vectors of the first plane as charges - - B.2. Components of the basis vectors as charges - - B.3. The basis vectors satisfy the linear ACCs - - B.4. The basis vectors as `LinSols` - - B.5. The inclusion of the first plane into charges - - B.6. Components of the first plane - - B.7. Points on the first plane satisfies the ACCs - - B.8. Kernel of the inclusion into charges - - B.9. The basis vectors are linearly independent -- C. The second plane - - C.1. The basis vectors of the second plane as charges - - C.2. Components of the basis vectors as charges - - C.3. The basis vectors satisfy the linear ACCs - - C.4. The basis vectors as `LinSols` - - C.5. Permutations equal adding basis vectors - - C.6. The inclusion of the second plane into charges - - C.7. Components of the second plane - - C.8. Points on the second plane satisfies the ACCs - - C.9. Kernel of the inclusion into charges - - C.10. The inclusion of the second plane into LinSols - - C.11. The basis vectors are linearly independent -- D. The mixed cubic ACC from points in both planes - E. The combined basis - E.1. The combined basis as `LinSols` - E.2. The inclusion of the span of the combined basis into charges @@ -64,13 +32,9 @@ conditions. - E.7. Injectivity of the inclusion into linear solutions - E.8. Cardinality of the basis - E.9. The basis vectors as a basis -- F. Every Lienar solution is the sum of a point from each plane +- F. Every linear solution is the sum of a point from each plane - F.1. Relation under permutations -## iv. References - -- https://arxiv.org/pdf/1912.04804.pdf - -/ @[expose] public section @@ -85,689 +49,6 @@ namespace VectorLikeOddPlane /-! -## A. Splitting the charges up into groups - -We have `2 * n + 1` charges, which we split up in the following ways: - -`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` - -``` -| evenShiftZero (0) | evenShiftFst j (1 to n) | - evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | -``` - --/ - -section theDeltas - -/-! - -### A.1. The symmetric split: Spltting the charges up via `(n + 1) + 1` - --/ - -lemma odd_shift_eq (n : ℕ) : (1 + n) + n = 2 * n +1 := by - omega - -/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the first `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddFst (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.castAdd n (Fin.castAdd 1 j)) - -/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the second `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddSnd (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.natAdd (n+1) j) - -/-- The element representing `1` in `Fin ((n + 1) + n)`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddMid : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.castAdd n (Fin.natAdd n 1)) - -lemma sum_odd (S : Fin (2 * n + 1) → ℚ) : - ∑ i, S i = S oddMid + ∑ i : Fin n, ((S ∘ oddFst) i + (S ∘ oddSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (n + 1 + n), S (Fin.cast (split_odd n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (split_odd n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1] - rw [Fin.sum_univ_add, Fin.sum_univ_add] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - nth_rewrite 2 [add_comm] - rw [add_assoc] - rw [Finset.sum_add_distrib] - rfl - -/-! - -### A.2. The shifted split: Spltting the charges up via `1 + n + n` - --/ - -/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the first `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftFst (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.natAdd 1 j)) - -/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the second `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftSnd (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.natAdd (1 + n) j) - -/-- The element representing the `1` in `Fin (1 + n + n)`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftZero : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.castAdd n 1)) - -lemma sum_oddShift (S : Fin (2 * n + 1) → ℚ) : - ∑ i, S i = S oddShiftZero + ∑ i : Fin n, ((S ∘ oddShiftFst) i + (S ∘ oddShiftSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin ((1+n)+n), S (Fin.cast (odd_shift_eq n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (odd_shift_eq n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1, Fin.sum_univ_add, Fin.sum_univ_add] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - rw [add_assoc, Finset.sum_add_distrib] - rfl - -/-! - -### A.3. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` - --/ - -lemma odd_shift_shift_eq (n : ℕ) : ((1+n)+1) + n.succ = 2 * n.succ + 1 := by - omega - -/-- The element representing the first `1` in `Fin (1 + n + 1 + n.succ)` casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftZero : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.castAdd n 1))) - -/-- The inclusion of `Fin n` into `Fin (1 + n + 1 + n.succ)` via the first `n` and casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftFst (j : Fin n) : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.natAdd 1 j))) - -/-- The element representing the second `1` in `Fin (1 + n + 1 + n.succ)` casted - to `2 * n.succ + 1`. -/ -def oddShiftShiftMid : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.natAdd (1+n) 1)) - -/-- The inclusion of `Fin n.succ` into `Fin (1 + n + 1 + n.succ)` via the `n.succ` and casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftSnd (j : Fin n.succ) : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.natAdd ((1+n)+1) j) - -/-! - -### A.4. Relating the splittings together - --/ -lemma oddShiftShiftZero_eq_oddFst_zero : @oddShiftShiftZero n = oddFst 0 := - Fin.rev_inj.mp rfl - -lemma oddShiftShiftZero_eq_oddShiftZero : @oddShiftShiftZero n = oddShiftZero := rfl - -lemma oddShiftShiftFst_eq_oddFst_succ (j : Fin n) : - oddShiftShiftFst j = oddFst j.succ := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, - oddFst, Fin.val_succ] - exact Nat.add_comm 1 ↑j - -lemma oddShiftShiftFst_eq_oddShiftFst_castSucc (j : Fin n) : - oddShiftShiftFst j = oddShiftFst j.castSucc := by - rfl - -lemma oddShiftShiftMid_eq_oddMid : @oddShiftShiftMid n = oddMid := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, - Fin.val_natAdd, Fin.val_eq_zero, add_zero, oddMid] - exact Nat.add_comm 1 n - -lemma oddShiftShiftMid_eq_oddShiftFst_last : oddShiftShiftMid = oddShiftFst (Fin.last n) := by - rfl - -lemma oddShiftShiftSnd_eq_oddSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddSnd j := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] - exact Nat.add_comm 1 n - -lemma oddShiftShiftSnd_eq_oddShiftSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddShiftSnd j := by - rw [Fin.ext_iff] - rfl - -lemma oddSnd_eq_oddShiftSnd (j : Fin n) : oddSnd j = oddShiftSnd j := by - rw [Fin.ext_iff] - simp only [oddSnd, Fin.val_cast, Fin.val_natAdd, oddShiftSnd, add_left_inj] - exact Nat.add_comm n 1 - -lemma oddShiftZero_eq_oddFst : oddShiftZero = oddFst (0 : Fin n.succ) := by - ext - simp [oddShiftZero, oddFst] - -lemma oddShiftFst_castSucc_eq_oddFst_succ (j : Fin n) : - oddShiftFst j.castSucc = oddFst j.succ := by - rw [Fin.ext_iff] - simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddFst, Fin.val_succ] - exact Nat.add_comm 1 ↑j - -lemma oddShiftFst_last_eq_oddMid : oddShiftFst (Fin.last n) = oddMid := by - rw [Fin.ext_iff] - simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddMid, Fin.val_last] - exact Nat.add_comm 1 n - -lemma oddShiftSnd_eq_oddSnd (j : Fin n) : oddShiftSnd j = oddSnd j := by - rw [Fin.ext_iff] - simp only [oddShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] - ring - -end theDeltas - -/-! - -## B. The first plane - --/ - -/-! - -### B.1. The basis vectors of the first plane as charges - --/ - -/-- The first part of the basis as charge assignments. -/ -def basisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := - fun i => - if i = oddFst j then - 1 - else - if i = oddSnd j then - - 1 - else - 0 - -/-! - -### B.2. Components of the basis vectors as charges - --/ - -lemma basis_on_oddFst_self (j : Fin n) : basisAsCharges j (oddFst j) = 1 := by - simp [basisAsCharges] - -lemma basis_on_oddFst_other {k j : Fin n} (h : k ≠ j) : - basisAsCharges k (oddFst j) = 0 := by - simp only [basisAsCharges, PureU1_numberCharges] - simp only [oddFst, oddSnd] - 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 - simp only [Fin.val_castAdd, Fin.val_natAdd] at h2 - omega - · rfl - -lemma basis_on_other {k : Fin n} {j : Fin (2 * n + 1)} (h1 : j ≠ oddFst k) (h2 : j ≠ oddSnd k) : - basisAsCharges k j = 0 := by - simp only [basisAsCharges, PureU1_numberCharges] - simp_all only [ne_eq, ↓reduceIte] - -lemma basis_oddSnd_eq_minus_oddFst (j i : Fin n) : - basisAsCharges j (oddSnd i) = - basisAsCharges j (oddFst i) := by - simp only [basisAsCharges, PureU1_numberCharges, oddSnd, oddFst] - split <;> split - any_goals split - any_goals split - any_goals rfl - all_goals - rename_i h1 h2 - rw [Fin.ext_iff] at h1 h2 - simp_all only [Fin.cast_inj, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, neg_neg, - add_eq_right, AddLeftCancelMonoid.add_eq_zero, one_ne_zero, and_false, not_false_eq_true] - all_goals - rename_i h3 - rw [Fin.ext_iff] at h3 - simp_all only [Fin.val_natAdd, Fin.val_castAdd, add_eq_right, - AddLeftCancelMonoid.add_eq_zero, one_ne_zero, and_false, not_false_eq_true] - all_goals - omega - -lemma basis_on_oddSnd_self (j : Fin n) : basisAsCharges j (oddSnd j) = - 1 := by - rw [basis_oddSnd_eq_minus_oddFst, basis_on_oddFst_self] - -lemma basis_on_oddSnd_other {k j : Fin n} (h : k ≠ j) : basisAsCharges k (oddSnd j) = 0 := by - rw [basis_oddSnd_eq_minus_oddFst, basis_on_oddFst_other h] - rfl - -lemma basis_on_oddMid (j : Fin n) : basisAsCharges j oddMid = 0 := by - simp only [basisAsCharges, PureU1_numberCharges] - split <;> rename_i h - · rw [Fin.ext_iff] at h - simp only [oddMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, Fin.val_eq_zero, - add_zero, oddFst] at h - omega - · split <;> rename_i h2 - · rw [Fin.ext_iff] at h2 - simp only [oddMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, oddSnd] at h2 - omega - · rfl - -/-! - -### B.3. The basis vectors satisfy the linear ACCs - --/ - -lemma basis_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (basisAsCharges j) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - erw [sum_odd] - simp [basis_oddSnd_eq_minus_oddFst, basis_on_oddMid] - -/-! - -### B.4. The basis vectors as `LinSols` - --/ - -/-- The first part of the basis as `LinSols`. -/ -@[simps!] -def basis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := - ⟨basisAsCharges j, by - intro i - simp only [PureU1_numberLinear] at i - match i with - | 0 => - exact basis_linearACC j⟩ - -/-! - -### B.5. The inclusion of the first plane into charges - --/ - -/-- A point in the span of the first part of the basis as a charge. -/ -def P (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • basisAsCharges i - -/-! - -### B.6. Components of the first plane - --/ - -lemma P_oddFst (f : Fin n → ℚ) (j : Fin n) : P f (oddFst j) = f j := by - rw [P, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis_on_oddFst_self] - exact Rat.mul_one (f j) - · intro k _ hkj - rw [basis_on_oddFst_other hkj] - exact Rat.mul_zero (f k) - · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] - -lemma P_oddSnd (f : Fin n → ℚ) (j : Fin n) : P f (oddSnd j) = - f j := by - rw [P, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis_on_oddSnd_self] - exact mul_neg_one (f j) - · intro k _ hkj - rw [basis_on_oddSnd_other hkj] - exact Rat.mul_zero (f k) - · simp - -lemma P_oddMid (f : Fin n → ℚ) : P f oddMid = 0 := by - rw [P, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, basis_on_oddMid] - -/-! - -### B.7. Points on the first plane satisfies the ACCs - --/ - -lemma P_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (P f) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_odd] - simp [P_oddSnd, P_oddFst, P_oddMid] - -set_option backward.isDefEq.respectTransparency false in -lemma P_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (P f) = 0 := by - rw [accCube_explicit, sum_odd, P_oddMid] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] - apply Finset.sum_eq_zero - intro i _ - simp only [P_oddFst, P_oddSnd] - ring - -/-! - -### B.8. Kernel of the inclusion into charges - --/ - -lemma P_zero (f : Fin n → ℚ) (h : P f = 0) : ∀ i, f i = 0 := by - intro i - erw [← P_oddFst f] - rw [h] - rfl - -/-- A point in the span of the first part of the basis. -/ -def P' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basis i - -lemma P'_val (f : Fin n → ℚ) : (P' f).val = P f := by - simp only [P', P] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### B.9. The basis vectors are linearly independent - --/ - -theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change P' f = 0 at h - 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 - rw [P'_val] at h1 - exact P_zero f h1 - -/-! - -## C. The second plane - --/ - -/-! - -### C.1. The basis vectors of the second plane as charges - --/ - -/-- The second part of the basis as charge assignments. -/ -def basis!AsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := - fun i => - if i = oddShiftFst j then - 1 - else - if i = oddShiftSnd j then - - 1 - else - 0 - -/-! - -### C.2. Components of the basis vectors as charges - --/ - -lemma basis!_on_oddShiftFst_self (j : Fin n) : basis!AsCharges j (oddShiftFst j) = 1 := by - simp [basis!AsCharges] - -lemma basis!_on_oddShiftFst_other {k j : Fin n} (h : k ≠ j) : - basis!AsCharges k (oddShiftFst j) = 0 := by - simp only [basis!AsCharges, PureU1_numberCharges] - simp only [oddShiftFst, oddShiftSnd] - 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 - simp only [Fin.val_castAdd, Fin.val_natAdd] at h2 - omega - rfl - -lemma basis!_on_other {k : Fin n} {j : Fin (2 * n + 1)} - (h1 : j ≠ oddShiftFst k) (h2 : j ≠ oddShiftSnd k) : - basis!AsCharges k j = 0 := by - simp only [basis!AsCharges, PureU1_numberCharges] - simp_all only [ne_eq, ↓reduceIte] - -lemma basis!_oddShiftSnd_eq_minus_oddShiftFst (j i : Fin n) : - basis!AsCharges j (oddShiftSnd i) = - basis!AsCharges j (oddShiftFst i) := by - simp only [basis!AsCharges, PureU1_numberCharges, oddShiftSnd, oddShiftFst] - 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 - all_goals rename_i h3 - all_goals rw [Fin.ext_iff] at h3 - all_goals simp_all - all_goals omega - -lemma basis!_on_oddShiftSnd_self (j : Fin n) : basis!AsCharges j (oddShiftSnd j) = - 1 := by - rw [basis!_oddShiftSnd_eq_minus_oddShiftFst, basis!_on_oddShiftFst_self] - -lemma basis!_on_oddShiftSnd_other {k j : Fin n} (h : k ≠ j) : - basis!AsCharges k (oddShiftSnd j) = 0 := by - rw [basis!_oddShiftSnd_eq_minus_oddShiftFst, basis!_on_oddShiftFst_other h] - rfl - -lemma basis!_on_oddShiftZero (j : Fin n) : basis!AsCharges j oddShiftZero = 0 := by - simp only [basis!AsCharges, PureU1_numberCharges] - split <;> rename_i h - · rw [Fin.ext_iff] at h - simp only [oddShiftZero, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, - oddShiftFst, Fin.val_natAdd] at h - omega - · split <;> rename_i h2 - · rw [Fin.ext_iff] at h2 - simp only [oddShiftZero, Fin.isValue, Fin.val_cast, Fin.val_castAdd, Fin.val_eq_zero, - oddShiftSnd, Fin.val_natAdd] at h2 - omega - · rfl - -/-! - -### C.3. The basis vectors satisfy the linear ACCs - --/ - -lemma basis!_linearACC (j : Fin n) : (accGrav (2 * n + 1)) (basis!AsCharges j) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_oddShift, basis!_on_oddShiftZero] - simp [basis!_oddShiftSnd_eq_minus_oddShiftFst] - -/-! - -### C.4. The basis vectors as `LinSols` - --/ - -/-- The second part of the basis as `LinSols`. -/ -@[simps!] -def basis! (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := - ⟨basis!AsCharges j, by - intro i - simp only [PureU1_numberLinear] at i - match i with - | 0 => - exact basis!_linearACC j⟩ - -/-! - -### C.5. Permutations equal adding basis vectors - --/ - -/-- Swapping the elements oddShiftFst j and oddShiftSnd j is equivalent to adding a vector - basis!AsCharges j. -/ -lemma swap!_as_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) - (hS : ((FamilyPermutations (2 * n + 1)).linSolRep - (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') : - S'.val = S.val + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j := by - funext i - rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] - by_cases hi : i = oddShiftFst j - · subst hi - simp [HSMul.hSMul, basis!_on_oddShiftFst_self, Equiv.swap_apply_left] - · by_cases hi2 : i = oddShiftSnd j - · subst hi2 - simp [HSMul.hSMul,basis!_on_oddShiftSnd_self, Equiv.swap_apply_right] - · simp only [Equiv.invFun_as_coe, HSMul.hSMul, ACCSystemCharges.chargesAddCommMonoid_add, - ACCSystemCharges.chargesModule_smul] - rw [basis!_on_other hi hi2] - aesop - -/-! - -### C.6. The inclusion of the second plane into charges - --/ - -/-- A point in the span of the second part of the basis as a charge. -/ -def P! (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • basis!AsCharges i - -/-! - -### C.7. Components of the second plane - --/ - -lemma P!_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : P! f (oddShiftFst j) = f j := by - rw [P!, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis!_on_oddShiftFst_self] - exact Rat.mul_one (f j) - · intro k _ hkj - rw [basis!_on_oddShiftFst_other hkj] - exact Rat.mul_zero (f k) - · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] - -lemma P!_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : P! f (oddShiftSnd j) = - f j := by - rw [P!, sum_of_charges] - simp only [HSMul.hSMul, SMul.smul] - rw [Finset.sum_eq_single j] - · rw [basis!_on_oddShiftSnd_self] - exact mul_neg_one (f j) - · intro k _ hkj - rw [basis!_on_oddShiftSnd_other hkj] - exact Rat.mul_zero (f k) - · simp - -lemma P!_oddShiftZero (f : Fin n → ℚ) : P! f oddShiftZero = 0 := by - rw [P!, sum_of_charges] - simp [HSMul.hSMul, SMul.smul, basis!_on_oddShiftZero] - -/-! - -### C.8. Points on the second plane satisfies the ACCs - --/ - -lemma P!_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (P! f) = 0 := by - rw [accGrav] - simp only [LinearMap.coe_mk, AddHom.coe_mk] - rw [sum_oddShift] - simp [P!_oddShiftSnd, P!_oddShiftFst, P!_oddShiftZero] - -set_option backward.isDefEq.respectTransparency false in -lemma P!_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (P! f) = 0 := by - rw [accCube_explicit, sum_oddShift, P!_oddShiftZero] - simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] - apply Finset.sum_eq_zero - intro i _ - simp only [P!_oddShiftFst, P!_oddShiftSnd] - ring - -/-! - -### C.9. Kernel of the inclusion into charges - --/ - -lemma P!_zero (f : Fin n → ℚ) (h : P! f = 0) : ∀ i, f i = 0 := by - intro i - rw [← P!_oddShiftFst f] - rw [h] - rfl - -/-! - -### C.10. The inclusion of the second plane into LinSols - --/ - -/-- A point in the span of the second part of the basis. -/ -def P!' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basis! i - -lemma P!'_val (f : Fin n → ℚ) : (P!' f).val = P! f := by - simp only [P!', P!] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### C.11. The basis vectors are linearly independent - --/ - -theorem basis!_linear_independent : LinearIndependent ℚ (@basis! n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change P!' f = 0 at h - 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 - rw [P!'_val] at h1 - exact P!_zero f h1 - -/-! - -## D. The mixed cubic ACC from points in both planes - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma P_P_P!_accCube (g : Fin n → ℚ) (j : Fin n) : - accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) - = (P g (oddShiftFst j))^2 - (g j)^2 := by - simp only [accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_oddShift, basis!_on_oddShiftZero] - simp only [mul_zero, Function.comp_apply, zero_add] - rw [Finset.sum_eq_single j, basis!_on_oddShiftFst_self, basis!_on_oddShiftSnd_self] - · rw [← oddSnd_eq_oddShiftSnd, P_oddSnd] - ring - · intro k _ hkj - erw [basis!_on_oddShiftFst_other hkj.symm, basis!_on_oddShiftSnd_other hkj.symm] - simp only [mul_zero, add_zero] - · simp - -/-! - ## E. The combined basis -/ @@ -781,8 +62,8 @@ lemma P_P_P!_accCube (g : Fin n → ℚ) (j : Fin n) : /-- The whole basis as `LinSols`. -/ def basisa : Fin n ⊕ Fin n → (PureU1 (2 * n + 1)).LinSols := fun i => match i with - | .inl i => basis i - | .inr i => basis! i + | .inl i => symmBasis i + | .inr i => shiftBasis i /-! @@ -791,7 +72,8 @@ def basisa : Fin n ⊕ Fin n → (PureU1 (2 * n + 1)).LinSols := fun i => -/ /-- A point in the span of the basis as a charge. -/ -def Pa (f : Fin n → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := P f + P! g +def Pa (f : Fin n → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := + symmPlane f + shiftPlane g /-! @@ -804,7 +86,7 @@ lemma Pa_oddShiftShiftZero (f g : Fin n.succ → ℚ) : Pa f g oddShiftShiftZero simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftZero_eq_oddFst_zero] rw [oddShiftShiftZero_eq_oddShiftZero] - rw [P!_oddShiftZero, oddShiftZero_eq_oddFst, P_oddFst] + rw [shiftPlane_oddShiftZero, oddShiftZero_eq_oddFst, symmPlane_oddFst] exact Rat.add_zero (f 0) lemma Pa_oddShiftShiftFst (f g : Fin n.succ → ℚ) (j : Fin n) : @@ -813,14 +95,15 @@ lemma Pa_oddShiftShiftFst (f g : Fin n.succ → ℚ) (j : Fin n) : simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftFst_eq_oddFst_succ] rw [oddShiftShiftFst_eq_oddShiftFst_castSucc] - rw [P!_oddShiftFst, oddShiftFst_castSucc_eq_oddFst_succ, P_oddFst] + rw [shiftPlane_oddShiftFst, oddShiftFst_castSucc_eq_oddFst_succ, symmPlane_oddFst] -lemma Pa_oddShiftShiftMid (f g : Fin n.succ → ℚ) : Pa f g oddShiftShiftMid = g (Fin.last n) := by +lemma Pa_oddShiftShiftMid (f g : Fin n.succ → ℚ) : + Pa f g oddShiftShiftMid = g (Fin.last n) := by rw [Pa] simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftMid_eq_oddMid] rw [oddShiftShiftMid_eq_oddShiftFst_last] - rw [P!_oddShiftFst, oddShiftFst_last_eq_oddMid, P_oddMid] + rw [shiftPlane_oddShiftFst, oddShiftFst_last_eq_oddMid, symmPlane_oddMid] exact Rat.zero_add (g (Fin.last n)) lemma Pa_oddShiftShiftSnd (f g : Fin n.succ → ℚ) (j : Fin n.succ) : @@ -829,7 +112,7 @@ lemma Pa_oddShiftShiftSnd (f g : Fin n.succ → ℚ) (j : Fin n.succ) : simp only [ACCSystemCharges.chargesAddCommMonoid_add] nth_rewrite 1 [oddShiftShiftSnd_eq_oddSnd] rw [oddShiftShiftSnd_eq_oddShiftSnd] - rw [P!_oddShiftSnd, oddShiftSnd_eq_oddSnd, P_oddSnd] + rw [shiftPlane_oddShiftSnd, oddShiftSnd_eq_oddSnd, symmPlane_oddSnd] ring /-! @@ -860,12 +143,12 @@ lemma Pa_zero (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : exact h2.symm exact hinduc i.val i.prop -lemma Pa_zero! (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : +lemma Pa_zero_shift (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : ∀ i, g i = 0 := by have hf := Pa_zero f g h - rw [Pa, P] at h + rw [Pa, symmPlane] at h simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h - exact P!_zero g h + exact shiftPlane_zero g h /-! @@ -877,8 +160,8 @@ lemma Pa_zero! (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : def Pa' (f : (Fin n) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basisa i -lemma Pa'_P'_P!' (f : (Fin n) ⊕ (Fin n) → ℚ) : - Pa' f = P' (f ∘ Sum.inl) + P!' (f ∘ Sum.inr) := by +lemma Pa'_symmPlaneLinSols_shiftPlaneLinSols (f : (Fin n) ⊕ (Fin n) → ℚ) : + Pa' f = symmPlaneLinSols (f ∘ Sum.inl) + shiftPlaneLinSols (f ∘ Sum.inr) := by exact Fintype.sum_sum_type _ /-! @@ -895,12 +178,12 @@ theorem basisa_linear_independent : LinearIndependent ℚ (@basisa n.succ) := by (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 - 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 + rw [Pa'_symmPlaneLinSols_shiftPlaneLinSols] at h1 + change (symmPlaneLinSols (f ∘ Sum.inl)).val + (shiftPlaneLinSols (f ∘ Sum.inr)).val = 0 at h1 + rw [shiftPlaneLinSols_val, symmPlaneLinSols_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 + have hg := Pa_zero_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 intro i simp_all only [succ_eq_add_one, Function.comp_apply] cases i @@ -936,8 +219,9 @@ lemma Pa'_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : · rw [Pa'_eq, Sum.elim_eq_iff] 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] + rw [Pa'_symmPlaneLinSols_shiftPlaneLinSols, Pa'_symmPlaneLinSols_shiftPlaneLinSols] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, + symmPlaneLinSols_val, shiftPlaneLinSols_val] exact h lemma Pa_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : @@ -971,21 +255,22 @@ noncomputable def basisaAsBasis : /-! -## F. Every Lienar solution is the sum of a point from each plane +## F. Every linear solution is the sum of a point from each plane -/ lemma span_basis (S : (PureU1 (2 * n.succ + 1)).LinSols) : - ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f := by + ∃ (g f : Fin n.succ → ℚ), S.val = symmPlane g + shiftPlane f := by have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisaAsBasis S) obtain ⟨f, hf⟩ := h simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, Fintype.sum_sum_type] at hf - change P' _ + P!' _ = S at hf + change symmPlaneLinSols _ + shiftPlaneLinSols _ = S at hf use f ∘ Sum.inl use f ∘ Sum.inr rw [← hf] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, P'_val, P!'_val] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, + symmPlaneLinSols_val, shiftPlaneLinSols_val] rfl /-! @@ -994,24 +279,25 @@ lemma span_basis (S : (PureU1 (2 * n.succ + 1)).LinSols) : -/ -lemma span_basis_swap! {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) +lemma span_basis_swapShift {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) (hS : ((FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') (g f : Fin n.succ → ℚ) - (hS1 : S.val = P g + P! f) : ∃ (g' f' : Fin n.succ → ℚ), - S'.val = P g' + P! f' ∧ P! f' = P! f + - (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j ∧ g' = g := by - let X := P! f + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j - have hf : P! f ∈ Submodule.span ℚ (Set.range basis!AsCharges) := by + (hS1 : S.val = symmPlane g + shiftPlane f) : ∃ (g' f' : Fin n.succ → ℚ), + S'.val = symmPlane g' + shiftPlane f' ∧ shiftPlane f' = shiftPlane f + + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by + let X := shiftPlane f + + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j + have hf : shiftPlane f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] use f rfl - have hP : (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • basis!AsCharges j ∈ - Submodule.span ℚ (Set.range basis!AsCharges) := by + have hP : (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∈ + Submodule.span ℚ (Set.range shiftBasisAsCharges) := by apply Submodule.smul_mem apply SetLike.mem_of_subset apply Submodule.subset_span simp_all only [Set.mem_range, exists_apply_eq_apply] - have hX : X ∈ Submodule.span ℚ (Set.range (basis!AsCharges)) := by + have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by apply Submodule.add_mem exact hf exact hP @@ -1019,11 +305,11 @@ lemma span_basis_swap! {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) obtain ⟨f', hf'⟩ := hXsum use g use f' - change P! f' = _ at hf' + change shiftPlane f' = _ at hf' erw [hf'] simp only [and_self, and_true, X] rw [← add_assoc, ← hS1] - apply swap!_as_add at hS + apply swapShift_as_add at hS exact hS end VectorLikeOddPlane From e03833bd593651678e8018839f32cd504ad91911 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 15:47:22 +0000 Subject: [PATCH 17/22] =?UTF-8?q?Address=20review:=20rename=20Psymm?= =?UTF-8?q?=E2=86=92symmPlane,=20Pshift=E2=86=92shiftPlane,=20remove=20Cha?= =?UTF-8?q?rgeSplits,=20move=20charge=20splits=20into=20plane=20files,=20m?= =?UTF-8?q?ove=20mixed=20cubic=20ACC=20into=20ShiftPlane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renames applied: - Psymm/P → symmPlane, Psymm'/P' → symmPlaneLinSols - Pshift/P! → shiftPlane, Pshift'/P!' → shiftPlaneLinSols - basisAsCharges → symmBasisAsCharges, basis!AsCharges → shiftBasisAsCharges - basis → symmBasis, basis! → shiftBasis File restructuring: - Removed ChargeSplits.lean (charge splits moved into SymmPlane/ShiftPlane) - Mixed cubic ACC results moved from BasisLinear.lean into ShiftPlane.lean - ShiftPlane imports SymmPlane, BasisLinear imports ShiftPlane Agent-Logs-Url: https://github.com/leanprover-community/physlib/sessions/aa00691e-9564-4dcd-b911-c97145618373 Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../Even/BasisLinear/ChargeSplits.lean | 168 ------------- .../AnomalyCancellation/Even/LineInCubic.lean | 42 ++-- .../Even/Parameterization.lean | 50 ++-- .../Odd/BasisLinear/ChargeSplits.lean | 220 ------------------ .../AnomalyCancellation/Odd/LineInCubic.lean | 36 +-- 5 files changed, 64 insertions(+), 452 deletions(-) delete mode 100644 Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean delete mode 100644 Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean deleted file mode 100644 index d611a2fb2..000000000 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ChargeSplits.lean +++ /dev/null @@ -1,168 +0,0 @@ -/- -Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Joseph Tooby-Smith --/ -module - -public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear -public import Physlib.QFT.QED.AnomalyCancellation.VectorLike -/-! - -# Charge splits for the even case basis - -We define two ways of splitting the `2 * n.succ` charge indices into groups: - -- The **symmetric (even) split** decomposes the charges via `n.succ + n.succ`, giving index maps - `evenFst` and `evenSnd`. -- The **shifted even split** decomposes the charges via `1 + (n + n + 1)`, giving index maps - `evenShiftFst`, `evenShiftSnd`, `evenShiftZero`, and `evenShiftLast`. - -These two splittings give rise to the two planes of ACC-satisfying basis vectors defined in -`SymmPlane` and `ShiftPlane`, which are named after the splitting they use. - --/ - -@[expose] public section - -open Nat Module Finset BigOperators - -namespace PureU1 - -variable {n : ℕ} - -namespace VectorLikeEvenPlane - -/-! - -## A. Splitting the charges up into groups - -We have `2 * n.succ` charges, which we split up in the following ways: - -`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` - -``` -| evenShiftZero (0) | evenShiftFst j (1 to n) | - evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | -``` - --/ - -/-! - -### A.1. The even split: Spltting the charges up via `n.succ + n.succ` - --/ - -/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the first `n.succ`, - casted into `Fin (2 * n.succ)`. -/ -def evenFst (j : Fin n.succ) : Fin (2 * n.succ) := - Fin.cast (split_equal n.succ) (Fin.castAdd n.succ j) - -/-- The inclusion of `Fin n.succ` into `Fin (n.succ + n.succ)` via the second `n.succ`, - casted into `Fin (2 * n.succ)`. -/ -def evenSnd (j : Fin n.succ) : Fin (2 * n.succ) := - Fin.cast (split_equal n.succ) (Fin.natAdd n.succ j) - -lemma ext_even (S T : Fin (2 * n.succ) → ℚ) (h1 : ∀ i, S (evenFst i) = T (evenFst i)) - (h2 : ∀ i, S (evenSnd i) = T (evenSnd i)) : S = T := by - funext i - by_cases hi : i.val < n.succ - · let j : Fin n.succ := ⟨i, hi⟩ - have h2 := h1 j - have h3 : evenFst 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 : evenSnd j = i := by - simp only [succ_eq_add_one, evenSnd, Fin.ext_iff, Fin.val_cast, Fin.val_natAdd, j] - omega - rw [h3] at h2 - exact h2 - -lemma sum_even (S : Fin (2 * n.succ) → ℚ) : - ∑ i, S i = ∑ i : Fin n.succ, ((S ∘ evenFst) i + (S ∘ evenSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (n.succ + n.succ), S (Fin.cast (split_equal n.succ) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (split_equal n.succ)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _=> rfl - rw [h1, Fin.sum_univ_add, Finset.sum_add_distrib] - rfl - -/-! - -### A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` - --/ - -lemma n_cond₂ (n : ℕ) : 1 + ((n + n) + 1) = 2 * n.succ := by - linarith - -/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the first `n`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftFst (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) - (Fin.natAdd 1 (Fin.castAdd 1 (Fin.castAdd n j))) - -/-- The inclusion of `Fin n` into `Fin (1 + (n + n + 1))` via the second `n`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftSnd (j : Fin n) : Fin (2 * n.succ) := Fin.cast (n_cond₂ n) - (Fin.natAdd 1 (Fin.castAdd 1 (Fin.natAdd n j))) - -/-- The element of `Fin (1 + (n + n + 1))` corresponding to the first `1`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftZero : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.castAdd ((n + n) + 1) 0)) - -/-- The element of `Fin (1 + (n + n + 1))` corresponding to the second `1`, - casted into `Fin (2 * n.succ)`. -/ -def evenShiftLast : Fin (2 * n.succ) := (Fin.cast (n_cond₂ n) (Fin.natAdd 1 (Fin.natAdd (n + n) 0))) - -lemma sum_evenShift (S : Fin (2 * n.succ) → ℚ) : - ∑ i, S i = S evenShiftZero + S evenShiftLast + - ∑ i : Fin n, ((S ∘ evenShiftFst) i + (S ∘ evenShiftSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (1 + ((n + n) + 1)), S (Fin.cast (n_cond₂ n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (n_cond₂ n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1] - rw [Fin.sum_univ_add, Fin.sum_univ_add, Fin.sum_univ_add, Finset.sum_add_distrib] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - 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 - -/-! - -### A.3. Lemmas relating the two splittings - --/ -lemma evenShiftZero_eq_evenFst_zero : @evenShiftZero n = evenFst 0 := rfl - -lemma evenShiftLast_eq_evenSnd_last: @evenShiftLast n = evenSnd (Fin.last n) := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, evenShiftLast, Fin.isValue, Fin.val_cast, Fin.val_natAdd, - Fin.val_eq_zero, add_zero, evenSnd, Fin.natAdd_last, Fin.val_last] - omega - -lemma evenShiftFst_eq_evenFst_succ (j : Fin n) : evenShiftFst j = evenFst j.succ := by - rw [Fin.ext_iff, evenFst, evenShiftFst] - simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_succ] - ring - -lemma evenShiftSnd_eq_evenSnd_castSucc (j : Fin n) : evenShiftSnd j = evenSnd j.castSucc := by - rw [Fin.ext_iff, evenSnd, evenShiftSnd] - simp only [Fin.val_cast, Fin.val_natAdd, Fin.val_castAdd, Fin.val_castSucc] - ring_nf - rw [Nat.succ_eq_add_one] - ring - -end VectorLikeEvenPlane - -end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean index 337937d6f..c151253f7 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean @@ -16,7 +16,7 @@ if the line through that point and through the two different planes formed by th `LinSols` lies in the cubic. We show that for a solution all its permutations satisfy this property, then there exists -a permutation for which it lies in the plane spanned by the first part of the basis. +a permutation for which it lies in the plane spanned by the symmetric part of the basis. The main reference for this file is: @@ -37,39 +37,39 @@ open VectorLikeEvenPlane in the basis through that point is in the cubic. -/ 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 + accCube (2 * n.succ) (a • symmPlane g + b • shiftPlane f) = 0 set_option backward.isDefEq.respectTransparency false in 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 + 3 * a * b * (a * accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) + + b * accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g)) = 0 := by intro g f hS a b have h1 := h g f hS a b - change accCubeTriLinSymm.toCubic (a • P g + b • P! f) = 0 at h1 + change accCubeTriLinSymm.toCubic (a • symmPlane g + b • shiftPlane f) = 0 at h1 simp only [TriLinearSymm.toCubic_add] at h1 simp only [HomogeneousCubic.map_smul, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] at h1 conv_lhs at h1 => enter [1, 1, 1, 2] change accCube _ _ - rw [P_accCube] + rw [symmPlane_accCube] conv_lhs at h1 => enter [1, 1, 2, 2] change accCube _ _ - rw [P!_accCube] + rw [shiftPlane_accCube] rw [← h1] ring /-- This lemma states that for a given `S` of type `(PureU1 (2 * n.succ)).AnomalyFreeLinear` and a proof `h` that the line through `S` lies on a cubic curve, -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`. +for any functions `g : Fin n.succ → ℚ` and `f : Fin n → ℚ`, if `S.val = symmPlane g + shiftPlane f`, +then `accCubeTriLinSymm.toFun (symmPlane g, symmPlane g, shiftPlane f) = 0`. -/ -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 +lemma line_in_cubic_symmPlane_symmPlane_shiftPlane {S : (PureU1 (2 * n.succ)).LinSols} (h : LineInCubic S) : + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f), + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane 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 @@ -100,28 +100,28 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ)).LinSols} (LIC : LineInCubicPerm S) : ∀ (j : Fin n) (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = Pa g f), (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) - * accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) = 0 := by + * accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftBasisAsCharges j) = 0 := by intro j g f h let S' := (FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j)) S have hSS' : ((FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S' := rfl - obtain ⟨g', f', hall⟩ := span_basis_swap! j hSS' g f h - have h1 := line_in_cubic_P_P_P! (lineInCubicPerm_self LIC) g f h - have h2 := line_in_cubic_P_P_P! + obtain ⟨g', f', hall⟩ := span_basis_swapShift j hSS' g f h + have h1 := line_in_cubic_symmPlane_symmPlane_shiftPlane (lineInCubicPerm_self LIC) g f h + have h2 := line_in_cubic_symmPlane_symmPlane_shiftPlane (lineInCubicPerm_self (lineInCubicPerm_permute LIC (Equiv.swap (evenShiftFst j) (evenShiftSnd j)))) g' f' hall.1 rw [hall.2.1, hall.2.2] at h2 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 symmPlane_symmPlane_shiftBasisAsCharges_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)) = + accCubeTriLinSymm (symmPlane f) (symmPlane f) (shiftBasisAsCharges (Fin.last n)) = - (S.val (evenShiftSnd (Fin.last n)) + S.val (evenShiftFst (Fin.last n))) * (2 * S.val evenShiftLast + S.val (evenShiftSnd (Fin.last n)) + S.val (evenShiftFst (Fin.last n))) := by - rw [P_P_P!_accCube f (Fin.last n)] + rw [symmPlane_symmPlane_shiftBasisAsCharges_accCube f (Fin.last n)] have h1 := Pa_evenShiftLast f g have h2 := Pa_evenShiftFst f g (Fin.last n) have h3 := Pa_evenShiftSnd f g (Fin.last n) @@ -146,7 +146,7 @@ lemma lineInCubicPerm_last_cond {S : (PureU1 (2 * n.succ.succ)).LinSols} (S.val evenShiftLast))) := by obtain ⟨g, f, hfg⟩ := span_basis S have h1 := lineInCubicPerm_swap LIC (Fin.last n) g f hfg - rw [P_P_P!_accCube' g f hfg] at h1 + rw [symmPlane_symmPlane_shiftBasisAsCharges_accCube' g f hfg] at h1 simp only [Nat.succ_eq_add_one, neg_add_rev, mul_eq_zero] at h1 cases h1 <;> rename_i h1 · left @@ -180,7 +180,7 @@ theorem lineInCubicPerm_vectorLike {S : (PureU1 (2 * n.succ.succ)).Sols} theorem lineInCubicPerm_in_plane (S : (PureU1 (2 * n.succ.succ)).Sols) (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) := + ∈ Submodule.span ℚ (Set.range symmBasis) := vectorLikeEven_in_span S.1.1 (lineInCubicPerm_vectorLike LIC) end Even diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean index 5c469ac08..d566a28b7 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean @@ -35,16 +35,16 @@ point in `(PureU1 (2 * n.succ)).AnomalyFreeLinear`, which we will later show ext free point. -/ def parameterizationAsLinear (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (a : ℚ) : (PureU1 (2 * n.succ)).LinSols := - a • ((accCubeTriLinSymm (P! f) (P! f) (P g)) • P' g + - (- accCubeTriLinSymm (P g) (P g) (P! f)) • P!' f) + a • ((accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g)) • symmPlaneLinSols g + + (- accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f)) • shiftPlaneLinSols f) lemma parameterizationAsLinear_val (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (a : ℚ) : (parameterizationAsLinear g f a).val = - a • ((accCubeTriLinSymm (P! f) (P! f) (P g)) • P g + - (- accCubeTriLinSymm (P g) (P g) (P! f)) • P! f) := by + a • ((accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g)) • P g + + (- accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f)) • P! f) := by rw [parameterizationAsLinear] - change a • (_ • (P' g).val + _ • (P!' f).val) = _ - rw [P'_val, P!'_val] + change a • (_ • (symmPlaneLinSols g).val + _ • (shiftPlaneLinSols f).val) = _ + rw [symmPlaneLinSols_val, shiftPlaneLinSols_val] set_option backward.isDefEq.respectTransparency false in lemma parameterizationCharge_cube (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (a : ℚ) : @@ -52,7 +52,7 @@ lemma parameterizationCharge_cube (g : Fin n.succ → ℚ) (f : Fin n → ℚ) ( change accCubeTriLinSymm.toCubic _ = 0 rw [parameterizationAsLinear_val, HomogeneousCubic.map_smul, TriLinearSymm.toCubic_add, HomogeneousCubic.map_smul, HomogeneousCubic.map_smul] - erw [P_accCube, P!_accCube] + erw [symmPlane_accCube, shiftPlane_accCube] rw [accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] @@ -65,23 +65,23 @@ def parameterization (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (a : ℚ) : parameterizationCharge_cube g f a⟩ lemma anomalyFree_param {S : (PureU1 (2 * n.succ)).Sols} - (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (hS : S.val = P g + P! f) : - accCubeTriLinSymm (P g) (P g) (P! f) = - accCubeTriLinSymm (P! f) (P! f) (P g) := by + (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (hS : S.val = symmPlane g + shiftPlane f) : + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = - accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g) := by have hC := S.cubicSol rw [hS] at hC - change (accCube (2 * n.succ)) (P g + P! f) = 0 at hC - erw [TriLinearSymm.toCubic_add, P_accCube, P!_accCube] at hC + change (accCube (2 * n.succ)) (symmPlane g + shiftPlane f) = 0 at hC + erw [TriLinearSymm.toCubic_add, symmPlane_accCube, shiftPlane_accCube] at hC linear_combination hC / 3 /-- 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 := - ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = P g + P! f), - accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0 + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f), + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane 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 + (hs : ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlane g + shiftPlane f ∧ + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) ≠ 0) : GenericCase S := by intro g f hS hC obtain ⟨g', f', hS', hC'⟩ := hs rw [hS] at hS' @@ -91,12 +91,12 @@ lemma genericCase_exists (S : (PureU1 (2 * n.succ)).Sols) /-- 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 + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f), + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane 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 + (hs : ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlane g + shiftPlane f ∧ + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = 0) : SpecialCase S := by intro g f hS obtain ⟨g', f', hS', hC'⟩ := hs rw [hS] at hS' @@ -107,8 +107,8 @@ lemma specialCase_exists (S : (PureU1 (2 * n.succ)).Sols) lemma generic_or_special (S : (PureU1 (2 * n.succ)).Sols) : 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 + have h1 : accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) ≠ 0 ∨ + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = 0 := by exact ne_or_eq _ _ rcases h1 with h1 | h1 · exact Or.inl (genericCase_exists S ⟨g, f, h, h1⟩) @@ -117,7 +117,7 @@ lemma generic_or_special (S : (PureU1 (2 * n.succ)).Sols) : 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))⁻¹ + use g, f, (accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g))⁻¹ rw [parameterization] apply ACCSystem.Sols.ext rw [parameterizationAsLinear_val] @@ -135,14 +135,14 @@ lemma special_case_lineInCubic {S : (PureU1 (2 * n.succ)).Sols} intro g f hS a b erw [TriLinearSymm.toCubic_add] rw [HomogeneousCubic.map_smul, HomogeneousCubic.map_smul] - erw [P_accCube, P!_accCube] + erw [symmPlane_accCube, shiftPlane_accCube] have h := h g f hS rw [accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, h] rw [anomalyFree_param _ _ hS] at h simp only [Nat.succ_eq_add_one, accCubeTriLinSymm_toFun_apply_apply, neg_eq_zero] at h - change accCubeTriLinSymm (P! f) (P! f) (P g) = 0 at h + change accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g) = 0 at h erw [h] simp @@ -157,7 +157,7 @@ theorem special_case {S : (PureU1 (2 * n.succ.succ)).Sols} 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) := + ∈ Submodule.span ℚ (Set.range symmBasis) := lineInCubicPerm_in_plane S (special_case_lineInCubic_perm h) end Even diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean deleted file mode 100644 index a19364009..000000000 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ChargeSplits.lean +++ /dev/null @@ -1,220 +0,0 @@ -/- -Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Joseph Tooby-Smith --/ -module - -public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear -public import Physlib.QFT.QED.AnomalyCancellation.VectorLike -/-! -# Charge splits for the odd case basis - -We define two ways of splitting the `2 * n + 1` charge indices into groups: - -- The **symmetric split** decomposes the charges via `(n + 1) + n`, giving index maps - `oddFst`, `oddSnd`, and `oddMid`. -- The **shifted split** decomposes the charges via `1 + n + n`, giving index maps - `oddShiftFst`, `oddShiftSnd`, and `oddShiftZero`. - -These two splittings give rise to the two planes of ACC-satisfying basis vectors defined in -`SymmPlane` and `ShiftPlane`, which are named after the splitting they use. --/ - -@[expose] public section - -open Module Nat Finset BigOperators - -namespace PureU1 - -variable {n : ℕ} - -namespace VectorLikeOddPlane - -/-! - -## A. Splitting the charges up into groups - -We have `2 * n + 1` charges, which we split up in the following ways: - -`| evenFst j (0 to n) | evenSnd j (n.succ to n + n.succ)|` - -``` -| evenShiftZero (0) | evenShiftFst j (1 to n) | - evenShiftSnd j (n.succ to 2 * n) | evenShiftLast (2 * n.succ - 1) | -``` - --/ - -section theDeltas - -/-! - -### A.1. The symmetric split: Spltting the charges up via `(n + 1) + 1` - --/ - -lemma odd_shift_eq (n : ℕ) : (1 + n) + n = 2 * n +1 := by - omega - -/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the first `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddFst (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.castAdd n (Fin.castAdd 1 j)) - -/-- The inclusion of `Fin n` into `Fin ((n + 1) + n)` via the second `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddSnd (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.natAdd (n+1) j) - -/-- The element representing `1` in `Fin ((n + 1) + n)`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddMid : Fin (2 * n + 1) := - Fin.cast (split_odd n) (Fin.castAdd n (Fin.natAdd n 1)) - -lemma sum_odd (S : Fin (2 * n + 1) → ℚ) : - ∑ i, S i = S oddMid + ∑ i : Fin n, ((S ∘ oddFst) i + (S ∘ oddSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin (n + 1 + n), S (Fin.cast (split_odd n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (split_odd n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.symm_castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1] - rw [Fin.sum_univ_add, Fin.sum_univ_add] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - nth_rewrite 2 [add_comm] - rw [add_assoc] - rw [Finset.sum_add_distrib] - rfl - -/-! - -### A.2. The shifted split: Spltting the charges up via `1 + n + n` - --/ - -/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the first `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftFst (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.natAdd 1 j)) - -/-- The inclusion of `Fin n` into `Fin (1 + n + n)` via the second `n`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftSnd (j : Fin n) : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.natAdd (1 + n) j) - -/-- The element representing the `1` in `Fin (1 + n + n)`. - This is then casted to `Fin (2 * n + 1)`. -/ -def oddShiftZero : Fin (2 * n + 1) := - Fin.cast (odd_shift_eq n) (Fin.castAdd n (Fin.castAdd n 1)) - -lemma sum_oddShift (S : Fin (2 * n + 1) → ℚ) : - ∑ i, S i = S oddShiftZero + ∑ i : Fin n, ((S ∘ oddShiftFst) i + (S ∘ oddShiftSnd) i) := by - have h1 : ∑ i, S i = ∑ i : Fin ((1+n)+n), S (Fin.cast (odd_shift_eq n) i) := by - rw [Finset.sum_equiv (Fin.castOrderIso (odd_shift_eq n)).symm.toEquiv] - · intro i - simp only [mem_univ, Fin.castOrderIso, RelIso.coe_fn_toEquiv] - · exact fun _ _ => rfl - rw [h1, Fin.sum_univ_add, Fin.sum_univ_add] - simp only [univ_unique, Fin.default_eq_zero, Fin.isValue, sum_singleton, Function.comp_apply] - rw [add_assoc, Finset.sum_add_distrib] - rfl - -/-! - -### A.3. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` - --/ - -lemma odd_shift_shift_eq (n : ℕ) : ((1+n)+1) + n.succ = 2 * n.succ + 1 := by - omega - -/-- The element representing the first `1` in `Fin (1 + n + 1 + n.succ)` casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftZero : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.castAdd n 1))) - -/-- The inclusion of `Fin n` into `Fin (1 + n + 1 + n.succ)` via the first `n` and casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftFst (j : Fin n) : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.castAdd 1 (Fin.natAdd 1 j))) - -/-- The element representing the second `1` in `Fin (1 + n + 1 + n.succ)` casted - to `2 * n.succ + 1`. -/ -def oddShiftShiftMid : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.castAdd n.succ (Fin.natAdd (1+n) 1)) - -/-- The inclusion of `Fin n.succ` into `Fin (1 + n + 1 + n.succ)` via the `n.succ` and casted - to `Fin (2 * n.succ + 1)`. -/ -def oddShiftShiftSnd (j : Fin n.succ) : Fin (2 * n.succ + 1) := - Fin.cast (odd_shift_shift_eq n) (Fin.natAdd ((1+n)+1) j) - -/-! - -### A.4. Relating the splittings together - --/ -lemma oddShiftShiftZero_eq_oddFst_zero : @oddShiftShiftZero n = oddFst 0 := - Fin.rev_inj.mp rfl - -lemma oddShiftShiftZero_eq_oddShiftZero : @oddShiftShiftZero n = oddShiftZero := rfl - -lemma oddShiftShiftFst_eq_oddFst_succ (j : Fin n) : - oddShiftShiftFst j = oddFst j.succ := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, - oddFst, Fin.val_succ] - exact Nat.add_comm 1 ↑j - -lemma oddShiftShiftFst_eq_oddShiftFst_castSucc (j : Fin n) : - oddShiftShiftFst j = oddShiftFst j.castSucc := by - rfl - -lemma oddShiftShiftMid_eq_oddMid : @oddShiftShiftMid n = oddMid := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftMid, Fin.isValue, Fin.val_cast, Fin.val_castAdd, - Fin.val_natAdd, Fin.val_eq_zero, add_zero, oddMid] - exact Nat.add_comm 1 n - -lemma oddShiftShiftMid_eq_oddShiftFst_last : oddShiftShiftMid = oddShiftFst (Fin.last n) := by - rfl - -lemma oddShiftShiftSnd_eq_oddSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddSnd j := by - rw [Fin.ext_iff] - simp only [succ_eq_add_one, oddShiftShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] - exact Nat.add_comm 1 n - -lemma oddShiftShiftSnd_eq_oddShiftSnd (j : Fin n.succ) : oddShiftShiftSnd j = oddShiftSnd j := by - rw [Fin.ext_iff] - rfl - -lemma oddSnd_eq_oddShiftSnd (j : Fin n) : oddSnd j = oddShiftSnd j := by - rw [Fin.ext_iff] - simp only [oddSnd, Fin.val_cast, Fin.val_natAdd, oddShiftSnd, add_left_inj] - exact Nat.add_comm n 1 - -lemma oddShiftZero_eq_oddFst : oddShiftZero = oddFst (0 : Fin n.succ) := by - ext - simp [oddShiftZero, oddFst] - -lemma oddShiftFst_castSucc_eq_oddFst_succ (j : Fin n) : - oddShiftFst j.castSucc = oddFst j.succ := by - rw [Fin.ext_iff] - simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddFst, Fin.val_succ] - exact Nat.add_comm 1 ↑j - -lemma oddShiftFst_last_eq_oddMid : oddShiftFst (Fin.last n) = oddMid := by - rw [Fin.ext_iff] - simp only [oddShiftFst, Fin.val_cast, Fin.val_castAdd, Fin.val_natAdd, oddMid, Fin.val_last] - exact Nat.add_comm 1 n - -lemma oddShiftSnd_eq_oddSnd (j : Fin n) : oddShiftSnd j = oddSnd j := by - rw [Fin.ext_iff] - simp only [oddShiftSnd, Fin.val_cast, Fin.val_natAdd, oddSnd, add_left_inj] - ring - -end theDeltas - -end VectorLikeOddPlane - -end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean index a2115ba7f..611d375cc 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean @@ -36,29 +36,29 @@ open VectorLikeOddPlane in the basis through that point is in the cubic. -/ def LineInCubic (S : (PureU1 (2 * n + 1)).LinSols) : Prop := ∀ (g f : Fin n → ℚ) (_ : S.val = Pa g f) (a b : ℚ), - accCube (2 * n + 1) (a • P g + b • P! f) = 0 + accCube (2 * n + 1) (a • symmPlane g + b • shiftPlane f) = 0 set_option backward.isDefEq.respectTransparency false in /-- The condition that a linear solution sits on a line between the two planes within the cubic expands into a on `accCubeTriLinSymm` applied to the points within the planes. -/ lemma lineInCubic_expand {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S) : - ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = P g + P! f) (a b : ℚ), - 3 * a * b * (a * accCubeTriLinSymm (P g) (P g) (P! f) - + b * accCubeTriLinSymm (P! f) (P! f) (P g)) = 0 := by + ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f) (a b : ℚ), + 3 * a * b * (a * accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) + + b * accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g)) = 0 := by intro g f hS a b have h1 := h g f hS a b - change accCubeTriLinSymm.toCubic (a • P g + b • P! f) = 0 at h1 + change accCubeTriLinSymm.toCubic (a • symmPlane g + b • shiftPlane f) = 0 at h1 simp only [TriLinearSymm.toCubic_add] at h1 simp only [HomogeneousCubic.map_smul, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] at h1 - erw [P_accCube, P!_accCube] at h1 + erw [symmPlane_accCube, shiftPlane_accCube] at h1 rw [← h1] ring -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 +lemma line_in_cubic_symmPlane_symmPlane_shiftPlane {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S) : + ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f), + accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane 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 @@ -83,31 +83,31 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ + 1)).LinSols} (LIC : LineInCubicPerm S) : ∀ (j : Fin n.succ) (g f : Fin n.succ → ℚ) (_ : S.val = Pa g f), (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) - * accCubeTriLinSymm (P g) (P g) (basis!AsCharges j) = 0 := by + * accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftBasisAsCharges j) = 0 := by intro j g f h let S' := (FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j)) S have hSS' : ((FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S' := rfl - obtain ⟨g', f', hall⟩ := span_basis_swap! j hSS' g f h - have h1 := line_in_cubic_P_P_P! (lineInCubicPerm_self LIC) g f h - have h2 := line_in_cubic_P_P_P! (lineInCubicPerm_self (lineInCubicPerm_permute LIC + obtain ⟨g', f', hall⟩ := span_basis_swapShift j hSS' g f h + have h1 := line_in_cubic_symmPlane_symmPlane_shiftPlane (lineInCubicPerm_self LIC) g f h + have h2 := line_in_cubic_symmPlane_symmPlane_shiftPlane (lineInCubicPerm_self (lineInCubicPerm_permute LIC (Equiv.swap (oddShiftFst j) (oddShiftSnd j)))) g' f' hall.1 rw [hall.2.1, hall.2.2] at h2 rw [accCubeTriLinSymm.map_add₃, h1, accCubeTriLinSymm.map_smul₃] at h2 simpa using h2 -lemma P_P_P!_accCube' {S : (PureU1 (2 * n.succ.succ + 1)).LinSols} +lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube' {S : (PureU1 (2 * n.succ.succ + 1)).LinSols} (f g : Fin n.succ.succ → ℚ) (hS : S.val = Pa f g) : - accCubeTriLinSymm (P f) (P f) (basis!AsCharges 0) = + accCubeTriLinSymm (symmPlane f) (symmPlane f) (shiftBasisAsCharges 0) = (S.val (oddShiftFst 0) + S.val (oddShiftSnd 0)) * (2 * S.val oddShiftZero + S.val (oddShiftFst 0) + S.val (oddShiftSnd 0)) := by - rw [P_P_P!_accCube f 0] + rw [symmPlane_symmPlane_shiftBasisAsCharges_accCube f 0] rw [← Pa_oddShiftShiftZero f g] rw [← hS] have ht : oddShiftFst (0 : Fin n.succ.succ) = oddFst 1 := rfl nth_rewrite 1 [ht] - rw [P_oddFst] + rw [symmPlane_oddFst] have h1 := Pa_oddShiftShiftZero f g have h4 := Pa_oddShiftShiftSnd f g 0 have h2 := Pa_oddShiftShiftFst f g 0 @@ -126,7 +126,7 @@ lemma lineInCubicPerm_last_cond {S : (PureU1 (2 * n.succ.succ+1)).LinSols} LineInPlaneProp ((S.val (oddShiftSnd 0)), ((S.val (oddShiftFst 0)), (S.val oddShiftZero))) := by obtain ⟨g, f, hfg⟩ := span_basis S have h1 := lineInCubicPerm_swap LIC 0 g f hfg - rw [P_P_P!_accCube' g f hfg] at h1 + rw [symmPlane_symmPlane_shiftBasisAsCharges_accCube' g f hfg] at h1 simp only [Nat.succ_eq_add_one, mul_eq_zero] at h1 cases h1 <;> rename_i h1 · left From 5d5c3ea3b9e7eef0122326ab3a594346db090620 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 04:44:34 +0000 Subject: [PATCH 18/22] refactor(Even/BasisLinear): rename identifiers for clarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename Charges versions: symmPlane → symmPlaneAsCharges, shiftPlane → shiftPlaneAsCharges - Rename LinSols versions: symmPlaneLinSols → symmPlane, shiftPlaneLinSols → shiftPlane - Rename all associated lemmas: symmPlane_* → symmPlaneAsCharges_*, etc. - Rename basisa → basis, basisaAsBasis → basisAsBasis, basisa_* → basis_* - Rename Pa → basisCharge, Pa' → basisLinSol - Rename all Pa_* lemmas → basisCharge_* and Pa'_* → basisLinSol_* - Rename swapShift_as_add → linSolRep_swap_evenShift_eq_add (Mathlib-style) - Rename BasisLinear.lean → Basis.lean - Restructure ShiftPlane.lean sections: add C.1 header, move shiftBasis_linear_independent to C.6 (with new proof avoiding forward reference), move linSolRep_swap_evenShift_eq_add to C.7, renumber remaining sections - Renumber Basis.lean sections from E./F. to 1./2. style - Update Physlib.lean to import Even.Basis instead of Even.BasisLinear - Update LineInCubic.lean and Parameterization.lean with cascading renames Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- Physlib.lean | 2 +- .../QED/AnomalyCancellation/Even/Basis.lean | 315 ++++++++++++++++++ .../AnomalyCancellation/Even/BasisLinear.lean | 315 ------------------ .../Even/BasisLinear/ShiftPlane.lean | 219 ++++++------ .../Even/BasisLinear/SymmPlane.lean | 64 ++-- .../AnomalyCancellation/Even/LineInCubic.lean | 48 +-- .../Even/Parameterization.lean | 54 +-- 7 files changed, 508 insertions(+), 509 deletions(-) create mode 100644 Physlib/QFT/QED/AnomalyCancellation/Even/Basis.lean delete mode 100644 Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean diff --git a/Physlib.lean b/Physlib.lean index 580bb2490..ae928fc80 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -220,7 +220,7 @@ public import Physlib.QFT.PerturbationTheory.WickContraction.UncontractedList public import Physlib.QFT.QED.AnomalyCancellation.Basic public import Physlib.QFT.QED.AnomalyCancellation.BasisLinear public import Physlib.QFT.QED.AnomalyCancellation.ConstAbs -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.Even.Basis public import Physlib.QFT.QED.AnomalyCancellation.Even.LineInCubic public import Physlib.QFT.QED.AnomalyCancellation.Even.Parameterization public import Physlib.QFT.QED.AnomalyCancellation.LineInPlaneCond diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/Basis.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Basis.lean new file mode 100644 index 000000000..7a42c4f0f --- /dev/null +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/Basis.lean @@ -0,0 +1,315 @@ +/- +Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ShiftPlane +/-! + +# The combined basis of the symmetric and shifted planes + +## i. Overview + +This module constructs the combined basis for the linear solutions of +`PureU1 (2 * n.succ)` by combining the two ACC-satisfying planes: + +- The *symmetric plane*, named after the symmetric (even) split `n.succ + n.succ`. + Its key results are `symmPlane` (the inclusion into linear solutions) and + `symmPlaneAsCharges_accCube` (every point satisfies the cubic anomaly cancellation condition). + +- The *shifted plane*, named after the shifted split `1 + (n + n + 1)`. + Its key results are `shiftPlane` (the inclusion into linear solutions) and + `shiftPlaneAsCharges_accCube` (every point satisfies the cubic anomaly cancellation condition). + +The main result is `span_basis`: every linear solution of `PureU1 (2 * n.succ)` can +be written as the sum of a point from the symmetric plane and a point from the shifted +plane. + +## ii. Key results + +- `basis` : The combined basis vectors from both planes +- `basis_linear_independent` : The combined basis vectors are linearly independent +- `basisAsBasis` : The combined basis vectors form a basis +- `span_basis` : Every linear solution is the sum of a point from each plane + +## iii. Table of contents + +- 1. The combined basis + - 1.1. As a map into linear solutions + - 1.2. Inclusion of the span of the basis into charges + - 1.3. Components of the inclusion into charges + - 1.4. Kernel of the inclusion into charges + - 1.5. The inclusion of the span of the basis into linear solutions + - 1.6. The combined basis vectors are linearly independent + - 1.7. Injectivity of the inclusion into linear solutions + - 1.8. Cardinality of the basis + - 1.9. The basis vectors as a basis +- 2. Every linear solution is the sum of a point from each plane + - 2.1. Relation under permutations + +## iv. References + +- https://arxiv.org/pdf/1912.04804.pdf + +-/ + +@[expose] public section + +open Nat Module Finset BigOperators + +namespace PureU1 + +variable {n : ℕ} + +namespace VectorLikeEvenPlane + +/-! + +## 1. The combined basis + +-/ + +/-! + +### 1.1. As a map into linear solutions + +-/ +/-- The whole basis as `LinSols`. -/ +def basis : (Fin n.succ) ⊕ (Fin n) → (PureU1 (2 * n.succ)).LinSols := fun i => + match i with + | .inl i => symmBasis i + | .inr i => shiftBasis i + +/-! + +### 1.2. Inclusion of the span of the basis into charges + +-/ + +/-- A point in the span of the basis as a charge. -/ +def basisCharge (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := + symmPlaneAsCharges f + shiftPlaneAsCharges g + +/-! + +### 1.3. Components of the inclusion into charges + +-/ + +lemma basisCharge_evenShiftFst (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : + basisCharge f g (evenShiftFst j) = f j.succ + g j := by + rw [basisCharge] + simp only [ACCSystemCharges.chargesAddCommMonoid_add] + rw [shiftPlaneAsCharges_evenShiftFst, evenShiftFst_eq_evenFst_succ, symmPlaneAsCharges_evenFst] + +lemma basisCharge_evenShiftSnd (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : + basisCharge f g (evenShiftSnd j) = - f j.castSucc - g j := by + rw [basisCharge] + simp only [ACCSystemCharges.chargesAddCommMonoid_add] + rw [shiftPlaneAsCharges_evenShiftSnd, evenShiftSnd_eq_evenSnd_castSucc, symmPlaneAsCharges_evenSnd] + ring + +lemma basisCharge_evenShiftZero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : + basisCharge f g (evenShiftZero) = f 0 := by + rw [basisCharge] + simp only [ACCSystemCharges.chargesAddCommMonoid_add] + rw [shiftPlaneAsCharges_evenShiftZero, evenShiftZero_eq_evenFst_zero, symmPlaneAsCharges_evenFst] + exact Rat.add_zero (f 0) + +lemma basisCharge_evenShiftLast (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : + basisCharge f g (evenShiftLast) = - f (Fin.last n) := by + rw [basisCharge] + simp only [ACCSystemCharges.chargesAddCommMonoid_add] + rw [shiftPlaneAsCharges_evenShiftLast, evenShiftLast_eq_evenSnd_last, symmPlaneAsCharges_evenSnd] + exact Rat.add_zero (-f (Fin.last n)) + +/-! + +### 1.4. Kernel of the inclusion into charges + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma basisCharge_zero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : basisCharge f g = 0) : + ∀ i, f i = 0 := by + have h₃ := basisCharge_evenShiftZero 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 + have hivi : iv < n.succ := lt_of_succ_lt hiv + have hi2 := hi hivi + have h1 := basisCharge_evenShiftFst f g ⟨iv, succ_lt_succ_iff.mp hiv⟩ + have h2 := basisCharge_evenShiftSnd f g ⟨iv, succ_lt_succ_iff.mp hiv⟩ + rw [h] at h1 h2 + simp only [Fin.succ_mk, Fin.castSucc_mk] at h1 h2 + erw [hi2] at h2 + change 0 = _ at h2 + simp only [neg_zero, zero_sub, zero_eq_neg] at h2 + rw [h2] at h1 + exact right_eq_add.mp h1 + exact hinduc i.val i.prop + +lemma basisCharge_zero_shift (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : basisCharge f g = 0) : + ∀ i, g i = 0 := by + have hf := basisCharge_zero f g h + rw [basisCharge, symmPlaneAsCharges] at h + simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h + exact shiftPlaneAsCharges_zero g h + +/-! + +### 1.5. The inclusion of the span of the basis into linear solutions + +-/ +/-- A point in the span of the whole basis. -/ +def basisLinSol (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n.succ)).LinSols := + ∑ i, f i • basis i + +lemma basisLinSol_symmPlane_shiftPlane (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : + basisLinSol f = symmPlane (f ∘ Sum.inl) + shiftPlane (f ∘ Sum.inr) := by + exact Fintype.sum_sum_type _ + +/-! + +### 1.6. The combined basis vectors are linearly independent + +-/ + +theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change basisLinSol f = 0 at h + have h1 : (basisLinSol 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 + rw [basisLinSol_symmPlane_shiftPlane] at h1 + change (symmPlane (f ∘ Sum.inl)).val + + (shiftPlane (f ∘ Sum.inr)).val = 0 at h1 + rw [shiftPlane_val, symmPlane_val] at h1 + change basisCharge (f ∘ Sum.inl) (f ∘ Sum.inr) = 0 at h1 + have hf := basisCharge_zero (f ∘ Sum.inl) (f ∘ Sum.inr) h1 + have hg := basisCharge_zero_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 + intro i + simp_all + cases i + · simp_all + · simp_all +/-! + +### 1.7. Injectivity of the inclusion into linear solutions + +-/ + +lemma basisLinSol_eq (f f' : (Fin n.succ) ⊕ (Fin n) → ℚ) : basisLinSol f = basisLinSol f' ↔ f = f' := by + refine Iff.intro (fun h => (funext (fun i => ?_))) (fun h => ?_) + · rw [basisLinSol, basisLinSol] at h + have h1 : ∑ i : Fin (succ n) ⊕ Fin n, (f i + (- f' i)) • basis 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 (@basis_linear_independent n) + (fun i => f i + -f' i) h1 + have h2i := h2 i + linarith + · rw [h] + +lemma basisLinSol_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : + basisLinSol (Sum.elim g f) = basisLinSol (Sum.elim g' f') ↔ basisCharge g f = basisCharge g' f' := by + refine Iff.intro (fun h => ?_) (fun h => ?_) + · rw [basisLinSol_eq, Sum.elim_eq_iff] at h + rw [h.left, h.right] + · apply ACCSystemLinear.LinSols.ext + rw [basisLinSol_symmPlane_shiftPlane, basisLinSol_symmPlane_shiftPlane] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, + symmPlane_val, shiftPlane_val] + exact h + +lemma basisCharge_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : + basisCharge g f = basisCharge g' f' ↔ g = g' ∧ f = f' := by + rw [← basisLinSol_elim_eq_iff, ← Sum.elim_eq_iff] + exact basisLinSol_eq _ _ + +/-! + +### 1.8. Cardinality of the basis + +-/ + +lemma basis_card : Fintype.card ((Fin n.succ) ⊕ (Fin n)) = + Module.finrank ℚ (PureU1 (2 * n.succ)).LinSols := by + erw [BasisLinear.finrank_AnomalyFreeLinear] + simp only [Fintype.card_sum, Fintype.card_fin, mul_eq] + exact split_odd n + +/-! + +### 1.9. The basis vectors as a basis + +-/ + +/-- The basis formed out of our `basis` vectors. -/ +noncomputable def basisAsBasis : + Basis (Fin (succ n) ⊕ Fin n) ℚ (PureU1 (2 * succ n)).LinSols := + basisOfLinearIndependentOfCardEqFinrank (@basis_linear_independent n) basis_card + +/-! + +## 2. Every linear solution is the sum of a point from each plane + +-/ + +lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) : + ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f := by + have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisAsBasis S) + obtain ⟨f, hf⟩ := h + simp only [succ_eq_add_one, basisAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, + Fintype.sum_sum_type] at hf + change symmPlane _ + shiftPlane _ = S at hf + use f ∘ Sum.inl + use f ∘ Sum.inr + rw [← hf] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, + symmPlane_val, shiftPlane_val] + rfl + +/-! + +### 2.1. Relation under permutations + +-/ +lemma span_basis_swapShift {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) + (hS : ((FamilyPermutations (2 * n.succ)).linSolRep + (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') (g : Fin n.succ → ℚ) (f : Fin n → ℚ) + (h : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f) : ∃ (g' : Fin n.succ → ℚ) (f' : Fin n → ℚ), + S'.val = symmPlaneAsCharges g' + shiftPlaneAsCharges f' ∧ shiftPlaneAsCharges f' = shiftPlaneAsCharges f + + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by + let X := shiftPlaneAsCharges f + + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j + have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by + apply Submodule.add_mem + exact (shiftPlaneAsCharges_in_span f) + exact (smul_shiftBasisAsCharges_in_span S j) + have hXsum := (Submodule.mem_span_range_iff_exists_fun ℚ).mp hX + obtain ⟨f', hf'⟩ := hXsum + use g + use f' + change shiftPlaneAsCharges f' = _ at hf' + erw [hf'] + simp only [and_self, and_true, X] + rw [← add_assoc, ← h] + apply linSolRep_swap_evenShift_eq_add at hS + exact hS + +end VectorLikeEvenPlane + +end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean deleted file mode 100644 index 7ae26768f..000000000 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean +++ /dev/null @@ -1,315 +0,0 @@ -/- -Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Joseph Tooby-Smith --/ -module - -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ShiftPlane -/-! - -# The combined basis of the symmetric and shifted planes - -## i. Overview - -This module constructs the combined basis for the linear solutions of -`PureU1 (2 * n.succ)` by combining the two ACC-satisfying planes: - -- The *symmetric plane*, named after the symmetric (even) split `n.succ + n.succ`. - Its key results are `symmPlaneLinSols` (the inclusion into linear solutions) and - `symmPlane_accCube` (every point satisfies the cubic anomaly cancellation condition). - -- The *shifted plane*, named after the shifted split `1 + (n + n + 1)`. - Its key results are `shiftPlaneLinSols` (the inclusion into linear solutions) and - `shiftPlane_accCube` (every point satisfies the cubic anomaly cancellation condition). - -The main result is `span_basis`: every linear solution of `PureU1 (2 * n.succ)` can -be written as the sum of a point from the symmetric plane and a point from the shifted -plane. - -## ii. Key results - -- `basisa` : The combined basis vectors from both planes -- `basisa_linear_independent` : The combined basis vectors are linearly independent -- `basisaAsBasis` : The combined basis vectors form a basis -- `span_basis` : Every linear solution is the sum of a point from each plane - -## iii. Table of contents - -- E. The combined basis - - E.1. As a map into linear solutions - - E.2. Inclusion of the span of the basis into charges - - E.3. Components of the inclusion into charges - - E.4. Kernel of the inclusion into charges - - E.5. The inclusion of the span of the basis into linear solutions - - E.6. The combined basis vectors are linearly independent - - E.7. Injectivity of the inclusion into linear solutions - - E.8. Cardinality of the basis - - E.9. The basis vectors as a basis -- F. Every linear solution is the sum of a point from each plane - - F.1. Relation under permutations - -## iv. References - -- https://arxiv.org/pdf/1912.04804.pdf - --/ - -@[expose] public section - -open Nat Module Finset BigOperators - -namespace PureU1 - -variable {n : ℕ} - -namespace VectorLikeEvenPlane - -/-! - -## E. The combined basis - --/ - -/-! - -### E.1. As a map into linear solutions - --/ -/-- The whole basis as `LinSols`. -/ -def basisa : (Fin n.succ) ⊕ (Fin n) → (PureU1 (2 * n.succ)).LinSols := fun i => - match i with - | .inl i => symmBasis i - | .inr i => shiftBasis i - -/-! - -### E.2. Inclusion of the span of the basis into charges - --/ - -/-- 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 := - symmPlane f + shiftPlane g - -/-! - -### E.3. Components of the inclusion into charges - --/ - -lemma Pa_evenShiftFst (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : - Pa f g (evenShiftFst j) = f j.succ + g j := by - rw [Pa] - simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [shiftPlane_evenShiftFst, evenShiftFst_eq_evenFst_succ, symmPlane_evenFst] - -lemma Pa_evenShiftSnd (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (j : Fin n) : - Pa f g (evenShiftSnd j) = - f j.castSucc - g j := by - rw [Pa] - simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [shiftPlane_evenShiftSnd, evenShiftSnd_eq_evenSnd_castSucc, symmPlane_evenSnd] - ring - -lemma Pa_evenShiftZero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : - Pa f g (evenShiftZero) = f 0 := by - rw [Pa] - simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [shiftPlane_evenShiftZero, evenShiftZero_eq_evenFst_zero, symmPlane_evenFst] - exact Rat.add_zero (f 0) - -lemma Pa_evenShiftLast (f : Fin n.succ → ℚ) (g : Fin n → ℚ) : - Pa f g (evenShiftLast) = - f (Fin.last n) := by - rw [Pa] - simp only [ACCSystemCharges.chargesAddCommMonoid_add] - rw [shiftPlane_evenShiftLast, evenShiftLast_eq_evenSnd_last, symmPlane_evenSnd] - exact Rat.add_zero (-f (Fin.last n)) - -/-! - -### E.4. Kernel of the inclusion into charges - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma Pa_zero (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : Pa f g = 0) : - ∀ i, f i = 0 := by - have h₃ := Pa_evenShiftZero 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 - have hivi : iv < n.succ := lt_of_succ_lt hiv - have hi2 := hi hivi - have h1 := Pa_evenShiftFst f g ⟨iv, succ_lt_succ_iff.mp hiv⟩ - have h2 := Pa_evenShiftSnd f g ⟨iv, succ_lt_succ_iff.mp hiv⟩ - rw [h] at h1 h2 - simp only [Fin.succ_mk, Fin.castSucc_mk] at h1 h2 - erw [hi2] at h2 - change 0 = _ at h2 - simp only [neg_zero, zero_sub, zero_eq_neg] at h2 - rw [h2] at h1 - exact right_eq_add.mp h1 - exact hinduc i.val i.prop - -lemma Pa_zero_shift (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, symmPlane] at h - simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h - exact shiftPlane_zero g h - -/-! - -### E.5. The inclusion of the span of the basis into linear solutions - --/ -/-- 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'_symmPlaneLinSols_shiftPlaneLinSols (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : - Pa' f = symmPlaneLinSols (f ∘ Sum.inl) + shiftPlaneLinSols (f ∘ Sum.inr) := by - exact Fintype.sum_sum_type _ - -/-! - -### E.6. The combined basis vectors are linearly independent - --/ - -theorem basisa_linear_independent : LinearIndependent ℚ (@basisa n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change Pa' f = 0 at h - 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 - rw [Pa'_symmPlaneLinSols_shiftPlaneLinSols] at h1 - change (symmPlaneLinSols (f ∘ Sum.inl)).val + - (shiftPlaneLinSols (f ∘ Sum.inr)).val = 0 at h1 - rw [shiftPlaneLinSols_val, symmPlaneLinSols_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_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 - intro i - simp_all - cases i - · simp_all - · simp_all -/-! - -### E.7. Injectivity of the inclusion into linear solutions - --/ - -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] - -lemma Pa'_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : - Pa' (Sum.elim g f) = Pa' (Sum.elim g' f') ↔ Pa g f = Pa g' f' := by - refine Iff.intro (fun h => ?_) (fun h => ?_) - · rw [Pa'_eq, Sum.elim_eq_iff] at h - rw [h.left, h.right] - · apply ACCSystemLinear.LinSols.ext - rw [Pa'_symmPlaneLinSols_shiftPlaneLinSols, Pa'_symmPlaneLinSols_shiftPlaneLinSols] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, - symmPlaneLinSols_val, shiftPlaneLinSols_val] - exact h - -lemma Pa_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : - Pa g f = Pa g' f' ↔ g = g' ∧ f = f' := by - rw [← Pa'_elim_eq_iff, ← Sum.elim_eq_iff] - exact Pa'_eq _ _ - -/-! - -### E.8. Cardinality of the basis - --/ - -lemma basisa_card : Fintype.card ((Fin n.succ) ⊕ (Fin n)) = - Module.finrank ℚ (PureU1 (2 * n.succ)).LinSols := by - erw [BasisLinear.finrank_AnomalyFreeLinear] - simp only [Fintype.card_sum, Fintype.card_fin, mul_eq] - exact split_odd n - -/-! - -### E.9. The basis vectors as a basis - --/ - -/-- The basis formed out of our `basisa` vectors. -/ -noncomputable def basisaAsBasis : - Basis (Fin (succ n) ⊕ Fin n) ℚ (PureU1 (2 * succ n)).LinSols := - basisOfLinearIndependentOfCardEqFinrank (@basisa_linear_independent n) basisa_card - -/-! - -## F. Every linear solution is the sum of a point from each plane - --/ - -lemma span_basis (S : (PureU1 (2 * n.succ)).LinSols) : - ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlane g + shiftPlane f := by - have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisaAsBasis S) - obtain ⟨f, hf⟩ := h - simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, - Fintype.sum_sum_type] at hf - change symmPlaneLinSols _ + shiftPlaneLinSols _ = S at hf - use f ∘ Sum.inl - use f ∘ Sum.inr - rw [← hf] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, - symmPlaneLinSols_val, shiftPlaneLinSols_val] - rfl - -/-! - -### F.1. Relation under permutations - --/ -lemma span_basis_swapShift {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) - (hS : ((FamilyPermutations (2 * n.succ)).linSolRep - (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') (g : Fin n.succ → ℚ) (f : Fin n → ℚ) - (h : S.val = symmPlane g + shiftPlane f) : ∃ (g' : Fin n.succ → ℚ) (f' : Fin n → ℚ), - S'.val = symmPlane g' + shiftPlane f' ∧ shiftPlane f' = shiftPlane f + - (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by - let X := shiftPlane f + - (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j - have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by - apply Submodule.add_mem - exact (shiftPlane_in_span f) - exact (smul_shiftBasisAsCharges_in_span S j) - have hXsum := (Submodule.mem_span_range_iff_exists_fun ℚ).mp hX - obtain ⟨f', hf'⟩ := hXsum - use g - use f' - change shiftPlane f' = _ at hf' - erw [hf'] - simp only [and_self, and_true, X] - rw [← add_assoc, ← h] - apply swapShift_as_add at hS - exact hS - -end VectorLikeEvenPlane - -end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean index ed64f9611..6213618d1 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean @@ -21,10 +21,10 @@ boundary rather than symmetrically. - `shiftBasisAsCharges` : The basis vectors of the shifted plane as charges. - `shiftBasis` : The basis vectors as `LinSols`. -- `shiftPlane` : A point in the span of the shifted basis as a charge, +- `shiftPlaneAsCharges` : A point in the span of the shifted basis as a charge, i.e., the inclusion of the shifted plane into charges. -- `shiftPlaneLinSols` : The inclusion of the shifted plane into linear solutions. -- `shiftPlane_accCube` : Charges from the shifted plane satisfy the cubic ACC. +- `shiftPlane` : The inclusion of the shifted plane into linear solutions. +- `shiftPlaneAsCharges_accCube` : Charges from the shifted plane satisfy the cubic ACC. - `shiftBasis_linear_independent` : The shifted basis vectors are linearly independent. ## iii. Table of contents @@ -32,19 +32,18 @@ boundary rather than symmetrically. - A.2. The shifted even split: Splitting the charges up via `1 + (n + n + 1)` - A.3. Lemmas relating the two splittings - C. The second plane (shifted plane) - - C.2. Components of the vectors - - C.3. The vectors satisfy the linear ACCs - - C.4. The vectors satisfy the cubic ACC - - C.6. The vectors as linear solutions - - C.7. The inclusion of the shifted plane into charges - - C.8. Components of the inclusion into charges - - C.9. The inclusion into charges satisfies the cubic ACC - - C.10. Kernel of the inclusion into charges - - C.11. The inclusion of the shifted plane into the span of the basis - - C.12. The inclusion of the plane into linear solutions - - C.13. The basis vectors are linearly independent - - C.14. Properties of the basis vectors relating to the span - - C.15. Permutations as additions of basis vectors + - C.1. The basis vectors of the shifted plane as charges + - C.2. Components of the basis vectors + - C.3. The basis vectors satisfy the linear ACCs + - C.4. The basis vectors satisfy the cubic ACC + - C.5. The basis vectors as `LinSols` + - C.6. The basis vectors are linearly independent + - C.7. Permutations as additions of basis vectors + - C.8. The inclusion of the shifted plane into charges + - C.9. Components of the shifted plane + - C.10. Points satisfy the cubic ACC + - C.11. Kernel of the inclusion + - C.12. The inclusion of the plane into `LinSols` - D. Mixed cubic ACCs involving points from both planes ## iv. References @@ -141,6 +140,12 @@ lemma evenShiftSnd_eq_evenSnd_castSucc (j : Fin n) : evenShiftSnd j = evenSnd j. -/ +/-! + +### C.1. The basis vectors of the shifted plane as charges + +-/ + /-- The basis vectors of the shifted plane as charges. -/ def shiftBasisAsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges := fun i => @@ -153,7 +158,7 @@ def shiftBasisAsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges := 0 /-! -### C.2. Components of the vectors +### C.2. Components of the basis vectors -/ @@ -246,7 +251,7 @@ lemma shiftBasisAsCharges_on_evenShiftLast (j : Fin n) : /-! -### C.3. The vectors satisfy the linear ACCs +### C.3. The basis vectors satisfy the linear ACCs -/ @@ -259,7 +264,7 @@ lemma shiftBasisAsCharges_linearACC (j : Fin n) : /-! -### C.4. The vectors satisfy the cubic ACC +### C.4. The basis vectors satisfy the cubic ACC -/ @@ -277,7 +282,7 @@ lemma shiftBasisAsCharges_accCube (j : Fin n) : /-! -### C.6. The vectors as linear solutions +### C.5. The basis vectors as `LinSols` -/ /-- The basis vectors of the shifted plane as `LinSols`. -/ @@ -292,23 +297,70 @@ def shiftBasis (j : Fin n) : (PureU1 (2 * n.succ)).LinSols := /-! -### C.7. The inclusion of the shifted plane into charges +### C.6. The basis vectors are linearly independent + +-/ + +theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + have h1 : (∑ i, f i • shiftBasis i).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 + have h2 : shiftPlaneAsCharges f = 0 := by + have : (∑ i, f i • shiftBasis i).val = shiftPlaneAsCharges f := by + simp only [succ_eq_add_one, shiftPlaneAsCharges] + funext i + rw [sum_of_anomaly_free_linear, sum_of_charges] + simp [shiftBasis_val] + rw [← this, h1] + exact shiftPlaneAsCharges_zero f h2 + +/-! + +### C.7. Permutations as additions of basis vectors + +-/ + +/-- Swapping the elements evenShiftFst j and evenShiftSnd j is equivalent to + adding a vector shiftBasisAsCharges j. -/ +lemma linSolRep_swap_evenShift_eq_add {S S' : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) + (hS : ((FamilyPermutations (2 * n.succ)).linSolRep + (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') : + S'.val = S.val + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • + shiftBasisAsCharges j := by + funext i + rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] + by_cases hi : i = evenShiftFst j + · subst hi + simp [HSMul.hSMul, shiftBasisAsCharges_on_evenShiftFst_self, Equiv.swap_apply_left] + · by_cases hi2 : i = evenShiftSnd j + · simp [HSMul.hSMul, hi2, shiftBasisAsCharges_on_evenShiftSnd_self, Equiv.swap_apply_right] + · simp only [succ_eq_add_one, Equiv.invFun_as_coe, HSMul.hSMul, + ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul] + rw [shiftBasisAsCharges_on_other hi hi2] + aesop + +/-! + +### C.8. The inclusion of the shifted plane into charges -/ /-- A point in the span of the shifted basis as a charge. -/ -def shiftPlane (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := +def shiftPlaneAsCharges (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • shiftBasisAsCharges i /-! -### C.8. Components of the inclusion into charges +### C.9. Components of the shifted plane -/ -lemma shiftPlane_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : - shiftPlane f (evenShiftFst j) = f j := by - rw [shiftPlane, sum_of_charges] +lemma shiftPlaneAsCharges_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : + shiftPlaneAsCharges f (evenShiftFst j) = f j := by + rw [shiftPlaneAsCharges, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] · rw [shiftBasisAsCharges_on_evenShiftFst_self] @@ -318,9 +370,9 @@ lemma shiftPlane_evenShiftFst (f : Fin n → ℚ) (j : Fin n) : exact Rat.mul_zero (f k) · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] -lemma shiftPlane_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : - shiftPlane f (evenShiftSnd j) = - f j := by - rw [shiftPlane, sum_of_charges] +lemma shiftPlaneAsCharges_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : + shiftPlaneAsCharges f (evenShiftSnd j) = - f j := by + rw [shiftPlaneAsCharges, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] · rw [shiftBasisAsCharges_on_evenShiftSnd_self] @@ -330,94 +382,48 @@ lemma shiftPlane_evenShiftSnd (f : Fin n → ℚ) (j : Fin n) : exact Rat.mul_zero (f k) · simp -lemma shiftPlane_evenShiftZero (f : Fin n → ℚ) : shiftPlane f (evenShiftZero) = 0 := by - rw [shiftPlane, sum_of_charges] +lemma shiftPlaneAsCharges_evenShiftZero (f : Fin n → ℚ) : shiftPlaneAsCharges f (evenShiftZero) = 0 := by + rw [shiftPlaneAsCharges, sum_of_charges] simp [HSMul.hSMul, SMul.smul, shiftBasisAsCharges_on_evenShiftZero] -lemma shiftPlane_evenShiftLast (f : Fin n → ℚ) : shiftPlane f evenShiftLast = 0 := by - rw [shiftPlane, sum_of_charges] +lemma shiftPlaneAsCharges_evenShiftLast (f : Fin n → ℚ) : shiftPlaneAsCharges f evenShiftLast = 0 := by + rw [shiftPlaneAsCharges, sum_of_charges] simp [HSMul.hSMul, SMul.smul, shiftBasisAsCharges_on_evenShiftLast] /-! -### C.9. The inclusion into charges satisfies the cubic ACC +### C.10. Points satisfy the cubic ACC -/ set_option backward.isDefEq.respectTransparency false in -lemma shiftPlane_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (shiftPlane f) = 0 := by - rw [accCube_explicit, sum_evenShift, shiftPlane_evenShiftZero, shiftPlane_evenShiftLast] +lemma shiftPlaneAsCharges_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (shiftPlaneAsCharges f) = 0 := by + rw [accCube_explicit, sum_evenShift, shiftPlaneAsCharges_evenShiftZero, shiftPlaneAsCharges_evenShiftLast] simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero, Function.comp_apply, zero_add] apply Finset.sum_eq_zero intro i _ - simp only [shiftPlane_evenShiftFst, shiftPlane_evenShiftSnd] + simp only [shiftPlaneAsCharges_evenShiftFst, shiftPlaneAsCharges_evenShiftSnd] ring /-! -### C.10. Kernel of the inclusion into charges +### C.11. Kernel of the inclusion -/ -lemma shiftPlane_zero (f : Fin n → ℚ) (h : shiftPlane f = 0) : ∀ i, f i = 0 := by +lemma shiftPlaneAsCharges_zero (f : Fin n → ℚ) (h : shiftPlaneAsCharges f = 0) : ∀ i, f i = 0 := by intro i - rw [← shiftPlane_evenShiftFst f] + rw [← shiftPlaneAsCharges_evenShiftFst f] rw [h] rfl -/-! - -### C.11. The inclusion of the shifted plane into the span of the basis - --/ - -lemma shiftPlane_in_span (f : Fin n → ℚ) : - shiftPlane f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by +lemma shiftPlaneAsCharges_in_span (f : Fin n → ℚ) : + shiftPlaneAsCharges f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] use f rfl -/-! - -### C.12. The inclusion of the plane into linear solutions - --/ - -/-- A point in the span of the shifted basis as a linear solution. -/ -def shiftPlaneLinSols (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).LinSols := - ∑ i, f i • shiftBasis i - -lemma shiftPlaneLinSols_val (f : Fin n → ℚ) : - (shiftPlaneLinSols f).val = shiftPlane f := by - simp only [succ_eq_add_one, shiftPlaneLinSols, shiftPlane] - funext i - rw [sum_of_anomaly_free_linear, sum_of_charges] - rfl - -/-! - -### C.13. The basis vectors are linearly independent - --/ - -theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change shiftPlaneLinSols f = 0 at h - have h1 : (shiftPlaneLinSols 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 - rw [shiftPlaneLinSols_val] at h1 - exact shiftPlane_zero f h1 - -/-! - -### C.14. Properties of the basis vectors relating to the span - --/ - lemma smul_shiftBasisAsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : Fin n) : (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • shiftBasisAsCharges j ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by @@ -428,28 +434,21 @@ lemma smul_shiftBasisAsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : /-! -### C.15. Permutations as additions of basis vectors +### C.12. The inclusion of the plane into `LinSols` -/ -/-- Swapping the elements evenShiftFst j and evenShiftSnd j is equivalent to - adding a vector shiftBasisAsCharges j. -/ -lemma swapShift_as_add {S S' : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) - (hS : ((FamilyPermutations (2 * n.succ)).linSolRep - (Equiv.swap (evenShiftFst j) (evenShiftSnd j))) S = S') : - S'.val = S.val + (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) • - shiftBasisAsCharges j := by +/-- A point in the span of the shifted basis as a linear solution. -/ +def shiftPlane (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).LinSols := + ∑ i, f i • shiftBasis i + +lemma shiftPlane_val (f : Fin n → ℚ) : + (shiftPlane f).val = shiftPlaneAsCharges f := by + simp only [succ_eq_add_one, shiftPlane, shiftPlaneAsCharges] funext i - rw [← hS, FamilyPermutations_anomalyFreeLinear_apply] - by_cases hi : i = evenShiftFst j - · subst hi - simp [HSMul.hSMul, shiftBasisAsCharges_on_evenShiftFst_self, Equiv.swap_apply_left] - · by_cases hi2 : i = evenShiftSnd j - · simp [HSMul.hSMul, hi2, shiftBasisAsCharges_on_evenShiftSnd_self, Equiv.swap_apply_right] - · simp only [succ_eq_add_one, Equiv.invFun_as_coe, HSMul.hSMul, - ACCSystemCharges.chargesAddCommMonoid_add, ACCSystemCharges.chargesModule_smul] - rw [shiftBasisAsCharges_on_other hi hi2] - aesop + rw [sum_of_anomaly_free_linear, sum_of_charges] + rfl + /-! ## D. Mixed cubic ACCs involving points from both planes @@ -458,7 +457,7 @@ lemma swapShift_as_add {S S' : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) set_option backward.isDefEq.respectTransparency false in lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n.succ → ℚ) (j : Fin n) : - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftBasisAsCharges j) + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftBasisAsCharges j) = g (j.succ) ^ 2 - g (j.castSucc) ^ 2 := by simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] @@ -467,7 +466,7 @@ lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n.succ → ℚ) ( rw [Finset.sum_eq_single j, shiftBasisAsCharges_on_evenShiftFst_self, shiftBasisAsCharges_on_evenShiftSnd_self] · simp only [evenShiftFst_eq_evenFst_succ, mul_one, evenShiftSnd_eq_evenSnd_castSucc, mul_neg] - rw [symmPlane_evenFst, symmPlane_evenSnd] + rw [symmPlaneAsCharges_evenFst, symmPlaneAsCharges_evenSnd] ring · intro k _ hkj erw [shiftBasisAsCharges_on_evenShiftFst_other hkj.symm, @@ -477,8 +476,8 @@ lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n.succ → ℚ) ( set_option backward.isDefEq.respectTransparency false in lemma shiftPlane_shiftPlane_symmBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n.succ) : - accCubeTriLinSymm (shiftPlane g) (shiftPlane g) (symmBasisAsCharges j) - = (shiftPlane g (evenFst j))^2 - (shiftPlane g (evenSnd j))^2 := by + accCubeTriLinSymm (shiftPlaneAsCharges g) (shiftPlaneAsCharges g) (symmBasisAsCharges j) + = (shiftPlaneAsCharges g (evenFst j))^2 - (shiftPlaneAsCharges g (evenSnd j))^2 := by simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] rw [sum_even] diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean index 866722a18..b290cd507 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean @@ -22,10 +22,10 @@ paired symmetrically. - `symmBasisAsCharges` : The basis vectors of the symmetric plane as charges. - `symmBasis` : The basis vectors as `LinSols`. -- `symmPlane` : A point in the span of the symmetric basis as a charge, +- `symmPlaneAsCharges` : A point in the span of the symmetric basis as a charge, i.e., the inclusion of the symmetric plane into charges. -- `symmPlaneLinSols` : The inclusion of the symmetric plane into linear solutions. -- `symmPlane_accCube` : Charges from the symmetric plane satisfy the cubic ACC. +- `symmPlane` : The inclusion of the symmetric plane into linear solutions. +- `symmPlaneAsCharges_accCube` : Charges from the symmetric plane satisfy the cubic ACC. - `symmBasis_linear_independent` : The symmetric basis vectors are linearly independent. - `vectorLikeEven_in_span` : Every vector-like even solution is in the span of the symmetric basis. @@ -236,7 +236,7 @@ def symmBasis (j : Fin n.succ) : (PureU1 (2 * n.succ)).LinSols := -/ /-- A point in the span of the symmetric basis as a charge. -/ -def symmPlane (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).Charges := +def symmPlaneAsCharges (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).Charges := ∑ i, f i • symmBasisAsCharges i /-! @@ -245,9 +245,9 @@ def symmPlane (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).Charges := -/ -lemma symmPlane_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : - symmPlane f (evenFst j) = f j := by - rw [symmPlane, sum_of_charges] +lemma symmPlaneAsCharges_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : + symmPlaneAsCharges f (evenFst j) = f j := by + rw [symmPlaneAsCharges, sum_of_charges] simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] · rw [symmBasisAsCharges_on_evenFst_self] @@ -257,9 +257,9 @@ lemma symmPlane_evenFst (f : Fin n.succ → ℚ) (j : Fin n.succ) : exact Rat.mul_zero (f k) · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] -lemma symmPlane_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : - symmPlane f (evenSnd j) = - f j := by - rw [symmPlane, sum_of_charges] +lemma symmPlaneAsCharges_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : + symmPlaneAsCharges f (evenSnd j) = - f j := by + rw [symmPlaneAsCharges, sum_of_charges] simp only [succ_eq_add_one, HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] · simp only [symmBasisAsCharges_on_evenSnd_self, mul_neg, mul_one] @@ -267,11 +267,11 @@ lemma symmPlane_evenSnd (f : Fin n.succ → ℚ) (j : Fin n.succ) : simp only [symmBasisAsCharges_on_evenSnd_other hkj, mul_zero] · simp -lemma symmPlane_evenSnd_evenFst (f : Fin n.succ → ℚ) : - symmPlane f ∘ evenSnd = - symmPlane f ∘ evenFst := by +lemma symmPlaneAsCharges_evenSnd_evenFst (f : Fin n.succ → ℚ) : + symmPlaneAsCharges f ∘ evenSnd = - symmPlaneAsCharges f ∘ evenFst := by funext j simp only [PureU1_numberCharges, Function.comp_apply, Pi.neg_apply] - rw [symmPlane_evenFst, symmPlane_evenSnd] + rw [symmPlaneAsCharges_evenFst, symmPlaneAsCharges_evenSnd] /-! @@ -279,19 +279,19 @@ lemma symmPlane_evenSnd_evenFst (f : Fin n.succ → ℚ) : -/ -lemma symmPlane_linearACC (f : Fin n.succ → ℚ) : - (accGrav (2 * n.succ)) (symmPlane f) = 0 := by +lemma symmPlaneAsCharges_linearACC (f : Fin n.succ → ℚ) : + (accGrav (2 * n.succ)) (symmPlaneAsCharges f) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] rw [sum_even] - simp [symmPlane_evenSnd, symmPlane_evenFst] + simp [symmPlaneAsCharges_evenSnd, symmPlaneAsCharges_evenFst] -lemma symmPlane_accCube (f : Fin n.succ → ℚ) : - accCube (2 * n.succ) (symmPlane f) = 0 := by +lemma symmPlaneAsCharges_accCube (f : Fin n.succ → ℚ) : + accCube (2 * n.succ) (symmPlaneAsCharges f) = 0 := by rw [accCube_explicit, sum_even] apply Finset.sum_eq_zero intro i _ - simp only [succ_eq_add_one, Function.comp_apply, symmPlane_evenFst, symmPlane_evenSnd] + simp only [succ_eq_add_one, Function.comp_apply, symmPlaneAsCharges_evenFst, symmPlaneAsCharges_evenSnd] ring /-! @@ -300,9 +300,9 @@ lemma symmPlane_accCube (f : Fin n.succ → ℚ) : -/ -lemma symmPlane_zero (f : Fin n.succ → ℚ) (h : symmPlane f = 0) : ∀ i, f i = 0 := by +lemma symmPlaneAsCharges_zero (f : Fin n.succ → ℚ) (h : symmPlaneAsCharges f = 0) : ∀ i, f i = 0 := by intro i - erw [← symmPlane_evenFst f] + erw [← symmPlaneAsCharges_evenFst f] rw [h] rfl @@ -313,12 +313,12 @@ lemma symmPlane_zero (f : Fin n.succ → ℚ) (h : symmPlane f = 0) : ∀ i, f i -/ /-- A point in the span of the symmetric basis as a linear solution. -/ -def symmPlaneLinSols (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).LinSols := +def symmPlane (f : Fin n.succ → ℚ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • symmBasis i -lemma symmPlaneLinSols_val (f : Fin n.succ → ℚ) : - (symmPlaneLinSols f).val = symmPlane f := by - simp only [succ_eq_add_one, symmPlaneLinSols, symmPlane] +lemma symmPlane_val (f : Fin n.succ → ℚ) : + (symmPlane f).val = symmPlaneAsCharges f := by + simp only [succ_eq_add_one, symmPlane, symmPlaneAsCharges] funext i rw [sum_of_anomaly_free_linear, sum_of_charges] rfl @@ -332,13 +332,13 @@ lemma symmPlaneLinSols_val (f : Fin n.succ → ℚ) : theorem symmBasis_linear_independent : LinearIndependent ℚ (@symmBasis n) := by apply Fintype.linearIndependent_iff.mpr intro f h - change symmPlaneLinSols f = 0 at h - have h1 : (symmPlaneLinSols f).val = 0 := + change symmPlane f = 0 at h + have h1 : (symmPlane 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 - rw [symmPlaneLinSols_val] at h1 - exact symmPlane_zero f h1 + rw [symmPlane_val] at h1 + exact symmPlaneAsCharges_zero f h1 /-! @@ -357,13 +357,13 @@ lemma vectorLikeEven_in_span (S : (PureU1 (2 * n.succ)).LinSols) use f apply ACCSystemLinear.LinSols.ext rw [sortAFL_val] - erw [symmPlaneLinSols_val] + erw [symmPlane_val] apply ext_even · intro i - rw [symmPlane_evenFst] + rw [symmPlaneAsCharges_evenFst] rfl · intro i - rw [symmPlane_evenSnd] + rw [symmPlaneAsCharges_evenSnd] have ht := hS i change sort S.val (evenFst i) = - sort S.val (evenSnd i) at ht have h : sort S.val (evenSnd i) = - sort S.val (evenFst i) := by diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean index c151253f7..1054d8295 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/LineInCubic.lean @@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.Even.Basis public import Physlib.QFT.QED.AnomalyCancellation.LineInPlaneCond /-! @@ -36,40 +36,40 @@ 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 := - ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = Pa g f) (a b : ℚ), - accCube (2 * n.succ) (a • symmPlane g + b • shiftPlane f) = 0 + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = basisCharge g f) (a b : ℚ), + accCube (2 * n.succ) (a • symmPlaneAsCharges g + b • shiftPlaneAsCharges f) = 0 set_option backward.isDefEq.respectTransparency false in 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 (symmPlane g) (symmPlane g) (shiftPlane f) - + b * accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g)) = 0 := by + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = basisCharge g f) (a b : ℚ), + 3 * a * b * (a * accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) + + b * accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g)) = 0 := by intro g f hS a b have h1 := h g f hS a b - change accCubeTriLinSymm.toCubic (a • symmPlane g + b • shiftPlane f) = 0 at h1 + change accCubeTriLinSymm.toCubic (a • symmPlaneAsCharges g + b • shiftPlaneAsCharges f) = 0 at h1 simp only [TriLinearSymm.toCubic_add] at h1 simp only [HomogeneousCubic.map_smul, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] at h1 conv_lhs at h1 => enter [1, 1, 1, 2] change accCube _ _ - rw [symmPlane_accCube] + rw [symmPlaneAsCharges_accCube] conv_lhs at h1 => enter [1, 1, 2, 2] change accCube _ _ - rw [shiftPlane_accCube] + rw [shiftPlaneAsCharges_accCube] rw [← h1] ring /-- This lemma states that for a given `S` of type `(PureU1 (2 * n.succ)).AnomalyFreeLinear` and a proof `h` that the line through `S` lies on a cubic curve, -for any functions `g : Fin n.succ → ℚ` and `f : Fin n → ℚ`, if `S.val = symmPlane g + shiftPlane f`, -then `accCubeTriLinSymm.toFun (symmPlane g, symmPlane g, shiftPlane f) = 0`. +for any functions `g : Fin n.succ → ℚ` and `f : Fin n → ℚ`, if `S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f`, +then `accCubeTriLinSymm.toFun (symmPlaneAsCharges g, symmPlaneAsCharges g, shiftPlaneAsCharges f) = 0`. -/ lemma line_in_cubic_symmPlane_symmPlane_shiftPlane {S : (PureU1 (2 * n.succ)).LinSols} (h : LineInCubic S) : - ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f), - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = 0 := by + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f), + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges 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 @@ -98,9 +98,9 @@ lemma lineInCubicPerm_permute {S : (PureU1 (2 * n.succ)).LinSols} set_option backward.isDefEq.respectTransparency false in lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ)).LinSols} (LIC : LineInCubicPerm S) : - ∀ (j : Fin n) (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = Pa g f), + ∀ (j : Fin n) (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = basisCharge g f), (S.val (evenShiftSnd j) - S.val (evenShiftFst j)) - * accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftBasisAsCharges j) = 0 := by + * accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftBasisAsCharges j) = 0 := by intro j g f h let S' := (FamilyPermutations (2 * n.succ)).linSolRep (Equiv.swap (evenShiftFst j) (evenShiftSnd j)) S @@ -116,24 +116,24 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ)).LinSols} simpa using h2 lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube' {S : (PureU1 (2 * n.succ.succ)).LinSols} - (f : Fin n.succ.succ → ℚ) (g : Fin n.succ → ℚ) (hS : S.val = Pa f g) : - accCubeTriLinSymm (symmPlane f) (symmPlane f) (shiftBasisAsCharges (Fin.last n)) = + (f : Fin n.succ.succ → ℚ) (g : Fin n.succ → ℚ) (hS : S.val = basisCharge f g) : + accCubeTriLinSymm (symmPlaneAsCharges f) (symmPlaneAsCharges f) (shiftBasisAsCharges (Fin.last n)) = - (S.val (evenShiftSnd (Fin.last n)) + S.val (evenShiftFst (Fin.last n))) * (2 * S.val evenShiftLast + S.val (evenShiftSnd (Fin.last n)) + S.val (evenShiftFst (Fin.last n))) := by rw [symmPlane_symmPlane_shiftBasisAsCharges_accCube f (Fin.last n)] - have h1 := Pa_evenShiftLast f g - have h2 := Pa_evenShiftFst f g (Fin.last n) - have h3 := Pa_evenShiftSnd f g (Fin.last n) + have h1 := basisCharge_evenShiftLast f g + have h2 := basisCharge_evenShiftFst f g (Fin.last n) + have h3 := basisCharge_evenShiftSnd f g (Fin.last n) simp only [Fin.succ_last, Nat.succ_eq_add_one] at h1 h2 h3 - have hl : f (Fin.succ (Fin.last n)) = - Pa f g evenShiftLast := by + have hl : f (Fin.succ (Fin.last n)) = - basisCharge f g evenShiftLast := by simp_all only [Fin.succ_last, neg_neg] erw [hl] at h2 - have hg : g (Fin.last n) = Pa f g (evenShiftFst (Fin.last n)) + Pa f g evenShiftLast := by + have hg : g (Fin.last n) = basisCharge f g (evenShiftFst (Fin.last n)) + basisCharge f g evenShiftLast := by linear_combination -(1 * h2) have hll : f (Fin.castSucc (Fin.last n)) = - - (Pa f g (evenShiftSnd (Fin.last n)) + Pa f g (evenShiftFst (Fin.last n)) - + Pa f g evenShiftLast) := by + - (basisCharge f g (evenShiftSnd (Fin.last n)) + basisCharge f g (evenShiftFst (Fin.last n)) + + basisCharge f g evenShiftLast) := by linear_combination h3 - 1 * hg rw [← hS] at hl hll rw [hl, hll] diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean index d566a28b7..7c0bbb8dc 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean @@ -35,16 +35,16 @@ point in `(PureU1 (2 * n.succ)).AnomalyFreeLinear`, which we will later show ext free point. -/ def parameterizationAsLinear (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (a : ℚ) : (PureU1 (2 * n.succ)).LinSols := - a • ((accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g)) • symmPlaneLinSols g + - (- accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f)) • shiftPlaneLinSols f) + a • ((accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g)) • symmPlane g + + (- accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f)) • shiftPlane f) lemma parameterizationAsLinear_val (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (a : ℚ) : (parameterizationAsLinear g f a).val = - a • ((accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g)) • P g + - (- accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f)) • P! f) := by + a • ((accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g)) • symmPlaneAsCharges g + + (- accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f)) • shiftPlaneAsCharges f) := by rw [parameterizationAsLinear] - change a • (_ • (symmPlaneLinSols g).val + _ • (shiftPlaneLinSols f).val) = _ - rw [symmPlaneLinSols_val, shiftPlaneLinSols_val] + change a • (_ • (symmPlane g).val + _ • (shiftPlane f).val) = _ + rw [symmPlane_val, shiftPlane_val] set_option backward.isDefEq.respectTransparency false in lemma parameterizationCharge_cube (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (a : ℚ) : @@ -52,7 +52,7 @@ lemma parameterizationCharge_cube (g : Fin n.succ → ℚ) (f : Fin n → ℚ) ( change accCubeTriLinSymm.toCubic _ = 0 rw [parameterizationAsLinear_val, HomogeneousCubic.map_smul, TriLinearSymm.toCubic_add, HomogeneousCubic.map_smul, HomogeneousCubic.map_smul] - erw [symmPlane_accCube, shiftPlane_accCube] + erw [symmPlaneAsCharges_accCube, shiftPlaneAsCharges_accCube] rw [accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] @@ -65,50 +65,50 @@ def parameterization (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (a : ℚ) : parameterizationCharge_cube g f a⟩ lemma anomalyFree_param {S : (PureU1 (2 * n.succ)).Sols} - (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (hS : S.val = symmPlane g + shiftPlane f) : - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = - accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g) := by + (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (hS : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f) : + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = - accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g) := by have hC := S.cubicSol rw [hS] at hC - change (accCube (2 * n.succ)) (symmPlane g + shiftPlane f) = 0 at hC - erw [TriLinearSymm.toCubic_add, symmPlane_accCube, shiftPlane_accCube] at hC + change (accCube (2 * n.succ)) (symmPlaneAsCharges g + shiftPlaneAsCharges f) = 0 at hC + erw [TriLinearSymm.toCubic_add, symmPlaneAsCharges_accCube, shiftPlaneAsCharges_accCube] at hC linear_combination hC / 3 -/-- 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 (symmPlaneAsCharges g, symmPlaneAsCharges g, shiftPlaneAsCharges f) ≠ 0`. In this case our parameterization above will be able to recover this point. -/ def GenericCase (S : (PureU1 (2 * n.succ)).Sols) : Prop := - ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f), - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) ≠ 0 + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f), + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) ≠ 0 lemma genericCase_exists (S : (PureU1 (2 * n.succ)).Sols) - (hs : ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlane g + shiftPlane f ∧ - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) ≠ 0) : GenericCase S := by + (hs : ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f ∧ + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) ≠ 0) : GenericCase S := by intro g f hS hC obtain ⟨g', f', hS', hC'⟩ := hs rw [hS] at hS' - erw [Pa_eq] at hS' + erw [basisCharge_eq] at hS' 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`. -/ def SpecialCase (S : (PureU1 (2 * n.succ)).Sols) : Prop := - ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f), - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = 0 + ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f), + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = 0 lemma specialCase_exists (S : (PureU1 (2 * n.succ)).Sols) - (hs : ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlane g + shiftPlane f ∧ - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = 0) : SpecialCase S := by + (hs : ∃ (g : Fin n.succ → ℚ) (f : Fin n → ℚ), S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f ∧ + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = 0) : SpecialCase S := by intro g f hS obtain ⟨g', f', hS', hC'⟩ := hs rw [hS] at hS' - erw [Pa_eq] at hS' + erw [basisCharge_eq] at hS' rw [hS'.1, hS'.2] exact hC' lemma generic_or_special (S : (PureU1 (2 * n.succ)).Sols) : GenericCase S ∨ SpecialCase S := by obtain ⟨g, f, h⟩ := span_basis S.1.1 - have h1 : accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) ≠ 0 ∨ - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = 0 := by + have h1 : accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) ≠ 0 ∨ + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = 0 := by exact ne_or_eq _ _ rcases h1 with h1 | h1 · exact Or.inl (genericCase_exists S ⟨g, f, h, h1⟩) @@ -117,7 +117,7 @@ lemma generic_or_special (S : (PureU1 (2 * n.succ)).Sols) : 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 (shiftPlane f) (shiftPlane f) (symmPlane g))⁻¹ + use g, f, (accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g))⁻¹ rw [parameterization] apply ACCSystem.Sols.ext rw [parameterizationAsLinear_val] @@ -135,14 +135,14 @@ lemma special_case_lineInCubic {S : (PureU1 (2 * n.succ)).Sols} intro g f hS a b erw [TriLinearSymm.toCubic_add] rw [HomogeneousCubic.map_smul, HomogeneousCubic.map_smul] - erw [symmPlane_accCube, shiftPlane_accCube] + erw [symmPlaneAsCharges_accCube, shiftPlaneAsCharges_accCube] have h := h g f hS rw [accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, h] rw [anomalyFree_param _ _ hS] at h simp only [Nat.succ_eq_add_one, accCubeTriLinSymm_toFun_apply_apply, neg_eq_zero] at h - change accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g) = 0 at h + change accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g) = 0 at h erw [h] simp From 548503564cc97084a07d2a90d528c6f75b13c797 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 04:59:28 +0000 Subject: [PATCH 19/22] refactor(Odd): comprehensive rename of QED anomaly cancellation Odd case Apply same pattern as Even case to Odd BasisLinear files: - Rename BasisLinear.lean -> Basis.lean - SymmPlane.lean: symmPlane (Charges) -> symmPlaneAsCharges, symmPlaneLinSols -> symmPlane (LinSols) - ShiftPlane.lean: shiftPlane (Charges) -> shiftPlaneAsCharges, shiftPlaneLinSols -> shiftPlane (LinSols), swapShift_as_add -> linSolRep_swap_oddShift_eq_add, move shiftBasis_linear_independent after shiftBasis def (C.5), restructure section numbering - Basis.lean: basisa -> basis, basisaAsBasis -> basisAsBasis, Pa -> basisCharge, Pa' -> basisLinSol, Pa_* lemmas -> basisCharge_*, Pa'_* lemmas -> basisLinSol_*, renumber sections E/F -> 1/2 - LineInCubic.lean: update import to Odd.Basis, cascade renames - Parameterization.lean: rename P/P'/P!/P!' -> symmPlane*/shiftPlane* - Physlib.lean: update import from Odd.BasisLinear to Odd.Basis Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- Physlib.lean | 2 +- .../QED/AnomalyCancellation/Odd/Basis.lean | 317 ++++++++++++++++++ .../AnomalyCancellation/Odd/BasisLinear.lean | 317 ------------------ .../Odd/BasisLinear/ShiftPlane.lean | 115 +++---- .../Odd/BasisLinear/SymmPlane.lean | 59 ++-- .../AnomalyCancellation/Odd/LineInCubic.lean | 38 +-- .../Odd/Parameterization.lean | 60 ++-- 7 files changed, 459 insertions(+), 449 deletions(-) create mode 100644 Physlib/QFT/QED/AnomalyCancellation/Odd/Basis.lean delete mode 100644 Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean diff --git a/Physlib.lean b/Physlib.lean index ae928fc80..a202772e7 100644 --- a/Physlib.lean +++ b/Physlib.lean @@ -227,7 +227,7 @@ public import Physlib.QFT.QED.AnomalyCancellation.LineInPlaneCond public import Physlib.QFT.QED.AnomalyCancellation.LowDim.One public import Physlib.QFT.QED.AnomalyCancellation.LowDim.Three public import Physlib.QFT.QED.AnomalyCancellation.LowDim.Two -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.Odd.Basis public import Physlib.QFT.QED.AnomalyCancellation.Odd.LineInCubic public import Physlib.QFT.QED.AnomalyCancellation.Odd.Parameterization public import Physlib.QFT.QED.AnomalyCancellation.Permutations diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/Basis.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/Basis.lean new file mode 100644 index 000000000..364d0ad79 --- /dev/null +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/Basis.lean @@ -0,0 +1,317 @@ +/- +Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Joseph Tooby-Smith +-/ +module + +public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ShiftPlane +/-! +# The combined basis for the odd case + +This file combines the symmetric and shifted planes into a single basis for the linear solutions +of `PureU1 (2 * n + 1)`. Every linear solution is the sum of a point from each plane. + +## Key results + +- `span_basis` : Every linear solution is the sum of a point from each plane. +- `symmPlane` : The inclusion of the symmetric plane into linear solutions. +- `shiftPlane` : The inclusion of the shifted plane into linear solutions. +- `basis_linear_independent` : The combined basis vectors are linearly independent. +- `basisAsBasis` : The combined basis as a `Basis`. + +## Table of contents + +- 1. The combined basis + - 1.1. The combined basis as `LinSols` + - 1.2. The inclusion of the span of the combined basis into charges + - 1.3. Components of the inclusion + - 1.4. Kernel of the inclusion into charges + - 1.5. The inclusion of the span of the combined basis into LinSols + - 1.6. The combined basis vectors are linearly independent + - 1.7. Injectivity of the inclusion into linear solutions + - 1.8. Cardinality of the basis + - 1.9. The basis vectors as a basis +- 2. Every linear solution is the sum of a point from each plane + - 2.1. Relation under permutations + +-/ + +@[expose] public section + +open Module Nat Finset BigOperators + +namespace PureU1 + +variable {n : ℕ} + +namespace VectorLikeOddPlane + +/-! + +## 1. The combined basis + +-/ + +/-! + +### 1.1. The combined basis as `LinSols` + +-/ + +/-- The whole basis as `LinSols`. -/ +def basis : Fin n ⊕ Fin n → (PureU1 (2 * n + 1)).LinSols := fun i => + match i with + | .inl i => symmBasis i + | .inr i => shiftBasis i + +/-! + +### 1.2. The inclusion of the span of the combined basis into charges + +-/ + +/-- A point in the span of the basis as a charge. -/ +def basisCharge (f : Fin n → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := + symmPlaneAsCharges f + shiftPlaneAsCharges g + +/-! + +### 1.3. Components of the inclusion + +-/ + +lemma basisCharge_oddShiftShiftZero (f g : Fin n.succ → ℚ) : basisCharge f g oddShiftShiftZero = f 0 := by + rw [basisCharge] + simp only [ACCSystemCharges.chargesAddCommMonoid_add] + nth_rewrite 1 [oddShiftShiftZero_eq_oddFst_zero] + rw [oddShiftShiftZero_eq_oddShiftZero] + rw [shiftPlaneAsCharges_oddShiftZero, oddShiftZero_eq_oddFst, symmPlaneAsCharges_oddFst] + exact Rat.add_zero (f 0) + +lemma basisCharge_oddShiftShiftFst (f g : Fin n.succ → ℚ) (j : Fin n) : + basisCharge f g (oddShiftShiftFst j) = f j.succ + g j.castSucc := by + rw [basisCharge] + simp only [ACCSystemCharges.chargesAddCommMonoid_add] + nth_rewrite 1 [oddShiftShiftFst_eq_oddFst_succ] + rw [oddShiftShiftFst_eq_oddShiftFst_castSucc] + rw [shiftPlaneAsCharges_oddShiftFst, oddShiftFst_castSucc_eq_oddFst_succ, symmPlaneAsCharges_oddFst] + +lemma basisCharge_oddShiftShiftMid (f g : Fin n.succ → ℚ) : + basisCharge f g oddShiftShiftMid = g (Fin.last n) := by + rw [basisCharge] + simp only [ACCSystemCharges.chargesAddCommMonoid_add] + nth_rewrite 1 [oddShiftShiftMid_eq_oddMid] + rw [oddShiftShiftMid_eq_oddShiftFst_last] + rw [shiftPlaneAsCharges_oddShiftFst, oddShiftFst_last_eq_oddMid, symmPlaneAsCharges_oddMid] + exact Rat.zero_add (g (Fin.last n)) + +lemma basisCharge_oddShiftShiftSnd (f g : Fin n.succ → ℚ) (j : Fin n.succ) : + basisCharge f g (oddShiftShiftSnd j) = - f j - g j := by + rw [basisCharge] + simp only [ACCSystemCharges.chargesAddCommMonoid_add] + nth_rewrite 1 [oddShiftShiftSnd_eq_oddSnd] + rw [oddShiftShiftSnd_eq_oddShiftSnd] + rw [shiftPlaneAsCharges_oddShiftSnd, oddShiftSnd_eq_oddSnd, symmPlaneAsCharges_oddSnd] + ring + +/-! + +### 1.4. Kernel of the inclusion into charges + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma basisCharge_zero (f g : Fin n.succ → ℚ) (h : basisCharge f g = 0) : + ∀ i, f i = 0 := by + have h₃ := basisCharge_oddShiftShiftZero f g + rw [h] at h₃ + change 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 + have hivi : iv < n.succ := lt_of_succ_lt hiv + have hi2 := hi hivi + have h1 := basisCharge_oddShiftShiftSnd f g ⟨iv, hivi⟩ + rw [h, hi2] at h1 + change 0 = _ at h1 + simp only [neg_zero, succ_eq_add_one, zero_sub, zero_eq_neg] at h1 + have h2 := basisCharge_oddShiftShiftFst f g ⟨iv, succ_lt_succ_iff.mp hiv⟩ + simp only [succ_eq_add_one, h, Fin.succ_mk, Fin.castSucc_mk, h1, add_zero] at h2 + exact h2.symm + exact hinduc i.val i.prop + +lemma basisCharge_zero_shift (f g : Fin n.succ → ℚ) (h : basisCharge f g = 0) : + ∀ i, g i = 0 := by + have hf := basisCharge_zero f g h + rw [basisCharge, symmPlaneAsCharges] at h + simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h + exact shiftPlaneAsCharges_zero g h + +/-! + +### 1.5. The inclusion of the span of the combined basis into LinSols + +-/ + +/-- A point in the span of the whole basis. -/ +def basisLinSol (f : (Fin n) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n + 1)).LinSols := + ∑ i, f i • basis i + +lemma basisLinSol_symmPlane_shiftPlane (f : (Fin n) ⊕ (Fin n) → ℚ) : + basisLinSol f = symmPlane (f ∘ Sum.inl) + shiftPlane (f ∘ Sum.inr) := by + exact Fintype.sum_sum_type _ + +/-! + +### 1.6. The combined basis vectors are linearly independent + +-/ + +theorem basis_linear_independent : LinearIndependent ℚ (@basis n.succ) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change basisLinSol f = 0 at h + have h1 : (basisLinSol 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 + rw [basisLinSol_symmPlane_shiftPlane] at h1 + change (symmPlane (f ∘ Sum.inl)).val + (shiftPlane (f ∘ Sum.inr)).val = 0 at h1 + rw [shiftPlane_val, symmPlane_val] at h1 + change basisCharge (f ∘ Sum.inl) (f ∘ Sum.inr) = 0 at h1 + have hf := basisCharge_zero (f ∘ Sum.inl) (f ∘ Sum.inr) h1 + have hg := basisCharge_zero_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 + intro i + simp_all only [succ_eq_add_one, Function.comp_apply] + cases i + · simp_all + · simp_all + +/-! + +### 1.7. Injectivity of the inclusion into linear solutions + +-/ + +lemma basisLinSol_eq (f f' : (Fin n.succ) ⊕ (Fin n.succ) → ℚ) : basisLinSol f = basisLinSol f' ↔ f = f' := by + refine Iff.intro (fun h => ?_) (fun h => ?_) + · funext i + rw [basisLinSol, basisLinSol] at h + have h1 : ∑ i : Fin n.succ ⊕ Fin n.succ, (f i + (- f' i)) • basis 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 (@basis_linear_independent n) + (fun i => f i + -f' i) h1 + have h2i := h2 i + linarith + · rw [h] + +lemma basisLinSol_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : + basisLinSol (Sum.elim g f) = basisLinSol (Sum.elim g' f') ↔ basisCharge g f = basisCharge g' f' := by + refine Iff.intro (fun h => ?_) (fun h => ?_) + · rw [basisLinSol_eq, Sum.elim_eq_iff] at h + rw [h.left, h.right] + · apply ACCSystemLinear.LinSols.ext + rw [basisLinSol_symmPlane_shiftPlane, basisLinSol_symmPlane_shiftPlane] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, + symmPlane_val, shiftPlane_val] + exact h + +lemma basisCharge_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : + basisCharge g f = basisCharge g' f' ↔ g = g' ∧ f = f' := by + rw [← basisLinSol_elim_eq_iff] + rw [← Sum.elim_eq_iff] + exact basisLinSol_eq _ _ + +/-! + +### 1.8. Cardinality of the basis + +-/ + +lemma basis_card : Fintype.card ((Fin n.succ) ⊕ (Fin n.succ)) = + Module.finrank ℚ (PureU1 (2 * n.succ + 1)).LinSols := by + erw [BasisLinear.finrank_AnomalyFreeLinear] + simp only [Fintype.card_sum, Fintype.card_fin] + exact Eq.symm (Nat.two_mul n.succ) + +/-! + +### 1.9. The basis vectors as a basis + +-/ + +/-- The basis formed out of our basis vectors. -/ +noncomputable def basisAsBasis : + Basis (Fin n.succ ⊕ Fin n.succ) ℚ (PureU1 (2 * n.succ + 1)).LinSols := + basisOfLinearIndependentOfCardEqFinrank (@basis_linear_independent n) basis_card + +/-! + +## 2. Every linear solution is the sum of a point from each plane + +-/ + +lemma span_basis (S : (PureU1 (2 * n.succ + 1)).LinSols) : + ∃ (g f : Fin n.succ → ℚ), S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f := by + have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisAsBasis S) + obtain ⟨f, hf⟩ := h + simp only [succ_eq_add_one, basisAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, + Fintype.sum_sum_type] at hf + change symmPlane _ + shiftPlane _ = S at hf + use f ∘ Sum.inl + use f ∘ Sum.inr + rw [← hf] + simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, + symmPlane_val, shiftPlane_val] + rfl + +/-! + +### 2.1. Relation under permutations + +-/ + +lemma span_basis_swapShift {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) + (hS : ((FamilyPermutations (2 * n.succ + 1)).linSolRep + (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') (g f : Fin n.succ → ℚ) + (hS1 : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f) : ∃ (g' f' : Fin n.succ → ℚ), + S'.val = symmPlaneAsCharges g' + shiftPlaneAsCharges f' ∧ shiftPlaneAsCharges f' = shiftPlaneAsCharges f + + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by + let X := shiftPlaneAsCharges f + + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j + have hf : shiftPlaneAsCharges f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by + rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] + use f + rfl + have hP : (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∈ + Submodule.span ℚ (Set.range shiftBasisAsCharges) := by + apply Submodule.smul_mem + apply SetLike.mem_of_subset + apply Submodule.subset_span + simp_all only [Set.mem_range, exists_apply_eq_apply] + have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by + apply Submodule.add_mem + exact hf + exact hP + have hXsum := (Submodule.mem_span_range_iff_exists_fun ℚ).mp hX + obtain ⟨f', hf'⟩ := hXsum + use g + use f' + change shiftPlaneAsCharges f' = _ at hf' + erw [hf'] + simp only [and_self, and_true, X] + rw [← add_assoc, ← hS1] + apply linSolRep_swap_oddShift_eq_add at hS + exact hS + +end VectorLikeOddPlane + +end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean deleted file mode 100644 index cba83a447..000000000 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear.lean +++ /dev/null @@ -1,317 +0,0 @@ -/- -Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved. -Released under Apache 2.0 license as described in the file LICENSE. -Authors: Joseph Tooby-Smith --/ -module - -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ShiftPlane -/-! -# The combined basis for the odd case - -This file combines the symmetric and shifted planes into a single basis for the linear solutions -of `PureU1 (2 * n + 1)`. Every linear solution is the sum of a point from each plane. - -## Key results - -- `span_basis` : Every linear solution is the sum of a point from each plane. -- `symmPlaneLinSols` : The inclusion of the symmetric plane into linear solutions. -- `shiftPlaneLinSols` : The inclusion of the shifted plane into linear solutions. -- `basisa_linear_independent` : The combined basis vectors are linearly independent. -- `basisaAsBasis` : The combined basis as a `Basis`. - -## Table of contents - -- E. The combined basis - - E.1. The combined basis as `LinSols` - - E.2. The inclusion of the span of the combined basis into charges - - E.3. Components of the inclusion - - E.4. Kernel of the inclusion into charges - - E.5. The inclusion of the span of the combined basis into LinSols - - E.6. The combined basis vectors are linearly independent - - E.7. Injectivity of the inclusion into linear solutions - - E.8. Cardinality of the basis - - E.9. The basis vectors as a basis -- F. Every linear solution is the sum of a point from each plane - - F.1. Relation under permutations - --/ - -@[expose] public section - -open Module Nat Finset BigOperators - -namespace PureU1 - -variable {n : ℕ} - -namespace VectorLikeOddPlane - -/-! - -## E. The combined basis - --/ - -/-! - -### E.1. The combined basis as `LinSols` - --/ - -/-- The whole basis as `LinSols`. -/ -def basisa : Fin n ⊕ Fin n → (PureU1 (2 * n + 1)).LinSols := fun i => - match i with - | .inl i => symmBasis i - | .inr i => shiftBasis i - -/-! - -### E.2. The inclusion of the span of the combined basis into charges - --/ - -/-- A point in the span of the basis as a charge. -/ -def Pa (f : Fin n → ℚ) (g : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := - symmPlane f + shiftPlane g - -/-! - -### E.3. Components of the inclusion - --/ - -lemma Pa_oddShiftShiftZero (f g : Fin n.succ → ℚ) : Pa f g oddShiftShiftZero = f 0 := by - rw [Pa] - simp only [ACCSystemCharges.chargesAddCommMonoid_add] - nth_rewrite 1 [oddShiftShiftZero_eq_oddFst_zero] - rw [oddShiftShiftZero_eq_oddShiftZero] - rw [shiftPlane_oddShiftZero, oddShiftZero_eq_oddFst, symmPlane_oddFst] - exact Rat.add_zero (f 0) - -lemma Pa_oddShiftShiftFst (f g : Fin n.succ → ℚ) (j : Fin n) : - Pa f g (oddShiftShiftFst j) = f j.succ + g j.castSucc := by - rw [Pa] - simp only [ACCSystemCharges.chargesAddCommMonoid_add] - nth_rewrite 1 [oddShiftShiftFst_eq_oddFst_succ] - rw [oddShiftShiftFst_eq_oddShiftFst_castSucc] - rw [shiftPlane_oddShiftFst, oddShiftFst_castSucc_eq_oddFst_succ, symmPlane_oddFst] - -lemma Pa_oddShiftShiftMid (f g : Fin n.succ → ℚ) : - Pa f g oddShiftShiftMid = g (Fin.last n) := by - rw [Pa] - simp only [ACCSystemCharges.chargesAddCommMonoid_add] - nth_rewrite 1 [oddShiftShiftMid_eq_oddMid] - rw [oddShiftShiftMid_eq_oddShiftFst_last] - rw [shiftPlane_oddShiftFst, oddShiftFst_last_eq_oddMid, symmPlane_oddMid] - exact Rat.zero_add (g (Fin.last n)) - -lemma Pa_oddShiftShiftSnd (f g : Fin n.succ → ℚ) (j : Fin n.succ) : - Pa f g (oddShiftShiftSnd j) = - f j - g j := by - rw [Pa] - simp only [ACCSystemCharges.chargesAddCommMonoid_add] - nth_rewrite 1 [oddShiftShiftSnd_eq_oddSnd] - rw [oddShiftShiftSnd_eq_oddShiftSnd] - rw [shiftPlane_oddShiftSnd, oddShiftSnd_eq_oddSnd, symmPlane_oddSnd] - ring - -/-! - -### E.4. Kernel of the inclusion into charges - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma Pa_zero (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : - ∀ i, f i = 0 := by - have h₃ := Pa_oddShiftShiftZero f g - rw [h] at h₃ - change 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 - have hivi : iv < n.succ := lt_of_succ_lt hiv - have hi2 := hi hivi - have h1 := Pa_oddShiftShiftSnd f g ⟨iv, hivi⟩ - rw [h, hi2] at h1 - change 0 = _ at h1 - simp only [neg_zero, succ_eq_add_one, zero_sub, zero_eq_neg] at h1 - have h2 := Pa_oddShiftShiftFst f g ⟨iv, succ_lt_succ_iff.mp hiv⟩ - simp only [succ_eq_add_one, h, Fin.succ_mk, Fin.castSucc_mk, h1, add_zero] at h2 - exact h2.symm - exact hinduc i.val i.prop - -lemma Pa_zero_shift (f g : Fin n.succ → ℚ) (h : Pa f g = 0) : - ∀ i, g i = 0 := by - have hf := Pa_zero f g h - rw [Pa, symmPlane] at h - simp only [succ_eq_add_one, hf, zero_smul, sum_const_zero, zero_add] at h - exact shiftPlane_zero g h - -/-! - -### E.5. The inclusion of the span of the combined basis into LinSols - --/ - -/-- A point in the span of the whole basis. -/ -def Pa' (f : (Fin n) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n + 1)).LinSols := - ∑ i, f i • basisa i - -lemma Pa'_symmPlaneLinSols_shiftPlaneLinSols (f : (Fin n) ⊕ (Fin n) → ℚ) : - Pa' f = symmPlaneLinSols (f ∘ Sum.inl) + shiftPlaneLinSols (f ∘ Sum.inr) := by - exact Fintype.sum_sum_type _ - -/-! - -### E.6. The combined basis vectors are linearly independent - --/ - -theorem basisa_linear_independent : LinearIndependent ℚ (@basisa n.succ) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change Pa' f = 0 at h - 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 - rw [Pa'_symmPlaneLinSols_shiftPlaneLinSols] at h1 - change (symmPlaneLinSols (f ∘ Sum.inl)).val + (shiftPlaneLinSols (f ∘ Sum.inr)).val = 0 at h1 - rw [shiftPlaneLinSols_val, symmPlaneLinSols_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_shift (f ∘ Sum.inl) (f ∘ Sum.inr) h1 - intro i - simp_all only [succ_eq_add_one, Function.comp_apply] - cases i - · simp_all - · simp_all - -/-! - -### E.7. Injectivity of the inclusion into linear solutions - --/ - -lemma Pa'_eq (f f' : (Fin n.succ) ⊕ (Fin n.succ) → ℚ) : Pa' f = Pa' f' ↔ f = f' := by - refine Iff.intro (fun h => ?_) (fun h => ?_) - · funext i - rw [Pa', Pa'] at h - have h1 : ∑ i : Fin n.succ ⊕ Fin n.succ, (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] - -lemma Pa'_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : - Pa' (Sum.elim g f) = Pa' (Sum.elim g' f') ↔ Pa g f = Pa g' f' := by - refine Iff.intro (fun h => ?_) (fun h => ?_) - · rw [Pa'_eq, Sum.elim_eq_iff] at h - rw [h.left, h.right] - · apply ACCSystemLinear.LinSols.ext - rw [Pa'_symmPlaneLinSols_shiftPlaneLinSols, Pa'_symmPlaneLinSols_shiftPlaneLinSols] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, - symmPlaneLinSols_val, shiftPlaneLinSols_val] - exact h - -lemma Pa_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : - Pa g f = Pa g' f' ↔ g = g' ∧ f = f' := by - rw [← Pa'_elim_eq_iff] - rw [← Sum.elim_eq_iff] - exact Pa'_eq _ _ - -/-! - -### E.8. Cardinality of the basis - --/ - -lemma basisa_card : Fintype.card ((Fin n.succ) ⊕ (Fin n.succ)) = - Module.finrank ℚ (PureU1 (2 * n.succ + 1)).LinSols := by - erw [BasisLinear.finrank_AnomalyFreeLinear] - simp only [Fintype.card_sum, Fintype.card_fin] - exact Eq.symm (Nat.two_mul n.succ) - -/-! - -### E.9. The basis vectors as a basis - --/ - -/-- The basis formed out of our basisa vectors. -/ -noncomputable def basisaAsBasis : - Basis (Fin n.succ ⊕ Fin n.succ) ℚ (PureU1 (2 * n.succ + 1)).LinSols := - basisOfLinearIndependentOfCardEqFinrank (@basisa_linear_independent n) basisa_card - -/-! - -## F. Every linear solution is the sum of a point from each plane - --/ - -lemma span_basis (S : (PureU1 (2 * n.succ + 1)).LinSols) : - ∃ (g f : Fin n.succ → ℚ), S.val = symmPlane g + shiftPlane f := by - have h := (Submodule.mem_span_range_iff_exists_fun ℚ).mp (Basis.mem_span basisaAsBasis S) - obtain ⟨f, hf⟩ := h - simp only [succ_eq_add_one, basisaAsBasis, coe_basisOfLinearIndependentOfCardEqFinrank, - Fintype.sum_sum_type] at hf - change symmPlaneLinSols _ + shiftPlaneLinSols _ = S at hf - use f ∘ Sum.inl - use f ∘ Sum.inr - rw [← hf] - simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, - symmPlaneLinSols_val, shiftPlaneLinSols_val] - rfl - -/-! - -### F.1. Relation under permutations - --/ - -lemma span_basis_swapShift {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.succ) - (hS : ((FamilyPermutations (2 * n.succ + 1)).linSolRep - (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') (g f : Fin n.succ → ℚ) - (hS1 : S.val = symmPlane g + shiftPlane f) : ∃ (g' f' : Fin n.succ → ℚ), - S'.val = symmPlane g' + shiftPlane f' ∧ shiftPlane f' = shiftPlane f + - (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∧ g' = g := by - let X := shiftPlane f + - (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j - have hf : shiftPlane f ∈ Submodule.span ℚ (Set.range shiftBasisAsCharges) := by - rw [(Submodule.mem_span_range_iff_exists_fun ℚ)] - use f - rfl - have hP : (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • shiftBasisAsCharges j ∈ - Submodule.span ℚ (Set.range shiftBasisAsCharges) := by - apply Submodule.smul_mem - apply SetLike.mem_of_subset - apply Submodule.subset_span - simp_all only [Set.mem_range, exists_apply_eq_apply] - have hX : X ∈ Submodule.span ℚ (Set.range (shiftBasisAsCharges)) := by - apply Submodule.add_mem - exact hf - exact hP - have hXsum := (Submodule.mem_span_range_iff_exists_fun ℚ).mp hX - obtain ⟨f', hf'⟩ := hXsum - use g - use f' - change shiftPlane f' = _ at hf' - erw [hf'] - simp only [and_self, and_true, X] - rw [← add_assoc, ← hS1] - apply swapShift_as_add at hS - exact hS - -end VectorLikeOddPlane - -end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean index d10adde43..3814f6164 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean @@ -20,15 +20,16 @@ than in the middle. - `shiftBasisAsCharges` : The basis vectors of the shifted plane as charges. - `shiftBasis` : The basis vectors of the shifted plane as `LinSols`. -- `shiftPlane` : A point in the span of the shifted basis as a charge assignment. -- `shiftPlaneLinSols` : A point in the span of the shifted basis as a linear solution. +- `shiftPlaneAsCharges` : A point in the span of the shifted basis as a charge assignment. +- `shiftPlane` : A point in the span of the shifted basis as a linear solution. ## Key results -- `shiftPlane_accCube` : Charges from the shifted plane satisfy the cubic ACC. +- `shiftPlaneAsCharges_accCube` : Charges from the shifted plane satisfy the cubic ACC. - `shiftBasis_linear_independent` : The shifted basis vectors are linearly independent. - `symmPlane_symmPlane_shiftBasisAsCharges_accCube` : The mixed cubic ACC from points in both planes. +- `linSolRep_swap_oddShift_eq_add` : Swapping elements equals adding a basis vector. ## Table of contents @@ -40,13 +41,13 @@ than in the middle. - C.2. Components of the basis vectors as charges - C.3. The basis vectors satisfy the linear ACCs - C.4. The basis vectors as `LinSols` - - C.5. Permutations equal adding basis vectors - - C.6. The inclusion of the shifted plane into charges - - C.7. Components of the shifted plane - - C.8. Points on the shifted plane satisfy the ACCs - - C.9. Kernel of the inclusion into charges - - C.10. The inclusion of the shifted plane into LinSols - - C.11. The basis vectors are linearly independent + - C.5. The basis vectors are linearly independent + - C.6. Permutations equal adding basis vectors + - C.7. The inclusion of the shifted plane into charges (`shiftPlaneAsCharges`) + - C.8. Components of the shifted plane + - C.9. Points on the shifted plane satisfy the ACCs + - C.10. Kernel of the inclusion into charges + - C.11. The inclusion of the shifted plane into `LinSols` (`shiftPlane`) - D. The mixed cubic ACC from points in both planes -/ @@ -322,13 +323,30 @@ def shiftBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := /-! -### C.5. Permutations equal adding basis vectors +### C.5. The basis vectors are linearly independent + +-/ + +theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by + apply Fintype.linearIndependent_iff.mpr + intro f h + change shiftPlane f = 0 at h + have h1 : (shiftPlane 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 + rw [shiftPlane_val] at h1 + exact shiftPlaneAsCharges_zero f h1 + +/-! + +### C.6. Permutations equal adding basis vectors -/ /-- Swapping the elements oddShiftFst j and oddShiftSnd j is equivalent to adding a vector shiftBasisAsCharges j. -/ -lemma swapShift_as_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) +lemma linSolRep_swap_oddShift_eq_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) (hS : ((FamilyPermutations (2 * n + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j))) S = S') : S'.val = S.val + (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) • @@ -348,23 +366,23 @@ lemma swapShift_as_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : Fin n) /-! -### C.6. The inclusion of the shifted plane into charges +### C.7. The inclusion of the shifted plane into charges (`shiftPlaneAsCharges`) -/ /-- A point in the span of the shifted plane basis as a charge. -/ -def shiftPlane (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := +def shiftPlaneAsCharges (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • shiftBasisAsCharges i /-! -### C.7. Components of the shifted plane +### C.8. Components of the shifted plane -/ -lemma shiftPlane_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : - shiftPlane f (oddShiftFst j) = f j := by - rw [shiftPlane, sum_of_charges] +lemma shiftPlaneAsCharges_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : + shiftPlaneAsCharges f (oddShiftFst j) = f j := by + rw [shiftPlaneAsCharges, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] · rw [shiftBasisAsCharges_on_oddShiftFst_self] @@ -374,9 +392,9 @@ lemma shiftPlane_oddShiftFst (f : Fin n → ℚ) (j : Fin n) : exact Rat.mul_zero (f k) · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] -lemma shiftPlane_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : - shiftPlane f (oddShiftSnd j) = - f j := by - rw [shiftPlane, sum_of_charges] +lemma shiftPlaneAsCharges_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : + shiftPlaneAsCharges f (oddShiftSnd j) = - f j := by + rw [shiftPlaneAsCharges, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] · rw [shiftBasisAsCharges_on_oddShiftSnd_self] @@ -386,78 +404,63 @@ lemma shiftPlane_oddShiftSnd (f : Fin n → ℚ) (j : Fin n) : exact Rat.mul_zero (f k) · simp -lemma shiftPlane_oddShiftZero (f : Fin n → ℚ) : shiftPlane f oddShiftZero = 0 := by - rw [shiftPlane, sum_of_charges] +lemma shiftPlaneAsCharges_oddShiftZero (f : Fin n → ℚ) : shiftPlaneAsCharges f oddShiftZero = 0 := by + rw [shiftPlaneAsCharges, sum_of_charges] simp [HSMul.hSMul, SMul.smul, shiftBasisAsCharges_on_oddShiftZero] /-! -### C.8. Points on the shifted plane satisfy the ACCs +### C.9. Points on the shifted plane satisfy the ACCs -/ -lemma shiftPlane_linearACC (f : Fin n → ℚ) : - (accGrav (2 * n + 1)) (shiftPlane f) = 0 := by +lemma shiftPlaneAsCharges_linearACC (f : Fin n → ℚ) : + (accGrav (2 * n + 1)) (shiftPlaneAsCharges f) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] rw [sum_oddShift] - simp [shiftPlane_oddShiftSnd, shiftPlane_oddShiftFst, shiftPlane_oddShiftZero] + simp [shiftPlaneAsCharges_oddShiftSnd, shiftPlaneAsCharges_oddShiftFst, shiftPlaneAsCharges_oddShiftZero] set_option backward.isDefEq.respectTransparency false in -lemma shiftPlane_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (shiftPlane f) = 0 := by - rw [accCube_explicit, sum_oddShift, shiftPlane_oddShiftZero] +lemma shiftPlaneAsCharges_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (shiftPlaneAsCharges f) = 0 := by + rw [accCube_explicit, sum_oddShift, shiftPlaneAsCharges_oddShiftZero] simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] apply Finset.sum_eq_zero intro i _ - simp only [shiftPlane_oddShiftFst, shiftPlane_oddShiftSnd] + simp only [shiftPlaneAsCharges_oddShiftFst, shiftPlaneAsCharges_oddShiftSnd] ring /-! -### C.9. Kernel of the inclusion into charges +### C.10. Kernel of the inclusion into charges -/ -lemma shiftPlane_zero (f : Fin n → ℚ) (h : shiftPlane f = 0) : ∀ i, f i = 0 := by +lemma shiftPlaneAsCharges_zero (f : Fin n → ℚ) (h : shiftPlaneAsCharges f = 0) : ∀ i, f i = 0 := by intro i - rw [← shiftPlane_oddShiftFst f] + rw [← shiftPlaneAsCharges_oddShiftFst f] rw [h] rfl /-! -### C.10. The inclusion of the shifted plane into LinSols +### C.11. The inclusion of the shifted plane into `LinSols` -/ /-- A point in the span of the shifted plane basis. -/ -def shiftPlaneLinSols (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := +def shiftPlane (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • shiftBasis i -lemma shiftPlaneLinSols_val (f : Fin n → ℚ) : - (shiftPlaneLinSols f).val = shiftPlane f := by - simp only [shiftPlaneLinSols, shiftPlane] +lemma shiftPlane_val (f : Fin n → ℚ) : + (shiftPlane f).val = shiftPlaneAsCharges f := by + simp only [shiftPlane, shiftPlaneAsCharges] funext i rw [sum_of_anomaly_free_linear, sum_of_charges] rfl -/-! - -### C.11. The basis vectors are linearly independent --/ - -theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by - apply Fintype.linearIndependent_iff.mpr - intro f h - change shiftPlaneLinSols f = 0 at h - have h1 : (shiftPlaneLinSols 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 - rw [shiftPlaneLinSols_val] at h1 - exact shiftPlane_zero f h1 /-! @@ -467,14 +470,14 @@ theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := set_option backward.isDefEq.respectTransparency false in lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n) : - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftBasisAsCharges j) - = (symmPlane g (oddShiftFst j))^2 - (g j)^2 := by + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftBasisAsCharges j) + = (symmPlaneAsCharges g (oddShiftFst j))^2 - (g j)^2 := by simp only [accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] rw [sum_oddShift, shiftBasisAsCharges_on_oddShiftZero] simp only [mul_zero, Function.comp_apply, zero_add] rw [Finset.sum_eq_single j, shiftBasisAsCharges_on_oddShiftFst_self, shiftBasisAsCharges_on_oddShiftSnd_self] - · rw [← oddSnd_eq_oddShiftSnd, symmPlane_oddSnd] + · rw [← oddSnd_eq_oddShiftSnd, symmPlaneAsCharges_oddSnd] ring · intro k _ hkj erw [shiftBasisAsCharges_on_oddShiftFst_other hkj.symm, diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean index b26b6880b..6dbec64e2 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean @@ -18,14 +18,14 @@ symmetric split, which divides the charges into two groups of size `n` and a mid ## Main definitions -- `symmPlane` : A point in the span of the symmetric basis as a charge assignment. -- `symmPlaneLinSols` : A point in the span of the symmetric basis as a linear solution. +- `symmPlaneAsCharges` : A point in the span of the symmetric basis as a charge assignment. +- `symmPlane` : A point in the span of the symmetric basis as a linear solution. - `symmBasis` : The basis vectors of the symmetric plane as `LinSols`. - `symmBasisAsCharges` : The basis vectors of the symmetric plane as charges. ## Key results -- `symmPlane_accCube` : Charges from the symmetric plane satisfy the cubic ACC. +- `symmPlaneAsCharges_accCube` : Charges from the symmetric plane satisfy the cubic ACC. - `symmBasis_linear_independent` : The symmetric basis vectors are linearly independent. ## Table of contents @@ -40,7 +40,8 @@ symmetric split, which divides the charges into two groups of size `n` and a mid - B.6. Components of the first plane - B.7. Points on the first plane satisfies the ACCs - B.8. Kernel of the inclusion into charges - - B.9. The basis vectors are linearly independent + - B.9. The inclusion of the first plane into `LinSols` + - B.10. The basis vectors are linearly independent -/ @@ -236,7 +237,7 @@ def symmBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := -/ /-- A point in the span of the first part of the basis as a charge. -/ -def symmPlane (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := +def symmPlaneAsCharges (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := ∑ i, f i • symmBasisAsCharges i /-! @@ -245,8 +246,8 @@ def symmPlane (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := -/ -lemma symmPlane_oddFst (f : Fin n → ℚ) (j : Fin n) : symmPlane f (oddFst j) = f j := by - rw [symmPlane, sum_of_charges] +lemma symmPlaneAsCharges_oddFst (f : Fin n → ℚ) (j : Fin n) : symmPlaneAsCharges f (oddFst j) = f j := by + rw [symmPlaneAsCharges, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] · rw [symmBasisAsCharges_on_oddFst_self] @@ -256,8 +257,8 @@ lemma symmPlane_oddFst (f : Fin n → ℚ) (j : Fin n) : symmPlane f (oddFst j) exact Rat.mul_zero (f k) · simp only [mem_univ, not_true_eq_false, _root_.mul_eq_zero, IsEmpty.forall_iff] -lemma symmPlane_oddSnd (f : Fin n → ℚ) (j : Fin n) : symmPlane f (oddSnd j) = - f j := by - rw [symmPlane, sum_of_charges] +lemma symmPlaneAsCharges_oddSnd (f : Fin n → ℚ) (j : Fin n) : symmPlaneAsCharges f (oddSnd j) = - f j := by + rw [symmPlaneAsCharges, sum_of_charges] simp only [HSMul.hSMul, SMul.smul] rw [Finset.sum_eq_single j] · rw [symmBasisAsCharges_on_oddSnd_self] @@ -267,8 +268,8 @@ lemma symmPlane_oddSnd (f : Fin n → ℚ) (j : Fin n) : symmPlane f (oddSnd j) exact Rat.mul_zero (f k) · simp -lemma symmPlane_oddMid (f : Fin n → ℚ) : symmPlane f oddMid = 0 := by - rw [symmPlane, sum_of_charges] +lemma symmPlaneAsCharges_oddMid (f : Fin n → ℚ) : symmPlaneAsCharges f oddMid = 0 := by + rw [symmPlaneAsCharges, sum_of_charges] simp [HSMul.hSMul, SMul.smul, symmBasisAsCharges_on_oddMid] /-! @@ -277,20 +278,20 @@ lemma symmPlane_oddMid (f : Fin n → ℚ) : symmPlane f oddMid = 0 := by -/ -lemma symmPlane_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (symmPlane f) = 0 := by +lemma symmPlaneAsCharges_linearACC (f : Fin n → ℚ) : (accGrav (2 * n + 1)) (symmPlaneAsCharges f) = 0 := by rw [accGrav] simp only [LinearMap.coe_mk, AddHom.coe_mk] rw [sum_odd] - simp [symmPlane_oddSnd, symmPlane_oddFst, symmPlane_oddMid] + simp [symmPlaneAsCharges_oddSnd, symmPlaneAsCharges_oddFst, symmPlaneAsCharges_oddMid] set_option backward.isDefEq.respectTransparency false in -lemma symmPlane_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (symmPlane f) = 0 := by - rw [accCube_explicit, sum_odd, symmPlane_oddMid] +lemma symmPlaneAsCharges_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (symmPlaneAsCharges f) = 0 := by + rw [accCube_explicit, sum_odd, symmPlaneAsCharges_oddMid] simp only [ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, Function.comp_apply, zero_add] apply Finset.sum_eq_zero intro i _ - simp only [symmPlane_oddFst, symmPlane_oddSnd] + simp only [symmPlaneAsCharges_oddFst, symmPlaneAsCharges_oddSnd] ring /-! @@ -299,38 +300,44 @@ lemma symmPlane_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (symmPlane f) = -/ -lemma symmPlane_zero (f : Fin n → ℚ) (h : symmPlane f = 0) : ∀ i, f i = 0 := by +lemma symmPlaneAsCharges_zero (f : Fin n → ℚ) (h : symmPlaneAsCharges f = 0) : ∀ i, f i = 0 := by intro i - erw [← symmPlane_oddFst f] + erw [← symmPlaneAsCharges_oddFst f] rw [h] rfl +/-! + +### B.9. The inclusion of the first plane into `LinSols` + +-/ + /-- A point in the span of the first part of the basis. -/ -def symmPlaneLinSols (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := +def symmPlane (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • symmBasis i -lemma symmPlaneLinSols_val (f : Fin n → ℚ) : (symmPlaneLinSols f).val = symmPlane f := by - simp only [symmPlaneLinSols, symmPlane] +lemma symmPlane_val (f : Fin n → ℚ) : (symmPlane f).val = symmPlaneAsCharges f := by + simp only [symmPlane, symmPlaneAsCharges] funext i rw [sum_of_anomaly_free_linear, sum_of_charges] rfl /-! -### B.9. The basis vectors are linearly independent +### B.10. The basis vectors are linearly independent -/ theorem symmBasis_linear_independent : LinearIndependent ℚ (@symmBasis n) := by apply Fintype.linearIndependent_iff.mpr intro f h - change symmPlaneLinSols f = 0 at h - have h1 : (symmPlaneLinSols f).val = 0 := + change symmPlane f = 0 at h + have h1 : (symmPlane 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 - rw [symmPlaneLinSols_val] at h1 - exact symmPlane_zero f h1 + rw [symmPlane_val] at h1 + exact symmPlaneAsCharges_zero f h1 end VectorLikeOddPlane diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean index 611d375cc..377470bfe 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/LineInCubic.lean @@ -6,7 +6,7 @@ Authors: Joseph Tooby-Smith module public import Physlib.QFT.QED.AnomalyCancellation.LineInPlaneCond -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear +public import Physlib.QFT.QED.AnomalyCancellation.Odd.Basis /-! # Line In Cubic Odd case @@ -35,30 +35,30 @@ open VectorLikeOddPlane /-- 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 + 1)).LinSols) : Prop := - ∀ (g f : Fin n → ℚ) (_ : S.val = Pa g f) (a b : ℚ), - accCube (2 * n + 1) (a • symmPlane g + b • shiftPlane f) = 0 + ∀ (g f : Fin n → ℚ) (_ : S.val = basisCharge g f) (a b : ℚ), + accCube (2 * n + 1) (a • symmPlaneAsCharges g + b • shiftPlaneAsCharges f) = 0 set_option backward.isDefEq.respectTransparency false in /-- The condition that a linear solution sits on a line between the two planes within the cubic expands into a on `accCubeTriLinSymm` applied to the points within the planes. -/ lemma lineInCubic_expand {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S) : - ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f) (a b : ℚ), - 3 * a * b * (a * accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) - + b * accCubeTriLinSymm (shiftPlane f) (shiftPlane f) (symmPlane g)) = 0 := by + ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f) (a b : ℚ), + 3 * a * b * (a * accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) + + b * accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g)) = 0 := by intro g f hS a b have h1 := h g f hS a b - change accCubeTriLinSymm.toCubic (a • symmPlane g + b • shiftPlane f) = 0 at h1 + change accCubeTriLinSymm.toCubic (a • symmPlaneAsCharges g + b • shiftPlaneAsCharges f) = 0 at h1 simp only [TriLinearSymm.toCubic_add] at h1 simp only [HomogeneousCubic.map_smul, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] at h1 - erw [symmPlane_accCube, shiftPlane_accCube] at h1 + erw [symmPlaneAsCharges_accCube, shiftPlaneAsCharges_accCube] at h1 rw [← h1] ring lemma line_in_cubic_symmPlane_symmPlane_shiftPlane {S : (PureU1 (2 * n + 1)).LinSols} (h : LineInCubic S) : - ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlane g + shiftPlane f), - accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftPlane f) = 0 := by + ∀ (g : Fin n → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f), + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges 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 @@ -81,9 +81,9 @@ lemma lineInCubicPerm_permute {S : (PureU1 (2 * n + 1)).LinSols} set_option backward.isDefEq.respectTransparency false in lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ + 1)).LinSols} (LIC : LineInCubicPerm S) : - ∀ (j : Fin n.succ) (g f : Fin n.succ → ℚ) (_ : S.val = Pa g f), + ∀ (j : Fin n.succ) (g f : Fin n.succ → ℚ) (_ : S.val = basisCharge g f), (S.val (oddShiftSnd j) - S.val (oddShiftFst j)) - * accCubeTriLinSymm (symmPlane g) (symmPlane g) (shiftBasisAsCharges j) = 0 := by + * accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftBasisAsCharges j) = 0 := by intro j g f h let S' := (FamilyPermutations (2 * n.succ + 1)).linSolRep (Equiv.swap (oddShiftFst j) (oddShiftSnd j)) S @@ -98,19 +98,19 @@ lemma lineInCubicPerm_swap {S : (PureU1 (2 * n.succ + 1)).LinSols} simpa using h2 lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube' {S : (PureU1 (2 * n.succ.succ + 1)).LinSols} - (f g : Fin n.succ.succ → ℚ) (hS : S.val = Pa f g) : - accCubeTriLinSymm (symmPlane f) (symmPlane f) (shiftBasisAsCharges 0) = + (f g : Fin n.succ.succ → ℚ) (hS : S.val = basisCharge f g) : + accCubeTriLinSymm (symmPlaneAsCharges f) (symmPlaneAsCharges f) (shiftBasisAsCharges 0) = (S.val (oddShiftFst 0) + S.val (oddShiftSnd 0)) * (2 * S.val oddShiftZero + S.val (oddShiftFst 0) + S.val (oddShiftSnd 0)) := by rw [symmPlane_symmPlane_shiftBasisAsCharges_accCube f 0] - rw [← Pa_oddShiftShiftZero f g] + rw [← basisCharge_oddShiftShiftZero f g] rw [← hS] have ht : oddShiftFst (0 : Fin n.succ.succ) = oddFst 1 := rfl nth_rewrite 1 [ht] - rw [symmPlane_oddFst] - have h1 := Pa_oddShiftShiftZero f g - have h4 := Pa_oddShiftShiftSnd f g 0 - have h2 := Pa_oddShiftShiftFst f g 0 + rw [symmPlaneAsCharges_oddFst] + have h1 := basisCharge_oddShiftShiftZero f g + have h4 := basisCharge_oddShiftShiftSnd f g 0 + have h2 := basisCharge_oddShiftShiftFst f g 0 rw [← hS] at h1 h2 h4 simp only [Nat.succ_eq_add_one, Fin.succ_zero_eq_one, Fin.castSucc_zero] at h2 have h5 : f 1 = S.val (oddShiftShiftFst 0) + S.val oddShiftShiftZero + diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean index 567fbb4a6..4fd783e85 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/Parameterization.lean @@ -30,16 +30,16 @@ open VectorLikeOddPlane show that this can be extended to a complete solution. -/ def parameterizationAsLinear (g f : Fin n → ℚ) (a : ℚ) : (PureU1 (2 * n + 1)).LinSols := - a • ((accCubeTriLinSymm (P! f) (P! f) (P g)) • P' g + - (- accCubeTriLinSymm (P g) (P g) (P! f)) • P!' f) + a • ((accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g)) • symmPlane g + + (- accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f)) • shiftPlane f) lemma parameterizationAsLinear_val (g f : Fin n → ℚ) (a : ℚ) : (parameterizationAsLinear g f a).val = - a • ((accCubeTriLinSymm (P! f) (P! f) (P g)) • P g + - (- accCubeTriLinSymm (P g) (P g) (P! f)) • P! f) := by + a • ((accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g)) • symmPlaneAsCharges g + + (- accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f)) • shiftPlaneAsCharges f) := by rw [parameterizationAsLinear] - change a • (_ • (P' g).val + _ • (P!' f).val) = _ - rw [P'_val, P!'_val] + change a • (_ • (symmPlane g).val + _ • (shiftPlane f).val) = _ + rw [symmPlane_val, shiftPlane_val] set_option backward.isDefEq.respectTransparency false in /-- The parameterization satisfies the cubic ACC. -/ @@ -50,7 +50,7 @@ lemma parameterizationCharge_cube (g f : Fin n → ℚ) (a : ℚ) : rw [HomogeneousCubic.map_smul] rw [TriLinearSymm.toCubic_add] rw [HomogeneousCubic.map_smul, HomogeneousCubic.map_smul] - erw [P_accCube g, P!_accCube f] + erw [symmPlaneAsCharges_accCube g, shiftPlaneAsCharges_accCube f] rw [accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃] @@ -63,54 +63,54 @@ def parameterization (g f : Fin n → ℚ) (a : ℚ) : parameterizationCharge_cube g f a⟩ lemma anomalyFree_param {S : (PureU1 (2 * n + 1)).Sols} - (g f : Fin n → ℚ) (hS : S.val = P g + P! f) : - accCubeTriLinSymm (P g) (P g) (P! f) = - - accCubeTriLinSymm (P! f) (P! f) (P g) := by + (g f : Fin n → ℚ) (hS : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f) : + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = + - accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g) := by have hC := S.cubicSol rw [hS] at hC - change (accCube (2 * n + 1)) (P g + P! f) = 0 at hC + change (accCube (2 * n + 1)) (symmPlaneAsCharges g + shiftPlaneAsCharges f) = 0 at hC erw [TriLinearSymm.toCubic_add] at hC - erw [P_accCube] at hC - erw [P!_accCube] at hC + erw [symmPlaneAsCharges_accCube] at hC + erw [shiftPlaneAsCharges_accCube] at hC linear_combination hC / 3 -/-- 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 (symmPlaneAsCharges g, symmPlaneAsCharges g, shiftPlaneAsCharges f) ≠ 0`. In this case our parameterization above will be able to recover this point. -/ def GenericCase (S : (PureU1 (2 * n.succ + 1)).Sols) : Prop := - ∀ (g f : Fin n.succ → ℚ) (_ : S.val = P g + P! f), - accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0 + ∀ (g f : Fin n.succ → ℚ) (_ : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f), + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) ≠ 0 lemma genericCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) - (hs : ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f ∧ - accCubeTriLinSymm (P g) (P g) (P! f) ≠ 0) : GenericCase S := by + (hs : ∃ (g f : Fin n.succ → ℚ), S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f ∧ + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) ≠ 0) : GenericCase S := by intro g f hS hC obtain ⟨g', f', hS', hC'⟩ := hs rw [hS] at hS' - erw [Pa_eq] at hS' + erw [basisCharge_eq] at hS' 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 (symmPlaneAsCharges g, symmPlaneAsCharges g, shiftPlaneAsCharges f) ≠ 0`. In this case we will show that S is zero if it is true for all permutations. -/ def SpecialCase (S : (PureU1 (2 * n.succ + 1)).Sols) : Prop := - ∀ (g f : Fin n.succ → ℚ) (_ : S.val = P g + P! f), - accCubeTriLinSymm (P g) (P g) (P! f) = 0 + ∀ (g f : Fin n.succ → ℚ) (_ : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f), + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = 0 lemma specialCase_exists (S : (PureU1 (2 * n.succ + 1)).Sols) - (hs : ∃ (g f : Fin n.succ → ℚ), S.val = P g + P! f ∧ - accCubeTriLinSymm (P g) (P g) (P! f) = 0) : SpecialCase S := by + (hs : ∃ (g f : Fin n.succ → ℚ), S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f ∧ + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = 0) : SpecialCase S := by intro g f hS obtain ⟨g', f', hS', hC'⟩ := hs rw [hS] at hS' - erw [Pa_eq] at hS' + erw [basisCharge_eq] at hS' rw [hS'.1, hS'.2] exact hC' lemma generic_or_special (S : (PureU1 (2 * n.succ + 1)).Sols) : 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 + have h1 : accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) ≠ 0 ∨ + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = 0 := by exact ne_or_eq _ _ cases h1 <;> rename_i h1 · exact Or.inl (genericCase_exists S ⟨g, f, h, h1⟩) @@ -119,7 +119,7 @@ lemma generic_or_special (S : (PureU1 (2 * n.succ + 1)).Sols) : theorem generic_case {S : (PureU1 (2 * n.succ + 1)).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))⁻¹ + use g, f, (accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g))⁻¹ rw [parameterization] apply ACCSystem.Sols.ext rw [parameterizationAsLinear_val] @@ -135,14 +135,14 @@ lemma special_case_lineInCubic {S : (PureU1 (2 * n.succ + 1)).Sols} intro g f hS a b erw [TriLinearSymm.toCubic_add] rw [HomogeneousCubic.map_smul, HomogeneousCubic.map_smul] - erw [P_accCube, P!_accCube] + erw [symmPlaneAsCharges_accCube, shiftPlaneAsCharges_accCube] have h := h g f hS rw [accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, accCubeTriLinSymm.map_smul₁, accCubeTriLinSymm.map_smul₂, accCubeTriLinSymm.map_smul₃, h] rw [anomalyFree_param _ _ hS] at h simp only [Nat.succ_eq_add_one, accCubeTriLinSymm_toFun_apply_apply, neg_eq_zero] at h - change accCubeTriLinSymm (P! f) (P! f) (P g) = 0 at h + change accCubeTriLinSymm (shiftPlaneAsCharges f) (shiftPlaneAsCharges f) (symmPlaneAsCharges g) = 0 at h erw [h] simp From 5f7d373882f74cabc2af6bd7a449a46d3107c5bd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 05:02:04 +0000 Subject: [PATCH 20/22] Fix remaining doc comment with old P/P! names in Even/Parameterization.lean Agent-Logs-Url: https://github.com/leanprover-community/physlib/sessions/d94e6cfc-4fd7-43a2-af34-c890c833de6a Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean index 7c0bbb8dc..ed4c6b14c 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/Parameterization.lean @@ -89,7 +89,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 (symmPlaneAsCharges g, symmPlaneAsCharges g, shiftPlaneAsCharges f) = 0`. -/ def SpecialCase (S : (PureU1 (2 * n.succ)).Sols) : Prop := ∀ (g : Fin n.succ → ℚ) (f : Fin n → ℚ) (_ : S.val = symmPlaneAsCharges g + shiftPlaneAsCharges f), accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftPlaneAsCharges f) = 0 From 0085c3aa31966a8e8e98f4ed82f3eb8733184d84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 09:44:53 +0000 Subject: [PATCH 21/22] Refactor QED anomaly cancellation: rename dirs, sections, and identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename BasisLinear/ → Planes/ for both Even and Odd subdirectories - Rename basisLinSol → spanBasis (and associated lemmas spanBasis_symmPlane_shiftPlane, spanBasis_eq, spanBasis_elim_eq_iff) in Even/Basis.lean and Odd/Basis.lean - Fix section numbering in ShiftPlane.lean: A.2/A.3 → A.1/A.2 (Even), A.2/A.3/A.4 → A.1/A.2/A.3 (Odd) - Rename section C → B (The shifted plane) in both ShiftPlane.lean files - Move mixed cubic ACC lemmas from ShiftPlane.lean to Basis.lean: symmPlane_symmPlane_shiftBasisAsCharges_accCube and shiftPlane_shiftPlane_symmBasisAsCharges_accCube (Even), symmPlane_symmPlane_shiftBasisAsCharges_accCube (Odd) - Update all import statements to use new Planes/ paths Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../QED/AnomalyCancellation/Even/Basis.lean | 74 +++++++++--- .../{BasisLinear => Planes}/ShiftPlane.lean | 106 +++++------------- .../{BasisLinear => Planes}/SymmPlane.lean | 0 .../QED/AnomalyCancellation/Odd/Basis.lean | 54 ++++++--- .../{BasisLinear => Planes}/ShiftPlane.lean | 90 +++++---------- .../{BasisLinear => Planes}/SymmPlane.lean | 0 6 files changed, 160 insertions(+), 164 deletions(-) rename Physlib/QFT/QED/AnomalyCancellation/Even/{BasisLinear => Planes}/ShiftPlane.lean (79%) rename Physlib/QFT/QED/AnomalyCancellation/Even/{BasisLinear => Planes}/SymmPlane.lean (100%) rename Physlib/QFT/QED/AnomalyCancellation/Odd/{BasisLinear => Planes}/ShiftPlane.lean (83%) rename Physlib/QFT/QED/AnomalyCancellation/Odd/{BasisLinear => Planes}/SymmPlane.lean (100%) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/Basis.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Basis.lean index 7a42c4f0f..d31ca55db 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/Basis.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/Basis.lean @@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.ShiftPlane +public import Physlib.QFT.QED.AnomalyCancellation.Even.Planes.ShiftPlane /-! # The combined basis of the symmetric and shifted planes @@ -48,6 +48,7 @@ plane. - 1.9. The basis vectors as a basis - 2. Every linear solution is the sum of a point from each plane - 2.1. Relation under permutations +- 3. Mixed cubic anomaly cancellation conditions involving both planes ## iv. References @@ -168,11 +169,11 @@ lemma basisCharge_zero_shift (f : Fin n.succ → ℚ) (g : Fin n → ℚ) (h : b -/ /-- A point in the span of the whole basis. -/ -def basisLinSol (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n.succ)).LinSols := +def spanBasis (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n.succ)).LinSols := ∑ i, f i • basis i -lemma basisLinSol_symmPlane_shiftPlane (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : - basisLinSol f = symmPlane (f ∘ Sum.inl) + shiftPlane (f ∘ Sum.inr) := by +lemma spanBasis_symmPlane_shiftPlane (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : + spanBasis f = symmPlane (f ∘ Sum.inl) + shiftPlane (f ∘ Sum.inr) := by exact Fintype.sum_sum_type _ /-! @@ -184,12 +185,12 @@ lemma basisLinSol_symmPlane_shiftPlane (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by apply Fintype.linearIndependent_iff.mpr intro f h - change basisLinSol f = 0 at h - have h1 : (basisLinSol f).val = 0 := + change spanBasis f = 0 at h + have h1 : (spanBasis 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 - rw [basisLinSol_symmPlane_shiftPlane] at h1 + rw [spanBasis_symmPlane_shiftPlane] at h1 change (symmPlane (f ∘ Sum.inl)).val + (shiftPlane (f ∘ Sum.inr)).val = 0 at h1 rw [shiftPlane_val, symmPlane_val] at h1 @@ -207,9 +208,9 @@ theorem basis_linear_independent : LinearIndependent ℚ (@basis n) := by -/ -lemma basisLinSol_eq (f f' : (Fin n.succ) ⊕ (Fin n) → ℚ) : basisLinSol f = basisLinSol f' ↔ f = f' := by +lemma spanBasis_eq (f f' : (Fin n.succ) ⊕ (Fin n) → ℚ) : spanBasis f = spanBasis f' ↔ f = f' := by refine Iff.intro (fun h => (funext (fun i => ?_))) (fun h => ?_) - · rw [basisLinSol, basisLinSol] at h + · rw [spanBasis, spanBasis] at h have h1 : ∑ i : Fin (succ n) ⊕ Fin n, (f i + (- f' i)) • basis i = 0 := by simp only [add_smul, neg_smul] rw [Finset.sum_add_distrib] @@ -223,21 +224,21 @@ lemma basisLinSol_eq (f f' : (Fin n.succ) ⊕ (Fin n) → ℚ) : basisLinSol f = linarith · rw [h] -lemma basisLinSol_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : - basisLinSol (Sum.elim g f) = basisLinSol (Sum.elim g' f') ↔ basisCharge g f = basisCharge g' f' := by +lemma spanBasis_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : + spanBasis (Sum.elim g f) = spanBasis (Sum.elim g' f') ↔ basisCharge g f = basisCharge g' f' := by refine Iff.intro (fun h => ?_) (fun h => ?_) - · rw [basisLinSol_eq, Sum.elim_eq_iff] at h + · rw [spanBasis_eq, Sum.elim_eq_iff] at h rw [h.left, h.right] · apply ACCSystemLinear.LinSols.ext - rw [basisLinSol_symmPlane_shiftPlane, basisLinSol_symmPlane_shiftPlane] + rw [spanBasis_symmPlane_shiftPlane, spanBasis_symmPlane_shiftPlane] simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, symmPlane_val, shiftPlane_val] exact h lemma basisCharge_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n → ℚ) : basisCharge g f = basisCharge g' f' ↔ g = g' ∧ f = f' := by - rw [← basisLinSol_elim_eq_iff, ← Sum.elim_eq_iff] - exact basisLinSol_eq _ _ + rw [← spanBasis_elim_eq_iff, ← Sum.elim_eq_iff] + exact spanBasis_eq _ _ /-! @@ -310,6 +311,49 @@ lemma span_basis_swapShift {S : (PureU1 (2 * n.succ)).LinSols} (j : Fin n) apply linSolRep_swap_evenShift_eq_add at hS exact hS +/-! + +## 3. Mixed cubic anomaly cancellation conditions involving both planes + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n.succ → ℚ) (j : Fin n) : + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftBasisAsCharges j) + = g (j.succ) ^ 2 - g (j.castSucc) ^ 2 := by + simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, + TriLinearSymm.mk₃_toFun_apply_apply] + rw [sum_evenShift, shiftBasisAsCharges_on_evenShiftZero, shiftBasisAsCharges_on_evenShiftLast] + simp only [mul_zero, add_zero, Function.comp_apply, zero_add] + rw [Finset.sum_eq_single j, shiftBasisAsCharges_on_evenShiftFst_self, + shiftBasisAsCharges_on_evenShiftSnd_self] + · simp only [evenShiftFst_eq_evenFst_succ, mul_one, evenShiftSnd_eq_evenSnd_castSucc, mul_neg] + rw [symmPlaneAsCharges_evenFst, symmPlaneAsCharges_evenSnd] + ring + · intro k _ hkj + erw [shiftBasisAsCharges_on_evenShiftFst_other hkj.symm, + shiftBasisAsCharges_on_evenShiftSnd_other hkj.symm] + simp only [mul_zero, add_zero] + · simp + +set_option backward.isDefEq.respectTransparency false in +lemma shiftPlane_shiftPlane_symmBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n.succ) : + accCubeTriLinSymm (shiftPlaneAsCharges g) (shiftPlaneAsCharges g) (symmBasisAsCharges j) + = (shiftPlaneAsCharges g (evenFst j))^2 - (shiftPlaneAsCharges g (evenSnd j))^2 := by + simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, + TriLinearSymm.mk₃_toFun_apply_apply] + rw [sum_even] + simp only [Function.comp_apply] + rw [Finset.sum_eq_single j, symmBasisAsCharges_on_evenFst_self, + symmBasisAsCharges_on_evenSnd_self] + · simp only [mul_one, mul_neg] + ring + · intro k _ hkj + erw [symmBasisAsCharges_on_evenFst_other hkj.symm, + symmBasisAsCharges_on_evenSnd_other hkj.symm] + simp only [mul_zero, add_zero] + · simp + end VectorLikeEvenPlane end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/ShiftPlane.lean similarity index 79% rename from Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean rename to Physlib/QFT/QED/AnomalyCancellation/Even/Planes/ShiftPlane.lean index 6213618d1..5ac431f28 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/ShiftPlane.lean @@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Even.BasisLinear.SymmPlane +public import Physlib.QFT.QED.AnomalyCancellation.Even.Planes.SymmPlane /-! # The shifted plane for the even case @@ -29,22 +29,21 @@ boundary rather than symmetrically. ## iii. Table of contents -- A.2. The shifted even split: Splitting the charges up via `1 + (n + n + 1)` -- A.3. Lemmas relating the two splittings -- C. The second plane (shifted plane) - - C.1. The basis vectors of the shifted plane as charges - - C.2. Components of the basis vectors - - C.3. The basis vectors satisfy the linear ACCs - - C.4. The basis vectors satisfy the cubic ACC - - C.5. The basis vectors as `LinSols` - - C.6. The basis vectors are linearly independent - - C.7. Permutations as additions of basis vectors - - C.8. The inclusion of the shifted plane into charges - - C.9. Components of the shifted plane - - C.10. Points satisfy the cubic ACC - - C.11. Kernel of the inclusion - - C.12. The inclusion of the plane into `LinSols` -- D. Mixed cubic ACCs involving points from both planes +- A.1. The shifted even split: Splitting the charges up via `1 + (n + n + 1)` +- A.2. Lemmas relating the two splittings +- B. The shifted plane + - B.1. The basis vectors of the shifted plane as charges + - B.2. Components of the basis vectors + - B.3. The basis vectors satisfy the linear ACCs + - B.4. The basis vectors satisfy the cubic ACC + - B.5. The basis vectors as `LinSols` + - B.6. The basis vectors are linearly independent + - B.7. Permutations as additions of basis vectors + - B.8. The inclusion of the shifted plane into charges + - B.9. Components of the shifted plane + - B.10. Points satisfy the cubic ACC + - B.11. Kernel of the inclusion + - B.12. The inclusion of the plane into `LinSols` ## iv. References @@ -64,7 +63,7 @@ namespace VectorLikeEvenPlane /-! -### A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` +### A.1. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` -/ @@ -111,7 +110,7 @@ lemma sum_evenShift (S : Fin (2 * n.succ) → ℚ) : /-! -### A.3. Lemmas relating the two splittings +### A.2. Lemmas relating the two splittings -/ lemma evenShiftZero_eq_evenFst_zero : @evenShiftZero n = evenFst 0 := rfl @@ -136,13 +135,13 @@ lemma evenShiftSnd_eq_evenSnd_castSucc (j : Fin n) : evenShiftSnd j = evenSnd j. /-! -## C. The vectors of the basis spanning the second plane, via the shifted even split +## B. The shifted plane -/ /-! -### C.1. The basis vectors of the shifted plane as charges +### B.1. The basis vectors of the shifted plane as charges -/ @@ -158,7 +157,7 @@ def shiftBasisAsCharges (j : Fin n) : (PureU1 (2 * n.succ)).Charges := 0 /-! -### C.2. Components of the basis vectors +### B.2. Components of the basis vectors -/ @@ -251,7 +250,7 @@ lemma shiftBasisAsCharges_on_evenShiftLast (j : Fin n) : /-! -### C.3. The basis vectors satisfy the linear ACCs +### B.3. The basis vectors satisfy the linear ACCs -/ @@ -264,7 +263,7 @@ lemma shiftBasisAsCharges_linearACC (j : Fin n) : /-! -### C.4. The basis vectors satisfy the cubic ACC +### B.4. The basis vectors satisfy the cubic ACC -/ @@ -282,7 +281,7 @@ lemma shiftBasisAsCharges_accCube (j : Fin n) : /-! -### C.5. The basis vectors as `LinSols` +### B.5. The basis vectors as `LinSols` -/ /-- The basis vectors of the shifted plane as `LinSols`. -/ @@ -297,7 +296,7 @@ def shiftBasis (j : Fin n) : (PureU1 (2 * n.succ)).LinSols := /-! -### C.6. The basis vectors are linearly independent +### B.6. The basis vectors are linearly independent -/ @@ -319,7 +318,7 @@ theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := /-! -### C.7. Permutations as additions of basis vectors +### B.7. Permutations as additions of basis vectors -/ @@ -344,7 +343,7 @@ lemma linSolRep_swap_evenShift_eq_add {S S' : (PureU1 (2 * n.succ)).LinSols} (j /-! -### C.8. The inclusion of the shifted plane into charges +### B.8. The inclusion of the shifted plane into charges -/ @@ -354,7 +353,7 @@ def shiftPlaneAsCharges (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges := /-! -### C.9. Components of the shifted plane +### B.9. Components of the shifted plane -/ @@ -392,7 +391,7 @@ lemma shiftPlaneAsCharges_evenShiftLast (f : Fin n → ℚ) : shiftPlaneAsCharge /-! -### C.10. Points satisfy the cubic ACC +### B.10. Points satisfy the cubic ACC -/ @@ -408,7 +407,7 @@ lemma shiftPlaneAsCharges_accCube (f : Fin n → ℚ) : accCube (2 * n.succ) (sh /-! -### C.11. Kernel of the inclusion +### B.11. Kernel of the inclusion -/ @@ -434,7 +433,7 @@ lemma smul_shiftBasisAsCharges_in_span (S : (PureU1 (2 * n.succ)).LinSols) (j : /-! -### C.12. The inclusion of the plane into `LinSols` +### B.12. The inclusion of the plane into `LinSols` -/ @@ -449,49 +448,6 @@ lemma shiftPlane_val (f : Fin n → ℚ) : rw [sum_of_anomaly_free_linear, sum_of_charges] rfl -/-! - -## D. Mixed cubic ACCs involving points from both planes - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n.succ → ℚ) (j : Fin n) : - accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftBasisAsCharges j) - = g (j.succ) ^ 2 - g (j.castSucc) ^ 2 := by - simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, - TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_evenShift, shiftBasisAsCharges_on_evenShiftZero, shiftBasisAsCharges_on_evenShiftLast] - simp only [mul_zero, add_zero, Function.comp_apply, zero_add] - rw [Finset.sum_eq_single j, shiftBasisAsCharges_on_evenShiftFst_self, - shiftBasisAsCharges_on_evenShiftSnd_self] - · simp only [evenShiftFst_eq_evenFst_succ, mul_one, evenShiftSnd_eq_evenSnd_castSucc, mul_neg] - rw [symmPlaneAsCharges_evenFst, symmPlaneAsCharges_evenSnd] - ring - · intro k _ hkj - erw [shiftBasisAsCharges_on_evenShiftFst_other hkj.symm, - shiftBasisAsCharges_on_evenShiftSnd_other hkj.symm] - simp only [mul_zero, add_zero] - · simp - -set_option backward.isDefEq.respectTransparency false in -lemma shiftPlane_shiftPlane_symmBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n.succ) : - accCubeTriLinSymm (shiftPlaneAsCharges g) (shiftPlaneAsCharges g) (symmBasisAsCharges j) - = (shiftPlaneAsCharges g (evenFst j))^2 - (shiftPlaneAsCharges g (evenSnd j))^2 := by - simp only [succ_eq_add_one, accCubeTriLinSymm, PureU1Charges_numberCharges, - TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_even] - simp only [Function.comp_apply] - rw [Finset.sum_eq_single j, symmBasisAsCharges_on_evenFst_self, - symmBasisAsCharges_on_evenSnd_self] - · simp only [mul_one, mul_neg] - ring - · intro k _ hkj - erw [symmBasisAsCharges_on_evenFst_other hkj.symm, - symmBasisAsCharges_on_evenSnd_other hkj.symm] - simp only [mul_zero, add_zero] - · simp - end VectorLikeEvenPlane end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/SymmPlane.lean similarity index 100% rename from Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean rename to Physlib/QFT/QED/AnomalyCancellation/Even/Planes/SymmPlane.lean diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/Basis.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/Basis.lean index 364d0ad79..e1cf2fbeb 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/Basis.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/Basis.lean @@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.ShiftPlane +public import Physlib.QFT.QED.AnomalyCancellation.Odd.Planes.ShiftPlane /-! # The combined basis for the odd case @@ -34,6 +34,7 @@ of `PureU1 (2 * n + 1)`. Every linear solution is the sum of a point from each p - 1.9. The basis vectors as a basis - 2. Every linear solution is the sum of a point from each plane - 2.1. Relation under permutations +- 3. Mixed cubic anomaly cancellation conditions involving both planes -/ @@ -157,11 +158,11 @@ lemma basisCharge_zero_shift (f g : Fin n.succ → ℚ) (h : basisCharge f g = 0 -/ /-- A point in the span of the whole basis. -/ -def basisLinSol (f : (Fin n) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n + 1)).LinSols := +def spanBasis (f : (Fin n) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n + 1)).LinSols := ∑ i, f i • basis i -lemma basisLinSol_symmPlane_shiftPlane (f : (Fin n) ⊕ (Fin n) → ℚ) : - basisLinSol f = symmPlane (f ∘ Sum.inl) + shiftPlane (f ∘ Sum.inr) := by +lemma spanBasis_symmPlane_shiftPlane (f : (Fin n) ⊕ (Fin n) → ℚ) : + spanBasis f = symmPlane (f ∘ Sum.inl) + shiftPlane (f ∘ Sum.inr) := by exact Fintype.sum_sum_type _ /-! @@ -173,12 +174,12 @@ lemma basisLinSol_symmPlane_shiftPlane (f : (Fin n) ⊕ (Fin n) → ℚ) : theorem basis_linear_independent : LinearIndependent ℚ (@basis n.succ) := by apply Fintype.linearIndependent_iff.mpr intro f h - change basisLinSol f = 0 at h - have h1 : (basisLinSol f).val = 0 := + change spanBasis f = 0 at h + have h1 : (spanBasis 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 - rw [basisLinSol_symmPlane_shiftPlane] at h1 + rw [spanBasis_symmPlane_shiftPlane] at h1 change (symmPlane (f ∘ Sum.inl)).val + (shiftPlane (f ∘ Sum.inr)).val = 0 at h1 rw [shiftPlane_val, symmPlane_val] at h1 change basisCharge (f ∘ Sum.inl) (f ∘ Sum.inr) = 0 at h1 @@ -196,10 +197,10 @@ theorem basis_linear_independent : LinearIndependent ℚ (@basis n.succ) := by -/ -lemma basisLinSol_eq (f f' : (Fin n.succ) ⊕ (Fin n.succ) → ℚ) : basisLinSol f = basisLinSol f' ↔ f = f' := by +lemma spanBasis_eq (f f' : (Fin n.succ) ⊕ (Fin n.succ) → ℚ) : spanBasis f = spanBasis f' ↔ f = f' := by refine Iff.intro (fun h => ?_) (fun h => ?_) · funext i - rw [basisLinSol, basisLinSol] at h + rw [spanBasis, spanBasis] at h have h1 : ∑ i : Fin n.succ ⊕ Fin n.succ, (f i + (- f' i)) • basis i = 0 := by simp only [add_smul, neg_smul] rw [Finset.sum_add_distrib] @@ -213,22 +214,22 @@ lemma basisLinSol_eq (f f' : (Fin n.succ) ⊕ (Fin n.succ) → ℚ) : basisLinSo linarith · rw [h] -lemma basisLinSol_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : - basisLinSol (Sum.elim g f) = basisLinSol (Sum.elim g' f') ↔ basisCharge g f = basisCharge g' f' := by +lemma spanBasis_elim_eq_iff (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : + spanBasis (Sum.elim g f) = spanBasis (Sum.elim g' f') ↔ basisCharge g f = basisCharge g' f' := by refine Iff.intro (fun h => ?_) (fun h => ?_) - · rw [basisLinSol_eq, Sum.elim_eq_iff] at h + · rw [spanBasis_eq, Sum.elim_eq_iff] at h rw [h.left, h.right] · apply ACCSystemLinear.LinSols.ext - rw [basisLinSol_symmPlane_shiftPlane, basisLinSol_symmPlane_shiftPlane] + rw [spanBasis_symmPlane_shiftPlane, spanBasis_symmPlane_shiftPlane] simp only [succ_eq_add_one, ACCSystemLinear.linSolsAddCommMonoid_add_val, symmPlane_val, shiftPlane_val] exact h lemma basisCharge_eq (g g' : Fin n.succ → ℚ) (f f' : Fin n.succ → ℚ) : basisCharge g f = basisCharge g' f' ↔ g = g' ∧ f = f' := by - rw [← basisLinSol_elim_eq_iff] + rw [← spanBasis_elim_eq_iff] rw [← Sum.elim_eq_iff] - exact basisLinSol_eq _ _ + exact spanBasis_eq _ _ /-! @@ -312,6 +313,29 @@ lemma span_basis_swapShift {S : (PureU1 (2 * n.succ + 1)).LinSols} (j : Fin n.su apply linSolRep_swap_oddShift_eq_add at hS exact hS +/-! + +## 3. Mixed cubic anomaly cancellation conditions involving both planes + +-/ + +set_option backward.isDefEq.respectTransparency false in +lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n) : + accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftBasisAsCharges j) + = (symmPlaneAsCharges g (oddShiftFst j))^2 - (g j)^2 := by + simp only [accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] + rw [sum_oddShift, shiftBasisAsCharges_on_oddShiftZero] + simp only [mul_zero, Function.comp_apply, zero_add] + rw [Finset.sum_eq_single j, shiftBasisAsCharges_on_oddShiftFst_self, + shiftBasisAsCharges_on_oddShiftSnd_self] + · rw [← oddSnd_eq_oddShiftSnd, symmPlaneAsCharges_oddSnd] + ring + · intro k _ hkj + erw [shiftBasisAsCharges_on_oddShiftFst_other hkj.symm, + shiftBasisAsCharges_on_oddShiftSnd_other hkj.symm] + simp only [mul_zero, add_zero] + · simp + end VectorLikeOddPlane end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/ShiftPlane.lean similarity index 83% rename from Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean rename to Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/ShiftPlane.lean index 3814f6164..3764d7fe9 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/ShiftPlane.lean @@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith -/ module -public import Physlib.QFT.QED.AnomalyCancellation.Odd.BasisLinear.SymmPlane +public import Physlib.QFT.QED.AnomalyCancellation.Odd.Planes.SymmPlane /-! # The shifted plane for the odd case @@ -27,28 +27,25 @@ than in the middle. - `shiftPlaneAsCharges_accCube` : Charges from the shifted plane satisfy the cubic ACC. - `shiftBasis_linear_independent` : The shifted basis vectors are linearly independent. -- `symmPlane_symmPlane_shiftBasisAsCharges_accCube` : The mixed cubic ACC from points in both - planes. - `linSolRep_swap_oddShift_eq_add` : Swapping elements equals adding a basis vector. ## Table of contents -- A.2. The shifted split: Splitting the charges up via `1 + n + n` -- A.3. The shifted shifted split: Splitting the charges up via `((1+n)+1) + n.succ` -- A.4. Relating the splittings together -- C. The second plane (shifted plane) - - C.1. The basis vectors of the shifted plane as charges - - C.2. Components of the basis vectors as charges - - C.3. The basis vectors satisfy the linear ACCs - - C.4. The basis vectors as `LinSols` - - C.5. The basis vectors are linearly independent - - C.6. Permutations equal adding basis vectors - - C.7. The inclusion of the shifted plane into charges (`shiftPlaneAsCharges`) - - C.8. Components of the shifted plane - - C.9. Points on the shifted plane satisfy the ACCs - - C.10. Kernel of the inclusion into charges - - C.11. The inclusion of the shifted plane into `LinSols` (`shiftPlane`) -- D. The mixed cubic ACC from points in both planes +- A.1. The shifted split: Splitting the charges up via `1 + n + n` +- A.2. The shifted shifted split: Splitting the charges up via `((1+n)+1) + n.succ` +- A.3. Relating the splittings together +- B. The shifted plane + - B.1. The basis vectors of the shifted plane as charges + - B.2. Components of the basis vectors as charges + - B.3. The basis vectors satisfy the linear ACCs + - B.4. The basis vectors as `LinSols` + - B.5. The basis vectors are linearly independent + - B.6. Permutations equal adding basis vectors + - B.7. The inclusion of the shifted plane into charges (`shiftPlaneAsCharges`) + - B.8. Components of the shifted plane + - B.9. Points on the shifted plane satisfy the ACCs + - B.10. Kernel of the inclusion into charges + - B.11. The inclusion of the shifted plane into `LinSols` (`shiftPlane`) -/ @@ -66,7 +63,7 @@ section theDeltas /-! -### A.2. The shifted split: Spltting the charges up via `1 + n + n` +### A.1. The shifted split: Spltting the charges up via `1 + n + n` -/ @@ -99,7 +96,7 @@ lemma sum_oddShift (S : Fin (2 * n + 1) → ℚ) : /-! -### A.3. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` +### A.2. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` -/ @@ -128,7 +125,7 @@ def oddShiftShiftSnd (j : Fin n.succ) : Fin (2 * n.succ + 1) := /-! -### A.4. Relating the splittings together +### A.3. Relating the splittings together -/ lemma oddShiftShiftZero_eq_oddFst_zero : @oddShiftShiftZero n = oddFst 0 := @@ -194,13 +191,13 @@ end theDeltas /-! -## C. The second plane (shifted plane) +## B. The shifted plane -/ /-! -### C.1. The basis vectors of the shifted plane as charges +### B.1. The basis vectors of the shifted plane as charges -/ @@ -217,7 +214,7 @@ def shiftBasisAsCharges (j : Fin n) : (PureU1 (2 * n + 1)).Charges := /-! -### C.2. Components of the basis vectors as charges +### B.2. Components of the basis vectors as charges -/ @@ -294,7 +291,7 @@ lemma shiftBasisAsCharges_on_oddShiftZero (j : Fin n) : /-! -### C.3. The basis vectors satisfy the linear ACCs +### B.3. The basis vectors satisfy the linear ACCs -/ @@ -307,7 +304,7 @@ lemma shiftBasisAsCharges_linearACC (j : Fin n) : /-! -### C.4. The basis vectors as `LinSols` +### B.4. The basis vectors as `LinSols` -/ @@ -323,7 +320,7 @@ def shiftBasis (j : Fin n) : (PureU1 (2 * n + 1)).LinSols := /-! -### C.5. The basis vectors are linearly independent +### B.5. The basis vectors are linearly independent -/ @@ -340,7 +337,7 @@ theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := /-! -### C.6. Permutations equal adding basis vectors +### B.6. Permutations equal adding basis vectors -/ @@ -366,7 +363,7 @@ lemma linSolRep_swap_oddShift_eq_add {S S' : (PureU1 (2 * n + 1)).LinSols} (j : /-! -### C.7. The inclusion of the shifted plane into charges (`shiftPlaneAsCharges`) +### B.7. The inclusion of the shifted plane into charges (`shiftPlaneAsCharges`) -/ @@ -376,7 +373,7 @@ def shiftPlaneAsCharges (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges := /-! -### C.8. Components of the shifted plane +### B.8. Components of the shifted plane -/ @@ -410,7 +407,7 @@ lemma shiftPlaneAsCharges_oddShiftZero (f : Fin n → ℚ) : shiftPlaneAsCharges /-! -### C.9. Points on the shifted plane satisfy the ACCs +### B.9. Points on the shifted plane satisfy the ACCs -/ @@ -433,7 +430,7 @@ lemma shiftPlaneAsCharges_accCube (f : Fin n → ℚ) : accCube (2 * n +1) (shif /-! -### C.10. Kernel of the inclusion into charges +### B.10. Kernel of the inclusion into charges -/ @@ -445,7 +442,7 @@ lemma shiftPlaneAsCharges_zero (f : Fin n → ℚ) (h : shiftPlaneAsCharges f = /-! -### C.11. The inclusion of the shifted plane into `LinSols` +### B.11. The inclusion of the shifted plane into `LinSols` -/ @@ -460,31 +457,6 @@ lemma shiftPlane_val (f : Fin n → ℚ) : rw [sum_of_anomaly_free_linear, sum_of_charges] rfl - - -/-! - -## D. The mixed cubic ACC from points in both planes - --/ - -set_option backward.isDefEq.respectTransparency false in -lemma symmPlane_symmPlane_shiftBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n) : - accCubeTriLinSymm (symmPlaneAsCharges g) (symmPlaneAsCharges g) (shiftBasisAsCharges j) - = (symmPlaneAsCharges g (oddShiftFst j))^2 - (g j)^2 := by - simp only [accCubeTriLinSymm, PureU1Charges_numberCharges, TriLinearSymm.mk₃_toFun_apply_apply] - rw [sum_oddShift, shiftBasisAsCharges_on_oddShiftZero] - simp only [mul_zero, Function.comp_apply, zero_add] - rw [Finset.sum_eq_single j, shiftBasisAsCharges_on_oddShiftFst_self, - shiftBasisAsCharges_on_oddShiftSnd_self] - · rw [← oddSnd_eq_oddShiftSnd, symmPlaneAsCharges_oddSnd] - ring - · intro k _ hkj - erw [shiftBasisAsCharges_on_oddShiftFst_other hkj.symm, - shiftBasisAsCharges_on_oddShiftSnd_other hkj.symm] - simp only [mul_zero, add_zero] - · simp - end VectorLikeOddPlane end PureU1 diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/SymmPlane.lean similarity index 100% rename from Physlib/QFT/QED/AnomalyCancellation/Odd/BasisLinear/SymmPlane.lean rename to Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/SymmPlane.lean From 7ee7905d3d7925eef153ab0f20abf63add6a38d2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 09:46:01 +0000 Subject: [PATCH 22/22] =?UTF-8?q?Fix=20typos:=20Spltting=20=E2=86=92=20Spl?= =?UTF-8?q?itting=20in=20Planes/=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> --- .../QFT/QED/AnomalyCancellation/Even/Planes/ShiftPlane.lean | 2 +- .../QFT/QED/AnomalyCancellation/Even/Planes/SymmPlane.lean | 2 +- .../QFT/QED/AnomalyCancellation/Odd/Planes/ShiftPlane.lean | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/ShiftPlane.lean index 5ac431f28..558e76ced 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/ShiftPlane.lean @@ -63,7 +63,7 @@ namespace VectorLikeEvenPlane /-! -### A.1. The shifted even split: Spltting the charges up via `1 + (n + n + 1)` +### A.1. The shifted even split: Splitting the charges up via `1 + (n + n + 1)` -/ diff --git a/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/SymmPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/SymmPlane.lean index b290cd507..4b47445e3 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/SymmPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Even/Planes/SymmPlane.lean @@ -64,7 +64,7 @@ namespace VectorLikeEvenPlane /-! -### A.1. The even split: Spltting the charges up via `n.succ + n.succ` +### A.1. The even split: Splitting the charges up via `n.succ + n.succ` -/ diff --git a/Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/ShiftPlane.lean b/Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/ShiftPlane.lean index 3764d7fe9..f7e0a8796 100644 --- a/Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/ShiftPlane.lean +++ b/Physlib/QFT/QED/AnomalyCancellation/Odd/Planes/ShiftPlane.lean @@ -63,7 +63,7 @@ section theDeltas /-! -### A.1. The shifted split: Spltting the charges up via `1 + n + n` +### A.1. The shifted split: Splitting the charges up via `1 + n + n` -/ @@ -96,7 +96,7 @@ lemma sum_oddShift (S : Fin (2 * n + 1) → ℚ) : /-! -### A.2. The shifted shifted split: Spltting the charges up via `((1+n)+1) + n.succ` +### A.2. The shifted shifted split: Splitting the charges up via `((1+n)+1) + n.succ` -/