Skip to content

Rename and split QED anomaly cancellation plane definitions for clarity#1047

Draft
Copilot wants to merge 22 commits intomasterfrom
copilot/improve-variable-naming-basis-linear
Draft

Rename and split QED anomaly cancellation plane definitions for clarity#1047
Copilot wants to merge 22 commits intomasterfrom
copilot/improve-variable-naming-basis-linear

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 20, 2026

The two planes in Odd/BasisLinear and Even/BasisLinear used non-descriptive naming (basis/P/P' vs basis!/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. The AsCharges suffix now consistently distinguishes the Charges inclusion from the LinSols inclusion:

  • Symmetric plane (symmBasisAsCharges / symmPlaneAsCharges / symmPlane): basis vectors pair charges at positions from the symmetric split ((n+1) + n odd, n.succ + n.succ even)
  • Shifted plane (shiftBasisAsCharges / shiftPlaneAsCharges / shiftPlane): basis vectors pair charges at positions from the shifted split (1 + n + n odd, 1 + (n + n + 1) even)
-- Before
def P  (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges  := ∑ i, f i • basisAsCharges i
def P' (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols  := ∑ i, f i • basis i

-- After
def symmPlaneAsCharges (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).Charges  := ∑ i, f i • symmBasisAsCharges i
def symmPlane          (f : Fin n → ℚ) : (PureU1 (2 * n + 1)).LinSols  := ∑ i, f i • symmBasis i

The combined-basis helpers in Basis.lean are also renamed:

  • basisabasis, basisaAsBasisbasisAsBasis
  • PabasisCharge (a charge in the span of the combined basis)
  • Pa'spanBasis (a LinSols in the span of the combined basis)
  • swapShift_as_addlinSolRep_swap_evenShift_eq_add / linSolRep_swap_oddShift_eq_add (Mathlib-style)

File organisation

Each monolithic BasisLinear.lean (~1000 lines) is split into sub-modules. The subdirectory is renamed Planes/ and the top-level file is renamed Basis.lean:

  • Planes/SymmPlane.lean — symmetric charge splits, symmetric plane basis (symmBasisAsCharges / symmBasis), inclusion (symmPlaneAsCharges / symmPlane), ACC proofs; sections labelled A. and B.
  • Planes/ShiftPlane.lean — shifted charge splits (sections A.1A.2), shifted plane basis and inclusion (section B., shiftBasisAsCharges / shiftBasis / shiftPlaneAsCharges / shiftPlane), ACC proofs; shiftBasis_linear_independent placed directly after shiftBasis
  • Basis.lean (formerly BasisLinear.lean) — combined basis (basis, basisCharge, spanBasis), span theorem, mixed cubic ACC lemmas (symmPlane_symmPlane_shiftBasisAsCharges_accCube, shiftPlane_shiftPlane_symmBasisAsCharges_accCube), imports above

Charge index splitting definitions are co-located with their corresponding plane (no separate ChargeSplits file).

Documentation

Module docs explain the naming motivation. Section numbering is sequential within each file (A.1, A.2, B.1, … in ShiftPlane.lean; 1., 2., 3. in Basis.lean).

Status

All renames and file splits are complete for both Odd and Even cases, including Odd/Parameterization.lean and Even/Parameterization.lean, with Physlib.lean imports updated.

Copilot AI and others added 9 commits April 20, 2026 13:40
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>
Copilot AI changed the title [WIP] Refactor variable names in Anomaly Cancellation for QED Rename and split QED anomaly cancellation plane definitions for clarity Apr 20, 2026
Copilot AI requested a review from jstoobysmith April 20, 2026 14:26
Copy link
Copy Markdown
Member

@jstoobysmith jstoobysmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've given you some comments for the Even case. The analogous comments hold for the odd case.

Comment thread Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean Outdated
-/

/-- 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shiftPlaneLinSol.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed Pshift'shiftPlaneLinSols in both Even and Odd cases. See commit e03833b.

Comment thread Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/SymmPlane.lean Outdated
-/

/-- 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

symmPlaneLinSols

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed Psymm'symmPlaneLinSols in both Even and Odd cases. See commit e03833b.

Comment thread Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear.lean Outdated

/-- 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) :=
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should go into the appropriate file with the corresponding plane. There is no need to make a new file for these.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jstoobysmith
Copy link
Copy Markdown
Member

@copilot Address the review.

@jstoobysmith
Copy link
Copy Markdown
Member

@copilot address the concerns in the review of this PR

Copilot AI and others added 7 commits April 20, 2026 15:03
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>
Copy link
Copy Markdown
Author

Copilot AI commented Apr 20, 2026

I've given you some comments for the Even case. The analogous comments hold for the odd case.

Applied all review feedback to both Even and Odd cases in commit e03833b:

  • Psymm/PsymmPlane, Psymm'/P'symmPlaneLinSols
  • Pshift/P!shiftPlane, Pshift'/P!'shiftPlaneLinSols
  • Removed ChargeSplits.lean, moved charge splits into the appropriate plane files
  • Moved mixed cubic ACC results into ShiftPlane.lean

Note: The renaming in Even/Parameterization.lean and Odd/Parameterization.lean proof bodies is partially incomplete — a few P g/P! f references remain in those files.

Copilot AI requested a review from jstoobysmith April 20, 2026 15:49
Copy link
Copy Markdown
Member

@jstoobysmith jstoobysmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given comments for the Even case, also all apply for the odd case.

Comment thread Physlib/QFT/QED/AnomalyCancellation/Even/BasisLinear/ShiftPlane.lean Outdated

/-!

### C.6. The vectors as linear solutions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these headers more descriptive

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made section headers more descriptive (e.g. "The basis vectors as LinSols" instead of "The vectors as linear solutions"). Applied in commit 5f7d373.


/-!

### C.7. The inclusion of the shifted plane into charges
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a new section

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a new section break before the shiftPlaneAsCharges definition (the inclusion into charges), separating it from the shiftBasis LinSols results. Applied in commit 5f7d373.

-/

/-- A point in the span of the shifted basis as a charge. -/
def shiftPlane (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).Charges :=
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would rename to shiftPlaneAsCharges

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed shiftPlane (Charges version) → shiftPlaneAsCharges. Similarly symmPlane (Charges) → symmPlaneAsCharges. Applied to both Even and Odd in commit 5f7d373.

-/

/-- A point in the span of the shifted basis as a linear solution. -/
def shiftPlaneLinSols (f : Fin n → ℚ) : (PureU1 (2 * n.succ)).LinSols :=
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would rename to shiftPlane. Similar with all of the examples in the other files.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed shiftPlaneLinSolsshiftPlane (and analogously symmPlaneLinSolssymmPlane) throughout all Even and Odd files. Commit 5f7d373.


-/

theorem shiftBasis_linear_independent : LinearIndependent ℚ (@shiftBasis n) := by
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs moving up to other results on shiftBasis

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved shiftBasis_linear_independent up to be right after the shiftBasis definition (now section C.5/C.6), before shiftPlaneAsCharges. Applied to both Even and Odd in commit 5f7d373.


/-- 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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give this a better name, more in line with Mathlib conventions.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed swapShift_as_addlinSolRep_swap_evenShift_eq_add (Even) and linSolRep_swap_oddShift_eq_add (Odd), following Mathlib naming conventions. Commit 5f7d373.

@@ -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 =>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename this basis now

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed basisabasis (and basisaAsBasisbasisAsBasis, basisa_linear_independentbasis_linear_independent, basisa_cardbasis_card). Commit 5f7d373.


/-!

## E. The combined basis
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix numbering. I would also rename this file Basis.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed section numbering (E./F. → 1./2.) and renamed the file BasisLinear.leanBasis.lean for both Even and Odd. All imports updated. Commit 5f7d373.


/-- 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 :=
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would give a more descriptive name to Pa an Pa'. Similar to the names given below.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed PabasisCharge and Pa'basisLinSol (descriptive names: "a charge in the span of the combined basis" / "a LinSols in the span"). All associated lemmas renamed accordingly (basisCharge_evenShiftFst, basisLinSol_eq, etc.). Commit 5f7d373.

@jstoobysmith
Copy link
Copy Markdown
Member

@copilot fix the review comments above.

Copilot AI and others added 3 commits April 21, 2026 04:44
- 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>
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>
Copy link
Copy Markdown
Author

Copilot AI commented Apr 21, 2026

Given comments for the Even case, also all apply for the odd case.

All review comments have been applied to both Even and Odd cases in commit 5f7d373.

@copilot fix the review comments above.

All review comments addressed in commit 5f7d373. Key changes: renamed shiftPlane/symmPlane (Charges) to shiftPlaneAsCharges/symmPlaneAsCharges; shiftPlaneLinSols/symmPlaneLinSols to shiftPlane/symmPlane; basisabasis; Pa/Pa'basisCharge/basisLinSol; fixed section numbering; moved shiftBasis_linear_independent up; renamed BasisLinear.lean → Basis.lean; renamed swapShift_as_add to Mathlib-style names. All applied to both Even and Odd cases.

Copy link
Copy Markdown
Member

@jstoobysmith jstoobysmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again comments given for the Even case but should carry over to the Odd case aswell.


-/
/-- A point in the span of the whole basis. -/
def basisLinSol (f : (Fin n.succ) ⊕ (Fin n) → ℚ) : (PureU1 (2 * n.succ)).LinSols :=
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe spanBasis would be better here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed basisLinSolspanBasis (with associated lemmas spanBasis_symmPlane_shiftPlane, spanBasis_eq, spanBasis_elim_eq_iff) in both Even and Odd cases. Commit 7ee7905.


/-!

### A.2. The shifted even split: Spltting the charges up via `1 + (n + n + 1)`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These numberings should start at e.g. A.1.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — sections now start at A.1. in ShiftPlane.lean (A.2→A.1, A.3→A.2 for Even; A.2→A.1, A.3→A.2, A.4→A.3 for Odd). Applied to both Even and Odd. Commit 7ee7905.


/-!

## C. The vectors of the basis spanning the second plane, via the shifted even split
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename this section to B. don't use second plane here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to ## B. The shifted plane and renumbered all subsections C.xB.x in both Even and Odd ShiftPlane.lean. Commit 7ee7905.

· simp

set_option backward.isDefEq.respectTransparency false in
lemma shiftPlane_shiftPlane_symmBasisAsCharges_accCube (g : Fin n → ℚ) (j : Fin n.succ) :
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These results should likely go in the Basis.lean file

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved symmPlane_symmPlane_shiftBasisAsCharges_accCube and shiftPlane_shiftPlane_symmBasisAsCharges_accCube from ShiftPlane.lean to a new ## 3. Mixed cubic anomaly cancellation conditions involving both planes section in Basis.lean. Applied to both Even and Odd. Commit 7ee7905.

@@ -0,0 +1,497 @@
/-
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename the directory these results are in to Planes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed BasisLinear/Planes/ for both Even and Odd (files are now at Even/Planes/SymmPlane.lean, Even/Planes/ShiftPlane.lean, etc.). All imports updated. Commit 7ee7905.

@jstoobysmith
Copy link
Copy Markdown
Member

@copilot Address the review comments above.

Copilot AI and others added 2 commits April 21, 2026 09:44
…iers

- 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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Apr 21, 2026

Again comments given for the Even case but should carry over to the Odd case aswell.

All changes applied to both Even and Odd cases in commit 7ee7905.

@copilot Address the review comments above.

All review comments addressed in commit 7ee7905: basisLinSolspanBasis; section numbering fixed (A.1, A.2, ...); section "C. second plane" → "B. The shifted plane" with B.x subsections; mixed cubic ACC lemmas moved to Basis.lean; BasisLinear/ directory renamed to Planes/. All applied to both Even and Odd cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Naming in Anomaly Cancellation for QED

2 participants