Skip to content

Update lattice Dirac derivation to V3.1 - #1024

Merged
Vilin97 merged 2 commits into
LeanPool:mainfrom
gpartin:gpartin/update-lattice-dirac-v3-1
Nov 25, 2026
Merged

Vilin97 merged 2 commits into
LeanPool:mainfrom
gpartin:gpartin/update-lattice-dirac-v3-1

Conversation

@gpartin

@gpartin gpartin commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Summary

This updates the existing lattice-dirac-derivation LeanPool project from the accepted V2 source to the immutable V3.1 source commit:

https://github.com/gpartin/LeanDiracDerivation/tree/61a4798b8b3ebfcffd24065079dc4db9d7b43f75

The update adds one downstream mathematical module, V2/LorentzSpin.lean. Starting from the already-derived cubical Clifford root, it constructs oriented plane bivectors and proves:

  • the scoped, nonzero half-spin normalization and the corresponding operational rotation normalization;
  • spin commutators, the spin Casimir, and the explicit spectrum on both four-component sectors;
  • finite rotations with a sign change after a two-pi turn and return after a four-pi turn;
  • boost and Lorentz Lie-algebra commutators;
  • oriented gamma and free Dirac-symbol covariance;
  • Pauli--Lubanski covariance, orthogonality, and the rest-frame spin-one-half Casimir identity.

The new cumulative declaration is:

LeanDirac.V2.lorentz_spin_half_from_native_action

This update changes no native field, action term, stencil, update, vacuum, or continuum readout. Its scope remains the free linearized result; it does not claim a physical electron, exact finite-lattice Lorentz invariance, or a nonlinear localized particle state.

LeanPool integration

  • Added the exact LeanPool header and API docstrings.
  • Removed the upstream heartbeat override and diagnostic commands.
  • Adapted one local simplification rule to LeanPool's existing integer incidence-sign helper.
  • Updated the generated import facade and project card.
  • Preserved mixed provenance: human-directed and reviewed, with AI-assisted implementation and auditing.

Local validation

  • lake build LeanPool.LatticeDiracDerivation.Imports
  • lake exe runLinter LeanPool.LatticeDiracDerivation
  • lake exe lint-style LeanPool.LatticeDiracDerivation
  • python -m lean_pool.quality --repo .. --static-only
  • forbidden-token and clean-diff scans
  • axiom audit of both cumulative declarations: only propext, Classical.choice, and Quot.sound

LeanPool CI is requested to run the repository-wide build and quality verifier on Linux. The local filtered Windows checkout could not complete lake exe mk_all --module --check because Windows returned OS error 1920 while traversing the full checkout; the project import facade and project card were nevertheless checked by the passing static quality validator.

Source and announcement

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

No new blocking issue was found in the tag-only follow-up.RetriggerView in Greptile

[Medium impact] No new blocking issue was found in the tag-only follow-up.

Summary

Updates the project to V3.1 and adds LorentzSpin.lean, which collects spin normalization, finite rotations, Lorentz commutators, and Pauli–Lubanski identities.

  • Cubical transport operators now define spin generators and finite rotations.
  • Boosts and rotations now transform the full Dirac symbol with momentum.
  • Pauli–Lubanski results now connect momentum, spin, and boosts.

Reviews (2) · Last reviewed commit: "Fix generated project card line length" · Reviewed by Greptile

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved at 31bba0df214684c957caf8ea65b680d22599fedb, pending the required build.

  • The extension builds on the accepted C19 free-Dirac certificate. Within the stated common-scale family, the first cyclic bracket at nonzero scale and the operational transport normalization force a scale of one half. The certificate gives the two four-component intertwiners, the axis-0 spectrum, the 3/4 spin Casimir, and the 2π sign and 4π return for each coordinate-axis rotation. Its Lorentz and Pauli–Lubanski covariance statements are infinitesimal, and the Pauli–Lubanski square is evaluated in the rest frame. These are properties of the free representation derived from the cubical root. Cumulative theorem
  • The new module preserves the statements of the pinned V3.1 proof. The port changes imports, documentation, and local elaboration steps, and retains G. D. Partin’s copyright and the existing MIT attribution. The earlier action, stencil, vacuum, and readout files are untouched. Upstream V3.1 release
  • Tau Ceti already develops abstract spin lifts and Clifford covariance. The contribution here is connecting the spin generators and Pauli–Lubanski identities to this action-derived cubical model and its two explicit sectors. The two advisory findings about sharing the signed coordinate operator and reusing the earlier sigma identities are maintainability improvements. The duplicate operator agrees with the original signed coordinate list, and the case-split proofs establish the stated identities.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Proof profile (new / modified Lean files)

lake build wall time (changed modules): 55.39 s (= 0.92 min) — user 113.35 s, sys 4.73 s.

This build covers the added modules and their dependency cones on top of the measurement environment; modified files are measured without rebuilding the pool.

Statement changes

✅ No statements changed — all 0 tracked declarations across 3 modified files kept their type; only proofs / definition bodies changed.

Statements are compared textually against the merge base (comments and whitespace ignored; by proof terms embedded in a type are treated as proof-irrelevant), the same method as physlib's /check-golf. Anonymous instances and examples are not tracked.

Compile cost of modified files — base → head

Heartbeats: 0 → 0 (+0, +0.0%). Commands: 2 → 2.

Per-file wall sum: 9.4 s → 7.8 s (-17.5%). Wall clock is measured under parallel load and is noisy; heartbeats are deterministic and are the regression signal.

Files: 1 compared — 0 cheaper, 0 costlier, 1 within noise (threshold: |Δ heartbeats| ≥ 1,000 and ≥ 1%).

Both sides are elaborated against the merge-base build of the pool — sound when only proofs and definition bodies change; a file whose statements changed may fail there and is flagged ⚠. Heartbeats come from disjoint root command traces with trace.profiler.useHeartbeats and synchronous elaboration, converted to maxHeartbeats units. Failed measurements are not classified as cheaper or costlier. Δ lines counts added/deleted lines from this PR diff.

File Δ lines HB base HB head Δ HB Δ HB % Wall base (s) Wall head (s)
LeanPool/LatticeDiracDerivation.lean +4/-3 0 0 +0 +0.0% 9.42 7.77
Total +4/-3 0 0 +0 +0.0% 9.4 7.8

New files — absolute profile

Total heartbeats: — maxHeartbeats units across 0 valid files (1,475 added LOC).

Sum of lean --profile: 429023.9 ms (= 429.02 s) across 1 valid file. Import-excluded time: 427553.9 ms (= 427.55 s).

Count-heartbeats wall-clock total: 0.00 s. Repeated import cost inside lean --profile: 1470.0 ms (= 1.47 s).

Heartbeat values sum disjoint root command traces with trace.profiler.useHeartbeats and synchronous elaboration, converted from raw allocations to maxHeartbeats units by dividing by 1000. They include command elaboration and kernel checking, exclude imports, and include profiler overhead; they are not comparable to the deprecated linter's totals. Per-file wall clocks are measured under parallel load and are noisier than heartbeats.

LOC counts added lines in the profiled Lean files from this PR diff.

File LOC Heartbeats (maxHB) Count wall (s) lean --profile (s) Without import (s) Import (s) Commands Errors
LeanPool/LatticeDiracDerivation/Imports.lean 1 — — — — — 0 1
LeanPool/LatticeDiracDerivation/V2.lean 5 — — — — — 0 1
LeanPool/LatticeDiracDerivation/V2/LorentzSpin.lean 1,469 — — 429.02 427.55 1.47 118 1
Total 1,475 — 0.00 429.02 427.55 1.47 118 3

Aggregate phase totals

Phase Time
blocked (unaccounted) 263000.0 ms (= 263.00 s)
simp 104000.0 ms (= 104.00 s)
interpretation 27100.0 ms (= 27.10 s)
typeclass inference 11900.0 ms (= 11.90 s)
type checking 5880.0 ms (= 5.88 s)
norm_num 3390.0 ms (= 3.39 s)
tactic execution 3030.0 ms (= 3.03 s)
share common exprs 2600.0 ms (= 2.60 s)
elaboration 1780.0 ms (= 1.78 s)
ring 1500.0 ms (= 1.50 s)
import 1470.0 ms (= 1.47 s)
process pre-definitions 1350.0 ms (= 1.35 s)

Slowest changed modules (from lake build)

Changed module Lake time
LeanPool.LatticeDiracDerivation.V2.LorentzSpin 43.00 s
Per-file `lean --profile` output

LeanPool/LatticeDiracDerivation/V2/LorentzSpin.lean

import took 1.47s
simp took 110ms
simp took 111ms
simp took 105ms
type checking took 274ms
simp took 119ms
simp took 113ms
simp took 106ms
type checking took 285ms
simp took 157ms
simp took 179ms
simp took 148ms
simp took 169ms
simp took 148ms
simp took 100ms
simp took 196ms
simp took 143ms
simp took 100ms
simp took 157ms
simp took 118ms
simp took 124ms
simp took 122ms
simp took 118ms
type checking took 102ms
simp took 101ms
simp took 122ms
simp took 133ms
simp took 132ms
simp took 139ms
simp took 110ms
simp took 107ms
simp took 104ms
simp took 106ms
simp took 127ms
simp took 130ms
simp took 106ms
simp took 100ms
type checking took 227ms
simp took 162ms
simp took 158ms
simp took 155ms
simp took 154ms
simp took 166ms
simp took 164ms
simp took 162ms
simp took 166ms
type checking took 159ms
simp took 127ms
simp took 176ms
simp took 171ms
simp took 169ms
simp took 168ms
simp took 173ms
simp took 182ms
simp took 177ms
simp took 178ms
type checking took 158ms
simp took 176ms
simp took 179ms
simp took 172ms
simp took 181ms
simp took 164ms
simp took 168ms
simp took 169ms
simp took 184ms
type checking took 146ms
simp took 103ms
simp took 107ms
simp took 112ms
simp took 112ms
simp took 102ms
type checking took 198ms
simp took 473ms
simp took 387ms
simp took 418ms
simp took 385ms
simp took 294ms
simp took 265ms
simp took 153ms
simp took 170ms
simp took 110ms
simp took 118ms
simp took 198ms
simp took 171ms
simp took 184ms
simp took 147ms
simp took 182ms
simp took 204ms
simp took 142ms
simp took 158ms
simp took 157ms
simp took 153ms
simp took 103ms
simp took 114ms
simp took 125ms
simp took 165ms
type checking took 318ms
simp took 338ms
simp took 421ms
simp took 410ms
simp took 415ms
simp took 372ms
simp took 244ms
simp took 206ms
simp took 184ms
simp took 131ms
simp took 123ms
simp took 154ms
simp took 205ms
simp took 136ms
simp took 198ms
simp took 189ms
simp took 125ms
simp took 144ms
simp took 171ms
simp took 104ms
simp took 111ms
simp took 134ms
simp took 154ms
type checking took 221ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_NormNum_Core___elabRules_Mathlib_Tactic_normNum_1._boxed took 197ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_NormNum_Core___elabRules_Mathlib_Tactic_normNum_1._boxed took 164ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_NormNum_Core___elabRules_Mathlib_Tactic_normNum_1._boxed took 120ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_NormNum_Core___elabRules_Mathlib_Tactic_normNum_1._boxed took 121ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_NormNum_Core___elabRules_Mathlib_Tactic_normNum_1._boxed took 108ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_NormNum_Core___elabRules_Mathlib_Tactic_normNum_1._boxed took 139ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_NormNum_Core___elabRules_Mathlib_Tactic_normNum_1._boxed took 117ms
type checking took 145ms
simp took 1.77s
simp took 707ms
simp took 763ms
ring took 370ms
ring took 168ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 2.41s
ring took 105ms
ring took 109ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 943ms
ring took 113ms
ring took 111ms
interpretation of Mathlib.Tactic._aux_Mathlib_Tactic_Linarith_Frontend___elabRules_Mathlib_Tactic_nlinarith_1._boxed took 844ms
share common exprs took 282ms
elaboration took 167ms
type checking took 175ms
linting took 290ms
simp took 2.13s
simp took 1.24s
simp took 1.01s
simp took 1s
simp took 694ms
simp took 519ms
simp took 433ms
simp took 680ms
simp took 505ms
simp took 499ms
simp took 258ms
simp took 239ms
simp took 278ms
simp took 207ms
simp took 227ms
simp took 272ms
simp took 264ms
simp took 212ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 213ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 203ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 183ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 179ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 224ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 190ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 192ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 119ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 122ms
share common exprs took 123ms
type checking took 115ms
simp took 432ms
simp took 570ms
simp took 482ms
simp took 388ms
simp took 320ms
simp took 250ms
simp took 192ms
simp took 221ms
simp took 158ms
simp took 190ms
simp took 286ms
simp took 191ms
simp took 191ms
simp took 207ms
simp took 241ms
simp took 144ms
simp took 193ms
simp took 163ms
simp took 137ms
simp took 152ms
simp took 175ms
simp took 189ms
type checking took 239ms
simp took 528ms
simp took 519ms
simp took 407ms
simp took 403ms
simp took 168ms
simp took 312ms
simp took 261ms
simp took 248ms
simp took 147ms
simp took 146ms
simp took 178ms
simp took 167ms
simp took 186ms
simp took 153ms
simp took 166ms
simp took 162ms
simp took 145ms
share common exprs took 127ms
process pre-definitions took 101ms
type checking took 249ms
simp took 106ms
simp took 395ms
share common exprs took 125ms
type checking took 128ms
simp took 104ms
simp took 389ms
share common exprs took 112ms
type checking took 130ms
simp took 325ms
simp took 338ms
simp took 314ms
simp took 379ms
simp took 425ms
simp took 409ms
simp took 413ms
simp took 391ms
simp took 371ms
simp took 397ms
simp took 378ms
simp took 382ms
simp took 375ms
simp took 349ms
simp took 367ms
simp took 295ms
simp took 428ms
simp took 362ms
simp took 442ms
simp took 440ms
simp took 400ms
simp took 407ms
simp took 399ms
simp took 356ms
simp took 214ms
simp took 172ms
simp took 203ms
simp took 229ms
simp took 168ms
simp took 216ms
simp took 208ms
simp took 198ms
simp took 133ms
simp took 120ms
simp took 132ms
simp took 138ms
simp took 305ms
simp took 289ms
simp took 334ms
simp took 355ms
simp took 296ms
simp took 231ms
simp took 266ms
simp took 277ms
interpretation of Mathlib.Tactic.RingNF._aux_Mathlib_Tactic_Ring_RingNF___elabRules_Mathlib_Tactic_RingNF_ringNF_1._boxed took 103ms
simp took 275ms
simp took 237ms
simp took 255ms
simp took 250ms
simp took 108ms
simp took 122ms
simp took 107ms
simp took 123ms
simp took 131ms
simp took 119ms
simp took 120ms
simp took 134ms
simp took 154ms
simp took 119ms
simp took 120ms
simp took 129ms
simp took 149ms
type checking took 157ms
simp took 210ms
simp took 257ms
simp took 299ms
simp took 200ms
simp took 174ms
simp took 180ms
simp took 552ms
simp took 1.07s
simp took 638ms
simp took 435ms
simp took 272ms
simp took 325ms
type checking took 131ms
simp took 379ms
simp took 328ms
simp took 242ms
simp took 261ms
simp took 254ms
simp took 253ms
simp took 253ms
simp took 271ms
simp took 262ms
simp took 257ms
simp took 259ms
simp took 279ms
type checking took 221ms
simp took 446ms
simp took 297ms
simp took 235ms
simp took 237ms
simp took 168ms
simp took 184ms
simp took 163ms
simp took 186ms
simp took 175ms
simp took 174ms
simp took 180ms
simp took 180ms
simp took 174ms
simp took 164ms
simp took 174ms
simp took 183ms
simp took 263ms
simp took 247ms
simp took 262ms
simp took 257ms
simp took 194ms
simp took 151ms
simp took 131ms
simp took 136ms
simp took 123ms
simp took 123ms
simp took 122ms
simp took 134ms
simp took 134ms
simp took 127ms
simp took 133ms
simp took 142ms
simp took 182ms
simp took 186ms
simp took 181ms
simp took 200ms
share common exprs took 208ms
process pre-definitions took 107ms
elaboration took 101ms
type checking took 339ms
simp took 150ms
simp took 150ms
simp took 140ms
simp took 155ms
simp took 164ms
simp took 160ms
simp took 174ms
simp took 165ms
simp took 162ms
simp took 162ms
simp took 160ms
simp took 165ms
share common exprs took 165ms
type checking took 141ms
simp took 258ms
simp took 230ms
simp took 223ms
simp took 245ms
simp took 261ms
simp took 279ms
simp took 188ms
simp took 201ms
simp took 178ms
simp took 187ms
simp took 184ms
simp took 209ms
simp took 190ms
simp took 178ms
simp took 191ms
simp took 199ms
simp took 196ms
simp took 190ms
simp took 197ms
simp took 205ms
simp took 219ms
simp took 210ms
simp took 212ms
simp took 220ms
simp took 197ms
simp took 208ms
simp took 201ms
simp took 215ms
simp took 219ms
simp took 215ms
simp took 217ms
simp took 231ms
simp took 193ms
simp took 209ms
simp took 210ms
simp took 226ms
share common exprs took 270ms
process pre-definitions took 101ms
elaboration took 127ms
type checking took 352ms
simp took 345ms
simp took 308ms
simp took 317ms
simp took 328ms
simp took 213ms
simp took 227ms
simp took 207ms
simp took 125ms
simp took 174ms
simp took 125ms
simp took 131ms
simp took 109ms
simp took 275ms
simp took 282ms
simp took 301ms
simp took 248ms
cumulative profiling times:
	attribute application 1.52ms
	blocked (unaccounted) 263s
	compilation (IR) 1.86ms
	compilation (LCNF base) 21.6ms
	compilation (LCNF impure) 8.08ms
	compilation (LCNF mono) 15.6ms
	congr simp thm 229ms
	declTypeLinter 35.8ms
	elaboration 1.78s
	fix level params 130ms
	import 1.47s
	initialization 27.1ms
	instantiate metavars 1s
	interpretation 27.1s
	let-to-have transformation 1.26ms
	linting 450ms
	module linting 0.0168ms
	norm_num 3.39s
	parsing 63ms
	process pre-definitions 1.35s
	ring 1.5s
	share common exprs 2.6s
	simp 104s
	tactic execution 3.03s
	tacticAnalysis 39.1ms
	type checking 5.88s
	typeclass inference 11.9s
real 38.44
user 103.59
sys 1.56

Advisory only — never blocks merge. Full log uploaded as the proof-profile artifact.

@Vilin97 Vilin97 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved at c3c39b95f3ef4450a6a7b7d052546653285caa8c.

The follow-up removes two tags from the project metadata and its generated card to fit the line limit. The V3.1 source pin, Lean declarations and proofs, and public imports are unchanged. The earlier mathematics and provenance review still applies, and both required checks and the applicable validation passed at this head. Earlier review · Lean CI · Proof Profile

@Vilin97
Vilin97 added this pull request to the merge queue Nov 25, 2026
Merged via the queue into LeanPool:main with commit 67a8120 Nov 25, 2026
27 checks passed
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.

2 participants