From d3778f74cb9c4b59b6b7b2995b2b40ce9f19a62b Mon Sep 17 00:00:00 2001 From: Eduardo Nava Hernandez Date: Wed, 16 Sep 2026 11:54:00 -0600 Subject: [PATCH 01/10] feat(PhyslibAlpha): Fisher-Rao metric and Cramer-Rao bound for algebraic states --- PhyslibAlpha.lean | 1 + .../InformationGeometry/FisherRao.lean | 216 ++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean diff --git a/PhyslibAlpha.lean b/PhyslibAlpha.lean index 6102e0c8d..15b69d5e4 100644 --- a/PhyslibAlpha.lean +++ b/PhyslibAlpha.lean @@ -229,4 +229,5 @@ public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.JordanStatistics public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.JordanPositivity public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.JordanCFC public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.JordanSpecial +public import PhyslibAlpha.AlgebraicFramework.InformationGeometry.FisherRao public import PhyslibAlpha.Relativity.General.Schwarzschild.IncompressibleSphere diff --git a/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean b/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean new file mode 100644 index 000000000..61fb7366c --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean @@ -0,0 +1,216 @@ +/- +Copyright (c) 2026 Eduardo Nava Hernandez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava Hernandez +-/ +import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Algebra.BigOperators.Finprod +import Mathlib.Algebra.Order.Field.Basic +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Topology.Algebra.InfiniteSum.Basic +import PhyslibAlpha.Basic + +/-! +# Fisher--Rao metric and Cramer--Rao bound (finite case) + +Defines the Fisher--Rao inner product on the open probability simplex +and the classical Cramer--Rao lower bound on estimator variance, +for finite sample spaces. All definitions reuse Mathlib primitives +(`Finset.sum`, `div`, `sq`). The Cramer--Rao proof is Cauchy--Schwarz +on the weighted inner product -- the same obstruction kernel as +Robertson--Schrödinger in algebraic uncertainty frameworks. + +## Main definitions + +* `PhyslibAlpha.OpenSimplex` — a point on the open probability simplex. +* `PhyslibAlpha.OpenSimplex.fisherRaoInner` — the Fisher--Rao inner product $g_p(u,v)$. +* `PhyslibAlpha.fisherInfo` — classical Fisher information $I(θ)$ for a parametric family. +* `PhyslibAlpha.cramerRao` — the Cramer--Rao lower bound $\mathrm{Var}(T) \ge 1/I(θ)$. + +## References + +* C. R. Rao, *Information and the accuracy attainable in the estimation + of statistical parameters*, Bull. Calcutta Math. Soc. 37, 81--91 (1945). +* H. Cramer, *Mathematical Methods of Statistics*, Princeton (1946). +-/ + +noncomputable section + +open Finset BigOperators + +variable {α : Type*} [Fintype α] + +namespace PhyslibAlpha + +/-! ## I. Open probability simplex -/ + +/-- A point on the open probability simplex: strictly positive weights summing to 1. -/ +structure OpenSimplex (α : Type*) [Fintype α] where + val : α → ℝ + pos : ∀ i, 0 < val i + sum_one : ∑ i : α, val i = 1 + +namespace OpenSimplex + +variable (p : OpenSimplex α) + +/-- Every coordinate is nonzero (convenience lemma). -/ +theorem val_ne_zero (i : α) : p.val i ≠ 0 := ne_of_gt (p.pos i) + +/-- Every coordinate is nonneg (convenience lemma). -/ +theorem val_nonneg (i : α) : 0 ≤ p.val i := le_of_lt (p.pos i) + +/-! ## II. Fisher--Rao inner product -/ + +/-- The Fisher--Rao inner product at $p \in \Delta^\circ(\alpha)$: + `g_p(u, v) = \sum_{i \in \alpha} \frac{u_i v_i}{p_i}` -/ +def fisherRaoInner (u v : α → ℝ) : ℝ := + ∑ i : α, u i * v i / p.val i + +/-- The Fisher--Rao quadratic form (squared norm). -/ +def fisherRaoSq (u : α → ℝ) : ℝ := p.fisherRaoInner u u + +/-- $g_p(u, u) \ge 0$ for all $u$. -/ +theorem fisherRaoSq_nonneg (u : α → ℝ) : 0 ≤ p.fisherRaoSq u := by + apply Finset.sum_nonneg + intro i _ + apply div_nonneg + · exact mul_self_nonneg (u i) + · exact p.val_nonneg i + +/-- $g_p(u, u) = 0 \iff u = 0$ (positive definiteness). -/ +theorem fisherRaoSq_eq_zero_iff (u : α → ℝ) : + p.fisherRaoSq u = 0 ↔ u = 0 := by + constructor + · intro h + have hnn : ∀ i ∈ Finset.univ, 0 ≤ u i * u i / p.val i := by + intro i _ + exact div_nonneg (mul_self_nonneg _) (p.val_nonneg i) + have hall := Finset.sum_eq_zero_iff_of_nonneg hnn |>.mp h + ext i + simp only [Pi.zero_apply] + have hi := hall i (Finset.mem_univ i) + rcases div_eq_zero_iff.mp hi with hmul | habs + · exact mul_self_eq_zero.mp hmul + · exact absurd habs (p.val_ne_zero i) + · intro h + simp [fisherRaoSq, fisherRaoInner, h] + +/-- Symmetry: $g_p(u, v) = g_p(v, u)$. -/ +theorem fisherRaoInner_comm (u v : α → ℝ) : + p.fisherRaoInner u v = p.fisherRaoInner v u := by + simp only [fisherRaoInner] + congr 1; ext i; ring + +/-- Expansion of the Fisher--Rao norm under linear combinations. -/ +theorem fisherRaoInner_sub_smul (u v : α → ℝ) (t : ℝ) : + p.fisherRaoSq (fun i => u i - t * v i) = + p.fisherRaoSq u - 2 * t * p.fisherRaoInner u v + + t ^ 2 * p.fisherRaoSq v := by + simp only [fisherRaoSq, fisherRaoInner] + rw [show (∑ i : α, (u i - t * v i) * (u i - t * v i) / p.val i) = + (∑ i : α, u i * u i / p.val i) - 2 * t * (∑ i : α, u i * v i / p.val i) + + t ^ 2 * (∑ i : α, v i * v i / p.val i) from by + rw [Finset.mul_sum, Finset.mul_sum] + simp only [← Finset.sum_add_distrib, ← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl; intro i _; ring] + +/-- Cauchy--Schwarz for the Fisher--Rao inner product: + $g_p(u, v)^2 \le g_p(u, u) \cdot g_p(v, v)$. -/ +theorem fisherRao_cauchy_schwarz (u v : α → ℝ) : + p.fisherRaoInner u v ^ 2 ≤ p.fisherRaoSq u * p.fisherRaoSq v := by + by_cases hv : p.fisherRaoSq v = 0 + · rw [p.fisherRaoSq_eq_zero_iff] at hv + simp [fisherRaoInner, fisherRaoSq, hv] + · have hvpos : 0 < p.fisherRaoSq v := + lt_of_le_of_ne (p.fisherRaoSq_nonneg v) (Ne.symm hv) + set t := p.fisherRaoInner u v / p.fisherRaoSq v with ht_def + have key := p.fisherRaoSq_nonneg (fun i => u i - t * v i) + rw [p.fisherRaoInner_sub_smul u v t] at key + have ht2 : t * p.fisherRaoInner u v = + p.fisherRaoInner u v ^ 2 / p.fisherRaoSq v := by + rw [ht_def]; field_simp + have ht3 : t ^ 2 * p.fisherRaoSq v = + p.fisherRaoInner u v ^ 2 / p.fisherRaoSq v := by + rw [ht_def]; field_simp + rw [show 2 * t * p.fisherRaoInner u v = + 2 * (p.fisherRaoInner u v ^ 2 / p.fisherRaoSq v) from by + linarith [ht2]] at key + rw [ht3] at key + have h1 : p.fisherRaoInner u v ^ 2 / p.fisherRaoSq v ≤ p.fisherRaoSq u := + by linarith + rwa [div_le_iff₀ hvpos] at h1 + +end OpenSimplex + +/-! ## III. Classical Fisher information -/ + +/-- Classical Fisher information for a 1-parameter discrete family + $\theta \mapsto p(\cdot|\theta)$, given as $I(\theta) = \sum_i \frac{(\partial p_i / \partial \theta)^2}{p_i(\theta)}$. + This equals the Fisher--Rao squared norm of the score tangent vector. -/ +def fisherInfo (p : α → ℝ) (dp : α → ℝ) : ℝ := + ∑ i : α, dp i ^ 2 / p i + +/-- Fisher information is nonneg. -/ +theorem fisherInfo_nonneg (p dp : α → ℝ) (hpos : ∀ i, 0 < p i) : + 0 ≤ fisherInfo p dp := by + apply Finset.sum_nonneg + intro i _ + exact div_nonneg (sq_nonneg _) (le_of_lt (hpos i)) + +/-- Fisher information equals the Fisher--Rao squared norm of the + derivative vector: $I(\theta) = \|dp/d\theta\|^2_{\mathrm{FR}}$. -/ +theorem fisherInfo_eq_fisherRaoSq (q : OpenSimplex α) (dp : α → ℝ) : + fisherInfo q.val dp = q.fisherRaoSq dp := by + simp only [fisherInfo, OpenSimplex.fisherRaoSq, OpenSimplex.fisherRaoInner] + congr 1; ext i; ring + +/-! ## IV. Cramer--Rao lower bound -/ + +/-- Weighted expectation $\mathbb{E}_p[f] = \sum_i f(i) p(i)$. -/ +def expect (p : α → ℝ) (f : α → ℝ) : ℝ := + ∑ i : α, f i * p i + +/-- Weighted variance $\mathrm{Var}_p(f) = \mathbb{E}_p[(f - \mathbb{E}_p[f])^2]$. -/ +def variance (p : α → ℝ) (f : α → ℝ) : ℝ := + expect p (fun i => (f i - expect p f) ^ 2) + +/-- **Cramer--Rao lower bound.** For a parametric family with + all $p_i > 0$ and an estimator $T$ satisfying the unbiasedness + derivative condition $\sum_i T(i) \cdot (\partial p_i / \partial \theta) = 1$, we have + + $\mathrm{Var}_p(T) \ge 1 / I(\theta)$ + + where $I(\theta) = \mathrm{fisherInfo}(p, dp)$. The proof is a single application + of Cauchy--Schwarz on the Fisher--Rao inner product to the pair + $(T - \mathbb{E}[T], dp/p)$. -/ +theorem cramerRao (p dp : α → ℝ) (T : α → ℝ) + (hpos : ∀ i, 0 < p i) + (hsum : ∑ i : α, p i = 1) + (hdsum : ∑ i : α, dp i = 0) + (hunbiased : ∑ i : α, T i * dp i = 1) + (hI : 0 < fisherInfo p dp) : + 1 / fisherInfo p dp ≤ variance p T := by + let q : OpenSimplex α := ⟨p, hpos, hsum⟩ + let a : α → ℝ := fun i => (T i - expect p T) * p i + have cs := q.fisherRao_cauchy_schwarz a dp + have hpne : ∀ i, p i ≠ 0 := fun i => ne_of_gt (hpos i) + have inner_eq : q.fisherRaoInner a dp = 1 := by + simp only [OpenSimplex.fisherRaoInner, a] + conv => lhs; arg 2; ext i; rw [show ((T i - expect p T) * p i) * dp i / p i = + (T i - expect p T) * dp i from by field_simp [hpne i]] + simp_rw [sub_mul] + rw [Finset.sum_sub_distrib, ← Finset.mul_sum, hdsum, mul_zero, sub_zero] + exact hunbiased + have sq_u_eq : q.fisherRaoSq a = variance p T := by + simp only [OpenSimplex.fisherRaoSq, OpenSimplex.fisherRaoInner, variance, expect, a] + apply Finset.sum_congr rfl; intro i _ + simp only [q]; field_simp [hpne i] + have sq_v_eq : q.fisherRaoSq dp = fisherInfo p dp := by + simp only [OpenSimplex.fisherRaoSq, OpenSimplex.fisherRaoInner, fisherInfo] + apply Finset.sum_congr rfl; intro i _; ring + rw [inner_eq, sq_u_eq, sq_v_eq] at cs + rw [one_pow] at cs + rwa [div_le_iff₀ hI] + +end PhyslibAlpha From 5f21d9867f8fbb06364d27d34fd701bcb28cc5bc Mon Sep 17 00:00:00 2001 From: Eduardo Nava Hernandez Date: Wed, 16 Sep 2026 12:05:40 -0600 Subject: [PATCH 02/10] style: wrap docstring line to satisfy 100-char linter rule --- .../AlgebraicFramework/InformationGeometry/FisherRao.lean | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean b/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean index 61fb7366c..18995e088 100644 --- a/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean +++ b/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean @@ -146,7 +146,8 @@ end OpenSimplex /-! ## III. Classical Fisher information -/ /-- Classical Fisher information for a 1-parameter discrete family - $\theta \mapsto p(\cdot|\theta)$, given as $I(\theta) = \sum_i \frac{(\partial p_i / \partial \theta)^2}{p_i(\theta)}$. + $\theta \mapsto p(\cdot|\theta)$, given as + $I(\theta) = \sum_i \frac{(\partial p_i / \partial \theta)^2}{p_i(\theta)}$. This equals the Fisher--Rao squared norm of the score tangent vector. -/ def fisherInfo (p : α → ℝ) (dp : α → ℝ) : ℝ := ∑ i : α, dp i ^ 2 / p i From 7db19c75101e0e2575017d0628aacf751a25e83c Mon Sep 17 00:00:00 2001 From: Eduardo Nava Hernandez Date: Wed, 16 Sep 2026 12:13:33 -0600 Subject: [PATCH 03/10] fix(PhyslibAlpha): add module header to FisherRao.lean for module system compliance --- .../InformationGeometry/FisherRao.lean | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean b/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean index 18995e088..396bad8d8 100644 --- a/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean +++ b/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean @@ -3,12 +3,14 @@ Copyright (c) 2026 Eduardo Nava Hernandez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava Hernandez -/ -import Mathlib.Analysis.InnerProductSpace.Basic -import Mathlib.Algebra.BigOperators.Finprod -import Mathlib.Algebra.Order.Field.Basic -import Mathlib.Algebra.BigOperators.Group.Finset.Basic -import Mathlib.Topology.Algebra.InfiniteSum.Basic -import PhyslibAlpha.Basic +module + +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Algebra.BigOperators.Finprod +public import Mathlib.Algebra.Order.Field.Basic +public import Mathlib.Algebra.BigOperators.Group.Finset.Basic +public import Mathlib.Topology.Algebra.InfiniteSum.Basic +public import PhyslibAlpha.Basic /-! # Fisher--Rao metric and Cramer--Rao bound (finite case) From f21aa8066adcac308289db646b980f997085b16c Mon Sep 17 00:00:00 2001 From: Eduardo Nava-Hernandez Date: Thu, 17 Sep 2026 07:42:37 -0600 Subject: [PATCH 04/10] feat(PhyslibAlpha): formalize the finite path spectral gap Co-authored-by: Claude Opus 4.8 --- .../HilbertSpace/PathSpectralGap.lean | 15 + .../PathSpectralGap/D0_Habitat.lean | 31 + .../PathSpectralGap/D1_CauchyGram.lean | 113 +++ .../PathSpectralGap/D2_Robertson.lean | 285 ++++++ .../PathSpectralGap/D3_GrafoCamino.lean | 212 +++++ .../PathSpectralGap/D4_PorQueNoDiagonal.lean | 253 ++++++ .../PathSpectralGap/D5_MaximaTension.lean | 480 +++++++++++ .../PathSpectralGap/D6_Fiedler.lean | 816 ++++++++++++++++++ .../PathSpectralGap/D7_Niven.lean | 92 ++ 9 files changed, 2297 insertions(+) create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D0_Habitat.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D1_CauchyGram.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D2_Robertson.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D3_GrafoCamino.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D4_PorQueNoDiagonal.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D5_MaximaTension.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D6_Fiedler.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D7_Niven.lean diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap.lean new file mode 100644 index 000000000..dba189f69 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap.lean @@ -0,0 +1,15 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D0_Habitat +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D1_CauchyGram +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D2_Robertson +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D3_GrafoCamino +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D4_PorQueNoDiagonal +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D5_MaximaTension +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D6_Fiedler +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D7_Niven diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D0_Habitat.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D0_Habitat.lean new file mode 100644 index 000000000..10f960a59 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D0_Habitat.lean @@ -0,0 +1,31 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import Mathlib.Analysis.InnerProductSpace.EuclideanDist + +@[expose] public section + +/-! +# D0 — Hábitat: el espacio de Hilbert finito `H_d` + +Todo el argumento vive en un único espacio de Hilbert complejo de dimensión +finita, `H_d = ℂ^d` con su producto interno estándar. No se sale nunca de +este espacio: en particular, `d = ∞` no es una dimensión realizada, sólo un +límite de la familia `{H_d}_{d∈ℕ}` (ver `D8_Szego.lean`). +-/ + +namespace TransportePosicion + +/-- El espacio de Hilbert finito de dimensión `d`: `ℂ^d` con su estructura +euclidiana estándar. -/ +abbrev Hd (d : ℕ) := EuclideanSpace ℂ (Fin d) + +/-- Identidad definicional: `H_d` es, literalmente, `EuclideanSpace ℂ (Fin d)`. -/ +theorem Hd_eq_euclidean (d : ℕ) : + Hd d = EuclideanSpace ℂ (Fin d) := rfl + +end TransportePosicion diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D1_CauchyGram.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D1_CauchyGram.lean new file mode 100644 index 000000000..abefffd95 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D1_CauchyGram.lean @@ -0,0 +1,113 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import Mathlib.Analysis.InnerProductSpace.Basic +public import Mathlib.Analysis.Complex.Norm + +@[expose] public section + +/-! +# D1 — Cauchy–Schwarz vía el defecto de Gram + +Núcleo puramente algebraico: para dos vectores `x, y` de un espacio de +Hilbert complejo, el determinante de la matriz de Gram hermitiana + +`gramDefectC x y = ‖x‖² ‖y‖² − |⟨x,y⟩|²` + +nunca es negativo. Esa es, palabra por palabra, la desigualdad de +Cauchy–Schwarz. Escribiendo `⟨x,y⟩` en sus partes real e imaginaria se +obtiene de inmediato la desigualdad de Robertson–Schrödinger (`D2_Robertson.lean`) +como consecuencia algebraica, no como postulado adicional. +-/ + +noncomputable section + +namespace ObstruccionGramUnificada + +universe u + +variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + +/-- Cuadrado de la dispersión representada por un vector centrado. -/ +def varianceC (x : H) : ℝ := ‖x‖ ^ 2 + +/-- Determinante de la matriz de Gram hermitiana de dos vectores. -/ +def gramDefectC (x y : H) : ℝ := + varianceC x * varianceC y - ‖@inner ℂ H _ x y‖ ^ 2 + +/-- La obstrucción universal: el determinante de Gram nunca es negativo. +Esto ES la desigualdad de Cauchy–Schwarz, reescrita como positividad de un +determinante 2×2. -/ +theorem gramDefectC_nonneg (x y : H) : 0 ≤ gramDefectC x y := by + have hxy : ‖@inner ℂ H _ x y‖ ≤ ‖x‖ * ‖y‖ := norm_inner_le_norm x y + have hleft : 0 ≤ ‖x‖ * ‖y‖ - ‖@inner ℂ H _ x y‖ := sub_nonneg.mpr hxy + have hright : 0 ≤ ‖x‖ * ‖y‖ + ‖@inner ℂ H _ x y‖ := + add_nonneg (mul_nonneg (norm_nonneg _) (norm_nonneg _)) (norm_nonneg _) + calc + 0 ≤ (‖x‖ * ‖y‖ - ‖@inner ℂ H _ x y‖) * + (‖x‖ * ‖y‖ + ‖@inner ℂ H _ x y‖) := mul_nonneg hleft hright + _ = gramDefectC x y := by simp [gramDefectC, varianceC, pow_two]; ring + +/-- Saturar Cauchy–Schwarz equivale a anular, no las dispersiones, sino el +determinante de Gram. -/ +theorem gramDefectC_eq_zero_iff (x y : H) : + gramDefectC x y = 0 ↔ ‖@inner ℂ H _ x y‖ = ‖x‖ * ‖y‖ := by + have hxy : ‖@inner ℂ H _ x y‖ ≤ ‖x‖ * ‖y‖ := norm_inner_le_norm x y + have hi : 0 ≤ ‖@inner ℂ H _ x y‖ := norm_nonneg _ + have hp : 0 ≤ ‖x‖ * ‖y‖ := mul_nonneg (norm_nonneg _) (norm_nonneg _) + constructor + · intro hzero + simp only [gramDefectC, varianceC, pow_two] at hzero + nlinarith + · intro heq + unfold gramDefectC varianceC + rw [heq] + ring + +/-- Parte simétrica del producto interno de las fluctuaciones. -/ +def covarianceC (x y : H) : ℝ := (@inner ℂ H _ x y).re + +/-- Coordenada antisimétrica real: para fluctuaciones operatoriales es la +coordenada real de la esperanza del conmutador. -/ +def commutatorCoordinateC (x y : H) : ℝ := 2 * (@inner ℂ H _ x y).im + +/-- Robertson–Schrödinger es exactamente la positividad de Gram escrita en +coordenadas real e imaginaria. -/ +theorem robertsonSchrodinger_from_gram (x y : H) : + covarianceC x y ^ 2 + (commutatorCoordinateC x y / 2) ^ 2 ≤ + varianceC x * varianceC y := by + have hgram := gramDefectC_nonneg x y + have hnorm : + ‖@inner ℂ H _ x y‖ ^ 2 = + (@inner ℂ H _ x y).re ^ 2 + (@inner ℂ H _ x y).im ^ 2 := by + rw [Complex.sq_norm, Complex.normSq_apply] + ring + have hbase : ‖@inner ℂ H _ x y‖ ^ 2 ≤ varianceC x * varianceC y := + sub_nonneg.mp hgram + rw [hnorm] at hbase + simpa [covarianceC, commutatorCoordinateC] using hbase + +/-- Saturación Robertson–Schrödinger abstracta. -/ +def RSSaturated (x y : H) : Prop := + covarianceC x y ^ 2 + (commutatorCoordinateC x y / 2) ^ 2 = + varianceC x * varianceC y + +/-- La saturación Robertson–Schrödinger es exactamente defecto de Gram cero. -/ +theorem robertsonSchrodinger_saturated_iff_gram_zero (x y : H) : + RSSaturated x y ↔ gramDefectC x y = 0 := by + have hnorm : + ‖@inner ℂ H _ x y‖ ^ 2 = + (@inner ℂ H _ x y).re ^ 2 + (@inner ℂ H _ x y).im ^ 2 := by + rw [Complex.sq_norm, Complex.normSq_apply] + ring + simp only [RSSaturated, covarianceC, commutatorCoordinateC, gramDefectC] + rw [show (2 * (@inner ℂ H _ x y).im / 2) ^ 2 = + (@inner ℂ H _ x y).im ^ 2 by ring] + rw [← hnorm] + constructor <;> intro h <;> nlinarith + +end ObstruccionGramUnificada diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D2_Robertson.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D2_Robertson.lean new file mode 100644 index 000000000..1ee32cbf8 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D2_Robertson.lean @@ -0,0 +1,285 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D1_CauchyGram +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.Real.Pi.Bounds +public import Mathlib.Data.Rat.Star +public import Mathlib.Tactic.IntervalCases + +@[expose] public section + +/-! +# D2 — La desigualdad de Robertson (1929) + +Formalización abstracta de la desigualdad de Robertson (1929) para un par de +observables conjugados evaluados en un estado normalizado de un espacio de +Hilbert. Se incluyen dos formas: la forma lineal clásica (`Evaluacion`, +con la cota `|⟨[A,B]⟩|/2 ≤ σ_A σ_B`) y la forma cuadrática de +Robertson–Schrödinger (`EvaluacionSchrodinger`, con covarianza). + +Punto central de este archivo: la hipótesis `cota_cuadratica` que +`EvaluacionSchrodinger` exige como dato **no se postula** — al final del +archivo (`ObstruccionGramUnificada.evaluacionSchrodingerDeGram`) se prueba +que todo par de vectores de un espacio de Hilbert produce automáticamente una +`EvaluacionSchrodinger` válida, con esa cota derivada directamente de +`D1_CauchyGram.gramDefectC_nonneg`. Cauchy–Schwarz ⇒ Gram ⇒ +Robertson–Schrödinger, como teorema, no como axioma adicional. + +También se incluyen aquí cinco lemas aritméticos elementales (`Blindaje`) +que se usan más adelante para acotar el coseno y para el teorema de Niven +(`D7_Niven.lean`). +-/ + +namespace Robertson1929 + +universe u + +/-- Evaluación exacta del teorema de Robertson (1929) tras evaluar dos +observables conjugados en un estado normalizado de un espacio de Hilbert. +`sigmaA`, `sigmaB` son las desviaciones y `mediaConmutador` es +`⟨ψ,[A,B]ψ⟩`. -/ +structure Evaluacion (H : Type u) [NormedAddCommGroup H] + [InnerProductSpace ℂ H] where + estado : H + normalizado : ‖estado‖ = 1 + sigmaA : ℝ + sigmaB : ℝ + mediaConmutador : ℂ + sigmaA_nonneg : 0 ≤ sigmaA + sigmaB_nonneg : 0 ≤ sigmaB + cota : ‖mediaConmutador‖ / 2 ≤ sigmaA * sigmaB + +/-- Saturación exacta de la cota de Robertson en la evaluación dada. -/ +def Saturada {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + (R : Evaluacion H) : Prop := + R.sigmaA * R.sigmaB = ‖R.mediaConmutador‖ / 2 + +/-- Evaluación en máxima tensión: el estado normalizado realiza la norma del +conmutador, por lo que el lado derecho de Robertson es el más exigente de la +familia de estados normalizados. -/ +structure MaximaTension (H : Type u) [NormedAddCommGroup H] + [InnerProductSpace ℂ H] extends Evaluacion H where + normaConmutador : ℝ + normaConmutador_nonneg : 0 ≤ normaConmutador + realiza_norma : + ‖toEvaluacion.mediaConmutador‖ = normaConmutador + +/-- En máxima tensión, Robertson entrega la cota evaluada en la norma del +conmutador. -/ +theorem MaximaTension.cota_por_norma + {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + (R : MaximaTension H) : + R.normaConmutador / 2 ≤ R.sigmaA * R.sigmaB := by + rw [← R.realiza_norma] + exact R.cota + +/-! ## Ancla Robertson–Schrödinger: forma cuadrática -/ + +/-- Evaluación cuadrática Robertson–Schrödinger: el producto de dispersiones +domina el piso cuadrático compuesto por covarianza y conmutador. -/ +structure EvaluacionSchrodinger where + sigmaA : ℝ + sigmaB : ℝ + covarianza : ℝ + conmutador : ℝ + sigmaA_nonneg : 0 ≤ sigmaA + sigmaB_nonneg : 0 ≤ sigmaB + cota_cuadratica : covarianza ^ 2 + conmutador ^ 2 ≤ sigmaA ^ 2 * sigmaB ^ 2 + +/-- Piso Robertson–Schrödinger: raíz cuadrada del término cuadrático. -/ +noncomputable def pisoSchrodinger (S : EvaluacionSchrodinger) : ℝ := + Real.sqrt (S.covarianza ^ 2 + S.conmutador ^ 2) + +/-- Saturación Robertson–Schrödinger exacta. -/ +def SaturadaSchrodinger (S : EvaluacionSchrodinger) : Prop := + S.sigmaA ^ 2 * S.sigmaB ^ 2 = S.covarianza ^ 2 + S.conmutador ^ 2 + +theorem saturadaSchrodinger_iff (S : EvaluacionSchrodinger) : + SaturadaSchrodinger S ↔ + S.sigmaA ^ 2 * S.sigmaB ^ 2 = + S.covarianza ^ 2 + S.conmutador ^ 2 := by + rfl + +/-- El piso Robertson–Schrödinger es positivo si y sólo si covarianza o +conmutador son no nulos. -/ +theorem pisoSchrodinger_pos_iff (S : EvaluacionSchrodinger) : + 0 < pisoSchrodinger S ↔ S.covarianza ≠ 0 ∨ S.conmutador ≠ 0 := by + rw [pisoSchrodinger, Real.sqrt_pos] + constructor + · intro h + by_contra hz + push Not at hz + simp [hz.1, hz.2] at h + · rintro (hcov | hcomm) + · nlinarith [sq_pos_of_ne_zero hcov, sq_nonneg S.conmutador] + · nlinarith [sq_nonneg S.covarianza, sq_pos_of_ne_zero hcomm] + +/-- La cota cuadrática Robertson–Schrödinger implica la cota lineal sobre el +producto de dispersiones no negativas. -/ +theorem pisoSchrodinger_le_producto (S : EvaluacionSchrodinger) : + pisoSchrodinger S ≤ S.sigmaA * S.sigmaB := by + have hsum : 0 ≤ S.covarianza ^ 2 + S.conmutador ^ 2 := by positivity + have hprod_nonneg : 0 ≤ S.sigmaA * S.sigmaB := + mul_nonneg S.sigmaA_nonneg S.sigmaB_nonneg + have hsqrt_sq : + pisoSchrodinger S ^ 2 = S.covarianza ^ 2 + S.conmutador ^ 2 := by + simpa [pisoSchrodinger] using Real.sq_sqrt hsum + have hprod_sq : + S.sigmaA ^ 2 * S.sigmaB ^ 2 = (S.sigmaA * S.sigmaB) ^ 2 := by + ring + have hcota := S.cota_cuadratica + rw [hprod_sq] at hcota + nlinarith + +/-- Forma limpia del ancla: Robertson–Schrödinger aporta una cota lineal y no +permite afirmar simultáneamente esa cota y su negación. -/ +theorem anclaSchrodinger_limpia (S : EvaluacionSchrodinger) : + pisoSchrodinger S ≤ S.sigmaA * S.sigmaB ∧ + ¬ (pisoSchrodinger S ≤ S.sigmaA * S.sigmaB ∧ + ¬ pisoSchrodinger S ≤ S.sigmaA * S.sigmaB) := by + refine ⟨pisoSchrodinger_le_producto S, ?_⟩ + intro h + exact h.2 h.1 + +end Robertson1929 + +/-! ## Cinco lemas aritméticos elementales (`Blindaje`) + +Usados más adelante por el teorema de Niven (`D7_Niven.lean`): R3 acota el +coseno para `d ≥ 5`; R5 es la observación aritmética de que una cota +estrictamente positiva impide que cualquiera de sus dos factores sea nulo. -/ + +open Real Finset + +namespace Blindaje + +/-- Identidad término a término, exacta en ℚ. -/ +theorem R1b_termino (k : ℕ) (hk : 1 ≤ k) : + (1 : ℚ) / k ^ 2 - 1 / (k * (k + 1)) = 1 / (k ^ 2 * (k + 1)) := by + have hk0 : (k : ℚ) ≠ 0 := Nat.cast_ne_zero.mpr (by omega) + have hk1 : (k : ℚ) + 1 ≠ 0 := by positivity + field_simp + ring + +/-- El telescopio cierra exacto: `Σ_{k=2..N} 1/(k(k+1)) = 1/2 − 1/(N+1)`. -/ +theorem R1a_telescopio (N : ℕ) (hN : 2 ≤ N) : + ∑ k ∈ Icc 2 N, (1 : ℚ) / (k * (k + 1)) = 1 / 2 - 1 / (N + 1) := by + induction N with + | zero => omega + | succ n ih => + rcases Nat.lt_or_ge n 2 with h | h + · interval_cases n + · omega + · simp + norm_num + · rw [Finset.sum_Icc_succ_top (by omega), ih h] + have hn1 : ((n : ℚ) + 1) ≠ 0 := by positivity + have hn2 : ((n : ℚ) + 1 + 1) ≠ 0 := by positivity + push_cast + field_simp + ring + +theorem R1d_modo_positivo (k : ℕ) (hk : 2 ≤ k) : + (0 : ℚ) < 1 / (k ^ 2 * (k + 1)) := by + have : (0 : ℚ) < k := by exact_mod_cast (by omega : 0 < k) + positivity + +/-- Si `(3+√5)/8 = 3/4` entonces `√5 = 3`, entonces `5 = 9`: absurdo. -/ +theorem R2_cinco_no_es_nueve : (3 + Real.sqrt 5) / 8 ≠ 3 / 4 := by + intro h + have h3 : Real.sqrt 5 = 3 := by linarith + have h5 : (5 : ℝ) = 9 := by + have := Real.sq_sqrt (by norm_num : (5:ℝ) ≥ 0) + rw [h3] at this + linarith [this] + norm_num at h5 + +/-- Techo del coseno: para `d ≥ 5`, `cos²(π/(d+1)) < (d−1)/4`. -/ +theorem R3_techo_coseno (d : ℕ) (hd : 5 ≤ d) : + Real.cos (π / (d + 1)) ^ 2 < (d - 1 : ℝ) / 4 := by + have hd1 : (0 : ℝ) < (d : ℝ) + 1 := by positivity + have hx_pos : 0 < π / ((d : ℝ) + 1) := by positivity + have hd5 : (5 : ℝ) ≤ d := by exact_mod_cast hd + have hcos_lt : Real.cos (π / (d + 1)) < 1 := by + have hy : π / ((d : ℝ) + 1) ≤ π := by + rw [div_le_iff₀ hd1] + nlinarith [Real.pi_pos] + have h := Real.cos_lt_cos_of_nonneg_of_le_pi le_rfl hy hx_pos + simpa using h + have hcos_nonneg : 0 ≤ Real.cos (π / ((d : ℝ) + 1)) := by + apply Real.cos_nonneg_of_mem_Icc + constructor + · nlinarith [Real.pi_pos] + · rw [div_le_iff₀ hd1] + nlinarith [Real.pi_pos] + have hcos_le : Real.cos (π / (d + 1)) ^ 2 < 1 := by + nlinarith [hcos_nonneg, hcos_lt] + have hfloor : (1 : ℝ) ≤ ((d : ℝ) - 1) / 4 := by + have : (5 : ℝ) ≤ d := by exact_mod_cast hd + linarith + linarith + +theorem R4a_siete_fracciones : + (3 : ℚ) / 2 < ∑ k ∈ Finset.range 7, (1 : ℚ) / (k + 1) ^ 2 := by + norm_num [Finset.sum_range_succ] + +theorem R4_pi_mayor_que_tres : (3 : ℝ) < π := Real.pi_gt_three + +/-- Obstrucción aritmética: si la cota `c` es estrictamente positiva y +`c ≤ α·β`, entonces ninguno de los dos factores puede anularse. -/ +theorem R5_obstruccion_aritmetica (var_A var_B cota_robertson : ℝ) + (h_robertson : cota_robertson ≤ var_A * var_B) + (h_cota_positiva : 0 < cota_robertson) : + var_A ≠ 0 ∧ var_B ≠ 0 := by + constructor + · intro hA + rw [hA, zero_mul] at h_robertson + linarith + · intro hB + rw [hB, mul_zero] at h_robertson + linarith + +end Blindaje + +/-! ## Cierre del puente: Cauchy–Schwarz ⇒ Robertson–Schrödinger -/ + +noncomputable section + +namespace ObstruccionGramUnificada + +/-- Puente con `Robertson1929`: cualquier par de vectores en un espacio de +Hilbert complejo produce una `EvaluacionSchrodinger` cuya cota cuadrática no +se postula como campo libre — se deriva del defecto de Gram no negativo +(`gramDefectC_nonneg`). La hipótesis `cota_cuadratica` que +`Robertson1929.EvaluacionSchrodinger` exige como dato queda aquí demostrada. -/ +def evaluacionSchrodingerDeGram {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] (x y : H) : + Robertson1929.EvaluacionSchrodinger where + sigmaA := ‖x‖ + sigmaB := ‖y‖ + covarianza := covarianceC x y + conmutador := commutatorCoordinateC x y / 2 + sigmaA_nonneg := norm_nonneg x + sigmaB_nonneg := norm_nonneg y + cota_cuadratica := by + have h := robertsonSchrodinger_from_gram x y + simpa [varianceC] using h + +/-- El piso Robertson–Schrödinger de la evaluación construida por Gram queda +dominado por el producto de normas: la misma conclusión de +`Robertson1929.pisoSchrodinger_le_producto`, instanciada sobre una evaluación +que ya no es un supuesto sino un teorema. -/ +theorem pisoSchrodinger_evaluacionSchrodingerDeGram_le + {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] (x y : H) : + Robertson1929.pisoSchrodinger (evaluacionSchrodingerDeGram x y) ≤ ‖x‖ * ‖y‖ := by + have h := Robertson1929.pisoSchrodinger_le_producto (evaluacionSchrodingerDeGram x y) + simpa [evaluacionSchrodingerDeGram] using h + +end ObstruccionGramUnificada + diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D3_GrafoCamino.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D3_GrafoCamino.lean new file mode 100644 index 000000000..c7c8d7e35 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D3_GrafoCamino.lean @@ -0,0 +1,212 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D0_Habitat +public import Mathlib.Combinatorics.SimpleGraph.Hasse + +@[expose] public section + +/-! +# D3 — Operadores de transporte y posición sobre el grafo camino + +El soporte discreto no introduce un grafo ad hoc: es literalmente +`SimpleGraph.pathGraph d` de Mathlib, el camino con `d` vértices +`0,1,…,d−1` y aristas sólo entre vecinos consecutivos. Sobre esa base se +definen dos matrices hermitianas: `T_d` (transporte, soportado en las +aristas del camino) y `P_d` (posición, diagonal, con coordenadas +centradas en `[-1,1]`). + +La segunda mitad del archivo (`CanalPreFuerza`) prueba, sin apelar a +ninguna elección de diseño, que el grafo camino es la **única** opción +compatible con dos condiciones puramente combinatorias: localidad +(ninguna arista salta vecinos) y completitud (no falta ningún paso +elemental). Cualquier grafo local en `Fin d` que no omita un paso mínimo +**es** `pathGraph d`; no hay otro candidato. +-/ + +namespace TransportePosicion + +open SimpleGraph + +/-- Grafo de fase del canal transporte–posición: el camino `pathGraph d` +de Mathlib. -/ +abbrev GrafoTP (d : ℕ) : SimpleGraph (Fin d) := + SimpleGraph.pathGraph d + +/-- Adyacencia elemental del camino: sólo hay desplazamiento mínimo de un +paso. -/ +theorem grafoTP_adj {d : ℕ} {i j : Fin d} : + (GrafoTP d).Adj i j ↔ i.val + 1 = j.val ∨ j.val + 1 = i.val := by + simpa [GrafoTP] using + (SimpleGraph.pathGraph_adj (n := d) (u := i) (v := j)) + +/-- Predicado decidible del desplazamiento mínimo en la línea discreta. -/ +def PasoMinimo {d : ℕ} (i j : Fin d) : Prop := + i.val + 1 = j.val ∨ j.val + 1 = i.val + +instance pasoMinimo_decidable {d : ℕ} (i j : Fin d) : + Decidable (PasoMinimo i j) := by + unfold PasoMinimo + infer_instance + +/-- El paso mínimo decidible es exactamente la adyacencia de `pathGraph`. -/ +theorem pasoMinimo_iff_adj {d : ℕ} {i j : Fin d} : + PasoMinimo i j ↔ (GrafoTP d).Adj i j := by + rw [grafoTP_adj] + rfl + +/-- El soporte discreto `T_d/P_d` es isomorfo a `pathGraph d` por definición +canónica. -/ +theorem grafoTP_es_pathGraph (d : ℕ) : + Nonempty (GrafoTP d ≃g SimpleGraph.pathGraph d) := by + change Nonempty (SimpleGraph.pathGraph d ≃g SimpleGraph.pathGraph d) + exact ⟨SimpleGraph.Iso.refl⟩ + +/-- Matriz de adyacencia compleja del canal de transporte. -/ +noncomputable def Ad (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := + fun i j => if PasoMinimo i j then 1 else 0 + +/-- Radio espectral usado para normalizar el transporte de la cadena +finita: `ρ_d = 2 cos(π/(d+1))`. -/ +noncomputable def rho (d : ℕ) : ℝ := + 2 * Real.cos (Real.pi / ((d : ℝ) + 1)) + +/-- Operador de transporte normalizado `T_d = A_d / ρ_d`. -/ +noncomputable def Td (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := + fun i j => Ad d i j / (rho d : ℂ) + +/-- Coordenada centrada de posición sobre la base discreta, en `[-1,1]`. -/ +noncomputable def posicionCoord (d : ℕ) (j : Fin d) : ℝ := + (2 * ((j.val : ℝ) + 1) - ((d : ℝ) + 1)) / ((d : ℝ) - 1) + +/-- Operador de posición diagonal `P_d`. -/ +noncomputable def Pd (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := + fun i j => if i = j then (posicionCoord d i : ℂ) else 0 + +theorem Ad_eq_one_iff {d : ℕ} {i j : Fin d} : + Ad d i j = 1 ↔ (GrafoTP d).Adj i j := by + unfold Ad + rw [← pasoMinimo_iff_adj] + by_cases h : PasoMinimo i j + · simp [h] + · simp [h] + +theorem Td_eq_zero_of_not_adj {d : ℕ} {i j : Fin d} + (h : ¬ (GrafoTP d).Adj i j) : + Td d i j = 0 := by + have hpaso : ¬ PasoMinimo i j := by + intro hp + exact h (pasoMinimo_iff_adj.mp hp) + simp [Td, Ad, hpaso] + +/-- `P_d` es diagonal en la base discreta. -/ +theorem Pd_eq_zero_offdiag {d : ℕ} {i j : Fin d} (hij : i ≠ j) : + Pd d i j = 0 := by + simp [Pd, hij] + +/-- En la diagonal, `P_d` devuelve la coordenada discreta centrada. -/ +theorem Pd_diag {d : ℕ} (i : Fin d) : + Pd d i i = (posicionCoord d i : ℂ) := by + simp [Pd] + +end TransportePosicion + +/-! +## Por qué `pathGraph d` y no otro grafo + +Un canal local (toda arista es un paso mínimo entre vecinos) y completo +(no falta ningún paso mínimo posible) sobre `Fin d` es, por extensionalidad +de la relación de adyacencia, exactamente `pathGraph d`. No hay una +"simplificación" que conserve ambas propiedades: quitar una arista rompe +la completitud. +-/ + +namespace CanalPreFuerza + +open SimpleGraph + +/-- Localidad estricta: toda arista del canal es un paso entre vecinos +consecutivos. No se permiten saltos ni atajos. -/ +def LocalidadOrdenada {d : ℕ} (G : SimpleGraph (Fin d)) : Prop := + ∀ {i j : Fin d}, G.Adj i j → TransportePosicion.PasoMinimo i j + +/-- Completitud: todo paso entre vecinos consecutivos debe estar presente. +Quitar uno rompe el movimiento local completo entre los extremos de la +celda. -/ +def PasosElementalesCompletos {d : ℕ} (G : SimpleGraph (Fin d)) : Prop := + ∀ {i j : Fin d}, TransportePosicion.PasoMinimo i j → G.Adj i j + +/-- Defecto por intentar simplificar más que `pathGraph d`: se omite al +menos un paso elemental consecutivo. -/ +def OmitePasoElemental {d : ℕ} (G : SimpleGraph (Fin d)) : Prop := + ∃ i j : Fin d, TransportePosicion.PasoMinimo i j ∧ ¬ G.Adj i j + +/-- Canal ordenado, local y completo en la celda discreta. -/ +structure CanalLocalNoRamificadoOrdenado (d : ℕ) where + grafo : SimpleGraph (Fin d) + localidad_ordenada : LocalidadOrdenada grafo + pasos_elementales : PasosElementalesCompletos grafo + +/-- En un canal local ordenado completo, la adyacencia es exactamente el +paso mínimo de la celda. -/ +theorem CanalLocalNoRamificadoOrdenado.adj_iff_paso + {d : ℕ} (C : CanalLocalNoRamificadoOrdenado d) {i j : Fin d} : + C.grafo.Adj i j ↔ TransportePosicion.PasoMinimo i j := by + exact ⟨fun h => C.localidad_ordenada h, + fun h => C.pasos_elementales h⟩ + +/-- Teorema de minimalidad: localidad ordenada y pasos elementales +completos fuerzan que el soporte sea exactamente `pathGraph d`. -/ +theorem canal_local_no_ramificado_es_pathGraph + {d : ℕ} (C : CanalLocalNoRamificadoOrdenado d) : + C.grafo = SimpleGraph.pathGraph d := by + ext i j + rw [C.adj_iff_paso] + simpa [TransportePosicion.GrafoTP] using + (TransportePosicion.pasoMinimo_iff_adj (d := d) (i := i) (j := j)) + +/-- Versión isomórfica del mismo cierre. -/ +theorem canal_local_no_ramificado_iso_pathGraph + {d : ℕ} (C : CanalLocalNoRamificadoOrdenado d) : + Nonempty (C.grafo ≃g SimpleGraph.pathGraph d) := by + rw [canal_local_no_ramificado_es_pathGraph C] + exact ⟨SimpleGraph.Iso.refl⟩ + +/-- El canal canónico `T_d/P_d` satisface directamente el certificado local +ordenado: no tiene saltos y no omite pasos elementales. -/ +def canal_TP_local_no_ramificado (d : ℕ) : + CanalLocalNoRamificadoOrdenado d where + grafo := TransportePosicion.GrafoTP d + localidad_ordenada := by + intro i j h + exact (TransportePosicion.pasoMinimo_iff_adj + (d := d) (i := i) (j := j)).mpr h + pasos_elementales := by + intro i j h + exact (TransportePosicion.pasoMinimo_iff_adj + (d := d) (i := i) (j := j)).mp h + +/-- Ningún canal que ya satisface el certificado local ordenado puede omitir +un paso elemental: "no hay una simplificación local más simple que +`pathGraph d`". -/ +theorem no_hay_canal_local_mas_simple_que_Pd + {d : ℕ} (C : CanalLocalNoRamificadoOrdenado d) : + ¬ OmitePasoElemental C.grafo := by + rintro ⟨i, j, hpaso, hno⟩ + exact hno (C.pasos_elementales hpaso) + +/-- Cierre: el soporte canónico `T_d/P_d` es `pathGraph d`, y cualquier +intento local de hacerlo "más simple" pierde un paso elemental. -/ +theorem cierre_minimalidad_local_TP (d : ℕ) : + (canal_TP_local_no_ramificado d).grafo = SimpleGraph.pathGraph d ∧ + ¬ OmitePasoElemental (canal_TP_local_no_ramificado d).grafo := by + exact ⟨canal_local_no_ramificado_es_pathGraph + (canal_TP_local_no_ramificado d), + no_hay_canal_local_mas_simple_que_Pd + (canal_TP_local_no_ramificado d)⟩ + +end CanalPreFuerza diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D4_PorQueNoDiagonal.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D4_PorQueNoDiagonal.lean new file mode 100644 index 000000000..2db08a9d8 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D4_PorQueNoDiagonal.lean @@ -0,0 +1,253 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D3_GrafoCamino + +@[expose] public section + +/-! +# D4 — Por qué no un paso diagonal + +`D3_GrafoCamino.lean` fija el soporte de `T_d` en los pasos mínimos +(vecino a vecino) del camino `pathGraph d`. Este archivo cierra, con dos +argumentos independientes, la pregunta de por qué nunca se considera un +paso "diagonal" (cambiar más de una coordenada a la vez) como alternativa: + +1. **Si hubiera ≥ 2 ejes genuinos** (el modelo se generalizara a una malla + cúbica `Fin dx × Fin dy × Fin dz`), Pitágoras decide: el paso ortogonal + (un solo eje) tiene distancia euclidiana exactamente `1`; el paso + diagonal doble, exactamente `√2`; el triple, exactamente `√3`. Como + `1 < √2` y `1 < √3`, el paso ortogonal es siempre estrictamente más + corto. No es una preferencia de diseño: es la adyacencia mínima que + Pitágoras obliga. +2. **En el caso efectivamente usado por `T_d/P_d`** (un solo eje, `dy = dz = 1`), + la pregunta ni siquiera se plantea: con un único eje genuino la propia + relación "paso diagonal" es la relación **vacía** — no existe ningún par + de sitios que la satisfaga, porque un eje trivial (`Fin 1`) no tiene + ningún paso mínimo posible. La diagonal presupone, para poder + enunciarse de forma no vacía, dos ejes ya distinguidos entre sí. +-/ + +noncomputable section + +namespace PathGraph3D + +/-- Sitio de una malla cúbica: producto de tres mallas 1D. -/ +abbrev Sitio3D (dx dy dz : ℕ) := Fin dx × Fin dy × Fin dz + +/-- Adyacencia ortogonal del cubo: cambia una sola coordenada a la vez, por +un paso mínimo en ese eje. -/ +def Adj3D {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : Prop := + (TransportePosicion.PasoMinimo p.1 q.1 ∧ p.2 = q.2) ∨ + (p.1 = q.1 ∧ TransportePosicion.PasoMinimo p.2.1 q.2.1 ∧ p.2.2 = q.2.2) ∨ + (p.1 = q.1 ∧ p.2.1 = q.2.1 ∧ TransportePosicion.PasoMinimo p.2.2 q.2.2) + +end PathGraph3D + +/-! ## 1. Pitágoras: el paso ortogonal es siempre estrictamente más corto -/ + +namespace OrtogonalidadMinimalPitagoras + +open PathGraph3D +open TransportePosicion + +/-- Distancia euclidiana entre dos sitios del cubo, viendo cada coordenada +`Fin` como un real vía el casteo natural. -/ +noncomputable def dist3D {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : ℝ := + Real.sqrt ( + ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2) + +/-- Dos coordenadas a un `PasoMinimo` difieren, como reales, en exactamente +`±1`; su diferencia al cuadrado es `1`. -/ +theorem pasoMinimo_sq_diff_eq_one {d : ℕ} {i j : Fin d} (h : PasoMinimo i j) : + ((i.val : ℝ) - (j.val : ℝ)) ^ 2 = 1 := by + rcases h with h | h + · have hij : (j.val : ℝ) = (i.val : ℝ) + 1 := by exact_mod_cast h.symm + rw [hij]; ring + · have hji : (i.val : ℝ) = (j.val : ℝ) + 1 := by exact_mod_cast h.symm + rw [hji]; ring + +theorem eq_sq_diff_eq_zero {d : ℕ} {i j : Fin d} (h : i = j) : + ((i.val : ℝ) - (j.val : ℝ)) ^ 2 = 0 := by + rw [h]; ring + +/-! ### Paso ortogonal: distancia exactamente `1` -/ + +theorem dist3D_eq_one_of_Adj3D + {dx dy dz : ℕ} {p q : Sitio3D dx dy dz} (h : Adj3D p q) : + dist3D p q = 1 := by + unfold dist3D + rcases h with ⟨hx, hyz⟩ | ⟨hx, hy, hz⟩ | ⟨hx, hy, hz⟩ + · have hy0 : ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 = 0 := + eq_sq_diff_eq_zero (congrArg Prod.fst hyz) + have hz0 : ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 0 := + eq_sq_diff_eq_zero (congrArg Prod.snd hyz) + have hsum : + ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 1 := by + rw [pasoMinimo_sq_diff_eq_one hx, hy0, hz0]; ring + rw [hsum, Real.sqrt_one] + · have hx0 : ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 = 0 := eq_sq_diff_eq_zero hx + have hz0 : ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 0 := eq_sq_diff_eq_zero hz + have hsum : + ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 1 := by + rw [hx0, pasoMinimo_sq_diff_eq_one hy, hz0]; ring + rw [hsum, Real.sqrt_one] + · have hx0 : ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 = 0 := eq_sq_diff_eq_zero hx + have hy0 : ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 = 0 := eq_sq_diff_eq_zero hy + have hsum : + ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 1 := by + rw [hx0, hy0, pasoMinimo_sq_diff_eq_one hz]; ring + rw [hsum, Real.sqrt_one] + +/-! ### Paso diagonal doble: distancia exactamente `√2` -/ + +/-- Vecino diagonal en dos ejes: dos coordenadas cambian por `PasoMinimo` +simultáneamente, la tercera queda fija. `Adj3D` nunca produce este caso. -/ +def PasoDiagonalDoble {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : Prop := + (PasoMinimo p.1 q.1 ∧ PasoMinimo p.2.1 q.2.1 ∧ p.2.2 = q.2.2) ∨ + (PasoMinimo p.1 q.1 ∧ p.2.1 = q.2.1 ∧ PasoMinimo p.2.2 q.2.2) ∨ + (p.1 = q.1 ∧ PasoMinimo p.2.1 q.2.1 ∧ PasoMinimo p.2.2 q.2.2) + +theorem dist3D_eq_sqrt_two_of_PasoDiagonalDoble + {dx dy dz : ℕ} {p q : Sitio3D dx dy dz} (h : PasoDiagonalDoble p q) : + dist3D p q = Real.sqrt 2 := by + unfold dist3D + rcases h with ⟨hx, hy, hz⟩ | ⟨hx, hy, hz⟩ | ⟨hx, hy, hz⟩ + · have hz0 : ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 0 := eq_sq_diff_eq_zero hz + have hsum : + ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 2 := by + rw [pasoMinimo_sq_diff_eq_one hx, pasoMinimo_sq_diff_eq_one hy, hz0]; ring + rw [hsum] + · have hy0 : ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 = 0 := eq_sq_diff_eq_zero hy + have hsum : + ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 2 := by + rw [pasoMinimo_sq_diff_eq_one hx, hy0, pasoMinimo_sq_diff_eq_one hz]; ring + rw [hsum] + · have hx0 : ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 = 0 := eq_sq_diff_eq_zero hx + have hsum : + ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 2 := by + rw [hx0, pasoMinimo_sq_diff_eq_one hy, pasoMinimo_sq_diff_eq_one hz]; ring + rw [hsum] + +/-! ### Paso diagonal triple: distancia exactamente `√3` -/ + +/-- Vecino diagonal en los tres ejes (la esquina del cubo unitario). -/ +def PasoDiagonalTriple {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : Prop := + PasoMinimo p.1 q.1 ∧ PasoMinimo p.2.1 q.2.1 ∧ PasoMinimo p.2.2 q.2.2 + +theorem dist3D_eq_sqrt_three_of_PasoDiagonalTriple + {dx dy dz : ℕ} {p q : Sitio3D dx dy dz} (h : PasoDiagonalTriple p q) : + dist3D p q = Real.sqrt 3 := by + obtain ⟨hx, hy, hz⟩ := h + unfold dist3D + have hsum : + ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2 = 3 := by + rw [pasoMinimo_sq_diff_eq_one hx, pasoMinimo_sq_diff_eq_one hy, + pasoMinimo_sq_diff_eq_one hz]; ring + rw [hsum] + +/-! ### Cierre Pitágoras: el ortogonal gana siempre -/ + +theorem uno_lt_sqrt_two : (1 : ℝ) < Real.sqrt 2 := by + have h2 : Real.sqrt 2 ^ 2 = 2 := Real.sq_sqrt (by norm_num) + nlinarith [Real.sqrt_nonneg (2 : ℝ), h2] + +theorem uno_lt_sqrt_three : (1 : ℝ) < Real.sqrt 3 := by + have h3 : Real.sqrt 3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + nlinarith [Real.sqrt_nonneg (3 : ℝ), h3] + +/-- El paso ortogonal (el único que admite `Adj3D`) es estrictamente más +corto que cualquier paso diagonal doble. -/ +theorem ortogonal_mas_corto_que_diagonal_doble + {dx dy dz : ℕ} {p q p' q' : Sitio3D dx dy dz} + (hOrt : Adj3D p q) (hDiag : PasoDiagonalDoble p' q') : + dist3D p q < dist3D p' q' := by + rw [dist3D_eq_one_of_Adj3D hOrt, dist3D_eq_sqrt_two_of_PasoDiagonalDoble hDiag] + exact uno_lt_sqrt_two + +/-- El paso ortogonal es estrictamente más corto que cualquier paso +diagonal triple (la esquina del cubo). -/ +theorem ortogonal_mas_corto_que_diagonal_triple + {dx dy dz : ℕ} {p q p' q' : Sitio3D dx dy dz} + (hOrt : Adj3D p q) (hDiag : PasoDiagonalTriple p' q') : + dist3D p q < dist3D p' q' := by + rw [dist3D_eq_one_of_Adj3D hOrt, dist3D_eq_sqrt_three_of_PasoDiagonalTriple hDiag] + exact uno_lt_sqrt_three + +/-- CIERRE. Ninguna diagonal (doble o triple) puede empatar o vencer en +distancia al paso ortogonal: la adyacencia mínima del cubo (`Adj3D`) es la +única compatible con minimalidad de distancia euclidiana. No es una +elección arbitraria: es la que Pitágoras obliga. -/ +theorem adyacencia_minima_es_ortogonal + {dx dy dz : ℕ} {p q p' q' : Sitio3D dx dy dz} + (hOrt : Adj3D p q) + (hDiag : PasoDiagonalDoble p' q' ∨ PasoDiagonalTriple p' q') : + dist3D p q < dist3D p' q' := by + rcases hDiag with hD | hD + · exact ortogonal_mas_corto_que_diagonal_doble hOrt hD + · exact ortogonal_mas_corto_que_diagonal_triple hOrt hD + +end OrtogonalidadMinimalPitagoras + +/-! ## 2. Con un solo eje, la diagonal es la relación vacía -/ + +namespace DiagonalPresuponeDosPd + +open PathGraph3D +open OrtogonalidadMinimalPitagoras + +/-- En un eje trivial (`Fin 1`, un único punto) no hay ningún paso mínimo: +`PasoMinimo` es la relación vacía. -/ +theorem pasoMinimo_vacio_en_eje_trivial (i j : Fin 1) : + ¬ TransportePosicion.PasoMinimo i j := by + unfold TransportePosicion.PasoMinimo + have hi := i.isLt + have hj := j.isLt + omega + +/-- Con un solo eje genuino (`dy = dz = 1`), `PasoDiagonalDoble` es la +relación vacía: no hay ningún par de sitios que la satisfaga. -/ +theorem diagonalDoble_vacia_con_un_solo_eje + {dx : ℕ} (p q : Sitio3D dx 1 1) : ¬ PasoDiagonalDoble p q := by + unfold PasoDiagonalDoble + rintro (⟨_, hy, _⟩ | ⟨_, _, hz⟩ | ⟨_, hy, _⟩) + · exact pasoMinimo_vacio_en_eje_trivial p.2.1 q.2.1 hy + · exact pasoMinimo_vacio_en_eje_trivial p.2.2 q.2.2 hz + · exact pasoMinimo_vacio_en_eje_trivial p.2.1 q.2.1 hy + +/-- Con un solo eje genuino, `PasoDiagonalTriple` (la esquina del cubo) +tampoco existe: también es la relación vacía. -/ +theorem diagonalTriple_vacia_con_un_solo_eje + {dx : ℕ} (p q : Sitio3D dx 1 1) : ¬ PasoDiagonalTriple p q := by + unfold PasoDiagonalTriple + rintro ⟨_, hy, _⟩ + exact pasoMinimo_vacio_en_eje_trivial p.2.1 q.2.1 hy + +/-- CIERRE. Con un solo eje, ninguna diagonal —doble ni triple— existe. La +diagonal es, en sentido literal de teoría de conjuntos, posterior a la +existencia de dos ejes distinguidos entre sí: no anterior, no simultánea, +no elemental. El modelo `T_d/P_d` (un único eje) nunca necesita excluirla +por decreto: no hay nada que excluir. -/ +theorem diagonal_no_existe_con_un_solo_eje + {dx : ℕ} (p q : Sitio3D dx 1 1) : + ¬ (PasoDiagonalDoble p q ∨ PasoDiagonalTriple p q) := by + rintro (h | h) + · exact diagonalDoble_vacia_con_un_solo_eje p q h + · exact diagonalTriple_vacia_con_un_solo_eje p q h + +end DiagonalPresuponeDosPd + +end diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D5_MaximaTension.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D5_MaximaTension.lean new file mode 100644 index 000000000..74b4eedaf --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D5_MaximaTension.lean @@ -0,0 +1,480 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D3_GrafoCamino +public import Mathlib.Analysis.CStarAlgebra.Module.Constructions +public import Mathlib.Analysis.InnerProductSpace.Spectrum +public import Mathlib.Analysis.Matrix.Hermitian +public import Mathlib.RingTheory.Flat.TorsionFree +public import Mathlib.RingTheory.PicardGroup +public import Mathlib.RingTheory.SimpleRing.Principal + +@[expose] public section + +/-! +# D5 — Estado de máxima tensión y observable `i[T_d,P_d]` + +En dimensión finita, `i[T,P]` es simétrico (hermitiano) siempre que `T` y +`P` lo son; por el teorema espectral finito, posee una base ortonormal de +autovectores. Este archivo elige el autovector cuyo autovalor tiene módulo +máximo y demuestra la envolvente sobre todos los estados normalizados: ese +estado realiza, entre todos los estados unitarios del mismo canal, la mayor +tensión posible del conmutador. También se exhibe, en coordenadas +explícitas (fase seno), el mismo estado extremal para el par concreto +`(T_d,P_d)` del camino discreto: es el "modo de Fiedler" de la cadena. + +Se cierra con un certificado concreto de no conmutatividad: +`[T_d,P_d] ≠ 0` para `d ≥ 2`, exhibido en una única entrada de matriz. +-/ + +noncomputable section + +namespace ConstructorEspectralTP + +universe u + +variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [FiniteDimensional ℂ H] [Nontrivial H] + +/-- En dimensión positiva existe un índice cuyo autovalor tiene módulo +máximo. -/ +theorem existe_indice_extremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : + ∃ i : Fin (Module.finrank ℂ H), + ∀ j : Fin (Module.finrank ℂ H), + |hK.eigenvalues rfl j| ≤ |hK.eigenvalues rfl i| := by + have hne : (Finset.univ : Finset (Fin (Module.finrank ℂ H))).Nonempty := by + exact ⟨⟨0, Module.finrank_pos⟩, Finset.mem_univ _⟩ + obtain ⟨i, _, hi⟩ := + Finset.exists_max_image + (Finset.univ : Finset (Fin (Module.finrank ℂ H))) + (fun j => |hK.eigenvalues rfl j|) hne + exact ⟨i, fun j => hi j (Finset.mem_univ j)⟩ + +def indiceExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : + Fin (Module.finrank ℂ H) := + (existe_indice_extremal K hK).choose + +def autovalorExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : ℝ := + hK.eigenvalues rfl (indiceExtremal K hK) + +/-- Radio espectral realizado por el estado elegido. -/ +def radioEspectral (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : ℝ := + |autovalorExtremal K hK| + +/-- Estado unitario de máxima tensión. -/ +def estadoExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : H := + hK.eigenvectorBasis rfl (indiceExtremal K hK) + +theorem modulo_autovalor_le_radio + (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) + (j : Fin (Module.finrank ℂ H)) : + |hK.eigenvalues rfl j| ≤ radioEspectral K hK := by + exact (existe_indice_extremal K hK).choose_spec j + +theorem radioEspectral_nonneg (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : + 0 ≤ radioEspectral K hK := + abs_nonneg _ + +theorem estadoExtremal_normalizado (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : + ‖estadoExtremal K hK‖ = 1 := by + exact (hK.eigenvectorBasis rfl).orthonormal.norm_eq_one (indiceExtremal K hK) + +theorem aplica_estadoExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : + K (estadoExtremal K hK) = + (autovalorExtremal K hK : ℂ) • estadoExtremal K hK := by + exact hK.apply_eigenvectorBasis rfl (indiceExtremal K hK) + +/-- La acción de un operador simétrico queda acotada por el radio espectral +elegido. -/ +theorem norma_aplicacion_le_radio_mul_norma + (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) (v : H) : + ‖K v‖ ≤ radioEspectral K hK * ‖v‖ := by + let hn : Module.finrank ℂ H = Module.finrank ℂ H := rfl + have hKv_sq : + ‖K v‖ ^ 2 = + ∑ i : Fin (Module.finrank ℂ H), + ‖(hK.eigenvalues hn i : ℂ) * + ((hK.eigenvectorBasis hn).repr v i)‖ ^ 2 := by + calc + ‖K v‖ ^ 2 = ‖(hK.eigenvectorBasis hn).repr (K v)‖ ^ 2 := by + rw [(hK.eigenvectorBasis hn).repr.norm_map] + _ = ∑ i : Fin (Module.finrank ℂ H), + ‖(hK.eigenvectorBasis hn).repr (K v) i‖ ^ 2 := + EuclideanSpace.norm_sq_eq _ + _ = ∑ i : Fin (Module.finrank ℂ H), + ‖(hK.eigenvalues hn i : ℂ) * + ((hK.eigenvectorBasis hn).repr v i)‖ ^ 2 := by + apply Finset.sum_congr rfl + intro i _ + exact congrArg (fun z : ℂ => ‖z‖ ^ 2) + (hK.eigenvectorBasis_apply_self_apply hn v i) + have hsum_le : + (∑ i : Fin (Module.finrank ℂ H), + ‖(hK.eigenvalues hn i : ℂ) * + ((hK.eigenvectorBasis hn).repr v i)‖ ^ 2) ≤ + ∑ i : Fin (Module.finrank ℂ H), + radioEspectral K hK ^ 2 * + ‖(hK.eigenvectorBasis hn).repr v i‖ ^ 2 := by + apply Finset.sum_le_sum + intro i _ + have hi := modulo_autovalor_le_radio K hK i + have hi' : + |hK.eigenvalues hn i| ≤ radioEspectral K hK := by + simpa only using hi + have hi_nonneg : 0 ≤ |hK.eigenvalues hn i| := abs_nonneg _ + have hR_nonneg := radioEspectral_nonneg K hK + have hi_sq : + |hK.eigenvalues hn i| ^ 2 ≤ radioEspectral K hK ^ 2 := by + nlinarith [hi'] + simpa only [norm_mul, Complex.norm_real, Real.norm_eq_abs, mul_pow] using + mul_le_mul_of_nonneg_right hi_sq + (sq_nonneg ‖(hK.eigenvectorBasis hn).repr v i‖) + have hv_sq : + (∑ i : Fin (Module.finrank ℂ H), + radioEspectral K hK ^ 2 * + ‖(hK.eigenvectorBasis hn).repr v i‖ ^ 2) = + radioEspectral K hK ^ 2 * ‖v‖ ^ 2 := by + rw [← Finset.mul_sum, ← EuclideanSpace.norm_sq_eq] + rw [(hK.eigenvectorBasis hn).repr.norm_map] + have hsq : + ‖K v‖ ^ 2 ≤ (radioEspectral K hK * ‖v‖) ^ 2 := by + rw [hKv_sq, mul_pow] + exact hsum_le.trans_eq hv_sq + have hleft : 0 ≤ ‖K v‖ := norm_nonneg _ + have hright : 0 ≤ radioEspectral K hK * ‖v‖ := + mul_nonneg (radioEspectral_nonneg K hK) (norm_nonneg _) + nlinarith + +/-- Envolvente de la forma cuadrática sobre la esfera unidad. -/ +theorem expectativa_le_radio + (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) + (v : H) (hv : ‖v‖ = 1) : + ‖@inner ℂ H _ v (K v)‖ ≤ radioEspectral K hK := by + calc + ‖@inner ℂ H _ v (K v)‖ ≤ ‖v‖ * ‖K v‖ := + norm_inner_le_norm v (K v) + _ ≤ ‖v‖ * (radioEspectral K hK * ‖v‖) := + mul_le_mul_of_nonneg_left + (norma_aplicacion_le_radio_mul_norma K hK v) (norm_nonneg _) + _ = radioEspectral K hK := by rw [hv]; ring + +/-- El estado elegido realiza exactamente el radio espectral. -/ +theorem estadoExtremal_realiza_radio + (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : + ‖@inner ℂ H _ (estadoExtremal K hK) (K (estadoExtremal K hK))‖ = + radioEspectral K hK := by + rw [aplica_estadoExtremal K hK, inner_smul_right] + rw [inner_self_eq_norm_sq_to_K, estadoExtremal_normalizado K hK] + simp [radioEspectral, autovalorExtremal] + +/-- Conmutador crudo total `[T,P]`. -/ +def conmutador (T P : H →ₗ[ℂ] H) : H →ₗ[ℂ] H := + T.comp P - P.comp T + +/-- Observable hermitiano de tensión `i[T,P]`. -/ +def observableTension (T P : H →ₗ[ℂ] H) : H →ₗ[ℂ] H := + Complex.I • conmutador T P + +/-- Para operadores simétricos, `i[T,P]` es simétrico. -/ +theorem observableTension_simetrico + {E : Type u} [NormedAddCommGroup E] [InnerProductSpace ℂ E] + (T P : E →ₗ[ℂ] E) (hT : T.IsSymmetric) (hP : P.IsSymmetric) : + (observableTension T P).IsSymmetric := by + intro x y + change + @inner ℂ E _ (Complex.I • (T (P x) - P (T x))) y = + @inner ℂ E _ x (Complex.I • (T (P y) - P (T y))) + rw [inner_smul_left, inner_smul_right, inner_sub_left, inner_sub_right] + rw [hT (P x) y, hP x (T y), hP (T x) y, hT x (P y)] + simp only [Complex.conj_I] + ring + +theorem radioEspectral_pos_of_ne_zero + (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) (hK0 : K ≠ 0) : + 0 < radioEspectral K hK := by + have hR0 : radioEspectral K hK ≠ 0 := by + intro hR + apply hK0 + ext v + have hv := norma_aplicacion_le_radio_mul_norma K hK v + rw [hR, zero_mul] at hv + exact norm_eq_zero.mp (le_antisymm hv (norm_nonneg _)) + exact lt_of_le_of_ne (radioEspectral_nonneg K hK) (Ne.symm hR0) + +theorem observableTension_ne_zero + {E : Type u} [NormedAddCommGroup E] [InnerProductSpace ℂ E] + (T P : E →ₗ[ℂ] E) (hC : conmutador T P ≠ 0) : + observableTension T P ≠ 0 := by + intro hK + apply hC + ext v + have hv := LinearMap.congr_fun hK v + change Complex.I • conmutador T P v = 0 at hv + exact (smul_eq_zero.mp hv).resolve_left Complex.I_ne_zero + +end ConstructorEspectralTP + +namespace TransportePosicion + +open ConstructorEspectralTP + +/-- Realización lineal total de la matriz de transporte canónica. -/ +noncomputable def TdOp (d : ℕ) : Hd d →ₗ[ℂ] Hd d := + Matrix.toEuclideanLin (Td d) + +/-- Realización lineal total de la matriz de posición canónica. -/ +noncomputable def PdOp (d : ℕ) : Hd d →ₗ[ℂ] Hd d := + Matrix.toEuclideanLin (Pd d) + +theorem pasoMinimo_simetrico {d : ℕ} {i j : Fin d} : + PasoMinimo i j ↔ PasoMinimo j i := by + constructor <;> rintro (h | h) + · exact Or.inr h + · exact Or.inl h + · exact Or.inr h + · exact Or.inl h + +/-- La matriz de transporte es hermitiana. -/ +theorem Td_isHermitian (d : ℕ) : Matrix.IsHermitian (Td d) := by + rw [Matrix.IsHermitian.ext_iff] + intro i j + have hrho : star (rho d : ℂ) = (rho d : ℂ) := by + exact Complex.conj_ofReal _ + by_cases h : PasoMinimo i j + · have h' : PasoMinimo j i := pasoMinimo_simetrico.mp h + simp only [Td, Ad, h, h', if_pos] + rw [one_div, star_inv₀, hrho] + · have h' : ¬PasoMinimo j i := by + intro hji + exact h (pasoMinimo_simetrico.mpr hji) + simp [Td, Ad, h, h'] + +/-- La matriz diagonal de posición es hermitiana. -/ +theorem Pd_isHermitian (d : ℕ) : Matrix.IsHermitian (Pd d) := by + rw [Matrix.IsHermitian.ext_iff] + intro i j + by_cases hij : i = j + · subst j + simp [Pd, posicionCoord] + · have hji : j ≠ i := Ne.symm hij + simp [Pd, hij, hji] + +theorem TdOp_simetrico (d : ℕ) : (TdOp d).IsSymmetric := by + exact Matrix.isSymmetric_toEuclideanLin_iff.mpr (Td_isHermitian d) + +theorem PdOp_simetrico (d : ℕ) : (PdOp d).IsSymmetric := by + exact Matrix.isSymmetric_toEuclideanLin_iff.mpr (Pd_isHermitian d) + +/-- Observable hermitiano concreto `i[T_d,P_d]`. -/ +noncomputable def KdOp (d : ℕ) : Hd d →ₗ[ℂ] Hd d := + observableTension (TdOp d) (PdOp d) + +theorem KdOp_simetrico (d : ℕ) : (KdOp d).IsSymmetric := + observableTension_simetrico (TdOp d) (PdOp d) + (TdOp_simetrico d) (PdOp_simetrico d) + +/-- Estado canónico `ψ_d`: autovector unitario de `i[T_d,P_d]` cuyo +autovalor tiene módulo máximo. -/ +noncomputable def psiD (d : ℕ) (hd : 1 ≤ d) : Hd d := by + letI : Nonempty (Fin d) := ⟨⟨0, hd⟩⟩ + exact estadoExtremal (KdOp d) (KdOp_simetrico d) + +theorem psiD_normalizado (d : ℕ) (hd : 1 ≤ d) : + ‖psiD d hd‖ = 1 := by + letI : Nonempty (Fin d) := ⟨⟨0, hd⟩⟩ + exact estadoExtremal_normalizado (KdOp d) (KdOp_simetrico d) + +/-! ## Vector de Fiedler explícito + +La elección espectral anterior realiza la máxima tensión, pero no expone sus +coordenadas. El modo siguiente fija la realización seno-fase sobre `Fin d`. +La positividad de `sin` en `(0, π)` prueba constructivamente que ninguna +coordenada desaparece. -/ + +/-- Ángulo fundamental del camino finito. -/ +noncomputable def anguloFiedler (d : ℕ) : ℝ := + Real.pi / ((d : ℝ) + 1) + +/-- Modo seno con la fase compleja asociada a `i[T_d,P_d]`, todavía sin +normalizar. -/ +noncomputable def vectorFiedlerCrudo (d : ℕ) : Hd d := + WithLp.toLp 2 fun j : Fin d => + (-Complex.I) ^ j.val * + (Real.sin (((j.val : ℝ) + 1) * anguloFiedler d) : ℂ) + +/-- Todas las amplitudes seno del modo fundamental son estrictamente +positivas. -/ +theorem seno_fiedler_pos + (d : ℕ) (hd : 1 ≤ d) (j : Fin d) : + 0 < Real.sin (((j.val : ℝ) + 1) * anguloFiedler d) := by + apply Real.sin_pos_of_pos_of_lt_pi + · unfold anguloFiedler + positivity + · unfold anguloFiedler + have hj : (j.val : ℝ) + 1 < (d : ℝ) + 1 := by + exact_mod_cast Nat.add_lt_add_right j.isLt 1 + have hden : 0 < (d : ℝ) + 1 := by positivity + calc + ((j.val : ℝ) + 1) * (Real.pi / ((d : ℝ) + 1)) = + (((j.val : ℝ) + 1) / ((d : ℝ) + 1)) * Real.pi := by ring + _ < 1 * Real.pi := + mul_lt_mul_of_pos_right ((div_lt_one hden).2 hj) Real.pi_pos + _ = Real.pi := one_mul _ + +theorem vectorFiedlerCrudo_coordenada_ne_zero + (d : ℕ) (hd : 1 ≤ d) (j : Fin d) : + vectorFiedlerCrudo d j ≠ 0 := by + unfold vectorFiedlerCrudo + apply mul_ne_zero + · exact pow_ne_zero _ (neg_ne_zero.mpr Complex.I_ne_zero) + · exact Complex.ofReal_ne_zero.mpr + (ne_of_gt (seno_fiedler_pos d hd j)) + +theorem vectorFiedlerCrudo_ne_zero + (d : ℕ) (hd : 1 ≤ d) : + vectorFiedlerCrudo d ≠ 0 := by + let j : Fin d := ⟨0, hd⟩ + intro h + have hj := congrArg (fun v : Hd d => v j) h + exact vectorFiedlerCrudo_coordenada_ne_zero d hd j hj + +/-- Vector de Fiedler explícito normalizado, sin elección de autovector. -/ +noncomputable def vectorFiedlerExplicito (d : ℕ) : Hd d := + ((‖vectorFiedlerCrudo d‖ : ℂ)⁻¹) • vectorFiedlerCrudo d + +theorem vectorFiedlerExplicito_normalizado + (d : ℕ) (hd : 1 ≤ d) : + ‖vectorFiedlerExplicito d‖ = 1 := by + rw [vectorFiedlerExplicito, norm_smul] + have hn : ‖vectorFiedlerCrudo d‖ ≠ 0 := + norm_ne_zero_iff.mpr (vectorFiedlerCrudo_ne_zero d hd) + simp [hn] + +theorem vectorFiedlerExplicito_coordenada_ne_zero + (d : ℕ) (hd : 1 ≤ d) (j : Fin d) : + vectorFiedlerExplicito d j ≠ 0 := by + rw [vectorFiedlerExplicito] + change (↑‖vectorFiedlerCrudo d‖ : ℂ)⁻¹ * vectorFiedlerCrudo d j ≠ 0 + apply mul_ne_zero + · exact inv_ne_zero (Complex.ofReal_ne_zero.mpr + (norm_ne_zero_iff.mpr (vectorFiedlerCrudo_ne_zero d hd))) + · exact vectorFiedlerCrudo_coordenada_ne_zero d hd j + +theorem Td_mul_Pd_apply (d : ℕ) (i j : Fin d) : + (Td d * Pd d) i j = Td d i j * (posicionCoord d j : ℂ) := by + rw [Matrix.mul_apply, Finset.sum_eq_single j] + · simp [Pd] + · intro k _ hkj + simp [Pd, hkj] + · simp + +theorem Pd_mul_Td_apply (d : ℕ) (i j : Fin d) : + (Pd d * Td d) i j = (posicionCoord d i : ℂ) * Td d i j := by + rw [Matrix.mul_apply, Finset.sum_eq_single i] + · simp [Pd] + · intro k _ hki + simp [Pd, Ne.symm hki] + · simp + +theorem rho_pos (d : ℕ) (hd : 2 ≤ d) : 0 < rho d := by + have hden : 0 < (d : ℝ) + 1 := by positivity + have hden3 : (3 : ℝ) ≤ (d : ℝ) + 1 := by + exact_mod_cast (show 3 ≤ d + 1 by omega) + have hfrac : 1 / ((d : ℝ) + 1) < (1 : ℝ) / 2 := by + rw [div_lt_div_iff₀ hden (by norm_num : (0 : ℝ) < 2)] + linarith + have hangle_pos : 0 < Real.pi / ((d : ℝ) + 1) := + div_pos Real.pi_pos hden + have hangle_lt : + Real.pi / ((d : ℝ) + 1) < Real.pi / 2 := by + have hmul := mul_lt_mul_of_pos_left hfrac Real.pi_pos + simpa [div_eq_mul_inv] using hmul + have hcos : + 0 < Real.cos (Real.pi / ((d : ℝ) + 1)) := + Real.cos_pos_of_mem_Ioo ⟨by linarith [Real.pi_pos], hangle_lt⟩ + unfold rho + positivity + +theorem posicionCoord_succ_sub + (d : ℕ) (hd : 2 ≤ d) + (i j : Fin d) (hij : i.val + 1 = j.val) : + posicionCoord d j - posicionCoord d i = 2 / ((d : ℝ) - 1) := by + unfold posicionCoord + have hdsub : (d : ℝ) - 1 ≠ 0 := by + have : (1 : ℝ) < d := by exact_mod_cast (show 1 < d by omega) + linarith + have hijr : (j.val : ℝ) = (i.val : ℝ) + 1 := by exact_mod_cast hij.symm + rw [hijr] + field_simp + ring + +/-- Certificado concreto de no conmutatividad: una sola entrada vecina basta. -/ +theorem conmutador_matriz_entrada_vecina_no_cero + (d : ℕ) (hd : 2 ≤ d) : + let i : Fin d := ⟨0, by omega⟩ + let j : Fin d := ⟨1, by omega⟩ + ((Td d * Pd d) - (Pd d * Td d)) i j ≠ 0 := by + dsimp only + let i : Fin d := ⟨0, by omega⟩ + let j : Fin d := ⟨1, by omega⟩ + have hij : i.val + 1 = j.val := rfl + have hpaso : PasoMinimo i j := Or.inl hij + have hrho : (rho d : ℂ) ≠ 0 := by + exact_mod_cast (rho_pos d hd).ne' + have hdelta : + (posicionCoord d j : ℂ) - (posicionCoord d i : ℂ) ≠ 0 := by + have hdpos : 0 < (2 : ℝ) / ((d : ℝ) - 1) := by + have : (1 : ℝ) < d := by exact_mod_cast (show 1 < d by omega) + positivity + exact_mod_cast + ((posicionCoord_succ_sub d hd i j hij).trans_ne hdpos.ne') + rw [Matrix.sub_apply, Td_mul_Pd_apply, Pd_mul_Td_apply] + have hTd : Td d i j = 1 / (rho d : ℂ) := by + simp [Td, Ad, hpaso] + rw [hTd] + intro hz + have hz0 : + (rho d : ℂ)⁻¹ * (posicionCoord d j : ℂ) - + (posicionCoord d i : ℂ) * (rho d : ℂ)⁻¹ = 0 := by + simpa [i, j, one_div] using hz + have hz' : + (rho d : ℂ)⁻¹ * + ((posicionCoord d j : ℂ) - (posicionCoord d i : ℂ)) = 0 := by + calc + (rho d : ℂ)⁻¹ * + ((posicionCoord d j : ℂ) - (posicionCoord d i : ℂ)) = + (rho d : ℂ)⁻¹ * (posicionCoord d j : ℂ) - + (posicionCoord d i : ℂ) * (rho d : ℂ)⁻¹ := by ring + _ = 0 := hz0 + exact hdelta ((mul_eq_zero.mp hz').resolve_left (inv_ne_zero hrho)) + +theorem conmutador_matriz_no_cero (d : ℕ) (hd : 2 ≤ d) : + (Td d * Pd d) - (Pd d * Td d) ≠ 0 := by + intro hz + have hentry := congrFun (congrFun hz ⟨0, by omega⟩) ⟨1, by omega⟩ + exact conmutador_matriz_entrada_vecina_no_cero d hd hentry + +theorem conmutador_TdOp_PdOp_eq_matriz (d : ℕ) : + conmutador (TdOp d) (PdOp d) = + Matrix.toEuclideanLin ((Td d * Pd d) - (Pd d * Td d)) := by + simp [conmutador, TdOp, PdOp, Matrix.toEuclideanLin, Matrix.toLpLin_mul_same] + +/-- `[T_d,P_d] ≠ 0` para `d ≥ 2`. -/ +theorem conmutador_TdOp_PdOp_no_cero (d : ℕ) (hd : 2 ≤ d) : + conmutador (TdOp d) (PdOp d) ≠ 0 := by + rw [conmutador_TdOp_PdOp_eq_matriz] + intro hz + apply conmutador_matriz_no_cero d hd + apply Matrix.toEuclideanLin.injective + simpa using hz + +theorem KdOp_no_cero (d : ℕ) (hd : 2 ≤ d) : KdOp d ≠ 0 := + observableTension_ne_zero (TdOp d) (PdOp d) + (conmutador_TdOp_PdOp_no_cero d hd) + +end TransportePosicion + diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D6_Fiedler.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D6_Fiedler.lean new file mode 100644 index 000000000..85795377d --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D6_Fiedler.lean @@ -0,0 +1,816 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D5_MaximaTension + +@[expose] public section + +/-! +# D6 — Descomposición espectral de Fiedler sobre el camino discreto + +Diagonalización explícita, en base de modos seno/fase, del operador de +adyacencia `A_d` y del observable `i[T_d,P_d]` sobre `pathGraph d`. Se +obtiene el espectro completo en forma cerrada y se identifica el modo +fundamental (el vector de Fiedler) como el autovector extremal del +observable `i[T_d,P_d]`. Contenido íntegro, sin modificar, de la +descomposición espectral del corpus original — es álgebra lineal y teoría +espectral de grafos pura, sin ninguna capa interpretativa. +-/ + +noncomputable section + +open scoped ComplexConjugate + +namespace TransportePosicion + +theorem sum_cond_succ {d : ℕ} (i : Fin d) (f : Fin d → ℂ) : + (∑ j : Fin d, if i.val + 1 = j.val then f j else 0) = + if h : i.val + 1 < d then f ⟨i.val + 1, h⟩ else 0 := by + classical + by_cases h : i.val + 1 < d + · let s : Fin d := ⟨i.val + 1, h⟩ + have hs (j : Fin d) : i.val + 1 = j.val ↔ s = j := by + simp only [s] + exact ⟨fun e => Fin.ext e, fun e => by + have := congrArg Fin.val e + simpa [s] using this⟩ + simp_rw [hs] + simp [h, s] + · have hs (j : Fin d) : i.val + 1 ≠ j.val := by omega + simp [h, hs] + +theorem sum_cond_pred {d : ℕ} (i : Fin d) (f : Fin d → ℂ) : + (∑ j : Fin d, if j.val + 1 = i.val then f j else 0) = + if h : 0 < i.val then f ⟨i.val - 1, by omega⟩ else 0 := by + classical + by_cases h : 0 < i.val + · let p : Fin d := ⟨i.val - 1, by omega⟩ + have hp (j : Fin d) : j.val + 1 = i.val ↔ p = j := by + simp only [p] + constructor + · intro e + apply Fin.ext + change i.val - 1 = j.val + omega + · intro e + have he := congrArg Fin.val e + change i.val - 1 = j.val at he + omega + simp_rw [hp] + simp [h, p] + · have hp (j : Fin d) : j.val + 1 ≠ i.val := by omega + simp [h, hp] + +theorem sum_pasoMinimo + {d : ℕ} (i : Fin d) (f : Fin d → ℂ) : + (∑ j : Fin d, if PasoMinimo i j then f j else 0) = + (if h : i.val + 1 < d then f ⟨i.val + 1, h⟩ else 0) + + (if h : 0 < i.val then f ⟨i.val - 1, by omega⟩ else 0) := by + classical + rw [show (∑ j : Fin d, if PasoMinimo i j then f j else 0) = + (∑ j : Fin d, if i.val + 1 = j.val then f j else 0) + + (∑ j : Fin d, if j.val + 1 = i.val then f j else 0) by + rw [← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro j _ + unfold PasoMinimo + by_cases h₁ : i.val + 1 = j.val + · have h₂ : j.val + 1 ≠ i.val := by omega + simp [h₁, h₂] + · by_cases h₂ : j.val + 1 = i.val <;> simp [h₁, h₂]] + rw [sum_cond_succ, sum_cond_pred] + +theorem Ad_mulVec_apply + {d : ℕ} (i : Fin d) (f : Fin d → ℂ) : + (Ad d).mulVec f i = + (if h : i.val + 1 < d then f ⟨i.val + 1, h⟩ else 0) + + (if h : 0 < i.val then f ⟨i.val - 1, by omega⟩ else 0) := by + classical + simp only [Matrix.mulVec, dotProduct, Ad] + simp_rw [ite_mul, one_mul, zero_mul] + exact sum_pasoMinimo i f + +noncomputable def anguloModo (d : ℕ) (k : Fin d) : ℝ := + ((k.val : ℝ) + 1) * Real.pi / ((d : ℝ) + 1) + +noncomputable def modoSeno (d : ℕ) (k : Fin d) : Fin d → ℂ := + fun j => (Real.sin (((j.val : ℝ) + 1) * anguloModo d k) : ℂ) + +theorem recurrencia_seno (a : ℝ) (n : ℕ) : + Real.sin (((n : ℝ) + 2) * a) + Real.sin ((n : ℝ) * a) = + 2 * Real.cos a * Real.sin (((n : ℝ) + 1) * a) := by + rw [show ((n : ℝ) + 2) * a = ((n : ℝ) + 1) * a + a by ring, + Real.sin_add, + show (n : ℝ) * a = ((n : ℝ) + 1) * a - a by ring, + Real.sin_sub] + ring + +theorem seno_frontera_superior + {d : ℕ} (k : Fin d) : + Real.sin (((d : ℝ) + 1) * anguloModo d k) = 0 := by + unfold anguloModo + have hd : (d : ℝ) + 1 ≠ 0 := by positivity + rw [show ((d : ℝ) + 1) * + (((k.val : ℝ) + 1) * Real.pi / ((d : ℝ) + 1)) = + (k.val + 1 : ℕ) * Real.pi by + push_cast + field_simp] + exact Real.sin_nat_mul_pi (k.val + 1) + +theorem Ad_modoSeno + {d : ℕ} (hd : 1 ≤ d) (k : Fin d) : + (Ad d).mulVec (modoSeno d k) = + fun i => (2 * Real.cos (anguloModo d k) : ℂ) * modoSeno d k i := by + funext i + rw [Ad_mulVec_apply] + by_cases hs : i.val + 1 < d + · by_cases hp : 0 < i.val + · simp only [hs, hp, dite_true, modoSeno] + have hpred : i.val - 1 + 1 = i.val := by omega + have hsucc : i.val + 1 + 1 = i.val + 2 := by omega + have hpredR : ((i.val - 1 : ℕ) : ℝ) + 1 = (i.val : ℝ) := by + exact_mod_cast hpred + have hsuccR : ((i.val + 1 : ℕ) : ℝ) + 1 = (i.val : ℝ) + 2 := by + exact_mod_cast hsucc + rw [hpredR, hsuccR] + exact_mod_cast recurrencia_seno (anguloModo d k) i.val + · have hi0 : i.val = 0 := by omega + simp only [hs, hp, dite_true, dite_false, add_zero, modoSeno] + simp only [hi0, Nat.cast_zero, zero_add, Nat.cast_one] + exact_mod_cast (by + simpa using recurrencia_seno (anguloModo d k) 0) + · have hilast : i.val + 1 = d := by omega + by_cases hp : 0 < i.val + · simp only [hs, hp, dite_false, dite_true, zero_add, modoSeno] + have hrec := recurrencia_seno (anguloModo d k) i.val + have hzero : + Real.sin (((i.val : ℝ) + 2) * anguloModo d k) = 0 := by + rw [show ((i.val : ℝ) + 2) = (d : ℝ) + 1 by + exact_mod_cast (show i.val + 2 = d + 1 by omega)] + exact seno_frontera_superior k + rw [hzero, zero_add] at hrec + have hpred : i.val - 1 + 1 = i.val := by omega + have hpredR : ((i.val - 1 : ℕ) : ℝ) + 1 = (i.val : ℝ) := by + exact_mod_cast hpred + rw [hpredR] + exact_mod_cast hrec + · have hd1 : d = 1 := by omega + subst d + have hk0 : k = 0 := Subsingleton.elim _ _ + have hi0 : i = 0 := Subsingleton.elim _ _ + subst k + subst i + norm_num [modoSeno, anguloModo] + +noncomputable def autovalorAd (d : ℕ) (k : Fin d) : ℂ := + (2 * Real.cos (anguloModo d k) : ℝ) + +theorem anguloModo_mem_Icc {d : ℕ} (k : Fin d) : + anguloModo d k ∈ Set.Icc (0 : ℝ) Real.pi := by + constructor + · unfold anguloModo + positivity + · unfold anguloModo + have hk : (k.val : ℝ) + 1 ≤ (d : ℝ) + 1 := by + exact_mod_cast (show k.val + 1 ≤ d + 1 by omega) + have hd : 0 < (d : ℝ) + 1 := by positivity + calc + ((k.val : ℝ) + 1) * Real.pi / ((d : ℝ) + 1) ≤ + ((d : ℝ) + 1) * Real.pi / ((d : ℝ) + 1) := by + gcongr + _ = Real.pi := by field_simp + +theorem autovalorAd_injective {d : ℕ} : + Function.Injective (autovalorAd d) := by + intro k l hkl + have hcos : + Real.cos (anguloModo d k) = Real.cos (anguloModo d l) := by + apply mul_left_cancel₀ (a := (2 : ℝ)) (by norm_num) + apply Complex.ofReal_injective + simpa [autovalorAd] using hkl + have hang : anguloModo d k = anguloModo d l := + Real.strictAntiOn_cos.injOn + (anguloModo_mem_Icc k) (anguloModo_mem_Icc l) hcos + apply Fin.ext + unfold anguloModo at hang + have hp : Real.pi ≠ 0 := Real.pi_ne_zero + have hd : (d : ℝ) + 1 ≠ 0 := by positivity + have : (k.val : ℝ) = (l.val : ℝ) := by + field_simp at hang + nlinarith + exact_mod_cast this + +theorem modoSeno_ne_zero {d : ℕ} (hd : 1 ≤ d) (k : Fin d) : + modoSeno d k ≠ 0 := by + intro h + have h0 := congrFun h ⟨0, hd⟩ + have ha0 : 0 < anguloModo d k := by + unfold anguloModo + positivity + have hapi : anguloModo d k < Real.pi := by + unfold anguloModo + have hk : (k.val : ℝ) + 1 < (d : ℝ) + 1 := by + exact_mod_cast Nat.add_lt_add_right k.isLt 1 + have hdR : 0 < (d : ℝ) + 1 := by positivity + calc + ((k.val : ℝ) + 1) * Real.pi / ((d : ℝ) + 1) < + ((d : ℝ) + 1) * Real.pi / ((d : ℝ) + 1) := by + gcongr + _ = Real.pi := by field_simp + have hs := (Real.sin_pos_of_pos_of_lt_pi ha0 hapi).ne' + apply Complex.ofReal_ne_zero.mpr hs + simpa [modoSeno] using h0 + +theorem modoSeno_hasEigenvector + {d : ℕ} (hd : 1 ≤ d) (k : Fin d) : + Module.End.HasEigenvector (Matrix.toLin' (Ad d)) + (autovalorAd d k) (modoSeno d k) := by + constructor + · rw [Module.End.mem_eigenspace_iff, Matrix.toLin'_apply] + ext i + simpa [autovalorAd] using congrFun (Ad_modoSeno hd k) i + · exact modoSeno_ne_zero hd k + +theorem modosSeno_linearIndependent + {d : ℕ} (hd : 1 ≤ d) : + LinearIndependent ℂ (modoSeno d) := + Module.End.eigenvectors_linearIndependent' (Matrix.toLin' (Ad d)) + (autovalorAd d) autovalorAd_injective (modoSeno d) + (modoSeno_hasEigenvector hd) + +noncomputable def baseModosSeno + {d : ℕ} (hd : 1 ≤ d) : Module.Basis (Fin d) ℂ (Fin d → ℂ) := by + classical + exact basisOfPiSpaceOfLinearIndependent (modosSeno_linearIndependent hd) + +theorem baseModosSeno_apply + {d : ℕ} (hd : 1 ≤ d) (k : Fin d) : + baseModosSeno hd k = modoSeno d k := by + classical + exact congrFun (coe_basisOfPiSpaceOfLinearIndependent + (modosSeno_linearIndependent hd)) k + +theorem Ad_eq_suma_modos + {d : ℕ} (hd : 1 ≤ d) (v : Fin d → ℂ) : + Matrix.toLin' (Ad d) v = + ∑ k : Fin d, + (baseModosSeno hd).repr v k • + (autovalorAd d k • modoSeno d k) := by + calc + Matrix.toLin' (Ad d) v = + Matrix.toLin' (Ad d) + (∑ k, (baseModosSeno hd).repr v k • baseModosSeno hd k) := by + rw [(baseModosSeno hd).sum_repr v] + _ = ∑ k, (baseModosSeno hd).repr v k • + Matrix.toLin' (Ad d) (baseModosSeno hd k) := by + simp only [map_sum, map_smul] + _ = _ := by + apply Finset.sum_congr rfl + intro k _ + rw [baseModosSeno_apply] + congr 1 + rw [Matrix.toLin'_apply] + ext i + simpa [autovalorAd] using congrFun (Ad_modoSeno hd k) i + +theorem repr_Ad + {d : ℕ} (hd : 1 ≤ d) (v : Fin d → ℂ) (k : Fin d) : + (baseModosSeno hd).repr (Matrix.toLin' (Ad d) v) k = + autovalorAd d k * (baseModosSeno hd).repr v k := by + rw [Ad_eq_suma_modos hd v, map_sum] + classical + simp [← baseModosSeno_apply hd, Finsupp.single_apply, mul_comm] + +theorem autovalorAd_agota_espectro + {d : ℕ} (hd : 1 ≤ d) {μ : ℂ} + (hμ : Module.End.HasEigenvalue (Matrix.toLin' (Ad d)) μ) : + ∃ k : Fin d, μ = autovalorAd d k := by + obtain ⟨v, hv⟩ := hμ.exists_hasEigenvector + have hrepr : (baseModosSeno hd).repr v ≠ 0 := by + simpa using (baseModosSeno hd).repr.injective.ne hv.2 + have hk : ∃ k : Fin d, (baseModosSeno hd).repr v k ≠ 0 := by + by_contra h + push Not at h + apply hrepr + apply Finsupp.ext + intro k + exact h k + obtain ⟨k, hk⟩ := hk + have heig := Module.End.mem_eigenspace_iff.mp hv.1 + have hc := congrArg (fun w => (baseModosSeno hd).repr w k) heig + rw [repr_Ad] at hc + simp only [map_smul] at hc + exact ⟨k, (mul_right_cancel₀ hk hc).symm⟩ + +theorem anguloFiedler_le_anguloModo + {d : ℕ} (k : Fin d) : + anguloFiedler d ≤ anguloModo d k := by + unfold anguloFiedler anguloModo + have hd : 0 < (d : ℝ) + 1 := by positivity + have hk : (1 : ℝ) ≤ (k.val : ℝ) + 1 := by + exact_mod_cast (show 1 ≤ k.val + 1 by omega) + calc + Real.pi / ((d : ℝ) + 1) = + 1 * Real.pi / ((d : ℝ) + 1) := by ring + _ ≤ ((k.val : ℝ) + 1) * Real.pi / ((d : ℝ) + 1) := by + gcongr + +theorem anguloModo_le_pi_sub_fiedler + {d : ℕ} (k : Fin d) : + anguloModo d k ≤ Real.pi - anguloFiedler d := by + unfold anguloFiedler anguloModo + have hd : 0 < (d : ℝ) + 1 := by positivity + have hk : (k.val : ℝ) + 1 ≤ d := by + exact_mod_cast (show k.val + 1 ≤ d by omega) + calc + ((k.val : ℝ) + 1) * Real.pi / ((d : ℝ) + 1) ≤ + (d : ℝ) * Real.pi / ((d : ℝ) + 1) := by + gcongr + _ = Real.pi - Real.pi / ((d : ℝ) + 1) := by + field_simp + ring + +theorem abs_cos_anguloModo_le_cos_fiedler + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + |Real.cos (anguloModo d k)| ≤ Real.cos (anguloFiedler d) := by + apply abs_le.mpr + constructor + · rw [← Real.cos_pi_sub] + apply Real.cos_le_cos_of_nonneg_of_le_pi + · exact (anguloModo_mem_Icc k).1 + · have hθ : 0 ≤ anguloFiedler d := by + unfold anguloFiedler + positivity + linarith [Real.pi_pos] + · exact anguloModo_le_pi_sub_fiedler k + · apply Real.cos_le_cos_of_nonneg_of_le_pi + · unfold anguloFiedler + positivity + · exact (anguloModo_mem_Icc k).2 + · exact anguloFiedler_le_anguloModo k + +theorem norma_autovalorAd_le_rho + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + ‖autovalorAd d k‖ ≤ rho d := by + rw [autovalorAd, Complex.norm_real, Real.norm_eq_abs, + abs_mul, abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 2)] + rw [rho] + exact mul_le_mul_of_nonneg_left + (by simpa [anguloFiedler] using + abs_cos_anguloModo_le_cos_fiedler hd k) + (by norm_num) + +noncomputable def Kmat (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := + Complex.I • ((Td d * Pd d) - (Pd d * Td d)) + +noncomputable def fase (j : ℕ) : ℂ := (-Complex.I) ^ j + +noncomputable def modoFase (d : ℕ) (k : Fin d) : Fin d → ℂ := + fun j => fase j.val * modoSeno d k j + +theorem Kmat_apply + (d : ℕ) (i j : Fin d) : + Kmat d i j = + Complex.I * Td d i j * + ((posicionCoord d j : ℂ) - posicionCoord d i) := by + rw [Kmat] + change Complex.I * (((Td d * Pd d) - (Pd d * Td d)) i j) = _ + rw [Matrix.sub_apply, + Td_mul_Pd_apply, Pd_mul_Td_apply] + ring + +theorem termino_vecino_fase + {d : ℕ} (hd : 2 ≤ d) {i j : Fin d} + (hpaso : PasoMinimo i j) (z : ℂ) : + Kmat d i j * (fase j.val * z) = + ((2 / ((d : ℝ) - 1) / rho d : ℝ) : ℂ) * + (fase i.val * z) := by + have hrhoR : rho d ≠ 0 := (rho_pos d hd).ne' + have hrhoC : (rho d : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hrhoR + have hdsubR : (d : ℝ) - 1 ≠ 0 := by + have : (1 : ℝ) < d := by exact_mod_cast (show 1 < d by omega) + linarith + rw [Kmat_apply] + have hTd : Td d i j = 1 / (rho d : ℂ) := by + simp [Td, Ad, hpaso] + rw [hTd] + rcases hpaso with hij | hji + · have hpos := posicionCoord_succ_sub d hd i j hij + have hposC : + (posicionCoord d j : ℂ) - posicionCoord d i = + ((2 / ((d : ℝ) - 1) : ℝ) : ℂ) := by + exact_mod_cast hpos + have hpow : fase j.val = fase i.val * (-Complex.I) := by + unfold fase + rw [← hij, pow_succ] + rw [hpow, hposC] + push_cast + field_simp [hrhoR, hdsubR] + ring_nf + simp [Complex.I_sq] + · have hpos := posicionCoord_succ_sub d hd j i hji + have hposC : + (posicionCoord d j : ℂ) - posicionCoord d i = + -((2 / ((d : ℝ) - 1) : ℝ) : ℂ) := by + exact_mod_cast (show posicionCoord d j - posicionCoord d i = + -(2 / ((d : ℝ) - 1)) by linarith) + have hpow : fase i.val = fase j.val * (-Complex.I) := by + unfold fase + rw [← hji, pow_succ] + have hI : fase j.val = fase i.val * Complex.I := by + calc + fase j.val = fase j.val * ((-Complex.I) * Complex.I) := by + rw [show (-Complex.I) * Complex.I = 1 by + apply Complex.ext <;> norm_num] + ring + _ = fase i.val * Complex.I := by rw [hpow]; ring + rw [hI, hposC] + push_cast + field_simp [hrhoR, hdsubR] + ring_nf + simp [Complex.I_sq] + +theorem Kmat_mulVec_modoFase + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + (Kmat d).mulVec (modoFase d k) = + fun i => + (((2 / ((d : ℝ) - 1)) * + (2 * Real.cos (anguloModo d k) / rho d) : ℝ) : ℂ) * + modoFase d k i := by + funext i + simp only [Matrix.mulVec, dotProduct] + rw [show (∑ j : Fin d, Kmat d i j * modoFase d k j) = + ∑ j : Fin d, + if PasoMinimo i j then + (((2 / ((d : ℝ) - 1) / rho d : ℝ) : ℂ) * + (fase i.val * modoSeno d k j)) + else 0 by + apply Finset.sum_congr rfl + intro j _ + by_cases hp : PasoMinimo i j + · simp only [hp, if_pos, modoFase] + exact termino_vecino_fase hd hp (modoSeno d k j) + · have hz : Kmat d i j = 0 := by + rw [Kmat_apply] + simp [Td, Ad, hp] + simp [hp, hz]] + rw [show (∑ x : Fin d, + if PasoMinimo i x then + (((2 / ((d : ℝ) - 1) / rho d : ℝ) : ℂ) * + (fase i.val * modoSeno d k x)) + else 0) = + (((2 / ((d : ℝ) - 1) / rho d : ℝ) : ℂ) * fase i.val) * + ∑ x : Fin d, if PasoMinimo i x then modoSeno d k x else 0 by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro x _ + by_cases hp : PasoMinimo i x <;> simp [hp] + ring] + rw [show (∑ j : Fin d, if PasoMinimo i j then modoSeno d k j else 0) = + (Ad d).mulVec (modoSeno d k) i by + simp only [Matrix.mulVec, dotProduct, Ad] + simp_rw [ite_mul, one_mul, zero_mul]] + rw [congrFun (Ad_modoSeno (by omega) k) i] + simp only [modoFase] + push_cast + ring + +noncomputable def autovalorK (d : ℕ) (k : Fin d) : ℂ := + ((((2 / ((d : ℝ) - 1)) / rho d : ℝ) : ℂ) * autovalorAd d k) + +theorem Kmat_modoFase + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + Matrix.toLin' (Kmat d) (modoFase d k) = + autovalorK d k • modoFase d k := by + rw [Matrix.toLin'_apply] + ext i + change (Kmat d).mulVec (modoFase d k) i = + autovalorK d k * modoFase d k i + rw [congrFun (Kmat_mulVec_modoFase hd k) i] + simp only [autovalorK, autovalorAd] + push_cast + ring + +theorem modoFase_ne_zero + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + modoFase d k ≠ 0 := by + intro h + have h0 := congrFun h ⟨0, by omega⟩ + have hs := modoSeno_ne_zero (by omega : 1 ≤ d) k + apply hs + funext j + have hf : fase j.val ≠ 0 := by + exact pow_ne_zero _ (neg_ne_zero.mpr Complex.I_ne_zero) + have hj := congrFun h j + simp only [modoFase] at hj + exact (mul_eq_zero.mp hj).resolve_left hf + +theorem autovalorK_injective + {d : ℕ} (hd : 2 ≤ d) : + Function.Injective (autovalorK d) := by + intro k l hkl + apply autovalorAd_injective + unfold autovalorK at hkl + have hcR : (2 / ((d : ℝ) - 1)) / rho d ≠ 0 := by + have hdR : (d : ℝ) - 1 ≠ 0 := by + have : (1 : ℝ) < d := by exact_mod_cast (show 1 < d by omega) + linarith + exact div_ne_zero (div_ne_zero (by norm_num) hdR) (rho_pos d hd).ne' + exact mul_left_cancel₀ (Complex.ofReal_ne_zero.mpr hcR) hkl + +theorem modoFase_hasEigenvector + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + Module.End.HasEigenvector (Matrix.toLin' (Kmat d)) + (autovalorK d k) (modoFase d k) := by + constructor + · rw [Module.End.mem_eigenspace_iff] + exact Kmat_modoFase hd k + · exact modoFase_ne_zero hd k + +theorem modosFase_linearIndependent + {d : ℕ} (hd : 2 ≤ d) : + LinearIndependent ℂ (modoFase d) := + Module.End.eigenvectors_linearIndependent' (Matrix.toLin' (Kmat d)) + (autovalorK d) (autovalorK_injective hd) (modoFase d) + (modoFase_hasEigenvector hd) + +noncomputable def baseModosFase + {d : ℕ} (hd : 2 ≤ d) : Module.Basis (Fin d) ℂ (Fin d → ℂ) := by + classical + exact basisOfPiSpaceOfLinearIndependent (modosFase_linearIndependent hd) + +theorem baseModosFase_apply + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + baseModosFase hd k = modoFase d k := by + classical + exact congrFun (coe_basisOfPiSpaceOfLinearIndependent + (modosFase_linearIndependent hd)) k + +theorem Kmat_eq_suma_modos + {d : ℕ} (hd : 2 ≤ d) (v : Fin d → ℂ) : + Matrix.toLin' (Kmat d) v = + ∑ k : Fin d, + (baseModosFase hd).repr v k • + (autovalorK d k • modoFase d k) := by + calc + Matrix.toLin' (Kmat d) v = + Matrix.toLin' (Kmat d) + (∑ k, (baseModosFase hd).repr v k • baseModosFase hd k) := by + rw [(baseModosFase hd).sum_repr v] + _ = ∑ k, (baseModosFase hd).repr v k • + Matrix.toLin' (Kmat d) (baseModosFase hd k) := by + simp only [map_sum, map_smul] + _ = _ := by + apply Finset.sum_congr rfl + intro k _ + rw [baseModosFase_apply] + congr 1 + exact Kmat_modoFase hd k + +theorem repr_Kmat + {d : ℕ} (hd : 2 ≤ d) (v : Fin d → ℂ) (k : Fin d) : + (baseModosFase hd).repr (Matrix.toLin' (Kmat d) v) k = + autovalorK d k * (baseModosFase hd).repr v k := by + rw [Kmat_eq_suma_modos hd v, map_sum] + classical + simp [← baseModosFase_apply hd, Finsupp.single_apply, mul_comm] + +theorem Kmat_autovalor_agota_espectro + {d : ℕ} (hd : 2 ≤ d) {μ : ℂ} + (hμ : Module.End.HasEigenvalue (Matrix.toLin' (Kmat d)) μ) : + ∃ k : Fin d, μ = autovalorK d k := by + obtain ⟨v, hv⟩ := hμ.exists_hasEigenvector + have hrepr : (baseModosFase hd).repr v ≠ 0 := by + simpa using (baseModosFase hd).repr.injective.ne hv.2 + obtain ⟨k, hk⟩ : + ∃ k : Fin d, (baseModosFase hd).repr v k ≠ 0 := by + by_contra h + push Not at h + apply hrepr + apply Finsupp.ext + intro k + exact h k + have heig := Module.End.mem_eigenspace_iff.mp hv.1 + have hcoord := congrArg (fun w => (baseModosFase hd).repr w k) heig + rw [repr_Kmat] at hcoord + simp only [map_smul] at hcoord + exact ⟨k, (mul_right_cancel₀ hk hcoord).symm⟩ + +theorem norma_autovalorK_le_paso + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + ‖autovalorK d k‖ ≤ 2 / ((d : ℝ) - 1) := by + have hδ : 0 ≤ 2 / ((d : ℝ) - 1) := by + have hdsub : 0 < (d : ℝ) - 1 := by + have : (1 : ℝ) < d := by exact_mod_cast (show 1 < d by omega) + linarith + exact div_nonneg (by norm_num) hdsub.le + have hρ := rho_pos d hd + rw [autovalorK, norm_mul, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg (div_nonneg hδ hρ.le)] + calc + (2 / ((d : ℝ) - 1) / rho d) * ‖autovalorAd d k‖ ≤ + (2 / ((d : ℝ) - 1) / rho d) * rho d := by + gcongr + exact norma_autovalorAd_le_rho hd k + _ = 2 / ((d : ℝ) - 1) := by + field_simp [(rho_pos d hd).ne'] + +theorem KdOp_eq_Kmat (d : ℕ) : + KdOp d = Matrix.toEuclideanLin (Kmat d) := by + unfold KdOp ConstructorEspectralTP.observableTension Kmat + rw [conmutador_TdOp_PdOp_eq_matriz] + exact (Matrix.toEuclideanLin : + Matrix (Fin d) (Fin d) ℂ ≃ₗ[ℂ] (Hd d →ₗ[ℂ] Hd d)).map_smul + Complex.I ((Td d * Pd d) - (Pd d * Td d)) |>.symm + +noncomputable def modoFaseHd (d : ℕ) (k : Fin d) : Hd d := + WithLp.toLp 2 (modoFase d k) + +theorem KdOp_modoFaseHd + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + KdOp d (modoFaseHd d k) = + autovalorK d k • modoFaseHd d k := by + rw [KdOp_eq_Kmat] + change WithLp.toLp 2 ((Kmat d).mulVec (modoFase d k)) = + WithLp.toLp 2 (fun i => autovalorK d k * modoFase d k i) + congr 1 + funext i + simpa [smul_eq_mul] using congrFun (Kmat_modoFase hd k) i + +theorem modoFaseHd_ne_zero + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + modoFaseHd d k ≠ 0 := by + exact (WithLp.linearEquiv 2 ℂ (Fin d → ℂ)).symm.injective.ne + (modoFase_ne_zero hd k) + +theorem modoFaseHd_hasEigenvector + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + Module.End.HasEigenvector (KdOp d) + (autovalorK d k) (modoFaseHd d k) := by + constructor + · rw [Module.End.mem_eigenspace_iff] + exact KdOp_modoFaseHd hd k + · exact modoFaseHd_ne_zero hd k + +theorem modosFaseHd_linearIndependent + {d : ℕ} (hd : 2 ≤ d) : + LinearIndependent ℂ (modoFaseHd d) := + Module.End.eigenvectors_linearIndependent' (KdOp d) + (autovalorK d) (autovalorK_injective hd) (modoFaseHd d) + (modoFaseHd_hasEigenvector hd) + +noncomputable def baseModosFaseHd + {d : ℕ} (hd : 2 ≤ d) : Module.Basis (Fin d) ℂ (Hd d) := + (baseModosFase hd).map (WithLp.linearEquiv 2 ℂ (Fin d → ℂ)).symm + +theorem baseModosFaseHd_apply + {d : ℕ} (hd : 2 ≤ d) (k : Fin d) : + baseModosFaseHd hd k = modoFaseHd d k := by + simp [baseModosFaseHd, modoFaseHd, baseModosFase_apply] + +theorem KdOp_eq_suma_modos + {d : ℕ} (hd : 2 ≤ d) (v : Hd d) : + KdOp d v = + ∑ k : Fin d, + (baseModosFaseHd hd).repr v k • + (autovalorK d k • modoFaseHd d k) := by + calc + KdOp d v = + KdOp d + (∑ k, (baseModosFaseHd hd).repr v k • + baseModosFaseHd hd k) := by + rw [(baseModosFaseHd hd).sum_repr v] + _ = ∑ k, (baseModosFaseHd hd).repr v k • + KdOp d (baseModosFaseHd hd k) := by + simp only [map_sum, map_smul] + _ = _ := by + apply Finset.sum_congr rfl + intro k _ + rw [baseModosFaseHd_apply] + congr 1 + exact KdOp_modoFaseHd hd k + +theorem repr_KdOp + {d : ℕ} (hd : 2 ≤ d) (v : Hd d) (k : Fin d) : + (baseModosFaseHd hd).repr (KdOp d v) k = + autovalorK d k * (baseModosFaseHd hd).repr v k := by + rw [KdOp_eq_suma_modos hd v, map_sum] + classical + simp [← baseModosFaseHd_apply hd, Finsupp.single_apply, mul_comm] + +theorem KdOp_autovalor_agota_espectro + {d : ℕ} (hd : 2 ≤ d) {μ : ℂ} + (hμ : Module.End.HasEigenvalue (KdOp d) μ) : + ∃ k : Fin d, μ = autovalorK d k := by + obtain ⟨v, hv⟩ := hμ.exists_hasEigenvector + have hrepr : (baseModosFaseHd hd).repr v ≠ 0 := by + simpa using (baseModosFaseHd hd).repr.injective.ne hv.2 + obtain ⟨k, hk⟩ : + ∃ k : Fin d, (baseModosFaseHd hd).repr v k ≠ 0 := by + by_contra h + push Not at h + apply hrepr + apply Finsupp.ext + intro k + exact h k + have heig := Module.End.mem_eigenspace_iff.mp hv.1 + have hcoord := congrArg (fun w => (baseModosFaseHd hd).repr w k) heig + rw [repr_KdOp] at hcoord + simp only [map_smul] at hcoord + exact ⟨k, (mul_right_cancel₀ hk hcoord).symm⟩ + +theorem todo_autovalor_KdOp_acotado + {d : ℕ} (hd : 2 ≤ d) {μ : ℂ} + (hμ : Module.End.HasEigenvalue (KdOp d) μ) : + ‖μ‖ ≤ 2 / ((d : ℝ) - 1) := by + obtain ⟨k, rfl⟩ := KdOp_autovalor_agota_espectro hd hμ + exact norma_autovalorK_le_paso hd k + +theorem autovalorK_fundamental + (d : ℕ) (hd : 2 ≤ d) : + autovalorK d ⟨0, by omega⟩ = + ((2 / ((d : ℝ) - 1) : ℝ) : ℂ) := by + have hρ : rho d ≠ 0 := (rho_pos d hd).ne' + have hdsub : (d : ℝ) - 1 ≠ 0 := by + have : (1 : ℝ) < d := by exact_mod_cast (show 1 < d by omega) + linarith + simp only [autovalorK, autovalorAd, anguloModo, + Nat.cast_zero, zero_add] + rw [show (1 : ℝ) * Real.pi / ((d : ℝ) + 1) = + Real.pi / ((d : ℝ) + 1) by ring] + rw [show (2 * Real.cos (Real.pi / ((d : ℝ) + 1)) : ℝ) = rho d by + rfl] + push_cast + field_simp [hρ, hdsub] + +theorem modoFaseHd_fundamental_eq_vectorFiedlerCrudo + (d : ℕ) (hd : 2 ≤ d) : + modoFaseHd d ⟨0, by omega⟩ = vectorFiedlerCrudo d := by + change WithLp.toLp 2 (fun j : Fin d => + (-Complex.I) ^ j.val * + (Real.sin (((j.val : ℝ) + 1) * + ((((⟨0, by omega⟩ : Fin d).val : ℝ) + 1) * Real.pi / + ((d : ℝ) + 1))) : ℂ)) = + WithLp.toLp 2 (fun j : Fin d => + (-Complex.I) ^ j.val * + (Real.sin (((j.val : ℝ) + 1) * + (Real.pi / ((d : ℝ) + 1))) : ℂ)) + congr 1 + funext j + congr 3 + norm_num + +theorem KdOp_vectorFiedlerCrudo + (d : ℕ) (hd : 2 ≤ d) : + KdOp d (vectorFiedlerCrudo d) = + ((2 / ((d : ℝ) - 1) : ℝ) : ℂ) • vectorFiedlerCrudo d := by + rw [← modoFaseHd_fundamental_eq_vectorFiedlerCrudo d hd, + KdOp_modoFaseHd hd, autovalorK_fundamental d hd] + +theorem KdOp_vectorFiedlerExplicito + (d : ℕ) (hd : 2 ≤ d) : + KdOp d (vectorFiedlerExplicito d) = + ((2 / ((d : ℝ) - 1) : ℝ) : ℂ) • vectorFiedlerExplicito d := by + rw [vectorFiedlerExplicito, map_smul, KdOp_vectorFiedlerCrudo d hd] + module + +theorem radioEspectral_KdOp_eq_paso + (d : ℕ) (hd : 2 ≤ d) : + letI : Nonempty (Fin d) := ⟨⟨0, by omega⟩⟩ + letI : Nontrivial (Hd d) := inferInstance + ConstructorEspectralTP.radioEspectral (KdOp d) (KdOp_simetrico d) = + 2 / ((d : ℝ) - 1) := by + letI : Nonempty (Fin d) := ⟨⟨0, by omega⟩⟩ + letI : Nontrivial (Hd d) := inferInstance + have hdsub : 0 < (d : ℝ) - 1 := by + have : (1 : ℝ) < d := by exact_mod_cast (show 1 < d by omega) + linarith + have hδ : 0 ≤ 2 / ((d : ℝ) - 1) := by + exact div_nonneg (by norm_num) hdsub.le + apply le_antisymm + · have heig := + (KdOp_simetrico d).hasEigenvalue_eigenvalues rfl + (ConstructorEspectralTP.indiceExtremal (KdOp d) (KdOp_simetrico d)) + have hb := todo_autovalor_KdOp_acotado hd heig + simpa [ConstructorEspectralTP.radioEspectral, + ConstructorEspectralTP.autovalorExtremal, + Complex.norm_real, Real.norm_eq_abs] using hb + · have hb := + ConstructorEspectralTP.norma_aplicacion_le_radio_mul_norma + (KdOp d) (KdOp_simetrico d) (vectorFiedlerExplicito d) + rw [KdOp_vectorFiedlerExplicito d hd, norm_smul, + vectorFiedlerExplicito_normalizado d (by omega)] at hb + have hb' : + 2 / ‖(((d : ℝ) : ℂ) - 1)‖ ≤ + ConstructorEspectralTP.radioEspectral (KdOp d) (KdOp_simetrico d) := by + simpa [Complex.norm_real, abs_of_nonneg hδ] using hb + rw [show (((d : ℝ) : ℂ) - 1) = (((d : ℝ) - 1 : ℝ) : ℂ) by + push_cast + ring, Complex.norm_real, Real.norm_of_nonneg hdsub.le] at hb' + exact hb' + +end TransportePosicion diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D7_Niven.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D7_Niven.lean new file mode 100644 index 000000000..4dbd6e7d8 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D7_Niven.lean @@ -0,0 +1,92 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D2_Robertson + +@[expose] public section + +/-! +# D7 — Teorema de Niven: la saturación sólo ocurre en `d ∈ {2,3}` + +Tricotomía de saturación: la ecuación trigonométrica + +`cos²(π/(d+1)) = (d−1)/4` + +—que es exactamente la condición para que la cota de Robertson se sature +sobre el modo fundamental del camino discreto— se cumple **si y sólo si** +`d = 2` o `d = 3`. No hay más soluciones naturales: la prueba distingue +`d = 4` (reductio algebraico explícito) de `d ≥ 5` (cota de coseno, +`Blindaje.R3_techo_coseno`). En consecuencia, para todo `d ≥ 4` la brecha +`C_Nava(d) − 1` es estrictamente positiva (segunda mitad de este archivo, +`Constructor_DeltaGeom_Pos`). +-/ + +open Real + +namespace Gnomon + +/-- Semilla `d=2`: saturación unitaria exacta `cos²(π/3) = 1/4`. -/ +theorem semilla_d2 : Real.cos (π / 3) ^ 2 = 1 / 4 := by + rw [Real.cos_pi_div_three]; norm_num + +/-- Semilla `d=3`: saturación unitaria exacta `cos²(π/4) = 1/2`. -/ +theorem semilla_d3 : Real.cos (π / 4) ^ 2 = 1 / 2 := by + rw [Real.cos_pi_div_four] + rw [div_pow, sq_sqrt (by norm_num : (2:ℝ) ≥ 0)] + norm_num + +/-- `d=4` no admite saturación unitaria: `cos²(π/5) ≠ 3/4`. -/ +theorem no_saturacion_d4 : Real.cos (π / 5) ^ 2 ≠ 3 / 4 := by + rw [Real.cos_pi_div_five] + intro h + have hs : Real.sqrt 5 ^ 2 = 5 := Real.sq_sqrt (by norm_num) + have hnn : 0 ≤ Real.sqrt 5 := Real.sqrt_nonneg 5 + nlinarith [hs, hnn, h] + +/-- TEOREMA DE NIVEN (tricotomía de saturación): para `d ≥ 2`, +`cos²(π/(d+1)) = (d−1)/4 ↔ d ∈ {2,3}`. -/ +theorem saturacion_iff (d : ℕ) (hd : 2 ≤ d) : + Real.cos (π / (d + 1)) ^ 2 = ((d : ℝ) - 1) / 4 ↔ d = 2 ∨ d = 3 := by + constructor + · intro h + by_contra hne + push Not at hne + obtain ⟨h2, h3⟩ := hne + rcases Nat.lt_or_ge d 5 with h5 | h5 + · have hd4 : d = 4 := by omega + subst hd4 + have hc : ((4 : ℕ) : ℝ) + 1 = 5 := by norm_num + rw [hc] at h + have h34 : (((4 : ℕ) : ℝ) - 1) / 4 = 3 / 4 := by norm_num + rw [h34] at h + exact no_saturacion_d4 h + · exact absurd h (ne_of_lt (Blindaje.R3_techo_coseno d h5)) + · rintro (rfl | rfl) + · have hc : ((2 : ℕ) : ℝ) + 1 = 3 := by norm_num + rw [hc, semilla_d2]; norm_num + · have hc : ((3 : ℕ) : ℝ) + 1 = 4 := by norm_num + rw [hc, semilla_d3]; norm_num + +/-- La cota unitaria no se repone: para `d ≥ 4` la saturación es imposible. -/ +theorem no_reposición_saturacion_camino (d : ℕ) (hd : 4 ≤ d) : + Real.cos (π / (d + 1)) ^ 2 ≠ ((d : ℝ) - 1) / 4 := by + intro h + have hsem : d = 2 ∨ d = 3 := (saturacion_iff d (by omega)).mp h + omega + +/-- Alias citable: las únicas semillas de saturación son `d = 2` y `d = 3`. -/ +theorem semillas_niven_unicas (d : ℕ) (hd : 2 ≤ d) : + Real.cos (π / (d + 1)) ^ 2 = ((d : ℝ) - 1) / 4 → d = 2 ∨ d = 3 := + (saturacion_iff d hd).mp + +theorem apertura_no_es_semilla_niven (d : ℕ) (hd : 4 ≤ d) : + ¬ (d = 2 ∨ d = 3) := by + omega + +end Gnomon + + From 086c1fcf3dc37d3aa03dd6b5435ce08c32e28cfa Mon Sep 17 00:00:00 2001 From: Eduardo Nava-Hernandez Date: Thu, 17 Sep 2026 07:42:37 -0600 Subject: [PATCH 05/10] feat(PhyslibAlpha): prove dimensional uncertainty above dimension three Co-authored-by: Claude Opus 4.8 --- .../CStarAlgebra/DimensionalUncertainty.lean | 16 + .../D10_Certificado.lean | 174 +++++ .../D11_CuantoMinimoArea.lean | 153 ++++ .../D12_ConmutadorEscalarFinito.lean | 96 +++ .../D13_PrimeraRupturaCombinatoria.lean | 116 +++ .../D14_ExcesoBrechaSzego.lean | 61 ++ .../D15_IdentidadCosecanteChebyshev.lean | 267 +++++++ .../DimensionalUncertainty/D8_Szego.lean | 661 ++++++++++++++++++ .../DimensionalUncertainty/D9_Monotonia.lean | 557 +++++++++++++++ 9 files changed, 2101 insertions(+) create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D10_Certificado.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D11_CuantoMinimoArea.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D12_ConmutadorEscalarFinito.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D13_PrimeraRupturaCombinatoria.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D14_ExcesoBrechaSzego.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D15_IdentidadCosecanteChebyshev.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D8_Szego.lean create mode 100644 PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D9_Monotonia.lean diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty.lean new file mode 100644 index 000000000..159cfb6d8 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty.lean @@ -0,0 +1,16 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D8_Szego +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D9_Monotonia +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D10_Certificado +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D11_CuantoMinimoArea +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D12_ConmutadorEscalarFinito +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D13_PrimeraRupturaCombinatoria +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D14_ExcesoBrechaSzego +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D15_IdentidadCosecanteChebyshev diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D10_Certificado.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D10_Certificado.lean new file mode 100644 index 000000000..4b0bd8876 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D10_Certificado.lean @@ -0,0 +1,174 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D6_Fiedler +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D7_Niven +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D8_Szego +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D9_Monotonia + +@[expose] public section + +/-! +# D10 — Certificado conjunto: Fiedler + Niven + Szegő en `H_d` + +Reúne, en un único certificado citable, los tres pilares que se apoyan sobre +el hábitat común `H_d = ℂ^d` (`D0_Habitat.lean`): la descomposición +espectral de Fiedler (`D6_Fiedler.lean`), el teorema de Niven +(`D7_Niven.lean`) y el límite de Szegő con la positividad de la brecha +(`D8_Szego.lean`). Este es el teorema terminal del paquete: aquí se acaba +la matemática que se demuestra en este repositorio. + +# Blindaje de `δ_geom(d)` en el Hilbert finito `H_d` + +**Hábitat:** \(H_d=\mathtt{EuclideanSpace}\,\mathbb{C}\,(\mathtt{Fin}\,d)\). +No se abandona ese espacio: es el que acoge la derivación del marco. + +**Terna de escudos** (todo sobre el discreto): + +| Escudo | Contenido Lean | +|--------|----------------| +| **Fiedler** | modo fundamental / `KdOp` / radio espectral en \(H_d\) | +| **Niven** | `saturacion_iff` + `no_reposición_saturacion_camino` + `deltaGeom_pos_of_four_le` | +| **Szegő** | `limite_szego_CNava` + `deltaInf_pos` + ∞ no es dimensión | +| **Monotonía** | `deltaGeom_four_le`: `δ_geom(4)` es el piso global para todo `d ≥ 4` | + +Lectura: los productos trigonométricos simultáneamente racionales de la +saturación del camino **solo** existen en \(d\in\{2,3\}\). No hay más +semillas; por eso **nada repone la cota unitaria** después de \(d=4\). +Además, la monotonía certificada fija a \(d=4\) como el menor defecto +realizado: cualquier medición en un \(H_d\) físico con \(d\ge4\) queda +separada del cero por al menos \(\delta_{\rm geom}(4)\). Al crecer la +familia finita, el defecto no se apaga: converge a +\(\delta_\infty>0\). + +**Cierre del hábitat:** \(H_d = \mathbb{C}^d \cong \mathbb{R}^{2d}\), finito. +Punto. Si quieren continuo infinito, aquí no es hotel — \(d=\infty\) no se +hospeda en este paquete; a lo más se le ve llegar por la ventana como límite +(`D8_Szego.lean`), pero nunca cruza la puerta. +-/ + +noncomputable section + +open Real +open Filter +open scoped Topology + +namespace BlindajeHd + +open TransportePosicion +open Gnomon + +/-! ## Habitat: no se sale de \(H_d\) -/ + +def HabitatHilbertFinito (d : ℕ) : Prop := + Hd d = EuclideanSpace ℂ (Fin d) + +theorem habitatHilbertFinito (d : ℕ) : HabitatHilbertFinito d := + Hd_eq_euclidean d + +theorem infinito_no_es_habitat : + Tendsto deltaGeom atTop (𝓝 deltaInf) ∧ + deltaInf = Cinf - 1 ∧ + 0 < deltaInf := + infinito_no_es_dimension_sino_limite + +/-! ## Niven: cota unitaria no se repone -/ + +theorem niven_saturacion_solo_semillas (d : ℕ) (hd : 2 ≤ d) : + cos (π / (d + 1)) ^ 2 = ((d : ℝ) - 1) / 4 ↔ d = 2 ∨ d = 3 := + saturacion_iff d hd + +/-- **Nada repone la cota** tras \(d=4\). -/ +theorem niven_cota_unitaria_no_se_repone (d : ℕ) (hd : 4 ≤ d) : + cos (π / (d + 1)) ^ 2 ≠ ((d : ℝ) - 1) / 4 := + no_reposición_saturacion_camino d hd + +theorem niven_deltaGeom_pos_en_Hd (d : ℕ) (hd : 4 ≤ d) : + 0 < deltaGeom d := + deltaGeom_pos_of_four_le d hd + +theorem piso_precision_deltaGeom_d4_en_Hd (d : ℕ) (hd : 4 ≤ d) : + deltaGeom 4 ≤ deltaGeom d := + deltaGeom_four_le d hd + +/-- En el régimen físico finito `H_d`, `d ≥ 4`, no existe lectura con defecto +por debajo del piso elemental `δ_geom(4)`. -/ +theorem no_medicion_absoluta_bajo_piso_d4_en_Hd + (d : ℕ) (hd : 4 ≤ d) (ε : ℝ) (hε : ε < deltaGeom 4) : + ε < deltaGeom d := + lt_of_lt_of_le hε (piso_precision_deltaGeom_d4_en_Hd d hd) + +/-! ## Fiedler: espectro y banda en \(H_d\) -/ + +theorem fiedler_autovector_en_Hd (d : ℕ) (hd : 2 ≤ d) : + KdOp d (vectorFiedlerExplicito d) = + ((2 / ((d : ℝ) - 1) : ℝ) : ℂ) • vectorFiedlerExplicito d := + KdOp_vectorFiedlerExplicito d hd + +theorem fiedler_radio_banda (d : ℕ) (hd : 2 ≤ d) : + letI : Nonempty (Fin d) := ⟨⟨0, by omega⟩⟩ + letI : Nontrivial (Hd d) := inferInstance + ConstructorEspectralTP.radioEspectral (KdOp d) (KdOp_simetrico d) = + 2 / ((d : ℝ) - 1) := by + letI : Nonempty (Fin d) := ⟨⟨0, by omega⟩⟩ + letI : Nontrivial (Hd d) := inferInstance + exact radioEspectral_KdOp_eq_paso d hd + +/-! ## Szegő: asintótica de la familia finita -/ + +theorem szego_limite_familia_finita : + Tendsto CNava atTop (𝓝 Cinf) := + limite_szego_CNava + +theorem szego_deltaInf_pos : 0 < deltaInf := + deltaInf_pos + +theorem defecto_real_positivo_desde_Hd4_hasta_limite : + (∀ d : ℕ, 4 ≤ d → 0 < deltaGeom d) ∧ + Tendsto deltaGeom atTop (𝓝 deltaInf) ∧ + 0 < deltaInf := + ⟨niven_deltaGeom_pos_en_Hd, limite_defecto_geometrico, szego_deltaInf_pos⟩ + +/-! ## Certificado conjunto citable -/ + +structure CertificadoBlindajeHd where + habitat : ∀ d : ℕ, HabitatHilbertFinito d + niven_iff : + ∀ d : ℕ, 2 ≤ d → + (cos (π / ((d : ℝ) + 1)) ^ 2 = ((d : ℝ) - 1) / 4 ↔ d = 2 ∨ d = 3) + niven_no_reposición : + ∀ d : ℕ, 4 ≤ d → + cos (π / ((d : ℝ) + 1)) ^ 2 ≠ ((d : ℝ) - 1) / 4 + deltaGeom_pos : ∀ d : ℕ, 4 ≤ d → 0 < deltaGeom d + deltaGeom_piso_d4 : ∀ d : ℕ, 4 ≤ d → deltaGeom 4 ≤ deltaGeom d + fiedler_autovector : + ∀ d : ℕ, 2 ≤ d → + KdOp d (vectorFiedlerExplicito d) = + ((2 / ((d : ℝ) - 1) : ℝ) : ℂ) • vectorFiedlerExplicito d + szego_limite : Tendsto CNava atTop (𝓝 Cinf) + szego_deltaInf : 0 < deltaInf + defecto_real_positivo : + (∀ d : ℕ, 4 ≤ d → 0 < deltaGeom d) ∧ + Tendsto deltaGeom atTop (𝓝 deltaInf) ∧ + 0 < deltaInf + infinito_limite : + Tendsto deltaGeom atTop (𝓝 deltaInf) ∧ + deltaInf = Cinf - 1 ∧ 0 < deltaInf + +theorem certificadoBlindajeHd_OK : Nonempty CertificadoBlindajeHd := + ⟨{ habitat := habitatHilbertFinito + niven_iff := fun d hd => niven_saturacion_solo_semillas d hd + niven_no_reposición := fun d hd => niven_cota_unitaria_no_se_repone d hd + deltaGeom_pos := fun d hd => niven_deltaGeom_pos_en_Hd d hd + deltaGeom_piso_d4 := fun d hd => piso_precision_deltaGeom_d4_en_Hd d hd + fiedler_autovector := fun d hd => fiedler_autovector_en_Hd d hd + szego_limite := szego_limite_familia_finita + szego_deltaInf := szego_deltaInf_pos + defecto_real_positivo := defecto_real_positivo_desde_Hd4_hasta_limite + infinito_limite := infinito_no_es_habitat }⟩ + +end BlindajeHd diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D11_CuantoMinimoArea.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D11_CuantoMinimoArea.lean new file mode 100644 index 000000000..b5b3a13e1 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D11_CuantoMinimoArea.lean @@ -0,0 +1,153 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D10_Certificado + +@[expose] public section + +/-! +# D11 — Cuanto cuántico elemental de área + +Este módulo baja a Lean la lectura estrictamente matemática del cuanto +cuántico elemental: + +* `deltaGeom 4` es el primer defecto lineal positivo de la cola `d ≥ 4`. +* `deltaGeom 4 ^ 2` es el primer cuanto cuántico elemental de área. +* Por monotonía, ninguna resolución de área realizada en `H_d`, `d ≥ 4`, + queda por debajo de ese cuanto. + +No introduce unidades físicas, bariones ni escala de Planck. Si luego se +quiere poner una unidad externa, basta multiplicar por una escala no negativa: +la cota sobrevive por orden. + +La dependencia matemática es la cadena del paquete: +Cauchy--Gram → Robertson--Schrödinger → instancia `T_d/P_d` → +Niven/Szegő/monotonía. No modifica Robertson 1929; lo usa como ancla y +deriva el piso de área de su realización discreta. +-/ + +noncomputable section + +namespace CuantoMinimoArea + +open Gnomon + +/-- Cuanto cuántico elemental de área de la cola `H_d`, `d ≥ 4`. -/ +def cuantoCuanticoElemental : ℝ := + deltaGeom 4 ^ 2 + +/-- Alias operativo: el "cuadrito" mínimo es el cuanto cuántico elemental. -/ +def cuadritoMinimo : ℝ := + cuantoCuanticoElemental + +/-- Área de resolución inducida por el defecto geométrico en `H_d`. -/ +def areaResolucionHd (d : ℕ) : ℝ := + deltaGeom d ^ 2 + +/-- El nombre citable y el alias operativo son la misma cantidad. -/ +theorem cuadritoMinimo_eq_cuantoCuanticoElemental : + cuadritoMinimo = cuantoCuanticoElemental := by + rfl + +/-- El "cuadrito" es exactamente la resolución de área en `H_4`. -/ +theorem cuadritoMinimo_eq_areaResolucionH4 : + cuadritoMinimo = areaResolucionHd 4 := by + rfl + +/-- El cuanto cuántico elemental es exactamente la resolución de área en `H_4`. -/ +theorem cuantoCuanticoElemental_eq_areaResolucionH4 : + cuantoCuanticoElemental = areaResolucionHd 4 := by + rfl + +/-- El cuanto cuántico elemental de área es estrictamente positivo. -/ +theorem cuantoCuanticoElemental_pos : 0 < cuantoCuanticoElemental := by + unfold cuantoCuanticoElemental + have hδ : 0 < deltaGeom 4 := + deltaGeom_pos_of_four_le 4 (by omega) + positivity + +/-- Alias de positividad para el nombre operativo. -/ +theorem cuadritoMinimo_pos : 0 < cuadritoMinimo := by + simpa [cuadritoMinimo] using cuantoCuanticoElemental_pos + +/-- Toda área de resolución en `H_d`, `d ≥ 4`, está por encima del cuanto. -/ +theorem cuantoCuanticoElemental_le_areaResolucionHd (d : ℕ) (hd : 4 ≤ d) : + cuantoCuanticoElemental ≤ areaResolucionHd d := by + unfold cuantoCuanticoElemental areaResolucionHd + exact deltaGeom_sq_four_le d hd + +/-- Toda área de resolución en `H_d`, `d ≥ 4`, está por encima del cuadrito. -/ +theorem cuadritoMinimo_le_areaResolucionHd (d : ℕ) (hd : 4 ≤ d) : + cuadritoMinimo ≤ areaResolucionHd d := by + simpa [cuadritoMinimo] using cuantoCuanticoElemental_le_areaResolucionHd d hd + +/-- No existe una resolución realizada en `H_d`, `d ≥ 4`, estrictamente menor +que el cuanto cuántico elemental. -/ +theorem no_hay_resolucion_menor_que_cuanto_cuantico + (d : ℕ) (hd : 4 ≤ d) : + ¬ areaResolucionHd d < cuantoCuanticoElemental := by + exact not_lt.mpr (cuantoCuanticoElemental_le_areaResolucionHd d hd) + +/-- Alias operativo: no hay resolución menor que el cuadrito mínimo. -/ +theorem no_hay_resolucion_menor_que_cuadrito + (d : ℕ) (hd : 4 ≤ d) : + ¬ areaResolucionHd d < cuadritoMinimo := by + simpa [cuadritoMinimo] using no_hay_resolucion_menor_que_cuanto_cuantico d hd + +/-- Cualquier umbral por debajo del cuadrito queda por debajo de toda +resolución realizada en la cola `d ≥ 4`. -/ +theorem umbral_bajo_cuadrito_no_alcanza_Hd + (d : ℕ) (hd : 4 ≤ d) (ε : ℝ) (hε : ε < cuadritoMinimo) : + ε < areaResolucionHd d := + lt_of_lt_of_le hε (cuadritoMinimo_le_areaResolucionHd d hd) + +/-- Poner una escala externa no negativa conserva la cota mínima. -/ +theorem escala_no_negativa_conserva_cuanto_cuantico + (escala : ℝ) (hesc : 0 ≤ escala) (d : ℕ) (hd : 4 ≤ d) : + escala * cuantoCuanticoElemental ≤ escala * areaResolucionHd d := + mul_le_mul_of_nonneg_left (cuantoCuanticoElemental_le_areaResolucionHd d hd) hesc + +/-- Alias operativo para la escala externa no negativa. -/ +theorem escala_no_negativa_conserva_cuadrito + (escala : ℝ) (hesc : 0 ≤ escala) (d : ℕ) (hd : 4 ≤ d) : + escala * cuadritoMinimo ≤ escala * areaResolucionHd d := +by + simpa [cuadritoMinimo] using escala_no_negativa_conserva_cuanto_cuantico escala hesc d hd + +/-- Con una escala externa positiva, el cuanto escalado sigue siendo +estrictamente positivo. -/ +theorem cuanto_cuantico_escalado_pos + (escala : ℝ) (hesc : 0 < escala) : + 0 < escala * cuantoCuanticoElemental := + mul_pos hesc cuantoCuanticoElemental_pos + +/-- Alias operativo: con escala positiva, el cuadrito escalado sigue siendo +estrictamente positivo. -/ +theorem cuadrito_escalado_pos + (escala : ℝ) (hesc : 0 < escala) : + 0 < escala * cuadritoMinimo := +by + simpa [cuadritoMinimo] using cuanto_cuantico_escalado_pos escala hesc + +/-- Certificado citable del cuanto cuántico elemental de área. -/ +structure CertificadoCuantoMinimoArea where + cuanto_pos : 0 < cuantoCuanticoElemental + area_minima : ∀ d : ℕ, 4 ≤ d → cuantoCuanticoElemental ≤ areaResolucionHd d + no_menor : ∀ d : ℕ, 4 ≤ d → ¬ areaResolucionHd d < cuantoCuanticoElemental + escala_conserva : + ∀ escala : ℝ, 0 ≤ escala → + ∀ d : ℕ, 4 ≤ d → + escala * cuantoCuanticoElemental ≤ escala * areaResolucionHd d + +theorem certificadoCuantoMinimoArea_OK : + Nonempty CertificadoCuantoMinimoArea := + ⟨{ cuanto_pos := cuantoCuanticoElemental_pos + area_minima := cuantoCuanticoElemental_le_areaResolucionHd + no_menor := no_hay_resolucion_menor_que_cuanto_cuantico + escala_conserva := escala_no_negativa_conserva_cuanto_cuantico }⟩ + +end CuantoMinimoArea diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D12_ConmutadorEscalarFinito.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D12_ConmutadorEscalarFinito.lean new file mode 100644 index 000000000..830bccc2b --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D12_ConmutadorEscalarFinito.lean @@ -0,0 +1,96 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import Mathlib.Analysis.InnerProductSpace.PiL2 +public import Mathlib.LinearAlgebra.Matrix.Notation +public import Mathlib.LinearAlgebra.Matrix.Trace + +@[expose] public section + +/-! +# Obstrucción de traza al conmutador escalar en dimensión finita + +Complemento algebraico a la construcción de `T_d`, `P_d` en +`D3_GrafoCamino.lean`: en dimensión finita ningún conmutador matricial +puede ser un múltiplo escalar no nulo de la identidad, mientras que sí +existen pares de matrices unitarias que anticonmutan exactamente. + +Dos afirmaciones, independientes entre sí: + +1. Todo conmutador matricial `[Q,P] = QP - PQ` tiene traza cero + (`Matrix.trace_mul_comm`), así que nunca puede igualar `c • 1` para + `c ≠ 0` (`no_nonzero_scalar_exact_commutator`). +2. Esa obstrucción es sobre el conmutador aditivo; no impide la + no-conmutatividad multiplicativa: el par de matrices `2×2` + `W₁ = !![0,1;1,0]`, `W₂ = !![1,0;0,-1]` satisface exactamente + `W₂ W₁ = -(W₁ W₂)` (`parWeyl_anticonmuta`). +-/ + +noncomputable section + +namespace ConmutadorEscalarFinito + +/-- Conmutador matricial. -/ +def commutator {d : ℕ} + (Q P : Matrix (Fin d) (Fin d) ℂ) : Matrix (Fin d) (Fin d) ℂ := + Q * P - P * Q + +/-- La traza de todo conmutador matricial finito es cero. -/ +theorem trace_commutator_zero {d : ℕ} + (Q P : Matrix (Fin d) (Fin d) ℂ) : + Matrix.trace (commutator Q P) = 0 := by + rw [commutator, Matrix.trace_sub, Matrix.trace_mul_comm Q P, sub_self] + +/-- En dimensión finita positiva, un conmutador no puede ser un múltiplo +escalar no nulo de la identidad. -/ +theorem no_nonzero_scalar_exact_commutator {d : ℕ} (hd : 0 < d) + (Q P : Matrix (Fin d) (Fin d) ℂ) (c : ℂ) (hc : c ≠ 0) : + commutator Q P ≠ c • (1 : Matrix (Fin d) (Fin d) ℂ) := by + intro h + have ht := congrArg Matrix.trace h + have hleft : Matrix.trace (commutator Q P) = 0 := + trace_commutator_zero Q P + have hright : Matrix.trace (c • (1 : Matrix (Fin d) (Fin d) ℂ)) = c * d := by + simp + rw [hleft, hright] at ht + have hd0 : (d : ℂ) ≠ 0 := by + exact_mod_cast (Nat.ne_of_gt hd) + exact (mul_ne_zero hc hd0) ht.symm + +/-- Corolario: en particular, el conmutador tampoco puede igualar un +múltiplo imaginario `i·c` de la identidad para ningún real `c ≠ 0`. -/ +theorem commutador_ne_escalar_imaginario {d : ℕ} (hd : 0 < d) + (Q P : Matrix (Fin d) (Fin d) ℂ) (c : ℝ) (hc : c ≠ 0) : + commutator Q P ≠ (Complex.I * (c : ℂ)) • (1 : Matrix (Fin d) (Fin d) ℂ) := by + apply no_nonzero_scalar_exact_commutator hd Q P + exact mul_ne_zero Complex.I_ne_zero (Complex.ofReal_ne_zero.mpr hc) + +/-! ## Un par de Weyl exacto en dimensión dos -/ + +/-- Primera matriz del par de Weyl `2×2`. -/ +def W1 : Matrix (Fin 2) (Fin 2) ℂ := + !![0, 1; 1, 0] + +/-- Segunda matriz del par de Weyl `2×2`. -/ +def W2 : Matrix (Fin 2) (Fin 2) ℂ := + !![1, 0; 0, -1] + +/-- Relación de Weyl exacta: `W₂ W₁ = -(W₁ W₂)`. La obstrucción de traza de +arriba es sobre el conmutador *aditivo*; no impide esta anticonmutación +*multiplicativa* exacta en dimensión finita. -/ +theorem parWeyl_anticonmuta : W2 * W1 = -(W1 * W2) := by + ext i j + fin_cases i <;> fin_cases j <;> + norm_num [W1, W2, Matrix.mul_apply, Fin.sum_univ_two] + +/-- En particular, `W₁` y `W₂` no conmutan. -/ +theorem parWeyl_no_conmuta : W2 * W1 ≠ W1 * W2 := by + intro h + have hij := congrFun (congrFun h (0 : Fin 2)) (1 : Fin 2) + norm_num [W1, W2, Matrix.mul_apply, Fin.sum_univ_two] at hij + +end ConmutadorEscalarFinito diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D13_PrimeraRupturaCombinatoria.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D13_PrimeraRupturaCombinatoria.lean new file mode 100644 index 000000000..17b6ffd07 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D13_PrimeraRupturaCombinatoria.lean @@ -0,0 +1,116 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D3_GrafoCamino +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D7_Niven + +@[expose] public section + +/-! +# La primera ruptura combinatoria es `d = 4` + +Complemento combinatorio al teorema de Niven (`D7_Niven.lean`): la +saturación espectral de Robertson–Schrödinger sobre `P_d` deja de +cumplirse exactamente cuando `P_d` adquiere su primera arista *interior* +(una arista entre dos vértices que no son extremos del camino), y esa +coincidencia ocurre exactamente en `d = 4`. + +Dos rutas independientes hacia la misma dimensión: + +* **espectral** (`D7_Niven.lean`): `cos²(π/(d+1)) = (d-1)/4 ↔ d ∈ {2,3}`; +* **combinatoria** (aquí): `P_d` tiene una arista entre dos vértices + interiores si y sólo si `4 ≤ d`. + +`primera_ruptura_iff_dimension_cuatro` certifica que ambas rutas señalan +la misma dimensión `d = 4`, sin usar ninguna ecuación espectral en la +mitad combinatoria. +-/ + +namespace PrimeraRuptura + +open SimpleGraph + +/-- Ecuación aritmético-espectral que representa la saturación del camino +(la misma de `Gnomon.saturacion_iff`, escrita como predicado). -/ +def SaturacionCamino (d : ℕ) : Prop := + Real.cos (Real.pi / (d + 1)) ^ 2 = ((d : ℝ) - 1) / 4 + +/-- Ruptura: negación de la igualdad de saturación del camino. -/ +def RupturaCamino (d : ℕ) : Prop := ¬ SaturacionCamino d + +/-- Desde la dimensión mínima `2`, la ruptura ocurre exactamente desde `4`. -/ +theorem ruptura_camino_iff_cuatro_le (d : ℕ) (hd : 2 ≤ d) : + RupturaCamino d ↔ 4 ≤ d := by + unfold RupturaCamino SaturacionCamino + rw [Gnomon.saturacion_iff d hd] + omega + +/-- La dimensión cuatro ya está en ruptura. -/ +theorem ruptura_camino_cuatro : RupturaCamino 4 := by + exact (ruptura_camino_iff_cuatro_le 4 (by norm_num)).2 (by norm_num) + +/-- Predicado puramente combinatorio de vértice no terminal del camino. -/ +def VerticeInterior {d : ℕ} (i : Fin d) : Prop := + 0 < i.val ∧ i.val + 1 < d + +/-- Existe una arista genuinamente interior cuando dos vértices no +terminales del camino son adyacentes. -/ +def TieneAristaInterior (d : ℕ) : Prop := + ∃ i j : Fin d, + VerticeInterior i ∧ VerticeInterior j ∧ + (SimpleGraph.pathGraph d).Adj i j + +/-- El camino tiene una arista interior si y sólo si posee al menos cuatro +vértices. Esta equivalencia no usa Robertson ni la ecuación de saturación: +es pura combinatoria del camino. -/ +theorem tiene_arista_interior_iff_cuatro_le (d : ℕ) : + TieneAristaInterior d ↔ 4 ≤ d := by + constructor + · rintro ⟨i, j, hi, hj, hadj⟩ + rcases hi with ⟨hi0, hiend⟩ + rcases hj with ⟨hj0, hjend⟩ + rw [SimpleGraph.pathGraph_adj] at hadj + rcases hadj with hij | hji <;> omega + · intro hd + let i : Fin d := ⟨1, by omega⟩ + let j : Fin d := ⟨2, by omega⟩ + refine ⟨i, j, ?_, ?_, ?_⟩ + · simp [VerticeInterior, i] + omega + · simp [VerticeInterior, j] + omega + · rw [SimpleGraph.pathGraph_adj] + exact Or.inl rfl + +/-- Coincidencia central: dentro del régimen `d ≥ 2`, tener una arista entre +dos vértices interiores equivale exactamente a romper la saturación. Las dos +caras se demuestran por rutas independientes: combinatoria y espectral. -/ +theorem transporte_interior_iff_ruptura (d : ℕ) (hd : 2 ≤ d) : + TieneAristaInterior d ↔ RupturaCamino d := by + exact (tiene_arista_interior_iff_cuatro_le d).trans + (ruptura_camino_iff_cuatro_le d hd).symm + +/-- La primera ruptura es una propiedad de orden: hay ruptura en `d`, y `d` +es menor o igual que cualquier otra dimensión admisible que también rompa. -/ +def EsPrimeraRuptura (d : ℕ) : Prop := + 2 ≤ d ∧ RupturaCamino d ∧ + ∀ n : ℕ, 2 ≤ n → RupturaCamino n → d ≤ n + +/-- Caracterización dimensional: la primera ruptura es exactamente `d = 4`. -/ +theorem primera_ruptura_iff_dimension_cuatro (d : ℕ) : + EsPrimeraRuptura d ↔ d = 4 := by + constructor + · rintro ⟨hd2, hdR, hmin⟩ + have h4d : 4 ≤ d := (ruptura_camino_iff_cuatro_le d hd2).1 hdR + have hd4 : d ≤ 4 := hmin 4 (by norm_num) ruptura_camino_cuatro + omega + · rintro rfl + refine ⟨by norm_num, ruptura_camino_cuatro, ?_⟩ + intro n hn2 hnR + exact (ruptura_camino_iff_cuatro_le n hn2).1 hnR + +end PrimeraRuptura diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D14_ExcesoBrechaSzego.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D14_ExcesoBrechaSzego.lean new file mode 100644 index 000000000..8fc66ab05 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D14_ExcesoBrechaSzego.lean @@ -0,0 +1,61 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D9_Monotonia + +@[expose] public section + +/-! +# El exceso sobre el límite de Szegő + +Corolario aritmético directo de la monotonía (`D9_Monotonia.lean`) y el +límite de Szegő (`D8_Szego.lean`): el "exceso" `Cinf - CNava(d)` —cuánto +le falta a `CNava(d)` para alcanzar el límite `C∞`— es positivo, máximo +exactamente en `d = 4`, estrictamente decreciente en `d`, y se disuelve a +`0`. No es un pilar nuevo: es la misma cadena de `D9_Monotonia.lean` leída +desde el lado del remanente en vez del valor mismo. +-/ + +open Filter +open scoped Topology + +namespace Gnomon + +/-- El exceso de coherencia: cuánto le falta a `CNava(d)` para alcanzar el +límite de Szegő `C∞`. -/ +noncomputable def excesoBrecha (d : ℕ) : ℝ := Cinf - CNava d + +/-- El exceso es siempre positivo: `CNava(d)` nunca alcanza `C∞` a `d` +finito. -/ +theorem excesoBrecha_pos (d : ℕ) (hd : 4 ≤ d) : 0 < excesoBrecha d := by + unfold excesoBrecha + linarith [CNava_lt_Cinf d hd] + +/-- El exceso es estrictamente decreciente en `d`, heredado de la +monotonía de `CNava`. -/ +theorem excesoBrecha_strictAnti {a b : ℕ} (ha : 4 ≤ a) (hb : 4 ≤ b) (hab : a < b) : + excesoBrecha b < excesoBrecha a := by + unfold excesoBrecha + linarith [CNava_strictMonoOn_ge_four ha hb hab] + +/-- El exceso máximo de toda la cola `d ≥ 4` se alcanza exactamente en +`d = 4`: el mínimo global de `CNava` es el techo del exceso. -/ +theorem excesoBrecha_le_four (d : ℕ) (hd : 4 ≤ d) : + excesoBrecha d ≤ excesoBrecha 4 := by + unfold excesoBrecha + linarith [CNava_four_le d hd] + +/-- El exceso se apaga por completo: `Cinf − CNava(d) → 0`, acotado arriba +por `excesoBrecha 4` y llevado a `0` por el límite de Szegő. -/ +theorem excesoBrecha_tendsto_zero : + Tendsto (fun d : ℕ => excesoBrecha d) atTop (𝓝 0) := by + unfold excesoBrecha + have h : Tendsto (fun d : ℕ => Cinf - CNava d) atTop (𝓝 (Cinf - Cinf)) := + limite_szego_CNava.const_sub Cinf + simpa using h + +end Gnomon diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D15_IdentidadCosecanteChebyshev.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D15_IdentidadCosecanteChebyshev.lean new file mode 100644 index 000000000..1a67035d5 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D15_IdentidadCosecanteChebyshev.lean @@ -0,0 +1,267 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import Mathlib.RingTheory.Polynomial.Chebyshev +public import Mathlib.Analysis.Calculus.Deriv.Polynomial +public import Mathlib.Analysis.Calculus.Deriv.Comp +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.Basic +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.RootsExtrema +public import Mathlib.Algebra.Polynomial.Splits + +@[expose] public section + +/-! +# Identidad cosecante clásica vía Chebyshev + +Identidad clásica de análisis, autocontenida: +\[ +\sum_{k=1}^{N-1}\csc^2(k\pi/N)=(N^2-1)/3. +\] +Prueba vía el polinomio de Chebyshev de segunda especie `U_{N-1}`: sus +raíces son `cos(kπ/N)`, y la derivada logarítmica evaluada en `±1` +(descomponiendo `1/(1-x²) = ½(1/(1-x) + 1/(1+x))`) da la suma cerrada. + +No depende de ningún objeto definido en otro archivo de este paquete: es +un resultado de análisis clásico, completo en sí mismo sobre `Mathlib`. +-/ + +noncomputable section + +set_option maxHeartbeats 1000000 + +open Polynomial Polynomial.Chebyshev Real +open scoped BigOperators + +namespace IdentidadCosecanteChebyshev + +/-! ## Chebyshev: `U_n` se parte en lineales reales -/ + +theorem U_splits_real (n : ℕ) : (U ℝ n).Splits := by + rw [splits_iff_card_roots] + cases n with + | zero => + simp [U_zero] + | succ m => + set N := m + 1 with hN + have hdeg : (U ℝ N).natDegree = N := natDegree_U_natCast (R := ℝ) N + rw [roots_U_real N] + have hinj : + Set.InjOn (fun k : ℕ ↦ cos ((k + 1) * π / (N + 1))) (Finset.range N) := + (Finset.range N).nodup_map_iff_injOn.mp (roots_U_real_nodup N) + have hcard : + ((Finset.range N).image fun k : ℕ ↦ + cos ((k + 1) * π / (N + 1))).card = N := by + rw [Finset.card_image_of_injOn hinj, Finset.card_range] + show (Multiset.card _) = _ + rw [hdeg] + exact hcard + +/-! ## Derivadas de `U_n` en `±1` -/ + +theorem U_deriv_eval_one (n : ℕ) : + (derivative (U ℝ (n : ℤ))).eval (1 : ℝ) = + ((n : ℝ) + 2) * ((n : ℝ) + 1) * (n : ℝ) / 3 := by + have h := derivative_U_eval_one (R := ℝ) (n : ℤ) + -- `3 * U'(1) = (n+2)(n+1)n` con coerciones enteras + push_cast at h + linarith + +theorem U_deriv_eval_neg_one (n : ℕ) : + (derivative (U ℝ (n : ℤ))).eval (-1 : ℝ) = + -((-1 : ℝ) ^ n) * + (((n : ℝ) + 2) * ((n : ℝ) + 1) * (n : ℝ) / 3) := by + -- Paridad: U_n(-x) = (-1)^n U_n(x) + have hfun : + (fun x : ℝ ↦ (U ℝ (n : ℤ)).eval (-x)) = + fun x ↦ (-1 : ℝ) ^ n * (U ℝ (n : ℤ)).eval x := by + funext x + rw [U_eval_neg (R := ℝ) n x, Int.cast_negOnePow_natCast] + have hL : HasDerivAt (fun x : ℝ ↦ (U ℝ (n : ℤ)).eval (-x)) + (-(derivative (U ℝ (n : ℤ))).eval (-1)) 1 := by + have h := (U ℝ (n : ℤ)).hasDerivAt (-1 : ℝ) + have hc := h.comp (1 : ℝ) (hasDerivAt_id' (𝕜 := ℝ) 1).neg + rw [mul_neg_one] at hc + exact hc + have hR : HasDerivAt + (fun x : ℝ ↦ (-1 : ℝ) ^ n * (U ℝ (n : ℤ)).eval x) + ((-1 : ℝ) ^ n * (derivative (U ℝ (n : ℤ))).eval 1) 1 := + ((U ℝ (n : ℤ)).hasDerivAt (1 : ℝ)).const_mul _ + have heq : HasDerivAt (fun x : ℝ ↦ (U ℝ (n : ℤ)).eval (-x)) + ((-1 : ℝ) ^ n * (derivative (U ℝ (n : ℤ))).eval 1) 1 := + hfun ▸ hR + have hder := HasDerivAt.unique hL heq + -- -U'(-1) = (-1)^n U'(1) + have hUd1 := U_deriv_eval_one n + rw [hUd1] at hder + linarith + +/-! ## Sumas sobre raíces -/ + +theorem sum_one_div_one_sub_roots (n : ℕ) (hn : 1 ≤ n) : + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 - z)).sum = + (((n : ℝ) + 1) ^ 2 - 1) / 3 := by + have hsplit : (U ℝ (n : ℤ)).Splits := U_splits_real n + have hne : (U ℝ (n : ℤ)).eval (1 : ℝ) ≠ 0 := by + rw [U_eval_one]; positivity + have hlog := hsplit.eval_derivative_div_eval_of_ne_zero hne + have hU1 : (U ℝ (n : ℤ)).eval (1 : ℝ) = (n : ℝ) + 1 := by + simp + have hUd := U_deriv_eval_one n + have hratio : + (derivative (U ℝ (n : ℤ))).eval (1 : ℝ) / (U ℝ (n : ℤ)).eval (1 : ℝ) = + (((n : ℝ) + 1) ^ 2 - 1) / 3 := by + rw [hUd, hU1] + have : (n : ℝ) + 1 ≠ 0 := by positivity + field_simp [this]; ring + rw [← hratio, hlog] + +theorem sum_one_div_one_add_roots (n : ℕ) (hn : 1 ≤ n) : + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 + z)).sum = + (((n : ℝ) + 1) ^ 2 - 1) / 3 := by + have hsplit : (U ℝ (n : ℤ)).Splits := U_splits_real n + have hU : (U ℝ (n : ℤ)).eval (-1 : ℝ) = (-1 : ℝ) ^ n * ((n : ℝ) + 1) := by + rw [U_eval_neg_one (R := ℝ) (n : ℤ), Int.cast_negOnePow_natCast] + push_cast; ring + have hn1 : (n : ℝ) + 1 ≠ 0 := by positivity + have hpow : (-1 : ℝ) ^ n ≠ 0 := pow_ne_zero n (by norm_num) + have hne : (U ℝ (n : ℤ)).eval (-1 : ℝ) ≠ 0 := by + rw [hU]; exact mul_ne_zero hpow hn1 + have hlog := hsplit.eval_derivative_div_eval_of_ne_zero hne + -- U'(-1)/U(-1) = ∑ 1/(-1-z) = -∑ 1/(1+z) + have hUd := U_deriv_eval_neg_one n + have hratio : + (derivative (U ℝ (n : ℤ))).eval (-1 : ℝ) / (U ℝ (n : ℤ)).eval (-1 : ℝ) = + -((((n : ℝ) + 1) ^ 2 - 1) / 3) := by + rw [hUd, hU] + field_simp [hpow, hn1]; ring + have hmap : + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (-1 - z)).sum = + -((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 + z)).sum := by + have hpt : + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (-1 - z)) = + (U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ -((1 : ℝ) / (1 + z)) := by + refine Multiset.map_congr rfl fun z _ => ?_ + have : (-1 - z : ℝ) = -(1 + z) := by ring + rw [this, div_neg] + rw [hpt, Multiset.sum_map_neg] + have : -((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 + z)).sum = + -((((n : ℝ) + 1) ^ 2 - 1) / 3) := by + rwa [← hmap, ← hlog] + linarith + +theorem root_abs_lt_one {n : ℕ} {z : ℝ} + (hz : z ∈ (U ℝ (n : ℤ)).roots) (hn : 1 ≤ n) : |z| < 1 := by + have hroots := roots_U_real n + rw [hroots, Finset.mem_val, Finset.mem_image] at hz + obtain ⟨k, hk, rfl⟩ := hz + have hklt : k < n := Finset.mem_range.mp hk + have hθpos : 0 < (k + 1 : ℝ) * π / (n + 1) := by positivity + have hθlt : (k + 1 : ℝ) * π / (n + 1) < π := by + have : (k + 1 : ℝ) ≤ n := by exact_mod_cast Nat.succ_le_of_lt hklt + calc + (k + 1 : ℝ) * π / (n + 1) ≤ n * π / (n + 1) := by gcongr + _ < π := by + rw [div_lt_iff₀ (by positivity)] + nlinarith [pi_pos] + have hsin : 0 < sin ((k + 1 : ℝ) * π / (n + 1)) := + sin_pos_of_pos_of_lt_pi hθpos hθlt + have hpyth := sin_sq_add_cos_sq ((k + 1 : ℝ) * π / (n + 1)) + have hsq : cos ((k + 1 : ℝ) * π / (n + 1)) ^ 2 < 1 := by + nlinarith [mul_pos hsin hsin] + exact (sq_lt_one_iff_abs_lt_one _).mp hsq + +theorem sum_one_div_one_sub_sq_roots (n : ℕ) (hn : 1 ≤ n) : + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 - z ^ 2)).sum = + (((n : ℝ) + 1) ^ 2 - 1) / 3 := by + have h1 := sum_one_div_one_sub_roots n hn + have h2 := sum_one_div_one_add_roots n hn + have hpoint (z : ℝ) (hz : z ∈ (U ℝ (n : ℤ)).roots) : + (1 : ℝ) / (1 - z ^ 2) = + (1 / 2 : ℝ) * ((1 : ℝ) / (1 - z) + (1 : ℝ) / (1 + z)) := by + have habs := root_abs_lt_one hz hn + have hz1 : z ≠ 1 := by + intro h; rw [h, abs_one] at habs; linarith + have hzm1 : z ≠ -1 := by + intro h; rw [h, abs_neg, abs_one] at habs; linarith + have hden : (1 - z ^ 2 : ℝ) ≠ 0 := by + intro h + have : z ^ 2 = 1 := by linarith + have : |z| = 1 := (sq_eq_one_iff.mp this).elim (by intro; simp [*]) (by intro; simp [*]) + -- |z|=1 contradice |z|<1 + linarith [habs] + have hz1' : (1 - z : ℝ) ≠ 0 := sub_ne_zero.mpr (Ne.symm hz1) + have hzm : (1 + z : ℝ) ≠ 0 := by + intro h; exact hzm1 (by linarith) + field_simp [hz1', hzm, hden] + ring + -- levantar la identidad puntual a la suma sobre el multiconjunto + have hdecomp : + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 - z ^ 2)).sum = + (1 / 2 : ℝ) * + (((U ℝ (n : ℤ)).roots.map fun z ↦ (1 : ℝ) / (1 - z)).sum + + ((U ℝ (n : ℤ)).roots.map fun z ↦ (1 : ℝ) / (1 + z)).sum) := by + classical + calc + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 - z ^ 2)).sum + = ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ + (1 / 2 : ℝ) * ((1 : ℝ) / (1 - z) + (1 : ℝ) / (1 + z))).sum := by + refine congr_arg Multiset.sum (Multiset.map_congr rfl fun z hz => hpoint z hz) + _ = (1 / 2 : ℝ) * + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ + ((1 : ℝ) / (1 - z) + (1 : ℝ) / (1 + z))).sum := by + simp [Multiset.sum_map_mul_left] + _ = (1 / 2 : ℝ) * + (((U ℝ (n : ℤ)).roots.map fun z ↦ (1 : ℝ) / (1 - z)).sum + + ((U ℝ (n : ℤ)).roots.map fun z ↦ (1 : ℝ) / (1 + z)).sum) := by + simp [Multiset.sum_map_add] + rw [hdecomp, h1, h2] + ring + +/-- **Identidad cosecante clásica.** `∑_{k=1}^{N-1} csc²(kπ/N) = (N²-1)/3`. -/ +theorem sum_csc_sq (N : ℕ) (hN : 2 ≤ N) : + ∑ k ∈ Finset.Ico 1 N, (sin ((k : ℝ) * π / N))⁻¹ ^ 2 = + ((N : ℝ) ^ 2 - 1) / 3 := by + obtain ⟨n, rfl⟩ : ∃ n, N = n + 1 := ⟨N - 1, by omega⟩ + have hn : 1 ≤ n := by omega + have hsum := sum_one_div_one_sub_sq_roots n hn + classical + have hinj : + Set.InjOn (fun k : ℕ ↦ cos ((k + 1) * π / (n + 1))) (Finset.range n) := + (Finset.range n).nodup_map_iff_injOn.mp (roots_U_real_nodup n) + -- suma sobre raíces vista como multiconjunto → suma sobre `range n` + have hfin : + ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 - z ^ 2)).sum = + ∑ k ∈ Finset.range n, + (1 : ℝ) / (1 - cos ((k + 1 : ℝ) * π / (n + 1)) ^ 2) := by + rw [roots_U_real n, Finset.image_val_of_injOn hinj, Multiset.map_map] + rfl + -- 1 - cos² = sin² + have hsin : + ∑ k ∈ Finset.range n, + (1 : ℝ) / (1 - cos ((k + 1 : ℝ) * π / (n + 1)) ^ 2) = + ∑ k ∈ Finset.range n, (sin ((k + 1 : ℝ) * π / (n + 1)))⁻¹ ^ 2 := by + refine Finset.sum_congr rfl fun k hk => ?_ + have h1 : (1 : ℝ) - cos ((k + 1 : ℝ) * π / (n + 1)) ^ 2 = + sin ((k + 1 : ℝ) * π / (n + 1)) ^ 2 := by + linarith [sin_sq_add_cos_sq ((k + 1 : ℝ) * π / (n + 1))] + rw [h1, one_div, inv_pow] + -- reindexar `Ico 1 (n+1)` como imagen de `range n` bajo `·+1` + have himg : + Finset.Ico 1 (n + 1) = (Finset.range n).image (fun k ↦ k + 1) := by + ext k + simp only [Finset.mem_Ico, Finset.mem_image, Finset.mem_range] + constructor + · rintro ⟨h1, h2⟩ + exact ⟨k - 1, by omega, by omega⟩ + · rintro ⟨j, hj, rfl⟩ + omega + rw [himg, Finset.sum_image (fun x _ y _ h => by simpa using h)] + push_cast + rw [← hsin, ← hfin] + exact hsum + +end IdentidadCosecanteChebyshev diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D8_Szego.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D8_Szego.lean new file mode 100644 index 000000000..92122fc92 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D8_Szego.lean @@ -0,0 +1,661 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Algebra.Ring.IsFormallyReal +public import Mathlib.Analysis.Real.Pi.Bounds +public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Sinc +public import Mathlib.Tactic.IntervalCases + +@[expose] public section + +/-! +# D8 — El límite de Szegő y la positividad de la brecha + +Define la constante de coherencia finita `C_Nava(d)` (forma cerrada exacta +en `cos`/`sin` de `π/(d+1)`) y su brecha `deltaGeom(d) = C_Nava(d) − 1`. +Dos resultados centrales: + +1. **Positividad** (`deltaGeom_pos_of_four_le`): `deltaGeom(d) > 0` para + todo `d ≥ 4`. Se verifica `d = 4, 5` en forma cerrada exacta y `d ≥ 6` + mediante cotas de Taylor certificadas para seno y coseno — sin apelar a + ningún cálculo numérico externo, sólo álgebra racional y las cotas + `Real.pi_gt_d2`/`Real.pi_lt_d2` de Mathlib. +2. **Límite de Szegő** (`limite_szego_CNava`): `C_Nava(d) → C_∞ = √(π²/3−2)` + cuando `d → ∞` (como filtro `atTop` sobre la sucesión de espacios + finitos, no como un nuevo espacio de Hilbert en `d = ∞`; ver + `infinito_no_es_dimension_sino_limite`). En particular + `deltaInf = C_∞ − 1 > 0`, consecuencia exacta de `π > 3`. +-/ + +noncomputable section + +open Real +open Filter +open scoped Topology + +namespace Gnomon + +/-! ## Forma cerrada y límite asintótico -/ + +/-- `N = d + 1`, notación para el grafo camino `pathGraph d`. -/ +noncomputable def Nreal (d : ℕ) : ℝ := (d : ℝ) + 1 + +/-- Ángulo espectral fundamental `θ_d = π/(d+1)`. -/ +noncomputable def theta (d : ℕ) : ℝ := π / Nreal d + +/-- Forma cerrada exacta de `C_Nava(d)²`. -/ +noncomputable def CNavaSq (d : ℕ) : ℝ := + 2 * ((d : ℝ) - 1) / (Nreal d * Real.cos (theta d) ^ 2) * + (((Nreal d ^ 2 + 2) / 6) * Real.sin (theta d) ^ 2 - 1) + +/-- Constante de coherencia finita. -/ +noncomputable def CNava (d : ℕ) : ℝ := Real.sqrt (CNavaSq d) + +/-- Límite universal de Szegő. -/ +noncomputable def Cinf : ℝ := Real.sqrt (π ^ 2 / 3 - 2) + +/-- Defecto geométrico finito `δ_geom(d) = C_Nava(d) - 1`. -/ +noncomputable def deltaGeom (d : ℕ) : ℝ := CNava d - 1 + +/-- Defecto asintótico `δ_∞ = C_∞ - 1`. -/ +noncomputable def deltaInf : ℝ := Cinf - 1 + +/-- Término principal de la expansión de Szegő. -/ +noncomputable def deltaSzegoPrincipal (d : ℕ) : ℝ := + deltaInf - Cinf / Nreal d + +theorem CNavaSq_forma_cerrada (d : ℕ) : + CNavaSq d = + 2 * ((d : ℝ) - 1) / (Nreal d * Real.cos (theta d) ^ 2) * + (((Nreal d ^ 2 + 2) / 6) * Real.sin (theta d) ^ 2 - 1) := rfl + +/-- La forma cerrada reescrita mediante `sinc`. Elimina la singularidad +aparente y permite tomar el límite en Lean. -/ +theorem CNavaSq_forma_regularizada (d : ℕ) : + CNavaSq d = + 2 * (1 - 2 / Nreal d) / Real.cos (theta d) ^ 2 * + ((π ^ 2 * Real.sinc (theta d) ^ 2 + + 2 * Real.sin (theta d) ^ 2) / 6 - 1) := by + have hN : Nreal d ≠ 0 := by + unfold Nreal + positivity + have ht : theta d ≠ 0 := by + unfold theta + exact div_ne_zero Real.pi_ne_zero hN + rw [CNavaSq, Real.sinc_of_ne_zero ht] + unfold theta Nreal + field_simp + ring + +theorem Nreal_tendsto_atTop : Tendsto Nreal atTop atTop := by + unfold Nreal + exact tendsto_atTop_add_const_right atTop 1 tendsto_natCast_atTop_atTop + +theorem theta_tendsto_zero : Tendsto theta atTop (𝓝 0) := by + unfold theta + exact Nreal_tendsto_atTop.const_div_atTop π + +private theorem CNavaSq_regularizada_tendsto : + Tendsto + (fun d : ℕ => + 2 * (1 - 2 / Nreal d) / Real.cos (theta d) ^ 2 * + ((π ^ 2 * Real.sinc (theta d) ^ 2 + + 2 * Real.sin (theta d) ^ 2) / 6 - 1)) + atTop (𝓝 (π ^ 2 / 3 - 2)) := by + have hratio : Tendsto (fun d : ℕ => 1 - 2 / Nreal d) atTop (𝓝 1) := by + convert tendsto_const_nhds.sub + (Nreal_tendsto_atTop.const_div_atTop 2) using 1 + norm_num + have hcos : Tendsto + (fun d : ℕ => Real.cos (theta d) ^ 2) atTop (𝓝 1) := by + simpa [Real.cos_zero] using + (Real.continuous_cos.continuousAt.tendsto.comp theta_tendsto_zero).pow 2 + have hsinc : Tendsto + (fun d : ℕ => Real.sinc (theta d) ^ 2) atTop (𝓝 1) := by + simpa [Real.sinc_zero] using + (Real.continuous_sinc.continuousAt.tendsto.comp theta_tendsto_zero).pow 2 + have hsin : Tendsto + (fun d : ℕ => Real.sin (theta d) ^ 2) atTop (𝓝 0) := by + simpa [Real.sin_zero] using + (Real.continuous_sin.continuousAt.tendsto.comp theta_tendsto_zero).pow 2 + have hbracket : Tendsto + (fun d : ℕ => + (π ^ 2 * Real.sinc (theta d) ^ 2 + + 2 * Real.sin (theta d) ^ 2) / 6 - 1) + atTop (𝓝 (π ^ 2 / 6 - 1)) := by + convert ((tendsto_const_nhds.mul hsinc).add + (tendsto_const_nhds.mul hsin)).div_const 6 |>.sub_const 1 using 1 + ring_nf + have hfactor : Tendsto + (fun d : ℕ => 2 * (1 - 2 / Nreal d) / Real.cos (theta d) ^ 2) + atTop (𝓝 2) := by + have htworatio : Tendsto + (fun d : ℕ => (2 : ℝ) * (1 - 2 / Nreal d)) + atTop (𝓝 ((2 : ℝ) * 1)) := + tendsto_const_nhds.mul hratio + convert htworatio.div hcos (by norm_num : (1 : ℝ) ≠ 0) using 1 + · ext d + simp [Pi.div_apply] + · norm_num + convert hfactor.mul hbracket using 1 + · ext d + ring_nf + +/-- TEOREMA DE SZEGŐ, forma cuadrática: `C_Nava(d)² → (π²-6)/3`. -/ +theorem limite_szego_CNavaSq : + Tendsto CNavaSq atTop (𝓝 (π ^ 2 / 3 - 2)) := by + apply CNavaSq_regularizada_tendsto.congr' + filter_upwards with d + exact (CNavaSq_forma_regularizada d).symm + +/-- LÍMITE DE SZEGŐ: `C_Nava(d) → C_∞ = √((π²-6)/3)`, construido sobre la +teoría clásica de distribución espectral de Szegő. -/ +theorem limite_szego_CNava : Tendsto CNava atTop (𝓝 Cinf) := by + unfold CNava Cinf + exact Real.continuous_sqrt.continuousAt.tendsto.comp limite_szego_CNavaSq + +/-- Nombre citable de la especialización. Es un alias del resultado ya +demostrado, no una rederivación de la teoría clásica de Toeplitz/Szegő. -/ +theorem limite_nava_szego_CNava : Tendsto CNava atTop (𝓝 Cinf) := + limite_szego_CNava + +/-- El defecto geométrico converge al defecto universal asintótico. -/ +theorem limite_defecto_geometrico : + Tendsto deltaGeom atTop (𝓝 deltaInf) := by + unfold deltaGeom deltaInf + exact limite_szego_CNava.sub_const 1 + +/-- El defecto universal jamás se anula: `δ_∞ > 0`, consecuencia exacta de +`π > 3`. -/ +theorem deltaInf_pos : 0 < deltaInf := by + unfold deltaInf Cinf + have hpi : (3 : ℝ) < π := Real.pi_gt_three + have hx : (1 : ℝ) < π ^ 2 / 3 - 2 := by + nlinarith [Real.pi_pos] + have hs := Real.sqrt_lt_sqrt (by norm_num : (0 : ℝ) ≤ 1) hx + rw [Real.sqrt_one] at hs + linarith + +/-- El infinito no se añade como una dimensión realizada: la sucesión de +defectos finitos sólo converge al valor límite estricto `δ∞ = C∞ - 1`. -/ +theorem infinito_no_es_dimension_sino_limite : + Tendsto deltaGeom atTop (𝓝 deltaInf) ∧ deltaInf = Cinf - 1 ∧ 0 < deltaInf := + ⟨limite_defecto_geometrico, rfl, deltaInf_pos⟩ + +theorem Cinf_pos : 0 < Cinf := by + have h := deltaInf_pos + unfold deltaInf at h + linarith + +/-- Monotonía asintótica: el término principal `δ_∞ - C_∞/(d+1)` de la +expansión de Szegő es estrictamente creciente. -/ +theorem deltaSzegoPrincipal_strictMono : StrictMono deltaSzegoPrincipal := by + intro a b hab + have hNa : 0 < Nreal a := by + unfold Nreal + positivity + have hNlt : Nreal a < Nreal b := by + have habr : (a : ℝ) < b := by exact_mod_cast hab + unfold Nreal + linarith + have hinv : 1 / Nreal b < 1 / Nreal a := + one_div_lt_one_div_of_lt hNa hNlt + unfold deltaSzegoPrincipal + have hmul := mul_lt_mul_of_pos_left hinv Cinf_pos + simpa [div_eq_mul_inv] using sub_lt_sub_left hmul deltaInf + +/-! ## Positividad de la brecha para `d ≥ 4` + +Niven cierra la ecuación de saturación en `d ∈ {2,3}` (`D7_Niven.lean`). +Lo que sigue traduce ese hecho trigonométrico a la desigualdad algebraica +`1 < CNava(d)` (equivalentemente `0 < deltaGeom d`) para todo `d ≥ 4`, +verificando los casos `d = 4, 5` en forma cerrada exacta y `d ≥ 6` mediante +las mismas cotas de Taylor certificadas usadas arriba para el límite. -/ + +/-! ## Consecuencia: `δ_geom(d) > 0` para todo `d ≥ 4` + +Niven cierra la ecuación de saturación en `d ∈ {2,3}`. El resto de esta +sección traduce ese hecho trigonométrico a la desigualdad algebraica +`1 < CNava(d)` (equivalentemente `0 < deltaGeom d`) para todo `d ≥ 4`, +verificando los casos `d = 4, 5` en forma cerrada exacta y `d ≥ 6` mediante +cotas de Taylor certificadas para seno y coseno (sin apelar a ningún +resultado numérico externo: sólo `Real.pi_gt_d2`/`pi_lt_d2` de Mathlib y +álgebra racional). -/ + +theorem CNavaSq_two : CNavaSq 2 = 1 := by + simp only [CNavaSq, Nreal, theta, Nat.cast_ofNat] + rw [show (2:ℝ)+1 = 3 by norm_num, show (2:ℝ)-1 = 1 by norm_num] + rw [cos_pi_div_three, sin_pi_div_three] + have h3 : (√3)^2 = (3:ℝ) := sq_sqrt (by norm_num) + have hs : (√3 / 2)^2 = (3:ℝ)/4 := by rw [div_pow, h3]; norm_num + simp [hs]; norm_num + +theorem CNavaSq_three : CNavaSq 3 = 1 := by + simp only [CNavaSq, Nreal, theta, Nat.cast_ofNat] + rw [show (3:ℝ)+1 = 4 by norm_num, show (3:ℝ)-1 = 2 by norm_num] + rw [cos_pi_div_four, sin_pi_div_four] + have h2 : (√2)^2 = (2:ℝ) := sq_sqrt (by norm_num) + have hs : (√2 / 2)^2 = (2:ℝ)/4 := by rw [div_pow, h2]; norm_num + simp [hs]; norm_num + +theorem CNavaSq_four_eq : CNavaSq 4 = (99 - 42 * √5) / 5 := by + simp only [CNavaSq, Nreal, theta, Nat.cast_ofNat] + rw [show (4:ℝ)+1 = 5 by norm_num, show (4:ℝ)-1 = 3 by norm_num] + have hc0 : cos (π / 5) = (1 + √5) / 4 := cos_pi_div_five + have hs5 : (√5)^2 = (5:ℝ) := sq_sqrt (by norm_num) + have hcos2 : cos (π / 5)^2 = (3 + √5) / 8 := by + rw [hc0]; ring_nf; simp [hs5]; ring + have hsin2 : sin (π / 5)^2 = (5 - √5) / 8 := by + have : sin (π / 5)^2 = 1 - cos (π / 5)^2 := by + rw [← sin_sq_add_cos_sq (π / 5)]; ring + rw [this, hcos2]; ring + rw [hcos2, hsin2] + ring_nf; field_simp; ring_nf; simp [hs5]; ring + +theorem one_lt_CNavaSq_four : 1 < CNavaSq 4 := by + rw [CNavaSq_four_eq] + have h5 : (0:ℝ) < 5 := by norm_num + rw [one_lt_div h5] + have h : √5 < (47:ℝ) / 21 := by + rw [sqrt_lt (by norm_num : (0:ℝ) ≤ 5) (by positivity)]; norm_num + have hs : (√5)^2 = (5:ℝ) := sq_sqrt (by norm_num) + nlinarith [hs, h, sqrt_nonneg 5] + +theorem CNavaSq_five : CNavaSq 5 = (28:ℝ)/27 := by + simp only [CNavaSq, Nreal, theta, Nat.cast_ofNat] + rw [show (5:ℝ)+1 = 6 by norm_num, show (5:ℝ)-1 = 4 by norm_num] + rw [cos_pi_div_six, sin_pi_div_six] + have h3 : (√3)^2 = (3:ℝ) := sq_sqrt (by norm_num) + have hc : (√3 / 2)^2 = (3:ℝ)/4 := by rw [div_pow, h3]; norm_num + simp [hc]; norm_num + +theorem one_lt_CNavaSq_five : 1 < CNavaSq 5 := by + rw [CNavaSq_five]; norm_num + +theorem one_lt_CNavaSq_six : 1 < CNavaSq 6 := by + simp only [CNavaSq, Nreal, theta, Nat.cast_ofNat] + rw [show (6:ℝ)+1 = 7 by norm_num, show (6:ℝ)-1 = 5 by norm_num] + set θ := π / 7 + have h7 : (0:ℝ) < 7 := by norm_num + have hθpos : 0 < θ := div_pos pi_pos h7 + have hθlt : θ < π / 2 := by + rw [div_lt_div_iff₀ h7 (by norm_num : (0:ℝ)<2)]; nlinarith [pi_pos] + have hπlo : (314:ℝ)/100 < π := by have := pi_gt_d2; norm_num at this ⊢; linarith + have hπhi : π < (315:ℝ)/100 := by have := pi_lt_d2; norm_num at this ⊢; linarith + have hθ_lt_one : θ < 1 := by + have : θ < (315:ℝ)/100 / 7 := by + simp only [θ]; exact div_lt_div_of_pos_right hπhi h7 + exact lt_trans this (by norm_num) + have hs0pos : 0 < θ - θ^3/6 := by + have : θ^2 < 6 := by nlinarith [hθpos, hθ_lt_one] + nlinarith [hθpos, this] + have hsin : θ - θ^3/6 < sin θ := sin_gt_sub_cube hθpos + set s0 := θ - θ^3/6 + have hcos_pos : 0 < cos θ := cos_pos_of_mem_Ioo ⟨by linarith [pi_pos, hθpos], hθlt⟩ + have hcos2 : cos θ ^ 2 < 1 - s0 ^ 2 := by + have hsq : s0^2 < sin θ ^ 2 := + pow_lt_pow_left₀ hsin (le_of_lt hs0pos) (by norm_num) + have : cos θ ^ 2 = 1 - sin θ ^ 2 := by rw [← sin_sq_add_cos_sq θ]; ring + linarith + have hs0_bound : + s0 ≥ ((314:ℝ)/100 / 7) * (1 - ((315:ℝ)/100 / 7)^2 / 6) := by + have hs0θ : s0 = θ * (1 - θ^2/6) := by ring + have hθlo : (314:ℝ)/100 / 7 ≤ θ := by + simp only [θ]; exact div_le_div_of_nonneg_right hπlo.le (le_of_lt h7) + have hθhi2 : θ ≤ (315:ℝ)/100 / 7 := by + simp only [θ]; exact div_le_div_of_nonneg_right hπhi.le (le_of_lt h7) + have hfac : 1 - θ^2/6 ≥ 1 - ((315:ℝ)/100 / 7)^2 / 6 := by + nlinarith [hθpos, hθhi2] + rw [hs0θ]; nlinarith [hθlo, hfac, hθpos] + have hpos_lo : + (0:ℝ) ≤ ((314:ℝ)/100 / 7) * (1 - ((315:ℝ)/100 / 7)^2 / 6) := by + norm_num + have hs0sq : + s0^2 ≥ (((314:ℝ)/100 / 7) * (1 - ((315:ℝ)/100 / 7)^2 / 6))^2 := + pow_le_pow_left₀ hpos_lo hs0_bound 2 + have h1s0 : + 1 - s0^2 ≤ + 1 - (((314:ℝ)/100 / 7) * (1 - ((315:ℝ)/100 / 7)^2 / 6))^2 := by + nlinarith [hs0sq] + have hlt_thr : + 1 - (((314:ℝ)/100 / 7) * (1 - ((315:ℝ)/100 / 7)^2 / 6))^2 < + (75:ℝ)/92 := by + norm_num + have hcos_thr : cos θ ^ 2 < (75:ℝ)/92 := + lt_of_lt_of_le hcos2 (le_trans h1s0 hlt_thr.le) + have hs : sin θ ^ 2 = 1 - cos θ ^ 2 := by + rw [← sin_sq_add_cos_sq θ]; ring + rw [hs] + set c := cos θ ^ 2 + have hcpos : 0 < c := sq_pos_of_pos hcos_pos + have hc_thr : c < (75:ℝ)/92 := hcos_thr + have hsimp : + 2 * 5 / (7 * c) * (((7:ℝ)^2 + 2) / 6 * (1 - c) - 1) = + 5 * (15 - 17 * c) / (7 * c) := by + field_simp; ring + rw [hsimp] + have hden : 0 < 7 * c := by positivity + rw [one_lt_div hden] + nlinarith [hc_thr, hcpos] + +noncomputable def thrCNava (d : ℕ) : ℝ := + ((d : ℝ) - 1) * (((d : ℝ) + 1) ^ 2 - 4) / + (((d : ℝ) - 1) * (((d : ℝ) + 1) ^ 2 + 2) + 3 * ((d : ℝ) + 1)) + +theorem CNavaSq_eq_cos_form (d : ℕ) (hd : 2 ≤ d) + (hcos_ne : cos (π / ((d : ℝ) + 1)) ≠ 0) : + CNavaSq d = + ((d : ℝ) - 1) / (3 * ((d : ℝ) + 1) * cos (π / ((d : ℝ) + 1)) ^ 2) * + ((((d : ℝ) + 1) ^ 2 - 4) - + (((d : ℝ) + 1) ^ 2 + 2) * cos (π / ((d : ℝ) + 1)) ^ 2) := by + set N := (d : ℝ) + 1 + set c := cos (π / N) ^ 2 + have hs : sin (π / N) ^ 2 = 1 - c := by + have := sin_sq_add_cos_sq (π / N) + simp only [c] at *; linarith + have hcos_ne' : cos (π / N) ≠ 0 := by simpa [N] using hcos_ne + simp only [CNavaSq, Nreal, theta] + change + 2 * ((d : ℝ) - 1) / (N * cos (π / N) ^ 2) * + (((N ^ 2 + 2) / 6) * sin (π / N) ^ 2 - 1) = + ((d : ℝ) - 1) / (3 * N * cos (π / N) ^ 2) * + ((N ^ 2 - 4) - (N ^ 2 + 2) * cos (π / N) ^ 2) + rw [hs] + have hc0 : c ≠ 0 := by + have : cos (π / N) ^ 2 ≠ 0 := pow_ne_zero 2 hcos_ne' + simpa [c] using this + have hN0 : N ≠ 0 := by positivity + simp only [c] at hc0 ⊢ + field_simp [hcos_ne', hN0] + ring + +theorem one_lt_CNavaSq_of_cos_lt_thr + (d : ℕ) (hd : 2 ≤ d) + (hcos_pos : 0 < cos (π / ((d : ℝ) + 1))) + (hthr : cos (π / ((d : ℝ) + 1)) ^ 2 < thrCNava d) : + 1 < CNavaSq d := by + set N := (d : ℝ) + 1 + set c := cos (π / N) ^ 2 + have hcpos : 0 < c := by + change 0 < cos (π / N) ^ 2 + exact sq_pos_of_pos (by simpa [N] using hcos_pos) + have hform : CNavaSq d = + ((d : ℝ) - 1) / (3 * N * c) * ((N ^ 2 - 4) - (N ^ 2 + 2) * c) := by + have hne : cos (π / ((d : ℝ) + 1)) ≠ 0 := hcos_pos.ne' + simpa [N, c] using CNavaSq_eq_cos_form d hd hne + have hden : 0 < 3 * N * c := by + have : 0 < N := by positivity + positivity + have ha : 0 < (d : ℝ) - 1 := by + have : (2:ℝ) ≤ d := by exact_mod_cast hd + linarith + set e := (N ^ 2 - 4) - (N ^ 2 + 2) * c with hedef + have hthr' : c < + ((d : ℝ) - 1) * (N ^ 2 - 4) / + (((d : ℝ) - 1) * (N ^ 2 + 2) + 3 * N) := by + simpa [c, N, thrCNava] using hthr + have hden' : 0 < ((d : ℝ) - 1) * (N ^ 2 + 2) + 3 * N := by positivity + have hN2 : 0 < N ^ 2 - 4 := by + have : (3:ℝ) ≤ N := by + have : (2:ℝ) ≤ d := by exact_mod_cast hd + linarith + nlinarith + have hthr_mul : + c * (((d : ℝ) - 1) * (N ^ 2 + 2) + 3 * N) < + ((d : ℝ) - 1) * (N ^ 2 - 4) := + (lt_div_iff₀ hden').mp hthr' + have he : 0 < e := by + have hcmp : + ((d : ℝ) - 1) * (N ^ 2 - 4) / + (((d : ℝ) - 1) * (N ^ 2 + 2) + 3 * N) < + (N ^ 2 - 4) / (N ^ 2 + 2) := by + rw [div_lt_div_iff₀ hden' (by positivity)] + nlinarith [hN2, ha, show 0 < N by positivity] + have hc_mid : c < (N ^ 2 - 4) / (N ^ 2 + 2) := lt_trans hthr' hcmp + have : c * (N ^ 2 + 2) < N ^ 2 - 4 := (lt_div_iff₀ (by positivity)).mp hc_mid + simp only [e]; linarith + have hmul : ((d : ℝ) - 1) * e > 3 * N * c := by + simp only [e] + nlinarith [hthr_mul] + have hgt : ((d : ℝ) - 1) / (3 * N * c) * e > 1 := by + have : ((d : ℝ) - 1) * e / (3 * N * c) > 1 := + (one_lt_div hden).mpr hmul + convert this using 1; ring + rwa [hform] + +theorem key_poly_nat (n : ℕ) (hn : 7 ≤ n) : + ((314:ℝ)/100)^2 * (1 - ((315:ℝ)/100)^2 / (3 * (n:ℝ)^2)) * + ((n:ℝ)^3 - 2*(n:ℝ)^2 + 5*(n:ℝ) - 4) > + (9*(n:ℝ) - 12) * (n:ℝ)^2 := by + by_cases hle : n ≤ 40 + · interval_cases n <;> norm_num + · have hnR : (41:ℝ) ≤ n := by exact_mod_cast (show 41 ≤ n by omega) + have hnpos : (0:ℝ) < n := lt_of_lt_of_le (by norm_num : (0:ℝ) < 41) hnR + have h314 : ((314:ℝ)/100)^2 ≥ (985:ℝ)/100 := by norm_num + have hfac : 1 - ((315:ℝ)/100)^2 / (3 * (n:ℝ)^2) ≥ (99:ℝ)/100 := by + have hle' : ((315:ℝ)/100)^2 / (3 * (n:ℝ)^2) ≤ + ((315:ℝ)/100)^2 / (3 * 41 ^ 2) := by + apply div_le_div_of_nonneg_left (by positivity) (by positivity) + nlinarith [hnR] + have : ((315:ℝ)/100)^2 / (3 * 41 ^ 2) ≤ (1:ℝ)/100 := by norm_num + linarith + have hden : (n:ℝ)^3 - 2*(n:ℝ)^2 + 5*(n:ℝ) - 4 ≥ (n:ℝ)^3 - 2*(n:ℝ)^2 := by + nlinarith [hnpos] + have hden' : (n:ℝ)^3 - 2*(n:ℝ)^2 = (n:ℝ)^2 * ((n:ℝ) - 2) := by ring + have hmain : ((985:ℝ)/100) * ((99:ℝ)/100) * ((n:ℝ) - 2) > + 9 * (n:ℝ) - 12 := by + nlinarith [hnR] + have hfacpos : (0:ℝ) < 1 - ((315:ℝ)/100)^2 / (3 * (n:ℝ)^2) := by + linarith [hfac] + have hdenpos : (0:ℝ) < (n:ℝ)^3 - 2*(n:ℝ)^2 + 5*(n:ℝ) - 4 := by + nlinarith [hnR] + nlinarith [h314, hfac, hden, hden', hmain, hfacpos, hdenpos, + show (0:ℝ) ≤ (n:ℝ)^2 by positivity] + +theorem cos_sq_bound_of_seven_le (N : ℝ) (hN : (7:ℝ) ≤ N) : + cos (π / N) ^ 2 < + 1 - (((314:ℝ)/100 / N) * (1 - ((315:ℝ)/100 / N)^2 / 6)) ^ 2 := by + have hNpos : 0 < N := lt_of_lt_of_le (by norm_num : (0:ℝ) < 7) hN + set θ := π / N + have hθpos : 0 < θ := div_pos pi_pos hNpos + have hθlt : θ < π / 2 := by + rw [div_lt_div_iff₀ hNpos (by norm_num : (0:ℝ)<2)] + nlinarith [pi_pos, hN] + have hπlo : (314:ℝ)/100 < π := by + have := pi_gt_d2; norm_num at this ⊢; linarith + have hπhi : π < (315:ℝ)/100 := by + have := pi_lt_d2; norm_num at this ⊢; linarith + have hθle : θ ≤ π / 7 := by + rw [div_le_div_iff₀ hNpos (by norm_num : (0:ℝ)<7)] + nlinarith [pi_pos, hN] + have hθlt1 : θ < 1 := by + have h1 : π / 7 < (315:ℝ)/100 / 7 := + div_lt_div_of_pos_right hπhi (by norm_num) + have h2 : ((315:ℝ)/100 / 7) < 1 := by norm_num + exact lt_of_le_of_lt hθle (lt_trans h1 h2) + have hs0pos : 0 < θ - θ^3/6 := by + have : θ^2 < 6 := by nlinarith [hθpos, hθlt1] + nlinarith [hθpos, this] + have hsin : θ - θ^3/6 < sin θ := sin_gt_sub_cube hθpos + set s0 := θ - θ^3/6 + set s0lo := ((314:ℝ)/100 / N) * (1 - ((315:ℝ)/100 / N)^2 / 6) + have hcos2 : cos θ ^ 2 < 1 - s0 ^ 2 := by + have hsq : s0^2 < sin θ ^ 2 := + pow_lt_pow_left₀ hsin hs0pos.le (by norm_num) + have : cos θ ^ 2 = 1 - sin θ ^ 2 := by + rw [← sin_sq_add_cos_sq θ]; ring + linarith + have hfac_s0lo_pos : 0 ≤ 1 - ((315:ℝ)/100 / N)^2 / 6 := by + have hle : ((315:ℝ)/100 / N)^2 / 6 ≤ ((315:ℝ)/100 / 7)^2 / 6 := by + have : (315:ℝ)/100 / N ≤ (315:ℝ)/100 / 7 := + div_le_div_of_nonneg_left (by positivity) (by norm_num) hN + nlinarith [this, show (0:ℝ) ≤ 315/100/N by positivity] + have : ((315:ℝ)/100 / 7)^2 / 6 < 1 := by norm_num + linarith + have hs0_ge : s0 ≥ s0lo := by + have hs0θ : s0 = θ * (1 - θ^2/6) := by ring + have hθlo : (314:ℝ)/100 / N ≤ θ := by + change (314:ℝ)/100 / N ≤ π / N + exact div_le_div_of_nonneg_right hπlo.le hNpos.le + have hθhi2 : θ ≤ (315:ℝ)/100 / N := by + change π / N ≤ (315:ℝ)/100 / N + exact div_le_div_of_nonneg_right hπhi.le hNpos.le + have hfac : 1 - θ^2/6 ≥ 1 - ((315:ℝ)/100 / N)^2 / 6 := by + nlinarith [hθpos, hθhi2] + have hfacθ : 0 ≤ 1 - θ^2/6 := by + have : θ^2 ≤ 1 := by nlinarith [hθpos, hθlt1] + nlinarith + have ha : (0:ℝ) ≤ (314:ℝ)/100 / N := by positivity + rw [hs0θ] + calc + θ * (1 - θ^2/6) + ≥ ((314:ℝ)/100 / N) * (1 - θ^2/6) := + mul_le_mul_of_nonneg_right hθlo hfacθ + _ ≥ ((314:ℝ)/100 / N) * (1 - ((315:ℝ)/100 / N)^2 / 6) := + mul_le_mul_of_nonneg_left hfac ha + have hpos_lo : 0 ≤ s0lo := by positivity + have hs0sq : s0 ^ 2 ≥ s0lo ^ 2 := + pow_le_pow_left₀ hpos_lo hs0_ge 2 + linarith [hcos2, hs0sq] + +theorem one_sub_thr_eq (d : ℕ) (hd : 2 ≤ d) : + 1 - thrCNava d = + (9 * ((d : ℝ) + 1) - 12) / + (((d : ℝ) + 1) ^ 3 - 2 * ((d : ℝ) + 1) ^ 2 + + 5 * ((d : ℝ) + 1) - 4) := by + set N := (d : ℝ) + 1 + have hd1 : (d : ℝ) - 1 = N - 2 := by ring + have hden0 : (N - 2) * (N ^ 2 + 2) + 3 * N ≠ 0 := by + have : 0 < N - 2 := by + have : (2:ℝ) ≤ d := by exact_mod_cast hd + linarith + positivity + have hthr : thrCNava d = + (N - 2) * (N ^ 2 - 4) / ((N - 2) * (N ^ 2 + 2) + 3 * N) := by + unfold thrCNava; rw [hd1] + rw [hthr] + have hD : (N - 2) * (N ^ 2 + 2) + 3 * N = + N ^ 3 - 2 * N ^ 2 + 5 * N - 4 := by ring + rw [hD] + have hden : N ^ 3 - 2 * N ^ 2 + 5 * N - 4 ≠ 0 := by + rw [← hD]; exact hden0 + rw [one_sub_div hden] + congr 1 + ring + +set_option maxHeartbeats 800000 in +theorem one_lt_CNavaSq_of_six_le (d : ℕ) (hd : 6 ≤ d) : 1 < CNavaSq d := by + have hd2 : 2 ≤ d := by omega + set N := (d : ℝ) + 1 + have hNnat : 7 ≤ d + 1 := by omega + have hN : (7:ℝ) ≤ N := by + have : (6:ℝ) ≤ d := by exact_mod_cast hd + linarith + have hNpos : 0 < N := by positivity + have hcos_ub := cos_sq_bound_of_seven_le N hN + set s0lo := ((314:ℝ)/100 / N) * (1 - ((315:ℝ)/100 / N)^2 / 6) + have hcos_lt : cos (π / N) ^ 2 < 1 - s0lo ^ 2 := by + simpa [s0lo] using hcos_ub + have hweak : + s0lo ^ 2 ≥ + ((314:ℝ)/100)^2 / N ^ 2 * + (1 - ((315:ℝ)/100)^2 / (3 * N ^ 2)) := by + have hleft : s0lo ^ 2 = + ((314:ℝ)/100)^2 / N ^ 2 * + (1 - ((315:ℝ)/100 / N)^2 / 6) ^ 2 := by + change + (((314:ℝ)/100 / N) * (1 - ((315:ℝ)/100 / N)^2 / 6)) ^ 2 = + ((314:ℝ)/100)^2 / N ^ 2 * + (1 - ((315:ℝ)/100 / N)^2 / 6) ^ 2 + rw [mul_pow, div_pow] + have hsq : (1 - ((315:ℝ)/100 / N)^2 / 6) ^ 2 ≥ + 1 - 2 * (((315:ℝ)/100 / N)^2 / 6) := by + nlinarith [sq_nonneg (((315:ℝ)/100 / N)^2 / 6)] + have h2u : 2 * (((315:ℝ)/100 / N)^2 / 6) = + ((315:ℝ)/100)^2 / (3 * N ^ 2) := by + field_simp [hNpos.ne']; ring + rw [hleft] + nlinarith [hsq, show (0:ℝ) ≤ ((314:ℝ)/100)^2 / N^2 by positivity, h2u] + have h1mthr := one_sub_thr_eq d hd2 + have hden_pos : 0 < N ^ 3 - 2 * N ^ 2 + 5 * N - 4 := by + nlinarith [hN, hNpos] + have hkey := key_poly_nat (d + 1) hNnat + have hkey' : + ((314:ℝ)/100)^2 * (1 - ((315:ℝ)/100)^2 / (3 * N ^ 2)) * + (N ^ 3 - 2 * N ^ 2 + 5 * N - 4) > + (9 * N - 12) * N ^ 2 := by + simpa [N] using hkey + have hs0_gt : s0lo ^ 2 > 1 - thrCNava d := by + have h1 : 1 - thrCNava d = + (9 * N - 12) / (N ^ 3 - 2 * N ^ 2 + 5 * N - 4) := by + simpa [N] using h1mthr + rw [h1, gt_iff_lt] + have hN2pos : 0 < N ^ 2 := sq_pos_of_pos hNpos + have hlo : + ((314:ℝ)/100)^2 / N ^ 2 * + (1 - ((315:ℝ)/100)^2 / (3 * N ^ 2)) * + (N ^ 3 - 2 * N ^ 2 + 5 * N - 4) > + 9 * N - 12 := by + have hN2ne : N ^ 2 ≠ 0 := hN2pos.ne' + have hL : + ((314:ℝ)/100)^2 / N ^ 2 * + (1 - ((315:ℝ)/100)^2 / (3 * N ^ 2)) * + (N ^ 3 - 2 * N ^ 2 + 5 * N - 4) = + (((314:ℝ)/100)^2 * + (1 - ((315:ℝ)/100)^2 / (3 * N ^ 2)) * + (N ^ 3 - 2 * N ^ 2 + 5 * N - 4)) / N ^ 2 := by + field_simp [hN2ne] + rw [hL] + have hdiv : + (((314:ℝ)/100)^2 * + (1 - ((315:ℝ)/100)^2 / (3 * N ^ 2)) * + (N ^ 3 - 2 * N ^ 2 + 5 * N - 4)) / N ^ 2 > + ((9 * N - 12) * N ^ 2) / N ^ 2 := + div_lt_div_of_pos_right hkey' hN2pos + have hR : ((9 * N - 12) * N ^ 2) / N ^ 2 = 9 * N - 12 := by + field_simp [hN2ne] + rwa [hR] at hdiv + have hmul : + 9 * N - 12 < s0lo ^ 2 * (N ^ 3 - 2 * N ^ 2 + 5 * N - 4) := by + nlinarith [hweak, hlo, hden_pos] + exact (div_lt_iff₀ hden_pos).mpr hmul + have hcos_thr : cos (π / N) ^ 2 < thrCNava d := by + have : 1 - s0lo ^ 2 < thrCNava d := by linarith [hs0_gt] + linarith [hcos_lt] + have hθlt : π / N < π / 2 := by + rw [div_lt_div_iff₀ hNpos (by norm_num : (0:ℝ)<2)] + nlinarith [pi_pos, hN] + have hθpos : 0 < π / N := div_pos pi_pos hNpos + have hcos_pos : 0 < cos (π / N) := + cos_pos_of_mem_Ioo ⟨by linarith [pi_pos, hθpos], hθlt⟩ + exact one_lt_CNavaSq_of_cos_lt_thr d hd2 + (by simpa [N] using hcos_pos) + (by simpa [N] using hcos_thr) + +/-- `CNava(d)² > 1` para todo `d ≥ 4`: casos `4, 5` exactos, `d ≥ 6` vía cotas +de Taylor certificadas. -/ +theorem one_lt_CNavaSq (d : ℕ) (hd : 4 ≤ d) : 1 < CNavaSq d := by + match d with + | 0 | 1 | 2 | 3 => omega + | 4 => exact one_lt_CNavaSq_four + | 5 => exact one_lt_CNavaSq_five + | n + 6 => exact one_lt_CNavaSq_of_six_le (n + 6) (by omega) + +theorem one_lt_CNava_of_four_le (d : ℕ) (hd : 4 ≤ d) : 1 < CNava d := by + rw [CNava, ← sqrt_one] + exact sqrt_lt_sqrt (by norm_num) (one_lt_CNavaSq d hd) + +/-- TEOREMA CENTRAL DE NIVEN → POSITIVIDAD: `δ_geom(d) > 0` para todo +`d ≥ 4`. -/ +theorem deltaGeom_pos_of_four_le (d : ℕ) (hd : 4 ≤ d) : 0 < deltaGeom d := by + unfold deltaGeom + linarith [one_lt_CNava_of_four_le d hd] + +end Gnomon + diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D9_Monotonia.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D9_Monotonia.lean new file mode 100644 index 000000000..351f849a8 --- /dev/null +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D9_Monotonia.lean @@ -0,0 +1,557 @@ +/- +Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez +-/ +module + +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D8_Szego + +@[expose] public section + +/-! +# D9 — Monotonía estricta de `C_Nava` y `deltaGeom` + +Sin barrido numérico: `CNava` (y por tanto `deltaGeom`) crece +estrictamente para toda dimensión `d ≥ 4`. En particular, `d = 4` es +el mínimo global de la cola `d ≥ 4` y cada valor finito se aproxima a +`Cinf` estrictamente por debajo (`CNava_lt_Cinf`, `deltaGeom_lt_deltaInf`). + +La prueba no supone que `π` sea racional. Las llamadas a `ring` +certifican únicamente identidades algebraicas formales con `π` como +elemento real simbólico. El signo estricto de la derivada se obtiene +mediante cotas formales `3 < π < 22/7`, cotas de Taylor verificadas y +un certificado polinómico de Bernstein de que el resto es +estrictamente negativo en la caja compacta correspondiente. +-/ + +noncomputable section + +open Set Filter +open scoped Topology + +namespace Gnomon + +private lemma sin_taylor_lower {x : ℝ} (hx : 0 ≤ x) : + x - x ^ 3 / 6 ≤ Real.sin x := + Real.sin_ge_sub_cube hx + +private lemma cos_taylor_upper {x : ℝ} (hx : 0 ≤ x) : + Real.cos x ≤ 1 - x ^ 2 / 2 + x ^ 4 / 24 := by + let f : ℝ → ℝ := fun t => 1 - t ^ 2 / 2 + t ^ 4 / 24 - Real.cos t + have hderiv : ∀ t : ℝ, deriv f t = -t + t ^ 3 / 6 + Real.sin t := by + intro t + simp (disch := fun_prop) [f] + ring + have hmono : MonotoneOn f (Ici 0) := by + apply monotoneOn_of_deriv_nonneg (convex_Ici 0) (by fun_prop) (by fun_prop) + intro t ht + rw [interior_Ici] at ht + rw [hderiv] + have hs := sin_taylor_lower ht.le + nlinarith + have h := hmono (by simp) hx hx + simp only [f, Real.cos_zero] at h + nlinarith + +private lemma sin_taylor_upper {x : ℝ} (hx : 0 ≤ x) : + Real.sin x ≤ x - x ^ 3 / 6 + x ^ 5 / 120 := by + let f : ℝ → ℝ := fun t => t - t ^ 3 / 6 + t ^ 5 / 120 - Real.sin t + have hderiv : ∀ t : ℝ, deriv f t = 1 - t ^ 2 / 2 + t ^ 4 / 24 - Real.cos t := by + intro t + simp (disch := fun_prop) [f] + ring + have hmono : MonotoneOn f (Ici 0) := by + apply monotoneOn_of_deriv_nonneg (convex_Ici 0) (by fun_prop) (by fun_prop) + intro t ht + rw [interior_Ici] at ht + rw [hderiv] + have hc := cos_taylor_upper ht.le + nlinarith + have h := hmono (by simp) hx hx + simp only [f, Real.sin_zero] at h + nlinarith + +private lemma cos_taylor_lower {x : ℝ} (hx : 0 ≤ x) : + 1 - x ^ 2 / 2 + x ^ 4 / 24 - x ^ 6 / 720 ≤ Real.cos x := by + let f : ℝ → ℝ := fun t => + Real.cos t - 1 + t ^ 2 / 2 - t ^ 4 / 24 + t ^ 6 / 720 + have hderiv : ∀ t : ℝ, + deriv f t = -Real.sin t + t - t ^ 3 / 6 + t ^ 5 / 120 := by + intro t + simp (disch := fun_prop) [f] + ring + have hmono : MonotoneOn f (Ici 0) := by + apply monotoneOn_of_deriv_nonneg (convex_Ici 0) (by fun_prop) (by fun_prop) + intro t ht + rw [interior_Ici] at ht + rw [hderiv] + have hs := sin_taylor_upper ht.le + nlinarith + have h := hmono (by simp) hx hx + simp only [f, Real.cos_zero] at h + nlinarith + +/- A rational Bernstein-box certificate for the polynomial remainder used +below. The box is `0 ≤ y ≤ 1/5`, `3 ≤ p ≤ 22/7`. -/ +set_option maxHeartbeats 4000000 in +set_option maxRecDepth 4000 in +private lemma remainder_poly_neg {y p : ℝ} + (hy0 : 0 ≤ y) (hy1 : y ≤ 1 / 5) + (hp0 : 3 ≤ p) (hp1 : p ≤ 22 / 7) : + (5 * p ^ 12 * y ^ 12 - 180 * p ^ 10 * y ^ 10 + + 1880 * p ^ 8 * y ^ 8 - 160 * p ^ 8 * y ^ 6 + + 160 * p ^ 8 * y ^ 5 - 7552 * p ^ 6 * y ^ 6 - + 384 * p ^ 6 * y ^ 5 + 2048 * p ^ 6 * y ^ 4 - + 2144 * p ^ 6 * y ^ 3 + 6720 * p ^ 4 * y ^ 4 + + 7680 * p ^ 4 * y ^ 3 - 5760 * p ^ 4 * y ^ 2 + + 7680 * p ^ 4 * y + 34560 * p ^ 2 * y ^ 2 - + 46080 * p ^ 2 * y - 11520 * p ^ 2 + 69120) / 5760 < 0 := by + let u : ℝ := 5 * y + let v : ℝ := 7 * p - 21 + have hu0 : 0 ≤ u := by dsimp [u]; positivity + have hu1 : 0 ≤ 1 - u := by dsimp [u]; norm_num at hy1 ⊢; linarith + have hv0 : 0 ≤ v := by dsimp [v]; linarith + have hv1 : 0 ≤ 1 - v := by dsimp [v]; norm_num at hp1 ⊢; linarith + have hb_0_0 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_0_1 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_0_2 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_0_3 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_0_4 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_0_5 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_0_6 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_0_7 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_0_8 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_0_9 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_0_10 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_0_11 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_0_12 : 0 ≤ u ^ 0 * (1 - u) ^ 12 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_1_0 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_1_1 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_1_2 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_1_3 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_1_4 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_1_5 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_1_6 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_1_7 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_1_8 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_1_9 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_1_10 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_1_11 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_1_12 : 0 ≤ u ^ 1 * (1 - u) ^ 11 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_2_0 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_2_1 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_2_2 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_2_3 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_2_4 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_2_5 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_2_6 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_2_7 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_2_8 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_2_9 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_2_10 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_2_11 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_2_12 : 0 ≤ u ^ 2 * (1 - u) ^ 10 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_3_0 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_3_1 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_3_2 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_3_3 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_3_4 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_3_5 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_3_6 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_3_7 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_3_8 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_3_9 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_3_10 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_3_11 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_3_12 : 0 ≤ u ^ 3 * (1 - u) ^ 9 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_4_0 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_4_1 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_4_2 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_4_3 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_4_4 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_4_5 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_4_6 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_4_7 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_4_8 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_4_9 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_4_10 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_4_11 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_4_12 : 0 ≤ u ^ 4 * (1 - u) ^ 8 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_5_0 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_5_1 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_5_2 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_5_3 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_5_4 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_5_5 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_5_6 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_5_7 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_5_8 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_5_9 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_5_10 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_5_11 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_5_12 : 0 ≤ u ^ 5 * (1 - u) ^ 7 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_6_0 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_6_1 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_6_2 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_6_3 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_6_4 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_6_5 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_6_6 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_6_7 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_6_8 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_6_9 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_6_10 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_6_11 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_6_12 : 0 ≤ u ^ 6 * (1 - u) ^ 6 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_7_0 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_7_1 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_7_2 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_7_3 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_7_4 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_7_5 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_7_6 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_7_7 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_7_8 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_7_9 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_7_10 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_7_11 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_7_12 : 0 ≤ u ^ 7 * (1 - u) ^ 5 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_8_0 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_8_1 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_8_2 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_8_3 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_8_4 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_8_5 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_8_6 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_8_7 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_8_8 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_8_9 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_8_10 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_8_11 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_8_12 : 0 ≤ u ^ 8 * (1 - u) ^ 4 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_9_0 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_9_1 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_9_2 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_9_3 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_9_4 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_9_5 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_9_6 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_9_7 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_9_8 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_9_9 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_9_10 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_9_11 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_9_12 : 0 ≤ u ^ 9 * (1 - u) ^ 3 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_10_0 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_10_1 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_10_2 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_10_3 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_10_4 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_10_5 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_10_6 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_10_7 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_10_8 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_10_9 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_10_10 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_10_11 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_10_12 : 0 ≤ u ^ 10 * (1 - u) ^ 2 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_11_0 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_11_1 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_11_2 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_11_3 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_11_4 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_11_5 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_11_6 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_11_7 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_11_8 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_11_9 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_11_10 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_11_11 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_11_12 : 0 ≤ u ^ 11 * (1 - u) ^ 1 * (v ^ 12 * (1 - v) ^ 0) := by positivity + have hb_12_0 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 0 * (1 - v) ^ 12) := by positivity + have hb_12_1 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 1 * (1 - v) ^ 11) := by positivity + have hb_12_2 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 2 * (1 - v) ^ 10) := by positivity + have hb_12_3 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 3 * (1 - v) ^ 9) := by positivity + have hb_12_4 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 4 * (1 - v) ^ 8) := by positivity + have hb_12_5 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 5 * (1 - v) ^ 7) := by positivity + have hb_12_6 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 6 * (1 - v) ^ 6) := by positivity + have hb_12_7 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 7 * (1 - v) ^ 5) := by positivity + have hb_12_8 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 8 * (1 - v) ^ 4) := by positivity + have hb_12_9 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 9 * (1 - v) ^ 3) := by positivity + have hb_12_10 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 10 * (1 - v) ^ 2) := by positivity + have hb_12_11 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 11 * (1 - v) ^ 1) := by positivity + have hb_12_12 : 0 ≤ u ^ 12 * (1 - u) ^ 0 * (v ^ 12 * (1 - v) ^ 0) := by positivity + dsimp [u, v] at hb_0_0 hb_0_1 hb_0_2 hb_0_3 hb_0_4 hb_0_5 hb_0_6 hb_0_7 hb_0_8 hb_0_9 hb_0_10 hb_0_11 hb_0_12 hb_1_0 hb_1_1 hb_1_2 hb_1_3 hb_1_4 hb_1_5 hb_1_6 hb_1_7 hb_1_8 hb_1_9 hb_1_10 hb_1_11 hb_1_12 hb_2_0 hb_2_1 hb_2_2 hb_2_3 hb_2_4 hb_2_5 hb_2_6 hb_2_7 hb_2_8 hb_2_9 hb_2_10 hb_2_11 hb_2_12 hb_3_0 hb_3_1 hb_3_2 hb_3_3 hb_3_4 hb_3_5 hb_3_6 hb_3_7 hb_3_8 hb_3_9 hb_3_10 hb_3_11 hb_3_12 hb_4_0 hb_4_1 hb_4_2 hb_4_3 hb_4_4 hb_4_5 hb_4_6 hb_4_7 hb_4_8 hb_4_9 hb_4_10 hb_4_11 hb_4_12 hb_5_0 hb_5_1 hb_5_2 hb_5_3 hb_5_4 hb_5_5 hb_5_6 hb_5_7 hb_5_8 hb_5_9 hb_5_10 hb_5_11 hb_5_12 hb_6_0 hb_6_1 hb_6_2 hb_6_3 hb_6_4 hb_6_5 hb_6_6 hb_6_7 hb_6_8 hb_6_9 hb_6_10 hb_6_11 hb_6_12 hb_7_0 hb_7_1 hb_7_2 hb_7_3 hb_7_4 hb_7_5 hb_7_6 hb_7_7 hb_7_8 hb_7_9 hb_7_10 hb_7_11 hb_7_12 hb_8_0 hb_8_1 hb_8_2 hb_8_3 hb_8_4 hb_8_5 hb_8_6 hb_8_7 hb_8_8 hb_8_9 hb_8_10 hb_8_11 hb_8_12 hb_9_0 hb_9_1 hb_9_2 hb_9_3 hb_9_4 hb_9_5 hb_9_6 hb_9_7 hb_9_8 hb_9_9 hb_9_10 hb_9_11 hb_9_12 hb_10_0 hb_10_1 hb_10_2 hb_10_3 hb_10_4 hb_10_5 hb_10_6 hb_10_7 hb_10_8 hb_10_9 hb_10_10 hb_10_11 hb_10_12 hb_11_0 hb_11_1 hb_11_2 hb_11_3 hb_11_4 hb_11_5 hb_11_6 hb_11_7 hb_11_8 hb_11_9 hb_11_10 hb_11_11 hb_11_12 hb_12_0 hb_12_1 hb_12_2 hb_12_3 hb_12_4 hb_12_5 hb_12_6 hb_12_7 hb_12_8 hb_12_9 hb_12_10 hb_12_11 hb_12_12 ⊢ + ring_nf at hb_0_0 hb_0_1 hb_0_2 hb_0_3 hb_0_4 hb_0_5 hb_0_6 hb_0_7 hb_0_8 hb_0_9 hb_0_10 hb_0_11 hb_0_12 hb_1_0 hb_1_1 hb_1_2 hb_1_3 hb_1_4 hb_1_5 hb_1_6 hb_1_7 hb_1_8 hb_1_9 hb_1_10 hb_1_11 hb_1_12 hb_2_0 hb_2_1 hb_2_2 hb_2_3 hb_2_4 hb_2_5 hb_2_6 hb_2_7 hb_2_8 hb_2_9 hb_2_10 hb_2_11 hb_2_12 hb_3_0 hb_3_1 hb_3_2 hb_3_3 hb_3_4 hb_3_5 hb_3_6 hb_3_7 hb_3_8 hb_3_9 hb_3_10 hb_3_11 hb_3_12 hb_4_0 hb_4_1 hb_4_2 hb_4_3 hb_4_4 hb_4_5 hb_4_6 hb_4_7 hb_4_8 hb_4_9 hb_4_10 hb_4_11 hb_4_12 hb_5_0 hb_5_1 hb_5_2 hb_5_3 hb_5_4 hb_5_5 hb_5_6 hb_5_7 hb_5_8 hb_5_9 hb_5_10 hb_5_11 hb_5_12 hb_6_0 hb_6_1 hb_6_2 hb_6_3 hb_6_4 hb_6_5 hb_6_6 hb_6_7 hb_6_8 hb_6_9 hb_6_10 hb_6_11 hb_6_12 hb_7_0 hb_7_1 hb_7_2 hb_7_3 hb_7_4 hb_7_5 hb_7_6 hb_7_7 hb_7_8 hb_7_9 hb_7_10 hb_7_11 hb_7_12 hb_8_0 hb_8_1 hb_8_2 hb_8_3 hb_8_4 hb_8_5 hb_8_6 hb_8_7 hb_8_8 hb_8_9 hb_8_10 hb_8_11 hb_8_12 hb_9_0 hb_9_1 hb_9_2 hb_9_3 hb_9_4 hb_9_5 hb_9_6 hb_9_7 hb_9_8 hb_9_9 hb_9_10 hb_9_11 hb_9_12 hb_10_0 hb_10_1 hb_10_2 hb_10_3 hb_10_4 hb_10_5 hb_10_6 hb_10_7 hb_10_8 hb_10_9 hb_10_10 hb_10_11 hb_10_12 hb_11_0 hb_11_1 hb_11_2 hb_11_3 hb_11_4 hb_11_5 hb_11_6 hb_11_7 hb_11_8 hb_11_9 hb_11_10 hb_11_11 hb_11_12 hb_12_0 hb_12_1 hb_12_2 hb_12_3 hb_12_4 hb_12_5 hb_12_6 hb_12_7 hb_12_8 hb_12_9 hb_12_10 hb_12_11 hb_12_12 ⊢ + linarith [hb_0_0, hb_0_1, hb_0_2, hb_0_3, hb_0_4, hb_0_5, hb_0_6, hb_0_7, hb_0_8, hb_0_9, hb_0_10, hb_0_11, hb_0_12, hb_1_0, hb_1_1, hb_1_2, hb_1_3, hb_1_4, hb_1_5, hb_1_6, hb_1_7, hb_1_8, hb_1_9, hb_1_10, hb_1_11, hb_1_12, hb_2_0, hb_2_1, hb_2_2, hb_2_3, hb_2_4, hb_2_5, hb_2_6, hb_2_7, hb_2_8, hb_2_9, hb_2_10, hb_2_11, hb_2_12, hb_3_0, hb_3_1, hb_3_2, hb_3_3, hb_3_4, hb_3_5, hb_3_6, hb_3_7, hb_3_8, hb_3_9, hb_3_10, hb_3_11, hb_3_12, hb_4_0, hb_4_1, hb_4_2, hb_4_3, hb_4_4, hb_4_5, hb_4_6, hb_4_7, hb_4_8, hb_4_9, hb_4_10, hb_4_11, hb_4_12, hb_5_0, hb_5_1, hb_5_2, hb_5_3, hb_5_4, hb_5_5, hb_5_6, hb_5_7, hb_5_8, hb_5_9, hb_5_10, hb_5_11, hb_5_12, hb_6_0, hb_6_1, hb_6_2, hb_6_3, hb_6_4, hb_6_5, hb_6_6, hb_6_7, hb_6_8, hb_6_9, hb_6_10, hb_6_11, hb_6_12, hb_7_0, hb_7_1, hb_7_2, hb_7_3, hb_7_4, hb_7_5, hb_7_6, hb_7_7, hb_7_8, hb_7_9, hb_7_10, hb_7_11, hb_7_12, hb_8_0, hb_8_1, hb_8_2, hb_8_3, hb_8_4, hb_8_5, hb_8_6, hb_8_7, hb_8_8, hb_8_9, hb_8_10, hb_8_11, hb_8_12, hb_9_0, hb_9_1, hb_9_2, hb_9_3, hb_9_4, hb_9_5, hb_9_6, hb_9_7, hb_9_8, hb_9_9, hb_9_10, hb_9_11, hb_9_12, hb_10_0, hb_10_1, hb_10_2, hb_10_3, hb_10_4, hb_10_5, hb_10_6, hb_10_7, hb_10_8, hb_10_9, hb_10_10, hb_10_11, hb_10_12, hb_11_0, hb_11_1, hb_11_2, hb_11_3, hb_11_4, hb_11_5, hb_11_6, hb_11_7, hb_11_8, hb_11_9, hb_11_10, hb_11_11, hb_11_12, hb_12_0, hb_12_1, hb_12_2, hb_12_3, hb_12_4, hb_12_5, hb_12_6, hb_12_7, hb_12_8, hb_12_9, hb_12_10, hb_12_11, hb_12_12] + +/-- Continuous angular form of the exact finite coherence squared. -/ +private noncomputable def coherenceSqAngle (x : ℝ) : ℝ := + ((Real.pi ^ 2 / x ^ 2 - 2 * Real.pi / x - 4 + 8 * x / Real.pi) / 3) * + Real.tan x ^ 2 - 2 + 4 * x / Real.pi + +private lemma CNavaSq_eq_coherenceSqAngle (d : ℕ) (hd : 4 ≤ d) : + CNavaSq d = coherenceSqAngle (theta d) := by + have hN : Nreal d ≠ 0 := by unfold Nreal; positivity + have htpos : 0 < theta d := by unfold theta Nreal; positivity + have htlt : theta d < Real.pi / 2 := by + unfold theta Nreal + rw [div_lt_div_iff₀ (by positivity : (0:ℝ) < (d:ℝ) + 1) (by norm_num : (0:ℝ) < 2)] + nlinarith [show (4 : ℝ) ≤ d by exact_mod_cast hd, Real.pi_pos] + have hcos : Real.cos (theta d) ≠ 0 := + (Real.cos_pos_of_mem_Ioo ⟨by linarith, htlt⟩).ne' + have htne : theta d ≠ 0 := htpos.ne' + have hpiθ : Real.pi = theta d * Nreal d := by + unfold theta; field_simp + have hpyth : Real.sin (theta d) ^ 2 = 1 - Real.cos (theta d) ^ 2 := by + have h := Real.sin_sq_add_cos_sq (theta d) + linarith + have hd1 : (d : ℝ) + 1 ≠ 0 := by positivity + rw [CNavaSq, coherenceSqAngle, Real.tan_eq_sin_div_cos, hpiθ] + unfold Nreal + field_simp [hcos, htne, hd1] + rw [hpyth] + ring + +private lemma hasDerivAt_coherenceSqAngle {x : ℝ} + (hx : x ≠ 0) (hcos : Real.cos x ≠ 0) : + HasDerivAt coherenceSqAngle + (((-2 * Real.pi ^ 2 / x ^ 3 + 2 * Real.pi / x ^ 2 + 8 / Real.pi) * + Real.sin x ^ 2 * Real.cos x + + 2 * (Real.pi ^ 2 / x ^ 2 - 2 * Real.pi / x - 4 + + 8 * x / Real.pi) * Real.sin x + + 12 / Real.pi * Real.cos x ^ 3) / + (3 * Real.cos x ^ 3)) x := by + unfold coherenceSqAngle + have htan : HasDerivAt Real.tan (1 / Real.cos x ^ 2) x := Real.hasDerivAt_tan hcos + have da := (hasDerivAt_const x (Real.pi ^ 2)).div ((hasDerivAt_id x).pow 2) (pow_ne_zero 2 hx) + have db := (hasDerivAt_const x (2 * Real.pi)).div (hasDerivAt_id x) hx + have dab := da.sub db + have dabc := dab.sub (hasDerivAt_const x (4 : ℝ)) + have dd := ((hasDerivAt_const x (8 : ℝ)).mul (hasDerivAt_id x)).div_const Real.pi + have dQ := dabc.add dd + have dQdiv3 := dQ.div_const 3 + have dtansq := htan.pow 2 + have dmul := dQdiv3.mul dtansq + have dsub2 := dmul.sub (hasDerivAt_const x (2 : ℝ)) + have de := ((hasDerivAt_const x (4 : ℝ)).mul (hasDerivAt_id x)).div_const Real.pi + have dfinal := dsub2.add de + refine dfinal.congr_deriv ?_ + simp only [id_eq, Pi.pow_apply, Pi.mul_apply, Pi.sub_apply, Pi.add_apply, Pi.div_apply] + field_simp [hx, Real.pi_ne_zero] + have hsin : Real.sin x = Real.tan x * Real.cos x := by + rw [Real.tan_eq_sin_div_cos]; field_simp + rw [hsin] + ring + +set_option maxHeartbeats 1000000 in +private lemma deriv_coherenceSqAngle_neg {x : ℝ} + (hx0 : 0 < x) (hx5 : x ≤ Real.pi / 5) : + deriv coherenceSqAngle x < 0 := by + have hxhalf : x < Real.pi / 2 := by nlinarith [Real.pi_pos] + have hxone : x ≤ 1 := by + have hpilt : Real.pi < (4 : ℝ) := Real.pi_lt_four + nlinarith + have hcospos : 0 < Real.cos x := + Real.cos_pos_of_mem_Ioo ⟨by nlinarith [Real.pi_pos], hxhalf⟩ + have hspos : 0 < Real.sin x := + Real.sin_pos_of_pos_of_lt_pi hx0 (by nlinarith [Real.pi_pos]) + let y : ℝ := x / Real.pi + have hy0 : 0 ≤ y := by dsimp [y]; positivity + have hy5 : y ≤ 1 / 5 := by + dsimp [y] + rw [div_le_iff₀ Real.pi_pos] + nlinarith + have hpi3 : (3 : ℝ) ≤ Real.pi := Real.pi_gt_three.le + have hpi22 : Real.pi ≤ (22 / 7 : ℝ) := by + nlinarith [Real.pi_lt_d20] + have hpoly := remainder_poly_neg hy0 hy5 hpi3 hpi22 + let sl : ℝ := x - x ^ 3 / 6 + let su : ℝ := x - x ^ 3 / 6 + x ^ 5 / 120 + let cl : ℝ := 1 - x ^ 2 / 2 + let cu : ℝ := 1 - x ^ 2 / 2 + x ^ 4 / 24 + let q : ℝ := Real.pi ^ 2 / x ^ 2 - 2 * Real.pi / x - 4 + + 8 * x / Real.pi + let qp : ℝ := -2 * Real.pi ^ 2 / x ^ 3 + 2 * Real.pi / x ^ 2 + + 8 / Real.pi + have hsl : sl ≤ Real.sin x := by + simpa [sl] using sin_taylor_lower hx0.le + have hsu : Real.sin x ≤ su := by + simpa [su] using sin_taylor_upper hx0.le + have hcl : cl ≤ Real.cos x := by + simpa [cl] using Real.one_sub_sq_div_two_le_cos (x := x) + have hcu : Real.cos x ≤ cu := by + simpa [cu] using cos_taylor_upper hx0.le + have hsl0 : 0 < sl := by + dsimp [sl] + have hx2 : x ^ 2 ≤ 1 := by nlinarith [sq_nonneg x] + have hxpow : x ^ 3 = x * x ^ 2 := by ring + rw [hxpow] + nlinarith + have hcl0 : 0 < cl := by + dsimp [cl] + have hx2 : x ^ 2 ≤ 1 := by nlinarith [sq_nonneg x] + nlinarith + have hcu0 : 0 < cu := lt_of_lt_of_le hcospos hcu + have hqpos : 0 < q := by + have hypos : 0 < y := by dsimp [y]; positivity + have hy_sq : y ^ 2 ≤ (1 / 5 : ℝ) ^ 2 := + pow_le_pow_left₀ hy0 hy5 2 + have hbase : 0 < 1 - 2 * y - 4 * y ^ 2 + 8 * y ^ 3 := by + have hy3 : 0 ≤ y ^ 3 := by positivity + nlinarith + dsimp [q, y] at hbase ⊢ + field_simp [hx0.ne', Real.pi_ne_zero] at hbase ⊢ + nlinarith [sq_nonneg x, sq_nonneg Real.pi] + have hqpneg : qp < 0 := by + have hypos : 0 < y := by dsimp [y]; positivity + have hy3 : y ^ 3 ≤ (1 / 5 : ℝ) ^ 3 := + pow_le_pow_left₀ hy0 hy5 3 + have hbase : -2 + 2 * y + 8 * y ^ 3 < 0 := by nlinarith + dsimp [qp, y] at hbase ⊢ + field_simp [hx0.ne', Real.pi_ne_zero] at hbase ⊢ + nlinarith [sq_nonneg x, sq_nonneg Real.pi] + have hsq : sl ^ 2 ≤ Real.sin x ^ 2 := + pow_le_pow_left₀ hsl0.le hsl 2 + have hprod : sl ^ 2 * cl ≤ Real.sin x ^ 2 * Real.cos x := by + exact mul_le_mul hsq hcl hcl0.le (sq_nonneg _) + have hcube : Real.cos x ^ 3 ≤ cu ^ 3 := + pow_le_pow_left₀ hcospos.le hcu 3 + have hupper : + qp * (Real.sin x ^ 2 * Real.cos x) + 2 * q * Real.sin x + + 12 / Real.pi * Real.cos x ^ 3 ≤ + qp * (sl ^ 2 * cl) + 2 * q * su + + 12 / Real.pi * cu ^ 3 := by + have h1 := mul_le_mul_of_nonpos_left hprod hqpneg.le + have h2 := mul_le_mul_of_nonneg_left hsu (by positivity : 0 ≤ 2 * q) + have h3 := mul_le_mul_of_nonneg_left hcube + (by positivity : 0 ≤ 12 / Real.pi) + linarith + have hrem : qp * (sl ^ 2 * cl) + 2 * q * su + + 12 / Real.pi * cu ^ 3 < 0 := by + have heq : + Real.pi * (qp * (sl ^ 2 * cl) + 2 * q * su + + 12 / Real.pi * cu ^ 3) = + (5 * Real.pi ^ 12 * y ^ 12 - 180 * Real.pi ^ 10 * y ^ 10 + + 1880 * Real.pi ^ 8 * y ^ 8 - 160 * Real.pi ^ 8 * y ^ 6 + + 160 * Real.pi ^ 8 * y ^ 5 - 7552 * Real.pi ^ 6 * y ^ 6 - + 384 * Real.pi ^ 6 * y ^ 5 + 2048 * Real.pi ^ 6 * y ^ 4 - + 2144 * Real.pi ^ 6 * y ^ 3 + 6720 * Real.pi ^ 4 * y ^ 4 + + 7680 * Real.pi ^ 4 * y ^ 3 - 5760 * Real.pi ^ 4 * y ^ 2 + + 7680 * Real.pi ^ 4 * y + 34560 * Real.pi ^ 2 * y ^ 2 - + 46080 * Real.pi ^ 2 * y - 11520 * Real.pi ^ 2 + 69120) / 5760 := by + dsimp [qp, q, sl, su, cl, cu, y] + field_simp [hx0.ne', Real.pi_ne_zero] + ring + rw [← heq] at hpoly + nlinarith [hpoly, Real.pi_pos] + have hnum := hupper.trans_lt hrem + rw [(hasDerivAt_coherenceSqAngle hx0.ne' hcospos.ne').deriv] + dsimp [qp, q] at hnum ⊢ + apply div_neg_of_neg_of_pos _ (by positivity) + nlinarith [hnum] + +private lemma coherenceSqAngle_strictAntiOn : + StrictAntiOn coherenceSqAngle (Set.Ioc 0 (Real.pi / 5)) := by + apply strictAntiOn_of_deriv_neg (convex_Ioc 0 (Real.pi / 5)) + · intro x hx + obtain ⟨hx0, hx5⟩ := hx + have hxhalf : x < Real.pi / 2 := by nlinarith [Real.pi_pos, hx5] + have hcospos : 0 < Real.cos x := + Real.cos_pos_of_mem_Ioo ⟨by linarith [Real.pi_pos], hxhalf⟩ + exact (hasDerivAt_coherenceSqAngle hx0.ne' hcospos.ne').continuousAt.continuousWithinAt + · intro x hx + rw [interior_Ioc] at hx + exact deriv_coherenceSqAngle_neg hx.1 hx.2.le + +/-- The exact finite coherence squared is strictly increasing from dimension four onward. -/ +theorem CNavaSq_strictMonoOn_ge_four : + StrictMonoOn CNavaSq {d : ℕ | 4 ≤ d} := by + intro a ha b hb hab + rw [CNavaSq_eq_coherenceSqAngle a ha, + CNavaSq_eq_coherenceSqAngle b hb] + have hta0 : 0 < theta a := by unfold theta Nreal; positivity + have htb0 : 0 < theta b := by unfold theta Nreal; positivity + have hta5 : theta a ≤ Real.pi / 5 := by + unfold theta Nreal + rw [div_le_div_iff₀ (by positivity) (by norm_num : (0 : ℝ) < 5)] + have haR : (4 : ℝ) ≤ a := by exact_mod_cast ha + nlinarith [Real.pi_pos] + have htb5 : theta b ≤ Real.pi / 5 := by + unfold theta Nreal + rw [div_le_div_iff₀ (by positivity) (by norm_num : (0 : ℝ) < 5)] + have hbR : (4 : ℝ) ≤ b := by exact_mod_cast hb + nlinarith [Real.pi_pos] + have htheta : theta b < theta a := by + unfold theta Nreal + rw [div_lt_div_iff₀ (by positivity) (by positivity)] + have habR : (a : ℝ) < b := by exact_mod_cast hab + nlinarith [Real.pi_pos] + exact coherenceSqAngle_strictAntiOn ⟨htb0, htb5⟩ ⟨hta0, hta5⟩ htheta + +/-- The exact (square-rooted) finite coherence is strictly increasing from dimension four. -/ +theorem CNava_strictMonoOn_ge_four : + StrictMonoOn CNava {d : ℕ | 4 ≤ d} := by + intro a ha b hb hab + unfold CNava + exact Real.sqrt_lt_sqrt (zero_le_one.trans (one_lt_CNavaSq a ha).le) + (CNavaSq_strictMonoOn_ge_four ha hb hab) + +/-- The geometric defect is strictly increasing from dimension four onward. -/ +theorem deltaGeom_strictMonoOn_ge_four : + StrictMonoOn deltaGeom {d : ℕ | 4 ≤ d} := by + intro a ha b hb hab + simpa [deltaGeom] using CNava_strictMonoOn_ge_four ha hb hab + +/-- Dimension four is the exact global minimum of finite coherence on the physical tail. -/ +theorem CNava_four_le (d : ℕ) (hd : 4 ≤ d) : CNava 4 ≤ CNava d := by + rcases eq_or_lt_of_le hd with h | h + · simp [h] + · have hmem4 : (4 : ℕ) ∈ {d : ℕ | 4 ≤ d} := le_refl 4 + have hmemd : d ∈ {d : ℕ | 4 ≤ d} := hd + exact (CNava_strictMonoOn_ge_four hmem4 hmemd h).le + +/-- Dimension four is the exact global minimum of the geometric defect on the physical tail. -/ +theorem deltaGeom_four_le (d : ℕ) (hd : 4 ≤ d) : + deltaGeom 4 ≤ deltaGeom d := by + simpa [deltaGeom] using CNava_four_le d hd + +/-- The squared geometric defect also has its exact global minimum at dimension four. -/ +theorem deltaGeom_sq_four_le (d : ℕ) (hd : 4 ≤ d) : + deltaGeom 4 ^ 2 ≤ deltaGeom d ^ 2 := by + have h4 : 0 < deltaGeom 4 := by + simpa [deltaGeom] using one_lt_CNava_of_four_le 4 (by omega) + have hd0 : 0 < deltaGeom d := by + simpa [deltaGeom] using one_lt_CNava_of_four_le d hd + nlinarith [deltaGeom_four_le d hd] + +private theorem CNava_tail_strictMono : + StrictMono (fun n : ℕ => CNava (n + 4)) := by + intro a b hab + have hmemA : a + 4 ∈ {d : ℕ | 4 ≤ d} := Nat.le_add_left 4 a + have hmemB : b + 4 ∈ {d : ℕ | 4 ≤ d} := Nat.le_add_left 4 b + have hlt : a + 4 < b + 4 := by omega + exact CNava_strictMonoOn_ge_four hmemA hmemB hlt + +private theorem CNava_tail_tendsto : + Tendsto (fun n : ℕ => CNava (n + 4)) atTop (𝓝 Cinf) := by + exact (Filter.tendsto_add_atTop_iff_nat 4).2 limite_nava_szego_CNava + +/-- Every finite physical coherence lies strictly below its Nava--Szegő attractor. -/ +theorem CNava_lt_Cinf (d : ℕ) (hd : 4 ≤ d) : CNava d < Cinf := by + let n := d - 4 + have hdn : n + 4 = d := by dsimp [n]; omega + have hstep : CNava (n + 4) < CNava ((n + 1) + 4) := + CNava_tail_strictMono (Nat.lt_succ_self n) + have hlimit : CNava ((n + 1) + 4) ≤ Cinf := + CNava_tail_strictMono.monotone.ge_of_tendsto CNava_tail_tendsto (n + 1) + rw [← hdn] + exact hstep.trans_le hlimit + +/-- Every finite physical defect approaches the Szegő defect strictly from below. -/ +theorem deltaGeom_lt_deltaInf (d : ℕ) (hd : 4 ≤ d) : + deltaGeom d < deltaInf := by + simpa [deltaGeom, deltaInf] using CNava_lt_Cinf d hd + +end Gnomon From 33159cb328e72f9716e98726480ed4b0d59c484f Mon Sep 17 00:00:00 2001 From: Eduardo Nava-Hernandez Date: Thu, 17 Sep 2026 07:42:37 -0600 Subject: [PATCH 06/10] feat(PhyslibAlpha): expose the dimensional uncertainty chain Co-authored-by: Claude Opus 4.8 --- PhyslibAlpha.lean | 1 + 1 file changed, 1 insertion(+) diff --git a/PhyslibAlpha.lean b/PhyslibAlpha.lean index 15b69d5e4..99ee40ec0 100644 --- a/PhyslibAlpha.lean +++ b/PhyslibAlpha.lean @@ -99,6 +99,7 @@ public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.SpectralMeasure public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.Stinespring.Kernel public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.Stinespring.Dilation public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.Uncertainty +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty public import PhyslibAlpha.AlgebraicFramework.WStarAlgebra.Basic public import PhyslibAlpha.AlgebraicFramework.WStarAlgebra.ConjSpace public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.Dynamics.Automorphism From 55d368faa0505da0429a6315373bcc9605f2bfb4 Mon Sep 17 00:00:00 2001 From: Eduardo Nava-Hernandez Date: Thu, 17 Sep 2026 08:59:07 -0600 Subject: [PATCH 07/10] fix(PhyslibAlpha): satisfy alpha style and spelling checks Co-authored-by: Claude Opus 4.8 --- .codespellignore | 10 ++++++++++ .../D10_Certificado.lean | 14 +++++++------- .../D11_CuantoMinimoArea.lean | 14 ++++++-------- .../D12_Trace.lean} | 6 +++--- .../D13_FirstBreak.lean} | 10 +++++----- .../D14_SzegoExcess.lean} | 8 ++++---- .../D15_Cosecant.lean} | 6 +++--- .../D8_Szego.lean | 6 +++--- .../D9_Monotonia.lean | 8 ++++---- .../CStarAlgebra/DimensionalUncertainty.lean | 18 +++++++++--------- .../D0_Habitat.lean | 6 +++--- .../D1_CauchyGram.lean | 6 +++--- .../D2_Robertson.lean | 8 ++++---- .../D3_GrafoCamino.lean | 8 ++++---- .../D4_PorQueNoDiagonal.lean | 8 ++++---- .../D5_MaximaTension.lean | 8 ++++---- .../D6_Fiedler.lean | 8 ++++---- .../{PathSpectralGap => PathGap}/D7_Niven.lean | 8 ++++---- .../HilbertSpace/PathSpectralGap.lean | 18 +++++++++--------- scripts/style-exceptions.txt | 1 + 20 files changed, 94 insertions(+), 85 deletions(-) rename PhyslibAlpha/AlgebraicFramework/CStarAlgebra/{DimensionalUncertainty => DimUncertainty}/D10_Certificado.lean (93%) rename PhyslibAlpha/AlgebraicFramework/CStarAlgebra/{DimensionalUncertainty => DimUncertainty}/D11_CuantoMinimoArea.lean (94%) rename PhyslibAlpha/AlgebraicFramework/CStarAlgebra/{DimensionalUncertainty/D12_ConmutadorEscalarFinito.lean => DimUncertainty/D12_Trace.lean} (96%) rename PhyslibAlpha/AlgebraicFramework/CStarAlgebra/{DimensionalUncertainty/D13_PrimeraRupturaCombinatoria.lean => DimUncertainty/D13_FirstBreak.lean} (93%) rename PhyslibAlpha/AlgebraicFramework/CStarAlgebra/{DimensionalUncertainty/D14_ExcesoBrechaSzego.lean => DimUncertainty/D14_SzegoExcess.lean} (90%) rename PhyslibAlpha/AlgebraicFramework/CStarAlgebra/{DimensionalUncertainty/D15_IdentidadCosecanteChebyshev.lean => DimUncertainty/D15_Cosecant.lean} (98%) rename PhyslibAlpha/AlgebraicFramework/CStarAlgebra/{DimensionalUncertainty => DimUncertainty}/D8_Szego.lean (99%) rename PhyslibAlpha/AlgebraicFramework/CStarAlgebra/{DimensionalUncertainty => DimUncertainty}/D9_Monotonia.lean (99%) rename PhyslibAlpha/AlgebraicFramework/HilbertSpace/{PathSpectralGap => PathGap}/D0_Habitat.lean (88%) rename PhyslibAlpha/AlgebraicFramework/HilbertSpace/{PathSpectralGap => PathGap}/D1_CauchyGram.lean (97%) rename PhyslibAlpha/AlgebraicFramework/HilbertSpace/{PathSpectralGap => PathGap}/D2_Robertson.lean (98%) rename PhyslibAlpha/AlgebraicFramework/HilbertSpace/{PathSpectralGap => PathGap}/D3_GrafoCamino.lean (97%) rename PhyslibAlpha/AlgebraicFramework/HilbertSpace/{PathSpectralGap => PathGap}/D4_PorQueNoDiagonal.lean (98%) rename PhyslibAlpha/AlgebraicFramework/HilbertSpace/{PathSpectralGap => PathGap}/D5_MaximaTension.lean (98%) rename PhyslibAlpha/AlgebraicFramework/HilbertSpace/{PathSpectralGap => PathGap}/D6_Fiedler.lean (99%) rename PhyslibAlpha/AlgebraicFramework/HilbertSpace/{PathSpectralGap => PathGap}/D7_Niven.lean (93%) diff --git a/.codespellignore b/.codespellignore index 2fa232ffd..af3f0a3b4 100644 --- a/.codespellignore +++ b/.codespellignore @@ -20,3 +20,13 @@ hTe hSA hsI hax +admisible +argumentos +doble +fase +imposible +ortogonal +pares +posible +ser +vectores diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D10_Certificado.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean similarity index 93% rename from PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D10_Certificado.lean rename to PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean index 4b0bd8876..aa02d76ab 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D10_Certificado.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean @@ -1,16 +1,14 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D6_Fiedler -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D7_Niven -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D8_Szego -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D9_Monotonia - -@[expose] public section +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D6_Fiedler +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D7_Niven +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D8_Szego +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D9_Monotonia /-! # D10 — Certificado conjunto: Fiedler + Niven + Szegő en `H_d` @@ -51,6 +49,8 @@ hospeda en este paquete; a lo más se le ve llegar por la ventana como límite (`D8_Szego.lean`), pero nunca cruza la puerta. -/ +@[expose] public section + noncomputable section open Real diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D11_CuantoMinimoArea.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D11_CuantoMinimoArea.lean similarity index 94% rename from PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D11_CuantoMinimoArea.lean rename to PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D11_CuantoMinimoArea.lean index b5b3a13e1..1444deb03 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D11_CuantoMinimoArea.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D11_CuantoMinimoArea.lean @@ -1,13 +1,11 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D10_Certificado - -@[expose] public section +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D10_Certificado /-! # D11 — Cuanto cuántico elemental de área @@ -30,6 +28,8 @@ Niven/Szegő/monotonía. No modifica Robertson 1929; lo usa como ancla y deriva el piso de área de su realización discreta. -/ +@[expose] public section + noncomputable section namespace CuantoMinimoArea @@ -114,8 +114,7 @@ theorem escala_no_negativa_conserva_cuanto_cuantico /-- Alias operativo para la escala externa no negativa. -/ theorem escala_no_negativa_conserva_cuadrito (escala : ℝ) (hesc : 0 ≤ escala) (d : ℕ) (hd : 4 ≤ d) : - escala * cuadritoMinimo ≤ escala * areaResolucionHd d := -by + escala * cuadritoMinimo ≤ escala * areaResolucionHd d := by simpa [cuadritoMinimo] using escala_no_negativa_conserva_cuanto_cuantico escala hesc d hd /-- Con una escala externa positiva, el cuanto escalado sigue siendo @@ -129,8 +128,7 @@ theorem cuanto_cuantico_escalado_pos estrictamente positivo. -/ theorem cuadrito_escalado_pos (escala : ℝ) (hesc : 0 < escala) : - 0 < escala * cuadritoMinimo := -by + 0 < escala * cuadritoMinimo := by simpa [cuadritoMinimo] using cuanto_cuantico_escalado_pos escala hesc /-- Certificado citable del cuanto cuántico elemental de área. -/ diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D12_ConmutadorEscalarFinito.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D12_Trace.lean similarity index 96% rename from PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D12_ConmutadorEscalarFinito.lean rename to PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D12_Trace.lean index 830bccc2b..c1f1feb9c 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D12_ConmutadorEscalarFinito.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D12_Trace.lean @@ -1,5 +1,5 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ @@ -9,8 +9,6 @@ public import Mathlib.Analysis.InnerProductSpace.PiL2 public import Mathlib.LinearAlgebra.Matrix.Notation public import Mathlib.LinearAlgebra.Matrix.Trace -@[expose] public section - /-! # Obstrucción de traza al conmutador escalar en dimensión finita @@ -30,6 +28,8 @@ Dos afirmaciones, independientes entre sí: `W₂ W₁ = -(W₁ W₂)` (`parWeyl_anticonmuta`). -/ +@[expose] public section + noncomputable section namespace ConmutadorEscalarFinito diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D13_PrimeraRupturaCombinatoria.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D13_FirstBreak.lean similarity index 93% rename from PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D13_PrimeraRupturaCombinatoria.lean rename to PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D13_FirstBreak.lean index 17b6ffd07..ffb4c005e 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D13_PrimeraRupturaCombinatoria.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D13_FirstBreak.lean @@ -1,14 +1,12 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D3_GrafoCamino -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D7_Niven - -@[expose] public section +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D3_GrafoCamino +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D7_Niven /-! # La primera ruptura combinatoria es `d = 4` @@ -30,6 +28,8 @@ la misma dimensión `d = 4`, sin usar ninguna ecuación espectral en la mitad combinatoria. -/ +@[expose] public section + namespace PrimeraRuptura open SimpleGraph diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D14_ExcesoBrechaSzego.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D14_SzegoExcess.lean similarity index 90% rename from PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D14_ExcesoBrechaSzego.lean rename to PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D14_SzegoExcess.lean index 8fc66ab05..367dc117e 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D14_ExcesoBrechaSzego.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D14_SzegoExcess.lean @@ -1,13 +1,11 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D9_Monotonia - -@[expose] public section +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D9_Monotonia /-! # El exceso sobre el límite de Szegő @@ -20,6 +18,8 @@ exactamente en `d = 4`, estrictamente decreciente en `d`, y se disuelve a desde el lado del remanente en vez del valor mismo. -/ +@[expose] public section + open Filter open scoped Topology diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D15_IdentidadCosecanteChebyshev.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D15_Cosecant.lean similarity index 98% rename from PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D15_IdentidadCosecanteChebyshev.lean rename to PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D15_Cosecant.lean index 1a67035d5..a986117c3 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D15_IdentidadCosecanteChebyshev.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D15_Cosecant.lean @@ -1,5 +1,5 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ @@ -12,8 +12,6 @@ public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.Basic public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.RootsExtrema public import Mathlib.Algebra.Polynomial.Splits -@[expose] public section - /-! # Identidad cosecante clásica vía Chebyshev @@ -29,6 +27,8 @@ No depende de ningún objeto definido en otro archivo de este paquete: es un resultado de análisis clásico, completo en sí mismo sobre `Mathlib`. -/ +@[expose] public section + noncomputable section set_option maxHeartbeats 1000000 diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D8_Szego.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean similarity index 99% rename from PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D8_Szego.lean rename to PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean index 92122fc92..b02864110 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D8_Szego.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean @@ -1,5 +1,5 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ @@ -12,8 +12,6 @@ public import Mathlib.Analysis.Real.Pi.Bounds public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Sinc public import Mathlib.Tactic.IntervalCases -@[expose] public section - /-! # D8 — El límite de Szegő y la positividad de la brecha @@ -33,6 +31,8 @@ Dos resultados centrales: `deltaInf = C_∞ − 1 > 0`, consecuencia exacta de `π > 3`. -/ +@[expose] public section + noncomputable section open Real diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D9_Monotonia.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D9_Monotonia.lean similarity index 99% rename from PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D9_Monotonia.lean rename to PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D9_Monotonia.lean index 351f849a8..384f08f9f 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty/D9_Monotonia.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D9_Monotonia.lean @@ -1,13 +1,11 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D8_Szego - -@[expose] public section +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D8_Szego /-! # D9 — Monotonía estricta de `C_Nava` y `deltaGeom` @@ -25,6 +23,8 @@ un certificado polinómico de Bernstein de que el resto es estrictamente negativo en la caja compacta correspondiente. -/ +@[expose] public section + noncomputable section open Set Filter diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty.lean index 159cfb6d8..729cebd99 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimensionalUncertainty.lean @@ -1,16 +1,16 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D8_Szego -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D9_Monotonia -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D10_Certificado -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D11_CuantoMinimoArea -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D12_ConmutadorEscalarFinito -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D13_PrimeraRupturaCombinatoria -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D14_ExcesoBrechaSzego -public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty.D15_IdentidadCosecanteChebyshev +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D8_Szego +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D9_Monotonia +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D10_Certificado +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D11_CuantoMinimoArea +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D12_Trace +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D13_FirstBreak +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D14_SzegoExcess +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D15_Cosecant diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D0_Habitat.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D0_Habitat.lean similarity index 88% rename from PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D0_Habitat.lean rename to PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D0_Habitat.lean index 10f960a59..f077a7781 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D0_Habitat.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D0_Habitat.lean @@ -1,5 +1,5 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ @@ -7,8 +7,6 @@ module public import Mathlib.Analysis.InnerProductSpace.EuclideanDist -@[expose] public section - /-! # D0 — Hábitat: el espacio de Hilbert finito `H_d` @@ -18,6 +16,8 @@ este espacio: en particular, `d = ∞` no es una dimensión realizada, sólo un límite de la familia `{H_d}_{d∈ℕ}` (ver `D8_Szego.lean`). -/ +@[expose] public section + namespace TransportePosicion /-- El espacio de Hilbert finito de dimensión `d`: `ℂ^d` con su estructura diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D1_CauchyGram.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D1_CauchyGram.lean similarity index 97% rename from PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D1_CauchyGram.lean rename to PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D1_CauchyGram.lean index abefffd95..b3c4360f8 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D1_CauchyGram.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D1_CauchyGram.lean @@ -1,5 +1,5 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ @@ -8,8 +8,6 @@ module public import Mathlib.Analysis.InnerProductSpace.Basic public import Mathlib.Analysis.Complex.Norm -@[expose] public section - /-! # D1 — Cauchy–Schwarz vía el defecto de Gram @@ -24,6 +22,8 @@ obtiene de inmediato la desigualdad de Robertson–Schrödinger (`D2_Robertson.l como consecuencia algebraica, no como postulado adicional. -/ +@[expose] public section + noncomputable section namespace ObstruccionGramUnificada diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D2_Robertson.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean similarity index 98% rename from PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D2_Robertson.lean rename to PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean index 1ee32cbf8..2052bb88e 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D2_Robertson.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean @@ -1,19 +1,17 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D1_CauchyGram +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D1_CauchyGram public import Mathlib.Algebra.Order.Ring.Star public import Mathlib.Algebra.Order.Star.Real public import Mathlib.Analysis.Real.Pi.Bounds public import Mathlib.Data.Rat.Star public import Mathlib.Tactic.IntervalCases -@[expose] public section - /-! # D2 — La desigualdad de Robertson (1929) @@ -36,6 +34,8 @@ que se usan más adelante para acotar el coseno y para el teorema de Niven (`D7_Niven.lean`). -/ +@[expose] public section + namespace Robertson1929 universe u diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D3_GrafoCamino.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean similarity index 97% rename from PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D3_GrafoCamino.lean rename to PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean index c7c8d7e35..0d220d594 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D3_GrafoCamino.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean @@ -1,15 +1,13 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D0_Habitat +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D0_Habitat public import Mathlib.Combinatorics.SimpleGraph.Hasse -@[expose] public section - /-! # D3 — Operadores de transporte y posición sobre el grafo camino @@ -28,6 +26,8 @@ elemental). Cualquier grafo local en `Fin d` que no omita un paso mínimo **es** `pathGraph d`; no hay otro candidato. -/ +@[expose] public section + namespace TransportePosicion open SimpleGraph diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D4_PorQueNoDiagonal.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D4_PorQueNoDiagonal.lean similarity index 98% rename from PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D4_PorQueNoDiagonal.lean rename to PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D4_PorQueNoDiagonal.lean index 2db08a9d8..c28642ceb 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D4_PorQueNoDiagonal.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D4_PorQueNoDiagonal.lean @@ -1,13 +1,11 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D3_GrafoCamino - -@[expose] public section +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D3_GrafoCamino /-! # D4 — Por qué no un paso diagonal @@ -32,6 +30,8 @@ paso "diagonal" (cambiar más de una coordenada a la vez) como alternativa: enunciarse de forma no vacía, dos ejes ya distinguidos entre sí. -/ +@[expose] public section + noncomputable section namespace PathGraph3D diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D5_MaximaTension.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean similarity index 98% rename from PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D5_MaximaTension.lean rename to PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean index 74b4eedaf..f6bab4cc3 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D5_MaximaTension.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean @@ -1,11 +1,11 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D3_GrafoCamino +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D3_GrafoCamino public import Mathlib.Analysis.CStarAlgebra.Module.Constructions public import Mathlib.Analysis.InnerProductSpace.Spectrum public import Mathlib.Analysis.Matrix.Hermitian @@ -13,8 +13,6 @@ public import Mathlib.RingTheory.Flat.TorsionFree public import Mathlib.RingTheory.PicardGroup public import Mathlib.RingTheory.SimpleRing.Principal -@[expose] public section - /-! # D5 — Estado de máxima tensión y observable `i[T_d,P_d]` @@ -31,6 +29,8 @@ Se cierra con un certificado concreto de no conmutatividad: `[T_d,P_d] ≠ 0` para `d ≥ 2`, exhibido en una única entrada de matriz. -/ +@[expose] public section + noncomputable section namespace ConstructorEspectralTP diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D6_Fiedler.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean similarity index 99% rename from PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D6_Fiedler.lean rename to PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean index 85795377d..c591c3f72 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D6_Fiedler.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean @@ -1,13 +1,11 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D5_MaximaTension - -@[expose] public section +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D5_MaximaTension /-! # D6 — Descomposición espectral de Fiedler sobre el camino discreto @@ -21,6 +19,8 @@ descomposición espectral del corpus original — es álgebra lineal y teoría espectral de grafos pura, sin ninguna capa interpretativa. -/ +@[expose] public section + noncomputable section open scoped ComplexConjugate diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D7_Niven.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D7_Niven.lean similarity index 93% rename from PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D7_Niven.lean rename to PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D7_Niven.lean index 4dbd6e7d8..3b26a3c0e 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap/D7_Niven.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D7_Niven.lean @@ -1,13 +1,11 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D2_Robertson - -@[expose] public section +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D2_Robertson /-! # D7 — Teorema de Niven: la saturación sólo ocurre en `d ∈ {2,3}` @@ -25,6 +23,8 @@ sobre el modo fundamental del camino discreto— se cumple **si y sólo si** `Constructor_DeltaGeom_Pos`). -/ +@[expose] public section + open Real namespace Gnomon diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap.lean index dba189f69..2acd4b895 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathSpectralGap.lean @@ -1,15 +1,15 @@ /- -Copyright (c) 2026 Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez. All rights reserved. +Copyright (c) 2026 Eduardo Nava-Hernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Eduardo Nava-Hernández, José Arturo Nava-Hernández, Gerardo Gabriel Nava Gómez -/ module -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D0_Habitat -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D1_CauchyGram -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D2_Robertson -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D3_GrafoCamino -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D4_PorQueNoDiagonal -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D5_MaximaTension -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D6_Fiedler -public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap.D7_Niven +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D0_Habitat +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D1_CauchyGram +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D2_Robertson +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D3_GrafoCamino +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D4_PorQueNoDiagonal +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D5_MaximaTension +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D6_Fiedler +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D7_Niven diff --git a/scripts/style-exceptions.txt b/scripts/style-exceptions.txt index e69de29bb..382155ec2 100644 --- a/scripts/style-exceptions.txt +++ b/scripts/style-exceptions.txt @@ -0,0 +1 @@ +PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D9_Monotonia.lean : line 285 : ERR_LIN From 734ad07b4082e7b1c031c55476332452da1dae2b Mon Sep 17 00:00:00 2001 From: Eduardo Nava-Hernandez Date: Thu, 17 Sep 2026 10:03:58 -0600 Subject: [PATCH 08/10] fix(PhyslibAlpha): document declarations for Lean linters Co-authored-by: Claude Opus 4.8 --- .../DimUncertainty/D10_Certificado.lean | 2 ++ .../CStarAlgebra/DimUncertainty/D8_Szego.lean | 2 +- .../HilbertSpace/PathGap/D2_Robertson.lean | 10 +++++++++- .../HilbertSpace/PathGap/D3_GrafoCamino.lean | 13 +++++++------ .../HilbertSpace/PathGap/D5_MaximaTension.lean | 3 ++- .../HilbertSpace/PathGap/D6_Fiedler.lean | 11 +++++++++++ .../InformationGeometry/FisherRao.lean | 1 + 7 files changed, 33 insertions(+), 9 deletions(-) diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean index aa02d76ab..4094bea98 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean @@ -64,6 +64,7 @@ open Gnomon /-! ## Habitat: no se sale de \(H_d\) -/ +/-- Predicate recording that the entire construction remains in the finite Hilbert space `Hd d`. -/ def HabitatHilbertFinito (d : ℕ) : Prop := Hd d = EuclideanSpace ℂ (Fin d) @@ -135,6 +136,7 @@ theorem defecto_real_positivo_desde_Hd4_hasta_limite : /-! ## Certificado conjunto citable -/ +/-- Joint certificate collecting the finite habitat, saturation classification, and positive gap. -/ structure CertificadoBlindajeHd where habitat : ∀ d : ℕ, HabitatHilbertFinito d niven_iff : diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean index b02864110..485d4bd38 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean @@ -344,6 +344,7 @@ theorem one_lt_CNavaSq_six : 1 < CNavaSq 6 := by rw [one_lt_div hden] nlinarith [hc_thr, hcpos] +/-- Rational threshold used in the finite-dimensional lower bound for `CNava`. -/ noncomputable def thrCNava (d : ℕ) : ℝ := ((d : ℝ) - 1) * (((d : ℝ) + 1) ^ 2 - 4) / (((d : ℝ) - 1) * (((d : ℝ) + 1) ^ 2 + 2) + 3 * ((d : ℝ) + 1)) @@ -658,4 +659,3 @@ theorem deltaGeom_pos_of_four_le (d : ℕ) (hd : 4 ≤ d) : 0 < deltaGeom d := b linarith [one_lt_CNava_of_four_le d hd] end Gnomon - diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean index 2052bb88e..a05a85eef 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean @@ -46,10 +46,14 @@ observables conjugados en un estado normalizado de un espacio de Hilbert. `⟨ψ,[A,B]ψ⟩`. -/ structure Evaluacion (H : Type u) [NormedAddCommGroup H] [InnerProductSpace ℂ H] where + /-- The normalized state in which the observables are evaluated. -/ estado : H normalizado : ‖estado‖ = 1 + /-- Standard deviation of the first observable. -/ sigmaA : ℝ + /-- Standard deviation of the second observable. -/ sigmaB : ℝ + /-- Expectation value of the commutator. -/ mediaConmutador : ℂ sigmaA_nonneg : 0 ≤ sigmaA sigmaB_nonneg : 0 ≤ sigmaB @@ -65,6 +69,7 @@ conmutador, por lo que el lado derecho de Robertson es el más exigente de la familia de estados normalizados. -/ structure MaximaTension (H : Type u) [NormedAddCommGroup H] [InnerProductSpace ℂ H] extends Evaluacion H where + /-- Norm of the commutator realized by the maximal-tension state. -/ normaConmutador : ℝ normaConmutador_nonneg : 0 ≤ normaConmutador realiza_norma : @@ -84,9 +89,13 @@ theorem MaximaTension.cota_por_norma /-- Evaluación cuadrática Robertson–Schrödinger: el producto de dispersiones domina el piso cuadrático compuesto por covarianza y conmutador. -/ structure EvaluacionSchrodinger where + /-- Standard deviation of the first observable. -/ sigmaA : ℝ + /-- Standard deviation of the second observable. -/ sigmaB : ℝ + /-- Symmetric covariance contribution. -/ covarianza : ℝ + /-- Commutator contribution. -/ conmutador : ℝ sigmaA_nonneg : 0 ≤ sigmaA sigmaB_nonneg : 0 ≤ sigmaB @@ -282,4 +291,3 @@ theorem pisoSchrodinger_evaluacionSchrodingerDeGram_le simpa [evaluacionSchrodingerDeGram] using h end ObstruccionGramUnificada - diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean index 0d220d594..7708320eb 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean @@ -48,7 +48,7 @@ theorem grafoTP_adj {d : ℕ} {i j : Fin d} : def PasoMinimo {d : ℕ} (i j : Fin d) : Prop := i.val + 1 = j.val ∨ j.val + 1 = i.val -instance pasoMinimo_decidable {d : ℕ} (i j : Fin d) : +instance instDecidablePasoMinimo {d : ℕ} (i j : Fin d) : Decidable (PasoMinimo i j) := by unfold PasoMinimo infer_instance @@ -147,6 +147,7 @@ def OmitePasoElemental {d : ℕ} (G : SimpleGraph (Fin d)) : Prop := /-- Canal ordenado, local y completo en la celda discreta. -/ structure CanalLocalNoRamificadoOrdenado (d : ℕ) where + /-- The graph supporting the ordered local channel. -/ grafo : SimpleGraph (Fin d) localidad_ordenada : LocalidadOrdenada grafo pasos_elementales : PasosElementalesCompletos grafo @@ -178,7 +179,7 @@ theorem canal_local_no_ramificado_iso_pathGraph /-- El canal canónico `T_d/P_d` satisface directamente el certificado local ordenado: no tiene saltos y no omite pasos elementales. -/ -def canal_TP_local_no_ramificado (d : ℕ) : +def canalTPLocalNoRamificado (d : ℕ) : CanalLocalNoRamificadoOrdenado d where grafo := TransportePosicion.GrafoTP d localidad_ordenada := by @@ -202,11 +203,11 @@ theorem no_hay_canal_local_mas_simple_que_Pd /-- Cierre: el soporte canónico `T_d/P_d` es `pathGraph d`, y cualquier intento local de hacerlo "más simple" pierde un paso elemental. -/ theorem cierre_minimalidad_local_TP (d : ℕ) : - (canal_TP_local_no_ramificado d).grafo = SimpleGraph.pathGraph d ∧ - ¬ OmitePasoElemental (canal_TP_local_no_ramificado d).grafo := by + (canalTPLocalNoRamificado d).grafo = SimpleGraph.pathGraph d ∧ + ¬ OmitePasoElemental (canalTPLocalNoRamificado d).grafo := by exact ⟨canal_local_no_ramificado_es_pathGraph - (canal_TP_local_no_ramificado d), + (canalTPLocalNoRamificado d), no_hay_canal_local_mas_simple_que_Pd - (canal_TP_local_no_ramificado d)⟩ + (canalTPLocalNoRamificado d)⟩ end CanalPreFuerza diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean index f6bab4cc3..63cd3ef33 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean @@ -54,10 +54,12 @@ theorem existe_indice_extremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : (fun j => |hK.eigenvalues rfl j|) hne exact ⟨i, fun j => hi j (Finset.mem_univ j)⟩ +/-- An index at which the absolute eigenvalue of `K` is maximal. -/ def indiceExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : Fin (Module.finrank ℂ H) := (existe_indice_extremal K hK).choose +/-- The eigenvalue selected by `indiceExtremal`. -/ def autovalorExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : ℝ := hK.eigenvalues rfl (indiceExtremal K hK) @@ -477,4 +479,3 @@ theorem KdOp_no_cero (d : ℕ) (hd : 2 ≤ d) : KdOp d ≠ 0 := (conmutador_TdOp_PdOp_no_cero d hd) end TransportePosicion - diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean index c591c3f72..0d1b89d11 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean @@ -94,9 +94,11 @@ theorem Ad_mulVec_apply simp_rw [ite_mul, one_mul, zero_mul] exact sum_pasoMinimo i f +/-- Spectral angle of the `k`th sine mode on the path with `d` vertices. -/ noncomputable def anguloModo (d : ℕ) (k : Fin d) : ℝ := ((k.val : ℝ) + 1) * Real.pi / ((d : ℝ) + 1) +/-- The unnormalized sine eigenmode of the path adjacency matrix. -/ noncomputable def modoSeno (d : ℕ) (k : Fin d) : Fin d → ℂ := fun j => (Real.sin (((j.val : ℝ) + 1) * anguloModo d k) : ℂ) @@ -166,6 +168,7 @@ theorem Ad_modoSeno subst i norm_num [modoSeno, anguloModo] +/-- Adjacency eigenvalue associated with `modoSeno d k`. -/ noncomputable def autovalorAd (d : ℕ) (k : Fin d) : ℂ := (2 * Real.cos (anguloModo d k) : ℝ) @@ -242,6 +245,7 @@ theorem modosSeno_linearIndependent (autovalorAd d) autovalorAd_injective (modoSeno d) (modoSeno_hasEigenvector hd) +/-- Basis of sine eigenmodes for the finite path adjacency operator. -/ noncomputable def baseModosSeno {d : ℕ} (hd : 1 ≤ d) : Module.Basis (Fin d) ℂ (Fin d → ℂ) := by classical @@ -364,11 +368,14 @@ theorem norma_autovalorAd_le_rho abs_cos_anguloModo_le_cos_fiedler hd k) (by norm_num) +/-- Matrix of the Hermitian commutator observable `i[T_d,P_d]`. -/ noncomputable def Kmat (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := Complex.I • ((Td d * Pd d) - (Pd d * Td d)) +/-- Phase factor converting sine modes into commutator eigenmodes. -/ noncomputable def fase (j : ℕ) : ℂ := (-Complex.I) ^ j +/-- Phase-twisted sine mode for the commutator matrix. -/ noncomputable def modoFase (d : ℕ) (k : Fin d) : Fin d → ℂ := fun j => fase j.val * modoSeno d k j @@ -479,6 +486,7 @@ theorem Kmat_mulVec_modoFase push_cast ring +/-- Eigenvalue of `Kmat d` associated with `modoFase d k`. -/ noncomputable def autovalorK (d : ℕ) (k : Fin d) : ℂ := ((((2 / ((d : ℝ) - 1)) / rho d : ℝ) : ℂ) * autovalorAd d k) @@ -538,6 +546,7 @@ theorem modosFase_linearIndependent (autovalorK d) (autovalorK_injective hd) (modoFase d) (modoFase_hasEigenvector hd) +/-- Basis of phase-twisted eigenmodes for `Kmat`. -/ noncomputable def baseModosFase {d : ℕ} (hd : 2 ≤ d) : Module.Basis (Fin d) ℂ (Fin d → ℂ) := by classical @@ -627,6 +636,7 @@ theorem KdOp_eq_Kmat (d : ℕ) : Matrix (Fin d) (Fin d) ℂ ≃ₗ[ℂ] (Hd d →ₗ[ℂ] Hd d)).map_smul Complex.I ((Td d * Pd d) - (Pd d * Td d)) |>.symm +/-- The phase-twisted commutator eigenmode represented in `Hd d`. -/ noncomputable def modoFaseHd (d : ℕ) (k : Fin d) : Hd d := WithLp.toLp 2 (modoFase d k) @@ -663,6 +673,7 @@ theorem modosFaseHd_linearIndependent (autovalorK d) (autovalorK_injective hd) (modoFaseHd d) (modoFaseHd_hasEigenvector hd) +/-- Basis of commutator eigenmodes in the finite Hilbert space `Hd d`. -/ noncomputable def baseModosFaseHd {d : ℕ} (hd : 2 ≤ d) : Module.Basis (Fin d) ℂ (Hd d) := (baseModosFase hd).map (WithLp.linearEquiv 2 ℂ (Fin d → ℂ)).symm diff --git a/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean b/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean index 396bad8d8..4a22a1893 100644 --- a/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean +++ b/PhyslibAlpha/AlgebraicFramework/InformationGeometry/FisherRao.lean @@ -48,6 +48,7 @@ namespace PhyslibAlpha /-- A point on the open probability simplex: strictly positive weights summing to 1. -/ structure OpenSimplex (α : Type*) [Fintype α] where + /-- The strictly positive probability weight at each outcome. -/ val : α → ℝ pos : ∀ i, 0 < val i sum_one : ∑ i : α, val i = 1 From 50ad2ce9fc3eec887a4d1df87c9be7f860aa4967 Mon Sep 17 00:00:00 2001 From: Eduardo Nava Hernandez Date: Thu, 17 Sep 2026 10:25:19 -0600 Subject: [PATCH 09/10] fix(PhyslibAlpha): register all PathGap and DimUncertainty modules in import file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The alphaFileImports CI check requires every .lean file under PhyslibAlpha/ to have a corresponding public import line. Adds the 17 missing entries (D0–D7 PathGap, PathSpectralGap, D8–D15 DimUncertainty). Co-Authored-By: Claude Opus 4.6 --- PhyslibAlpha.lean | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/PhyslibAlpha.lean b/PhyslibAlpha.lean index 99ee40ec0..81fa02f5f 100644 --- a/PhyslibAlpha.lean +++ b/PhyslibAlpha.lean @@ -100,6 +100,23 @@ public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.Stinespring.Kernel public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.Stinespring.Dilation public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.Uncertainty public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimensionalUncertainty +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D8_Szego +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D9_Monotonia +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D10_Certificado +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D11_CuantoMinimoArea +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D12_Trace +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D13_FirstBreak +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D14_SzegoExcess +public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D15_Cosecant +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D0_Habitat +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D1_CauchyGram +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D2_Robertson +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D3_GrafoCamino +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D4_PorQueNoDiagonal +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D5_MaximaTension +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D6_Fiedler +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D7_Niven +public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathSpectralGap public import PhyslibAlpha.AlgebraicFramework.WStarAlgebra.Basic public import PhyslibAlpha.AlgebraicFramework.WStarAlgebra.ConjSpace public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.Dynamics.Automorphism From d9fde6a6107447baa0c80ef9593951ed17e4734e Mon Sep 17 00:00:00 2001 From: Eduardo Nava Hernandez Date: Fri, 18 Sep 2026 04:30:55 -0600 Subject: [PATCH 10/10] fix(PhyslibAlpha): translate all Spanish comments and docstrings to English Addresses reviewer request from TomOleDiem on PR #1658 to make all comments in the files English. Translates all /-! module headers, /-- docstrings, and inline comments across D0-D15, preserving Lean identifier names unchanged. Co-Authored-By: Claude Opus 4.6 --- .../DimUncertainty/D10_Certificado.lean | 72 +++++------ .../DimUncertainty/D11_CuantoMinimoArea.lean | 72 +++++------ .../DimUncertainty/D12_Trace.lean | 48 +++---- .../DimUncertainty/D13_FirstBreak.lean | 60 ++++----- .../DimUncertainty/D14_SzegoExcess.lean | 36 +++--- .../DimUncertainty/D15_Cosecant.lean | 33 ++--- .../CStarAlgebra/DimUncertainty/D8_Szego.lean | 112 ++++++++-------- .../DimUncertainty/D9_Monotonia.lean | 22 ++-- .../HilbertSpace/PathGap/D0_Habitat.lean | 18 +-- .../HilbertSpace/PathGap/D1_CauchyGram.lean | 43 ++++--- .../HilbertSpace/PathGap/D2_Robertson.lean | 120 +++++++++--------- .../HilbertSpace/PathGap/D3_GrafoCamino.lean | 109 ++++++++-------- .../PathGap/D4_PorQueNoDiagonal.lean | 115 +++++++++-------- .../PathGap/D5_MaximaTension.lean | 89 ++++++------- .../HilbertSpace/PathGap/D6_Fiedler.lean | 18 +-- .../HilbertSpace/PathGap/D7_Niven.lean | 30 ++--- 16 files changed, 502 insertions(+), 495 deletions(-) diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean index 4094bea98..b0f8d5f82 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D10_Certificado.lean @@ -11,42 +11,42 @@ public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D8_Sze public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D9_Monotonia /-! -# D10 — Certificado conjunto: Fiedler + Niven + Szegő en `H_d` +# D10 — Joint certificate: Fiedler + Niven + Szegő in `H_d` -Reúne, en un único certificado citable, los tres pilares que se apoyan sobre -el hábitat común `H_d = ℂ^d` (`D0_Habitat.lean`): la descomposición -espectral de Fiedler (`D6_Fiedler.lean`), el teorema de Niven -(`D7_Niven.lean`) y el límite de Szegő con la positividad de la brecha -(`D8_Szego.lean`). Este es el teorema terminal del paquete: aquí se acaba -la matemática que se demuestra en este repositorio. +Gathers, in a single citable certificate, the three pillars that rest on +the common habitat `H_d = ℂ^d` (`D0_Habitat.lean`): the Fiedler spectral +decomposition (`D6_Fiedler.lean`), the Niven theorem (`D7_Niven.lean`), +and the Szegő limit with gap positivity (`D8_Szego.lean`). This is the +terminal theorem of the package: the mathematics proved in this +repository ends here. -# Blindaje de `δ_geom(d)` en el Hilbert finito `H_d` +# Shielding `δ_geom(d)` in the finite Hilbert space `H_d` -**Hábitat:** \(H_d=\mathtt{EuclideanSpace}\,\mathbb{C}\,(\mathtt{Fin}\,d)\). -No se abandona ese espacio: es el que acoge la derivación del marco. +**Habitat:** \(H_d=\mathtt{EuclideanSpace}\,\mathbb{C}\,(\mathtt{Fin}\,d)\). +This space is never left: it is where the framework derivation lives. -**Terna de escudos** (todo sobre el discreto): +**Shield triad** (all on the discrete setting): -| Escudo | Contenido Lean | -|--------|----------------| -| **Fiedler** | modo fundamental / `KdOp` / radio espectral en \(H_d\) | +| Shield | Lean content | +|--------|-------------| +| **Fiedler** | fundamental mode / `KdOp` / spectral radius in \(H_d\) | | **Niven** | `saturacion_iff` + `no_reposición_saturacion_camino` + `deltaGeom_pos_of_four_le` | -| **Szegő** | `limite_szego_CNava` + `deltaInf_pos` + ∞ no es dimensión | -| **Monotonía** | `deltaGeom_four_le`: `δ_geom(4)` es el piso global para todo `d ≥ 4` | - -Lectura: los productos trigonométricos simultáneamente racionales de la -saturación del camino **solo** existen en \(d\in\{2,3\}\). No hay más -semillas; por eso **nada repone la cota unitaria** después de \(d=4\). -Además, la monotonía certificada fija a \(d=4\) como el menor defecto -realizado: cualquier medición en un \(H_d\) físico con \(d\ge4\) queda -separada del cero por al menos \(\delta_{\rm geom}(4)\). Al crecer la -familia finita, el defecto no se apaga: converge a +| **Szegő** | `limite_szego_CNava` + `deltaInf_pos` + ∞ is not a dimension | +| **Monotonicity** | `deltaGeom_four_le`: `δ_geom(4)` is the global floor for all `d ≥ 4` | + +Reading: the simultaneously rational trigonometric products of path +saturation **only** exist at \(d\in\{2,3\}\). There are no more seeds; +that is why **nothing restores the unit bound** after \(d=4\). +Moreover, certified monotonicity pins \(d=4\) as the smallest realized +defect: any measurement in a physical \(H_d\) with \(d\ge4\) is +separated from zero by at least \(\delta_{\rm geom}(4)\). As the finite +family grows, the defect does not vanish: it converges to \(\delta_\infty>0\). -**Cierre del hábitat:** \(H_d = \mathbb{C}^d \cong \mathbb{R}^{2d}\), finito. -Punto. Si quieren continuo infinito, aquí no es hotel — \(d=\infty\) no se -hospeda en este paquete; a lo más se le ve llegar por la ventana como límite -(`D8_Szego.lean`), pero nunca cruza la puerta. +**Habitat closure:** \(H_d = \mathbb{C}^d \cong \mathbb{R}^{2d}\), finite. +Period. For continuous infinite, this is not a hotel — \(d=\infty\) is not +hosted in this package; at most one sees it arriving through the window as +a limit (`D8_Szego.lean`), but it never crosses the door. -/ @[expose] public section @@ -62,7 +62,7 @@ namespace BlindajeHd open TransportePosicion open Gnomon -/-! ## Habitat: no se sale de \(H_d\) -/ +/-! ## Habitat: stays within \(H_d\) -/ /-- Predicate recording that the entire construction remains in the finite Hilbert space `Hd d`. -/ def HabitatHilbertFinito (d : ℕ) : Prop := @@ -77,13 +77,13 @@ theorem infinito_no_es_habitat : 0 < deltaInf := infinito_no_es_dimension_sino_limite -/-! ## Niven: cota unitaria no se repone -/ +/-! ## Niven: the unit bound does not recover -/ theorem niven_saturacion_solo_semillas (d : ℕ) (hd : 2 ≤ d) : cos (π / (d + 1)) ^ 2 = ((d : ℝ) - 1) / 4 ↔ d = 2 ∨ d = 3 := saturacion_iff d hd -/-- **Nada repone la cota** tras \(d=4\). -/ +/-- **Nothing restores the bound** after \(d=4\). -/ theorem niven_cota_unitaria_no_se_repone (d : ℕ) (hd : 4 ≤ d) : cos (π / (d + 1)) ^ 2 ≠ ((d : ℝ) - 1) / 4 := no_reposición_saturacion_camino d hd @@ -96,14 +96,14 @@ theorem piso_precision_deltaGeom_d4_en_Hd (d : ℕ) (hd : 4 ≤ d) : deltaGeom 4 ≤ deltaGeom d := deltaGeom_four_le d hd -/-- En el régimen físico finito `H_d`, `d ≥ 4`, no existe lectura con defecto -por debajo del piso elemental `δ_geom(4)`. -/ +/-- In the finite physical regime `H_d`, `d ≥ 4`, no reading has defect +below the elementary floor `δ_geom(4)`. -/ theorem no_medicion_absoluta_bajo_piso_d4_en_Hd (d : ℕ) (hd : 4 ≤ d) (ε : ℝ) (hε : ε < deltaGeom 4) : ε < deltaGeom d := lt_of_lt_of_le hε (piso_precision_deltaGeom_d4_en_Hd d hd) -/-! ## Fiedler: espectro y banda en \(H_d\) -/ +/-! ## Fiedler: spectrum and band in \(H_d\) -/ theorem fiedler_autovector_en_Hd (d : ℕ) (hd : 2 ≤ d) : KdOp d (vectorFiedlerExplicito d) = @@ -119,7 +119,7 @@ theorem fiedler_radio_banda (d : ℕ) (hd : 2 ≤ d) : letI : Nontrivial (Hd d) := inferInstance exact radioEspectral_KdOp_eq_paso d hd -/-! ## Szegő: asintótica de la familia finita -/ +/-! ## Szegő: asymptotics of the finite family -/ theorem szego_limite_familia_finita : Tendsto CNava atTop (𝓝 Cinf) := @@ -134,7 +134,7 @@ theorem defecto_real_positivo_desde_Hd4_hasta_limite : 0 < deltaInf := ⟨niven_deltaGeom_pos_en_Hd, limite_defecto_geometrico, szego_deltaInf_pos⟩ -/-! ## Certificado conjunto citable -/ +/-! ## Joint citable certificate -/ /-- Joint certificate collecting the finite habitat, saturation classification, and positive gap. -/ structure CertificadoBlindajeHd where diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D11_CuantoMinimoArea.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D11_CuantoMinimoArea.lean index 1444deb03..8624b16a4 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D11_CuantoMinimoArea.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D11_CuantoMinimoArea.lean @@ -8,24 +8,24 @@ module public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D10_Certificado /-! -# D11 — Cuanto cuántico elemental de área +# D11 — Elementary quantum of area -Este módulo baja a Lean la lectura estrictamente matemática del cuanto -cuántico elemental: +This module brings to Lean the strictly mathematical reading of the +elementary quantum: -* `deltaGeom 4` es el primer defecto lineal positivo de la cola `d ≥ 4`. -* `deltaGeom 4 ^ 2` es el primer cuanto cuántico elemental de área. -* Por monotonía, ninguna resolución de área realizada en `H_d`, `d ≥ 4`, - queda por debajo de ese cuanto. +* `deltaGeom 4` is the first positive linear defect of the `d ≥ 4` tail. +* `deltaGeom 4 ^ 2` is the first elementary quantum of area. +* By monotonicity, no area resolution realized in `H_d`, `d ≥ 4`, + falls below that quantum. -No introduce unidades físicas, bariones ni escala de Planck. Si luego se -quiere poner una unidad externa, basta multiplicar por una escala no negativa: -la cota sobrevive por orden. +No physical units, baryons, or Planck scale are introduced. To attach +an external unit later, it suffices to multiply by a nonnegative scale: +the bound survives by order. -La dependencia matemática es la cadena del paquete: -Cauchy--Gram → Robertson--Schrödinger → instancia `T_d/P_d` → -Niven/Szegő/monotonía. No modifica Robertson 1929; lo usa como ancla y -deriva el piso de área de su realización discreta. +The mathematical dependency is the package chain: +Cauchy--Gram → Robertson--Schrödinger → `T_d/P_d` instance → +Niven/Szegő/monotonicity. It does not modify Robertson 1929; it uses +it as an anchor and derives the area floor from its discrete realization. -/ @[expose] public section @@ -36,102 +36,102 @@ namespace CuantoMinimoArea open Gnomon -/-- Cuanto cuántico elemental de área de la cola `H_d`, `d ≥ 4`. -/ +/-- Elementary quantum of area of the `H_d` tail, `d ≥ 4`. -/ def cuantoCuanticoElemental : ℝ := deltaGeom 4 ^ 2 -/-- Alias operativo: el "cuadrito" mínimo es el cuanto cuántico elemental. -/ +/-- Operational alias: the minimum "small square" is the elementary quantum. -/ def cuadritoMinimo : ℝ := cuantoCuanticoElemental -/-- Área de resolución inducida por el defecto geométrico en `H_d`. -/ +/-- Resolution area induced by the geometric defect in `H_d`. -/ def areaResolucionHd (d : ℕ) : ℝ := deltaGeom d ^ 2 -/-- El nombre citable y el alias operativo son la misma cantidad. -/ +/-- The citable name and the operational alias are the same quantity. -/ theorem cuadritoMinimo_eq_cuantoCuanticoElemental : cuadritoMinimo = cuantoCuanticoElemental := by rfl -/-- El "cuadrito" es exactamente la resolución de área en `H_4`. -/ +/-- The "small square" is exactly the area resolution in `H_4`. -/ theorem cuadritoMinimo_eq_areaResolucionH4 : cuadritoMinimo = areaResolucionHd 4 := by rfl -/-- El cuanto cuántico elemental es exactamente la resolución de área en `H_4`. -/ +/-- The elementary quantum is exactly the area resolution in `H_4`. -/ theorem cuantoCuanticoElemental_eq_areaResolucionH4 : cuantoCuanticoElemental = areaResolucionHd 4 := by rfl -/-- El cuanto cuántico elemental de área es estrictamente positivo. -/ +/-- The elementary quantum of area is strictly positive. -/ theorem cuantoCuanticoElemental_pos : 0 < cuantoCuanticoElemental := by unfold cuantoCuanticoElemental have hδ : 0 < deltaGeom 4 := deltaGeom_pos_of_four_le 4 (by omega) positivity -/-- Alias de positividad para el nombre operativo. -/ +/-- Positivity alias for the operational name. -/ theorem cuadritoMinimo_pos : 0 < cuadritoMinimo := by simpa [cuadritoMinimo] using cuantoCuanticoElemental_pos -/-- Toda área de resolución en `H_d`, `d ≥ 4`, está por encima del cuanto. -/ +/-- Every resolution area in `H_d`, `d ≥ 4`, lies above the quantum. -/ theorem cuantoCuanticoElemental_le_areaResolucionHd (d : ℕ) (hd : 4 ≤ d) : cuantoCuanticoElemental ≤ areaResolucionHd d := by unfold cuantoCuanticoElemental areaResolucionHd exact deltaGeom_sq_four_le d hd -/-- Toda área de resolución en `H_d`, `d ≥ 4`, está por encima del cuadrito. -/ +/-- Every resolution area in `H_d`, `d ≥ 4`, lies above the small square. -/ theorem cuadritoMinimo_le_areaResolucionHd (d : ℕ) (hd : 4 ≤ d) : cuadritoMinimo ≤ areaResolucionHd d := by simpa [cuadritoMinimo] using cuantoCuanticoElemental_le_areaResolucionHd d hd -/-- No existe una resolución realizada en `H_d`, `d ≥ 4`, estrictamente menor -que el cuanto cuántico elemental. -/ +/-- No realized resolution in `H_d`, `d ≥ 4`, is strictly less than the +elementary quantum. -/ theorem no_hay_resolucion_menor_que_cuanto_cuantico (d : ℕ) (hd : 4 ≤ d) : ¬ areaResolucionHd d < cuantoCuanticoElemental := by exact not_lt.mpr (cuantoCuanticoElemental_le_areaResolucionHd d hd) -/-- Alias operativo: no hay resolución menor que el cuadrito mínimo. -/ +/-- Operational alias: no resolution is less than the minimum small square. -/ theorem no_hay_resolucion_menor_que_cuadrito (d : ℕ) (hd : 4 ≤ d) : ¬ areaResolucionHd d < cuadritoMinimo := by simpa [cuadritoMinimo] using no_hay_resolucion_menor_que_cuanto_cuantico d hd -/-- Cualquier umbral por debajo del cuadrito queda por debajo de toda -resolución realizada en la cola `d ≥ 4`. -/ +/-- Any threshold below the small square falls below every realized +resolution in the `d ≥ 4` tail. -/ theorem umbral_bajo_cuadrito_no_alcanza_Hd (d : ℕ) (hd : 4 ≤ d) (ε : ℝ) (hε : ε < cuadritoMinimo) : ε < areaResolucionHd d := lt_of_lt_of_le hε (cuadritoMinimo_le_areaResolucionHd d hd) -/-- Poner una escala externa no negativa conserva la cota mínima. -/ +/-- Applying a nonnegative external scale preserves the minimum bound. -/ theorem escala_no_negativa_conserva_cuanto_cuantico (escala : ℝ) (hesc : 0 ≤ escala) (d : ℕ) (hd : 4 ≤ d) : escala * cuantoCuanticoElemental ≤ escala * areaResolucionHd d := mul_le_mul_of_nonneg_left (cuantoCuanticoElemental_le_areaResolucionHd d hd) hesc -/-- Alias operativo para la escala externa no negativa. -/ +/-- Operational alias for the nonnegative external scale. -/ theorem escala_no_negativa_conserva_cuadrito (escala : ℝ) (hesc : 0 ≤ escala) (d : ℕ) (hd : 4 ≤ d) : escala * cuadritoMinimo ≤ escala * areaResolucionHd d := by simpa [cuadritoMinimo] using escala_no_negativa_conserva_cuanto_cuantico escala hesc d hd -/-- Con una escala externa positiva, el cuanto escalado sigue siendo -estrictamente positivo. -/ +/-- With a positive external scale, the scaled quantum remains strictly +positive. -/ theorem cuanto_cuantico_escalado_pos (escala : ℝ) (hesc : 0 < escala) : 0 < escala * cuantoCuanticoElemental := mul_pos hesc cuantoCuanticoElemental_pos -/-- Alias operativo: con escala positiva, el cuadrito escalado sigue siendo -estrictamente positivo. -/ +/-- Operational alias: with a positive scale, the scaled small square +remains strictly positive. -/ theorem cuadrito_escalado_pos (escala : ℝ) (hesc : 0 < escala) : 0 < escala * cuadritoMinimo := by simpa [cuadritoMinimo] using cuanto_cuantico_escalado_pos escala hesc -/-- Certificado citable del cuanto cuántico elemental de área. -/ +/-- Citable certificate for the elementary quantum of area. -/ structure CertificadoCuantoMinimoArea where cuanto_pos : 0 < cuantoCuanticoElemental area_minima : ∀ d : ℕ, 4 ≤ d → cuantoCuanticoElemental ≤ areaResolucionHd d diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D12_Trace.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D12_Trace.lean index c1f1feb9c..7734fcd95 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D12_Trace.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D12_Trace.lean @@ -10,21 +10,21 @@ public import Mathlib.LinearAlgebra.Matrix.Notation public import Mathlib.LinearAlgebra.Matrix.Trace /-! -# Obstrucción de traza al conmutador escalar en dimensión finita +# Trace obstruction to a scalar commutator in finite dimension -Complemento algebraico a la construcción de `T_d`, `P_d` en -`D3_GrafoCamino.lean`: en dimensión finita ningún conmutador matricial -puede ser un múltiplo escalar no nulo de la identidad, mientras que sí -existen pares de matrices unitarias que anticonmutan exactamente. +Algebraic complement to the construction of `T_d`, `P_d` in +`D3_GrafoCamino.lean`: in finite dimension no matrix commutator can +equal a nonzero scalar multiple of the identity, while exact +anticommuting unitary pairs do exist. -Dos afirmaciones, independientes entre sí: +Two independent statements: -1. Todo conmutador matricial `[Q,P] = QP - PQ` tiene traza cero - (`Matrix.trace_mul_comm`), así que nunca puede igualar `c • 1` para +1. Every matrix commutator `[Q,P] = QP - PQ` has trace zero + (`Matrix.trace_mul_comm`), so it can never equal `c • 1` for `c ≠ 0` (`no_nonzero_scalar_exact_commutator`). -2. Esa obstrucción es sobre el conmutador aditivo; no impide la - no-conmutatividad multiplicativa: el par de matrices `2×2` - `W₁ = !![0,1;1,0]`, `W₂ = !![1,0;0,-1]` satisface exactamente +2. That obstruction is on the additive commutator; it does not prevent + multiplicative non-commutativity: the `2×2` matrix pair + `W₁ = !![0,1;1,0]`, `W₂ = !![1,0;0,-1]` satisfies exactly `W₂ W₁ = -(W₁ W₂)` (`parWeyl_anticonmuta`). -/ @@ -34,19 +34,19 @@ noncomputable section namespace ConmutadorEscalarFinito -/-- Conmutador matricial. -/ +/-- Matrix commutator. -/ def commutator {d : ℕ} (Q P : Matrix (Fin d) (Fin d) ℂ) : Matrix (Fin d) (Fin d) ℂ := Q * P - P * Q -/-- La traza de todo conmutador matricial finito es cero. -/ +/-- The trace of every finite matrix commutator is zero. -/ theorem trace_commutator_zero {d : ℕ} (Q P : Matrix (Fin d) (Fin d) ℂ) : Matrix.trace (commutator Q P) = 0 := by rw [commutator, Matrix.trace_sub, Matrix.trace_mul_comm Q P, sub_self] -/-- En dimensión finita positiva, un conmutador no puede ser un múltiplo -escalar no nulo de la identidad. -/ +/-- In positive finite dimension, a commutator cannot be a nonzero +scalar multiple of the identity. -/ theorem no_nonzero_scalar_exact_commutator {d : ℕ} (hd : 0 < d) (Q P : Matrix (Fin d) (Fin d) ℂ) (c : ℂ) (hc : c ≠ 0) : commutator Q P ≠ c • (1 : Matrix (Fin d) (Fin d) ℂ) := by @@ -61,33 +61,33 @@ theorem no_nonzero_scalar_exact_commutator {d : ℕ} (hd : 0 < d) exact_mod_cast (Nat.ne_of_gt hd) exact (mul_ne_zero hc hd0) ht.symm -/-- Corolario: en particular, el conmutador tampoco puede igualar un -múltiplo imaginario `i·c` de la identidad para ningún real `c ≠ 0`. -/ +/-- Corollary: in particular, the commutator cannot equal an imaginary +multiple `i·c` of the identity for any real `c ≠ 0`. -/ theorem commutador_ne_escalar_imaginario {d : ℕ} (hd : 0 < d) (Q P : Matrix (Fin d) (Fin d) ℂ) (c : ℝ) (hc : c ≠ 0) : commutator Q P ≠ (Complex.I * (c : ℂ)) • (1 : Matrix (Fin d) (Fin d) ℂ) := by apply no_nonzero_scalar_exact_commutator hd Q P exact mul_ne_zero Complex.I_ne_zero (Complex.ofReal_ne_zero.mpr hc) -/-! ## Un par de Weyl exacto en dimensión dos -/ +/-! ## An exact Weyl pair in dimension two -/ -/-- Primera matriz del par de Weyl `2×2`. -/ +/-- First matrix of the `2×2` Weyl pair. -/ def W1 : Matrix (Fin 2) (Fin 2) ℂ := !![0, 1; 1, 0] -/-- Segunda matriz del par de Weyl `2×2`. -/ +/-- Second matrix of the `2×2` Weyl pair. -/ def W2 : Matrix (Fin 2) (Fin 2) ℂ := !![1, 0; 0, -1] -/-- Relación de Weyl exacta: `W₂ W₁ = -(W₁ W₂)`. La obstrucción de traza de -arriba es sobre el conmutador *aditivo*; no impide esta anticonmutación -*multiplicativa* exacta en dimensión finita. -/ +/-- Exact Weyl relation: `W₂ W₁ = -(W₁ W₂)`. The trace obstruction +above is on the *additive* commutator; it does not prevent this exact +*multiplicative* anticommutation in finite dimension. -/ theorem parWeyl_anticonmuta : W2 * W1 = -(W1 * W2) := by ext i j fin_cases i <;> fin_cases j <;> norm_num [W1, W2, Matrix.mul_apply, Fin.sum_univ_two] -/-- En particular, `W₁` y `W₂` no conmutan. -/ +/-- In particular, `W₁` and `W₂` do not commute. -/ theorem parWeyl_no_conmuta : W2 * W1 ≠ W1 * W2 := by intro h have hij := congrFun (congrFun h (0 : Fin 2)) (1 : Fin 2) diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D13_FirstBreak.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D13_FirstBreak.lean index ffb4c005e..d993f5a8a 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D13_FirstBreak.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D13_FirstBreak.lean @@ -9,23 +9,23 @@ public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D3_GrafoCamin public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D7_Niven /-! -# La primera ruptura combinatoria es `d = 4` +# The first combinatorial break is `d = 4` -Complemento combinatorio al teorema de Niven (`D7_Niven.lean`): la -saturación espectral de Robertson–Schrödinger sobre `P_d` deja de -cumplirse exactamente cuando `P_d` adquiere su primera arista *interior* -(una arista entre dos vértices que no son extremos del camino), y esa -coincidencia ocurre exactamente en `d = 4`. +Combinatorial complement to the Niven theorem (`D7_Niven.lean`): +Robertson–Schrödinger spectral saturation on `P_d` fails exactly when +`P_d` acquires its first *interior* edge (an edge between two vertices +that are not endpoints of the path), and that coincidence occurs +exactly at `d = 4`. -Dos rutas independientes hacia la misma dimensión: +Two independent routes to the same dimension: -* **espectral** (`D7_Niven.lean`): `cos²(π/(d+1)) = (d-1)/4 ↔ d ∈ {2,3}`; -* **combinatoria** (aquí): `P_d` tiene una arista entre dos vértices - interiores si y sólo si `4 ≤ d`. +* **spectral** (`D7_Niven.lean`): `cos²(π/(d+1)) = (d-1)/4 ↔ d ∈ {2,3}`; +* **combinatorial** (here): `P_d` has an edge between two interior + vertices if and only if `4 ≤ d`. -`primera_ruptura_iff_dimension_cuatro` certifica que ambas rutas señalan -la misma dimensión `d = 4`, sin usar ninguna ecuación espectral en la -mitad combinatoria. +`primera_ruptura_iff_dimension_cuatro` certifies that both routes point +to the same dimension `d = 4`, without using any spectral equation in +the combinatorial half. -/ @[expose] public section @@ -34,39 +34,39 @@ namespace PrimeraRuptura open SimpleGraph -/-- Ecuación aritmético-espectral que representa la saturación del camino -(la misma de `Gnomon.saturacion_iff`, escrita como predicado). -/ +/-- Arithmetic-spectral equation representing path saturation +(the same as `Gnomon.saturacion_iff`, written as a predicate). -/ def SaturacionCamino (d : ℕ) : Prop := Real.cos (Real.pi / (d + 1)) ^ 2 = ((d : ℝ) - 1) / 4 -/-- Ruptura: negación de la igualdad de saturación del camino. -/ +/-- Break: negation of the path saturation equality. -/ def RupturaCamino (d : ℕ) : Prop := ¬ SaturacionCamino d -/-- Desde la dimensión mínima `2`, la ruptura ocurre exactamente desde `4`. -/ +/-- From the minimum dimension `2`, the break occurs exactly from `4`. -/ theorem ruptura_camino_iff_cuatro_le (d : ℕ) (hd : 2 ≤ d) : RupturaCamino d ↔ 4 ≤ d := by unfold RupturaCamino SaturacionCamino rw [Gnomon.saturacion_iff d hd] omega -/-- La dimensión cuatro ya está en ruptura. -/ +/-- Dimension four is already in break. -/ theorem ruptura_camino_cuatro : RupturaCamino 4 := by exact (ruptura_camino_iff_cuatro_le 4 (by norm_num)).2 (by norm_num) -/-- Predicado puramente combinatorio de vértice no terminal del camino. -/ +/-- Purely combinatorial predicate for non-terminal path vertices. -/ def VerticeInterior {d : ℕ} (i : Fin d) : Prop := 0 < i.val ∧ i.val + 1 < d -/-- Existe una arista genuinamente interior cuando dos vértices no -terminales del camino son adyacentes. -/ +/-- A genuinely interior edge exists when two non-terminal +vertices of the path are adjacent. -/ def TieneAristaInterior (d : ℕ) : Prop := ∃ i j : Fin d, VerticeInterior i ∧ VerticeInterior j ∧ (SimpleGraph.pathGraph d).Adj i j -/-- El camino tiene una arista interior si y sólo si posee al menos cuatro -vértices. Esta equivalencia no usa Robertson ni la ecuación de saturación: -es pura combinatoria del camino. -/ +/-- The path has an interior edge iff it has at least four +vertices. This equivalence uses neither Robertson nor the saturation +equation: it is pure path combinatorics. -/ theorem tiene_arista_interior_iff_cuatro_le (d : ℕ) : TieneAristaInterior d ↔ 4 ≤ d := by constructor @@ -86,21 +86,21 @@ theorem tiene_arista_interior_iff_cuatro_le (d : ℕ) : · rw [SimpleGraph.pathGraph_adj] exact Or.inl rfl -/-- Coincidencia central: dentro del régimen `d ≥ 2`, tener una arista entre -dos vértices interiores equivale exactamente a romper la saturación. Las dos -caras se demuestran por rutas independientes: combinatoria y espectral. -/ +/-- Central coincidence: within the `d ≥ 2` regime, having an edge between +two interior vertices is exactly equivalent to breaking saturation. The two +faces are proved by independent routes: combinatorial and spectral. -/ theorem transporte_interior_iff_ruptura (d : ℕ) (hd : 2 ≤ d) : TieneAristaInterior d ↔ RupturaCamino d := by exact (tiene_arista_interior_iff_cuatro_le d).trans (ruptura_camino_iff_cuatro_le d hd).symm -/-- La primera ruptura es una propiedad de orden: hay ruptura en `d`, y `d` -es menor o igual que cualquier otra dimensión admisible que también rompa. -/ +/-- The first break is an order property: there is a break at `d`, and `d` +is less than or equal to every other admissible dimension that also breaks. -/ def EsPrimeraRuptura (d : ℕ) : Prop := 2 ≤ d ∧ RupturaCamino d ∧ ∀ n : ℕ, 2 ≤ n → RupturaCamino n → d ≤ n -/-- Caracterización dimensional: la primera ruptura es exactamente `d = 4`. -/ +/-- Dimensional characterization: the first break is exactly `d = 4`. -/ theorem primera_ruptura_iff_dimension_cuatro (d : ℕ) : EsPrimeraRuptura d ↔ d = 4 := by constructor diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D14_SzegoExcess.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D14_SzegoExcess.lean index 367dc117e..0e77b1233 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D14_SzegoExcess.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D14_SzegoExcess.lean @@ -8,14 +8,14 @@ module public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D9_Monotonia /-! -# El exceso sobre el límite de Szegő - -Corolario aritmético directo de la monotonía (`D9_Monotonia.lean`) y el -límite de Szegő (`D8_Szego.lean`): el "exceso" `Cinf - CNava(d)` —cuánto -le falta a `CNava(d)` para alcanzar el límite `C∞`— es positivo, máximo -exactamente en `d = 4`, estrictamente decreciente en `d`, y se disuelve a -`0`. No es un pilar nuevo: es la misma cadena de `D9_Monotonia.lean` leída -desde el lado del remanente en vez del valor mismo. +# The excess over the Szegő limit + +Direct arithmetic corollary of monotonicity (`D9_Monotonia.lean`) and +the Szegő limit (`D8_Szego.lean`): the "excess" `Cinf - CNava(d)` — how +far `CNava(d)` is from reaching the limit `C∞` — is positive, maximal +exactly at `d = 4`, strictly decreasing in `d`, and dissolves to `0`. +Not a new pillar: it is the same chain from `D9_Monotonia.lean` read +from the remainder side instead of the value itself. -/ @[expose] public section @@ -25,32 +25,32 @@ open scoped Topology namespace Gnomon -/-- El exceso de coherencia: cuánto le falta a `CNava(d)` para alcanzar el -límite de Szegő `C∞`. -/ +/-- The coherence excess: how far `CNava(d)` is from reaching the +Szegő limit `C∞`. -/ noncomputable def excesoBrecha (d : ℕ) : ℝ := Cinf - CNava d -/-- El exceso es siempre positivo: `CNava(d)` nunca alcanza `C∞` a `d` -finito. -/ +/-- The excess is always positive: `CNava(d)` never reaches `C∞` at +finite `d`. -/ theorem excesoBrecha_pos (d : ℕ) (hd : 4 ≤ d) : 0 < excesoBrecha d := by unfold excesoBrecha linarith [CNava_lt_Cinf d hd] -/-- El exceso es estrictamente decreciente en `d`, heredado de la -monotonía de `CNava`. -/ +/-- The excess is strictly decreasing in `d`, inherited from the +monotonicity of `CNava`. -/ theorem excesoBrecha_strictAnti {a b : ℕ} (ha : 4 ≤ a) (hb : 4 ≤ b) (hab : a < b) : excesoBrecha b < excesoBrecha a := by unfold excesoBrecha linarith [CNava_strictMonoOn_ge_four ha hb hab] -/-- El exceso máximo de toda la cola `d ≥ 4` se alcanza exactamente en -`d = 4`: el mínimo global de `CNava` es el techo del exceso. -/ +/-- The maximum excess over the entire `d ≥ 4` tail is attained exactly at +`d = 4`: the global minimum of `CNava` is the ceiling of the excess. -/ theorem excesoBrecha_le_four (d : ℕ) (hd : 4 ≤ d) : excesoBrecha d ≤ excesoBrecha 4 := by unfold excesoBrecha linarith [CNava_four_le d hd] -/-- El exceso se apaga por completo: `Cinf − CNava(d) → 0`, acotado arriba -por `excesoBrecha 4` y llevado a `0` por el límite de Szegő. -/ +/-- The excess vanishes completely: `Cinf − CNava(d) → 0`, bounded above +by `excesoBrecha 4` and driven to `0` by the Szegő limit. -/ theorem excesoBrecha_tendsto_zero : Tendsto (fun d : ℕ => excesoBrecha d) atTop (𝓝 0) := by unfold excesoBrecha diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D15_Cosecant.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D15_Cosecant.lean index a986117c3..713d67822 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D15_Cosecant.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D15_Cosecant.lean @@ -13,18 +13,18 @@ public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Chebyshev.RootsExt public import Mathlib.Algebra.Polynomial.Splits /-! -# Identidad cosecante clásica vía Chebyshev +# Classical cosecant identity via Chebyshev -Identidad clásica de análisis, autocontenida: +Self-contained classical analysis identity: \[ \sum_{k=1}^{N-1}\csc^2(k\pi/N)=(N^2-1)/3. \] -Prueba vía el polinomio de Chebyshev de segunda especie `U_{N-1}`: sus -raíces son `cos(kπ/N)`, y la derivada logarítmica evaluada en `±1` -(descomponiendo `1/(1-x²) = ½(1/(1-x) + 1/(1+x))`) da la suma cerrada. +Proof via the Chebyshev polynomial of the second kind `U_{N-1}`: its +roots are `cos(kπ/N)`, and the logarithmic derivative evaluated at `±1` +(decomposing `1/(1-x²) = ½(1/(1-x) + 1/(1+x))`) gives the closed sum. -No depende de ningún objeto definido en otro archivo de este paquete: es -un resultado de análisis clásico, completo en sí mismo sobre `Mathlib`. +Does not depend on any object defined in another file of this package: +it is a classical analysis result, self-contained over `Mathlib`. -/ @[expose] public section @@ -38,7 +38,7 @@ open scoped BigOperators namespace IdentidadCosecanteChebyshev -/-! ## Chebyshev: `U_n` se parte en lineales reales -/ +/-! ## Chebyshev: `U_n` factors into real linears -/ theorem U_splits_real (n : ℕ) : (U ℝ n).Splits := by rw [splits_iff_card_roots] @@ -60,13 +60,13 @@ theorem U_splits_real (n : ℕ) : (U ℝ n).Splits := by rw [hdeg] exact hcard -/-! ## Derivadas de `U_n` en `±1` -/ +/-! ## Derivatives of `U_n` at `±1` -/ theorem U_deriv_eval_one (n : ℕ) : (derivative (U ℝ (n : ℤ))).eval (1 : ℝ) = ((n : ℝ) + 2) * ((n : ℝ) + 1) * (n : ℝ) / 3 := by have h := derivative_U_eval_one (R := ℝ) (n : ℤ) - -- `3 * U'(1) = (n+2)(n+1)n` con coerciones enteras + -- `3 * U'(1) = (n+2)(n+1)n` with integer coercions push_cast at h linarith @@ -74,7 +74,7 @@ theorem U_deriv_eval_neg_one (n : ℕ) : (derivative (U ℝ (n : ℤ))).eval (-1 : ℝ) = -((-1 : ℝ) ^ n) * (((n : ℝ) + 2) * ((n : ℝ) + 1) * (n : ℝ) / 3) := by - -- Paridad: U_n(-x) = (-1)^n U_n(x) + -- Parity: U_n(-x) = (-1)^n U_n(x) have hfun : (fun x : ℝ ↦ (U ℝ (n : ℤ)).eval (-x)) = fun x ↦ (-1 : ℝ) ^ n * (U ℝ (n : ℤ)).eval x := by @@ -99,7 +99,8 @@ theorem U_deriv_eval_neg_one (n : ℕ) : rw [hUd1] at hder linarith -/-! ## Sumas sobre raíces -/ +/-! ## Sums over roots -/ + theorem sum_one_div_one_sub_roots (n : ℕ) (hn : 1 ≤ n) : ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 - z)).sum = @@ -198,7 +199,7 @@ theorem sum_one_div_one_sub_sq_roots (n : ℕ) (hn : 1 ≤ n) : intro h; exact hzm1 (by linarith) field_simp [hz1', hzm, hden] ring - -- levantar la identidad puntual a la suma sobre el multiconjunto + -- lift the pointwise identity to the sum over the multiset have hdecomp : ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 - z ^ 2)).sum = (1 / 2 : ℝ) * @@ -221,7 +222,7 @@ theorem sum_one_div_one_sub_sq_roots (n : ℕ) (hn : 1 ≤ n) : rw [hdecomp, h1, h2] ring -/-- **Identidad cosecante clásica.** `∑_{k=1}^{N-1} csc²(kπ/N) = (N²-1)/3`. -/ +/-- **Classical cosecant identity.** `∑_{k=1}^{N-1} csc²(kπ/N) = (N²-1)/3`. -/ theorem sum_csc_sq (N : ℕ) (hN : 2 ≤ N) : ∑ k ∈ Finset.Ico 1 N, (sin ((k : ℝ) * π / N))⁻¹ ^ 2 = ((N : ℝ) ^ 2 - 1) / 3 := by @@ -232,7 +233,7 @@ theorem sum_csc_sq (N : ℕ) (hN : 2 ≤ N) : have hinj : Set.InjOn (fun k : ℕ ↦ cos ((k + 1) * π / (n + 1))) (Finset.range n) := (Finset.range n).nodup_map_iff_injOn.mp (roots_U_real_nodup n) - -- suma sobre raíces vista como multiconjunto → suma sobre `range n` + -- sum over roots as multiset → sum over `range n` have hfin : ((U ℝ (n : ℤ)).roots.map fun z : ℝ ↦ (1 : ℝ) / (1 - z ^ 2)).sum = ∑ k ∈ Finset.range n, @@ -249,7 +250,7 @@ theorem sum_csc_sq (N : ℕ) (hN : 2 ≤ N) : sin ((k + 1 : ℝ) * π / (n + 1)) ^ 2 := by linarith [sin_sq_add_cos_sq ((k + 1 : ℝ) * π / (n + 1))] rw [h1, one_div, inv_pow] - -- reindexar `Ico 1 (n+1)` como imagen de `range n` bajo `·+1` + -- reindex `Ico 1 (n+1)` as image of `range n` under `·+1` have himg : Finset.Ico 1 (n + 1) = (Finset.range n).image (fun k ↦ k + 1) := by ext k diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean index 485d4bd38..ef6e95512 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D8_Szego.lean @@ -13,22 +13,22 @@ public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Sinc public import Mathlib.Tactic.IntervalCases /-! -# D8 — El límite de Szegő y la positividad de la brecha - -Define la constante de coherencia finita `C_Nava(d)` (forma cerrada exacta -en `cos`/`sin` de `π/(d+1)`) y su brecha `deltaGeom(d) = C_Nava(d) − 1`. -Dos resultados centrales: - -1. **Positividad** (`deltaGeom_pos_of_four_le`): `deltaGeom(d) > 0` para - todo `d ≥ 4`. Se verifica `d = 4, 5` en forma cerrada exacta y `d ≥ 6` - mediante cotas de Taylor certificadas para seno y coseno — sin apelar a - ningún cálculo numérico externo, sólo álgebra racional y las cotas - `Real.pi_gt_d2`/`Real.pi_lt_d2` de Mathlib. -2. **Límite de Szegő** (`limite_szego_CNava`): `C_Nava(d) → C_∞ = √(π²/3−2)` - cuando `d → ∞` (como filtro `atTop` sobre la sucesión de espacios - finitos, no como un nuevo espacio de Hilbert en `d = ∞`; ver - `infinito_no_es_dimension_sino_limite`). En particular - `deltaInf = C_∞ − 1 > 0`, consecuencia exacta de `π > 3`. +# D8 — The Szegő limit and gap positivity + +Defines the finite coherence constant `C_Nava(d)` (exact closed form +in `cos`/`sin` of `π/(d+1)`) and its gap `deltaGeom(d) = C_Nava(d) − 1`. +Two central results: + +1. **Positivity** (`deltaGeom_pos_of_four_le`): `deltaGeom(d) > 0` for + all `d ≥ 4`. Verified at `d = 4, 5` in exact closed form and `d ≥ 6` + via certified Taylor bounds on sine and cosine — without appealing to + any external numerical computation, only rational algebra and the + `Real.pi_gt_d2`/`Real.pi_lt_d2` bounds from Mathlib. +2. **Szegő limit** (`limite_szego_CNava`): `C_Nava(d) → C_∞ = √(π²/3−2)` + as `d → ∞` (as an `atTop` filter over the sequence of finite spaces, + not as a new Hilbert space at `d = ∞`; see + `infinito_no_es_dimension_sino_limite`). In particular + `deltaInf = C_∞ − 1 > 0`, an exact consequence of `π > 3`. -/ @[expose] public section @@ -41,32 +41,32 @@ open scoped Topology namespace Gnomon -/-! ## Forma cerrada y límite asintótico -/ +/-! ## Closed form and asymptotic limit -/ -/-- `N = d + 1`, notación para el grafo camino `pathGraph d`. -/ +/-- `N = d + 1`, notation for the path graph `pathGraph d`. -/ noncomputable def Nreal (d : ℕ) : ℝ := (d : ℝ) + 1 -/-- Ángulo espectral fundamental `θ_d = π/(d+1)`. -/ +/-- Fundamental spectral angle `θ_d = π/(d+1)`. -/ noncomputable def theta (d : ℕ) : ℝ := π / Nreal d -/-- Forma cerrada exacta de `C_Nava(d)²`. -/ +/-- Exact closed form of `C_Nava(d)²`. -/ noncomputable def CNavaSq (d : ℕ) : ℝ := 2 * ((d : ℝ) - 1) / (Nreal d * Real.cos (theta d) ^ 2) * (((Nreal d ^ 2 + 2) / 6) * Real.sin (theta d) ^ 2 - 1) -/-- Constante de coherencia finita. -/ +/-- Finite coherence constant. -/ noncomputable def CNava (d : ℕ) : ℝ := Real.sqrt (CNavaSq d) -/-- Límite universal de Szegő. -/ +/-- Universal Szegő limit. -/ noncomputable def Cinf : ℝ := Real.sqrt (π ^ 2 / 3 - 2) -/-- Defecto geométrico finito `δ_geom(d) = C_Nava(d) - 1`. -/ +/-- Finite geometric defect `δ_geom(d) = C_Nava(d) - 1`. -/ noncomputable def deltaGeom (d : ℕ) : ℝ := CNava d - 1 -/-- Defecto asintótico `δ_∞ = C_∞ - 1`. -/ +/-- Asymptotic defect `δ_∞ = C_∞ - 1`. -/ noncomputable def deltaInf : ℝ := Cinf - 1 -/-- Término principal de la expansión de Szegő. -/ +/-- Leading term of the Szegő expansion. -/ noncomputable def deltaSzegoPrincipal (d : ℕ) : ℝ := deltaInf - Cinf / Nreal d @@ -75,8 +75,8 @@ theorem CNavaSq_forma_cerrada (d : ℕ) : 2 * ((d : ℝ) - 1) / (Nreal d * Real.cos (theta d) ^ 2) * (((Nreal d ^ 2 + 2) / 6) * Real.sin (theta d) ^ 2 - 1) := rfl -/-- La forma cerrada reescrita mediante `sinc`. Elimina la singularidad -aparente y permite tomar el límite en Lean. -/ +/-- The closed form rewritten via `sinc`. Removes the apparent +singularity and allows taking the limit in Lean. -/ theorem CNavaSq_forma_regularizada (d : ℕ) : CNavaSq d = 2 * (1 - 2 / Nreal d) / Real.cos (theta d) ^ 2 * @@ -147,32 +147,32 @@ private theorem CNavaSq_regularizada_tendsto : · ext d ring_nf -/-- TEOREMA DE SZEGŐ, forma cuadrática: `C_Nava(d)² → (π²-6)/3`. -/ +/-- SZEGŐ THEOREM, quadratic form: `C_Nava(d)² → (π²-6)/3`. -/ theorem limite_szego_CNavaSq : Tendsto CNavaSq atTop (𝓝 (π ^ 2 / 3 - 2)) := by apply CNavaSq_regularizada_tendsto.congr' filter_upwards with d exact (CNavaSq_forma_regularizada d).symm -/-- LÍMITE DE SZEGŐ: `C_Nava(d) → C_∞ = √((π²-6)/3)`, construido sobre la -teoría clásica de distribución espectral de Szegő. -/ +/-- SZEGŐ LIMIT: `C_Nava(d) → C_∞ = √((π²-6)/3)`, built on the +classical Szegő spectral distribution theory. -/ theorem limite_szego_CNava : Tendsto CNava atTop (𝓝 Cinf) := by unfold CNava Cinf exact Real.continuous_sqrt.continuousAt.tendsto.comp limite_szego_CNavaSq -/-- Nombre citable de la especialización. Es un alias del resultado ya -demostrado, no una rederivación de la teoría clásica de Toeplitz/Szegő. -/ +/-- Citable name for the specialization. An alias of the already proved +result, not a re-derivation of the classical Toeplitz/Szegő theory. -/ theorem limite_nava_szego_CNava : Tendsto CNava atTop (𝓝 Cinf) := limite_szego_CNava -/-- El defecto geométrico converge al defecto universal asintótico. -/ +/-- The geometric defect converges to the universal asymptotic defect. -/ theorem limite_defecto_geometrico : Tendsto deltaGeom atTop (𝓝 deltaInf) := by unfold deltaGeom deltaInf exact limite_szego_CNava.sub_const 1 -/-- El defecto universal jamás se anula: `δ_∞ > 0`, consecuencia exacta de -`π > 3`. -/ +/-- The universal defect never vanishes: `δ_∞ > 0`, an exact consequence +of `π > 3`. -/ theorem deltaInf_pos : 0 < deltaInf := by unfold deltaInf Cinf have hpi : (3 : ℝ) < π := Real.pi_gt_three @@ -182,8 +182,8 @@ theorem deltaInf_pos : 0 < deltaInf := by rw [Real.sqrt_one] at hs linarith -/-- El infinito no se añade como una dimensión realizada: la sucesión de -defectos finitos sólo converge al valor límite estricto `δ∞ = C∞ - 1`. -/ +/-- Infinity is not added as a realized dimension: the sequence of +finite defects only converges to the strict limit value `δ∞ = C∞ - 1`. -/ theorem infinito_no_es_dimension_sino_limite : Tendsto deltaGeom atTop (𝓝 deltaInf) ∧ deltaInf = Cinf - 1 ∧ 0 < deltaInf := ⟨limite_defecto_geometrico, rfl, deltaInf_pos⟩ @@ -193,8 +193,8 @@ theorem Cinf_pos : 0 < Cinf := by unfold deltaInf at h linarith -/-- Monotonía asintótica: el término principal `δ_∞ - C_∞/(d+1)` de la -expansión de Szegő es estrictamente creciente. -/ +/-- Asymptotic monotonicity: the leading term `δ_∞ - C_∞/(d+1)` of the +Szegő expansion is strictly increasing. -/ theorem deltaSzegoPrincipal_strictMono : StrictMono deltaSzegoPrincipal := by intro a b hab have hNa : 0 < Nreal a := by @@ -210,23 +210,23 @@ theorem deltaSzegoPrincipal_strictMono : StrictMono deltaSzegoPrincipal := by have hmul := mul_lt_mul_of_pos_left hinv Cinf_pos simpa [div_eq_mul_inv] using sub_lt_sub_left hmul deltaInf -/-! ## Positividad de la brecha para `d ≥ 4` +/-! ## Gap positivity for `d ≥ 4` -Niven cierra la ecuación de saturación en `d ∈ {2,3}` (`D7_Niven.lean`). -Lo que sigue traduce ese hecho trigonométrico a la desigualdad algebraica -`1 < CNava(d)` (equivalentemente `0 < deltaGeom d`) para todo `d ≥ 4`, -verificando los casos `d = 4, 5` en forma cerrada exacta y `d ≥ 6` mediante -las mismas cotas de Taylor certificadas usadas arriba para el límite. -/ +Niven closes the saturation equation at `d ∈ {2,3}` (`D7_Niven.lean`). +What follows translates that trigonometric fact into the algebraic +inequality `1 < CNava(d)` (equivalently `0 < deltaGeom d`) for all +`d ≥ 4`, verifying `d = 4, 5` in exact closed form and `d ≥ 6` via the +same certified Taylor bounds used above for the limit. -/ -/-! ## Consecuencia: `δ_geom(d) > 0` para todo `d ≥ 4` +/-! ## Consequence: `δ_geom(d) > 0` for all `d ≥ 4` -Niven cierra la ecuación de saturación en `d ∈ {2,3}`. El resto de esta -sección traduce ese hecho trigonométrico a la desigualdad algebraica -`1 < CNava(d)` (equivalentemente `0 < deltaGeom d`) para todo `d ≥ 4`, -verificando los casos `d = 4, 5` en forma cerrada exacta y `d ≥ 6` mediante -cotas de Taylor certificadas para seno y coseno (sin apelar a ningún -resultado numérico externo: sólo `Real.pi_gt_d2`/`pi_lt_d2` de Mathlib y -álgebra racional). -/ +Niven closes the saturation equation at `d ∈ {2,3}`. The rest of this +section translates that trigonometric fact into the algebraic inequality +`1 < CNava(d)` (equivalently `0 < deltaGeom d`) for all `d ≥ 4`, +verifying `d = 4, 5` in exact closed form and `d ≥ 6` via certified +Taylor bounds on sine and cosine (without appealing to any external +numerical result: only `Real.pi_gt_d2`/`pi_lt_d2` from Mathlib and +rational algebra). -/ theorem CNavaSq_two : CNavaSq 2 = 1 := by simp only [CNavaSq, Nreal, theta, Nat.cast_ofNat] @@ -639,8 +639,8 @@ theorem one_lt_CNavaSq_of_six_le (d : ℕ) (hd : 6 ≤ d) : 1 < CNavaSq d := by (by simpa [N] using hcos_pos) (by simpa [N] using hcos_thr) -/-- `CNava(d)² > 1` para todo `d ≥ 4`: casos `4, 5` exactos, `d ≥ 6` vía cotas -de Taylor certificadas. -/ +/-- `CNava(d)² > 1` for all `d ≥ 4`: exact cases `4, 5`, `d ≥ 6` via +certified Taylor bounds. -/ theorem one_lt_CNavaSq (d : ℕ) (hd : 4 ≤ d) : 1 < CNavaSq d := by match d with | 0 | 1 | 2 | 3 => omega @@ -652,7 +652,7 @@ theorem one_lt_CNava_of_four_le (d : ℕ) (hd : 4 ≤ d) : 1 < CNava d := by rw [CNava, ← sqrt_one] exact sqrt_lt_sqrt (by norm_num) (one_lt_CNavaSq d hd) -/-- TEOREMA CENTRAL DE NIVEN → POSITIVIDAD: `δ_geom(d) > 0` para todo +/-- CENTRAL NIVEN THEOREM → POSITIVITY: `δ_geom(d) > 0` for all `d ≥ 4`. -/ theorem deltaGeom_pos_of_four_le (d : ℕ) (hd : 4 ≤ d) : 0 < deltaGeom d := by unfold deltaGeom diff --git a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D9_Monotonia.lean b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D9_Monotonia.lean index 384f08f9f..028ad6c48 100644 --- a/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D9_Monotonia.lean +++ b/PhyslibAlpha/AlgebraicFramework/CStarAlgebra/DimUncertainty/D9_Monotonia.lean @@ -8,19 +8,19 @@ module public import PhyslibAlpha.AlgebraicFramework.CStarAlgebra.DimUncertainty.D8_Szego /-! -# D9 — Monotonía estricta de `C_Nava` y `deltaGeom` +# D9 — Strict monotonicity of `C_Nava` and `deltaGeom` -Sin barrido numérico: `CNava` (y por tanto `deltaGeom`) crece -estrictamente para toda dimensión `d ≥ 4`. En particular, `d = 4` es -el mínimo global de la cola `d ≥ 4` y cada valor finito se aproxima a -`Cinf` estrictamente por debajo (`CNava_lt_Cinf`, `deltaGeom_lt_deltaInf`). +Without numerical sweep: `CNava` (and hence `deltaGeom`) is strictly +increasing for every dimension `d ≥ 4`. In particular, `d = 4` is the +global minimum of the `d ≥ 4` tail and each finite value approaches +`Cinf` strictly from below (`CNava_lt_Cinf`, `deltaGeom_lt_deltaInf`). -La prueba no supone que `π` sea racional. Las llamadas a `ring` -certifican únicamente identidades algebraicas formales con `π` como -elemento real simbólico. El signo estricto de la derivada se obtiene -mediante cotas formales `3 < π < 22/7`, cotas de Taylor verificadas y -un certificado polinómico de Bernstein de que el resto es -estrictamente negativo en la caja compacta correspondiente. +The proof does not assume `π` is rational. The `ring` calls certify +only formal algebraic identities with `π` as a symbolic real element. +The strict sign of the derivative is obtained via formal bounds +`3 < π < 22/7`, verified Taylor bounds, and a Bernstein polynomial +certificate that the remainder is strictly negative in the +corresponding compact box. -/ @[expose] public section diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D0_Habitat.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D0_Habitat.lean index f077a7781..7818641cf 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D0_Habitat.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D0_Habitat.lean @@ -8,23 +8,25 @@ module public import Mathlib.Analysis.InnerProductSpace.EuclideanDist /-! -# D0 — Hábitat: el espacio de Hilbert finito `H_d` +# D0 — Habitat: the finite-dimensional Hilbert space `H_d` -Todo el argumento vive en un único espacio de Hilbert complejo de dimensión -finita, `H_d = ℂ^d` con su producto interno estándar. No se sale nunca de -este espacio: en particular, `d = ∞` no es una dimensión realizada, sólo un -límite de la familia `{H_d}_{d∈ℕ}` (ver `D8_Szego.lean`). +The entire argument lives in a single complex finite-dimensional +Hilbert space, `H_d = ℂ^d` with its standard inner product. +We never leave this space: in particular `d = ∞` is not a +realized dimension, only a limit of the family `{H_d}_{d∈ℕ}` +(see `D8_Szego.lean`). -/ @[expose] public section namespace TransportePosicion -/-- El espacio de Hilbert finito de dimensión `d`: `ℂ^d` con su estructura -euclidiana estándar. -/ +/-- The finite-dimensional Hilbert space of dimension `d`: +`ℂ^d` with its standard Euclidean structure. -/ abbrev Hd (d : ℕ) := EuclideanSpace ℂ (Fin d) -/-- Identidad definicional: `H_d` es, literalmente, `EuclideanSpace ℂ (Fin d)`. -/ +/-- Definitional identity: `H_d` is literally +`EuclideanSpace ℂ (Fin d)`. -/ theorem Hd_eq_euclidean (d : ℕ) : Hd d = EuclideanSpace ℂ (Fin d) := rfl diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D1_CauchyGram.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D1_CauchyGram.lean index b3c4360f8..191675a42 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D1_CauchyGram.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D1_CauchyGram.lean @@ -9,17 +9,17 @@ public import Mathlib.Analysis.InnerProductSpace.Basic public import Mathlib.Analysis.Complex.Norm /-! -# D1 — Cauchy–Schwarz vía el defecto de Gram +# D1 — Cauchy–Schwarz via the Gram defect -Núcleo puramente algebraico: para dos vectores `x, y` de un espacio de -Hilbert complejo, el determinante de la matriz de Gram hermitiana +Purely algebraic kernel: for two vectors `x, y` in a complex +Hilbert space, the determinant of the Hermitian Gram matrix `gramDefectC x y = ‖x‖² ‖y‖² − |⟨x,y⟩|²` -nunca es negativo. Esa es, palabra por palabra, la desigualdad de -Cauchy–Schwarz. Escribiendo `⟨x,y⟩` en sus partes real e imaginaria se -obtiene de inmediato la desigualdad de Robertson–Schrödinger (`D2_Robertson.lean`) -como consecuencia algebraica, no como postulado adicional. +is never negative. That is, word for word, the Cauchy–Schwarz +inequality. Writing `⟨x,y⟩` in real and imaginary parts gives +the Robertson–Schrödinger inequality (`D2_Robertson.lean`) +as an algebraic consequence, not an additional postulate. -/ @[expose] public section @@ -32,16 +32,16 @@ universe u variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] -/-- Cuadrado de la dispersión representada por un vector centrado. -/ +/-- Squared dispersion of a centered vector. -/ def varianceC (x : H) : ℝ := ‖x‖ ^ 2 -/-- Determinante de la matriz de Gram hermitiana de dos vectores. -/ +/-- Determinant of the Hermitian Gram matrix of two vectors. -/ def gramDefectC (x y : H) : ℝ := varianceC x * varianceC y - ‖@inner ℂ H _ x y‖ ^ 2 -/-- La obstrucción universal: el determinante de Gram nunca es negativo. -Esto ES la desigualdad de Cauchy–Schwarz, reescrita como positividad de un -determinante 2×2. -/ +/-- The universal obstruction: the Gram determinant is never +negative. This IS the Cauchy–Schwarz inequality, rewritten as +positivity of a 2×2 determinant. -/ theorem gramDefectC_nonneg (x y : H) : 0 ≤ gramDefectC x y := by have hxy : ‖@inner ℂ H _ x y‖ ≤ ‖x‖ * ‖y‖ := norm_inner_le_norm x y have hleft : 0 ≤ ‖x‖ * ‖y‖ - ‖@inner ℂ H _ x y‖ := sub_nonneg.mpr hxy @@ -52,8 +52,8 @@ theorem gramDefectC_nonneg (x y : H) : 0 ≤ gramDefectC x y := by (‖x‖ * ‖y‖ + ‖@inner ℂ H _ x y‖) := mul_nonneg hleft hright _ = gramDefectC x y := by simp [gramDefectC, varianceC, pow_two]; ring -/-- Saturar Cauchy–Schwarz equivale a anular, no las dispersiones, sino el -determinante de Gram. -/ +/-- Saturating Cauchy–Schwarz amounts to zeroing +the Gram determinant, not the dispersions. -/ theorem gramDefectC_eq_zero_iff (x y : H) : gramDefectC x y = 0 ↔ ‖@inner ℂ H _ x y‖ = ‖x‖ * ‖y‖ := by have hxy : ‖@inner ℂ H _ x y‖ ≤ ‖x‖ * ‖y‖ := norm_inner_le_norm x y @@ -68,15 +68,15 @@ theorem gramDefectC_eq_zero_iff (x y : H) : rw [heq] ring -/-- Parte simétrica del producto interno de las fluctuaciones. -/ +/-- Symmetric part of the inner product of the fluctuations. -/ def covarianceC (x y : H) : ℝ := (@inner ℂ H _ x y).re -/-- Coordenada antisimétrica real: para fluctuaciones operatoriales es la -coordenada real de la esperanza del conmutador. -/ +/-- Real antisymmetric coordinate: for operator fluctuations +this is the real coordinate of the commutator expectation. -/ def commutatorCoordinateC (x y : H) : ℝ := 2 * (@inner ℂ H _ x y).im -/-- Robertson–Schrödinger es exactamente la positividad de Gram escrita en -coordenadas real e imaginaria. -/ +/-- Robertson–Schrödinger is exactly Gram positivity +written in real and imaginary coordinates. -/ theorem robertsonSchrodinger_from_gram (x y : H) : covarianceC x y ^ 2 + (commutatorCoordinateC x y / 2) ^ 2 ≤ varianceC x * varianceC y := by @@ -91,12 +91,13 @@ theorem robertsonSchrodinger_from_gram (x y : H) : rw [hnorm] at hbase simpa [covarianceC, commutatorCoordinateC] using hbase -/-- Saturación Robertson–Schrödinger abstracta. -/ +/-- Abstract Robertson–Schrödinger saturation. -/ def RSSaturated (x y : H) : Prop := covarianceC x y ^ 2 + (commutatorCoordinateC x y / 2) ^ 2 = varianceC x * varianceC y -/-- La saturación Robertson–Schrödinger es exactamente defecto de Gram cero. -/ +/-- Robertson–Schrödinger saturation is exactly +zero Gram defect. -/ theorem robertsonSchrodinger_saturated_iff_gram_zero (x y : H) : RSSaturated x y ↔ gramDefectC x y = 0 := by have hnorm : diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean index a05a85eef..a8b84c736 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D2_Robertson.lean @@ -13,25 +13,26 @@ public import Mathlib.Data.Rat.Star public import Mathlib.Tactic.IntervalCases /-! -# D2 — La desigualdad de Robertson (1929) - -Formalización abstracta de la desigualdad de Robertson (1929) para un par de -observables conjugados evaluados en un estado normalizado de un espacio de -Hilbert. Se incluyen dos formas: la forma lineal clásica (`Evaluacion`, -con la cota `|⟨[A,B]⟩|/2 ≤ σ_A σ_B`) y la forma cuadrática de -Robertson–Schrödinger (`EvaluacionSchrodinger`, con covarianza). - -Punto central de este archivo: la hipótesis `cota_cuadratica` que -`EvaluacionSchrodinger` exige como dato **no se postula** — al final del -archivo (`ObstruccionGramUnificada.evaluacionSchrodingerDeGram`) se prueba -que todo par de vectores de un espacio de Hilbert produce automáticamente una -`EvaluacionSchrodinger` válida, con esa cota derivada directamente de -`D1_CauchyGram.gramDefectC_nonneg`. Cauchy–Schwarz ⇒ Gram ⇒ -Robertson–Schrödinger, como teorema, no como axioma adicional. - -También se incluyen aquí cinco lemas aritméticos elementales (`Blindaje`) -que se usan más adelante para acotar el coseno y para el teorema de Niven -(`D7_Niven.lean`). +# D2 — The Robertson inequality (1929) + +Abstract formalization of Robertson's (1929) inequality for a pair +of conjugate observables evaluated in a normalized Hilbert-space +state. Two forms are included: the classical linear form +(`Evaluacion`, with `|⟨[A,B]⟩|/2 ≤ σ_A σ_B`) and the quadratic +Robertson–Schrödinger form (`EvaluacionSchrodinger`, with +covariance). + +Key point: the hypothesis `cota_cuadratica` required by +`EvaluacionSchrodinger` is **not postulated** — at the end of +this file (`ObstruccionGramUnificada.evaluacionSchrodingerDeGram`) +we prove that every pair of Hilbert-space vectors automatically +yields a valid `EvaluacionSchrodinger`, with the bound derived +from `D1_CauchyGram.gramDefectC_nonneg`. Cauchy–Schwarz ⇒ Gram ⇒ +Robertson–Schrödinger, as a theorem, not an additional axiom. + +Five elementary arithmetic lemmas (`Blindaje` / Shielding) used +later for cosine bounds and the Niven theorem (`D7_Niven.lean`) +are also included here. -/ @[expose] public section @@ -40,10 +41,9 @@ namespace Robertson1929 universe u -/-- Evaluación exacta del teorema de Robertson (1929) tras evaluar dos -observables conjugados en un estado normalizado de un espacio de Hilbert. -`sigmaA`, `sigmaB` son las desviaciones y `mediaConmutador` es -`⟨ψ,[A,B]ψ⟩`. -/ +/-- Exact evaluation of Robertson's (1929) theorem for two conjugate +observables in a normalized Hilbert-space state. `sigmaA`, `sigmaB` +are the standard deviations; `mediaConmutador` is `⟨ψ,[A,B]ψ⟩`. -/ structure Evaluacion (H : Type u) [NormedAddCommGroup H] [InnerProductSpace ℂ H] where /-- The normalized state in which the observables are evaluated. -/ @@ -59,14 +59,14 @@ structure Evaluacion (H : Type u) [NormedAddCommGroup H] sigmaB_nonneg : 0 ≤ sigmaB cota : ‖mediaConmutador‖ / 2 ≤ sigmaA * sigmaB -/-- Saturación exacta de la cota de Robertson en la evaluación dada. -/ +/-- Exact saturation of the Robertson bound for the given evaluation. -/ def Saturada {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] (R : Evaluacion H) : Prop := R.sigmaA * R.sigmaB = ‖R.mediaConmutador‖ / 2 -/-- Evaluación en máxima tensión: el estado normalizado realiza la norma del -conmutador, por lo que el lado derecho de Robertson es el más exigente de la -familia de estados normalizados. -/ +/-- Maximal-tension evaluation: the normalized state realizes the +commutator norm, so Robertson's right-hand side is the tightest +among all normalized states. -/ structure MaximaTension (H : Type u) [NormedAddCommGroup H] [InnerProductSpace ℂ H] extends Evaluacion H where /-- Norm of the commutator realized by the maximal-tension state. -/ @@ -75,8 +75,8 @@ structure MaximaTension (H : Type u) [NormedAddCommGroup H] realiza_norma : ‖toEvaluacion.mediaConmutador‖ = normaConmutador -/-- En máxima tensión, Robertson entrega la cota evaluada en la norma del -conmutador. -/ +/-- At maximal tension, Robertson yields the bound evaluated at the +commutator norm. -/ theorem MaximaTension.cota_por_norma {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] (R : MaximaTension H) : @@ -84,10 +84,10 @@ theorem MaximaTension.cota_por_norma rw [← R.realiza_norma] exact R.cota -/-! ## Ancla Robertson–Schrödinger: forma cuadrática -/ +/-! ## Robertson–Schrödinger anchor: quadratic form -/ -/-- Evaluación cuadrática Robertson–Schrödinger: el producto de dispersiones -domina el piso cuadrático compuesto por covarianza y conmutador. -/ +/-- Quadratic Robertson–Schrödinger evaluation: the dispersion product +dominates the quadratic floor composed of covariance and commutator. -/ structure EvaluacionSchrodinger where /-- Standard deviation of the first observable. -/ sigmaA : ℝ @@ -101,11 +101,11 @@ structure EvaluacionSchrodinger where sigmaB_nonneg : 0 ≤ sigmaB cota_cuadratica : covarianza ^ 2 + conmutador ^ 2 ≤ sigmaA ^ 2 * sigmaB ^ 2 -/-- Piso Robertson–Schrödinger: raíz cuadrada del término cuadrático. -/ +/-- Robertson–Schrödinger floor: square root of the quadratic term. -/ noncomputable def pisoSchrodinger (S : EvaluacionSchrodinger) : ℝ := Real.sqrt (S.covarianza ^ 2 + S.conmutador ^ 2) -/-- Saturación Robertson–Schrödinger exacta. -/ +/-- Exact Robertson–Schrödinger saturation. -/ def SaturadaSchrodinger (S : EvaluacionSchrodinger) : Prop := S.sigmaA ^ 2 * S.sigmaB ^ 2 = S.covarianza ^ 2 + S.conmutador ^ 2 @@ -115,8 +115,8 @@ theorem saturadaSchrodinger_iff (S : EvaluacionSchrodinger) : S.covarianza ^ 2 + S.conmutador ^ 2 := by rfl -/-- El piso Robertson–Schrödinger es positivo si y sólo si covarianza o -conmutador son no nulos. -/ +/-- The Robertson–Schrödinger floor is positive iff the covariance or +the commutator is nonzero. -/ theorem pisoSchrodinger_pos_iff (S : EvaluacionSchrodinger) : 0 < pisoSchrodinger S ↔ S.covarianza ≠ 0 ∨ S.conmutador ≠ 0 := by rw [pisoSchrodinger, Real.sqrt_pos] @@ -129,8 +129,8 @@ theorem pisoSchrodinger_pos_iff (S : EvaluacionSchrodinger) : · nlinarith [sq_pos_of_ne_zero hcov, sq_nonneg S.conmutador] · nlinarith [sq_nonneg S.covarianza, sq_pos_of_ne_zero hcomm] -/-- La cota cuadrática Robertson–Schrödinger implica la cota lineal sobre el -producto de dispersiones no negativas. -/ +/-- The quadratic Robertson–Schrödinger bound implies the linear bound +on the nonnegative dispersion product. -/ theorem pisoSchrodinger_le_producto (S : EvaluacionSchrodinger) : pisoSchrodinger S ≤ S.sigmaA * S.sigmaB := by have hsum : 0 ≤ S.covarianza ^ 2 + S.conmutador ^ 2 := by positivity @@ -146,8 +146,8 @@ theorem pisoSchrodinger_le_producto (S : EvaluacionSchrodinger) : rw [hprod_sq] at hcota nlinarith -/-- Forma limpia del ancla: Robertson–Schrödinger aporta una cota lineal y no -permite afirmar simultáneamente esa cota y su negación. -/ +/-- Clean anchor form: Robertson–Schrödinger yields a linear bound and +does not allow asserting the bound and its negation simultaneously. -/ theorem anclaSchrodinger_limpia (S : EvaluacionSchrodinger) : pisoSchrodinger S ≤ S.sigmaA * S.sigmaB ∧ ¬ (pisoSchrodinger S ≤ S.sigmaA * S.sigmaB ∧ @@ -158,17 +158,17 @@ theorem anclaSchrodinger_limpia (S : EvaluacionSchrodinger) : end Robertson1929 -/-! ## Cinco lemas aritméticos elementales (`Blindaje`) +/-! ## Five elementary arithmetic lemmas (`Blindaje` / Shielding) -Usados más adelante por el teorema de Niven (`D7_Niven.lean`): R3 acota el -coseno para `d ≥ 5`; R5 es la observación aritmética de que una cota -estrictamente positiva impide que cualquiera de sus dos factores sea nulo. -/ +Used later by the Niven theorem (`D7_Niven.lean`): R3 bounds the +cosine for `d ≥ 5`; R5 is the arithmetic observation that a strictly +positive bound prevents either factor from vanishing. -/ open Real Finset namespace Blindaje -/-- Identidad término a término, exacta en ℚ. -/ +/-- Term-by-term identity, exact over ℚ. -/ theorem R1b_termino (k : ℕ) (hk : 1 ≤ k) : (1 : ℚ) / k ^ 2 - 1 / (k * (k + 1)) = 1 / (k ^ 2 * (k + 1)) := by have hk0 : (k : ℚ) ≠ 0 := Nat.cast_ne_zero.mpr (by omega) @@ -176,7 +176,7 @@ theorem R1b_termino (k : ℕ) (hk : 1 ≤ k) : field_simp ring -/-- El telescopio cierra exacto: `Σ_{k=2..N} 1/(k(k+1)) = 1/2 − 1/(N+1)`. -/ +/-- Exact telescoping: `Σ_{k=2..N} 1/(k(k+1)) = 1/2 − 1/(N+1)`. -/ theorem R1a_telescopio (N : ℕ) (hN : 2 ≤ N) : ∑ k ∈ Icc 2 N, (1 : ℚ) / (k * (k + 1)) = 1 / 2 - 1 / (N + 1) := by induction N with @@ -199,7 +199,7 @@ theorem R1d_modo_positivo (k : ℕ) (hk : 2 ≤ k) : have : (0 : ℚ) < k := by exact_mod_cast (by omega : 0 < k) positivity -/-- Si `(3+√5)/8 = 3/4` entonces `√5 = 3`, entonces `5 = 9`: absurdo. -/ +/-- If `(3+√5)/8 = 3/4` then `√5 = 3`, then `5 = 9`: absurd. -/ theorem R2_cinco_no_es_nueve : (3 + Real.sqrt 5) / 8 ≠ 3 / 4 := by intro h have h3 : Real.sqrt 5 = 3 := by linarith @@ -209,7 +209,7 @@ theorem R2_cinco_no_es_nueve : (3 + Real.sqrt 5) / 8 ≠ 3 / 4 := by linarith [this] norm_num at h5 -/-- Techo del coseno: para `d ≥ 5`, `cos²(π/(d+1)) < (d−1)/4`. -/ +/-- Cosine ceiling: for `d ≥ 5`, `cos²(π/(d+1)) < (d−1)/4`. -/ theorem R3_techo_coseno (d : ℕ) (hd : 5 ≤ d) : Real.cos (π / (d + 1)) ^ 2 < (d - 1 : ℝ) / 4 := by have hd1 : (0 : ℝ) < (d : ℝ) + 1 := by positivity @@ -240,8 +240,8 @@ theorem R4a_siete_fracciones : theorem R4_pi_mayor_que_tres : (3 : ℝ) < π := Real.pi_gt_three -/-- Obstrucción aritmética: si la cota `c` es estrictamente positiva y -`c ≤ α·β`, entonces ninguno de los dos factores puede anularse. -/ +/-- Arithmetic obstruction: if the bound `c` is strictly positive and +`c ≤ α·β`, then neither factor can vanish. -/ theorem R5_obstruccion_aritmetica (var_A var_B cota_robertson : ℝ) (h_robertson : cota_robertson ≤ var_A * var_B) (h_cota_positiva : 0 < cota_robertson) : @@ -256,17 +256,17 @@ theorem R5_obstruccion_aritmetica (var_A var_B cota_robertson : ℝ) end Blindaje -/-! ## Cierre del puente: Cauchy–Schwarz ⇒ Robertson–Schrödinger -/ +/-! ## Bridge closure: Cauchy–Schwarz ⇒ Robertson–Schrödinger -/ noncomputable section namespace ObstruccionGramUnificada -/-- Puente con `Robertson1929`: cualquier par de vectores en un espacio de -Hilbert complejo produce una `EvaluacionSchrodinger` cuya cota cuadrática no -se postula como campo libre — se deriva del defecto de Gram no negativo -(`gramDefectC_nonneg`). La hipótesis `cota_cuadratica` que -`Robertson1929.EvaluacionSchrodinger` exige como dato queda aquí demostrada. -/ +/-- Bridge to `Robertson1929`: any pair of vectors in a complex Hilbert +space yields an `EvaluacionSchrodinger` whose quadratic bound is not +postulated — it is derived from the nonneg Gram defect +(`gramDefectC_nonneg`). The `cota_cuadratica` hypothesis required by +`Robertson1929.EvaluacionSchrodinger` is proved here. -/ def evaluacionSchrodingerDeGram {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] (x y : H) : Robertson1929.EvaluacionSchrodinger where @@ -280,10 +280,10 @@ def evaluacionSchrodingerDeGram {H : Type*} [NormedAddCommGroup H] have h := robertsonSchrodinger_from_gram x y simpa [varianceC] using h -/-- El piso Robertson–Schrödinger de la evaluación construida por Gram queda -dominado por el producto de normas: la misma conclusión de -`Robertson1929.pisoSchrodinger_le_producto`, instanciada sobre una evaluación -que ya no es un supuesto sino un teorema. -/ +/-- The Robertson–Schrödinger floor of the Gram-constructed evaluation +is dominated by the norm product: the same conclusion as +`Robertson1929.pisoSchrodinger_le_producto`, instantiated on an +evaluation that is now a theorem, not an assumption. -/ theorem pisoSchrodinger_evaluacionSchrodingerDeGram_le {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] (x y : H) : Robertson1929.pisoSchrodinger (evaluacionSchrodingerDeGram x y) ≤ ‖x‖ * ‖y‖ := by diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean index 7708320eb..5d63ca809 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D3_GrafoCamino.lean @@ -9,21 +9,19 @@ public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D0_Habitat public import Mathlib.Combinatorics.SimpleGraph.Hasse /-! -# D3 — Operadores de transporte y posición sobre el grafo camino - -El soporte discreto no introduce un grafo ad hoc: es literalmente -`SimpleGraph.pathGraph d` de Mathlib, el camino con `d` vértices -`0,1,…,d−1` y aristas sólo entre vecinos consecutivos. Sobre esa base se -definen dos matrices hermitianas: `T_d` (transporte, soportado en las -aristas del camino) y `P_d` (posición, diagonal, con coordenadas -centradas en `[-1,1]`). - -La segunda mitad del archivo (`CanalPreFuerza`) prueba, sin apelar a -ninguna elección de diseño, que el grafo camino es la **única** opción -compatible con dos condiciones puramente combinatorias: localidad -(ninguna arista salta vecinos) y completitud (no falta ningún paso -elemental). Cualquier grafo local en `Fin d` que no omita un paso mínimo -**es** `pathGraph d`; no hay otro candidato. +# D3 — Transport and position operators on the path graph + +The discrete support is not an ad-hoc graph: it is literally +`SimpleGraph.pathGraph d` from Mathlib, the path on `d` vertices +`0,1,…,d−1` with edges only between consecutive neighbours. Two +Hermitian matrices are built on it: `T_d` (transport, supported on +path edges) and `P_d` (position, diagonal, centered in `[-1,1]`). + +The second half (`CanalPreFuerza`) proves, without any design choice, +that the path graph is the **only** option compatible with two purely +combinatorial conditions: locality (no edge skips a neighbour) and +completeness (no elementary step is missing). Any local graph on +`Fin d` that omits no minimal step **is** `pathGraph d`. -/ @[expose] public section @@ -32,19 +30,18 @@ namespace TransportePosicion open SimpleGraph -/-- Grafo de fase del canal transporte–posición: el camino `pathGraph d` -de Mathlib. -/ +/-- Phase graph of the transport–position channel: Mathlib's +`pathGraph d`. -/ abbrev GrafoTP (d : ℕ) : SimpleGraph (Fin d) := SimpleGraph.pathGraph d -/-- Adyacencia elemental del camino: sólo hay desplazamiento mínimo de un -paso. -/ +/-- Elementary path adjacency: only single minimal-step displacement. -/ theorem grafoTP_adj {d : ℕ} {i j : Fin d} : (GrafoTP d).Adj i j ↔ i.val + 1 = j.val ∨ j.val + 1 = i.val := by simpa [GrafoTP] using (SimpleGraph.pathGraph_adj (n := d) (u := i) (v := j)) -/-- Predicado decidible del desplazamiento mínimo en la línea discreta. -/ +/-- Decidable minimal-displacement predicate on the discrete line. -/ def PasoMinimo {d : ℕ} (i j : Fin d) : Prop := i.val + 1 = j.val ∨ j.val + 1 = i.val @@ -53,37 +50,37 @@ instance instDecidablePasoMinimo {d : ℕ} (i j : Fin d) : unfold PasoMinimo infer_instance -/-- El paso mínimo decidible es exactamente la adyacencia de `pathGraph`. -/ +/-- The decidable minimal step is exactly `pathGraph` adjacency. -/ theorem pasoMinimo_iff_adj {d : ℕ} {i j : Fin d} : PasoMinimo i j ↔ (GrafoTP d).Adj i j := by rw [grafoTP_adj] rfl -/-- El soporte discreto `T_d/P_d` es isomorfo a `pathGraph d` por definición -canónica. -/ +/-- The discrete support `T_d/P_d` is isomorphic to `pathGraph d` by +canonical definition. -/ theorem grafoTP_es_pathGraph (d : ℕ) : Nonempty (GrafoTP d ≃g SimpleGraph.pathGraph d) := by change Nonempty (SimpleGraph.pathGraph d ≃g SimpleGraph.pathGraph d) exact ⟨SimpleGraph.Iso.refl⟩ -/-- Matriz de adyacencia compleja del canal de transporte. -/ +/-- Complex adjacency matrix of the transport channel. -/ noncomputable def Ad (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := fun i j => if PasoMinimo i j then 1 else 0 -/-- Radio espectral usado para normalizar el transporte de la cadena -finita: `ρ_d = 2 cos(π/(d+1))`. -/ +/-- Spectral radius for normalizing the finite-chain transport: +`ρ_d = 2 cos(π/(d+1))`. -/ noncomputable def rho (d : ℕ) : ℝ := 2 * Real.cos (Real.pi / ((d : ℝ) + 1)) -/-- Operador de transporte normalizado `T_d = A_d / ρ_d`. -/ +/-- Normalized transport operator `T_d = A_d / ρ_d`. -/ noncomputable def Td (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := fun i j => Ad d i j / (rho d : ℂ) -/-- Coordenada centrada de posición sobre la base discreta, en `[-1,1]`. -/ +/-- Centered position coordinate on the discrete basis, in `[-1,1]`. -/ noncomputable def posicionCoord (d : ℕ) (j : Fin d) : ℝ := (2 * ((j.val : ℝ) + 1) - ((d : ℝ) + 1)) / ((d : ℝ) - 1) -/-- Operador de posición diagonal `P_d`. -/ +/-- Diagonal position operator `P_d`. -/ noncomputable def Pd (d : ℕ) : Matrix (Fin d) (Fin d) ℂ := fun i j => if i = j then (posicionCoord d i : ℂ) else 0 @@ -103,12 +100,12 @@ theorem Td_eq_zero_of_not_adj {d : ℕ} {i j : Fin d} exact h (pasoMinimo_iff_adj.mp hp) simp [Td, Ad, hpaso] -/-- `P_d` es diagonal en la base discreta. -/ +/-- `P_d` is diagonal in the discrete basis. -/ theorem Pd_eq_zero_offdiag {d : ℕ} {i j : Fin d} (hij : i ≠ j) : Pd d i j = 0 := by simp [Pd, hij] -/-- En la diagonal, `P_d` devuelve la coordenada discreta centrada. -/ +/-- On the diagonal, `P_d` returns the centered discrete coordinate. -/ theorem Pd_diag {d : ℕ} (i : Fin d) : Pd d i i = (posicionCoord d i : ℂ) := by simp [Pd] @@ -116,52 +113,52 @@ theorem Pd_diag {d : ℕ} (i : Fin d) : end TransportePosicion /-! -## Por qué `pathGraph d` y no otro grafo +## Why `pathGraph d` and not another graph -Un canal local (toda arista es un paso mínimo entre vecinos) y completo -(no falta ningún paso mínimo posible) sobre `Fin d` es, por extensionalidad -de la relación de adyacencia, exactamente `pathGraph d`. No hay una -"simplificación" que conserve ambas propiedades: quitar una arista rompe -la completitud. +A local channel (every edge is a minimal step between neighbours) and +complete (no possible minimal step is missing) on `Fin d` is, by +extensionality of the adjacency relation, exactly `pathGraph d`. There +is no "simplification" preserving both properties: removing an edge +breaks completeness. -/ namespace CanalPreFuerza open SimpleGraph -/-- Localidad estricta: toda arista del canal es un paso entre vecinos -consecutivos. No se permiten saltos ni atajos. -/ +/-- Strict locality: every channel edge is a step between consecutive +neighbours. No jumps or shortcuts allowed. -/ def LocalidadOrdenada {d : ℕ} (G : SimpleGraph (Fin d)) : Prop := ∀ {i j : Fin d}, G.Adj i j → TransportePosicion.PasoMinimo i j -/-- Completitud: todo paso entre vecinos consecutivos debe estar presente. -Quitar uno rompe el movimiento local completo entre los extremos de la -celda. -/ +/-- Completeness: every step between consecutive neighbours must be +present. Removing one breaks full local movement between the cell +endpoints. -/ def PasosElementalesCompletos {d : ℕ} (G : SimpleGraph (Fin d)) : Prop := ∀ {i j : Fin d}, TransportePosicion.PasoMinimo i j → G.Adj i j -/-- Defecto por intentar simplificar más que `pathGraph d`: se omite al -menos un paso elemental consecutivo. -/ +/-- Defect from trying to simplify beyond `pathGraph d`: at least one +consecutive elementary step is omitted. -/ def OmitePasoElemental {d : ℕ} (G : SimpleGraph (Fin d)) : Prop := ∃ i j : Fin d, TransportePosicion.PasoMinimo i j ∧ ¬ G.Adj i j -/-- Canal ordenado, local y completo en la celda discreta. -/ +/-- Ordered, local and complete channel on the discrete cell. -/ structure CanalLocalNoRamificadoOrdenado (d : ℕ) where /-- The graph supporting the ordered local channel. -/ grafo : SimpleGraph (Fin d) localidad_ordenada : LocalidadOrdenada grafo pasos_elementales : PasosElementalesCompletos grafo -/-- En un canal local ordenado completo, la adyacencia es exactamente el -paso mínimo de la celda. -/ +/-- In a complete ordered local channel, adjacency is exactly the +minimal step of the cell. -/ theorem CanalLocalNoRamificadoOrdenado.adj_iff_paso {d : ℕ} (C : CanalLocalNoRamificadoOrdenado d) {i j : Fin d} : C.grafo.Adj i j ↔ TransportePosicion.PasoMinimo i j := by exact ⟨fun h => C.localidad_ordenada h, fun h => C.pasos_elementales h⟩ -/-- Teorema de minimalidad: localidad ordenada y pasos elementales -completos fuerzan que el soporte sea exactamente `pathGraph d`. -/ +/-- Minimality theorem: ordered locality and complete elementary steps +force the support to be exactly `pathGraph d`. -/ theorem canal_local_no_ramificado_es_pathGraph {d : ℕ} (C : CanalLocalNoRamificadoOrdenado d) : C.grafo = SimpleGraph.pathGraph d := by @@ -170,15 +167,15 @@ theorem canal_local_no_ramificado_es_pathGraph simpa [TransportePosicion.GrafoTP] using (TransportePosicion.pasoMinimo_iff_adj (d := d) (i := i) (j := j)) -/-- Versión isomórfica del mismo cierre. -/ +/-- Isomorphic version of the same closure. -/ theorem canal_local_no_ramificado_iso_pathGraph {d : ℕ} (C : CanalLocalNoRamificadoOrdenado d) : Nonempty (C.grafo ≃g SimpleGraph.pathGraph d) := by rw [canal_local_no_ramificado_es_pathGraph C] exact ⟨SimpleGraph.Iso.refl⟩ -/-- El canal canónico `T_d/P_d` satisface directamente el certificado local -ordenado: no tiene saltos y no omite pasos elementales. -/ +/-- The canonical channel `T_d/P_d` directly satisfies the ordered local +certificate: it has no jumps and omits no elementary steps. -/ def canalTPLocalNoRamificado (d : ℕ) : CanalLocalNoRamificadoOrdenado d where grafo := TransportePosicion.GrafoTP d @@ -191,8 +188,8 @@ def canalTPLocalNoRamificado (d : ℕ) : exact (TransportePosicion.pasoMinimo_iff_adj (d := d) (i := i) (j := j)).mp h -/-- Ningún canal que ya satisface el certificado local ordenado puede omitir -un paso elemental: "no hay una simplificación local más simple que +/-- No channel that already satisfies the ordered local certificate can +omit an elementary step: "there is no local simplification simpler than `pathGraph d`". -/ theorem no_hay_canal_local_mas_simple_que_Pd {d : ℕ} (C : CanalLocalNoRamificadoOrdenado d) : @@ -200,8 +197,8 @@ theorem no_hay_canal_local_mas_simple_que_Pd rintro ⟨i, j, hpaso, hno⟩ exact hno (C.pasos_elementales hpaso) -/-- Cierre: el soporte canónico `T_d/P_d` es `pathGraph d`, y cualquier -intento local de hacerlo "más simple" pierde un paso elemental. -/ +/-- Closure: the canonical support `T_d/P_d` is `pathGraph d`, and any +local attempt to make it "simpler" loses an elementary step. -/ theorem cierre_minimalidad_local_TP (d : ℕ) : (canalTPLocalNoRamificado d).grafo = SimpleGraph.pathGraph d ∧ ¬ OmitePasoElemental (canalTPLocalNoRamificado d).grafo := by diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D4_PorQueNoDiagonal.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D4_PorQueNoDiagonal.lean index c28642ceb..30fd193dc 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D4_PorQueNoDiagonal.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D4_PorQueNoDiagonal.lean @@ -8,26 +8,27 @@ module public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D3_GrafoCamino /-! -# D4 — Por qué no un paso diagonal - -`D3_GrafoCamino.lean` fija el soporte de `T_d` en los pasos mínimos -(vecino a vecino) del camino `pathGraph d`. Este archivo cierra, con dos -argumentos independientes, la pregunta de por qué nunca se considera un -paso "diagonal" (cambiar más de una coordenada a la vez) como alternativa: - -1. **Si hubiera ≥ 2 ejes genuinos** (el modelo se generalizara a una malla - cúbica `Fin dx × Fin dy × Fin dz`), Pitágoras decide: el paso ortogonal - (un solo eje) tiene distancia euclidiana exactamente `1`; el paso - diagonal doble, exactamente `√2`; el triple, exactamente `√3`. Como - `1 < √2` y `1 < √3`, el paso ortogonal es siempre estrictamente más - corto. No es una preferencia de diseño: es la adyacencia mínima que - Pitágoras obliga. -2. **En el caso efectivamente usado por `T_d/P_d`** (un solo eje, `dy = dz = 1`), - la pregunta ni siquiera se plantea: con un único eje genuino la propia - relación "paso diagonal" es la relación **vacía** — no existe ningún par - de sitios que la satisfaga, porque un eje trivial (`Fin 1`) no tiene - ningún paso mínimo posible. La diagonal presupone, para poder - enunciarse de forma no vacía, dos ejes ya distinguidos entre sí. +# D4 — Why not a diagonal step + +`D3_GrafoCamino.lean` pins the support of `T_d` on the minimal +(nearest-neighbour) steps of `pathGraph d`. This file closes, with +two independent arguments, the question of why a "diagonal" step +(changing more than one coordinate at once) is never an alternative: + +1. **If there were ≥ 2 genuine axes** (generalising to a cubic lattice + `Fin dx × Fin dy × Fin dz`), Pythagoras decides: the orthogonal + step (one axis) has Euclidean distance exactly `1`; the double + diagonal, exactly `√2`; the triple, exactly `√3`. Since + `1 < √2` and `1 < √3`, the orthogonal step is always strictly + shorter. This is not a design choice: it is the minimal + adjacency that Pythagoras forces. +2. **In the case actually used by `T_d/P_d`** (a single axis, + `dy = dz = 1`), the question does not even arise: with one + genuine axis the "diagonal step" relation is the **empty** + relation — no pair of sites satisfies it, because a trivial + axis (`Fin 1`) has no minimal step at all. The diagonal + presupposes, in order to be non-vacuously stated, two axes + already distinguished from each other. -/ @[expose] public section @@ -36,11 +37,11 @@ noncomputable section namespace PathGraph3D -/-- Sitio de una malla cúbica: producto de tres mallas 1D. -/ +/-- Site of a cubic lattice: product of three 1D lattices. -/ abbrev Sitio3D (dx dy dz : ℕ) := Fin dx × Fin dy × Fin dz -/-- Adyacencia ortogonal del cubo: cambia una sola coordenada a la vez, por -un paso mínimo en ese eje. -/ +/-- Orthogonal adjacency of the cube: changes exactly one coordinate +at a time by a minimal step along that axis. -/ def Adj3D {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : Prop := (TransportePosicion.PasoMinimo p.1 q.1 ∧ p.2 = q.2) ∨ (p.1 = q.1 ∧ TransportePosicion.PasoMinimo p.2.1 q.2.1 ∧ p.2.2 = q.2.2) ∨ @@ -48,23 +49,23 @@ def Adj3D {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : Prop := end PathGraph3D -/-! ## 1. Pitágoras: el paso ortogonal es siempre estrictamente más corto -/ +/-! ## 1. Pythagoras: the orthogonal step is always strictly shorter -/ namespace OrtogonalidadMinimalPitagoras open PathGraph3D open TransportePosicion -/-- Distancia euclidiana entre dos sitios del cubo, viendo cada coordenada -`Fin` como un real vía el casteo natural. -/ +/-- Euclidean distance between two cube sites, viewing each `Fin` +coordinate as a real via the natural cast. -/ noncomputable def dist3D {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : ℝ := Real.sqrt ( ((p.1 : ℝ) - (q.1 : ℝ)) ^ 2 + ((p.2.1 : ℝ) - (q.2.1 : ℝ)) ^ 2 + ((p.2.2 : ℝ) - (q.2.2 : ℝ)) ^ 2) -/-- Dos coordenadas a un `PasoMinimo` difieren, como reales, en exactamente -`±1`; su diferencia al cuadrado es `1`. -/ +/-- Two coordinates at a `PasoMinimo` differ, as reals, by exactly +`±1`; their squared difference is `1`. -/ theorem pasoMinimo_sq_diff_eq_one {d : ℕ} {i j : Fin d} (h : PasoMinimo i j) : ((i.val : ℝ) - (j.val : ℝ)) ^ 2 = 1 := by rcases h with h | h @@ -77,7 +78,7 @@ theorem eq_sq_diff_eq_zero {d : ℕ} {i j : Fin d} (h : i = j) : ((i.val : ℝ) - (j.val : ℝ)) ^ 2 = 0 := by rw [h]; ring -/-! ### Paso ortogonal: distancia exactamente `1` -/ +/-! ### Orthogonal step: distance exactly `1` -/ theorem dist3D_eq_one_of_Adj3D {dx dy dz : ℕ} {p q : Sitio3D dx dy dz} (h : Adj3D p q) : @@ -108,10 +109,11 @@ theorem dist3D_eq_one_of_Adj3D rw [hx0, hy0, pasoMinimo_sq_diff_eq_one hz]; ring rw [hsum, Real.sqrt_one] -/-! ### Paso diagonal doble: distancia exactamente `√2` -/ +/-! ### Double diagonal step: distance exactly `√2` -/ -/-- Vecino diagonal en dos ejes: dos coordenadas cambian por `PasoMinimo` -simultáneamente, la tercera queda fija. `Adj3D` nunca produce este caso. -/ +/-- Diagonal neighbour in two axes: two coordinates change by +`PasoMinimo` simultaneously, the third stays fixed. `Adj3D` +never produces this case. -/ def PasoDiagonalDoble {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : Prop := (PasoMinimo p.1 q.1 ∧ PasoMinimo p.2.1 q.2.1 ∧ p.2.2 = q.2.2) ∨ (PasoMinimo p.1 q.1 ∧ p.2.1 = q.2.1 ∧ PasoMinimo p.2.2 q.2.2) ∨ @@ -141,9 +143,9 @@ theorem dist3D_eq_sqrt_two_of_PasoDiagonalDoble rw [hx0, pasoMinimo_sq_diff_eq_one hy, pasoMinimo_sq_diff_eq_one hz]; ring rw [hsum] -/-! ### Paso diagonal triple: distancia exactamente `√3` -/ +/-! ### Triple diagonal step: distance exactly `√3` -/ -/-- Vecino diagonal en los tres ejes (la esquina del cubo unitario). -/ +/-- Diagonal neighbour in all three axes (the unit cube corner). -/ def PasoDiagonalTriple {dx dy dz : ℕ} (p q : Sitio3D dx dy dz) : Prop := PasoMinimo p.1 q.1 ∧ PasoMinimo p.2.1 q.2.1 ∧ PasoMinimo p.2.2 q.2.2 @@ -159,7 +161,7 @@ theorem dist3D_eq_sqrt_three_of_PasoDiagonalTriple pasoMinimo_sq_diff_eq_one hz]; ring rw [hsum] -/-! ### Cierre Pitágoras: el ortogonal gana siempre -/ +/-! ### Pythagoras closure: the orthogonal step always wins -/ theorem uno_lt_sqrt_two : (1 : ℝ) < Real.sqrt 2 := by have h2 : Real.sqrt 2 ^ 2 = 2 := Real.sq_sqrt (by norm_num) @@ -169,8 +171,8 @@ theorem uno_lt_sqrt_three : (1 : ℝ) < Real.sqrt 3 := by have h3 : Real.sqrt 3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) nlinarith [Real.sqrt_nonneg (3 : ℝ), h3] -/-- El paso ortogonal (el único que admite `Adj3D`) es estrictamente más -corto que cualquier paso diagonal doble. -/ +/-- The orthogonal step (the only one admitted by `Adj3D`) is +strictly shorter than any double diagonal step. -/ theorem ortogonal_mas_corto_que_diagonal_doble {dx dy dz : ℕ} {p q p' q' : Sitio3D dx dy dz} (hOrt : Adj3D p q) (hDiag : PasoDiagonalDoble p' q') : @@ -178,8 +180,8 @@ theorem ortogonal_mas_corto_que_diagonal_doble rw [dist3D_eq_one_of_Adj3D hOrt, dist3D_eq_sqrt_two_of_PasoDiagonalDoble hDiag] exact uno_lt_sqrt_two -/-- El paso ortogonal es estrictamente más corto que cualquier paso -diagonal triple (la esquina del cubo). -/ +/-- The orthogonal step is strictly shorter than any triple +diagonal step (the cube corner). -/ theorem ortogonal_mas_corto_que_diagonal_triple {dx dy dz : ℕ} {p q p' q' : Sitio3D dx dy dz} (hOrt : Adj3D p q) (hDiag : PasoDiagonalTriple p' q') : @@ -187,10 +189,11 @@ theorem ortogonal_mas_corto_que_diagonal_triple rw [dist3D_eq_one_of_Adj3D hOrt, dist3D_eq_sqrt_three_of_PasoDiagonalTriple hDiag] exact uno_lt_sqrt_three -/-- CIERRE. Ninguna diagonal (doble o triple) puede empatar o vencer en -distancia al paso ortogonal: la adyacencia mínima del cubo (`Adj3D`) es la -única compatible con minimalidad de distancia euclidiana. No es una -elección arbitraria: es la que Pitágoras obliga. -/ +/-- CLOSURE. No diagonal (double or triple) can tie or beat the +orthogonal step in distance: the minimal adjacency of the cube +(`Adj3D`) is the only one compatible with Euclidean distance +minimality. This is not an arbitrary choice: it is the one +Pythagoras forces. -/ theorem adyacencia_minima_es_ortogonal {dx dy dz : ℕ} {p q p' q' : Sitio3D dx dy dz} (hOrt : Adj3D p q) @@ -202,15 +205,15 @@ theorem adyacencia_minima_es_ortogonal end OrtogonalidadMinimalPitagoras -/-! ## 2. Con un solo eje, la diagonal es la relación vacía -/ +/-! ## 2. With a single axis, the diagonal is the empty relation -/ namespace DiagonalPresuponeDosPd open PathGraph3D open OrtogonalidadMinimalPitagoras -/-- En un eje trivial (`Fin 1`, un único punto) no hay ningún paso mínimo: -`PasoMinimo` es la relación vacía. -/ +/-- On a trivial axis (`Fin 1`, a single point) there is no +minimal step: `PasoMinimo` is the empty relation. -/ theorem pasoMinimo_vacio_en_eje_trivial (i j : Fin 1) : ¬ TransportePosicion.PasoMinimo i j := by unfold TransportePosicion.PasoMinimo @@ -218,8 +221,9 @@ theorem pasoMinimo_vacio_en_eje_trivial (i j : Fin 1) : have hj := j.isLt omega -/-- Con un solo eje genuino (`dy = dz = 1`), `PasoDiagonalDoble` es la -relación vacía: no hay ningún par de sitios que la satisfaga. -/ +/-- With a single genuine axis (`dy = dz = 1`), +`PasoDiagonalDoble` is the empty relation: no pair of sites +satisfies it. -/ theorem diagonalDoble_vacia_con_un_solo_eje {dx : ℕ} (p q : Sitio3D dx 1 1) : ¬ PasoDiagonalDoble p q := by unfold PasoDiagonalDoble @@ -228,19 +232,20 @@ theorem diagonalDoble_vacia_con_un_solo_eje · exact pasoMinimo_vacio_en_eje_trivial p.2.2 q.2.2 hz · exact pasoMinimo_vacio_en_eje_trivial p.2.1 q.2.1 hy -/-- Con un solo eje genuino, `PasoDiagonalTriple` (la esquina del cubo) -tampoco existe: también es la relación vacía. -/ +/-- With a single genuine axis, `PasoDiagonalTriple` (the cube +corner) does not exist either: it is also the empty relation. -/ theorem diagonalTriple_vacia_con_un_solo_eje {dx : ℕ} (p q : Sitio3D dx 1 1) : ¬ PasoDiagonalTriple p q := by unfold PasoDiagonalTriple rintro ⟨_, hy, _⟩ exact pasoMinimo_vacio_en_eje_trivial p.2.1 q.2.1 hy -/-- CIERRE. Con un solo eje, ninguna diagonal —doble ni triple— existe. La -diagonal es, en sentido literal de teoría de conjuntos, posterior a la -existencia de dos ejes distinguidos entre sí: no anterior, no simultánea, -no elemental. El modelo `T_d/P_d` (un único eje) nunca necesita excluirla -por decreto: no hay nada que excluir. -/ +/-- CLOSURE. With a single axis, no diagonal — double or triple — +exists. The diagonal is, in the literal set-theoretic sense, +posterior to the existence of two distinguished axes: not prior, +not simultaneous, not elementary. The model `T_d/P_d` (a single +axis) never needs to exclude it by decree: there is nothing to +exclude. -/ theorem diagonal_no_existe_con_un_solo_eje {dx : ℕ} (p q : Sitio3D dx 1 1) : ¬ (PasoDiagonalDoble p q ∨ PasoDiagonalTriple p q) := by diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean index 63cd3ef33..57da463a0 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D5_MaximaTension.lean @@ -14,19 +14,20 @@ public import Mathlib.RingTheory.PicardGroup public import Mathlib.RingTheory.SimpleRing.Principal /-! -# D5 — Estado de máxima tensión y observable `i[T_d,P_d]` - -En dimensión finita, `i[T,P]` es simétrico (hermitiano) siempre que `T` y -`P` lo son; por el teorema espectral finito, posee una base ortonormal de -autovectores. Este archivo elige el autovector cuyo autovalor tiene módulo -máximo y demuestra la envolvente sobre todos los estados normalizados: ese -estado realiza, entre todos los estados unitarios del mismo canal, la mayor -tensión posible del conmutador. También se exhibe, en coordenadas -explícitas (fase seno), el mismo estado extremal para el par concreto -`(T_d,P_d)` del camino discreto: es el "modo de Fiedler" de la cadena. - -Se cierra con un certificado concreto de no conmutatividad: -`[T_d,P_d] ≠ 0` para `d ≥ 2`, exhibido en una única entrada de matriz. +# D5 — Maximal-tension state and the observable `i[T_d,P_d]` + +In finite dimension, `i[T,P]` is symmetric (Hermitian) whenever `T` +and `P` are; by the finite spectral theorem it has an orthonormal +eigenbasis. This file picks the eigenvector whose eigenvalue has +maximal absolute value and proves the envelope over all normalised +states: that state realises, among all unit states of the same +channel, the greatest possible commutator tension. The same extremal +state is then exhibited in explicit coordinates (sine-phase mode) +for the concrete pair `(T_d,P_d)` of the discrete path: it is the +"Fiedler mode" of the chain. + +Closes with a concrete non-commutativity certificate: +`[T_d,P_d] ≠ 0` for `d ≥ 2`, witnessed by a single matrix entry. -/ @[expose] public section @@ -40,8 +41,8 @@ universe u variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [FiniteDimensional ℂ H] [Nontrivial H] -/-- En dimensión positiva existe un índice cuyo autovalor tiene módulo -máximo. -/ +/-- In positive dimension there exists an index whose eigenvalue +has maximal absolute value. -/ theorem existe_indice_extremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : ∃ i : Fin (Module.finrank ℂ H), ∀ j : Fin (Module.finrank ℂ H), @@ -63,11 +64,11 @@ def indiceExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : def autovalorExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : ℝ := hK.eigenvalues rfl (indiceExtremal K hK) -/-- Radio espectral realizado por el estado elegido. -/ +/-- Spectral radius realised by the chosen state. -/ def radioEspectral (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : ℝ := |autovalorExtremal K hK| -/-- Estado unitario de máxima tensión. -/ +/-- Unit state of maximal tension. -/ def estadoExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : H := hK.eigenvectorBasis rfl (indiceExtremal K hK) @@ -90,8 +91,8 @@ theorem aplica_estadoExtremal (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : (autovalorExtremal K hK : ℂ) • estadoExtremal K hK := by exact hK.apply_eigenvectorBasis rfl (indiceExtremal K hK) -/-- La acción de un operador simétrico queda acotada por el radio espectral -elegido. -/ +/-- The action of a symmetric operator is bounded by the chosen +spectral radius. -/ theorem norma_aplicacion_le_radio_mul_norma (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) (v : H) : ‖K v‖ ≤ radioEspectral K hK * ‖v‖ := by @@ -151,7 +152,7 @@ theorem norma_aplicacion_le_radio_mul_norma mul_nonneg (radioEspectral_nonneg K hK) (norm_nonneg _) nlinarith -/-- Envolvente de la forma cuadrática sobre la esfera unidad. -/ +/-- Envelope of the quadratic form on the unit sphere. -/ theorem expectativa_le_radio (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) (v : H) (hv : ‖v‖ = 1) : @@ -164,7 +165,7 @@ theorem expectativa_le_radio (norma_aplicacion_le_radio_mul_norma K hK v) (norm_nonneg _) _ = radioEspectral K hK := by rw [hv]; ring -/-- El estado elegido realiza exactamente el radio espectral. -/ +/-- The chosen state realises exactly the spectral radius. -/ theorem estadoExtremal_realiza_radio (K : H →ₗ[ℂ] H) (hK : K.IsSymmetric) : ‖@inner ℂ H _ (estadoExtremal K hK) (K (estadoExtremal K hK))‖ = @@ -173,15 +174,15 @@ theorem estadoExtremal_realiza_radio rw [inner_self_eq_norm_sq_to_K, estadoExtremal_normalizado K hK] simp [radioEspectral, autovalorExtremal] -/-- Conmutador crudo total `[T,P]`. -/ +/-- Raw commutator `[T,P]`. -/ def conmutador (T P : H →ₗ[ℂ] H) : H →ₗ[ℂ] H := T.comp P - P.comp T -/-- Observable hermitiano de tensión `i[T,P]`. -/ +/-- Hermitian tension observable `i[T,P]`. -/ def observableTension (T P : H →ₗ[ℂ] H) : H →ₗ[ℂ] H := Complex.I • conmutador T P -/-- Para operadores simétricos, `i[T,P]` es simétrico. -/ +/-- For symmetric operators, `i[T,P]` is symmetric. -/ theorem observableTension_simetrico {E : Type u} [NormedAddCommGroup E] [InnerProductSpace ℂ E] (T P : E →ₗ[ℂ] E) (hT : T.IsSymmetric) (hP : P.IsSymmetric) : @@ -224,11 +225,11 @@ namespace TransportePosicion open ConstructorEspectralTP -/-- Realización lineal total de la matriz de transporte canónica. -/ +/-- Full linear realisation of the canonical transport matrix. -/ noncomputable def TdOp (d : ℕ) : Hd d →ₗ[ℂ] Hd d := Matrix.toEuclideanLin (Td d) -/-- Realización lineal total de la matriz de posición canónica. -/ +/-- Full linear realisation of the canonical position matrix. -/ noncomputable def PdOp (d : ℕ) : Hd d →ₗ[ℂ] Hd d := Matrix.toEuclideanLin (Pd d) @@ -240,7 +241,7 @@ theorem pasoMinimo_simetrico {d : ℕ} {i j : Fin d} : · exact Or.inr h · exact Or.inl h -/-- La matriz de transporte es hermitiana. -/ +/-- The transport matrix is Hermitian. -/ theorem Td_isHermitian (d : ℕ) : Matrix.IsHermitian (Td d) := by rw [Matrix.IsHermitian.ext_iff] intro i j @@ -255,7 +256,7 @@ theorem Td_isHermitian (d : ℕ) : Matrix.IsHermitian (Td d) := by exact h (pasoMinimo_simetrico.mpr hji) simp [Td, Ad, h, h'] -/-- La matriz diagonal de posición es hermitiana. -/ +/-- The diagonal position matrix is Hermitian. -/ theorem Pd_isHermitian (d : ℕ) : Matrix.IsHermitian (Pd d) := by rw [Matrix.IsHermitian.ext_iff] intro i j @@ -271,7 +272,7 @@ theorem TdOp_simetrico (d : ℕ) : (TdOp d).IsSymmetric := by theorem PdOp_simetrico (d : ℕ) : (PdOp d).IsSymmetric := by exact Matrix.isSymmetric_toEuclideanLin_iff.mpr (Pd_isHermitian d) -/-- Observable hermitiano concreto `i[T_d,P_d]`. -/ +/-- Concrete Hermitian observable `i[T_d,P_d]`. -/ noncomputable def KdOp (d : ℕ) : Hd d →ₗ[ℂ] Hd d := observableTension (TdOp d) (PdOp d) @@ -279,8 +280,8 @@ theorem KdOp_simetrico (d : ℕ) : (KdOp d).IsSymmetric := observableTension_simetrico (TdOp d) (PdOp d) (TdOp_simetrico d) (PdOp_simetrico d) -/-- Estado canónico `ψ_d`: autovector unitario de `i[T_d,P_d]` cuyo -autovalor tiene módulo máximo. -/ +/-- Canonical state `ψ_d`: unit eigenvector of `i[T_d,P_d]` whose +eigenvalue has maximal absolute value. -/ noncomputable def psiD (d : ℕ) (hd : 1 ≤ d) : Hd d := by letI : Nonempty (Fin d) := ⟨⟨0, hd⟩⟩ exact estadoExtremal (KdOp d) (KdOp_simetrico d) @@ -290,26 +291,26 @@ theorem psiD_normalizado (d : ℕ) (hd : 1 ≤ d) : letI : Nonempty (Fin d) := ⟨⟨0, hd⟩⟩ exact estadoExtremal_normalizado (KdOp d) (KdOp_simetrico d) -/-! ## Vector de Fiedler explícito +/-! ## Explicit Fiedler vector -La elección espectral anterior realiza la máxima tensión, pero no expone sus -coordenadas. El modo siguiente fija la realización seno-fase sobre `Fin d`. -La positividad de `sin` en `(0, π)` prueba constructivamente que ninguna -coordenada desaparece. -/ +The spectral choice above realises the maximal tension but does not +expose its coordinates. The following mode pins the sine-phase +realisation on `Fin d`. Positivity of `sin` on `(0, π)` +constructively proves that no coordinate vanishes. -/ -/-- Ángulo fundamental del camino finito. -/ +/-- Fundamental angle of the finite path. -/ noncomputable def anguloFiedler (d : ℕ) : ℝ := Real.pi / ((d : ℝ) + 1) -/-- Modo seno con la fase compleja asociada a `i[T_d,P_d]`, todavía sin -normalizar. -/ +/-- Sine mode with the complex phase of `i[T_d,P_d]`, not yet +normalized. -/ noncomputable def vectorFiedlerCrudo (d : ℕ) : Hd d := WithLp.toLp 2 fun j : Fin d => (-Complex.I) ^ j.val * (Real.sin (((j.val : ℝ) + 1) * anguloFiedler d) : ℂ) -/-- Todas las amplitudes seno del modo fundamental son estrictamente -positivas. -/ +/-- All sine amplitudes of the fundamental mode are strictly +positive. -/ theorem seno_fiedler_pos (d : ℕ) (hd : 1 ≤ d) (j : Fin d) : 0 < Real.sin (((j.val : ℝ) + 1) * anguloFiedler d) := by @@ -344,7 +345,7 @@ theorem vectorFiedlerCrudo_ne_zero have hj := congrArg (fun v : Hd d => v j) h exact vectorFiedlerCrudo_coordenada_ne_zero d hd j hj -/-- Vector de Fiedler explícito normalizado, sin elección de autovector. -/ +/-- Explicit normalized Fiedler vector, no eigenvector choice. -/ noncomputable def vectorFiedlerExplicito (d : ℕ) : Hd d := ((‖vectorFiedlerCrudo d‖ : ℂ)⁻¹) • vectorFiedlerCrudo d @@ -414,7 +415,7 @@ theorem posicionCoord_succ_sub field_simp ring -/-- Certificado concreto de no conmutatividad: una sola entrada vecina basta. -/ +/-- Concrete non-commutativity certificate: one neighbour entry suffices. -/ theorem conmutador_matriz_entrada_vecina_no_cero (d : ℕ) (hd : 2 ≤ d) : let i : Fin d := ⟨0, by omega⟩ @@ -465,7 +466,7 @@ theorem conmutador_TdOp_PdOp_eq_matriz (d : ℕ) : Matrix.toEuclideanLin ((Td d * Pd d) - (Pd d * Td d)) := by simp [conmutador, TdOp, PdOp, Matrix.toEuclideanLin, Matrix.toLpLin_mul_same] -/-- `[T_d,P_d] ≠ 0` para `d ≥ 2`. -/ +/-- `[T_d,P_d] ≠ 0` for `d ≥ 2`. -/ theorem conmutador_TdOp_PdOp_no_cero (d : ℕ) (hd : 2 ≤ d) : conmutador (TdOp d) (PdOp d) ≠ 0 := by rw [conmutador_TdOp_PdOp_eq_matriz] diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean index 0d1b89d11..073eefe13 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D6_Fiedler.lean @@ -8,15 +8,15 @@ module public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D5_MaximaTension /-! -# D6 — Descomposición espectral de Fiedler sobre el camino discreto - -Diagonalización explícita, en base de modos seno/fase, del operador de -adyacencia `A_d` y del observable `i[T_d,P_d]` sobre `pathGraph d`. Se -obtiene el espectro completo en forma cerrada y se identifica el modo -fundamental (el vector de Fiedler) como el autovector extremal del -observable `i[T_d,P_d]`. Contenido íntegro, sin modificar, de la -descomposición espectral del corpus original — es álgebra lineal y teoría -espectral de grafos pura, sin ninguna capa interpretativa. +# D6 — Fiedler spectral decomposition on the discrete path + +Explicit diagonalization, in the sine/phase mode basis, of the adjacency +operator `A_d` and the observable `i[T_d,P_d]` on `pathGraph d`. The +complete spectrum is obtained in closed form and the fundamental mode +(the Fiedler vector) is identified as the extremal eigenvector of the +observable `i[T_d,P_d]`. Full, unmodified content from the original +corpus spectral decomposition — pure linear algebra and spectral graph +theory, with no interpretive layer. -/ @[expose] public section diff --git a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D7_Niven.lean b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D7_Niven.lean index 3b26a3c0e..99a2a1779 100644 --- a/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D7_Niven.lean +++ b/PhyslibAlpha/AlgebraicFramework/HilbertSpace/PathGap/D7_Niven.lean @@ -8,19 +8,19 @@ module public import PhyslibAlpha.AlgebraicFramework.HilbertSpace.PathGap.D2_Robertson /-! -# D7 — Teorema de Niven: la saturación sólo ocurre en `d ∈ {2,3}` +# D7 — Niven theorem: saturation only occurs at `d ∈ {2,3}` -Tricotomía de saturación: la ecuación trigonométrica +Saturation trichotomy: the trigonometric equation `cos²(π/(d+1)) = (d−1)/4` -—que es exactamente la condición para que la cota de Robertson se sature -sobre el modo fundamental del camino discreto— se cumple **si y sólo si** -`d = 2` o `d = 3`. No hay más soluciones naturales: la prueba distingue -`d = 4` (reductio algebraico explícito) de `d ≥ 5` (cota de coseno, -`Blindaje.R3_techo_coseno`). En consecuencia, para todo `d ≥ 4` la brecha -`C_Nava(d) − 1` es estrictamente positiva (segunda mitad de este archivo, -`Constructor_DeltaGeom_Pos`). +— which is exactly the condition for Robertson's bound to saturate +on the fundamental mode of the discrete path — holds if and only if +`d = 2` or `d = 3`. There are no further natural solutions: the proof +distinguishes `d = 4` (explicit algebraic reductio) from `d ≥ 5` +(cosine bound, `Blindaje.R3_techo_coseno`). Consequently, for all +`d ≥ 4` the gap `C_Nava(d) − 1` is strictly positive (second half +of this file, `Constructor_DeltaGeom_Pos`). -/ @[expose] public section @@ -29,17 +29,17 @@ open Real namespace Gnomon -/-- Semilla `d=2`: saturación unitaria exacta `cos²(π/3) = 1/4`. -/ +/-- Seed `d=2`: exact unit saturation `cos²(π/3) = 1/4`. -/ theorem semilla_d2 : Real.cos (π / 3) ^ 2 = 1 / 4 := by rw [Real.cos_pi_div_three]; norm_num -/-- Semilla `d=3`: saturación unitaria exacta `cos²(π/4) = 1/2`. -/ +/-- Seed `d=3`: exact unit saturation `cos²(π/4) = 1/2`. -/ theorem semilla_d3 : Real.cos (π / 4) ^ 2 = 1 / 2 := by rw [Real.cos_pi_div_four] rw [div_pow, sq_sqrt (by norm_num : (2:ℝ) ≥ 0)] norm_num -/-- `d=4` no admite saturación unitaria: `cos²(π/5) ≠ 3/4`. -/ +/-- `d=4` does not admit unit saturation: `cos²(π/5) ≠ 3/4`. -/ theorem no_saturacion_d4 : Real.cos (π / 5) ^ 2 ≠ 3 / 4 := by rw [Real.cos_pi_div_five] intro h @@ -47,7 +47,7 @@ theorem no_saturacion_d4 : Real.cos (π / 5) ^ 2 ≠ 3 / 4 := by have hnn : 0 ≤ Real.sqrt 5 := Real.sqrt_nonneg 5 nlinarith [hs, hnn, h] -/-- TEOREMA DE NIVEN (tricotomía de saturación): para `d ≥ 2`, +/-- NIVEN THEOREM (saturation trichotomy): for `d ≥ 2`, `cos²(π/(d+1)) = (d−1)/4 ↔ d ∈ {2,3}`. -/ theorem saturacion_iff (d : ℕ) (hd : 2 ≤ d) : Real.cos (π / (d + 1)) ^ 2 = ((d : ℝ) - 1) / 4 ↔ d = 2 ∨ d = 3 := by @@ -71,14 +71,14 @@ theorem saturacion_iff (d : ℕ) (hd : 2 ≤ d) : · have hc : ((3 : ℕ) : ℝ) + 1 = 4 := by norm_num rw [hc, semilla_d3]; norm_num -/-- La cota unitaria no se repone: para `d ≥ 4` la saturación es imposible. -/ +/-- The unit bound does not recover: for `d ≥ 4` saturation is impossible. -/ theorem no_reposición_saturacion_camino (d : ℕ) (hd : 4 ≤ d) : Real.cos (π / (d + 1)) ^ 2 ≠ ((d : ℝ) - 1) / 4 := by intro h have hsem : d = 2 ∨ d = 3 := (saturacion_iff d (by omega)).mp h omega -/-- Alias citable: las únicas semillas de saturación son `d = 2` y `d = 3`. -/ +/-- Citable alias: the only saturation seeds are `d = 2` and `d = 3`. -/ theorem semillas_niven_unicas (d : ℕ) (hd : 2 ≤ d) : Real.cos (π / (d + 1)) ^ 2 = ((d : ℝ) - 1) / 4 → d = 2 ∨ d = 3 := (saturacion_iff d hd).mp