each theorem twice: once for the compiler, once for the mind · house rule: no lemma without its intuition
All Lean below is quoted verbatim from MMCH.lean (533 lines) and compiles:
lake env lean MMCH.lean · exit 0 · zero sorries · axioms: propext, Classical.choice, Quot.sound · Mathlib d6f48e4, Lean v4.29.0-rc1
theorem hatbox_identity (θ : ℝ) :
Real.cos (θ / 2) ^ 2 = (1 + Real.cos θ) / 2 := by
have h : Real.cos θ = 2 * Real.cos (θ / 2) ^ 2 - 1 := by
have h2 := Real.cos_two_mul (θ / 2)
have hθ : 2 * (θ / 2) = θ := by ring
rw [hθ] at h2
exact h2
linarith
/-- The fixed-point set of the swap on S³ is the diagonal great circle
{(z,z) : ‖z‖² = 1/2} — a CIRCLE, not the Clifford torus. -/
theorem swap_fixedSet_eq_diagonal :
{p : ℂ × ℂ | p ∈ sphere3 ∧ swap p = p} =
{p : ℂ × ℂ | p.1 = p.2 ∧ ‖p.1‖ ^ 2 = 1 / 2} := by
ext ⟨z, w⟩
constructor
· rintro ⟨hs, hfix⟩
have hwz : w = z := congrArg Prod.fst hfix
have hs' : ‖z‖ ^ 2 + ‖w‖ ^ 2 = 1 := hs
rw [hwz] at hs'
refine ⟨hwz.symm, ?_⟩
show ‖z‖ ^ 2 = 1 / 2
linarith
· rintro ⟨heq, hn⟩
have heq' : z = w := heq
have hn' : ‖z‖ ^ 2 = 1 / 2 := hn
have hw' : ‖w‖ ^ 2 = 1 / 2 := by rw [← heq']; exact hn'
refine ⟨?_, ?_⟩
· show ‖z‖ ^ 2 + ‖w‖ ^ 2 = 1
linarith
· show swap (z, w) = (z, w)
simp only [swap]
rw [heq']
by the swap. Hence the torus is strictly larger than the fixed set. -/
theorem cliffordTorus_not_pointwise_fixed :
∃ p ∈ cliffordTorus, swap p ≠ p := by
refine ⟨(((1 / Real.sqrt 2 : ℝ) : ℂ), Complex.I * ((1 / Real.sqrt 2 : ℝ) : ℂ)),
⟨?_, ?_⟩, ?_⟩
· show ‖((1 / Real.sqrt 2 : ℝ) : ℂ)‖ = 1 / Real.sqrt 2
simp
· show ‖Complex.I * ((1 / Real.sqrt 2 : ℝ) : ℂ)‖ = 1 / Real.sqrt 2
simp
· intro hfix
have h1 : Complex.I * ((1 / Real.sqrt 2 : ℝ) : ℂ) = ((1 / Real.sqrt 2 : ℝ) : ℂ) :=
congrArg Prod.fst hfix
have hr : ((1 / Real.sqrt 2 : ℝ) : ℂ) ≠ 0 := by
OUT OF SCOPE (deliberately not attempted): the stochastic layer — the
Dynkin / first-passage argument identifying T with the expected hitting
time of {0,1} for the Wright–Fisher diffusion dp = √(g·p(1−p)) dW.
Mathlib (2026-07) has Itô integrals but no Dynkin formula, no
first-passage theory, and no 1-D diffusion boundary classification;
formalizing that layer is a research project, not an afternoon. The
probabilistic content stays [VERIFIED-NUM] (experiments/entropy_clock.py);
what is machine-checked here is exactly the analytic skeleton. -/
/-- The entropy clock: mean collapse time T(p) = -(2/g)·(p log p + (1−p) log(1−p)). -/ noncomputable def entropyClock (g p : ℝ) : ℝ := -(2 / g) * (p * Real.log p + (1 - p) * Real.log (1 - p))
/-- THE GENERATOR IDENTITY (C7/Result-1 analytic core):
(g/2)·p·(1−p)·T″(p) = −1 on (0,1). -/
theorem entropyClock_generator (g : ℝ) (hg : 0 < g) {p : ℝ} (h0 : 0 < p) (h1 : p < 1) :
g / 2 * (p * (1 - p)) * deriv (deriv (entropyClock g)) p = -1 := by
rw [entropyClock_deriv2 g hg h0 h1]
have hp1 : (0 : ℝ) < 1 - p := by linarith
field_simp
No claim that nature runs the dipole gate (that is an experiment: outcome statistics are provably gate-blind; timing is not). No stochastic formalization (Mathlib lacks Dynkin/first-passage; saying otherwise would be a lie the compiler cannot catch). No physics words inside the Lean — atoms live in the intuition blocks only, by house rule.