Rename and split QED anomaly cancellation plane definitions for clarity#1047
Rename and split QED anomaly cancellation plane definitions for clarity#1047
Conversation
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>
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>
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>
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>
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>
…ifiers 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>
…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>
…name identifiers - 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>
…cancellation 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>
jstoobysmith
left a comment
There was a problem hiding this comment.
I've given you some comments for the Even case. The analogous comments hold for the odd case.
| -/ | ||
|
|
||
| /-- 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 |
There was a problem hiding this comment.
shiftPlane would be a better renaming.
There was a problem hiding this comment.
Renamed Pshift → shiftPlane in both Even and Odd cases. See commit e03833b.
| -/ | ||
|
|
||
| /-- 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 |
There was a problem hiding this comment.
Renamed Pshift' → shiftPlaneLinSols in both Even and Odd cases. See commit e03833b.
| -/ | ||
|
|
||
| /-- 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 |
There was a problem hiding this comment.
Renamed Psymm → symmPlane in both Even and Odd cases. See commit e03833b.
| -/ | ||
|
|
||
| /-- 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 |
There was a problem hiding this comment.
Renamed Psymm' → symmPlaneLinSols in both Even and Odd cases. See commit e03833b.
| 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) : |
There was a problem hiding this comment.
These results should go into the appropriately named file.
There was a problem hiding this comment.
Moved the mixed cubic ACC results (symmPlane_symmPlane_shiftBasisAsCharges_accCube and shiftPlane_shiftPlane_symmBasisAsCharges_accCube) from BasisLinear.lean into ShiftPlane.lean, which imports SymmPlane and thus has access to both planes' definitions. See commit e03833b.
|
|
||
| /-- 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) := |
There was a problem hiding this comment.
These should go into the appropriate file with the corresponding plane. There is no need to make a new file for these.
There was a problem hiding this comment.
Removed the ChargeSplits.lean files. The symmetric charge splits (evenFst/evenSnd/oddFst/oddSnd) are now in SymmPlane.lean and the shifted charge splits (evenShiftFst/oddShiftFst etc.) are in ShiftPlane.lean. See commit e03833b.
|
@copilot Address the review. |
|
@copilot address the concerns in the review of this PR |
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>
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>
…imports 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>
…ntent 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>
…dentifiers 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>
…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>
…rgeSplits, move charge splits into plane files, move mixed cubic ACC into ShiftPlane 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>
Applied all review feedback to both Even and Odd cases in commit e03833b:
Note: The renaming in |
The two planes in
Odd/BasisLinearandEven/BasisLinearused non-descriptive naming (basis/P/P'vsbasis!/P!/P!') with no indication of what distinguishes them. The!suffix convention was particularly opaque.Naming
Renamed definitions after the charge-index splitting each plane is built from:
symmBasisAsCharges/symmPlane/symmPlaneLinSols): basis vectors pair charges at positions from the symmetric split ((n+1) + nodd,n.succ + n.succeven)shiftBasisAsCharges/shiftPlane/shiftPlaneLinSols): basis vectors pair charges at positions from the shifted split (1 + n + nodd,1 + (n + n + 1)even)File splitting
Each monolithic
BasisLinear.lean(~1000 lines) is split into sub-modules:BasisLinear/SymmPlane.lean— symmetric charge splits, symmetric plane basis, inclusion, ACC proofsBasisLinear/ShiftPlane.lean— shifted charge splits, shifted plane basis, inclusion, ACC proofs, mixed cubic ACCsBasisLinear.lean— combined basis, span theorem (imports above)Charge index splitting definitions are co-located with their corresponding plane (no separate
ChargeSplitsfile). Mixed cubic ACC results live inShiftPlane.leanwhich importsSymmPlane.leanand has access to both planes' definitions.Documentation
Module docs now explain the naming motivation — each plane is named after which charge-index splitting its basis vectors are built from.
Status
Odd/Parameterization.leanandEven/Parameterization.leanproof bodies is incomplete, andPhyslib.leanimports need updating.