Skip to content

Twisted Lattices & A Twist for Each Prime ​

This page explains the New.TwistedLattice abstraction (src/New/Reduction/Lattices/TwistedLattice.lean), the height calculus (src/New/Reduction/Lattices/Heights.lean), and the headline product-formula inequality New.TwistedLattice.covolume_add_index_nonneg ("a twist for each prime") that underpins Theorem C in the reduction. Return to the Stage 01 Overview or review how Theorem C balances against Theorems A and B in The Main Inequality & Theorems A and B.

Level 1 · First-Principles

Level 1 — First-Principles ​

Take any nonzero fraction q=a/b written in lowest terms. If you measure its ordinary real size |q| alongside its divisibility by every indivisible whole number greater than 1prime number, those measurements obey a strict conservation law: the ordinary size and all prime-scale sizes multiply to 1, so their logarithms sum to 0. In particular, any nonzero integer has ordinary absolute value at least 1, and any basis of an ordinary integer grid encloses a squared volume of at least 1—you cannot compress independent integer vectors arbitrarily close to zero without forcing a denominator to appear at some prime.

In this proof, however, no single classical integer grid works at every prime simultaneously. The automorphic lifts attached to a fixed level can misbehave at bad primes unless you switch to an auxiliary version of the space whose level avoids that prime. To handle this, the proof replaces a single integer grid with a structure that measures lengths in one fixed standard space while checking divisibility across a family of prime-dependent spacestwisted lattice:

  • At infinity (ordinary size): lengths and volumes are measured once and for all in the single standard space (the "trivial twist" 1), using a rational inner-product matrix so that every symmetry of the two-dimensional number system of real and imaginary partscomplex plane preserves the ruler cleanly. From this standard space we measure the squared n-dimensional volume of a list of vectors, computed as the determinant of their pairwise inner productsGram determinant.
  • At each finite prime ℓ: divisibility is checked across every auxiliary space ("twist") allowed at ℓ. A vector is considered integral at a prime place if its image is integral in all twists allowed at that prime.

Now suppose you have n short, nearly integral vectors y1,…,yn—the vectors produced by Theorems A and B—and you complete them to a full basis of the target space by adjoining n′ remaining vectors z1,…,zn′. How do you force a lower bound on the covolume of y when every prime wants a different twist ξι?

You perform a three-way currency conversion on the basis's Gram determinant at the trivial twist, Gram(1):

  1. Switch from the trivial twist 1 to a prime-specific allowed twist ξι, paying the exact geometric exchange rate Z(1)/Z(ξι) between the two spaces.
  2. Clear the denominators of the n′ completion vectors zi using a scalar γ(ξι), and record the cost of putting that scalar back in.
  3. Clear the near-integrality error ("index") of the n vectors yi using a single prime-level clearing matrix that works simultaneously for every allowed twist at ℓ.

Because inner products pair vectors with their conjugates, the clearing matrix enters twice—once for the embedding and once for its conjugate—giving a factor of 2δ for the index. Applying the global accounting rule balancing a number's ordinary size against its divisibility at every primearithmetic height to all three factors together proves the headline inequality: the ordinary size bound plus twice the index plus the completion and exchange-rate costs must be at least 0.

Three-factor decomposition linking the trivial-twist volume determinant to prime-by-prime twisted determinants through the global conservation law

Where this analogy breaks ​

Describing the exchange rate Z(1)/Z(ξι) as a simple prime-by-prime multiplication hides the core technical subtlety of Heights.lean. The twists ξι and scalars γ(ξι) change from prime to prime, so each individual factor is a family of complex numbers indexed by prime places rather than a single global algebraic number. You cannot apply the product formula directly to a prime-varying family. Instead, arithmetic height wraps each family in a single nonzero global multiplier H whose ordinary size is bounded uniformly across all symmetries of the complex numbers, while H times the local family is bounded at each prime by a local p-adic valuation cap. Multiplying the three families cancels the prime-varying pieces back into the single constant number Gram(1), and only then does the product formula apply to the rational norm of the combined global multiplier H.

Level 2 · Undergrad Bridge

Level 2 — Undergrad Bridge ​

1. Why a single Z-lattice fails, and how New.TwistedLattice splits the roles ​

In a classical geometry-of-numbers argument, a single lattice Λ⊂V supplies both an archimedean inner product (for Hadamard's upper bound on the Gram determinant) and integrality at every prime ℓ (for the lower bound det≥1). In the automorphic setting of Stages 02–07, however, the theta-lift maps Θξ depend on a twist ξ∈T whose conductor must be coprime to ℓ to control ℓ-adic valuations cleanly, while at ∞ we only have sharp size control at the trivial twist ξ=1.

New.TwistedLattice V T (src/New/Reduction/Lattices/TwistedLattice.lean:113-138) axiomatizes exactly this separation:

  • Twisted inner product spaces and lifts: for each ξ∈T, a complex inner product space Space ξ and a C-linear map Θξ=L.lift ξ:V→Space ξ, together with a predicate IsAllowed l ξ specifying which twists are permitted at a prime l.
  • p-adic lattices and conjugate pairing: for each PrimePadicIso ι=(ℓ,ι.iso:C≃+∗Q―ℓ)—inducing the valuation subring Oι=ι.integers={x∈C:∥ι(x)∥≤1} and conjugate isomorphism ι¯(z)=ι(z¯) (PrimePadicIso.conj)—each Space ξ carries an Oι-submodule L.lattice ξ ι. Whenever IsAllowed ι.prime ξ holds, the pairing axiom norm_inner_le_one requires∀φ∈L.lattice ξ ι¯, ∀φ′∈L.lattice ξ ι,∥ι(⟨φ,φ′⟩C)∥≤1.A vector y∈V belongs to L.integralVectors ι if and only if Θξy∈L.lattice ξ ι for every twist ξ allowed at ℓ=ι.prime (mem_integralVectors).
  • Rational coordinates at the trivial twist ξ=1: Space 1 has finite coordinates coord : Space 1 →ₗ[ℂ] Coord → ℂ and a rational matrix gramMatrix : Matrix Coord Coord ℚ whose complexification is positive-definite (posDef_gramMatrix) and represents the inner product (inner_eq):⟨φ,φ′⟩C=(coord φ)∗G(coord φ′),G=L.gramMatrix.map(↑).

2. Index (IndexLe), covolume (CovolumeLe), and volume (Z(ξ)) ​

Index (IndexLe) and why it enters with a factor of 2δ. A square matrix u∈MS(Oι) carries a family y:S→W into an Oι-submodule M with loss a (PrimePadicIso.Carries u y M a) if ∥ι(detu)∥≥ℓ−a and ∑kuikyk∈M for all i. A family y:S→V satisfies L.IndexLe y δ (TwistedLattice.lean:163-168) if there exist e(ℓ)≥0 with ∑ℓ∈Ue(ℓ)log⁡ℓ≤δ for every finite set U of primes, and for every ι∣ℓ a matrix u∈MS(Oι) satisfying ι.Carries u y (L.integralVectors ι) (e ι.prime). Crucially, u depends on ι but is completely independent of the twist ξ, because its target is L.integralVectors ι (the intersection over all twists allowed at ℓ). In practice, IndexLe is established from submodule colength bounds (ColengthDvd M (L.integralVectors ι) (l^j)) via indexLe_of_colengthDvd (which uses inv_pow_le_norm_of_dvd) and assembled across unions by block-diagonal matrices (Carries.fromBlocks, IndexLe.sumElim, indexLe_card_mul).

To see why δ doubles to 2δ, consider any twist ξ allowed at ℓ=ι.prime and any family w with clearing matrices u at ι and u′ at ι¯. Because the Gram matrix entries ⟨Θξwi,Θξwk⟩ are conjugate-linear in the first slot and linear in the second, norm_inner_le_one pairs lattice ξ ι.conj with lattice ξ ι, yielding norm_det_mul_det_gram_le_one:

∥ι¯(detu′)∥⋅∥ι(Gram(ξ))∥⋅∥ι(detu)∥≤1,Gram(ξ):=det(⟨Θξwi,Θξwk⟩).

When w=Sum.elim y z adjoins n′ vectors zi with γΘξzi integral at both ι and ι¯, exists_matrix_elim_mem_lattice forms block-diagonal clearing matrices v=diag(u,γIn′) and v′=diag(u′,γIn′) with detv=(detu)γn′ and detv′=(detu′)γn′. Since both u at ι and u′ at ι¯ satisfy the determinant lower bound ≥ℓ−a=exp⁡(−alog⁡ℓ) (recall ι and ι¯ lie over the same prime ℓ), norm_pow_mul_det_gram_le (TwistedLattice.lean:389-419) rearranges the product into

‖ι((|γ|2)n′Gram(ξ))‖=∥ι¯(γ)∥n′∥ι(Gram(ξ))∥∥ι(γ)∥n′≤exp⁡(2alog⁡ℓ).

Both clearing determinants contribute alog⁡ℓ, doubling δ to 2δ.

Covolume (CovolumeLe), conjugates, Hadamard, and Fischer. For any σ∈Aut(C), write L.conjCoord σ y := σ ∘ L.coord (L.lift 1 y) and L.normSqAt y σ := Re((conjCoord σ y)* G (conjCoord σ y)). A family y:S→V satisfies L.CovolumeLe y c if ∥detformGram(G,conjCoord σ∘y)∥≤exp⁡c for every σ∈Aut(C). Three lemmas make CovolumeLe immediately usable:

  1. Galois conjugates (CovolumeLe.norm_map_det_gram_le): Since G has rational entries, applying σ to ⟨Θ1v,Θ1w⟩ yields map_inner_lift_one:σ⟨Θ1v,Θ1w⟩=(conjCoord (conjAut σ) v)∗G(conjCoord σ w),(conjAut σ)(z):=σ(z¯)―.Cauchy–Schwarz on the exterior power (norm_det_pairing_sq_le) gives |σ(Gram(1))|2≤|detformGram(G,conjCoord(conjAut σ)∘y)|⋅|detformGram(G,conjCoord σ∘y)|≤(exp⁡c)2, hence ∥σ(Gram(1))∥≤exp⁡c for every σ∈Aut(C).
  2. Hadamard's inequality (covolumeLe_of_normSqAt_le): If L.normSqAt (z i) σ ≤ exp h for all i∈Fin n and all σ, then L.CovolumeLe z (n * h).
  3. Fischer's inequality (CovolumeLe.sumElim): If L.CovolumeLe y c and L.CovolumeLe z c', then the block Gram matrix of Sum.elim y z satisfies |detM|≤|detM11|⋅|detM22|≤exp⁡(c+c′), giving L.CovolumeLe (Sum.elim y z) (c + c').

Volume (L.volume ξ). Assuming V is a finite-dimensional complex inner product space, L.volume ξ := (L.lift ξ).normDet ^ 2 (TwistedLattice.lean:336) represents Z(ξ)=det(Θξ∗Θξ), the Gram determinant of the Θξ-images of an orthonormal basis of V. It is nonzero whenever Θξ is injective (volume_ne_zero), and for any basis w of V (finrank ℂ V = n + n'), det_gram_comp gives the basis-factorization identity

Gram(ξ)=Z(ξ)⋅detgramC(w).

3. Heights with a single global multiplier (Heights.lean) and "A Twist for Each Prime" ​

For a family y:PrimePadicIso→C, New.HeightLe c y (src/New/Reduction/Lattices/Heights.lean:45-52) asserts the existence of a single nonzero global multiplier H∈C× (independent of ι), an archimedean bound α∈R, and prime bounds h(ℓ)≥0 such that:

  1. ∥σH∥≤exp⁡α for all σ∈Aut(C),
  2. ∥ι(H⋅yι)∥≤ℓh(ℓ) for all ι∣ℓ, and
  3. α+∑ℓ∈Th(ℓ)log⁡ℓ≤c for every finite set T of primes.

Because H is global while yι may vary with ι, heights compose multiplicatively (HeightLe.mul, HeightLe.pow, HeightLe.prod) even when each prime uses a different twist θ(ι). Applying HeightLe.of_le (taking H=1, α=0) to norm_pow_mul_det_gram_le gives heightLe_pow_mul_det_gram: the family ι↦(|γι|2)n′Gram(θ(ι)) has height at most 2δ.

This prepares the headline theorem New.TwistedLattice.covolume_add_index_nonneg (TwistedLattice.lean:454-485): given injective lifts Θξ, a basis w=Sum.elim y z of V with n+n′=dim⁡V, allowed twists θ(ι) at every ι, covolume bound c and index bound δ for y, nonzero scalars γ(ξ) making γ(ξ)Θξzi integral at every allowed ι, archimedean length bound bshort for z, and height bounds

HeightLe bdenom (ι↦|γ(θι)|−2),HeightLe bvolume (ι↦Z(1)Z(θι)),

we conclude

0≤c+2δ+n′(bshort+bdenom)+bvolume.

The proof is a 20-line chain of three steps:

  1. Exact three-factor decomposition of Gram(1) (h_factor). Since Gram(ξ)=Z(ξ)⋅detgramC(w) with Z(θι)≠0 and |γ(θι)|≠0, the basis determinant cancels identically at every ι:Gram(1)=((|γ(θι)|2)n′Gram(θι))⋅((|γ(θι)|2)−1)n′⋅Z(1)Z(θι).By heightLe_pow_mul_det_gram, hγ.pow n', hZ, and HeightLe.mul, the constant family ι↦Gram(1) has height at most 2δ+n′bdenom+bvolume.
  2. Uniform conjugate bound on Gram(1). Combining hc with Hadamard (covolumeLe_of_normSqAt_le hz_short) via Fischer (CovolumeLe.sumElim) and CovolumeLe.norm_map_det_gram_le yields ∥σ(Gram(1))∥≤exp⁡(c+n′bshort) for every σ∈Aut(C), while linear independence of w and injectivity of Θ1 give Gram(1)≠0.
  3. Product formula via HeightLe.neg_le_of_norm_map_le. Multiplying the constant family Gram(1) by the constant family Gram(1)−1 (which has height ≤c+n′bshort by HeightLe.inv_const) produces HeightLe (c + n' b_short + 2δ + n' b_denom + b_volume) 1. Inside HeightLe.nonneg_of_one (Heights.lean:195-225), uniform 2-adic boundedness of the global multiplier H across all ι:C≃+∗Q―2 forces H to be algebraic over Q (isAlgebraic_of_norm_complexToCp_le). Setting q:=NormQ(H)/Q(H)∈Q× and d:=[Q(H):Q]>0, norm_algebraMap_norm_gen_le bounds log⁡|q|≤dα and log⁡|q|ℓ≤de(ℓ)log⁡ℓ. Applying the rational log_product_formula (log⁡|q|+∑ℓ<Nlog⁡|q|ℓ=0) gives0≤d(c+2δ+n′(bshort+bdenom)+bvolume),and dividing by d>0 completes the proof.
Level 3 · Formal Lean Contract

Level 3 — Formal Lean Contract ​

The extracted Stage 01 skeleton below reproduces the complete public API of src/New/Reduction/Lattices/TwistedLattice.lean (lines 55–485) at pinned upstream commit 41c2716658c42ba08eb0648994a2efe83082a95c (short 41c2716658c4), preserving the exact PrimePadicIso.Carries and New.TwistedLattice structure definitions while replacing proof bodies with deterministic SHA-256 extraction stubs. Together with New.HeightLe and New.log_product_formula in src/New/Reduction/Lattices/Heights.lean, New.TwistedLattice.covolume_add_index_nonneg is the exact interface invoked by Stages 05–07 (New.Determinant.Twist.LongForms) to deduce Theorem C (D.integral_forms_long) for The Main Inequality & Theorems A and B.

Verification status (audit/verification-status.json): Local Lean build verification is unverified-locally (scan_scope: entry, pinned commit 41c2716658c42ba08eb0648994a2efe83082a95c, 0 forbidden tokens in src/Main.lean, 5 expected sorry tokens in root Challenge.lean).

abbrev New.PrimePadicIso.conj — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L55-L56)

lean
/-- The isomorphism `ῑ`, with `ῑ z = ι z̄`. -/
abbrev New.PrimePadicIso.conj : PrimePadicIso := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:55-56 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=de6626dffe41c1b5d910d757ddc2cda5dc70490f29891ea4f953e303aa668f76]

abbrev New.PrimePadicIso.place — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L58-L59)

lean
/-- The embedding `ℂ → ℂ_l` given by `ι ∣ l`. -/
abbrev New.PrimePadicIso.place : PadicPlace ι.prime := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:58-59 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=2d8312ad6b16661b5ad943198494ba6550dd4fa6ad2d11ea533b034ae9e9229d]

abbrev New.PrimePadicIso.integers — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L61-L62)

lean
/-- The valuation ring `𝒪_ι` of the valuation that `ι` induces on `ℂ`. -/
abbrev New.PrimePadicIso.integers : ValuationSubring ℂ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:61-62 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=31cabcccb0a35d8cab8dffa56fca2bc75cc8c302c64a689975594708a86bf0a0]

lemma New.PrimePadicIso.conj_snd_apply — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L64-L64)

lean
lemma New.PrimePadicIso.conj_snd_apply (z : ℂ) : ι.conj.iso z = ι.iso (starRingEnd ℂ z) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:64-64 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=5a633da644c1afc6f5222be040e6a19d687c01104c0263cce32773e07376dfa8]

lemma New.PrimePadicIso.norm_place — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L66-L67)

lean
/-- The embedding `ℂ → ℂ_l` given by `ι ∣ l` induces the same absolute value on `ℂ` as `ι`. -/
lemma New.PrimePadicIso.norm_place (x : ℂ) : ‖ι.place.ιₚ x‖ = ‖ι.iso x‖ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:66-67 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=b14e21b810c76f35ee92ae549198603076d2b41308e65246ec1ab7ca39563794]

lemma New.PrimePadicIso.inv_pow_le_norm_of_dvd — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L69-L75)

lean
/-- Let `ι` consist of the prime `l = ι.prime` and the isomorphism `ι.iso : ℂ ≃ ℚ̄_l`. If `x`
divides `l ^ j` in the valuation ring `𝒪_ι`, then `‖ι x‖ ≥ l ^ (-j)`. -/
lemma New.PrimePadicIso.inv_pow_le_norm_of_dvd {x : ι.integers} {j : ℕ} (hx : x ∣ ((ι.prime : ℕ) : ι.integers) ^ j) :
    (((ι.prime : ℕ) : ℝ) ^ j)⁻¹ ≤ ‖ι.iso (x : ℂ)‖ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:69-75 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=4 body_sha256=42c59b856b4506d6d3986e755e2fdf8ccef045f71f605b11b8e668a34e0f69c2]

structure New.PrimePadicIso.Carries — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L77-L84)

lean
/-- The square matrix `u` over `𝒪_ι` carries the family `y` into `M` with loss `a`: the combinations
`∑ u_ik y_k` lie in `M`, and the valuation of `det u` at `ι` is at most `a`. -/
structure New.PrimePadicIso.Carries {S W : Type} [Fintype S] [DecidableEq S] [AddCommGroup W] [Module ι.integers W]
    (u : Matrix S S ι.integers) (y : S → W) (M : Submodule ι.integers W) (a : ℝ) : Prop where
  /-- `‖ι (det u)‖ ≥ l ^ (-a)`: the valuation of `det u` at `ι ∣ l` is at most `a`. -/
  le_norm_det : ((ι.prime : ℕ) : ℝ) ^ (-a) ≤ ‖ι.iso (u.det : ℂ)‖
  /-- The combinations `∑ u_ik y_k` lie in `M`. -/
  sum_smul_mem (i : S) : ∑ k : S, u i k • y k ∈ M

lemma New.PrimePadicIso.Carries.fromBlocks — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L86-L102)

lean
/-- Let `ι` consist of a prime `l` and an isomorphism `ℂ ≃ ℚ̄_l`, and let `𝒪_ι = ι.integers` be the
ring of complex numbers `x` with `‖ι x‖ ≤ 1`. If `u` carries `y` into `M` with loss `a` and `u'`
carries `y'` into `M` with loss `a'`, then the block diagonal matrix with blocks `u` and `u'`
carries the union of the two families into `M` with loss `a + a'`. -/
lemma New.PrimePadicIso.Carries.fromBlocks {ι : PrimePadicIso} {S S' W : Type} [Fintype S] [Fintype S']
    [DecidableEq S] [DecidableEq S'] [AddCommGroup W] [Module ι.integers W]
    {M : Submodule ι.integers W} {u : Matrix S S ι.integers} {u' : Matrix S' S' ι.integers}
    {y : S → W} {y' : S' → W} {a a' : ℝ}
    (hu : ι.Carries u y M a) (hu' : ι.Carries u' y' M a') :
    ι.Carries (fromBlocks u 0 0 u') (Sum.elim y y') M (a + a') := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:86-102 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=8 body_sha256=68da4a7b7a1886301c2af3dbe5824286eef30066e2f89dbe622e4d8ae764d357]

abbrev New.conjAut — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L106-L107)

lean
/-- The automorphism `σ'` of `ℂ`, with `σ' z = conj (σ (conj z))`. -/
abbrev New.conjAut (σ : ℂ ≃+* ℂ) : ℂ ≃+* ℂ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:106-107 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=a962c946bcdd3523380dbbacd83fb66e986aeea06098f3dd3447920494778e45]

structure New.TwistedLattice — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L109-L138)

lean
/-- A twisted lattice on `V`, with twists `ξ : T` and trivial twist `1`: linear maps `Θ_ξ` to inner
product spaces, in each of them a module of vectors integral at `ι`, such that, if `ξ` is allowed at
the prime of `ι`, products of vectors integral at `ῑ` with vectors integral at `ι` are integral at
`ι`, and coordinates for the trivial twist in which the inner product has a rational matrix. -/
structure New.TwistedLattice (V T : Type) [AddCommGroup V] [Module ℂ V] [One T] where
  /-- The inner product space for the twist `ξ`. -/
  Space : T → Type
  [normedAddCommGroup (ξ : T) : NormedAddCommGroup (Space ξ)]
  [innerProductSpace (ξ : T) : InnerProductSpace ℂ (Space ξ)]
  /-- The map `Θ_ξ`. -/
  lift (ξ : T) : V →ₗ[ℂ] Space ξ
  /-- The twist `ξ` is allowed at the prime `l`. -/
  IsAllowed : ℕ → T → Prop
  /-- The vectors for the twist `ξ` that are integral at `ι`. -/
  lattice (ξ : T) (ι : PrimePadicIso) : Submodule ι.integers (Space ξ)
  /-- For `ξ` allowed at the prime of `ι`, the product of a vector integral at `ῑ` and a vector
  integral at `ι` is integral at `ι`. -/
  norm_inner_le_one {ξ : T} (ι : PrimePadicIso) (hξ : IsAllowed ι.prime ξ) :
    ∀ φ ∈ lattice ξ ι.conj, ∀ φ' ∈ lattice ξ ι, ‖ι.iso ⟪φ, φ'⟫_ℂ‖ ≤ 1
  /-- The set of coordinates on the space for the trivial twist. -/
  Coord : Type
  [fintypeCoord : Fintype Coord]
  /-- The coordinates of a vector. -/
  coord : Space 1 →ₗ[ℂ] Coord → ℂ
  /-- The rational matrix of the inner product in these coordinates. -/
  gramMatrix : Matrix Coord Coord ℚ
  /-- The matrix defines an inner product on all coordinate vectors. -/
  posDef_gramMatrix : (gramMatrix.map (↑) : Matrix Coord Coord ℂ).PosDef
  /-- The inner product is the one induced from coordinate vectors. -/
  inner_eq (φ φ' : Space 1) : ⟪φ, φ'⟫_ℂ = star (coord φ) ⬝ᵥ gramMatrix.map (↑) *ᵥ coord φ'

def New.TwistedLattice.integralVectors — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L148-L152)

lean
/-- The vectors of `V` that are integral at `ι ∣ l`: those `y` for which `Θ_ξ y` is integral at `ι`
for every twist `ξ` allowed at `l`. -/
def New.TwistedLattice.integralVectors (ι : PrimePadicIso) : Submodule ι.integers V := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:148-152 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=1799cc896b40a9d9d78b5f625b62962cc1d0ba5c22c636f420652df60402db1d]

lemma New.TwistedLattice.mem_integralVectors — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L154-L156)

lean
lemma New.TwistedLattice.mem_integralVectors {L : TwistedLattice V T} {ι : PrimePadicIso} {y : V} :
    y ∈ L.integralVectors ι ↔ ∀ ξ : T, L.IsAllowed ι.prime ξ → L.lift ξ y ∈ L.lattice ξ ι := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:154-156 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=b2e74718886c010fdfc4d1151f3ce57fc361c61e7318c7d128ae48024b6ca19d]

def New.TwistedLattice.IndexLe — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L160-L168)

lean
/-- The family `y` has index at most `δ`: there are numbers `δ_l = e l ≥ 0` with `∑ δ_l log l ≤ δ`,
the sum taken over primes, such that for every `ι ∣ l` some matrix over `𝒪_ι` carries the family
into the vectors integral at `ι` with loss `δ_l`. The matrix does not depend on the twist. -/
def New.TwistedLattice.IndexLe (y : S → V) (δ : ℝ) : Prop := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:160-168 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=5 body_sha256=d81bfa501ef945a6ffb9320ed95ea505ce0d8ab335762447319346905b430a7d]

lemma New.TwistedLattice.IndexLe.mono — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L172-L174)

lean
lemma New.TwistedLattice.IndexLe.mono {y : S → V} {δ δ' : ℝ} (hy : L.IndexLe y δ) (hδ : δ ≤ δ') : L.IndexLe y δ' := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:172-174 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=3 body_sha256=1ac302fcde3bbfc9510f509085bc03d4785905de75c569da9a959e31b67272a2]

lemma New.TwistedLattice.IndexLe.of_comp_equiv — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L176-L184)

lean
/-- Let `L` be a twisted lattice on `V`. The index does not depend on the numbering of the family:
if `y ∘ f` has index at most `δ` for a bijection `f`, then so has `y`. -/
lemma New.TwistedLattice.IndexLe.of_comp_equiv {y : S → V} {δ : ℝ} (f : S' ≃ S) (hy : L.IndexLe (y ∘ f) δ) :
    L.IndexLe y δ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:176-184 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=6 body_sha256=78f844e45547a96f13c192bfd09921b41723721a3f0ae2edbf6b45e6edcd5de2]

lemma New.TwistedLattice.indexLe_of_colengthDvd — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L186-L207)

lean
/-- Let `L` be a twisted lattice on `V`, and let `e l ≥ 0` with `∑ e l log l ≤ δ` over every finite
set of primes. Suppose that for every prime `l` and every `ι ∣ l` (so `l = ι.prime`) the family `y`
lies in an `𝒪_ι`-module `M` all of whose finite families are taken into the vectors integral at `ι`
by matrices with determinant dividing `l ^ j` (`New.ColengthDvd`), where `j ≤ e l`. Then `y` has
index at most `δ` (`IndexLe`): for some `δ_l ≥ 0` with `∑ δ_l log l ≤ δ` and each `ι ∣ l`, a matrix
`u` over `𝒪_ι` with `‖ι (det u)‖ ≥ l ^ (-δ_l)` takes `y` into the vectors integral at `ι`. -/
lemma New.TwistedLattice.indexLe_of_colengthDvd {n : ℕ} {y : Fin n → V} {δ : ℝ} {e : ℕ → ℝ}
    (he_nonneg : ∀ l : ℕ, 0 ≤ e l)
    (he_sum : ∀ U : Finset ℕ, (∀ l ∈ U, l.Prime) → ∑ l ∈ U, e l * log l ≤ δ)
    (h_local : ∀ ι : PrimePadicIso, ∃ (j : ℕ) (M : Submodule ι.integers V),
      j ≤ e ι.prime ∧ (∀ i : Fin n, y i ∈ M) ∧ ColengthDvd M (L.integralVectors ι)
        ((ι.prime : ℕ) ^ j)) :
    L.IndexLe y δ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:186-207 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=10 body_sha256=019d9e3f40680ec2e72cb4eea68db247cfba714b9b4e0bff682dab8590def683]

lemma New.TwistedLattice.IndexLe.sumElim — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L209-L219)

lean
/-- Let `L` be a twisted lattice on `V`. If two families have index at most `δ` and `δ'`, then their
union `Sum.elim y y'` has index at most `δ + δ'`. -/
lemma New.TwistedLattice.IndexLe.sumElim {y : S → V} {y' : S' → V} {δ δ' : ℝ} (hy : L.IndexLe y δ)
    (hy' : L.IndexLe y' δ') : L.IndexLe (Sum.elim y y') (δ + δ') := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:209-219 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=8 body_sha256=37ec173327eb0f42a1c9a2eb2345b745162c1df44c267a050814f6efebd3f5ca]

lemma New.TwistedLattice.indexLe_card_mul — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L221-L245)

lean
/-- Let `t` be a finite set of indices, and suppose that for each `s ∈ t` every finite family in the
set `A s ⊆ V` has index at most `δ`. Then a finite family `y` with all its members in the union of
these sets has index at most `#t δ`. -/
lemma New.TwistedLattice.indexLe_card_mul {y : S → V} {δ : ℝ} {κ : Type} {A : κ → Set V} (t : Finset κ)
    (hA : ∀ s ∈ t, ∀ (n : ℕ) (z : Fin n → V), (∀ i : Fin n, z i ∈ A s) → L.IndexLe z δ)
    (hy : ∀ i : S, ∃ s ∈ t, y i ∈ A s) :
    L.IndexLe y (#t * δ) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:221-245 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=19 body_sha256=6f04ff7abee0c3c8d1674181c8a8062884a3f20a2fad8d9234c95e34b17643b2]

def New.TwistedLattice.conjCoord — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L254-L255)

lean
/-- The coordinates of `σ Θ₁ y`: those of `Θ₁ y`, with `σ` applied to each of them. -/
def New.TwistedLattice.conjCoord (σ : ℂ ≃+* ℂ) (y : V) : L.Coord → ℂ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:254-255 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=8901a6f7b4314f98c028603f3f0b75a8a607d5027d4454db4b796ab76e4a66d9]

def New.TwistedLattice.normSqAt — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L257-L260)

lean
/-- The number `‖Θ₁ y‖_σ² = ⟨σ Θ₁ y, σ Θ₁ y⟩`, with the product given by the rational matrix
`L.gramMatrix` on coordinate vectors. -/
def New.TwistedLattice.normSqAt (y : V) (σ : ℂ ≃+* ℂ) : ℝ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:257-260 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=a16f7ed7e5c1a5404f126bcc5c88fc9e2631d588ceac000d2b891fa612dd15a1]

def New.TwistedLattice.CovolumeLe — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L262-L266)

lean
/-- The family `y` has covolume at most `c`: for every automorphism `σ` of `ℂ` the determinant of
the products `⟨σ Θ₁ y_i, σ Θ₁ y_k⟩`, taken by the rational Gram matrix on the coordinate vectors
`L.conjCoord σ (y i)`, has absolute value at most `exp c`. -/
def New.TwistedLattice.CovolumeLe (y : S → V) (c : ℝ) : Prop := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:262-266 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=46779ee3e42fe2502d47a1192e510d6233d1b0df80e43b99c9dd7a2910128fad]

lemma New.TwistedLattice.map_inner_lift_one — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L270-L276)

lean
/-- Since the Gram matrix `L.gramMatrix` is rational, `σ ⟪Θ₁ v, Θ₁ w⟫ = ⟨σ' Θ₁ v, σ Θ₁ w⟩`, where
`Θ₁ = L.lift 1` and `σ' = conjAut σ`, with `σ' z = conj (σ (conj z))`; the right side pairs the
coordinate vectors `L.conjCoord` by the Gram matrix. -/
lemma New.TwistedLattice.map_inner_lift_one (σ : ℂ ≃+* ℂ) (v w : V) :
    σ ⟪L.lift 1 v, L.lift 1 w⟫_ℂ =
      star (L.conjCoord (conjAut σ) v) ⬝ᵥ L.gramMatrix.map (↑) *ᵥ L.conjCoord σ w := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:270-276 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=367b5120918f584b56b00349df53ffa2b8093f79a4d8065b7f0ec97f10d56619]

lemma New.TwistedLattice.CovolumeLe.norm_map_det_gram_le — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L278-L299)

lean
/-- **Gram determinants, conjugates.** Let `L` be a twisted lattice on `V`, with map `Θ₁ = L.lift 1`
for the trivial twist. For an automorphism `τ` of `ℂ`, write `τ Θ₁ v` for the coordinate vector of
`Θ₁ v` with `τ` applied to each coordinate (`conjCoord`); such vectors are paired by the rational
matrix `L.gramMatrix` of the inner product. If `y` has covolume at most `c`, that is,
`|det ⟨τ Θ₁ y_i, τ Θ₁ y_k⟩| ≤ exp c` for all `τ`, then `|σ Gram(1)| ≤ exp c` for every automorphism
`σ`, where `Gram(1) = det ⟨Θ₁ y_i, Θ₁ y_k⟩`. -/
lemma New.TwistedLattice.CovolumeLe.norm_map_det_gram_le {y : S → V} {c : ℝ} (hy : L.CovolumeLe y c) (σ : ℂ ≃+* ℂ) :
    ‖σ (gram ℂ (L.lift 1 ∘ y)).det‖ ≤ exp c := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:278-299 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=15 body_sha256=02f3017834e9ca2c3702b81809b06fef1e2edf9630833eef2a24ae70ea874286]

lemma New.TwistedLattice.covolumeLe_of_normSqAt_le — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L301-L310)

lean
/-- Let `L` be a twisted lattice on `V`, with map `Θ₁ = L.lift 1` for the trivial twist. For an
automorphism `σ` of `ℂ`, apply `σ` to the coordinates of `Θ₁ v` and pair the results by the rational
Gram matrix: `L.normSqAt v σ = ‖Θ₁ v‖_σ²` is the product of such a vector with itself, and a family
has covolume at most `c` (`CovolumeLe`) if for every `σ` the determinant of these products of its
members has absolute value at most `exp c`. If `‖Θ₁ z_i‖_σ² ≤ exp h` for all `i` and `σ`, then
`z_1, …, z_n` has covolume at most `n h`. This is Hadamard's inequality. -/
lemma New.TwistedLattice.covolumeLe_of_normSqAt_le {n : ℕ} {z : Fin n → V} {h : ℝ}
    (hz : ∀ (i : Fin n) (σ : ℂ ≃+* ℂ), L.normSqAt (z i) σ ≤ exp h) :
    L.CovolumeLe z (n * h) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:301-310 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=8195abd389c0b80c67fb4f1f66b7c53186c37bfddc08ee9ad488f8a3fd3e5450]

lemma New.TwistedLattice.CovolumeLe.sumElim — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L312-L325)

lean
/-- **Gram determinants, adjoining vectors.** If two families have covolume at most `c` and
`c'`, their union has covolume at most `c + c'` by Fischer's inequality. -/
lemma New.TwistedLattice.CovolumeLe.sumElim {S' : Type} [Fintype S'] [DecidableEq S']
    {y : S → V} {z : S' → V} {c c' : ℝ} (hy : L.CovolumeLe y c) (hz : L.CovolumeLe z c') :
    L.CovolumeLe (Sum.elim y z) (c + c') := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:312-325 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=10 body_sha256=edae3cf0717eb670961c5db9b3da7a651cd97072f01e71fe0fd0ab56cd160cd0]

def New.TwistedLattice.volume — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L334-L336)

lean
/-- The number `Z(ξ) = det (Θ_ξ* Θ_ξ)`, the Gram determinant of the images of an orthonormal basis
of `V`. -/
def New.TwistedLattice.volume (ξ : T) : ℂ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:334-336 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=e835d6ef1bf83f2c4b71f588ca817b114816db653ebaf2481038afb8e29da9ed]

lemma New.TwistedLattice.volume_ne_zero — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L340-L341)

lean
lemma New.TwistedLattice.volume_ne_zero {ξ : T} (h_inj : Function.Injective (L.lift ξ)) : L.volume ξ ≠ 0 := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:340-341 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=c18f9290dec83b842508fbbfbbde03573f76f8dc3ef568d1b7be9a6dae323d2a]

lemma New.TwistedLattice.norm_det_mul_det_gram_le_one — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L347-L359)

lean
/-- **Gram determinants, valuations.** Let `L` be a twisted lattice on `V` with maps
`Θ_ξ = L.lift ξ`. Let `ι` consist of a prime `l` and an isomorphism `ι.iso : ℂ ≃ ℚ̄_l`, and let
`ῑ z = ι z̄`. Let `ξ` be allowed at `l`. If `u` takes the vectors `Θ_ξ w_i` to vectors integral at
`ι` and `u'` takes them to vectors integral at `ῑ`, then
`‖ι (conj (det u') · Gram(ξ) · det u)‖ ≤ 1`, where `Gram(ξ) = det ⟨Θ_ξ w_i, Θ_ξ w_k⟩`. -/
lemma New.TwistedLattice.norm_det_mul_det_gram_le_one {ι : PrimePadicIso} {ξ : T} (hξ : L.IsAllowed ι.prime ξ)
    {S : Type} [Fintype S] [DecidableEq S] {w : S → V} {u u' : Matrix S S ℂ}
    (hu : ∀ i : S, ∑ k : S, u i k • L.lift ξ (w k) ∈ L.lattice ξ ι)
    (hu' : ∀ i : S, ∑ k : S, u' i k • L.lift ξ (w k) ∈ L.lattice ξ ι.conj) :
    ‖ι.conj.iso u'.det‖ * ‖ι.iso (gram ℂ (L.lift ξ ∘ w)).det‖ * ‖ι.iso u.det‖ ≤ 1 := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:347-359 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=4 body_sha256=39afd8ee8f413468e0b68b92b61629a9265a7f9e0fa2b2b8a3008fd4cc6d7106]

lemma New.TwistedLattice.exists_matrix_elim_mem_lattice — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L361-L381)

lean
/-- Let `L` be a twisted lattice with maps `Θ_ξ = L.lift ξ`, let `ι ∣ l`, and let the twist `ξ` be
allowed at `l`. Let `u` take `y` into `L.integralVectors ι`, and let the vectors `γ Θ_ξ z_i` be
integral at `ι`. Then a matrix `v` with `det v = det u · γ ^ n'` takes
`Θ_ξ y_1, …, Θ_ξ y_n, Θ_ξ z_1, …, Θ_ξ z_n'` to vectors integral at `ι`. -/
lemma New.TwistedLattice.exists_matrix_elim_mem_lattice {n n' : ℕ} {y : Fin n → V} {z : Fin n' → V}
    {ι : PrimePadicIso} {ξ : T} (hξ : L.IsAllowed ι.prime ξ) {u : Matrix (Fin n) (Fin n) ι.integers}
    (hu : ∀ i : Fin n, ∑ k : Fin n, u i k • y k ∈ L.integralVectors ι) {γ : ℂ}
    (hz : ∀ i : Fin n', γ • L.lift ξ (z i) ∈ L.lattice ξ ι) :
    ∃ v : Matrix (Fin n ⊕ Fin n') (Fin n ⊕ Fin n') ℂ,
      v.det = u.det * γ ^ n' ∧
      ∀ i : Fin n ⊕ Fin n',
        ∑ k : Fin n ⊕ Fin n', v i k • L.lift ξ (Sum.elim y z k) ∈ L.lattice ξ ι := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:361-381 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=10 body_sha256=8598b43dcafb57d043d5c75cc2e1739f8a3113a6d462d8a00cc419cc17b32448]

lemma New.TwistedLattice.norm_pow_mul_det_gram_le — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L383-L419)

lean
/-- Let `L` be a twisted lattice with maps `Θ_ξ = L.lift ξ`. Let `l = ι.prime`, so that
`‖ι x‖ = ‖ι.iso x‖` is the `l`-adic absolute value of `x` under `ι.iso : ℂ ≃ ℚ̄_l`, and let
`ῑ z = ι z̄`. Let `ξ` be allowed at `l`, let `u` carry `y` into the vectors integral at `ι` and `u'`
carry `y` into those integral at `ῑ`, both with loss `a`, and let the vectors `γ Θ_ξ z_i` be
integral both at `ι` and at `ῑ`. Then `‖ι (|γ| ^ (2 n') Gram(ξ))‖ ≤ l ^ (2 a)`, where `Gram(ξ)` is
the Gram determinant of the images of `y_1, …, y_n, z_1, …, z_n'` under `Θ_ξ`. -/
lemma New.TwistedLattice.norm_pow_mul_det_gram_le {n n' : ℕ} {y : Fin n → V}
    {z : Fin n' → V} {ι : PrimePadicIso} {ξ : T} (hξ : L.IsAllowed ι.prime ξ) {a : ℝ}
    {u : Matrix (Fin n) (Fin n) ι.integers} {u' : Matrix (Fin n) (Fin n) ι.conj.integers}
    (hu : ι.Carries u y (L.integralVectors ι) a)
    (hu' : ι.conj.Carries u' y (L.integralVectors ι.conj) a) {γ : ℂ}
    (hz : ∀ i : Fin n', γ • L.lift ξ (z i) ∈ L.lattice ξ ι)
    (hz' : ∀ i : Fin n', γ • L.lift ξ (z i) ∈ L.lattice ξ ι.conj) :
    ‖ι.iso (((‖γ‖ : ℂ) ^ 2) ^ n' * (gram ℂ (L.lift ξ ∘ Sum.elim y z)).det)‖ ≤
      exp (2 * (a * log ι.prime)) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:383-419 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=23 body_sha256=4321be08621cfa0cd07cd365eacb974442cbfda78e86ad419d126cd8d18d2e24]

lemma New.TwistedLattice.heightLe_pow_mul_det_gram — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L421-L440)

lean
/-- Let `L` be a twisted lattice with maps `Θ_ξ = L.lift ξ`. Let `y` have index at most `δ`, let
`ξ_ι = θ ι` be allowed at the prime of `ι`, and let the vectors `γ_ι Θ_{ξ_ι} z_i` be integral both
at `ι` and at `ῑ`, where `ῑ z = ι z̄`. Let `Gram(ξ)` be the Gram determinant of the images of
`y_1, …, y_n, z_1, …, z_n'` under `Θ_ξ`. Then the family `x_ι = |γ_ι| ^ (2 n') Gram(ξ_ι)` has height
at most `2 δ` (`New.HeightLe`): for some common `H ≠ 0`, the bounds for `log |σ H|` over
automorphisms `σ` of `ℂ` and for `log ‖ι (H x_ι)‖` at the primes add up to at most `2 δ`. -/
lemma New.TwistedLattice.heightLe_pow_mul_det_gram {n n' : ℕ} {y : Fin n → V} {z : Fin n' → V} {δ : ℝ}
    (hδ : L.IndexLe y δ) {θ : PrimePadicIso → T}
    (hθ : ∀ ι : PrimePadicIso, L.IsAllowed ι.prime (θ ι)) {γ : PrimePadicIso → ℂ}
    (hz : ∀ (ι : PrimePadicIso) (i : Fin n'), γ ι • L.lift (θ ι) (z i) ∈ L.lattice (θ ι) ι)
    (hz' : ∀ (ι : PrimePadicIso) (i : Fin n'), γ ι • L.lift (θ ι) (z i) ∈ L.lattice (θ ι) ι.conj) :
    HeightLe (2 * δ) fun ι : PrimePadicIso ↦
      ((‖γ ι‖ : ℂ) ^ 2) ^ n' * (gram ℂ (L.lift (θ ι) ∘ Sum.elim y z)).det := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:421-440 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=8 body_sha256=7145cfa2562dcdbf2e4a57d70480975bad4e036c0b260b8f429bada851fbee1a]

theorem New.TwistedLattice.covolume_add_index_nonneg — Upstream source (src/New/Reduction/Lattices/TwistedLattice.lean L444-L485)

lean
/-- **A twist for each prime.** Let `L` be a twisted lattice on `V` with maps `Θ_ξ = L.lift ξ`, all
injective. Let `y_1, …, y_n, z_1, …, z_n'` be a basis of `V`, and let `ξ_ι = θ ι` be allowed at the
prime of `ι`. Suppose that
* `y` has covolume at most `c` and index at most `δ`;
* `γ(ξ) ≠ 0`, and `γ(ξ) Θ_ξ z_i` is integral at all `ι ∣ l` for `ξ` allowed at `l`;
* `⟨σ Θ₁ z_i, σ Θ₁ z_i⟩ ≤ exp b_short` for all automorphisms `σ` of `ℂ`;
* the families `|γ(ξ_ι)| ^ (-2)` and `Z(1) / Z(ξ_ι)` have height at most `b_denom` and `b_volume`
  respectively.

Then `c + 2 δ + n' (b_short + b_denom) + b_volume ≥ 0`. -/
theorem New.TwistedLattice.covolume_add_index_nonneg {n n' : ℕ} {y : Fin n → V} {z : Fin n' → V}
    (h_inj : ∀ ξ : T, Function.Injective (L.lift ξ))
    (h_indep : LinearIndependent ℂ (Sum.elim y z)) (h_card : finrank ℂ V = n + n')
    {θ : PrimePadicIso → T} (hθ : ∀ ι : PrimePadicIso, L.IsAllowed ι.prime (θ ι))
    {c δ b_volume b_short b_denom : ℝ} (hc : L.CovolumeLe y c) (hδ : L.IndexLe y δ)
    {γ : T → ℂ} (hγ_ne : ∀ ξ : T, γ ξ ≠ 0)
    (hz_int : ∀ (i : Fin n') (ι : PrimePadicIso) (ξ : T), L.IsAllowed ι.prime ξ →
      γ ξ • L.lift ξ (z i) ∈ L.lattice ξ ι)
    (hz_short : ∀ (i : Fin n') (σ : ℂ ≃+* ℂ), L.normSqAt (z i) σ ≤ exp b_short)
    (hγ : HeightLe b_denom fun ι : PrimePadicIso ↦ ((‖γ (θ ι)‖ : ℂ) ^ 2)⁻¹)
    (hZ : HeightLe b_volume fun ι : PrimePadicIso ↦ L.volume 1 / L.volume (θ ι)) :
    0 ≤ c + 2 * δ + n' * (b_short + b_denom) + b_volume := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Reduction/Lattices/TwistedLattice.lean:444-485 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=21 body_sha256=72085c4de549567c0fa146627de0ac2e9bfd3fdb8f5111cc255cef9622ebec38]

Page Glossary ​

prime number
A whole number greater than 1 whose only positive whole-number divisors are 1 and itself; every integer above 1 factors uniquely into a product of them.
twisted lattice
A family of linear lifts from one complex vector space into inner-product spaces—one per twist—equipped with prime-by-prime integrality lattices so each prime can pick its own allowed twist.
complex plane
The two-dimensional coordinate plane of numbers s = σ + it, where the horizontal coordinate σ = Re(s) sets decay rate and the vertical coordinate t = Im(s) sets oscillation frequency.
Gram determinant
The determinant of the matrix of pairwise inner products of a family of vectors, measuring the squared volume of the parallelotope they span and controlled by Hadamard's and Fischer's inequalities.
arithmetic height
A logarithmic measure combining ordinary archimedean size with prime-by-prime p-adic divisibility, locked together by the product formula so a nonzero algebraic quantity cannot be simultaneously small at every place.