diff --git a/LeanPool/FourExponentials.lean b/LeanPool/FourExponentials.lean new file mode 100644 index 0000000000..9e402d9ed4 --- /dev/null +++ b/LeanPool/FourExponentials.lean @@ -0,0 +1,43 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExpEOrExpESqTranscendental +public import LeanPool.FourExponentials.FourExponentialsTrdegOne +public import LeanPool.FourExponentials.TwoAlgebraicallyIndependentOfExpColumn + +/-! +# The four exponentials theorem in transcendence degree one + +Source: url:https://github.com/carlok/four-exponentials-palomar +Authors: Carlo Perassi +Status: verified +Main declarations: `FourExponentials.four_exponentials_trdeg_one`, + `FourExponentials.Transcendence.exp_e_or_exp_e_sq_transcendental`, + `FourExponentials.two_algebraically_independent_of_exp_column` +Tags: transcendence, four-exponentials, gelfond-criterion, algebraic-independence +MSC: 11J81, 11J85, 68V20 +-/ + +/-! +Ported from `carlok/four-exponentials-palomar` at `8eb91e1` (Apache-2.0). That repository is a +self-contained extract, from `carlok/diaz-modulus-lean` at `465147a`, of the three compared +theorems and their import closure. Palomar registered the headline theorem as +`PALOMAR-2026-11-28-000054` from the separate extract +`carlok/four-exponentials-trdeg-one-lean` at `0c87279`. Claude agents wrote the proofs under the +author's direction, and the Prove2Me platform checked them. The port builds on Lean and Mathlib +v4.36.0 with the pool's linters. It takes Hermite–Lindemann from Tau Ceti instead +of a port of the Lindemann–Weierstrass development of Mathlib pull request #28013, proves the Cauchy +estimate with zeros from Tau Ceti's Schwarz lemma with prescribed zeros, drops the unused modules +of the library, and replaces `import Mathlib` with the imports each file needs. The port renames the +modules, and the namespaces `Diaz` and `Transcendence` to `FourExponentials` and +`FourExponentials.Transcendence`. + +The pool's `SixExponentials` proves the six exponentials theorem of Lang and Ramachandra, which has +no hypothesis on the transcendence degree but needs three exponents in one direction; the four +exponentials theorem here needs only two in each direction, at the cost of the hypothesis that the +four logarithms generate a field of transcendence degree at most one. +-/ diff --git a/LeanPool/FourExponentials/AuxLinearSystem.lean b/LeanPool/FourExponentials/AuxLinearSystem.lean new file mode 100644 index 0000000000..ab3644809b --- /dev/null +++ b/LeanPool/FourExponentials/AuxLinearSystem.lean @@ -0,0 +1,230 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsIteratedDerivReducedPresentation +public import LeanPool.FourExponentials.ExistsPowMulPowLeExpSqMulSqrtLog +public import Mathlib.Algebra.Order.Star.Int +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring + +/-! +# The auxiliary linear system of the four exponentials argument + +Write `φ(P) = P(ω, ω₁)` for `P ∈ ℤ[X][Y]`, `S = ⌊N² / √(log N)⌋`, `t₁ = ⌊N / √(log N)⌋` and +`t₂ = ⌊N √(log N)⌋`. The unknowns are integers `q_{ijkμν}` with `i < S`, `j, k < 2N`, `μ < M`, +`ν < deg Q`, and the auxiliary function is +`F_q(z) = ∑ (∑_{μ,ν} q_{ijkμν} ω^μ ω₁^ν) z^i e^((j x₁ + k x₂) z)`. + +For each point `a y₁ + b y₂` and order `m`, `Λ F_q⁽ᵐ⁾(a y₁ + b y₂) = φ(∑ q_{ijkμν} R_{ijkμν})` +with a nonzero `Λ` and integer polynomials `R_{ijkμν}` of `Y`-degree below `deg Q` that do not +depend on `q`. The equations of the system say that every coefficient of `∑ q_{ijkμν} R_{ijkμν}` +vanishes; then `F_q⁽ᵐ⁾(a y₁ + b y₂) = 0`. With `M = W S` the `X`-degrees stay below `2M`, so there +are at most half as many equations as unknowns; and each coefficient of the system is at most the +length of some `R_{ijkμν}`, hence at most `exp(κ N² √(log N))`. + +From `Diaz/Mirror/aux_linear_system.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.aux_linear_system`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace AuxLinearSystem + +/-- A single integer coefficient of `P ∈ ℤ[X][Y]` is at most its length. -/ +lemma natAbs_coeff_le_length (P : Polynomial (Polynomial ℤ)) (k i : ℕ) : + ((P.coeff k).coeff i).natAbs ≤ + ∑ k ∈ P.support, ∑ i ∈ (P.coeff k).support, ((P.coeff k).coeff i).natAbs := by + by_cases hk : k ∈ P.support + · by_cases hi : i ∈ (P.coeff k).support + · exact (Finset.single_le_sum (f := fun i => ((P.coeff k).coeff i).natAbs) + (fun _ _ => Nat.zero_le _) hi).trans (Finset.single_le_sum + (f := fun k => ∑ i ∈ (P.coeff k).support, ((P.coeff k).coeff i).natAbs) + (fun _ _ => Nat.zero_le _) hk) + · rw [Polynomial.notMem_support_iff.1 hi]; simp + · rw [Polynomial.notMem_support_iff.1 hk]; simp + +end AuxLinearSystem + +open Polynomial + +/-- **The linear system.** Let $x_1,x_2,y_1,y_2\in\mathbb{C}$ have presentation data, and suppose +every $e^{x_iy_j}$ is algebraic. There is $\kappa_1>0$ such that for every large $N$ there are an +integer $M$ with $0 ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * + x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂) = 0 := by + classical + -- The derivatives at the points `a y₁ + b y₂`, as values of polynomials reduced modulo `Q`. + obtain ⟨c, hc⟩ := exists_iteratedDeriv_reduced_presentation x₁ x₂ y₁ y₂ hexp ω ω₁ Q + hQm hQroot D E G H hD hE hG hH + -- `W S` powers of `ω` per unknown leave room for the `X`-degrees of the reduced values. + obtain ⟨W, hW⟩ : ∃ W : ℕ, W = 3 * c + 1 := ⟨_, rfl⟩ + obtain ⟨κ, hκ, hκb⟩ := exists_pow_mul_pow_le_exp_sq_mul_sqrt_log c 2 + refine ⟨W + κ, by positivity, 3, fun N hN => ?_⟩ + have hN3 : 3 ≤ N := by omega + -- The three floors. + have hNr : (3 : ℝ) ≤ N := by exact_mod_cast hN3 + have hL1 : 1 ≤ Real.log N := by + rw [Real.le_log_iff_exp_le (by positivity)] + have := Real.exp_one_lt_d9 + linarith + have hLN : Real.log N ≤ N := by + have := Real.log_le_sub_one_of_pos (by positivity : (0 : ℝ) < N); linarith + have hs1 : 1 ≤ Real.sqrt (Real.log N) := Real.one_le_sqrt.2 hL1 + have hsL : Real.sqrt (Real.log N) ≤ Real.log N := by + have := Real.mul_self_sqrt (by linarith : (0 : ℝ) ≤ Real.log N); nlinarith + have hspos : 0 < Real.sqrt (Real.log N) := by linarith + have hSr : (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) ≤ + (N : ℝ) ^ 2 / Real.sqrt (Real.log N) := Nat.floor_le (by positivity) + have h1r : (⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) ≤ (N : ℝ) / Real.sqrt (Real.log N) := + Nat.floor_le (by positivity) + have h2r : (⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) ≤ (N : ℝ) * Real.sqrt (Real.log N) := + Nat.floor_le (by positivity) + have hS1 : 1 ≤ ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ := by + apply Nat.le_floor + rw [Nat.cast_one, le_div_iff₀ hspos] + nlinarith + have ht : ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ * ⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊ + ≤ N ^ 2 := by + have : (⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) * + ⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊ ≤ (N : ℝ) ^ 2 := by + calc _ ≤ ((N : ℝ) / Real.sqrt (Real.log N)) * ((N : ℝ) * Real.sqrt (Real.log N)) := + mul_le_mul h1r h2r (by positivity) (by positivity) + _ = (N : ℝ) ^ 2 := by field_simp + exact_mod_cast this + generalize ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ = S at hSr hS1 ⊢ + generalize ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ = t₁ at h1r ht ⊢ + generalize ⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊ = t₂ at h2r ht ⊢ + -- The unknowns: `W S` powers of `ω` and `deg Q` powers of `ω₁` per term. + obtain ⟨M, hM⟩ : ∃ M : ℕ, M = W * S := ⟨_, rfl⟩ + -- The reduced values of the unknowns at every point and order. + choose Λ hΛ _hΛn R hRy hRl hRx hRid using fun a b m : ℕ => hc S (2 * N) M a b m + -- The common bound for their `X`-degrees at the orders `m < S`. + obtain ⟨Dx, hDx⟩ : ∃ Dx : ℕ, Dx = M + c * (1 + S + S) := ⟨_, rfl⟩ + have hRx' : ∀ a b m : ℕ, m < S → ∀ i j k μ ν r, + ((R a b m i j k μ ν).coeff r).natDegree ≤ Dx := by + intro a b m hm i j k μ ν r + refine (hRx a b m i j k μ ν r).trans ?_ + rw [hDx] + exact Nat.add_le_add_left (Nat.mul_le_mul_left _ (by omega)) _ + -- The equations: one for each point, order, power of `X` and power of `Y`. + have hcard : Fintype.card (Fin t₁ × Fin t₂ × Fin S × Fin (Dx + 1) × Fin Q.natDegree) = + t₁ * (t₂ * (S * ((Dx + 1) * Q.natDegree))) := by simp + have hDxM : Dx + 1 ≤ 2 * M := by + rw [hDx, hM, hW] + nlinarith [Nat.mul_le_mul_left c hS1] + refine ⟨M, by rw [hM]; exact Nat.mul_pos (by omega) (by omega), ?_, + t₁ * (t₂ * (S * ((Dx + 1) * Q.natDegree))), ?_, + fun e i j k μ ν => (((R ((Fintype.equivFinOfCardEq hcard).symm e).1 + ((Fintype.equivFinOfCardEq hcard).symm e).2.1 ((Fintype.equivFinOfCardEq hcard).symm e).2.2.1 + i j k μ ν).coeff ((Fintype.equivFinOfCardEq hcard).symm e).2.2.2.2).coeff + ((Fintype.equivFinOfCardEq hcard).symm e).2.2.2.1), ?_, ?_⟩ + · -- `M = W S ≤ κ₁ S` + rw [hM]; push_cast + have : (0 : ℝ) ≤ S := by positivity + nlinarith + · -- the number of equations is at most half the number of unknowns + calc 2 * (t₁ * (t₂ * (S * ((Dx + 1) * Q.natDegree)))) + = 2 * (t₁ * t₂) * S * (Dx + 1) * Q.natDegree := by ring + _ ≤ 2 * N ^ 2 * S * (2 * M) * Q.natDegree := by gcongr + _ = S * (2 * N) * (2 * N) * M * Q.natDegree := by ring + · -- each coefficient is at most the length of its reduced value + intro e i j k μ ν + dsimp only + generalize (Fintype.equivFinOfCardEq hcard).symm e = x + obtain ⟨⟨a, ha⟩, ⟨b, hb⟩, ⟨m, hm⟩, ⟨h, hh⟩, ⟨r, hr⟩⟩ := x + change |((((R a b m i j k μ ν).coeff r).coeff h : ℤ) : ℝ)| ≤ _ + rw [← Int.cast_abs, Int.abs_eq_natAbs, Int.cast_natCast] + have hA : (a : ℝ) ≤ ((2 : ℕ) : ℝ) * ((N : ℝ) / Real.sqrt (Real.log (N : ℝ))) := by + have : (a : ℝ) ≤ t₁ := by exact_mod_cast ha.le + have : (0 : ℝ) ≤ (N : ℝ) / Real.sqrt (Real.log (N : ℝ)) := by positivity + push_cast; linarith + have hB : (b : ℝ) ≤ ((2 : ℕ) : ℝ) * ((N : ℝ) * Real.sqrt (Real.log (N : ℝ))) := by + have : (b : ℝ) ≤ t₂ := by exact_mod_cast hb.le + have : (0 : ℝ) ≤ (N : ℝ) * Real.sqrt (Real.log (N : ℝ)) := by positivity + push_cast; linarith + refine (Nat.cast_le.2 ((AuxLinearSystem.natAbs_coeff_le_length _ r h).trans + (hRl a b m i j k μ ν))).trans ?_ + refine (hκb N S (2 * N) a b m hN3 hSr hm.le le_rfl hA hB).trans ?_ + exact Real.exp_le_exp.2 (mul_le_mul_of_nonneg_right (by linarith) (by positivity)) + · -- solutions of the system make the derivatives vanish + intro q hq a b m ha hb hm + have hV : ∑ i : Fin S, ∑ j : Fin (2 * N), ∑ k : Fin (2 * N), ∑ μ : Fin M, + ∑ ν : Fin Q.natDegree, C (C (q i j k μ ν)) * R a b m i j k μ ν = 0 := by + ext r h + simp only [finsetSum_coeff, coeff_C_mul, coeff_zero] + by_cases hr : r < Q.natDegree + · by_cases hh : h < Dx + 1 + · have := hq ((Fintype.equivFinOfCardEq hcard) (⟨a, ha⟩, ⟨b, hb⟩, ⟨m, hm⟩, ⟨h, hh⟩, ⟨r, + hr⟩)) + simp only [Equiv.symm_apply_apply, Fin.val_mk] at this + rw [← this] + refine Finset.sum_congr rfl fun i _ => Finset.sum_congr rfl fun j _ => + Finset.sum_congr rfl fun k _ => Finset.sum_congr rfl fun μ _ => + Finset.sum_congr rfl fun ν _ => mul_comm _ _ + · refine Finset.sum_eq_zero fun i _ => Finset.sum_eq_zero fun j _ => + Finset.sum_eq_zero fun k _ => Finset.sum_eq_zero fun μ _ => + Finset.sum_eq_zero fun ν _ => ?_ + rw [coeff_eq_zero_of_natDegree_lt ((hRx' a b m hm i j k μ ν r).trans_lt (by omega)), + mul_zero] + · refine Finset.sum_eq_zero fun i _ => Finset.sum_eq_zero fun j _ => + Finset.sum_eq_zero fun k _ => Finset.sum_eq_zero fun μ _ => + Finset.sum_eq_zero fun ν _ => ?_ + rw [coeff_eq_zero_of_natDegree_lt ((hRy a b m i j k μ ν).trans_le (by omega)), coeff_zero, + mul_zero] + have h0 := hRid a b m q + rw [hV, eval₂_zero] at h0 + exact (mul_eq_zero.1 h0).resolve_left (hΛ a b m) + +end FourExponentials diff --git a/LeanPool/FourExponentials/AuxLinearSystemColumn.lean b/LeanPool/FourExponentials/AuxLinearSystemColumn.lean new file mode 100644 index 0000000000..8f1b3cb0e7 --- /dev/null +++ b/LeanPool/FourExponentials/AuxLinearSystemColumn.lean @@ -0,0 +1,252 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsPowMulPowLeExpSqMulSqrtLog +public import Mathlib.Algebra.Order.Star.Int +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Algebra.Polynomial.Degree.Operations +public import Mathlib.Algebra.Polynomial.Eval.Defs +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring + +/-! +# The auxiliary linear system, in the column case + +As in `aux_linear_system`, with the reduced presentation of the derivatives as the +hypothesis `hpres`, the conclusion of `exists_iteratedDeriv_reduced_presentation_column`, +whose `X`-degrees are at most `M + c (1 + m + S + T a)`. + +Write `φ(P) = P(ω, ω₁)` for `P ∈ ℤ[X][Y]`, `S = ⌊N² / √(log N)⌋`, `t₁ = ⌊N / √(log N)⌋` and +`t₂ = ⌊N √(log N)⌋`, and take `T = 2 N`. For each point `a y₁ + b y₂` and order `m`, +`Λ F_q⁽ᵐ⁾(a y₁ + b y₂) = φ(∑ q_{ijkμν} R_{ijkμν})` with a nonzero `Λ` and integer polynomials +`R_{ijkμν}` of `Y`-degree below `deg Q` that do not depend on `q`. The equations of the system say +that every coefficient of `∑ q_{ijkμν} R_{ijkμν}` vanishes; then `F_q⁽ᵐ⁾(a y₁ + b y₂) = 0`. + +On the points `a < t₁`, `N (a + 1) ≤ N t₁ ≤ N² / √(log N) < S + 1`, so `T a ≤ 2 S`, and at the +orders `m < S` the `X`-degrees are at most `M + c (1 + 4 S)`. With `M = (5 c + 1) S` they stay +below `2 M`, so there are at most half as many equations as unknowns. Each coefficient of the +system is at most the length of some `R_{ijkμν}`, hence at most `exp(κ N² √(log N))` by +`exists_pow_mul_pow_le_exp_sq_mul_sqrt_log`. + +From `Diaz/Mirror/aux_linear_system_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.aux_linear_system_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace AuxLinearSystemColumn + +/-- A single integer coefficient of `P ∈ ℤ[X][Y]` is at most its length. -/ +theorem aux_linear_system_column_natAbs_coeff_le_length (P : Polynomial (Polynomial ℤ)) (k i : ℕ) : + ((P.coeff k).coeff i).natAbs ≤ + ∑ k ∈ P.support, ∑ i ∈ (P.coeff k).support, ((P.coeff k).coeff i).natAbs := by + by_cases hk : k ∈ P.support + · by_cases hi : i ∈ (P.coeff k).support + · exact (Finset.single_le_sum (f := fun i => ((P.coeff k).coeff i).natAbs) + (fun _ _ => Nat.zero_le _) hi).trans (Finset.single_le_sum + (f := fun k => ∑ i ∈ (P.coeff k).support, ((P.coeff k).coeff i).natAbs) + (fun _ _ => Nat.zero_le _) hk) + · rw [Polynomial.notMem_support_iff.1 hi]; simp + · rw [Polynomial.notMem_support_iff.1 hk]; simp + +end AuxLinearSystemColumn + +open Polynomial + +/-- **The linear system, one algebraic column.** Let $x_1,x_2,y_1,y_2,\omega,\omega_1\in\mathbb{C}$ +and $Q\in\mathbb{Z}[X][Y]$, and suppose that the derivatives of the functions $F_q$ have reduced +presentations as in the conclusion of Lemma . Then the conclusion of Lemma holds, with $d=\deg_YQ$. +-/ +theorem aux_linear_system_column + (x₁ x₂ y₁ y₂ : ℂ) (ω ω₁ : ℂ) (Q : Polynomial (Polynomial ℤ)) + (hpres : ∃ c : ℕ, ∀ S T M a b m : ℕ, ∃ Λ : ℂ, Λ ≠ 0 ∧ + ‖Λ‖ ≤ (c : ℝ) ^ (c * (1 + m + S + T * (a + b))) ∧ + ∃ R : Fin S → Fin T → Fin T → Fin M → Fin Q.natDegree → Polynomial (Polynomial ℤ), + (∀ i j k μ ν, (R i j k μ ν).natDegree < Q.natDegree) ∧ + (∀ i j k μ ν, ∑ r ∈ (R i j k μ ν).support, ∑ h ∈ ((R i j k μ ν).coeff r).support, + (((R i j k μ ν).coeff r).coeff h).natAbs ≤ + c ^ (c * (1 + m + S + T * (a + b))) * (1 + m + S + T + a + b) ^ (c * (1 + m + S))) ∧ + (∀ i j k μ ν r, ((R i j k μ ν).coeff r).natDegree ≤ M + c * (1 + m + S + T * a)) ∧ + ∀ q : Fin S → Fin T → Fin T → Fin M → Fin Q.natDegree → ℤ, + Λ * iteratedDeriv m (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + (∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + ((q i j k μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) * z ^ (i : ℕ) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ + (∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + Polynomial.C (Polynomial.C (q i j k μ ν)) * R i j k μ ν)) : + ∃ κ₁ : ℝ, 0 < κ₁ ∧ ∃ N₀ : ℕ, ∀ N : ℕ, N₀ < N → + ∃ M : ℕ, 0 < M ∧ (M : ℝ) ≤ κ₁ * ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ ∧ ∃ R : ℕ, + 2 * R ≤ ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ * (2 * N) * (2 * N) * M * + Q.natDegree ∧ + ∃ B : Fin R → Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → Fin (2 * N) → Fin (2 * N) → + Fin M → Fin Q.natDegree → ℤ, + (∀ e i j k' μ ν, |((B e i j k' μ ν : ℤ) : ℝ)| ≤ Real.exp (κ₁ * ((N : ℝ) ^ 2 * + Real.sqrt (Real.log (N : ℝ))))) ∧ + ∀ q : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → Fin (2 * N) → Fin (2 * N) → Fin M + → Fin Q.natDegree → ℤ, + (∀ e, ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, ∑ j : Fin (2 * N), + ∑ k' : Fin (2 * N), ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + B e i j k' μ ν * q i j k' μ ν = 0) → + ∀ a b m : ℕ, a < ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ → b < ⌊(N : ℝ) * + Real.sqrt (Real.log (N : ℝ))⌋₊ → m < ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → + iteratedDeriv m (fun z : ℂ => ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * + x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂) = 0 := by + classical + -- The derivatives at the points `a y₁ + b y₂`, as values of polynomials reduced modulo `Q`. + obtain ⟨c, hc⟩ := hpres + -- `W S` powers of `ω` per unknown leave room for the `X`-degrees of the reduced values. + obtain ⟨W, hW⟩ : ∃ W : ℕ, W = 5 * c + 1 := ⟨_, rfl⟩ + obtain ⟨κ, hκ, hκb⟩ := exists_pow_mul_pow_le_exp_sq_mul_sqrt_log c 2 + refine ⟨W + κ, by positivity, 3, fun N hN => ?_⟩ + have hN3 : 3 ≤ N := by omega + -- The three floors. + have hNr : (3 : ℝ) ≤ N := by exact_mod_cast hN3 + have hL1 : 1 ≤ Real.log N := by + rw [Real.le_log_iff_exp_le (by positivity)] + have := Real.exp_one_lt_d9 + linarith + have hLN : Real.log N ≤ N := by + have := Real.log_le_sub_one_of_pos (by positivity : (0 : ℝ) < N); linarith + have hs1 : 1 ≤ Real.sqrt (Real.log N) := Real.one_le_sqrt.2 hL1 + have hsL : Real.sqrt (Real.log N) ≤ Real.log N := by + have := Real.mul_self_sqrt (by linarith : (0 : ℝ) ≤ Real.log N); nlinarith + have hspos : 0 < Real.sqrt (Real.log N) := by linarith + have hSr : (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) ≤ + (N : ℝ) ^ 2 / Real.sqrt (Real.log N) := Nat.floor_le (by positivity) + have hSlo : (N : ℝ) ^ 2 / Real.sqrt (Real.log N) < + (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) + 1 := Nat.lt_floor_add_one _ + have h1r : (⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) ≤ (N : ℝ) / Real.sqrt (Real.log N) := + Nat.floor_le (by positivity) + have h2r : (⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) ≤ (N : ℝ) * Real.sqrt (Real.log N) := + Nat.floor_le (by positivity) + have hS1 : 1 ≤ ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ := by + apply Nat.le_floor + rw [Nat.cast_one, le_div_iff₀ hspos] + nlinarith + have ht : ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ * ⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊ + ≤ N ^ 2 := by + have : (⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) * + ⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊ ≤ (N : ℝ) ^ 2 := by + calc _ ≤ ((N : ℝ) / Real.sqrt (Real.log N)) * ((N : ℝ) * Real.sqrt (Real.log N)) := + mul_le_mul h1r h2r (by positivity) (by positivity) + _ = (N : ℝ) ^ 2 := by field_simp + exact_mod_cast this + generalize ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ = S at hSr hSlo hS1 ⊢ + generalize ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ = t₁ at h1r ht ⊢ + generalize ⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊ = t₂ at h2r ht ⊢ + -- The `X`-degrees grow with `T a = 2 N a`, and `N (a + 1) ≤ N t₁ ≤ N² / √(log N) < S + 1`. + have hNa : ∀ a : ℕ, a < t₁ → 2 * N * a ≤ 2 * S := by + intro a ha + have ha' : (a : ℝ) + 1 ≤ (N : ℝ) / Real.sqrt (Real.log N) := by + have : ((a + 1 : ℕ) : ℝ) ≤ t₁ := by exact_mod_cast Nat.succ_le_of_lt ha + push_cast at this; linarith + have h3 : ((N * a + N : ℕ) : ℝ) < ((S + 1 : ℕ) : ℝ) := by + have h4 : (N : ℝ) * ((a : ℝ) + 1) ≤ (N : ℝ) * ((N : ℝ) / Real.sqrt (Real.log N)) := + mul_le_mul_of_nonneg_left ha' (by positivity) + have h5 : (N : ℝ) * ((N : ℝ) / Real.sqrt (Real.log N)) = + (N : ℝ) ^ 2 / Real.sqrt (Real.log N) := by ring + push_cast; linarith + have h6 : N * a + N < S + 1 := by exact_mod_cast h3 + rw [Nat.mul_assoc]; omega + -- The unknowns: `W S` powers of `ω` and `deg Q` powers of `ω₁` per term. + obtain ⟨M, hM⟩ : ∃ M : ℕ, M = W * S := ⟨_, rfl⟩ + -- The reduced values of the unknowns at every point and order. + choose Λ hΛ _hΛn R hRy hRl hRx hRid using fun a b m : ℕ => hc S (2 * N) M a b m + -- The common bound for their `X`-degrees at the points `a < t₁` and the orders `m < S`. + obtain ⟨Dx, hDx⟩ : ∃ Dx : ℕ, Dx = M + c * (1 + S + S + 2 * S) := ⟨_, rfl⟩ + have hRx' : ∀ a b m : ℕ, a < t₁ → m < S → ∀ i j k μ ν r, + ((R a b m i j k μ ν).coeff r).natDegree ≤ Dx := by + intro a b m ha hm i j k μ ν r + refine (hRx a b m i j k μ ν r).trans ?_ + rw [hDx] + have := hNa a ha + exact Nat.add_le_add_left (Nat.mul_le_mul_left _ (by omega)) _ + -- The equations: one for each point, order, power of `X` and power of `Y`. + have hcard : Fintype.card (Fin t₁ × Fin t₂ × Fin S × Fin (Dx + 1) × Fin Q.natDegree) = + t₁ * (t₂ * (S * ((Dx + 1) * Q.natDegree))) := by simp + have hDxM : Dx + 1 ≤ 2 * M := by + rw [hDx, hM, hW] + nlinarith [Nat.mul_le_mul_left c hS1] + refine ⟨M, by rw [hM]; exact Nat.mul_pos (by omega) (by omega), ?_, + t₁ * (t₂ * (S * ((Dx + 1) * Q.natDegree))), ?_, + fun e i j k μ ν => (((R ((Fintype.equivFinOfCardEq hcard).symm e).1 + ((Fintype.equivFinOfCardEq hcard).symm e).2.1 ((Fintype.equivFinOfCardEq hcard).symm e).2.2.1 + i j k μ ν).coeff ((Fintype.equivFinOfCardEq hcard).symm e).2.2.2.2).coeff + ((Fintype.equivFinOfCardEq hcard).symm e).2.2.2.1), ?_, ?_⟩ + · -- `M = W S ≤ κ₁ S` + rw [hM]; push_cast + have : (0 : ℝ) ≤ S := by positivity + nlinarith + · -- the number of equations is at most half the number of unknowns + calc 2 * (t₁ * (t₂ * (S * ((Dx + 1) * Q.natDegree)))) + = 2 * (t₁ * t₂) * S * (Dx + 1) * Q.natDegree := by ring + _ ≤ 2 * N ^ 2 * S * (2 * M) * Q.natDegree := by gcongr + _ = S * (2 * N) * (2 * N) * M * Q.natDegree := by ring + · -- each coefficient is at most the length of its reduced value + intro e i j k μ ν + dsimp only + generalize (Fintype.equivFinOfCardEq hcard).symm e = x + obtain ⟨⟨a, ha⟩, ⟨b, hb⟩, ⟨m, hm⟩, ⟨h, hh⟩, ⟨r, hr⟩⟩ := x + change |((((R a b m i j k μ ν).coeff r).coeff h : ℤ) : ℝ)| ≤ _ + rw [← Int.cast_abs, Int.abs_eq_natAbs, Int.cast_natCast] + have hA : (a : ℝ) ≤ ((2 : ℕ) : ℝ) * ((N : ℝ) / Real.sqrt (Real.log (N : ℝ))) := by + have : (a : ℝ) ≤ t₁ := by exact_mod_cast ha.le + have : (0 : ℝ) ≤ (N : ℝ) / Real.sqrt (Real.log (N : ℝ)) := by positivity + push_cast; linarith + have hB : (b : ℝ) ≤ ((2 : ℕ) : ℝ) * ((N : ℝ) * Real.sqrt (Real.log (N : ℝ))) := by + have : (b : ℝ) ≤ t₂ := by exact_mod_cast hb.le + have : (0 : ℝ) ≤ (N : ℝ) * Real.sqrt (Real.log (N : ℝ)) := by positivity + push_cast; linarith + refine (Nat.cast_le.2 + ((AuxLinearSystemColumn.aux_linear_system_column_natAbs_coeff_le_length _ r h).trans + (hRl a b m i j k μ ν))).trans ?_ + refine (hκb N S (2 * N) a b m hN3 hSr hm.le le_rfl hA hB).trans ?_ + exact Real.exp_le_exp.2 (mul_le_mul_of_nonneg_right (by linarith) (by positivity)) + · -- solutions of the system make the derivatives vanish + intro q hq a b m ha hb hm + have hV : ∑ i : Fin S, ∑ j : Fin (2 * N), ∑ k : Fin (2 * N), ∑ μ : Fin M, + ∑ ν : Fin Q.natDegree, C (C (q i j k μ ν)) * R a b m i j k μ ν = 0 := by + ext r h + simp only [finsetSum_coeff, coeff_C_mul, coeff_zero] + by_cases hr : r < Q.natDegree + · by_cases hh : h < Dx + 1 + · have := hq ((Fintype.equivFinOfCardEq hcard) (⟨a, ha⟩, ⟨b, hb⟩, ⟨m, hm⟩, ⟨h, hh⟩, ⟨r, + hr⟩)) + simp only [Equiv.symm_apply_apply, Fin.val_mk] at this + rw [← this] + refine Finset.sum_congr rfl fun i _ => Finset.sum_congr rfl fun j _ => + Finset.sum_congr rfl fun k _ => Finset.sum_congr rfl fun μ _ => + Finset.sum_congr rfl fun ν _ => mul_comm _ _ + · refine Finset.sum_eq_zero fun i _ => Finset.sum_eq_zero fun j _ => + Finset.sum_eq_zero fun k _ => Finset.sum_eq_zero fun μ _ => + Finset.sum_eq_zero fun ν _ => ?_ + rw [coeff_eq_zero_of_natDegree_lt ((hRx' a b m ha hm i j k μ ν r).trans_lt (by omega)), + mul_zero] + · refine Finset.sum_eq_zero fun i _ => Finset.sum_eq_zero fun j _ => + Finset.sum_eq_zero fun k _ => Finset.sum_eq_zero fun μ _ => + Finset.sum_eq_zero fun ν _ => ?_ + rw [coeff_eq_zero_of_natDegree_lt ((hRy a b m i j k μ ν).trans_le (by omega)), coeff_zero, + mul_zero] + have h0 := hRid a b m q + rw [hV, eval₂_zero] at h0 + exact (mul_eq_zero.1 h0).resolve_left (hΛ a b m) + +end FourExponentials diff --git a/LeanPool/FourExponentials/AuxiliaryConstruction.lean b/LeanPool/FourExponentials/AuxiliaryConstruction.lean new file mode 100644 index 0000000000..0e093bdbfc --- /dev/null +++ b/LeanPool/FourExponentials/AuxiliaryConstruction.lean @@ -0,0 +1,105 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ConstructionCore1973 +public import LeanPool.FourExponentials.ConstructionCount1973 +public import LeanPool.FourExponentials.ConstructionGrowth +public import LeanPool.FourExponentials.RankOneParametrization +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity + +/-! +# The construction + +Let $l_{11},l_{12},l_{21},l_{22}$ satisfy the hypotheses of Lemma . Then there are a transcendental +$\omega$, functions $\sigma_1,\sigma_2$ and constants $a_1,a_2\ge1$ satisfying the hypotheses of +Theorem , and pairs $x_1,x_2$ and $y_1,y_2$, each linearly independent over $\mathbb{Q}$, with the +following property. For every $C$ and every large $N$ there are natural numbers $S,T,R_1,R_2,S'$, +coefficients $c(i,j,h)\in\mathbb{C}$ ($i0$ such that +* the inequality of Lemma holds, and +* whenever $a0$ such that +* the inequality of Lemma holds, and +* whenever $a ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + c i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) ≠ 0 → + ∃ P : Polynomial ℤ, P ≠ 0 ∧ + (∀ i : ℕ, |(P.coeff i : ℝ)| ≤ Real.exp (σ₁ N)) ∧ + (P.natDegree : ℝ) ≤ σ₂ N ∧ + ‖Polynomial.aeval ω P‖ < Real.exp (-(C * σ₁ N * σ₂ N)) := by + intro l₁₁ l₁₂ l₂₁ l₂₂ e₁₁ e₁₂ e₂₁ e₂₂ n₁₁ n₁₂ n₂₁ n₂₂ hdet htr hrows hcols + obtain ⟨x₁, x₂, y₁, y₂, hx, hy, hexp, htr'⟩ := + rank_one_parametrization l₁₁ l₁₂ l₂₁ l₂₂ e₁₁ e₁₂ e₂₁ e₂₂ n₁₁ n₁₂ n₂₁ n₂₂ hdet htr + hrows hcols + obtain ⟨ω, hω, k, hk, hcore⟩ := construction_core_1973 x₁ x₂ y₁ y₂ hx hy hexp htr' + obtain ⟨hm₁, hm₂, ht₁, ht₂, h21, hg₁, hg₂⟩ := construction_growth k hk + refine ⟨ω, hω, _, _, hm₁, hm₂, ht₁, ht₂, 3, 3, by norm_num, by norm_num, h21, hg₁, hg₂, + x₁, x₂, y₁, y₂, hx, hy, fun C => ?_⟩ + obtain ⟨N₁, hN₁⟩ := hcore C + obtain ⟨N₂, hN₂⟩ := construction_count_1973 (‖x₁‖ + ‖x₂‖) ‖y₁‖ ‖y₂‖ (by positivity) + (norm_nonneg _) (norm_nonneg _) + refine ⟨max N₁ N₂, fun N hN => ?_⟩ + obtain ⟨c, hc, himp⟩ := hN₁ N (lt_of_le_of_lt (le_max_left _ _) hN) + exact ⟨_, _, _, _, _, c, hc, ⟨1 / 20, by norm_num, hN₂ N (lt_of_le_of_lt (le_max_right _ _) hN)⟩, + himp⟩ + +end FourExponentials diff --git a/LeanPool/FourExponentials/AuxiliaryConstructionColumn.lean b/LeanPool/FourExponentials/AuxiliaryConstructionColumn.lean new file mode 100644 index 0000000000..9d908f0a25 --- /dev/null +++ b/LeanPool/FourExponentials/AuxiliaryConstructionColumn.lean @@ -0,0 +1,87 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ConstructionCoreColumn +public import LeanPool.FourExponentials.ConstructionCount1973 +public import LeanPool.FourExponentials.ConstructionGrowth +public import Mathlib.Tactic.FinCases +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity + +/-! +# The auxiliary construction, in the column case + +As in `auxiliary_construction`, without the rank-one parametrization: `x` and `y` are +given. `construction_core_column` gives `ω` and `k > 0`, and for each large `N` an +exponential polynomial whose non-zero derivatives on the 14-fold grid give small integer +polynomials; `construction_growth` gives the growth conditions of +`σ₁ = k N² √(log N)` and `σ₂ = k N² / √(log N)` (glued below `N = 3`) with `a₁ = a₂ = 3`; and +`construction_count_1973` gives the zero-count inequality with `λ = 1/20` on that grid. + +From `Diaz/Mirror/auxiliary_construction_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.auxiliary_construction_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Filter Topology + +/-- **The construction, one algebraic column.** Let $x_1,x_2,y_1,y_2$ satisfy the column hypotheses. +Then there are a transcendental $\omega$, and functions $\sigma_1,\sigma_2$ and constants +$a_1,a_2\ge1$ satisfying the hypotheses of Theorem , such that for every $C$ and every large $N$ +there are natural numbers $S,T,R_1,R_2,S'$, coefficients $c(i,j,h)\in\mathbb{C}$ ($i0$ with the two properties listed in Lemma , for these $x_1,x_2,y_1,y_2$. +-/ +theorem auxiliary_construction_column : + ∀ x₁ x₂ y₁ y₂ : ℂ, LinearIndependent ℚ ![x₁, x₂] → LinearIndependent ℚ ![y₁, y₂] → + IsAlgebraic ℚ (Complex.exp (x₁ * y₂)) → IsAlgebraic ℚ (Complex.exp (x₂ * y₂)) → + Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), + Complex.exp (x₂ * y₁)} : Set ℂ)) ≤ 1 → + ∃ ω : ℂ, Transcendental ℚ ω ∧ + ∃ σ₁ σ₂ : ℝ → ℝ, StrictMono σ₁ ∧ StrictMono σ₂ ∧ + Tendsto σ₁ atTop atTop ∧ Tendsto σ₂ atTop atTop ∧ + ∃ a₁ a₂ : ℝ, 1 ≤ a₁ ∧ 1 ≤ a₂ ∧ + (∀ x : ℝ, 0 < x → σ₂ x ≤ σ₁ x) ∧ + (∀ x : ℝ, 0 < x → σ₁ (x + 1) ≤ a₁ * σ₁ x) ∧ + (∀ x : ℝ, 0 < x → σ₂ (x + 1) ≤ a₂ * σ₂ x) ∧ + ∀ C : ℝ, ∃ N₀ : ℕ, ∀ N : ℕ, N₀ < N → + ∃ (S T R₁ R₂ S' : ℕ) (c : Fin S → Fin T → Fin T → ℂ), (∃ i j k, c i j k ≠ 0) ∧ + (∃ lam : ℝ, 0 < lam ∧ (((S * T * T : ℕ) : ℝ) / lam + + 2 * (1 + ((S * T * T : ℕ) : ℝ) ^ lam) / (lam * Real.log ((S * T * T : ℕ) : ℝ)) + * (1 + ((R₁ : ℝ) * ‖y₁‖ + (R₂ : ℝ) * ‖y₂‖) * ((T : ℝ) * (‖x₁‖ + ‖x₂‖))) + ≤ ((R₁ * R₂ * S' : ℕ) : ℝ))) ∧ + ∀ a b s : ℕ, a < R₁ → b < R₂ → s < S' → + iteratedDeriv s (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + c i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) ≠ 0 → + ∃ P : Polynomial ℤ, P ≠ 0 ∧ + (∀ i : ℕ, |(P.coeff i : ℝ)| ≤ Real.exp (σ₁ N)) ∧ + (P.natDegree : ℝ) ≤ σ₂ N ∧ + ‖Polynomial.aeval ω P‖ < Real.exp (-(C * σ₁ N * σ₂ N)) := by + intro x₁ x₂ y₁ y₂ hx hy h₁₂ h₂₂ htr + -- the column, in the indexing of the construction + have hexp₂ : ∀ i : Fin 2, IsAlgebraic ℚ (Complex.exp (![x₁, x₂] i * y₂)) := by + intro i + fin_cases i + · exact h₁₂ + · exact h₂₂ + obtain ⟨ω, hω, k, hk, hcore⟩ := construction_core_column x₁ x₂ y₁ y₂ hx hy hexp₂ htr + obtain ⟨hm₁, hm₂, ht₁, ht₂, h21, hg₁, hg₂⟩ := construction_growth k hk + refine ⟨ω, hω, _, _, hm₁, hm₂, ht₁, ht₂, 3, 3, by norm_num, by norm_num, h21, hg₁, hg₂, + fun C => ?_⟩ + obtain ⟨N₁, hN₁⟩ := hcore C + obtain ⟨N₂, hN₂⟩ := construction_count_1973 (‖x₁‖ + ‖x₂‖) ‖y₁‖ ‖y₂‖ (by positivity) + (norm_nonneg _) (norm_nonneg _) + refine ⟨max N₁ N₂, fun N hN => ?_⟩ + obtain ⟨c, hc, himp⟩ := hN₁ N (lt_of_le_of_lt (le_max_left _ _) hN) + exact ⟨_, _, _, _, _, c, hc, ⟨1 / 20, by norm_num, hN₂ N (lt_of_le_of_lt (le_max_right _ _) hN)⟩, + himp⟩ + +end FourExponentials diff --git a/LeanPool/FourExponentials/AuxiliaryFunctionAlg.lean b/LeanPool/FourExponentials/AuxiliaryFunctionAlg.lean new file mode 100644 index 0000000000..feca54278a --- /dev/null +++ b/LeanPool/FourExponentials/AuxiliaryFunctionAlg.lean @@ -0,0 +1,89 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.AuxLinearSystem +public import LeanPool.FourExponentials.SiegelAux + +/-! +# The auxiliary function + +Let $x_1,x_2,y_1,y_2\in\mathbb{C}$ have presentation data, and suppose every $e^{x_iy_j}$ is +algebraic. There is $\kappa>0$ such that for every large $N$ there are $M\le\kappa S$ and integers +$q(i,j,h,\mu,\nu)$ ($i0$ such that for every large $N$ there are +$M\le\kappa S$ and integers $q(i,j,h,\mu,\nu)$ ($i ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' ≠ 0) ∧ + (∀ i j k', ‖(fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k'‖ ≤ Real.exp (κ * ((N : ℝ) ^ 2 * + Real.sqrt (Real.log (N : ℝ))))) ∧ + (∀ a b m : ℕ, a < ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ → b < ⌊(N : ℝ) * + Real.sqrt (Real.log (N : ℝ))⌋₊ → m < ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → + iteratedDeriv m (fun z : ℂ => ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * + x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂) = 0) := by + obtain ⟨κ₁, hκ₁, N₁, hsys⟩ := aux_linear_system x₁ x₂ y₁ y₂ hexp ω ω₁ hω Q hQm hQd hQroot hQmin + D E G H hD hE hG hH + obtain ⟨κ, hκle, N₂, hsieg⟩ := siegel_aux ω ω₁ Q hQd hQmin κ₁ hκ₁ + refine ⟨κ, lt_of_lt_of_le hκ₁ hκle, max N₁ N₂, fun N hN => ?_⟩ + obtain ⟨M, hM0, hMle, R, hR, B, hBb, hvan⟩ := hsys N (lt_of_le_of_lt (le_max_left _ _) hN) + obtain ⟨q, hBq, hqb, hc0, hcb⟩ := + hsieg N (lt_of_le_of_lt (le_max_right _ _) hN) M hM0 hMle R hR B hBb + exact ⟨M, hMle.trans (mul_le_mul_of_nonneg_right hκle (Nat.cast_nonneg _)), q, hqb, hc0, hcb, + hvan q hBq⟩ + +end FourExponentials diff --git a/LeanPool/FourExponentials/AuxiliaryFunctionAlgColumn.lean b/LeanPool/FourExponentials/AuxiliaryFunctionAlgColumn.lean new file mode 100644 index 0000000000..fe5f876a97 --- /dev/null +++ b/LeanPool/FourExponentials/AuxiliaryFunctionAlgColumn.lean @@ -0,0 +1,91 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.AuxLinearSystemColumn +public import LeanPool.FourExponentials.SiegelAux + +/-! +# Siegel's auxiliary function, in the column case + +As in `auxiliary_function_alg`, in two steps. + +* `aux_linear_system_column` turns the reduced presentation `hpres` into, for large `N`, + an `M ≤ κ₁ S` and an integer linear system with at most half as many equations as unknowns and + coefficients at most `e^(κ₁ N² √(log N))`, whose solutions make `F_q⁽ᵐ⁾(a y₁ + b y₂)` vanish for + `a < t₁`, `b < t₂`, `m < S`. +* `siegel_aux` solves that system with Siegel's lemma, using the minimality of `Q` for the + non-zero coefficient `c_{ijk} = ∑ q_{ijkμν} ω^μ ω₁^ν`, and bounds `q` and `c` by + `e^(κ N² √(log N))` with `κ ≥ κ₁`. + +Taking `N₀` past both thresholds, the auxiliary_function_alg_column `q` gives the auxiliary +function. + +From `Diaz/Mirror/auxiliary_function_alg_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.auxiliary_function_alg_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +/-- **The auxiliary function, one algebraic column.** Let +$x_1,x_2,y_1,y_2,\omega,\omega_1\in\mathbb{C}$ and $Q\in\mathbb{Z}[X][Y]$ with $d=\deg_YQ\ge1$, such +that no non-zero $A\in\mathbb{Z}[X][Y]$ with $\deg_YA ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + (∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + ((q i j k μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) * z ^ (i : ℕ) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ + (∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + Polynomial.C (Polynomial.C (q i j k μ ν)) * R i j k μ ν)) : + ∃ κ : ℝ, 0 < κ ∧ ∃ N₀ : ℕ, ∀ N : ℕ, N₀ < N → + ∃ M : ℕ, (M : ℝ) ≤ κ * ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ ∧ + ∃ q : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → Fin (2 * N) → Fin (2 * N) → Fin M → + Fin Q.natDegree → ℤ, + (∀ i j k' μ ν, |((q i j k' μ ν : ℤ) : ℝ)| ≤ Real.exp (κ * ((N : ℝ) ^ 2 * + Real.sqrt (Real.log (N : ℝ))))) ∧ + (∃ i j k', (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' ≠ 0) ∧ + (∀ i j k', ‖(fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k'‖ ≤ Real.exp (κ * ((N : ℝ) ^ 2 * + Real.sqrt (Real.log (N : ℝ))))) ∧ + (∀ a b m : ℕ, a < ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ → b < ⌊(N : ℝ) * + Real.sqrt (Real.log (N : ℝ))⌋₊ → m < ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → + iteratedDeriv m (fun z : ℂ => ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * + x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂) = 0) := by + -- the linear system, from the reduced presentation + obtain ⟨κ₁, hκ₁, N₁, hsys⟩ := aux_linear_system_column x₁ x₂ y₁ y₂ ω ω₁ Q hpres + -- Siegel's lemma solves it + obtain ⟨κ, hκle, N₂, hsieg⟩ := siegel_aux ω ω₁ Q hQd hQmin κ₁ hκ₁ + refine ⟨κ, lt_of_lt_of_le hκ₁ hκle, max N₁ N₂, fun N hN => ?_⟩ + obtain ⟨M, hM0, hMle, R, hR, B, hBb, hvan⟩ := hsys N (lt_of_le_of_lt (le_max_left _ _) hN) + obtain ⟨q, hBq, hqb, hc0, hcb⟩ := + hsieg N (lt_of_le_of_lt (le_max_right _ _) hN) M hM0 hMle R hR B hBb + exact ⟨M, hMle.trans (mul_le_mul_of_nonneg_right hκle (Nat.cast_nonneg _)), q, hqb, hc0, hcb, + hvan q hBq⟩ + +end FourExponentials diff --git a/LeanPool/FourExponentials/CauchyEstimateWithZeros.lean b/LeanPool/FourExponentials/CauchyEstimateWithZeros.lean new file mode 100644 index 0000000000..a5819721ba --- /dev/null +++ b/LeanPool/FourExponentials/CauchyEstimateWithZeros.lean @@ -0,0 +1,101 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.Analysis.Complex.Liouville +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set +public import TauCeti.Analysis.Complex.Schwarz + +/-! +# Cauchy's estimate with zeros + +Let $F$ be an entire function, $c\in\mathbb{C}$, $\rho\ge0$ and $R>\rho+1$. Let $S$ be a finite set +of points $z$ with $|z-c|\le\rho$, and put $\sigma=\sum_{z\in S}\operatorname{ord}_zF$. If +$|F(z)|\le M$ whenever $|z-c|=R$, then for every $s\in\mathbb{N}$ +$$ |F^{(s)}(c)|\le s!\,\frac{R}{R-1}\Bigl(\frac{\rho+1}{R-\rho}\Bigr)^{\sigma}M. $$ + +Source: [Wal71, §4, (4.3)]. + +## References + +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. + +The proof divides out the zeros and applies the maximum modulus principle through Tau +Ceti's Schwarz lemma with prescribed zeros, `TauCeti.norm_le_mul_prod_div_pow`. + +From `Diaz/Mirror/cauchy_estimate_with_zeros.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.cauchy_estimate_with_zeros`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Finset Metric + +/-- **Cauchy's estimate with zeros.** Let $F$ be an entire function, $c\in\mathbb{C}$, $\rho\ge0$ +and $R>\rho+1$. Let $S$ be a finite set of points $z$ with $|z-c|\le\rho$, and put +$\sigma=\sum_{z\in S}\operatorname{ord}_zF$. If $|F(z)|\le M$ whenever $|z-c|=R$, then for every +$s\in\mathbb{N}$ +$$ |F^{(s)}(c)|\le s!\,\frac{R}{R-1}\Bigl(\frac{\rho+1}{R-\rho}\Bigr)^{\sigma}M. $$ -/ +theorem cauchy_estimate_with_zeros + (F : ℂ → ℂ) (hF : Differentiable ℂ F) (c : ℂ) (ρ R M : ℝ) (hρ : 0 ≤ ρ) (hR : ρ + 1 < R) + (S : Finset ℂ) (hS : ∀ z ∈ S, ‖z - c‖ ≤ ρ) + (hM : ∀ z : ℂ, ‖z - c‖ = R → ‖F z‖ ≤ M) (s : ℕ) : + ‖iteratedDeriv s F c‖ + ≤ (s.factorial : ℝ) * (R / (R - 1)) * + ((ρ + 1) / (R - ρ)) ^ (∑ z ∈ S, analyticOrderNatAt F z) * M := by + set N := ∑ z ∈ S, analyticOrderNatAt F z with hN + have hR0 : 0 < R := by linarith + have hRρ : 0 < R - ρ := by linarith + have hM0 : 0 ≤ M := (norm_nonneg _).trans (hM (c + R) (by simp [abs_of_pos hR0])) + -- Schwarz's lemma with the zeros of `F` in `S`, read on the unit circle around `c`: every + -- factor `‖z - a‖ / (R - ‖a - c‖)` is at most `(ρ + 1) / (R - ρ)`. + have hFsmall : ∀ z ∈ sphere c 1, ‖F z‖ ≤ ((ρ + 1) / (R - ρ)) ^ N * M := by + intro z hz + rw [mem_sphere_iff_norm] at hz + have hSchwarz := TauCeti.norm_le_mul_prod_div_pow (c := c) (T := R) (M := M) (s := S) + (k := analyticOrderNatAt F) + (fun w _ => hF.analyticAt w) + (fun a _ => by + unfold analyticOrderNatAt + generalize analyticOrderAt F a = x + induction x using ENat.recTopCoe <;> simp) + (fun a ha => by + rw [Finset.mem_coe] at ha + rw [mem_ball_iff_norm] + linarith [hS a ha]) + (fun w hw => hM w (by rwa [mem_sphere_iff_norm] at hw)) + (z := z) (by rw [mem_closedBall_iff_norm, hz]; linarith) + refine hSchwarz.trans ?_ + rw [hN, ← prod_pow_eq_pow_sum, mul_comm M] + refine mul_le_mul_of_nonneg_right (prod_le_prod₀ (fun a ha => ?_) fun a ha => ?_) hM0 + · exact pow_nonneg (div_nonneg (norm_nonneg _) (by linarith [hS a ha])) _ + · have h1 := norm_sub_le (z - c) (a - c) + rw [show z - c - (a - c) = z - a by ring] at h1 + exact pow_le_pow_left₀ (div_nonneg (norm_nonneg _) (by linarith [hS a ha])) + (div_le_div₀ (by linarith) (by linarith [hS a ha]) hRρ (by linarith [hS a ha])) _ + -- Cauchy's estimate on the unit circle; the factor `R / (R - 1) ≥ 1` is slack. + have hC := Complex.norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le s one_pos + hF.diffContOnCl hFsmall + simp only [one_pow, div_one] at hC + have hRR : 1 ≤ R / (R - 1) := by rw [le_div_iff₀ (by linarith)]; linarith + have hK : 0 ≤ ((ρ + 1) / (R - ρ)) ^ N * M := + mul_nonneg (pow_nonneg (div_nonneg (by linarith) hRρ.le) _) hM0 + have hf : (0 : ℝ) ≤ s.factorial := by positivity + calc ‖iteratedDeriv s F c‖ ≤ s.factorial * (((ρ + 1) / (R - ρ)) ^ N * M) := hC + _ = s.factorial * 1 * (((ρ + 1) / (R - ρ)) ^ N * M) := by ring + _ ≤ s.factorial * (R / (R - 1)) * (((ρ + 1) / (R - ρ)) ^ N * M) := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hRR hf) hK + _ = s.factorial * (R / (R - 1)) * ((ρ + 1) / (R - ρ)) ^ N * M := by ring + +end FourExponentials diff --git a/LeanPool/FourExponentials/ConstructionCore1973.lean b/LeanPool/FourExponentials/ConstructionCore1973.lean new file mode 100644 index 0000000000..97266a4964 --- /dev/null +++ b/LeanPool/FourExponentials/ConstructionCore1973.lean @@ -0,0 +1,87 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.AuxiliaryFunctionAlg +public import LeanPool.FourExponentials.Extrapolation +public import LeanPool.FourExponentials.NormToPolynomialAlg +public import LeanPool.FourExponentials.TrdegOnePresentation + +/-! +# The core of the construction + +Let $x_1,x_2$ be linearly independent over $\mathbb{Q}$, and likewise $y_1,y_2$. Suppose every +$e^{x_iy_j}$ is algebraic and $\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}[x_1,x_2,y_1,y_2] \le1$. +Then there are a transcendental $\omega\in\mathbb{C}$ and $k>0$ such that for every $C$ and every +large $N$ there are coefficients $c(i,j,h)$, not all zero, with the following property: whenever +$a0$ such that for every $C$ and every large $N$ there are coefficients +$c(i,j,h)$, not all zero, with the following property: whenever $a ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + c i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) ≠ 0 → + ∃ P : Polynomial ℤ, P ≠ 0 ∧ + (∀ i : ℕ, |(P.coeff i : ℝ)| ≤ Real.exp (k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 * + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ))))) ∧ + (P.natDegree : ℝ) ≤ k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 / + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))) ∧ + ‖Polynomial.aeval ω P‖ < Real.exp (-(C * (k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 * + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ)))) * (k * + (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 / Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 + / Real.sqrt (Real.log (N : ℝ)))))) := by + obtain ⟨ω, ω₁, hω, Q, hQm, hQd, hQroot, hQmin, D, E, G, H, hD, hE, hG, hH⟩ := + trdeg_one_presentation x₁ x₂ y₁ y₂ hx hy hexp htr + obtain ⟨κ, hκ, N₃, h3⟩ := auxiliary_function_alg x₁ x₂ y₁ y₂ hexp ω ω₁ hω Q hQm hQd hQroot hQmin + D E G H hD hE hG hH + obtain ⟨κ', hκ', N₄, h4⟩ := extrapolation x₁ x₂ y₁ y₂ hy κ hκ + obtain ⟨k, hk, h5⟩ := norm_to_polynomial_alg x₁ x₂ y₁ y₂ hexp ω ω₁ hω Q hQm hQd hQroot hQmin + D E G H hD hE hG hH κ κ' hκ hκ' + refine ⟨ω, hω, k, hk, fun C => ?_⟩ + obtain ⟨N₅, h5C⟩ := h5 C + refine ⟨max N₃ (max N₄ N₅), fun N hN => ?_⟩ + obtain ⟨M, hM, q, hq, hc0, hcb, hvan⟩ := h3 N (lt_of_le_of_lt (le_max_left _ _) hN) + refine ⟨_, hc0, fun a b s ha hb hs hne => ?_⟩ + exact h5C N (lt_of_le_of_lt (le_trans (le_max_right _ _) (le_max_right _ _)) hN) M hM q hq + a b s ha hb hs hne + (h4 N (lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_right _ _)) hN) _ hcb hvan s hs a b ha + hb) + +end FourExponentials diff --git a/LeanPool/FourExponentials/ConstructionCoreColumn.lean b/LeanPool/FourExponentials/ConstructionCoreColumn.lean new file mode 100644 index 0000000000..669d6dce46 --- /dev/null +++ b/LeanPool/FourExponentials/ConstructionCoreColumn.lean @@ -0,0 +1,85 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.AuxiliaryFunctionAlgColumn +public import LeanPool.FourExponentials.ExistsIteratedDerivReducedPresentationColumn +public import LeanPool.FourExponentials.Extrapolation +public import LeanPool.FourExponentials.NormToPolynomialAlgColumn +public import LeanPool.FourExponentials.TrdegOnePresentationColumn + +/-! +# The core of the construction, in the column case + +As in `construction_core_1973`, in four steps. + +* `trdeg_one_presentation_column` presents the data over one integral model + `Q(ω, ω₁) = 0`, with `ω` transcendental. +* `exists_iteratedDeriv_reduced_presentation_column` presents the derivatives of the + auxiliary function at the grid points, with `X`-degrees `M + c (1 + m + S + T a)`. Its conclusion + is the hypothesis `hpres` of the Siegel and norm steps. +* `auxiliary_function_alg_column` (Siegel) gives integer unknowns `q` that make the + auxiliary function vanish to order `S` on the grid `t₁ × t₂`, and `extrapolation` makes + its derivatives small on the 14-fold grid. +* `norm_to_polynomial_alg_column` turns a non-zero small derivative into a small integer + polynomial at `ω`. + +From `Diaz/Mirror/construction_core_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.construction_core_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +/-- **The core of the construction, one algebraic column.** If $x_1,x_2,y_1,y_2$ satisfy the column +hypotheses, then the conclusion of Lemma holds. -/ +theorem construction_core_column + (x₁ x₂ y₁ y₂ : ℂ) (hx : LinearIndependent ℚ ![x₁, x₂]) (hy : LinearIndependent ℚ ![y₁, y₂]) + (hexp₂ : ∀ i : Fin 2, IsAlgebraic ℚ (Complex.exp (![x₁, x₂] i * y₂))) + (htr : Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), + Complex.exp (x₂ * y₁)} : Set ℂ)) ≤ 1) : + ∃ ω : ℂ, Transcendental ℚ ω ∧ ∃ k : ℝ, 0 < k ∧ + ∀ C : ℝ, ∃ N₀ : ℕ, ∀ N : ℕ, N₀ < N → + ∃ c : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → Fin (2 * N) → Fin (2 * N) → ℂ, + (∃ i j k', c i j k' ≠ 0) ∧ + ∀ a b s : ℕ, a < (14 * ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊) → b < (14 * ⌊(N : ℝ) * + Real.sqrt (Real.log (N : ℝ))⌋₊) → s < (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ / + 2) → + iteratedDeriv s (fun z : ℂ => ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + c i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) ≠ 0 → + ∃ P : Polynomial ℤ, P ≠ 0 ∧ + (∀ i : ℕ, |(P.coeff i : ℝ)| ≤ Real.exp (k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 * + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ))))) ∧ + (P.natDegree : ℝ) ≤ k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 / + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))) ∧ + ‖Polynomial.aeval ω P‖ < Real.exp (-(C * (k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 * + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ)))) * (k * + (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 / Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 + / Real.sqrt (Real.log (N : ℝ)))))) := by + obtain ⟨ω, ω₁, hω, Q, hQm, hQd, hQroot, hQmin, D, E, G, H, hD, hE, hG, hH⟩ := + trdeg_one_presentation_column x₁ x₂ y₁ y₂ hx hy hexp₂ htr + have hpres := exists_iteratedDeriv_reduced_presentation_column x₁ x₂ y₁ y₂ hexp₂ ω ω₁ + Q hQm hQroot D E G H hD hE hG hH + obtain ⟨κ, hκ, N₃, h3⟩ := + auxiliary_function_alg_column x₁ x₂ y₁ y₂ ω ω₁ Q hQd hQmin hpres + obtain ⟨κ', hκ', N₄, h4⟩ := extrapolation x₁ x₂ y₁ y₂ hy κ hκ + obtain ⟨k, hk, h5⟩ := norm_to_polynomial_alg_column x₁ x₂ y₁ y₂ ω ω₁ Q hQm hQroot + hQmin hpres κ κ' hκ hκ' + refine ⟨ω, hω, k, hk, fun C => ?_⟩ + obtain ⟨N₅, h5C⟩ := h5 C + refine ⟨max N₃ (max N₄ N₅), fun N hN => ?_⟩ + obtain ⟨M, hM, q, hq, hc0, hcb, hvan⟩ := h3 N (lt_of_le_of_lt (le_max_left _ _) hN) + refine ⟨_, hc0, fun a b s ha hb hs hne => ?_⟩ + exact h5C N (lt_of_le_of_lt (le_trans (le_max_right _ _) (le_max_right _ _)) hN) M hM q hq + a b s ha hb hs hne + (h4 N (lt_of_le_of_lt (le_trans (le_max_left _ _) (le_max_right _ _)) hN) _ hcb hvan s hs a b ha + hb) + +end FourExponentials diff --git a/LeanPool/FourExponentials/ConstructionCount1973.lean b/LeanPool/FourExponentials/ConstructionCount1973.lean new file mode 100644 index 0000000000..f776370542 --- /dev/null +++ b/LeanPool/FourExponentials/ConstructionCount1973.lean @@ -0,0 +1,364 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.Complex.ExponentialBounds +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring + +/-! +# The parameters beat the zero count + +Let $X,Y_1,Y_2\ge0$. There is $N_0$ such that for every integer $N>N_0$, with $T=2N$, $\lambda=1/20$ +and $n=ST^{2}$, +$$ \frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log n}\bigl(1+(R_1Y_1+R_2Y_2)\,TX\bigr)\le +R_1R_2S'. $$ + +Source: The parameters of [Wal73, (4) and Lemme 6] against the zero estimate [Wal71, §4, Lemme 3]. + +## References + +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. +* [Wal73] M. Waldschmidt, *Solution du huitième problème de Schneider*, J. Number Theory 5 (1973), + 191–202. + +From `Diaz/Mirror/construction_count_1973.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.construction_count_1973`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace FourExpCount + +/-- The counting inequality, as pure algebra. `S`, `t₁`, `t₂`, `d`, `T` stand for the +floor quantities, and `W` for `X(Y₁+Y₂)`. -/ +lemma count_core (N q S t₁ t₂ d T W : ℝ) (hW : 0 ≤ W) (hq : 40 * (1 + 28 * W) ≤ q) + (hqN : q ^ 2 ≤ N) (hN : 84 ≤ N) (_hS1 : S * q ≤ N ^ 2) (hS2 : N ^ 2 ≤ (S + 1) * q) + (hSone : 1 ≤ S) (ht1 : N - q ≤ q * t₁) (ht2 : N * q - 1 ≤ t₂) (ht1n : 0 ≤ t₁) + (ht2n : 0 ≤ t₂) (hd : S - 1 ≤ 2 * d) (_hdn : 0 ≤ d) (_hTn : 0 ≤ T) + (hT : T * q ^ 2 ≤ 40 * (1 + 28 * W) * N ^ 4) : + 80 * N ^ 2 * S + T ≤ 196 * (t₁ * t₂ * d) := by + have hq7 : (7:ℝ) ≤ q := by nlinarith + have hqpos : (0:ℝ) < q := by linarith + have hNpos : (0:ℝ) < N := by linarith + have hqle : q ≤ N := by nlinarith + -- the product of the two grid sizes + have hNq1 : (0:ℝ) ≤ N * q - 1 := by nlinarith + have hP1 : (N - q) * (N * q - 1) ≤ q * t₁ * t₂ := + mul_le_mul ht1 ht2 hNq1 (by nlinarith) + -- the polynomial comparison + have hP2 : 82 * N ^ 2 * q ≤ 98 * ((N - q) * (N * q - 1)) := by + nlinarith [mul_le_mul_of_nonneg_left hqN (by positivity : (0:ℝ) ≤ 98 * N), + sq_nonneg (N - q), mul_pos hNpos hqpos] + -- the slack that absorbs the second term + have hstep6 : T + 82 * N ^ 2 ≤ 2 * N ^ 2 * S := by + have h1 : T * q ^ 2 ≤ q * N ^ 4 := by + have := mul_le_mul_of_nonneg_right hq (by positivity : (0:ℝ) ≤ N ^ 4) + nlinarith + have h2 : 2 * N ^ 2 * (N ^ 2 - q) ≤ 2 * N ^ 2 * (S * q) := by + refine mul_le_mul_of_nonneg_left ?_ (by positivity) + linarith + have h3 : 84 * q ≤ N ^ 2 := by nlinarith + have h4 : T * q ^ 2 + 82 * N ^ 2 * q ^ 2 ≤ 2 * N ^ 2 * S * q ^ 2 := by + nlinarith [mul_le_mul_of_nonneg_left h3 (by positivity : (0:ℝ) ≤ N ^ 2 * q)] + have hq2 : (0:ℝ) < q ^ 2 := by positivity + nlinarith + -- chain everything through one factor of `q` + have hchain : q * (80 * N ^ 2 * S + T) ≤ q * (196 * (t₁ * t₂ * d)) := by + have e1 : 98 * (t₁ * t₂) * (S - 1) ≤ 196 * (t₁ * t₂ * d) := by + have := mul_le_mul_of_nonneg_left hd (by positivity : (0:ℝ) ≤ 98 * (t₁ * t₂)) + nlinarith + have e2 : 98 * ((N - q) * (N * q - 1)) * (S - 1) ≤ q * (98 * (t₁ * t₂) * (S - 1)) := by + have h := mul_le_mul_of_nonneg_right hP1 (by linarith : (0:ℝ) ≤ 98 * (S - 1)) + nlinarith + have e3 : 82 * N ^ 2 * q * (S - 1) ≤ 98 * ((N - q) * (N * q - 1)) * (S - 1) := by + have := mul_le_mul_of_nonneg_right hP2 (by linarith : (0:ℝ) ≤ S - 1) + nlinarith + have e4 : q * (80 * N ^ 2 * S + T) ≤ 82 * N ^ 2 * q * (S - 1) := by + have := mul_le_mul_of_nonneg_left hstep6 hqpos.le + nlinarith + calc q * (80 * N ^ 2 * S + T) ≤ 82 * N ^ 2 * q * (S - 1) := e4 + _ ≤ 98 * ((N - q) * (N * q - 1)) * (S - 1) := e3 + _ ≤ q * (98 * (t₁ * t₂) * (S - 1)) := e2 + _ ≤ q * (196 * (t₁ * t₂ * d)) := by + exact mul_le_mul_of_nonneg_left e1 hqpos.le + exact le_of_mul_le_mul_left hchain hqpos + +open Real in +lemma rpow_U_le {U : ℕ} {N : ℝ} (hN : 2 ≤ N) (hU : (U : ℝ) ≤ N ^ (20 : ℕ)) : + ((U : ℝ)) ^ (1 / 20 : ℝ) ≤ N := by + have hNpos : (0:ℝ) < N := by linarith + calc ((U : ℝ)) ^ (1 / 20 : ℝ) ≤ (N ^ (20:ℕ)) ^ (1 / 20 : ℝ) := + Real.rpow_le_rpow (by positivity) hU (by norm_num) + _ = N := by + rw [← Real.rpow_natCast N 20, ← Real.rpow_mul hNpos.le] + norm_num + +lemma nat_div_two_ge (S : ℕ) : (S : ℝ) - 1 ≤ 2 * ((S / 2 : ℕ) : ℝ) := by + have h : S ≤ 2 * (S / 2) + 1 := by omega + have : (S : ℝ) ≤ 2 * ((S / 2 : ℕ) : ℝ) + 1 := by exact_mod_cast h + linarith + +lemma q_facts (N : ℕ) (hN : 84 ≤ N) : + 1 ≤ Real.sqrt (Real.log (N:ℝ)) ∧ Real.sqrt (Real.log (N:ℝ)) ^ 2 ≤ (N:ℝ) ∧ + 0 < Real.log (N:ℝ) ∧ Real.sqrt (Real.log (N:ℝ)) ≤ (N:ℝ) ∧ + Real.sqrt (Real.log (N:ℝ)) * Real.sqrt (Real.log (N:ℝ)) = Real.log (N:ℝ) := by + have hNr : (84:ℝ) ≤ (N:ℝ) := by exact_mod_cast hN + have hNpos : (0:ℝ) < (N:ℝ) := by linarith + have hlog : 1 ≤ Real.log (N:ℝ) := by + rw [show (1:ℝ) = Real.log (Real.exp 1) by simp] + refine (Real.log_le_log (Real.exp_pos 1) ?_) + have := Real.exp_one_lt_d9; linarith + have hqq : Real.sqrt (Real.log (N:ℝ)) * Real.sqrt (Real.log (N:ℝ)) = Real.log (N:ℝ) := + Real.mul_self_sqrt (by linarith) + have hq1 : 1 ≤ Real.sqrt (Real.log (N:ℝ)) := Real.one_le_sqrt.2 hlog + have hlogle : Real.log (N:ℝ) ≤ (N:ℝ) := by + have := Real.log_le_sub_one_of_pos hNpos; linarith + refine ⟨hq1, ?_, by linarith, ?_, hqq⟩ + · rw [sq, hqq]; exact hlogle + · nlinarith + +lemma S_facts (N : ℕ) (hN : 84 ≤ N) : + (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) * Real.sqrt (Real.log (N:ℝ)) ≤ (N:ℝ) ^ 2 ∧ + (N:ℝ) ^ 2 ≤ ((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) + 1) * Real.sqrt (Real.log (N:ℝ)) + ∧ + 1 ≤ (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) ∧ + (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) ≤ (N:ℝ) ^ 2 := by + obtain ⟨hq1, hq2, hlogpos, hqN, hqq⟩ := q_facts N hN + have hNr : (84:ℝ) ≤ (N:ℝ) := by exact_mod_cast hN + have hqpos : (0:ℝ) < Real.sqrt (Real.log (N:ℝ)) := by linarith + refine ⟨?_, ?_, ?_, ?_⟩ + · rw [← le_div_iff₀ hqpos]; exact Nat.floor_le (by positivity) + · rw [← div_le_iff₀ hqpos] + exact (Nat.lt_floor_add_one ((N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ)))).le + · have h : 1 ≤ ⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ := by + refine (Nat.one_le_floor_iff _).2 ?_ + rw [le_div_iff₀ hqpos]; nlinarith + exact_mod_cast h + · refine (Nat.floor_le (by positivity)).trans ?_ + rw [div_le_iff₀ hqpos]; nlinarith + +lemma t_facts (N : ℕ) (hN : 84 ≤ N) : + (N:ℝ) - Real.sqrt (Real.log (N:ℝ)) + ≤ Real.sqrt (Real.log (N:ℝ)) * (⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) ∧ + (N:ℝ) * Real.sqrt (Real.log (N:ℝ)) - 1 ≤ (⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) ∧ + (⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) ≤ (N:ℝ) ∧ + (⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) ≤ (N:ℝ) ^ 2 := by + obtain ⟨hq1, hq2, hlogpos, hqN, hqq⟩ := q_facts N hN + have hNr : (84:ℝ) ≤ (N:ℝ) := by exact_mod_cast hN + have hqpos : (0:ℝ) < Real.sqrt (Real.log (N:ℝ)) := by linarith + refine ⟨?_, ?_, ?_, ?_⟩ + · have h := (Nat.lt_floor_add_one ((N:ℝ) / Real.sqrt (Real.log (N:ℝ)))).le + rw [div_le_iff₀ hqpos] at h + nlinarith + · have := (Nat.lt_floor_add_one ((N:ℝ) * Real.sqrt (Real.log (N:ℝ)))).le + linarith + · refine (Nat.floor_le (by positivity)).trans ?_ + rw [div_le_iff₀ hqpos]; nlinarith + · refine (Nat.floor_le (by positivity)).trans ?_ + nlinarith + +lemma U_facts (N : ℕ) (hN : 84 ≤ N) : + ((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ) + = 4 * (N:ℝ) ^ 2 * (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) ∧ + (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ)) ^ (1 / 20 : ℝ) ≤ + (N:ℝ) ∧ + 2 * Real.log (N:ℝ) + ≤ Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ)) := by + obtain ⟨hq1, hq2, hlogpos, hqN, hqq⟩ := q_facts N hN + obtain ⟨hS1, hS2, hSone, hSN2⟩ := S_facts N hN + have hNr : (84:ℝ) ≤ (N:ℝ) := by exact_mod_cast hN + have hNpos : (0:ℝ) < (N:ℝ) := by linarith + have hUeq : ((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ) + = 4 * (N:ℝ) ^ 2 * (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) := by push_cast; ring + have hUN2 : (N:ℝ) ^ 2 ≤ ((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ) + := by + rw [hUeq]; nlinarith + refine ⟨hUeq, ?_, ?_⟩ + · refine rpow_U_le (by linarith) ?_ + rw [hUeq] + have h4 : 4 * (N:ℝ) ^ 2 * (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) ≤ 4 * (N:ℝ) ^ 4 := by + nlinarith [sq_nonneg (N:ℝ)] + have h5 : 4 * (N:ℝ) ^ 4 ≤ (N:ℝ) ^ 5 := by nlinarith [pow_nonneg hNpos.le 4] + have h20 : (N:ℝ) ^ 5 ≤ (N:ℝ) ^ (20:ℕ) := pow_le_pow_right₀ (by linarith) (by norm_num) + linarith + · have h1 : Real.log ((N:ℝ) ^ 2) + ≤ Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ)) := + Real.log_le_log (by positivity) hUN2 + rwa [Real.log_pow] at h1 + +lemma Z_bound (N : ℕ) (X Y₁ Y₂ : ℝ) (hX : 0 ≤ X) (hY₁ : 0 ≤ Y₁) (hY₂ : 0 ≤ Y₂) (hN : 84 ≤ N) : + ((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * ((((2 * N) : ℕ) : ℝ) * X) + ≤ 28 * (N:ℝ) ^ 3 * (X * (Y₁ + Y₂)) := by + obtain ⟨ht1, ht2, ht1u, ht2u⟩ := t_facts N hN + have hNr : (84:ℝ) ≤ (N:ℝ) := by exact_mod_cast hN + have e1 : (((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) ≤ 14 * (N:ℝ) ^ 2 := by + push_cast; nlinarith + have e2 : (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) ≤ 14 * (N:ℝ) ^ 2 := by + push_cast; nlinarith + have e3 : ((((2 * N) : ℕ) : ℝ) * X) = 2 * (N:ℝ) * X := by push_cast; ring + rw [e3] + have hsum : (((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂ + ≤ 14 * (N:ℝ) ^ 2 * Y₁ + 14 * (N:ℝ) ^ 2 * Y₂ := by + have a1 := mul_le_mul_of_nonneg_right e1 hY₁ + have a2 := mul_le_mul_of_nonneg_right e2 hY₂ + linarith + have h1 : (0:ℝ) ≤ 2 * (N:ℝ) * X := by positivity + calc ((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * (2 * (N:ℝ) * X) + ≤ (14 * (N:ℝ) ^ 2 * Y₁ + 14 * (N:ℝ) ^ 2 * Y₂) * (2 * (N:ℝ) * X) := + mul_le_mul_of_nonneg_right hsum h1 + _ = 28 * (N:ℝ) ^ 3 * (X * (Y₁ + Y₂)) := by ring + +lemma T_bound (L u Z W N : ℝ) (hN : 84 ≤ N) (hL : 2 * Real.log N ≤ L) (hu : u ≤ N) (_hu0 : 0 ≤ u) + (hZ : Z ≤ 28 * N ^ 3 * W) (hZ0 : 0 ≤ Z) (_hW : 0 ≤ W) (hlogN : 0 < Real.log N) : + 2 * (1 + u) / ((1 / 20 : ℝ) * L) * (1 + Z) * Real.log N ≤ 40 * (1 + 28 * W) * N ^ 4 := by + have hLpos : 0 < L := by linarith + have hA : 2 * (1 + u) / ((1 / 20 : ℝ) * L) * Real.log N ≤ 40 * N := by + rw [div_mul_eq_mul_div, div_le_iff₀ (by positivity)] + nlinarith + calc 2 * (1 + u) / ((1 / 20 : ℝ) * L) * (1 + Z) * Real.log N + = (2 * (1 + u) / ((1 / 20 : ℝ) * L) * Real.log N) * (1 + Z) := by ring + _ ≤ (40 * N) * (1 + Z) := mul_le_mul_of_nonneg_right hA (by linarith) + _ ≤ (40 * N) * (1 + 28 * N ^ 3 * W) := by nlinarith + _ ≤ 40 * (1 + 28 * W) * N ^ 4 := by + have hN4 : N ≤ N ^ 4 := by + calc N = N ^ 1 := by ring + _ ≤ N ^ 4 := pow_le_pow_right₀ (by linarith) (by norm_num) + nlinarith [hN4] + +end FourExpCount + +/-- **The parameters beat the zero count.** Let $X,Y_1,Y_2\ge0$. There is $N_0$ such that for every +integer $N>N_0$, with $T=2N$, $\lambda=1/20$ and $n=ST^{2}$, +$$ \frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log n}\bigl(1+(R_1Y_1+R_2Y_2)\,TX\bigr)\le +R_1R_2S'. $$ -/ +theorem construction_count_1973 (X Y₁ Y₂ : ℝ) (hX : 0 ≤ X) (hY₁ : 0 ≤ Y₁) (hY₂ : 0 ≤ Y₂) : + ∃ N₀ : ℕ, ∀ N : ℕ, N₀ < N → + ((((⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊) * (2 * N) * (2 * N) : ℕ) : ℝ) / (1 / + 20 : ℝ) + + 2 * (1 + (((⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊) * (2 * N) * (2 * + N) : ℕ) : ℝ) ^ (1 / 20 : ℝ)) / ((1 / 20 : ℝ) * Real.log ((((⌊(N : ℝ) ^ 2 / + Real.sqrt (Real.log (N : ℝ))⌋₊) * (2 * N) * (2 * N) : ℕ) : ℝ))) + * (1 + (((14 * ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊) : ℕ) * Y₁ + ((14 * + ⌊(N : ℝ) * Real.sqrt (Real.log (N : ℝ))⌋₊) : ℕ) * Y₂) * (((2 * N) : ℕ) * X)) + ≤ ((((14 * ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊)) * ((14 * ⌊(N : ℝ) * + Real.sqrt (Real.log (N : ℝ))⌋₊)) * (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ / + 2) : ℕ) : ℝ)) := by + classical + obtain ⟨W, hWdef⟩ : ∃ W : ℝ, W = X * (Y₁ + Y₂) := ⟨_, rfl⟩ + have hW0 : 0 ≤ W := by rw [hWdef]; positivity + refine ⟨max 84 ⌈Real.exp ((40 * (1 + 28 * W)) ^ 2)⌉₊, fun N hN => ?_⟩ + have hN84 : 84 ≤ N := by omega + have hN84r : (84:ℝ) ≤ (N:ℝ) := by exact_mod_cast hN84 + obtain ⟨hq1, hq2, hlogpos, hqN, hqq⟩ := FourExpCount.q_facts N hN84 + obtain ⟨hS1, hS2, hSone, hSN2⟩ := FourExpCount.S_facts N hN84 + obtain ⟨ht1, ht2, ht1u, ht2u⟩ := FourExpCount.t_facts N hN84 + obtain ⟨hUeq, hrp, hlogU⟩ := FourExpCount.U_facts N hN84 + have hZ := FourExpCount.Z_bound N X Y₁ Y₂ hX hY₁ hY₂ hN84 + rw [← hWdef] at hZ + have hQ : 40 * (1 + 28 * W) ≤ Real.sqrt (Real.log (N:ℝ)) := by + have hbig : Real.exp ((40 * (1 + 28 * W)) ^ 2) ≤ (N:ℝ) := by + have h1 := Nat.le_ceil (Real.exp ((40 * (1 + 28 * W)) ^ 2)) + have h2 : ⌈Real.exp ((40 * (1 + 28 * W)) ^ 2)⌉₊ ≤ N := by omega + have h3 : (⌈Real.exp ((40 * (1 + 28 * W)) ^ 2)⌉₊ : ℝ) ≤ (N:ℝ) := by exact_mod_cast h2 + linarith + have hlogbig : (40 * (1 + 28 * W)) ^ 2 ≤ Real.log (N:ℝ) := by + rw [← Real.log_exp ((40 * (1 + 28 * W)) ^ 2)] + exact Real.log_le_log (Real.exp_pos _) hbig + rw [show (40 * (1 + 28 * W) : ℝ) = Real.sqrt ((40 * (1 + 28 * W)) ^ 2) by + rw [Real.sqrt_sq (by positivity)]] + exact Real.sqrt_le_sqrt hlogbig + have hZ0 : (0:ℝ) ≤ ((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * ((((2 * N) : ℕ) : ℝ) * X) + := by + have h1 : (0:ℝ) ≤ (((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) := Nat.cast_nonneg _ + have h2 : (0:ℝ) ≤ (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) := Nat.cast_nonneg _ + have h3 : (0:ℝ) ≤ (((2 * N) : ℕ) : ℝ) := Nat.cast_nonneg _ + have := mul_nonneg h1 hY₁ + have := mul_nonneg h2 hY₂ + have := mul_nonneg h3 hX + positivity + have hrp0 : (0:ℝ) ≤ (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ)) ^ (1 / 20 : ℝ) := + Real.rpow_nonneg (Nat.cast_nonneg _) _ + have hTq := FourExpCount.T_bound + (Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ))) + ((((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ)) ^ (1 / 20 : ℝ)) + (((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * ((((2 * N) : ℕ) : ℝ) * X)) + W (N:ℝ) hN84r hlogU hrp hrp0 hZ hZ0 hW0 hlogpos + have hTn : (0:ℝ) ≤ 2 * (1 + (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ)) ^ (1 / 20 : ℝ)) + / ((1 / 20 : ℝ) * Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ))) + * (1 + ((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * ((((2 * N) : ℕ) : ℝ) * + X)) := by + have hL : (0:ℝ) < Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ)) := by + linarith + positivity + have hTq' : (2 * (1 + (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ)) ^ (1 / 20 : ℝ)) + / ((1 / 20 : ℝ) * Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ))) + * (1 + ((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * ((((2 * N) : ℕ) : ℝ) * + X))) + * Real.sqrt (Real.log (N:ℝ)) ^ 2 ≤ 40 * (1 + 28 * W) * (N:ℝ) ^ 4 := by + rw [show Real.sqrt (Real.log (N:ℝ)) ^ 2 = Real.log (N:ℝ) from by rw [sq, hqq]] + exact hTq + have key := FourExpCount.count_core (N:ℝ) (Real.sqrt (Real.log (N:ℝ))) + (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) + (⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) + (⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) + ((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ / 2 : ℕ) : ℝ) + (2 * (1 + (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ)) ^ (1 / + 20 : ℝ)) + / ((1 / 20 : ℝ) * Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ))) + * (1 + ((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * ((((2 * N) : ℕ) : ℝ) * + X))) + W hW0 hQ hq2 hN84r hS1 hS2 hSone ht1 ht2 (Nat.cast_nonneg _) (Nat.cast_nonneg _) + (FourExpCount.nat_div_two_ge _) (Nat.cast_nonneg _) hTn hTq' + calc ((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ) / (1 / 20 : ℝ) + + 2 * (1 + (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ)) ^ (1 + / 20 : ℝ)) + / ((1 / 20 : ℝ) * Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ))) + * (1 + ((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * ((((2 * N) : ℕ) : ℝ) + * X)) + = 80 * (N:ℝ) ^ 2 * (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) + + 2 * (1 + (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * N) : ℕ) : ℝ)) ^ (1 + / 20 : ℝ)) + / ((1 / 20 : ℝ) * Real.log (((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ * (2 * N) * (2 * + N) : ℕ) : ℝ))) + * (1 + ((((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₁ + + (((14 * ⌊(N:ℝ) * Real.sqrt (Real.log (N:ℝ))⌋₊) : ℕ) : ℝ) * Y₂) * ((((2 * N) : ℕ) : ℝ) + * X)) := by + rw [hUeq]; ring + _ ≤ 196 * ((⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) * (⌊(N:ℝ) * + Real.sqrt (Real.log (N:ℝ))⌋₊ : ℝ) + * ((⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ / 2 : ℕ) : ℝ)) := key + _ = (((14 * ⌊(N:ℝ) / Real.sqrt (Real.log (N:ℝ))⌋₊) * (14 * ⌊(N:ℝ) * + Real.sqrt (Real.log (N:ℝ))⌋₊) + * (⌊(N:ℝ) ^ 2 / Real.sqrt (Real.log (N:ℝ))⌋₊ / 2) : ℕ) : ℝ) := by push_cast; ring + +end FourExponentials diff --git a/LeanPool/FourExponentials/ConstructionGrowth.lean b/LeanPool/FourExponentials/ConstructionGrowth.lean new file mode 100644 index 0000000000..42a0c75756 --- /dev/null +++ b/LeanPool/FourExponentials/ConstructionGrowth.lean @@ -0,0 +1,217 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.Complex.ExponentialBounds +public import Mathlib.Analysis.SpecialFunctions.Log.Monotone +public import Mathlib.Order.Filter.Defs +public import Mathlib.Order.Monotone.Union +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.SplitIfs + +/-! +# Growth of the construction's scales + +Let `A x = x - 3 + 9 √(log 3)` for `x ≤ 3` and `A x = x² √(log x)` beyond, and let `B` be the +same with `9 / √(log 3)` and `x² / √(log x)`. The statement is about `k A` and `k B`, with +`k > 0`. For `x ≥ 3`, `1 ≤ log x ≤ x - 1` and `1 ≤ √(log x)`. + +* **Monotonicity.** Each is a line of slope one on `(-∞, 3]`, glued at `3` to a function strictly + increasing on `[3, ∞)` that takes the same value there (`StrictMonoOn.Iic_union_Ici`). For + `x² / √(log x)`, compare squares: `log t / t` is antitone past `e`, so `x log y ≤ y log x` and + `x⁴ log y < y⁴ log x` for `3 ≤ x < y`. +* **Limits.** Past `3`, both are at least `x`. +* **`B ≤ A`**, since `√(log x) ≥ 1`. +* **One step multiplies by at most `3`.** Up to `x + 1 ≤ 3`, a step adds `1` to a value above `3`. + Across `3`, `(x + 1)² √(log (x + 1)) ≤ 16 · 1.5` and `(x + 1)² / √(log (x + 1)) ≤ 16 / √(log 3)`. + Past `3`, for `A` compare squares, with `log (x + 1) ≤ 2 log x` and `x + 1 ≤ 4x/3`; for `B`, use + `(x + 1)² ≤ 3 x²` and that `√(log x)` increases. + +From `Diaz/Mirror/construction_growth.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.construction_growth`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Filter Topology + +namespace ConstructionGrowth + +/-- The growing majorant of the construction. -/ +noncomputable def A (x : ℝ) : ℝ := + if x ≤ 3 then x - 3 + 9 * Real.sqrt (Real.log 3) else x ^ 2 * Real.sqrt (Real.log x) + +/-- Its companion with the reciprocal root. -/ +noncomputable def B (x : ℝ) : ℝ := + if x ≤ 3 then x - 3 + 9 / Real.sqrt (Real.log 3) else x ^ 2 / Real.sqrt (Real.log x) + +/-- For `x ≥ 3`: `1 ≤ log x ≤ x - 1`, and `1 ≤ √(log x)`, whose square is `log x`. -/ +lemma log_facts {x : ℝ} (hx : 3 ≤ x) : 1 ≤ Real.log x ∧ Real.log x ≤ x - 1 ∧ + 1 ≤ Real.sqrt (Real.log x) ∧ Real.sqrt (Real.log x) ^ 2 = Real.log x := by + have h1 : 1 ≤ Real.log x := by + rw [Real.le_log_iff_exp_le (by linarith)]; linarith [Real.exp_one_lt_three] + exact ⟨h1, Real.log_le_sub_one_of_pos (by linarith), Real.one_le_sqrt.2 h1, + Real.sq_sqrt (by linarith)⟩ + +/-- A line of slope one below `a`, glued to a function increasing on `[a, ∞)`. -/ +lemma strictMono_glue {f : ℝ → ℝ} {a c : ℝ} (hf : StrictMonoOn f (Set.Ici a)) (hc : c = f a) : + StrictMono fun x => if x ≤ a then x - a + c else f x := by + refine StrictMonoOn.Iic_union_Ici (fun x (hx : x ≤ a) y (hy : y ≤ a) hxy => ?_) + (hf.congr fun x (hx : a ≤ x) => ?_) + · simp only [ite_eq_left hx, ite_eq_left hy]; linarith + · rcases hx.eq_or_lt with rfl | h + · simp [hc] + · simp [not_le.2 h] + +lemma strictMono_A : StrictMono A := by + refine strictMono_glue (f := fun x => x ^ 2 * Real.sqrt (Real.log x)) + (fun x (hx : 3 ≤ x) y (hy : 3 ≤ y) hxy => ?_) (by norm_num) + exact mul_lt_mul (by nlinarith) (Real.sqrt_le_sqrt (Real.log_le_log (by linarith) hxy.le)) + (by linarith [(log_facts hx).2.2.1]) (by positivity) + +lemma strictMono_B : StrictMono B := by + refine strictMono_glue (f := fun x => x ^ 2 / Real.sqrt (Real.log x)) + (fun x (hx : 3 ≤ x) y (hy : 3 ≤ y) hxy => ?_) (by norm_num) + obtain ⟨hlx, -, hsx, hqx⟩ := log_facts hx + obtain ⟨hly, -, hsy, hqy⟩ := log_facts hy + -- `log t / t` is antitone past `e`, so `x log y ≤ y log x` + have he : Real.exp 1 ≤ x := by linarith [Real.exp_one_lt_three] + have hant := Real.log_div_self_antitoneOn he (he.trans hxy.le) hxy.le + simp only at hant + rw [div_le_div_iff₀ (by linarith) (by linarith)] at hant + simp only + rw [div_lt_div_iff₀ (by linarith) (by linarith)] + have h3 : x ^ 3 < y ^ 3 := pow_lt_pow_left₀ hxy (by linarith) (by norm_num) + refine (pow_lt_pow_iff_left₀ (by positivity) (by positivity) two_ne_zero).1 ?_ + rw [mul_pow, mul_pow, hqx, hqy] + nlinarith [mul_le_mul_of_nonneg_left hant (by positivity : (0 : ℝ) ≤ x ^ 3), + mul_lt_mul_of_pos_right (mul_lt_mul_of_pos_right h3 (by linarith : (0 : ℝ) < y)) + (by linarith : (0 : ℝ) < Real.log x)] + +lemma tendsto_A : Tendsto A atTop atTop := by + refine tendsto_atTop_mono' atTop ?_ tendsto_id + filter_upwards [eventually_gt_atTop (3 : ℝ)] with x hx + simp only [A, ite_eq_right (not_le.2 hx), id] + nlinarith [mul_le_mul_of_nonneg_left (log_facts hx.le).2.2.1 (by positivity : (0 : ℝ) ≤ x ^ 2)] + +lemma tendsto_B : Tendsto B atTop atTop := by + refine tendsto_atTop_mono' atTop ?_ tendsto_id + filter_upwards [eventually_gt_atTop (3 : ℝ)] with x hx + obtain ⟨-, hlx, hsx, hqx⟩ := log_facts hx.le + simp only [B, ite_eq_right (not_le.2 hx), id] + rw [le_div_iff₀ (by linarith)] + have hs : Real.sqrt (Real.log x) ≤ x := by nlinarith + nlinarith [mul_le_mul_of_nonneg_left hs (by linarith : (0 : ℝ) ≤ x)] + +lemma B_le_A (x : ℝ) : B x ≤ A x := by + unfold A B + split_ifs with hx + · have h3 := (log_facts le_rfl).2.2.1 + have : 9 / Real.sqrt (Real.log 3) ≤ 9 * Real.sqrt (Real.log 3) := by + rw [div_le_iff₀ (by linarith)]; nlinarith + linarith + · obtain ⟨hl, -, hs, hq⟩ := log_facts (not_le.1 hx).le + rw [div_le_iff₀ (by linarith), mul_assoc, ← sq, hq] + exact le_mul_of_one_le_right (sq_nonneg x) hl + +lemma A_step (x : ℝ) (hx : 0 < x) : A (x + 1) ≤ 3 * A x := by + have h3 := (log_facts (le_refl (3 : ℝ))).2.2.1 + unfold A + by_cases h1 : x + 1 ≤ 3 + · rw [ite_eq_left h1, ite_eq_left (by linarith : x ≤ 3)]; linarith + obtain ⟨-, -, hs1, hq1⟩ := log_facts (not_le.1 h1).le + by_cases h2 : x ≤ 3 + · -- `3 < x + 1 ≤ 4`, so `(x + 1)² √(log (x + 1)) ≤ 16 · 1.5` + rw [ite_eq_right h1, ite_eq_left h2] + have hl : Real.log (x + 1) ≤ 2 * Real.log 2 := by + have := Real.log_le_log (by linarith) (show x + 1 ≤ 2 ^ 2 by linarith) + rwa [Real.log_pow, Nat.cast_ofNat] at this + have ht : Real.sqrt (Real.log (x + 1)) ≤ 1.5 := by + nlinarith [Real.sqrt_nonneg (Real.log (x + 1)), Real.log_two_lt_d9] + nlinarith [mul_le_mul (by nlinarith : (x + 1) ^ 2 ≤ 16) ht (Real.sqrt_nonneg _) (by norm_num)] + · -- `x > 3`: compare squares, with `log (x + 1) ≤ 2 log x` and `x + 1 ≤ 4x/3` + rw [ite_eq_right h1, ite_eq_right h2] + obtain ⟨hl0, -, hs0, hq0⟩ := log_facts (not_le.1 h2).le + have hl : Real.log (x + 1) ≤ 2 * Real.log x := by + have := Real.log_le_log (by linarith) (show x + 1 ≤ x ^ 2 by nlinarith) + rwa [Real.log_pow, Nat.cast_ofNat] at this + have h4 : (x + 1) ^ 4 ≤ (4 / 3 * x) ^ 4 := pow_le_pow_left₀ (by linarith) (by linarith) 4 + refine (pow_le_pow_iff_left₀ (by positivity) (by positivity) two_ne_zero).1 ?_ + rw [mul_pow, mul_pow, mul_pow, hq1, hq0] + nlinarith [mul_le_mul_of_nonneg_left hl (by positivity : (0 : ℝ) ≤ ((x + 1) ^ 2) ^ 2), + mul_le_mul_of_nonneg_right h4 (by linarith : (0 : ℝ) ≤ Real.log x), + mul_nonneg (pow_nonneg hx.le 4) (by linarith : (0 : ℝ) ≤ Real.log x)] + +lemma B_step (x : ℝ) (hx : 0 < x) : B (x + 1) ≤ 3 * B x := by + obtain ⟨-, hl3, h3, hq3⟩ := log_facts (le_refl (3 : ℝ)) + have hc : 6 ≤ 9 / Real.sqrt (Real.log 3) := by rw [le_div_iff₀ (by linarith)]; nlinarith + unfold B + by_cases h1 : x + 1 ≤ 3 + · rw [ite_eq_left h1, ite_eq_left (by linarith : x ≤ 3)]; linarith + by_cases h2 : x ≤ 3 + · -- `3 < x + 1 ≤ 4` + rw [ite_eq_right h1, ite_eq_left h2] + have hle : (x + 1) ^ 2 / Real.sqrt (Real.log (x + 1)) ≤ 16 / Real.sqrt (Real.log 3) := + div_le_div₀ (by norm_num) (by nlinarith) (by linarith) + (Real.sqrt_le_sqrt (Real.log_le_log (by norm_num) (by linarith))) + have h16 : 16 / Real.sqrt (Real.log 3) = 16 / 9 * (9 / Real.sqrt (Real.log 3)) := by ring + linarith + · rw [ite_eq_right h1, ite_eq_right h2] + have hs0 : 0 < Real.sqrt (Real.log x) := by linarith [(log_facts (not_le.1 h2).le).2.2.1] + have hlog : Real.sqrt (Real.log x) ≤ Real.sqrt (Real.log (x + 1)) := + Real.sqrt_le_sqrt (Real.log_le_log (by linarith) (by linarith)) + have hsq : (x + 1) ^ 2 ≤ 3 * x ^ 2 := by nlinarith + calc (x + 1) ^ 2 / Real.sqrt (Real.log (x + 1)) ≤ (x + 1) ^ 2 / Real.sqrt (Real.log x) := by + gcongr + _ ≤ 3 * x ^ 2 / Real.sqrt (Real.log x) := by gcongr + _ = 3 * (x ^ 2 / Real.sqrt (Real.log x)) := by ring + +end ConstructionGrowth + +open ConstructionGrowth in +/-- **The growth functions.** For every $k>0$ the growth functions $\sigma_1,\sigma_2$ are strictly +increasing and tend to $+\infty$, and for every $x>0$ +$$ \sigma_2(x) \le\sigma_1(x), \qquad\sigma_i(x+1) \le3\,\sigma_i(x)\quad(i =1,2). $$ -/ +theorem construction_growth (k : ℝ) (hk : 0 < k) : + StrictMono (fun x : ℝ => k * (if x ≤ 3 then x - 3 + 9 * Real.sqrt (Real.log 3) else x ^ 2 * + Real.sqrt (Real.log x))) ∧ + StrictMono (fun x : ℝ => k * (if x ≤ 3 then x - 3 + 9 / Real.sqrt (Real.log 3) else x ^ 2 / + Real.sqrt (Real.log x))) ∧ + Tendsto (fun x : ℝ => k * (if x ≤ 3 then x - 3 + 9 * Real.sqrt (Real.log 3) else x ^ 2 * + Real.sqrt (Real.log x))) atTop atTop ∧ + Tendsto (fun x : ℝ => k * (if x ≤ 3 then x - 3 + 9 / Real.sqrt (Real.log 3) else x ^ 2 / + Real.sqrt (Real.log x))) atTop atTop ∧ + (∀ x : ℝ, 0 < x → k * (if x ≤ 3 then x - 3 + 9 / Real.sqrt (Real.log 3) else x ^ 2 / + Real.sqrt (Real.log x)) ≤ k * (if x ≤ 3 then x - 3 + 9 * Real.sqrt (Real.log 3) else x ^ 2 * + Real.sqrt (Real.log x))) ∧ + (∀ x : ℝ, 0 < x → k * (if (x + 1) ≤ 3 then (x + 1) - 3 + 9 * Real.sqrt (Real.log 3) else (x + + 1) ^ 2 * Real.sqrt (Real.log (x + 1))) ≤ 3 * (k * (if x ≤ 3 then x - 3 + 9 * + Real.sqrt (Real.log 3) else x ^ 2 * Real.sqrt (Real.log x)))) ∧ + (∀ x : ℝ, 0 < x → k * (if (x + 1) ≤ 3 then (x + 1) - 3 + 9 / Real.sqrt (Real.log 3) else (x + + 1) ^ 2 / Real.sqrt (Real.log (x + 1))) ≤ 3 * (k * (if x ≤ 3 then x - 3 + 9 / + Real.sqrt (Real.log 3) else x ^ 2 / Real.sqrt (Real.log x)))) := by + refine ⟨fun x y h => mul_lt_mul_of_pos_left (strictMono_A h) hk, + fun x y h => mul_lt_mul_of_pos_left (strictMono_B h) hk, + Filter.Tendsto.const_mul_atTop hk tendsto_A, + Filter.Tendsto.const_mul_atTop hk tendsto_B, + fun x _ => mul_le_mul_of_nonneg_left (B_le_A x) hk.le, + fun x hx => ?_, fun x hx => ?_⟩ + · have h := mul_le_mul_of_nonneg_left (A_step x hx) hk.le + calc k * A (x + 1) ≤ k * (3 * A x) := h + _ = 3 * (k * A x) := by ring + · have h := mul_le_mul_of_nonneg_left (B_step x hx) hk.le + calc k * B (x + 1) ≤ k * (3 * B x) := h + _ = 3 * (k * B x) := by ring + +end FourExponentials diff --git a/LeanPool/FourExponentials/DvdOfSmallValues.lean b/LeanPool/FourExponentials/DvdOfSmallValues.lean new file mode 100644 index 0000000000..be45021a60 --- /dev/null +++ b/LeanPool/FourExponentials/DvdOfSmallValues.lean @@ -0,0 +1,308 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Algebra.Order.Star.Int +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.RingTheory.Polynomial.GaussLemma +public import Mathlib.RingTheory.Polynomial.Resultant.Basic +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set +public import Mathlib.Tactic.SplitIfs + +/-! +# Small values force divisibility + +Let $P,Q\in\mathbb{Z}[X]$ with $Q$ irreducible, let $\alpha\in\mathbb{C}$, and let $H,h\ge1$ bound +the absolute values of the coefficients of $P$ and of $Q$ respectively. Put $d=\deg P$ and +$\delta=\deg Q$. If +$$ +\bigl((1+|\alpha|)(d+\delta)\bigr)^{d+\delta}H^{\delta}h^{d}\bigl(|P(\alpha)|+|Q(\alpha)|\bigr)<1, +$$ +then $Q$ divides $P$. + +Source: [Wal71, §3, (3.13)], citing [Lang66, Ch. V, §2]. + +## References + +* [Lang66] S. Lang, *Introduction to Transcendental Numbers*, Addison-Wesley, 1966. +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. + +From `Diaz/Mirror/dvd_of_small_values.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.dvd_of_small_values`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Polynomial Finset + +namespace FourExpRes + +/-- Leibniz bound: `|det A| ≤ N! · ∏ⱼ cⱼ` when column `j` is bounded by `cⱼ`. -/ +lemma abs_det_le {N : ℕ} (A : Matrix (Fin N) (Fin N) ℤ) (c : Fin N → ℝ) + (hc : ∀ i j, |(A i j : ℝ)| ≤ c j) : + |((A.det : ℤ) : ℝ)| ≤ (N.factorial : ℝ) * ∏ j, c j := by + have hdet : ((A.det : ℤ) : ℝ) = + ∑ σ : Equiv.Perm (Fin N), ((Equiv.Perm.sign σ : ℤ) : ℝ) * ∏ i, (A (σ i) i : ℝ) := by + rw [Matrix.det_apply] + simp only [Int.cast_sum, Units.smul_def, smul_eq_mul, Int.cast_mul, Int.cast_prod] + rw [hdet] + calc |∑ σ : Equiv.Perm (Fin N), ((Equiv.Perm.sign σ : ℤ) : ℝ) * ∏ i, (A (σ i) i : ℝ)| + ≤ ∑ σ : Equiv.Perm (Fin N), |((Equiv.Perm.sign σ : ℤ) : ℝ) * ∏ i, (A (σ i) i : ℝ)| := + Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ _σ : Equiv.Perm (Fin N), ∏ j, c j := by + apply Finset.sum_le_sum + intro σ _ + rw [abs_mul, Finset.abs_prod] + have hs : |((Equiv.Perm.sign σ : ℤ) : ℝ)| = 1 := by + rcases Int.units_eq_one_or (Equiv.Perm.sign σ) with h | h <;> simp [h] + rw [hs, one_mul] + exact Finset.prod_le_prod₀ (fun i _ => abs_nonneg _) (fun i _ => hc (σ i) i) + _ = (N.factorial : ℝ) * ∏ j, c j := by + rw [Finset.sum_const, Finset.card_univ, Fintype.card_perm, Fintype.card_fin, nsmul_eq_mul] + +lemma factorial_le_pow_pred (n : ℕ) (hn : 1 ≤ n) : n.factorial ≤ n ^ (n - 1) := by + induction n, hn using Nat.le_induction with + | base => simp + | succ n hn ih => + rw [Nat.factorial_succ, show n + 1 - 1 = (n - 1) + 1 by omega, pow_succ] + have h1 : n ^ (n - 1) ≤ (n + 1) ^ (n - 1) := Nat.pow_le_pow_left (by omega) _ + have h2 : n.factorial ≤ (n + 1) ^ (n - 1) := ih.trans h1 + nlinarith [Nat.zero_le (n.factorial)] + +end FourExpRes + +/-- **Small values force divisibility.** Let $P,Q\in\mathbb{Z}[X]$ with $Q$ irreducible, let +$\alpha\in\mathbb{C}$, and let $H,h\ge1$ bound the absolute values of the coefficients of $P$ and of +$Q$ respectively. Put $d=\deg P$ and $\delta=\deg Q$. If +$$ +\bigl((1+|\alpha|)(d+\delta)\bigr)^{d+\delta}H^{\delta}h^{d}\bigl(|P(\alpha)|+|Q(\alpha)|\bigr)<1, +$$ +then $Q$ divides $P$. -/ +theorem dvd_of_small_values + (P Q : Polynomial ℤ) (hQ : Irreducible Q) (α : ℂ) (H h : ℝ) (hH : 1 ≤ H) (hh : 1 ≤ h) + (hPH : ∀ i : ℕ, |(P.coeff i : ℝ)| ≤ H) (hQh : ∀ i : ℕ, |(Q.coeff i : ℝ)| ≤ h) + (hsmall : ((1 + ‖α‖) * ((P.natDegree + Q.natDegree : ℕ) : ℝ)) ^ (P.natDegree + Q.natDegree) + * H ^ Q.natDegree * h ^ P.natDegree + * (‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖) < 1) : + Q ∣ P := by + classical + by_contra hndvd + have hα0 : 0 ≤ ‖α‖ := norm_nonneg α + -- the constant case: `|Q(α)| ≥ 2` contradicts the hypothesis + by_cases hδ0 : Q.natDegree = 0 + · have hQC := eq_C_of_natDegree_eq_zero hδ0 + have hc0 : Q.coeff 0 ≠ 0 := by + intro h0; apply hQ.ne_zero; rw [hQC, h0, map_zero] + have hcu : ¬ IsUnit (Q.coeff 0) := fun hu => hQ.not_isUnit (by rw [hQC]; exact isUnit_C.mpr hu) + have hc2 : (2 : ℤ) ≤ |Q.coeff 0| := by + have h1 : |Q.coeff 0| ≠ 0 := abs_ne_zero.mpr hc0 + have h2 : |Q.coeff 0| ≠ 1 := fun h => hcu (Int.isUnit_iff_abs_eq.mpr h) + have := abs_nonneg (Q.coeff 0) + omega + have hQα : (2 : ℝ) ≤ ‖Polynomial.aeval α Q‖ := by + rw [hQC, aeval_C, algebraMap_int_eq, eq_intCast, Complex.norm_intCast] + exact_mod_cast hc2 + have hf1 : (1 : ℝ) ≤ ((1 + ‖α‖) * ((P.natDegree + Q.natDegree : ℕ) : ℝ)) ^ (P.natDegree + + Q.natDegree) := by + rcases Nat.eq_zero_or_pos (P.natDegree + Q.natDegree) with h0 | hpos + · rw [h0, pow_zero] + · apply one_le_pow₀ + have : (1 : ℝ) ≤ ((P.natDegree + Q.natDegree : ℕ) : ℝ) := by exact_mod_cast hpos + nlinarith + have hh1 : (1 : ℝ) ≤ h ^ P.natDegree := one_le_pow₀ hh + rw [hδ0, pow_zero, mul_one] at hsmall + have hS : (2 : ℝ) ≤ ‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖ := by + linarith [norm_nonneg (Polynomial.aeval α P)] + have hlow : (2 : ℝ) ≤ ((1 + ‖α‖) * ((P.natDegree + 0 : ℕ) : ℝ)) ^ (P.natDegree + 0) + * h ^ P.natDegree * (‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖) := by + rw [hδ0] at hf1 + have h12 : (1 : ℝ) ≤ ((1 + ‖α‖) * ((P.natDegree + 0 : ℕ) : ℝ)) ^ (P.natDegree + 0) + * h ^ P.natDegree := by nlinarith + nlinarith + linarith + -- the non-constant case: a non-zero integer resultant + set d := P.natDegree with hd + set δ := Q.natDegree with hδ + have hδpos : 0 < δ := Nat.pos_of_ne_zero hδ0 + have hNpos : 0 < d + δ := by omega + have hprim : Q.IsPrimitive := hQ.isPrimitive hδ0 + set φ : ℤ →+* ℚ := Int.castRingHom ℚ with hφ + have hinj : Function.Injective φ := Int.cast_injective + have hQ'irr : Irreducible (Q.map φ) := + (IsPrimitive.Int.irreducible_iff_irreducible_map_cast hprim).mp hQ + have hndvd' : ¬ Q.map φ ∣ P.map φ := + fun hdiv => hndvd ((IsPrimitive.Int.dvd_iff_map_cast_dvd_map_cast Q P hprim).mpr hdiv) + have hcop : IsCoprime (P.map φ) (Q.map φ) := ((hQ'irr.coprime_iff_not_dvd).mpr hndvd').symm + have hres' := resultant_ne_zero (P.map φ) (Q.map φ) hcop + have hPdeg : (P.map φ).natDegree = d := natDegree_map_eq_of_injective hinj P + have hQdeg : (Q.map φ).natDegree = δ := natDegree_map_eq_of_injective hinj Q + have hresZ : P.resultant Q d δ ≠ 0 := by + intro h0 + apply hres' + rw [hPdeg, hQdeg, resultant_map_map, h0, map_zero] + have hRes1 : (1 : ℝ) ≤ |((P.resultant Q d δ : ℤ) : ℝ)| := by + exact_mod_cast Int.one_le_abs hresZ + -- the Bézout identity `P·A + Q·B = Res`, read off the adjugate of the Sylvester matrix + set N : ℕ := d + δ with hNdef + have hv : (1 : ℤ[X]) ∈ degreeLT ℤ N := by + rw [mem_degreeLT, degree_one]; exact_mod_cast hNpos + set v : degreeLT ℤ N := ⟨1, hv⟩ with hvdef + set X := adjSylvester (m := d) (n := δ) P Q v with hXdef + have hX : P * (X.2 : ℤ[X]) + Q * (X.1 : ℤ[X]) = C (P.resultant Q d δ) := by + have := congr(($(sylvesterMap_comp_adjSylvester P Q (le_refl d) (le_refl δ)) v).1) + simpa [Algebra.smul_def, hvdef] using this + set A := P.sylvester Q d δ with hAdef + -- column bounds for the Sylvester matrix + set c : Fin N → ℝ := fun j => Fin.addCases (fun _ => h) (fun _ => H) j with hcdef + have hc1 : ∀ s, 1 ≤ c s := by + intro s + refine Fin.addCases (fun s₁ => ?_) (fun s₁ => ?_) s + · simp only [hcdef, Fin.addCases_left]; exact hh + · simp only [hcdef, Fin.addCases_right]; exact hH + have hcol : ∀ i j, |(A i j : ℝ)| ≤ c j := by + intro i j + refine Fin.addCases (fun j₁ => ?_) (fun j₁ => ?_) j + · simp only [hAdef, Polynomial.sylvester, Matrix.of_apply, Fin.addCases_left, hcdef] + split_ifs + · exact hQh _ + · simp; linarith + · simp only [hAdef, Polynomial.sylvester, Matrix.of_apply, Fin.addCases_right, hcdef] + split_ifs + · exact hPH _ + · simp; linarith + have hprod : ∏ j, c j = h ^ d * H ^ δ := by + rw [Fin.prod_univ_add] + simp [hcdef] + set B : ℝ := (N.factorial : ℝ) * (h ^ d * H ^ δ) with hBdef + have hadj : ∀ i j, |(A.adjugate i j : ℝ)| ≤ B := by + intro i j + rw [Matrix.adjugate_apply] + have hb := FourExpRes.abs_det_le (A.updateRow j (Pi.single i 1)) c (by + intro r t + by_cases hr : r = j + · subst hr + rw [Matrix.updateRow_self] + by_cases ht : t = i + · subst ht; simpa using hc1 _ + · simp [ht]; linarith [hc1 t] + · rw [Matrix.updateRow_ne hr]; exact hcol r t) + rwa [hprod] at hb + -- coordinates of `X` are entries of the adjugate + have hrepr : ∀ j, (((degreeLT.basis ℤ d).prod (degreeLT.basis ℤ δ)).reindex finSumFinEquiv).repr X + j + = A.adjugate j ⟨0, hNpos⟩ := by + intro j + rw [hXdef, adjSylvester, Matrix.toLin_apply, Module.Basis.repr_sum_self] + simp only [Matrix.mulVec, dotProduct] + rw [Finset.sum_eq_single ⟨0, hNpos⟩] + · simp [hvdef, hAdef] + · intro b _ hb + have : (b : ℕ) ≠ 0 := fun h0 => hb (Fin.ext h0) + simp [hvdef, coeff_one, this] + · simp + have hB0 : 0 ≤ B := (abs_nonneg _).trans (hadj ⟨0, hNpos⟩ ⟨0, hNpos⟩) + have hX1 : ∀ k, |((X.1 : ℤ[X]).coeff k : ℝ)| ≤ B := by + intro k + by_cases hk : k < d + · have := hrepr (Fin.castAdd δ ⟨k, hk⟩) + simp only [Module.Basis.repr_reindex_apply, finSumFinEquiv_symm_apply_castAdd, + Module.Basis.prod_repr_inl, + degreeLT.basis_repr] at this + rw [this]; exact hadj _ _ + · have hdeg : (X.1 : ℤ[X]).degree < d := mem_degreeLT.mp X.1.2 + rw [coeff_eq_zero_of_degree_lt (lt_of_lt_of_le hdeg (by exact_mod_cast not_lt.mp hk))] + simpa using hB0 + have hX2 : ∀ k, |((X.2 : ℤ[X]).coeff k : ℝ)| ≤ B := by + intro k + by_cases hk : k < δ + · have := hrepr (Fin.natAdd d ⟨k, hk⟩) + simp only [Module.Basis.repr_reindex_apply, finSumFinEquiv_symm_apply_natAdd, + Module.Basis.prod_repr_inr, + degreeLT.basis_repr] at this + rw [this]; exact hadj _ _ + · have hdeg : (X.2 : ℤ[X]).degree < δ := mem_degreeLT.mp X.2.2 + rw [coeff_eq_zero_of_degree_lt (lt_of_lt_of_le hdeg (by exact_mod_cast not_lt.mp hk))] + simpa using hB0 + -- a polynomial of degree below `n ≤ N` with coefficients at most `B` is small at `α` + have heval : ∀ (p : ℤ[X]) (n : ℕ), n ≤ N → p.degree < n → (∀ k, |(p.coeff k : ℝ)| ≤ B) → + ‖Polynomial.aeval α p‖ ≤ N * B * (1 + ‖α‖) ^ N := by + intro p n hn hp hB + by_cases hp0 : p = 0 + · subst hp0; simp only [map_zero, norm_zero]; positivity + have hnat : p.natDegree < N := + lt_of_lt_of_le ((natDegree_lt_iff_degree_lt hp0).mpr hp) hn + rw [aeval_eq_sum_range' hnat] + calc ‖∑ i ∈ Finset.range N, p.coeff i • α ^ i‖ + ≤ ∑ i ∈ Finset.range N, ‖p.coeff i • α ^ i‖ := norm_sum_le _ _ + _ ≤ ∑ _i ∈ Finset.range N, B * (1 + ‖α‖) ^ N := by + apply Finset.sum_le_sum + intro i hi + rw [zsmul_eq_mul, norm_mul, norm_pow, Complex.norm_intCast] + have h1 : ‖α‖ ^ i ≤ (1 + ‖α‖) ^ N := + (pow_le_pow_left₀ hα0 (by linarith) i).trans + (pow_le_pow_right₀ (by linarith) (Finset.mem_range.mp hi).le) + exact mul_le_mul (hB i) h1 (by positivity) hB0 + _ = N * B * (1 + ‖α‖) ^ N := by simp [Finset.sum_const]; ring + have hA1 := heval (X.1 : ℤ[X]) d (by omega) (mem_degreeLT.mp X.1.2) hX1 + have hA2 := heval (X.2 : ℤ[X]) δ (by omega) (mem_degreeLT.mp X.2.2) hX2 + -- evaluate the identity at `α` + have hev : ((P.resultant Q d δ : ℤ) : ℂ) + = Polynomial.aeval α P * Polynomial.aeval α (X.2 : ℤ[X]) + + Polynomial.aeval α Q * Polynomial.aeval α (X.1 : ℤ[X]) := by + have := congrArg (Polynomial.aeval α) hX + simp only [map_add, map_mul, eq_intCast, map_intCast] at this + exact this.symm + have hRnorm : (1 : ℝ) ≤ ‖((P.resultant Q d δ : ℤ) : ℂ)‖ := by + rw [Complex.norm_intCast]; exact hRes1 + set K : ℝ := N * B * (1 + ‖α‖) ^ N with hKdef + have hup : ‖((P.resultant Q d δ : ℤ) : ℂ)‖ + ≤ (‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖) * K := by + rw [hev] + calc ‖Polynomial.aeval α P * Polynomial.aeval α (X.2 : ℤ[X]) + + Polynomial.aeval α Q * Polynomial.aeval α (X.1 : ℤ[X])‖ + ≤ ‖Polynomial.aeval α P‖ * ‖Polynomial.aeval α (X.2 : ℤ[X])‖ + + ‖Polynomial.aeval α Q‖ * ‖Polynomial.aeval α (X.1 : ℤ[X])‖ := by + refine (norm_add_le _ _).trans ?_ + rw [norm_mul, norm_mul] + _ ≤ ‖Polynomial.aeval α P‖ * K + ‖Polynomial.aeval α Q‖ * K := by + gcongr + _ = (‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖) * K := by ring + -- `K ≤ ((1 + |α|) N)^N · H^δ · h^d` + have hNfac : (N : ℝ) * (N.factorial : ℝ) ≤ (N : ℝ) ^ N := by + have h1 := FourExpRes.factorial_le_pow_pred N (by omega) + have h2 : N * N.factorial ≤ N * N ^ (N - 1) := Nat.mul_le_mul_left _ h1 + have h3 : N * N ^ (N - 1) = N ^ N := by + rw [← pow_succ']; congr 1; omega + exact_mod_cast h2.trans h3.le + have hK : K ≤ ((1 + ‖α‖) * ((N : ℕ) : ℝ)) ^ N * H ^ δ * h ^ d := by + rw [hKdef, hBdef, mul_pow] + have hpos : 0 ≤ h ^ d * H ^ δ * (1 + ‖α‖) ^ N := by positivity + calc (N : ℝ) * ((N.factorial : ℝ) * (h ^ d * H ^ δ)) * (1 + ‖α‖) ^ N + = ((N : ℝ) * (N.factorial : ℝ)) * (h ^ d * H ^ δ * (1 + ‖α‖) ^ N) := by ring + _ ≤ (N : ℝ) ^ N * (h ^ d * H ^ δ * (1 + ‖α‖) ^ N) := mul_le_mul_of_nonneg_right hNfac hpos + _ = (1 + ‖α‖) ^ N * ((N : ℕ) : ℝ) ^ N * H ^ δ * h ^ d := by ring + have hS0 : 0 ≤ ‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖ := by positivity + have := mul_le_mul_of_nonneg_left hK hS0 + have hfinal : (‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖) * K + ≤ ((1 + ‖α‖) * ((N : ℕ) : ℝ)) ^ N * H ^ δ * h ^ d + * (‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖) := by + calc _ ≤ (‖Polynomial.aeval α P‖ + ‖Polynomial.aeval α Q‖) + * (((1 + ‖α‖) * ((N : ℕ) : ℝ)) ^ N * H ^ δ * h ^ d) := this + _ = _ := by ring + linarith + +end FourExponentials diff --git a/LeanPool/FourExponentials/DvdOfSmallValuesAtScale.lean b/LeanPool/FourExponentials/DvdOfSmallValuesAtScale.lean new file mode 100644 index 0000000000..d03e310003 --- /dev/null +++ b/LeanPool/FourExponentials/DvdOfSmallValuesAtScale.lean @@ -0,0 +1,179 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.DvdOfSmallValues +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# Divisibility at one scale + +Let $\alpha\in\mathbb{C}$ and $\varepsilon>0$. There is $U$ such that for all real $u\ge U$ and +$1\le v\le u$ the following holds. Let $P,Q\in\mathbb{Z}[X]$ with $Q$ irreducible, the coefficients +of $P$ of absolute value at most $e^{u}$ and $\deg P\le v$, the coefficients of $Q$ of absolute +value at most $e^{3u}$ and $\deg Q\le(1+\varepsilon/2)v$, and $|P(\alpha)| ?_⟩ + have hu0 : 0 < u := lt_of_lt_of_le (by positivity) hu + have h1 := Real.log_le_rpow_div (x := B * u) (by positivity) (show (0 : ℝ) < 1 / 2 by norm_num) + rw [← Real.sqrt_eq_rpow] at h1 + have hsq := Real.sq_sqrt (show 0 ≤ B * u by positivity) + have hsn := Real.sqrt_nonneg (B * u) + have hcu : 4 * B ≤ c ^ 2 * u := by + have : 4 * B / c ^ 2 ≤ u := by linarith + rw [div_le_iff₀ (by positivity)] at this + linarith + have h2 : 2 * Real.sqrt (B * u) ≤ c * u := by + by_contra hlt + rw [not_le] at hlt + have hpos : 0 < c * u := by positivity + nlinarith + have : Real.sqrt (B * u) / (1 / 2) = 2 * Real.sqrt (B * u) := by ring + linarith + +end FourExpDvdAtScale + +open FourExpDvdAtScale in +/-- **Divisibility at one scale.** Let $\alpha\in\mathbb{C}$ and $\varepsilon>0$. There is $U$ such +that for all real $u\ge U$ and $1\le v\le u$ the following holds. Let $P,Q\in\mathbb{Z}[X]$ with $Q$ +irreducible, the coefficients of $P$ of absolute value at most $e^{u}$ and $\deg P\le v$, the +coefficients of $Q$ of absolute value at most $e^{3u}$ and $\deg Q\le(1+\varepsilon/2)v$, and +$|P(\alpha)| ?_⟩ + have huY : Y ≤ u := le_trans (le_max_left _ _) hU + have hu2 : 4 * Real.log 2 / ε + 1 ≤ u := le_trans (le_max_right _ _) hU + have hv0 : 0 < v := by linarith + have hu0 : 0 < u := by linarith + set d : ℕ := P.natDegree with hddef + set δ : ℕ := Q.natDegree with hδdef + -- the three factors of the resultant bound + have hfac1 : ((1 + ‖α‖) * ((d + δ : ℕ) : ℝ)) ^ (d + δ) ≤ Real.exp (ε / 4 * (u * v)) := by + rcases Nat.eq_zero_or_pos (d + δ) with hm | hm + · rw [hm, pow_zero]; exact Real.one_le_exp (by positivity) + · have hm1 : (1 : ℝ) ≤ ((d + δ : ℕ) : ℝ) := by exact_mod_cast hm + set bb : ℝ := (1 + ‖α‖) * ((d + δ : ℕ) : ℝ) with hbb + have hb1 : 1 ≤ bb := by + have : (1 : ℝ) ≤ 1 + ‖α‖ := by linarith [norm_nonneg α] + nlinarith + have hmv : ((d + δ : ℕ) : ℝ) ≤ (2 + ε / 2) * v := by + push_cast + have : (δ : ℝ) ≤ (1 + ε / 2) * v := hdz + linarith + have hbv : bb ≤ B * u := by + rw [hbb, hBdef] + have : (2 + ε / 2) * v ≤ (2 + ε / 2) * u := mul_le_mul_of_nonneg_left hvu (by positivity) + have h0 : 0 ≤ 1 + ‖α‖ := by positivity + calc (1 + ‖α‖) * ((d + δ : ℕ) : ℝ) ≤ (1 + ‖α‖) * ((2 + ε / 2) * u) := + mul_le_mul_of_nonneg_left (hmv.trans this) h0 + _ = (1 + ‖α‖) * (2 + ε / 2) * u := by ring + have hlogb : Real.log bb ≤ ε / (4 * (2 + ε / 2)) * u := + (Real.log_le_log (by linarith) hbv).trans (hY u huY) + have hlogb0 : 0 ≤ Real.log bb := Real.log_nonneg hb1 + calc bb ^ (d + δ) = Real.exp (((d + δ : ℕ) : ℝ) * Real.log bb) := by + rw [← Real.exp_log (by linarith : 0 < bb), ← Real.exp_nat_mul, Real.log_exp] + _ ≤ Real.exp (ε / 4 * (u * v)) := by + apply Real.exp_le_exp.mpr + calc ((d + δ : ℕ) : ℝ) * Real.log bb ≤ ((2 + ε / 2) * v) * Real.log bb := + mul_le_mul_of_nonneg_right hmv hlogb0 + _ ≤ ((2 + ε / 2) * v) * (ε / (4 * (2 + ε / 2)) * u) := + mul_le_mul_of_nonneg_left hlogb (by positivity) + _ = ε / 4 * (u * v) := by field_simp + have hfac2 : Real.exp u ^ δ * Real.exp (3 * u) ^ d ≤ Real.exp ((4 + ε / 2) * (u * v)) := by + rw [← Real.exp_nat_mul, ← Real.exp_nat_mul, ← Real.exp_add] + apply Real.exp_le_exp.mpr + have hu0 : 0 ≤ u := by linarith + have h1 : (δ : ℝ) * u ≤ (1 + ε / 2) * v * u := mul_le_mul_of_nonneg_right hdz hu0 + have h2 : (d : ℝ) * (3 * u) ≤ v * (3 * u) := mul_le_mul_of_nonneg_right hd (by linarith) + nlinarith + have hfac3 : ‖aeval α P‖ + ‖aeval α Q‖ < 2 * Real.exp (-((4 + ε) * (u * v))) := by linarith + have hsmall : ((1 + ‖α‖) * ((d + δ : ℕ) : ℝ)) ^ (d + δ) * Real.exp u ^ δ * Real.exp (3 * u) ^ d + * (‖aeval α P‖ + ‖aeval α Q‖) < 1 := by + have hpos1 : 0 ≤ ((1 + ‖α‖) * ((d + δ : ℕ) : ℝ)) ^ (d + δ) := by positivity + have hpos2 : 0 ≤ Real.exp u ^ δ * Real.exp (3 * u) ^ d := by positivity + have hA : ((1 + ‖α‖) * ((d + δ : ℕ) : ℝ)) ^ (d + δ) * (Real.exp u ^ δ * Real.exp (3 * u) ^ d) + ≤ Real.exp (ε / 4 * (u * v)) * Real.exp ((4 + ε / 2) * (u * v)) := + mul_le_mul hfac1 hfac2 hpos2 (Real.exp_pos _).le + have hS0 : 0 ≤ ‖aeval α P‖ + ‖aeval α Q‖ := by positivity + have hlhs : ((1 + ‖α‖) * ((d + δ : ℕ) : ℝ)) ^ (d + δ) * Real.exp u ^ δ * Real.exp (3 * u) ^ d + * (‖aeval α P‖ + ‖aeval α Q‖) + ≤ (Real.exp (ε / 4 * (u * v)) * Real.exp ((4 + ε / 2) * (u * v))) + * (‖aeval α P‖ + ‖aeval α Q‖) := by + have := mul_le_mul_of_nonneg_right hA hS0 + calc _ = ((1 + ‖α‖) * ((d + δ : ℕ) : ℝ)) ^ (d + δ) * (Real.exp u ^ δ * Real.exp (3 * u) ^ d) + * (‖aeval α P‖ + ‖aeval α Q‖) := by ring + _ ≤ _ := this + have hE : 0 < Real.exp (ε / 4 * (u * v)) * Real.exp ((4 + ε / 2) * (u * v)) := by positivity + have hlt := mul_lt_mul_of_pos_left hfac3 hE + have hfinal : Real.exp (ε / 4 * (u * v)) * Real.exp ((4 + ε / 2) * (u * v)) + * (2 * Real.exp (-((4 + ε) * (u * v)))) = 2 * Real.exp (-(ε / 4 * (u * v))) := by + rw [show Real.exp (ε / 4 * (u * v)) * Real.exp ((4 + ε / 2) * (u * v)) + * (2 * Real.exp (-((4 + ε) * (u * v)))) + = 2 * (Real.exp (ε / 4 * (u * v)) * Real.exp ((4 + ε / 2) * (u * v)) + * Real.exp (-((4 + ε) * (u * v)))) by ring] + rw [← Real.exp_add, ← Real.exp_add] + congr 2 + ring + have hlog2 : Real.log 2 ≤ ε / 4 * (u * v) := by + have huv : u ≤ u * v := by nlinarith + have : 4 * Real.log 2 / ε ≤ u := by linarith + have h' : Real.log 2 ≤ ε / 4 * u := by + rw [div_le_iff₀ hε] at this + linarith + nlinarith + have htwo : 2 * Real.exp (-(ε / 4 * (u * v))) ≤ 1 := by + have h1 : Real.exp (-(ε / 4 * (u * v))) ≤ Real.exp (-Real.log 2) := + Real.exp_le_exp.mpr (by linarith) + have h2 : Real.exp (-Real.log 2) = 1 / 2 := by + rw [Real.exp_neg, Real.exp_log (by norm_num)] + norm_num + rw [h2] at h1 + linarith + linarith + exact dvd_of_small_values P Q hirr α (Real.exp u) (Real.exp (3 * u)) + (Real.one_le_exp (by linarith)) (Real.one_le_exp (by linarith)) hPH hQH hsmall + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExistsIntNorm.lean b/LeanPool/FourExponentials/ExistsIntNorm.lean new file mode 100644 index 0000000000..59de1ccf3b --- /dev/null +++ b/LeanPool/FourExponentials/ExistsIntNorm.lean @@ -0,0 +1,362 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.AffineMonoid.Basic +public import Mathlib.Algebra.AffineMonoid.UniqueSums +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Algebra.Polynomial.OfFn +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Normed.Unbundled.RingSeminorm +public import Mathlib.LinearAlgebra.Matrix.AbsoluteValue +public import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set +public import Mathlib.Tactic.SplitIfs + +/-! +# The norm of `Pol(ω, ω₁)` down to `ℚ(ω)`, with its size + +`Q ∈ ℤ[X][Y]` is monic in `Y` of degree `d`, vanishes at `(ω, ω₁)`, and no nonzero polynomial of +`Y`-degree below `d` vanishes there. For `Pol` of `Y`-degree below `d` with `Pol(ω, ω₁) ≠ 0`, `P` +is the determinant of the matrix `M` of multiplication by `Pol` on `ℤ[X][Y]/(Q)` in the basis +`1, Y, …, Y^(d-1)`: column `k` holds the `Y`-coefficients of `Pol · Y^k mod Q`. It is the norm of +`Pol(ω, ω₁)` from `ℚ(ω, ω₁)` down to `ℚ(ω)` (Waldschmidt 1973, Lemma 7). + +* With `ψ` the evaluation at `ω` and `v = (1, ω₁, …, ω₁^(d-1))`, `v ψ(M) = Pol(ω, ω₁) v`. +* `P ≠ 0`: a kernel vector `u` of `M` gives `U = ∑ u_k Y^k` with + `Pol(ω, ω₁) U(ω, ω₁) = v ψ(M) ψ(u) = 0`, so `U = 0` by minimality. +* Size: `Pol · Y^k mod Q = ∑_n Pol_n (Y^(n+k) mod Q)` involves only the `Y^m mod Q` with `m < 2d`, + whose coefficients have length and degree at most some `C`. The entries of `M` have length at + most `b C` and degree at most `e + C`; expanding the determinant over permutations gives length + at most `d! (b C)^d` and degree at most `d (e + C)`. +* Value: since `v₀ = 1`, `P(ω) = det ψ(M) = Pol(ω, ω₁) ∑_j ω₁^j adj(ψ(M))_{j0}`, and each cofactor + is at most `d! t^d` with `t = b C max(1, |ω|)^(e+C)`. + +From `Diaz/Mirror/exists_int_norm.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.exists_int_norm`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Polynomial + +namespace ExistsIntNorm + +/-- Size of `p ∈ ℤ[X]`: some `ph ∈ ℕ[X]` majorizes `p` coefficientwise, with `ph(1) ≤ b` and +`deg ph ≤ D`. -/ +def Sz1 (p : ℤ[X]) (b D : ℕ) : Prop := + ∃ ph : ℕ[X], (∀ i, (p.coeff i).natAbs ≤ ph.coeff i) ∧ ph.eval 1 ≤ b ∧ ph.natDegree ≤ D + +lemma sz1_mono {p : ℤ[X]} {b b' D D' : ℕ} (h : Sz1 p b D) (hb : b ≤ b') (hD : D ≤ D') : + Sz1 p b' D' := by + obtain ⟨ph, h1, h2, h3⟩ := h + exact ⟨ph, h1, h2.trans hb, h3.trans hD⟩ + +lemma sz1_neg {p : ℤ[X]} {b D : ℕ} (h : Sz1 p b D) : Sz1 (-p) b D := by + obtain ⟨ph, h1, h2, h3⟩ := h + exact ⟨ph, fun i => by rw [coeff_neg, Int.natAbs_neg]; exact h1 i, h2, h3⟩ + +lemma sz1_add {p q : ℤ[X]} {b₁ b₂ D : ℕ} (hp : Sz1 p b₁ D) (hq : Sz1 q b₂ D) : + Sz1 (p + q) (b₁ + b₂) D := by + obtain ⟨ph, h1, h2, h3⟩ := hp + obtain ⟨qh, g1, g2, g3⟩ := hq + refine ⟨ph + qh, fun i => ?_, by rw [eval_add]; exact add_le_add h2 g2, + (natDegree_add_le _ _).trans (max_le h3 g3)⟩ + rw [coeff_add, coeff_add] + exact (Int.natAbs_add_le _ _).trans (add_le_add (h1 i) (g1 i)) + +lemma sz1_mul {p q : ℤ[X]} {b₁ b₂ D₁ D₂ : ℕ} (hp : Sz1 p b₁ D₁) (hq : Sz1 q b₂ D₂) : + Sz1 (p * q) (b₁ * b₂) (D₁ + D₂) := by + obtain ⟨ph, h1, h2, h3⟩ := hp + obtain ⟨qh, g1, g2, g3⟩ := hq + refine ⟨ph * qh, fun n => ?_, by rw [eval_mul]; exact Nat.mul_le_mul h2 g2, + natDegree_mul_le.trans (add_le_add h3 g3)⟩ + rw [coeff_mul, coeff_mul] + refine (Int.natAbs_sum_le _ _).trans (Finset.sum_le_sum fun x _ => ?_) + rw [Int.natAbs_mul] + exact Nat.mul_le_mul (h1 _) (g1 _) + +lemma sz1_sum {ι : Type*} (s : Finset ι) (f : ι → ℤ[X]) (b : ι → ℕ) {D : ℕ} + (h : ∀ i ∈ s, Sz1 (f i) (b i) D) : Sz1 (∑ i ∈ s, f i) (∑ i ∈ s, b i) D := by + classical + induction s using Finset.induction_on with + | empty => exact ⟨0, fun i => by simp, by simp, by simp⟩ + | insert a s ha ih => + rw [Finset.sum_insert ha, Finset.sum_insert ha] + exact sz1_add (h a (Finset.mem_insert_self a s)) + (ih fun i hi => h i (Finset.mem_insert_of_mem hi)) + +lemma sz1_prod {ι : Type*} (s : Finset ι) (f : ι → ℤ[X]) (b D : ι → ℕ) + (h : ∀ i ∈ s, Sz1 (f i) (b i) (D i)) : + Sz1 (∏ i ∈ s, f i) (∏ i ∈ s, b i) (∑ i ∈ s, D i) := by + classical + induction s using Finset.induction_on with + | empty => + rw [Finset.prod_empty, Finset.prod_empty, Finset.sum_empty] + exact ⟨1, fun i => by rw [coeff_one, coeff_one]; split_ifs <;> simp, by simp, by simp⟩ + | insert a s ha ih => + rw [Finset.prod_insert ha, Finset.prod_insert ha, Finset.sum_insert ha] + exact sz1_mul (h a (Finset.mem_insert_self a s)) + (ih fun i hi => h i (Finset.mem_insert_of_mem hi)) + +/-- The coefficientwise absolute value is a majorant; its value at `1` is the length. -/ +lemma sz1_self (p : ℤ[X]) : Sz1 p (∑ i ∈ p.support, (p.coeff i).natAbs) p.natDegree := by + refine ⟨∑ i ∈ p.support, monomial i (p.coeff i).natAbs, fun n => ?_, ?_, + natDegree_sum_le_of_forall_le _ _ fun i hi => + (natDegree_monomial_le _).trans (le_natDegree_of_mem_supp i hi)⟩ + · rw [finsetSum_coeff] + simp only [coeff_monomial_apply] + rw [Finset.sum_ite_eq'] + split_ifs with h + · exact le_rfl + · rw [notMem_support_iff.1 h, Int.natAbs_zero] + · rw [eval_finsetSum] + simp only [eval_monomial, one_pow, mul_one, le_refl] + +/-- Finitely many polynomials have a common size bound. -/ +lemma exists_sz1_bound {ι : Type*} (s : Finset ι) (f : ι → ℤ[X]) : + ∃ C : ℕ, 1 ≤ C ∧ ∀ i ∈ s, Sz1 (f i) C C := by + refine ⟨1 + ∑ i ∈ s, ((∑ n ∈ (f i).support, ((f i).coeff n).natAbs) + (f i).natDegree), + Nat.le_add_right 1 _, fun i hi => ?_⟩ + have h := Finset.single_le_sum + (fun j _ => Nat.zero_le ((∑ n ∈ (f j).support, ((f j).coeff n).natAbs) + (f j).natDegree)) hi + exact sz1_mono (sz1_self (f i)) (by omega) (by omega) + +lemma length_le_of_sz1 {p : ℤ[X]} {b D : ℕ} (h : Sz1 p b D) : + ∑ i ∈ p.support, (p.coeff i).natAbs ≤ b := by + obtain ⟨ph, h1, h2, -⟩ := h + refine le_trans ?_ h2 + rw [eval_eq_sum, sum_def] + simp only [one_pow, mul_one] + refine (Finset.sum_le_sum fun i _ => h1 i).trans (Finset.sum_le_sum_of_subset fun i hi => ?_) + rw [mem_support_iff] at hi ⊢ + intro h0 + have := h1 i + rw [h0] at this + exact hi (Int.natAbs_eq_zero.1 (Nat.le_zero.1 this)) + +lemma natDegree_le_of_sz1 {p : ℤ[X]} {b D : ℕ} (h : Sz1 p b D) : p.natDegree ≤ D := by + obtain ⟨ph, h1, -, h3⟩ := h + refine (natDegree_le_iff_coeff_eq_zero.2 fun i hi => ?_).trans h3 + have := h1 i + rw [coeff_eq_zero_of_natDegree_lt hi] at this + exact Int.natAbs_eq_zero.1 (Nat.le_zero.1 this) + +/-- The value at `ω`: `|p(ω)| ≤ b max(1, |ω|)^D`. -/ +lemma norm_aeval_le_of_sz1 {p : ℤ[X]} {b D : ℕ} (h : Sz1 p b D) (ω : ℂ) : + ‖aeval ω p‖ ≤ b * max 1 ‖ω‖ ^ D := by + have hpD : p.natDegree < D + 1 := Nat.lt_succ_of_le (natDegree_le_of_sz1 h) + obtain ⟨ph, h1, h2, h3⟩ := h + rw [aeval_eq_sum_range' hpD] + refine (norm_sum_le _ _).trans ?_ + calc ∑ i ∈ Finset.range (D + 1), ‖p.coeff i • ω ^ i‖ + ≤ ∑ i ∈ Finset.range (D + 1), (ph.coeff i : ℝ) * max 1 ‖ω‖ ^ D := by + refine Finset.sum_le_sum fun i hi => ?_ + rw [zsmul_eq_mul, norm_mul, norm_pow, Complex.norm_intCast, ← Int.cast_abs, + ← Nat.cast_natAbs] + exact mul_le_mul (Nat.cast_le.2 (h1 i)) + ((pow_le_pow_left₀ (norm_nonneg _) (le_max_right _ _) i).trans + (pow_le_pow_right₀ (le_max_left _ _) (Nat.lt_succ_iff.1 (Finset.mem_range.1 hi)))) + (by positivity) (by positivity) + _ = ((ph.eval 1 : ℕ) : ℝ) * max 1 ‖ω‖ ^ D := by + rw [← Finset.sum_mul, eval_eq_sum_range' (Nat.lt_succ_of_le h3)] + simp only [one_pow, mul_one, Nat.cast_sum] + _ ≤ b * max 1 ‖ω‖ ^ D := mul_le_mul_of_nonneg_right (Nat.cast_le.2 h2) (by positivity) + +/-- A complex determinant with entries bounded by `t`. -/ +lemma norm_det_le {n : ℕ} (A : Matrix (Fin n) (Fin n) ℂ) (t : ℝ) (hA : ∀ i j, ‖A i j‖ ≤ t) : + ‖A.det‖ ≤ n.factorial * t ^ n := by + have h := Matrix.det_le (abv := NormedField.toAbsoluteValue ℂ) hA + rw [Fintype.card_fin, nsmul_eq_mul] at h + exact h + +/-- A polynomial of `Y`-degree below `d`, evaluated as a sum over `Fin d`. -/ +lemma eval₂_eq_sum_fin (ψ : ℤ[X] →+* ℂ) (ω₁ : ℂ) {B : ℤ[X][X]} {d : ℕ} (hB : B.natDegree < d) : + eval₂ ψ ω₁ B = ∑ j : Fin d, ψ (B.coeff j) * ω₁ ^ (j : ℕ) := by + rw [eval₂_eq_sum_range' ψ hB, Finset.sum_range] + +/-- If `v A = γ v` and `v₀ = 1`, then `det A = γ (v adj A)₀`. -/ +lemma det_factor {d : ℕ} (hd : 0 < d) (A : Matrix (Fin d) (Fin d) ℂ) (v : Fin d → ℂ) (γ : ℂ) + (hv : Matrix.vecMul v A = γ • v) (hv0 : v ⟨0, hd⟩ = 1) : + A.det = γ * (Matrix.vecMul v A.adjugate) ⟨0, hd⟩ := by + have h1 := Matrix.vecMul_vecMul v A A.adjugate + rw [hv, Matrix.mul_adjugate] at h1 + have h2 := congrFun h1 ⟨0, hd⟩ + simp only [Matrix.smul_vecMul, Matrix.vecMul_smul, Matrix.vecMul_one, Pi.smul_apply, + smul_eq_mul, hv0, mul_one] at h2 + exact h2.symm + +end ExistsIntNorm + +open Polynomial ExistsIntNorm + +/-- **Norms down to $\Q(\omega)$.** Let $\omega,\omega_1\in\mathbb{C}$ and let +$Q\in\mathbb{Z}[X][Y]$ be monic in $Y$ of degree $d$, with $Q(\omega,\omega_1)=0$ and minimal there. +There is $c\in\mathbb{N}$ such that for every $A\in\mathbb{Z}[X][Y]$ of $Y$-degree less than $d$, +length at most $b$ and $X$-degree at most $e$, with $A(\omega,\omega_1)\neq0$, there is a non-zero +$P\in\mathbb{Z}[X]$ of length at most $(cb)^{d}$ and degree at most $d(e+c)$ with +$$ |P(\omega)| \le|A(\omega,\omega_1)|\,\bigl(cb\max(1,|\omega|)^{e}\bigr)^{d}. $$ -/ +theorem exists_int_norm (ω ω₁ : ℂ) (Q : Polynomial (Polynomial ℤ)) (hQm : Q.Monic) + (hQroot : Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Q = 0) + (hQmin : ∀ A : Polynomial (Polynomial ℤ), A.natDegree < Q.natDegree → + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ A = 0 → A = 0) : + ∃ c : ℕ, ∀ (Pol : Polynomial (Polynomial ℤ)) (b e : ℕ), Pol.natDegree < Q.natDegree → + ∑ k ∈ Pol.support, ∑ i ∈ (Pol.coeff k).support, ((Pol.coeff k).coeff i).natAbs ≤ b → + (∀ k, (Pol.coeff k).natDegree ≤ e) → + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Pol ≠ 0 → + ∃ P : Polynomial ℤ, P ≠ 0 ∧ + ∑ i ∈ P.support, (P.coeff i).natAbs ≤ (c * b) ^ Q.natDegree ∧ + P.natDegree ≤ Q.natDegree * (e + c) ∧ + ‖Polynomial.aeval ω P‖ ≤ + ‖Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Pol‖ * + (((c * b : ℕ) : ℝ) * max 1 ‖ω‖ ^ e) ^ Q.natDegree := by + classical + have hQ1 : Q ≠ 1 := by + rintro rfl + rw [eval₂_one] at hQroot + exact one_ne_zero hQroot + have hd0 : 0 < Q.natDegree := Nat.pos_of_ne_zero fun h => hQ1 (hQm.natDegree_eq_zero.1 h) + set d := Q.natDegree + set ψ : ℤ[X] →+* ℂ := eval₂RingHom (Int.castRingHom ℂ) ω + -- a common size bound for the coefficients of `Y^m mod Q`, `m < 2d` + obtain ⟨C, hC1, hC⟩ := exists_sz1_bound (Finset.range (2 * d) ×ˢ Finset.range d) + fun mj : ℕ × ℕ => (X ^ mj.1 %ₘ Q).coeff mj.2 + obtain ⟨c, hcK, hcC⟩ : ∃ c : ℕ, + (d * d.factorial : ℝ) * max 1 ‖ω₁‖ * (C * max 1 ‖ω‖ ^ C) ≤ c ∧ d.factorial * C ≤ c := + ⟨⌈(d * d.factorial : ℝ) * max 1 ‖ω₁‖ * (C * max 1 ‖ω‖ ^ C)⌉₊ + d.factorial * C, + (Nat.le_ceil _).trans (by exact_mod_cast Nat.le_add_right _ _), Nat.le_add_left _ _⟩ + refine ⟨c, fun Pol b e hPd hlen he hPol => ?_⟩ + -- the matrix of multiplication by `Pol` modulo `Q` + set M : Matrix (Fin d) (Fin d) ℤ[X] := fun j k => ((Pol * X ^ (k : ℕ)) %ₘ Q).coeff j + have hMe : ∀ j k : ℕ, ((Pol * X ^ k) %ₘ Q).coeff j = + ∑ n ∈ Pol.support, Pol.coeff n * (X ^ (n + k) %ₘ Q).coeff j := by + intro j k + conv_lhs => rw [Pol.as_sum_support_C_mul_X_pow, Finset.sum_mul, ← modByMonicHom_apply, map_sum] + rw [finsetSum_coeff] + refine Finset.sum_congr rfl fun n _ => ?_ + rw [mul_assoc, ← pow_add, ← smul_eq_C_mul, map_smul, AddMonoidAlgebra.coeff_smul_apply, + smul_eq_mul, + modByMonicHom_apply] + have hMsz : ∀ j k : Fin d, Sz1 (M j k) (b * C) (e + C) := by + intro j k + change Sz1 (((Pol * X ^ (k : ℕ)) %ₘ Q).coeff j) (b * C) (e + C) + rw [hMe] + refine sz1_mono (sz1_sum _ _ + (fun n => (∑ i ∈ (Pol.coeff n).support, ((Pol.coeff n).coeff i).natAbs) * C) + fun n hn => sz1_mul (sz1_mono (sz1_self _) le_rfl (he n)) (hC (n + k, j) ?_)) ?_ le_rfl + · have := le_natDegree_of_mem_supp n hn + exact Finset.mem_product.2 ⟨Finset.mem_range.2 (by omega), Finset.mem_range.2 j.2⟩ + · rw [← Finset.sum_mul] + exact Nat.mul_le_mul hlen le_rfl + -- the determinant: length and degree + have hdet : Sz1 M.det (d.factorial * (b * C) ^ d) (d * (e + C)) := by + rw [Matrix.det_apply] + refine sz1_mono (sz1_sum _ _ (fun _ => (b * C) ^ d) fun σ _ => ?_) (le_of_eq ?_) le_rfl + · have hp := sz1_prod Finset.univ (fun i => M (σ i) i) (fun _ => b * C) (fun _ => e + C) + fun i _ => hMsz _ _ + rw [Finset.prod_const, Finset.sum_const, Finset.card_univ, Fintype.card_fin, + smul_eq_mul] at hp + obtain h | h := Int.units_eq_one_or (Equiv.Perm.sign σ) + · rw [h, one_smul]; exact hp + · rw [h, Units.neg_smul, one_smul]; exact sz1_neg hp + · rw [Finset.sum_const, Finset.card_univ, Fintype.card_perm, Fintype.card_fin, smul_eq_mul] + -- `(1, ω₁, …, ω₁^(d-1))` is a left eigenvector of `ψ(M)`, with eigenvalue `Pol(ω, ω₁)` + set v : Fin d → ℂ := fun j => ω₁ ^ (j : ℕ) + have hvec : Matrix.vecMul v (M.map ψ) = eval₂ ψ ω₁ Pol • v := by + funext k + have h1 := eval₂_eq_sum_fin ψ ω₁ (d := d) + (natDegree_modByMonic_lt (Pol * X ^ (k : ℕ)) hQm hQ1) + rw [eval₂_modByMonic_eq_self_of_root hQroot, eval₂_mul, eval₂_X_pow] at h1 + change Matrix.vecMul v (M.map ψ) k = eval₂ ψ ω₁ Pol * ω₁ ^ (k : ℕ) + rw [h1] + simp only [Matrix.vecMul, dotProduct, Matrix.map_apply] + exact Finset.sum_congr rfl fun j _ => mul_comm _ _ + have hP0 : Pol ≠ 0 := by rintro rfl; exact hPol (eval₂_zero _ _) + have hb : 1 ≤ b := by + change 0 < b + refine lt_of_lt_of_le ?_ hlen + refine Finset.sum_pos (fun k hk => ?_) (nonempty_support_iff.2 hP0) + exact Finset.sum_pos (fun i hi => Int.natAbs_pos.2 (mem_support_iff.1 hi)) + (nonempty_support_iff.2 (mem_support_iff.1 hk)) + refine ⟨M.det, fun h0 => ?_, (length_le_of_sz1 hdet).trans ?_, + (natDegree_le_of_sz1 hdet).trans ?_, ?_⟩ + · -- `P ≠ 0` + obtain ⟨u, hu, hMu⟩ := Matrix.exists_mulVec_eq_zero_iff.2 h0 + have h1 : (M.map ψ).mulVec (ψ ∘ u) = 0 := funext fun i => by + rw [← RingHom.map_mulVec, hMu, Pi.zero_apply, map_zero, Pi.zero_apply] + have h2 := Matrix.dotProduct_mulVec v (M.map ψ) (ψ ∘ u) + rw [h1, dotProduct_zero, hvec, smul_dotProduct, smul_eq_mul] at h2 + have hU : eval₂ ψ ω₁ (Polynomial.ofFn d u) = dotProduct v (ψ ∘ u) := by + rw [eval₂_eq_sum_fin ψ ω₁ (ofFn_natDegree_lt hd0 u), dotProduct] + exact Finset.sum_congr rfl fun j _ => by rw [ofFn_coeff_eq_val_of_lt u j.2, mul_comm]; rfl + rw [← hU] at h2 + have hU0 := hQmin _ (ofFn_natDegree_lt hd0 u) ((mul_eq_zero.1 h2.symm).resolve_left hPol) + exact hu (injective_ofFn d (hU0.trans (map_zero _).symm)) + · -- the length + calc d.factorial * (b * C) ^ d ≤ d.factorial ^ d * (b * C) ^ d := + Nat.mul_le_mul (Nat.le_self_pow hd0.ne' _) le_rfl + _ = (d.factorial * C * b) ^ d := by ring + _ ≤ (c * b) ^ d := Nat.pow_le_pow_left (Nat.mul_le_mul hcC le_rfl) _ + · -- the degree + exact Nat.mul_le_mul le_rfl + (Nat.add_le_add_left ((Nat.le_mul_of_pos_left C (Nat.factorial_pos d)).trans hcC) e) + · -- the value + obtain ⟨t, ht⟩ : ∃ t : ℝ, t = ((b * C : ℕ) : ℝ) * max 1 ‖ω‖ ^ (e + C) := ⟨_, rfl⟩ + have ht1 : 1 ≤ t := ht ▸ one_le_mul_of_one_le_of_one_le + (by exact_mod_cast Nat.mul_le_mul hb hC1) (one_le_pow₀ (le_max_left _ _)) + have hent : ∀ j k, ‖(M.map ψ) j k‖ ≤ t := fun j k => ht ▸ norm_aeval_le_of_sz1 (hMsz j k) ω + have hadj : ∀ j, ‖(M.map ψ).adjugate j ⟨0, hd0⟩‖ ≤ d.factorial * t ^ d := by + intro j + rw [Matrix.adjugate_apply] + refine norm_det_le _ _ fun i k => ?_ + rw [Matrix.updateRow_apply] + split_ifs + · rw [Pi.single_apply] + split_ifs + · rw [norm_one]; exact ht1 + · rw [norm_zero]; exact zero_le_one.trans ht1 + · exact hent i k + have hsum : ‖Matrix.vecMul v (M.map ψ).adjugate ⟨0, hd0⟩‖ ≤ + d * (max 1 ‖ω₁‖ ^ d * (d.factorial * t ^ d)) := by + simp only [Matrix.vecMul, dotProduct] + refine (norm_sum_le _ _).trans ?_ + calc ∑ j, ‖v j * (M.map ψ).adjugate j ⟨0, hd0⟩‖ + ≤ ∑ _j : Fin d, max 1 ‖ω₁‖ ^ d * (d.factorial * t ^ d) := by + refine Finset.sum_le_sum fun j _ => ?_ + rw [norm_mul] + refine mul_le_mul ?_ (hadj j) (norm_nonneg _) + (pow_nonneg (zero_le_one.trans (le_max_left _ _)) _) + change ‖ω₁ ^ (j : ℕ)‖ ≤ _ + rw [norm_pow] + exact (pow_le_pow_left₀ (norm_nonneg _) (le_max_right _ _) _).trans + (pow_le_pow_right₀ (le_max_left _ _) j.2.le) + _ = _ := by rw [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + rw [show aeval ω M.det = (M.map ψ).det from RingHom.map_det ψ M, + det_factor hd0 _ v _ hvec (pow_zero ω₁), norm_mul] + refine mul_le_mul_of_nonneg_left (hsum.trans ?_) (norm_nonneg _) + have h1 : (1 : ℝ) ≤ d * d.factorial := by + exact_mod_cast Nat.mul_pos hd0 (Nat.factorial_pos d) + have ht0 : 0 ≤ max 1 ‖ω₁‖ * t := mul_nonneg (zero_le_one.trans (le_max_left _ _)) + (zero_le_one.trans ht1) + calc (d : ℝ) * (max 1 ‖ω₁‖ ^ d * (d.factorial * t ^ d)) + = (d * d.factorial : ℝ) * (max 1 ‖ω₁‖ * t) ^ d := by ring + _ ≤ (d * d.factorial : ℝ) ^ d * (max 1 ‖ω₁‖ * t) ^ d := + mul_le_mul_of_nonneg_right (le_self_pow₀ h1 hd0.ne') (pow_nonneg ht0 _) + _ = ((d * d.factorial : ℝ) * max 1 ‖ω₁‖ * (C * max 1 ‖ω‖ ^ C) * + (b * max 1 ‖ω‖ ^ e)) ^ d := by + rw [ht]; push_cast; ring + _ ≤ (((c * b : ℕ) : ℝ) * max 1 ‖ω‖ ^ e) ^ d := by + refine pow_le_pow_left₀ (by positivity) ?_ d + rw [Nat.cast_mul, mul_assoc (c : ℝ)] + exact mul_le_mul_of_nonneg_right hcK (by positivity) + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExistsIntPowRepr.lean b/LeanPool/FourExponentials/ExistsIntPowRepr.lean new file mode 100644 index 0000000000..da0e9d96a6 --- /dev/null +++ b/LeanPool/FourExponentials/ExistsIntPowRepr.lean @@ -0,0 +1,143 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.RingTheory.Localization.Integral +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.SplitIfs + +/-! +# Scaled powers of an algebraic number + +Let $K$ be a field of characteristic zero and let $\alpha\in K$ be algebraic over $\mathbb{Q}$. +There are $\ell,A\in\mathbb{N}$ and an integer $L\neq0$ such that for every $n\in\mathbb{N}$ there +are integers $r_0,\dots,r_{\ell-1}$ with $|r_l|\le A^{n}$ and +$$ L^{n}\alpha^{n}=\sum_{l<\ell}r_l\,\alpha^{l}. $$ + +Source: Standard. + +## Proof outline + +Since `ℚ` is the fraction field of `ℤ`, `α` has a non-constant annihilator `m ∈ ℤ[X]`; let `d` be +its degree and `L ≠ 0` its leading coefficient. Put `r₀ = 1` and `r_{n+1} = L X rₙ - c m`, where +`c` is the coefficient of `X^{d-1}` in `rₙ`. +* Each `rₙ` has degree `< d`: the coefficient of `X^d` in `L X rₙ` is `Lc`, which the subtraction + cancels, and all higher coefficients vanish. +* `rₙ(α) = Lⁿαⁿ`, by induction, since `m(α) = 0`. +* If `H` bounds the coefficients of `m` and `B` those of `rₙ`, the coefficients of `r_{n+1}` are at + most `|L| B + B H`: those of `X rₙ` are coefficients of `rₙ` or `0`, and `|c| ≤ B`. +So `ℓ = d` and `A = |L| + H` work, with `r l` the coefficient of `X^l` in `rₙ`. + +From `Diaz/Mirror/exists_int_pow_repr.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.exists_int_pow_repr`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace ExistsIntPowRepr + +open Polynomial + +/-- An algebraic number has a non-constant integer annihilator. -/ +theorem exists_int_annihilator {K : Type*} [Field K] [CharZero K] {α : K} + (hα : IsAlgebraic ℚ α) : ∃ m : ℤ[X], 0 < m.natDegree ∧ aeval α m = 0 := by + obtain ⟨p, hp0, hpα⟩ := (IsFractionRing.isAlgebraic_iff ℤ ℚ K).2 hα + refine ⟨p, Nat.pos_of_ne_zero fun h => ?_, hpα⟩ + rw [eq_C_of_natDegree_eq_zero h, aeval_C, eq_intCast (algebraMap ℤ K), Int.cast_eq_zero] at hpα + exact hp0 (by rw [eq_C_of_natDegree_eq_zero h, hpα, map_zero C]) + +variable (m : ℤ[X]) + +/-- `Lⁿ Xⁿ` reduced modulo `m`, where `L` is the leading coefficient of `m`. -/ +noncomputable def red : ℕ → ℤ[X] + | 0 => 1 + | n + 1 => C m.leadingCoeff * X * red n - C ((red n).coeff (m.natDegree - 1)) * m + +theorem red_natDegree (hd : 0 < m.natDegree) : ∀ n, (red m n).natDegree < m.natDegree + | 0 => by + rw [red, natDegree_one] + exact hd + | n + 1 => by + have ih := red_natDegree hd n + suffices h : (red m (n + 1)).natDegree ≤ m.natDegree - 1 by omega + rw [natDegree_le_iff_coeff_eq_zero] + intro j hj + obtain ⟨j', rfl⟩ : ∃ j', j = j' + 1 := ⟨j - 1, by omega⟩ + rw [red, coeff_sub, mul_assoc, coeff_C_mul, coeff_X_mul, coeff_C_mul] + rcases Nat.lt_or_ge m.natDegree (j' + 1) with hgt | hle + · rw [coeff_eq_zero_of_natDegree_lt hgt, coeff_eq_zero_of_natDegree_lt (by omega), mul_zero, + mul_zero, sub_zero] + · rw [show j' + 1 = m.natDegree by omega, coeff_natDegree, + show j' = m.natDegree - 1 by omega] + ring + +theorem aeval_red {K : Type*} [Field K] {α : K} (hα : aeval α m = 0) : + ∀ n, aeval α (red m n) = (m.leadingCoeff : K) ^ n * α ^ n + | 0 => by rw [red, map_one (aeval (R := ℤ) α), pow_zero, pow_zero, one_mul] + | n + 1 => by + rw [red, map_sub (aeval (R := ℤ) α), map_mul (aeval (R := ℤ) α), + map_mul (aeval (R := ℤ) α), map_mul (aeval (R := ℤ) α), aeval_C, aeval_C, aeval_X, hα, + aeval_red hα n, mul_zero, sub_zero, eq_intCast (algebraMap ℤ K), pow_succ, pow_succ] + ring + +theorem coeff_red_le {H : ℕ} (hH : ∀ i, (m.coeff i).natAbs ≤ H) : + ∀ n l, ((red m n).coeff l).natAbs ≤ (m.leadingCoeff.natAbs + H) ^ n + | 0, l => by + rw [red, coeff_one, pow_zero] + split_ifs + · rw [Int.natAbs_one] + · rw [Int.natAbs_zero] + exact Nat.zero_le 1 + | n + 1, l => by + have ih := coeff_red_le hH n + have hX : ((X * red m n).coeff l).natAbs ≤ (m.leadingCoeff.natAbs + H) ^ n := by + cases l with + | zero => + rw [coeff_X_mul_zero, Int.natAbs_zero] + exact Nat.zero_le _ + | succ j => + rw [coeff_X_mul] + exact ih j + rw [red, coeff_sub, mul_assoc, coeff_C_mul, coeff_C_mul, pow_succ] + refine (Int.natAbs_sub_le _ _).trans ?_ + rw [Int.natAbs_mul, Int.natAbs_mul] + calc _ ≤ m.leadingCoeff.natAbs * (m.leadingCoeff.natAbs + H) ^ n + + (m.leadingCoeff.natAbs + H) ^ n * H := + Nat.add_le_add (Nat.mul_le_mul le_rfl hX) (Nat.mul_le_mul (ih _) (hH l)) + _ = (m.leadingCoeff.natAbs + H) ^ n * (m.leadingCoeff.natAbs + H) := by ring + +end ExistsIntPowRepr + +open ExistsIntPowRepr Polynomial in +/-- **Scaled powers of an algebraic number.** Let $K$ be a field of characteristic zero and let +$\alpha\in K$ be algebraic over $\mathbb{Q}$. There are $\ell,A\in\mathbb{N}$ and an integer +$L\neq0$ such that for every $n\in\mathbb{N}$ there are integers $r_0,\dots,r_{\ell-1}$ with +$|r_l|\le A^{n}$ and +$$ L^{n}\alpha^{n}=\sum_{l<\ell}r_l\,\alpha^{l}. $$ -/ +theorem exists_int_pow_repr {K : Type*} [Field K] [CharZero K] {α : K} (hα : IsAlgebraic ℚ α) : + ∃ (ℓ A : ℕ) (L : ℤ), L ≠ 0 ∧ ∀ n : ℕ, ∃ r : ℕ → ℤ, + (L : K) ^ n * α ^ n = ∑ l ∈ Finset.range ℓ, (r l : K) * α ^ l ∧ + ∀ l, (r l).natAbs ≤ A ^ n := by + obtain ⟨m, hd, hmα⟩ := exists_int_annihilator hα + have hm0 : m ≠ 0 := by + rintro rfl + rw [natDegree_zero] at hd + exact lt_irrefl 0 hd + have hH : ∀ i, (m.coeff i).natAbs ≤ ∑ j ∈ m.support, (m.coeff j).natAbs := by + intro i + by_cases hi : i ∈ m.support + · exact Finset.single_le_sum (f := fun j => (m.coeff j).natAbs) (fun _ _ => Nat.zero_le _) hi + · rw [notMem_support_iff.1 hi, Int.natAbs_zero] + exact Nat.zero_le _ + refine ⟨m.natDegree, m.leadingCoeff.natAbs + ∑ j ∈ m.support, (m.coeff j).natAbs, + m.leadingCoeff, leadingCoeff_ne_zero.2 hm0, fun n => ⟨(red m n).coeff, ?_, coeff_red_le m hH n⟩⟩ + rw [← aeval_red m hmα n, aeval_eq_sum_range' (red_natDegree m hd n)] + simp only [zsmul_eq_mul] + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/ExistsIrreducibleFactorCofactorBound.lean b/LeanPool/FourExponentials/ExistsIrreducibleFactorCofactorBound.lean new file mode 100644 index 0000000000..dba2d993b2 --- /dev/null +++ b/LeanPool/FourExponentials/ExistsIrreducibleFactorCofactorBound.lean @@ -0,0 +1,162 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.NormResultantLeMaxNormEval +public import Mathlib.Algebra.AffineMonoid.Basic +public import Mathlib.Algebra.AffineMonoid.UniqueSums +public import Mathlib.NumberTheory.MahlerMeasure +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# The cofactor of the smallest irreducible factor is not small + +This is the multiplicative step of Gel'fond's lemma. Let `P ∈ ℤ[X]` have positive degree and let +`θ ∈ ℂ`. Among the non-constant irreducible factors of `P`, let `Q` be one at which `|Q(θ)|` is +least, let `e` be its multiplicity, and write `P = Q^e R`. Every irreducible factor `T` of `R` +either is a constant, and then trivially satisfies the bound below, or is coprime to `Q` with +`|Q(θ)| ≤ |T(θ)|`; the Liouville inequality through the resultant then bounds `|T(θ)|` from below. +The bound is multiplicative in `T`, so it passes to `R`: +`1 ≤ 2^(deg Q · deg R) · M(Q)^(deg R) · M(R)^(deg Q) · |R(θ)|`, with `M` the Mahler measure. + +From `Diaz/Mirror/exists_irreducible_factor_cofactor_bound.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.exists_irreducible_factor_cofactor_bound`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace ExistsIrreducibleFactorCofactorBound + +open Polynomial + +/-- An irreducible `Q ∈ ℤ[X]` of positive degree has a non-zero resultant with every polynomial it +does not divide: by Gauss's lemma the two are coprime in `ℚ[X]`. -/ +lemma resultant_ne_zero_of_not_dvd {Q T : ℤ[X]} (hQ : Irreducible Q) (hQd : 0 < Q.natDegree) + (h : ¬ Q ∣ T) : Q.resultant T ≠ 0 := by + have hprim : Q.IsPrimitive := hQ.isPrimitive hQd.ne' + have hQ' : Irreducible (Q.map (Int.castRingHom ℚ)) := + (IsPrimitive.Int.irreducible_iff_irreducible_map_cast hprim).mp hQ + have hcop : IsCoprime (Q.map (Int.castRingHom ℚ)) (T.map (Int.castRingHom ℚ)) := + (hQ'.coprime_iff_not_dvd).mpr fun hd => + h ((IsPrimitive.Int.dvd_iff_map_cast_dvd_map_cast Q T hprim).mpr hd) + intro h0 + apply resultant_ne_zero _ _ hcop + rw [natDegree_map_eq_of_injective Int.cast_injective, + natDegree_map_eq_of_injective Int.cast_injective, resultant_map_map, h0, + map_zero (Int.castRingHom ℚ)] + +lemma aeval_eq_eval_map (T : ℤ[X]) (θ : ℂ) : + aeval θ T = (T.map (Int.castRingHom ℂ)).eval θ := by + rw [aeval_def, eval₂_eq_eval_map, algebraMap_int_eq] + +/-- The lower bound that every factor of the cofactor satisfies. -/ +def Good (Q : ℤ[X]) (θ : ℂ) (T : ℤ[X]) : Prop := + T ≠ 0 ∧ 1 ≤ 2 ^ (Q.natDegree * T.natDegree) * + (Q.map (Int.castRingHom ℂ)).mahlerMeasure ^ T.natDegree * + (T.map (Int.castRingHom ℂ)).mahlerMeasure ^ Q.natDegree * ‖aeval θ T‖ + +lemma good_mul (Q : ℤ[X]) (θ : ℂ) (T₁ T₂ : ℤ[X]) (h₁ : Good Q θ T₁) (h₂ : Good Q θ T₂) : + Good Q θ (T₁ * T₂) := by + obtain ⟨hT₁, hb₁⟩ := h₁ + obtain ⟨hT₂, hb₂⟩ := h₂ + refine ⟨mul_ne_zero hT₁ hT₂, ?_⟩ + rw [natDegree_mul hT₁ hT₂, Polynomial.map_mul, mahlerMeasure_mul, map_mul (aeval θ), norm_mul, + mul_add, pow_add, pow_add, mul_pow] + calc (1 : ℝ) ≤ _ * _ := one_le_mul_of_one_le_of_one_le hb₁ hb₂ + _ = _ := by ring + +/-- A non-zero constant is `Good`, whatever its value. -/ +lemma good_C (Q : ℤ[X]) (θ : ℂ) {c : ℤ} (hc : c ≠ 0) : Good Q θ (C c) := by + refine ⟨C_ne_zero.2 hc, ?_⟩ + have h1 : (1 : ℝ) ≤ |(c : ℝ)| := by exact_mod_cast Int.one_le_abs hc + have hM : ((C c).map (Int.castRingHom ℂ)).mahlerMeasure = |(c : ℝ)| := by + rw [Polynomial.map_C, mahlerMeasure_const, eq_intCast (Int.castRingHom ℂ), Complex.norm_intCast] + have hv : ‖aeval θ (C c)‖ = |(c : ℝ)| := by + rw [aeval_C, algebraMap_int_eq, eq_intCast (Int.castRingHom ℂ), Complex.norm_intCast] + rw [natDegree_C, mul_zero, pow_zero, pow_zero, one_mul, one_mul, hM, hv] + exact one_le_mul_of_one_le_of_one_le (one_le_pow₀ h1) h1 + +/-- A factor `T` coprime to `Q` with `|Q(θ)| ≤ |T(θ)|` is `Good`, by the Liouville inequality. -/ +lemma good_of_not_dvd (Q T : ℤ[X]) (θ : ℂ) (hQ : Irreducible Q) (hQd : 0 < Q.natDegree) + (hT : T ≠ 0) (h : ¬ Q ∣ T) (hmin : ‖aeval θ Q‖ ≤ ‖aeval θ T‖) : Good Q θ T := by + refine ⟨hT, ?_⟩ + have hres : 1 ≤ ‖(Q.map (Int.castRingHom ℂ)).resultant (T.map (Int.castRingHom ℂ))‖ := by + rw [natDegree_map_eq_of_injective Int.cast_injective, + natDegree_map_eq_of_injective Int.cast_injective, resultant_map_map, + eq_intCast (Int.castRingHom ℂ), Complex.norm_intCast] + exact_mod_cast Int.one_le_abs (resultant_ne_zero_of_not_dvd hQ hQd h) + have hl := hres.trans (Transcendence.norm_resultant_le_max_norm_eval _ _ + (one_le_mahlerMeasure_of_ne_zero hQ.ne_zero) (one_le_mahlerMeasure_of_ne_zero hT) θ) + rwa [natDegree_map_eq_of_injective Int.cast_injective, + natDegree_map_eq_of_injective Int.cast_injective, ← aeval_eq_eval_map, ← aeval_eq_eval_map, + max_eq_right hmin] at hl + +end ExistsIrreducibleFactorCofactorBound + +open Polynomial ExistsIrreducibleFactorCofactorBound in +/-- **The cofactor of an irreducible factor.** Let $P\in\mathbb{Z}[X]$ have positive degree and let +$\theta\in\mathbb{C}$. Then $P=Q^{e}R$ with $Q,R\in\mathbb{Z}[X]$, $Q$ irreducible of positive +degree, $e\ge1$, and +$$ 1\le2^{\deg Q\deg R}M(Q)^{\deg R}M(R)^{\deg Q}|R(\theta)|. $$ -/ +theorem exists_irreducible_factor_cofactor_bound (P : Polynomial ℤ) (hP : 0 < P.natDegree) + (θ : ℂ) : + ∃ (Q R : Polynomial ℤ) (e : ℕ), Irreducible Q ∧ 0 < Q.natDegree ∧ 0 < e ∧ P = Q ^ e * R ∧ + 1 ≤ 2 ^ (Q.natDegree * R.natDegree) * + (Q.map (Int.castRingHom ℂ)).mahlerMeasure ^ R.natDegree * + (R.map (Int.castRingHom ℂ)).mahlerMeasure ^ Q.natDegree * ‖Polynomial.aeval θ R‖ := by + classical + have hP0 : P ≠ 0 := by rintro rfl; simp at hP + set S := UniqueFactorizationMonoid.normalizedFactors P with hS + have hirr : ∀ T ∈ S, Irreducible T := fun T hT => + UniqueFactorizationMonoid.irreducible_of_normalized_factor T hT + -- `P = S.prod · C r` with `r` a unit + obtain ⟨u, hu⟩ := UniqueFactorizationMonoid.prod_normalizedFactors hP0 + obtain ⟨r, hr, hru⟩ := Polynomial.isUnit_iff.1 u.isUnit + have hPS : P = S.prod * C r := by rw [hru]; exact hu.symm + -- some irreducible factor is not constant; take one of least value at `θ` + have hne : (S.filter fun T => 0 < T.natDegree).toFinset.Nonempty := by + by_contra hemp + rw [Finset.not_nonempty_iff_eq_empty, Multiset.toFinset_eq_empty, + Multiset.filter_eq_nil] at hemp + have h0 : (S.prod * C r).natDegree = 0 := by + rw [natDegree_mul_C hr.ne_zero] + refine Nat.eq_zero_of_le_zero ((natDegree_multiset_prod_le _).trans ?_) + rw [Multiset.sum_eq_zero fun d hd => ?_] + obtain ⟨T, hT, rfl⟩ := Multiset.mem_map.1 hd + exact Nat.eq_zero_of_not_pos (hemp T hT) + rw [← hPS] at h0 + omega + obtain ⟨Q, hQS', hmin⟩ := Finset.exists_min_image _ (fun T => ‖aeval θ T‖) hne + obtain ⟨hQS, hQd⟩ := Multiset.mem_filter.1 (Multiset.mem_toFinset.1 hQS') + have hQirr := hirr Q hQS + -- the cofactor + set R₀ := (S.filter fun T => T ≠ Q).prod with hR₀ + have hprod : S.prod = Q ^ S.count Q * R₀ := by + conv_lhs => rw [← Multiset.filter_add_not (fun T => T = Q) S] + rw [Multiset.prod_add, Multiset.filter_eq', Multiset.prod_replicate] + have hgood : Good Q θ R₀ := by + refine Multiset.prod_induction (Good Q θ) _ (good_mul Q θ) ⟨one_ne_zero, by simp⟩ + fun T hT => ?_ + obtain ⟨hTS, hTQ⟩ := Multiset.mem_filter.1 hT + have hT0 := UniqueFactorizationMonoid.ne_zero_of_mem_normalizedFactors hTS + rcases Nat.eq_zero_or_pos T.natDegree with hTd | hTd + · rw [eq_C_of_natDegree_eq_zero hTd] at hT0 ⊢ + exact good_C Q θ fun h => hT0 (by rw [h, map_zero (C : ℤ →+* ℤ[X])]) + refine good_of_not_dvd Q T θ hQirr hQd hT0 (fun hd => hTQ ?_) + (hmin T (Multiset.mem_toFinset.2 (Multiset.mem_filter.2 ⟨hTS, hTd⟩))) + have hn := normalize_eq_normalize hd (hQirr.associated_of_dvd (hirr T hTS) hd).symm.dvd + rwa [UniqueFactorizationMonoid.normalize_normalized_factor Q hQS, + UniqueFactorizationMonoid.normalize_normalized_factor T hTS, eq_comm] at hn + obtain ⟨-, hbound⟩ := good_mul Q θ R₀ (C r) hgood (good_C Q θ hr.ne_zero) + exact ⟨Q, R₀ * C r, S.count Q, hQirr, hQd, Multiset.count_pos.2 hQS, + by rw [hPS, hprod, mul_assoc], hbound⟩ + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/ExistsIteratedDerivPresentation.lean b/LeanPool/FourExponentials/ExistsIteratedDerivPresentation.lean new file mode 100644 index 0000000000..fd689abc0a --- /dev/null +++ b/LeanPool/FourExponentials/ExistsIteratedDerivPresentation.lean @@ -0,0 +1,597 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsIntPowRepr +public import LeanPool.FourExponentials.LengthMulLe +public import LeanPool.FourExponentials.LengthSumLe +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.SpecialFunctions.ExpDeriv +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.FunProp +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.SplitIfs + +/-! +# Integer presentations of the derivatives of the auxiliary exponential polynomial + +Write `φ(P) = P(ω, ω₁)` for `P ∈ ℤ[X][Y]`, `δ = φ(D)`, `β = j x₁ + k x₂` and `ζ = a y₁ + b y₂`. + +* **Leibniz.** `(z^i e^(βz))⁽ᵐ⁾(ζ) = ∑_{l ≤ m} C(m,l) i(i-1)⋯(i-l+1) ζ^(i-l) β^(m-l) e^(βζ)`, + and the `m`-th derivative is linear in the coefficients `f_{ijk}`. +* **Polynomial factors.** Since `δβ = φ(j E₀ + k E₁)` and `δζ = φ(a G₀ + b G₁)`, for `l ≤ i < S` + the number `δ^(m+S) ζ^(i-l) β^(m-l)` is `φ` of + `D^l (j E₀ + k E₁)^(m-l) (a G₀ + b G₁)^(i-l) D^(S-i+l)`. For `l > i` the Leibniz term vanishes. +* **Exponential factor.** `e^(βζ) = α₀₀^(ja) α₀₁^(jb) α₁₀^(ka) α₁₁^(kb)` with `α_{pq} = e^(x_p y_q)` + algebraic. For each `α_{pq}` there are `ℓ`, `A` and an integer `L ≠ 0` with + `Lⁿ αⁿ = ∑_{t<ℓ} r_t α^t` and `|r_t| ≤ Aⁿ`. As `δα = φ(H)`, the number + `δ^(ℓ-1) L^N αⁿ = L^(N-n) ∑_t r_t (δα)^t δ^(ℓ-1-t)` (for `n ≤ N`) is `φ` of an integer polynomial + of length at most `|L|^(N-n) ℓ Aⁿ c^(ℓ-1)` and degrees at most `(ℓ-1) c`, where `c` bounds the + data. With `N = T(a+b)` the four factors present `Λ' e^(βζ)`, `Λ' = ∏ δ^(ℓ_{pq}-1) L_{pq}^N`, + and `Λ = δ^(m+S) Λ'`. +* **Sizes.** Lengths are controlled by `len(PQ) ≤ len(P) len(Q)` and `len(∑ Pᵢ) ≤ ∑ len(Pᵢ)`; the + degrees in `X` and `Y` add up under products. The lengths of the `P_{ijk}` are at most + `K^(4m+S) W^(4(N+1))` with `K = 2(1+m+S+T+a+b)c` and `W` depending only on the data, and their + degrees at most `(2m+S)c + 4W`. + +From `Diaz/Mirror/exists_iteratedDeriv_presentation.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.exists_iteratedDeriv_presentation`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace ExistsIteratedDerivPresentation + +open Polynomial + +/-! ### Length and size of integer polynomials in two variables -/ + +/-- The length of `P ∈ ℤ[X][Y]`: the sum of the absolute values of all its integer coefficients. -/ +noncomputable def len (P : ℤ[X][X]) : ℕ := + ∑ r ∈ P.support, ∑ h ∈ (P.coeff r).support, ((P.coeff r).coeff h).natAbs + +lemma len_mul (P Q : ℤ[X][X]) : len (P * Q) ≤ len P * len Q := + Transcendence.length_mul_le P Q + +lemma len_sum {ι : Type*} (s : Finset ι) (f : ι → ℤ[X][X]) : + len (∑ i ∈ s, f i) ≤ ∑ i ∈ s, len (f i) := + Transcendence.length_sum_le s f + +lemma len_add (P Q : ℤ[X][X]) : len (P + Q) ≤ len P + len Q := by + have h := len_sum (Finset.univ : Finset (Fin 2)) ![P, Q] + rw [Fin.sum_univ_two, Fin.sum_univ_two] at h + exact h + +lemma len_CC (z : ℤ) : len (C (C z)) = z.natAbs := by + rcases eq_or_ne z 0 with rfl | hz + · rw [Polynomial.C_0, Polynomial.C_0, len, Polynomial.support_zero, Finset.sum_empty, + Int.natAbs_zero] + · rw [len, Polynomial.support_C (Polynomial.C_ne_zero.2 hz), Finset.sum_singleton, + Polynomial.coeff_C_zero, Polynomial.support_C hz, Finset.sum_singleton, + Polynomial.coeff_C_zero] + +/-- `P` has length at most `b`, and degrees at most `d` in `X` and in `Y`. -/ +def Sz (P : ℤ[X][X]) (b d : ℕ) : Prop := + len P ≤ b ∧ (∀ r, (P.coeff r).natDegree ≤ d) ∧ P.natDegree ≤ d + +lemma sz_mono {P : ℤ[X][X]} {b b' d d' : ℕ} (h : Sz P b d) (hb : b ≤ b') (hd : d ≤ d') : + Sz P b' d' := + ⟨h.1.trans hb, fun r => (h.2.1 r).trans hd, h.2.2.trans hd⟩ + +lemma sz_mul {P Q : ℤ[X][X]} {b₁ b₂ d₁ d₂ : ℕ} (hP : Sz P b₁ d₁) (hQ : Sz Q b₂ d₂) : + Sz (P * Q) (b₁ * b₂) (d₁ + d₂) := by + refine ⟨(len_mul P Q).trans (Nat.mul_le_mul hP.1 hQ.1), fun r => ?_, + Polynomial.natDegree_mul_le.trans (Nat.add_le_add hP.2.2 hQ.2.2)⟩ + rw [Polynomial.coeff_mul] + exact Polynomial.natDegree_sum_le_of_forall_le _ _ fun x _ => + Polynomial.natDegree_mul_le.trans (Nat.add_le_add (hP.2.1 x.1) (hQ.2.1 x.2)) + +lemma sz_add {P Q : ℤ[X][X]} {b₁ b₂ d : ℕ} (hP : Sz P b₁ d) (hQ : Sz Q b₂ d) : + Sz (P + Q) (b₁ + b₂) d := by + refine ⟨(len_add P Q).trans (Nat.add_le_add hP.1 hQ.1), fun r => ?_, + (Polynomial.natDegree_add_le P Q).trans (max_le hP.2.2 hQ.2.2)⟩ + rw [Polynomial.coeff_add] + exact (Polynomial.natDegree_add_le _ _).trans (max_le (hP.2.1 r) (hQ.2.1 r)) + +lemma sz_sum {ι : Type*} (s : Finset ι) (f : ι → ℤ[X][X]) {b d : ℕ} + (h : ∀ i ∈ s, Sz (f i) b d) : Sz (∑ i ∈ s, f i) (s.card * b) d := by + refine ⟨(len_sum s f).trans ?_, fun r => ?_, + Polynomial.natDegree_sum_le_of_forall_le _ _ fun i hi => (h i hi).2.2⟩ + · rw [← smul_eq_mul, ← Finset.sum_const] + exact Finset.sum_le_sum fun i hi => (h i hi).1 + · rw [Polynomial.finsetSum_coeff] + exact Polynomial.natDegree_sum_le_of_forall_le _ _ fun i hi => (h i hi).2.1 r + +lemma sz_CC (z : ℤ) : Sz (C (C z)) z.natAbs 0 := by + refine ⟨(len_CC z).le, fun r => ?_, (Polynomial.natDegree_C _).le⟩ + rw [Polynomial.coeff_C] + split_ifs + · exact (Polynomial.natDegree_C z).le + · exact Polynomial.natDegree_zero.le + +lemma sz_CN (n : ℕ) : Sz (C (C (n : ℤ))) n 0 := + sz_CC (n : ℤ) + +lemma sz_one : Sz 1 1 0 := by + have h := sz_CC 1 + rw [Polynomial.C_1, Polynomial.C_1] at h + exact h + +lemma sz_pow {P : ℤ[X][X]} {b d : ℕ} (h : Sz P b d) : ∀ n : ℕ, Sz (P ^ n) (b ^ n) (n * d) + | 0 => by + rw [pow_zero, pow_zero, Nat.zero_mul] + exact sz_one + | n + 1 => by + rw [pow_succ, pow_succ, Nat.succ_mul] + exact sz_mul (sz_pow h n) h + +lemma sz_exists (P : ℤ[X][X]) : ∃ c, Sz P c c := by + refine ⟨len P + (∑ k ∈ Finset.range (P.natDegree + 1), (P.coeff k).natDegree) + P.natDegree, + by omega, fun r => ?_, by omega⟩ + by_cases hr : r ≤ P.natDegree + · have : (P.coeff r).natDegree ≤ ∑ k ∈ Finset.range (P.natDegree + 1), (P.coeff k).natDegree := + Finset.single_le_sum (f := fun k => (P.coeff k).natDegree) (fun _ _ => Nat.zero_le _) + (Finset.mem_range.2 (Nat.lt_succ_of_le hr)) + omega + · rw [Polynomial.coeff_eq_zero_of_natDegree_lt (not_le.1 hr), Polynomial.natDegree_zero] + exact Nat.zero_le _ + +lemma sz_exists_fam {ι : Type*} [Finite ι] (F : ι → ℤ[X][X]) : ∃ c, ∀ i, Sz (F i) c c := by + have := Fintype.ofFinite ι + choose c hc using fun i => sz_exists (F i) + have hle : ∀ i, c i ≤ ∑ i', c i' := fun i => + Finset.single_le_sum (f := c) (fun _ _ => Nat.zero_le _) (Finset.mem_univ i) + exact ⟨∑ i, c i, fun i => sz_mono (hc i) (hle i) (hle i)⟩ + +lemma exists_bound_fin2 (w : Fin 2 → Fin 2 → ℕ) : ∃ W, ∀ p q, w p q ≤ W := + ⟨∑ p, ∑ q, w p q, fun p q => + (Finset.single_le_sum (f := fun q' => w p q') (fun _ _ => Nat.zero_le _) + (Finset.mem_univ q)).trans + (Finset.single_le_sum (f := fun p' => ∑ q', w p' q') (fun _ _ => Nat.zero_le _) + (Finset.mem_univ p))⟩ + +lemma succ_le_two_pow : ∀ m : ℕ, m + 1 ≤ 2 ^ m + | 0 => le_rfl + | m + 1 => by + have := succ_le_two_pow m + rw [pow_succ] + omega + +/-! ### Values of integer polynomials -/ + +lemma phi_CC (φ : ℤ[X][X] →+* ℂ) (z : ℤ) : φ (C (C z)) = (z : ℂ) := + eq_intCast (φ.comp ((C : ℤ[X] →+* ℤ[X][X]).comp (C : ℤ →+* ℤ[X]))) z + +/-- If `u φ(D) = φ(U)` and `v φ(D) = φ(V)`, then `(p u + q v) φ(D) = φ(p U + q V)`. -/ +lemma lin_eval (φ : ℤ[X][X] →+* ℂ) {u v : ℂ} {Dp U V : ℤ[X][X]} (hU : u * φ Dp = φ U) + (hV : v * φ Dp = φ V) (p q : ℕ) : + ((p : ℂ) * u + (q : ℂ) * v) * φ Dp = φ (C (C (p : ℤ)) * U + C (C (q : ℤ)) * V) := by + rw [map_add φ, map_mul φ, map_mul φ, phi_CC φ, phi_CC φ, ← hU, ← hV, Int.cast_natCast, + Int.cast_natCast] + ring + +lemma sz_lin {U V : ℤ[X][X]} {c : ℕ} (hU : Sz U c c) (hV : Sz V c c) (p q : ℕ) : + Sz (C (C (p : ℤ)) * U + C (C (q : ℤ)) * V) ((p + q) * c) c := + sz_mono (sz_add (sz_mul (sz_CN p) hU) (sz_mul (sz_CN q) hV)) (Nat.add_mul p q c).symm.le + (Nat.zero_add c).le + +/-! ### The four exponential factors -/ + +/-- With `r` the coordinates of `Lⁿ αⁿ` in the basis `1, α, …, α^(ℓ-1)` and `φ(H) = α φ(D)`, this +integer polynomial takes the value `φ(D)^(ℓ-1) Lⁿ αⁿ`. -/ +noncomputable def expPres (ℓ : ℕ) (r : ℕ → ℤ) (Hp Dp : ℤ[X][X]) : ℤ[X][X] := + ∑ t ∈ Finset.range ℓ, C (C (r t)) * Hp ^ t * Dp ^ (ℓ - 1 - t) + +lemma expPres_eval (φ : ℤ[X][X] →+* ℂ) (ℓ : ℕ) (r : ℕ → ℤ) (Hp Dp : ℤ[X][X]) {α : ℂ} + (hH : α * φ Dp = φ Hp) : + φ (expPres ℓ r Hp Dp) = φ Dp ^ (ℓ - 1) * ∑ t ∈ Finset.range ℓ, (r t : ℂ) * α ^ t := by + rw [expPres, map_sum φ, Finset.mul_sum] + refine Finset.sum_congr rfl fun t ht => ?_ + have ht' := Finset.mem_range.1 ht + have hsplit : φ Dp ^ (ℓ - 1) = φ Dp ^ t * φ Dp ^ (ℓ - 1 - t) := by + rw [← pow_add] + congr 1 + omega + rw [map_mul φ, map_mul φ, map_pow φ, map_pow φ, ← hH, phi_CC φ, hsplit, mul_pow] + ring + +lemma sz_expPres (ℓ : ℕ) (r : ℕ → ℤ) {Hp Dp : ℤ[X][X]} {c R : ℕ} (hH : Sz Hp c c) + (hD : Sz Dp c c) (hr : ∀ t, (r t).natAbs ≤ R) : + Sz (expPres ℓ r Hp Dp) (ℓ * (R * c ^ (ℓ - 1))) ((ℓ - 1) * c) := by + have h : Sz (expPres ℓ r Hp Dp) ((Finset.range ℓ).card * (R * c ^ (ℓ - 1))) ((ℓ - 1) * c) := + sz_sum (Finset.range ℓ) _ fun t ht => by + have ht' := Finset.mem_range.1 ht + have he : t + (ℓ - 1 - t) = ℓ - 1 := by omega + refine sz_mono (sz_mul (sz_mul (sz_CC (r t)) (sz_pow hH t)) (sz_pow hD (ℓ - 1 - t))) ?_ ?_ + · rw [Nat.mul_assoc, ← pow_add, he] + exact Nat.mul_le_mul_right _ (hr t) + · rw [Nat.zero_add, ← Nat.add_mul, he] + rw [Finset.card_range] at h + exact h + +/-- `φ(D)^(ℓ-1) L^N αⁿ` as an integer polynomial, for `n ≤ N`. -/ +noncomputable def fac (ℓ : ℕ) (r : ℕ → ℕ → ℤ) (Lc : ℤ) (Hp Dp : ℤ[X][X]) (N n : ℕ) : ℤ[X][X] := + C (C (Lc ^ (N - n))) * expPres ℓ (r n) Hp Dp + +lemma fac_eval (φ : ℤ[X][X] →+* ℂ) (ℓ : ℕ) (r : ℕ → ℕ → ℤ) (Lc : ℤ) (Hp Dp : ℤ[X][X]) {α : ℂ} + (hH : α * φ Dp = φ Hp) + (hr : ∀ n, (Lc : ℂ) ^ n * α ^ n = ∑ t ∈ Finset.range ℓ, (r n t : ℂ) * α ^ t) + {N n : ℕ} (hn : n ≤ N) : + φ (fac ℓ r Lc Hp Dp N n) = φ Dp ^ (ℓ - 1) * (Lc : ℂ) ^ N * α ^ n := by + rw [fac, map_mul φ, phi_CC φ, expPres_eval φ ℓ (r n) Hp Dp hH, ← hr n, Int.cast_pow] + have hsplit : (Lc : ℂ) ^ N = (Lc : ℂ) ^ (N - n) * (Lc : ℂ) ^ n := by + rw [← pow_add, Nat.sub_add_cancel hn] + rw [hsplit] + ring + +lemma sz_fac (ℓ : ℕ) (r : ℕ → ℕ → ℤ) (Lc : ℤ) {Hp Dp : ℤ[X][X]} {c A W : ℕ} + (hH : Sz Hp c c) (hD : Sz Dp c c) (hr : ∀ n t, (r n t).natAbs ≤ A ^ n) + (hW : ℓ * c ^ (ℓ - 1) ≤ W ∧ (ℓ - 1) * c ≤ W ∧ Lc.natAbs ≤ W ∧ A ≤ W) {N n : ℕ} + (hn : n ≤ N) : Sz (fac ℓ r Lc Hp Dp N n) (W ^ (N + 1)) W := by + refine sz_mono (sz_mul (sz_CC _) (sz_expPres ℓ (r n) hH hD (hr n))) ?_ + ((Nat.zero_add _).trans_le hW.2.1) + rw [Int.natAbs_pow] + calc Lc.natAbs ^ (N - n) * (ℓ * (A ^ n * c ^ (ℓ - 1))) + = Lc.natAbs ^ (N - n) * A ^ n * (ℓ * c ^ (ℓ - 1)) := by ring + _ ≤ W ^ (N - n) * W ^ n * W := + Nat.mul_le_mul (Nat.mul_le_mul (Nat.pow_le_pow_left hW.2.2.1 _) + (Nat.pow_le_pow_left hW.2.2.2 _)) hW.1 + _ = W ^ (N + 1) := by rw [← pow_add, Nat.sub_add_cancel hn, pow_succ] + +/-- The product of the four factors, presenting `Λ' e^((j x₁ + k x₂)(a y₁ + b y₂))`. -/ +noncomputable def epart (ℓ : Fin 2 → Fin 2 → ℕ) (r : Fin 2 → Fin 2 → ℕ → ℕ → ℤ) + (L : Fin 2 → Fin 2 → ℤ) (H : Fin 2 → Fin 2 → ℤ[X][X]) (Dp : ℤ[X][X]) (N a b j k : ℕ) : + ℤ[X][X] := + fac (ℓ 0 0) (r 0 0) (L 0 0) (H 0 0) Dp N (j * a) * + fac (ℓ 0 1) (r 0 1) (L 0 1) (H 0 1) Dp N (j * b) * + fac (ℓ 1 0) (r 1 0) (L 1 0) (H 1 0) Dp N (k * a) * + fac (ℓ 1 1) (r 1 1) (L 1 1) (H 1 1) Dp N (k * b) + +/-- The constant `Λ' = ∏_{p,q} δ^(ℓ_{pq}-1) L_{pq}^N`. -/ +noncomputable def existsIteratedDerivPresentationLam (δ : ℂ) (ℓ : Fin 2 → Fin 2 → ℕ) (L : Fin 2 → + Fin 2 → ℤ) (N : ℕ) : ℂ := + δ ^ (ℓ 0 0 - 1) * (L 0 0 : ℂ) ^ N * (δ ^ (ℓ 0 1 - 1) * (L 0 1 : ℂ) ^ N) * + (δ ^ (ℓ 1 0 - 1) * (L 1 0 : ℂ) ^ N) * (δ ^ (ℓ 1 1 - 1) * (L 1 1 : ℂ) ^ N) + +lemma exp_split (x₁ x₂ y₁ y₂ : ℂ) (a b j k : ℕ) : + Complex.exp (((j : ℂ) * x₁ + (k : ℂ) * x₂) * ((a : ℂ) * y₁ + (b : ℂ) * y₂)) = + Complex.exp (![x₁, x₂] 0 * ![y₁, y₂] 0) ^ (j * a) * + Complex.exp (![x₁, x₂] 0 * ![y₁, y₂] 1) ^ (j * b) * + Complex.exp (![x₁, x₂] 1 * ![y₁, y₂] 0) ^ (k * a) * + Complex.exp (![x₁, x₂] 1 * ![y₁, y₂] 1) ^ (k * b) := by + change _ = Complex.exp (x₁ * y₁) ^ (j * a) * Complex.exp (x₁ * y₂) ^ (j * b) * + Complex.exp (x₂ * y₁) ^ (k * a) * Complex.exp (x₂ * y₂) ^ (k * b) + rw [← Complex.exp_nat_mul, ← Complex.exp_nat_mul, ← Complex.exp_nat_mul, ← Complex.exp_nat_mul, + ← Complex.exp_add, ← Complex.exp_add, ← Complex.exp_add] + congr 1 + push_cast + ring + +lemma epart_eval (φ : ℤ[X][X] →+* ℂ) (x₁ x₂ y₁ y₂ : ℂ) (ℓ : Fin 2 → Fin 2 → ℕ) + (r : Fin 2 → Fin 2 → ℕ → ℕ → ℤ) (L : Fin 2 → Fin 2 → ℤ) (H : Fin 2 → Fin 2 → ℤ[X][X]) + (Dp : ℤ[X][X]) (hH : ∀ p q, Complex.exp (![x₁, x₂] p * ![y₁, y₂] q) * φ Dp = φ (H p q)) + (hr : ∀ p q n, (L p q : ℂ) ^ n * Complex.exp (![x₁, x₂] p * ![y₁, y₂] q) ^ n = + ∑ t ∈ Finset.range (ℓ p q), (r p q n t : ℂ) * Complex.exp (![x₁, x₂] p * ![y₁, y₂] q) ^ t) + {N a b j k : ℕ} (h1 : j * a ≤ N) (h2 : j * b ≤ N) (h3 : k * a ≤ N) (h4 : k * b ≤ N) : + φ (epart ℓ r L H Dp N a b j k) = existsIteratedDerivPresentationLam (φ Dp) ℓ L N * + Complex.exp (((j : ℂ) * x₁ + (k : ℂ) * x₂) * ((a : ℂ) * y₁ + (b : ℂ) * y₂)) := by + rw [epart, map_mul φ, map_mul φ, map_mul φ, + fac_eval φ _ _ _ _ _ (hH 0 0) (hr 0 0) h1, fac_eval φ _ _ _ _ _ (hH 0 1) (hr 0 1) h2, + fac_eval φ _ _ _ _ _ (hH 1 0) (hr 1 0) h3, fac_eval φ _ _ _ _ _ (hH 1 1) (hr 1 1) h4, + exp_split x₁ x₂ y₁ y₂ a b j k, existsIteratedDerivPresentationLam] + ring + +lemma sz_epart (ℓ : Fin 2 → Fin 2 → ℕ) (r : Fin 2 → Fin 2 → ℕ → ℕ → ℤ) (L : Fin 2 → Fin 2 → ℤ) + (A : Fin 2 → Fin 2 → ℕ) {H : Fin 2 → Fin 2 → ℤ[X][X]} {Dp : ℤ[X][X]} {c W : ℕ} + (hH : ∀ p q, Sz (H p q) c c) (hD : Sz Dp c c) + (hr : ∀ p q n t, (r p q n t).natAbs ≤ A p q ^ n) + (hW : ∀ p q, ℓ p q * c ^ (ℓ p q - 1) ≤ W ∧ (ℓ p q - 1) * c ≤ W ∧ (L p q).natAbs ≤ W ∧ + A p q ≤ W) + {N a b j k : ℕ} (h1 : j * a ≤ N) (h2 : j * b ≤ N) (h3 : k * a ≤ N) (h4 : k * b ≤ N) : + Sz (epart ℓ r L H Dp N a b j k) (W ^ (4 * (N + 1))) (4 * W) := by + have hf : ∀ p q n, n ≤ N → Sz (fac (ℓ p q) (r p q) (L p q) (H p q) Dp N n) (W ^ (N + 1)) W := + fun p q n hn => sz_fac (ℓ p q) (r p q) (L p q) (hH p q) hD (hr p q) (hW p q) hn + exact sz_mono (sz_mul (sz_mul (sz_mul (hf 0 0 _ h1) (hf 0 1 _ h2)) (hf 1 0 _ h3)) (hf 1 1 _ h4)) + (le_of_eq (by ring)) (by omega) + +lemma lam_ne_zero {δ : ℂ} (hδ : δ ≠ 0) (ℓ : Fin 2 → Fin 2 → ℕ) {L : Fin 2 → Fin 2 → ℤ} + (hL : ∀ p q, L p q ≠ 0) (N : ℕ) : existsIteratedDerivPresentationLam δ ℓ L N ≠ 0 := by + have hf : ∀ p q, δ ^ (ℓ p q - 1) * (L p q : ℂ) ^ N ≠ 0 := fun p q => + mul_ne_zero (pow_ne_zero _ hδ) (pow_ne_zero _ (Int.cast_ne_zero.2 (hL p q))) + exact mul_ne_zero (mul_ne_zero (mul_ne_zero (hf 0 0) (hf 0 1)) (hf 1 0)) (hf 1 1) + +lemma norm_mul_le_pow {x y : ℂ} {C : ℝ} {p q : ℕ} (hx : ‖x‖ ≤ C ^ p) (hy : ‖y‖ ≤ C ^ q) : + ‖x * y‖ ≤ C ^ (p + q) := by + rw [norm_mul, pow_add] + exact mul_le_mul hx hy (norm_nonneg y) ((norm_nonneg x).trans hx) + +lemma norm_pow_le_pow {x : ℂ} {C : ℝ} (hx : ‖x‖ ≤ C) (n : ℕ) : ‖x ^ n‖ ≤ C ^ n := by + rw [norm_pow] + exact pow_le_pow_left₀ (norm_nonneg x) hx n + +lemma norm_lam_le {δ : ℂ} {C : ℝ} (hδ : ‖δ‖ ≤ C) (ℓ : Fin 2 → Fin 2 → ℕ) + {L : Fin 2 → Fin 2 → ℤ} (hL : ∀ p q, ‖(L p q : ℂ)‖ ≤ C) (N : ℕ) : + ‖existsIteratedDerivPresentationLam δ ℓ L N‖ ≤ + C ^ (ℓ 0 0 - 1 + N + (ℓ 0 1 - 1 + N) + (ℓ 1 0 - 1 + N) + (ℓ 1 1 - 1 + N)) := by + have hf : ∀ p q, ‖δ ^ (ℓ p q - 1) * (L p q : ℂ) ^ N‖ ≤ C ^ (ℓ p q - 1 + N) := fun p q => + norm_mul_le_pow (norm_pow_le_pow hδ _) (norm_pow_le_pow (hL p q) N) + exact norm_mul_le_pow (norm_mul_le_pow (norm_mul_le_pow (hf 0 0) (hf 0 1)) (hf 1 0)) (hf 1 1) + +/-! ### The presentation of the derivative -/ + +/-- Leibniz's rule for the exponential polynomial, linearly in its coefficients. -/ +lemma iteratedDeriv_expPoly (S T m : ℕ) (x₁ x₂ : ℂ) (f : Fin S → Fin T → Fin T → ℂ) (w : ℂ) : + iteratedDeriv m (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) w = + ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, f i j k * + ∑ l ∈ Finset.range (m + 1), (m.choose l : ℂ) * + (((i : ℕ).descFactorial l : ℂ) * w ^ ((i : ℕ) - l)) * + ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) ^ (m - l) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * w)) := by + have key : ∀ (i : Fin S) (j k : Fin T), iteratedDeriv m (fun z : ℂ => + f i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) w = + f i j k * ∑ l ∈ Finset.range (m + 1), (m.choose l : ℂ) * + (((i : ℕ).descFactorial l : ℂ) * w ^ ((i : ℕ) - l)) * + ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) ^ (m - l) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * w)) := by + intro i j k + have h1 : ContDiffAt ℂ m (fun z : ℂ => z ^ (i : ℕ)) w := (contDiff_id.pow _).contDiffAt + have h2 : ContDiffAt ℂ m (fun z : ℂ => + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) w := by fun_prop + simp_rw [mul_assoc (f i j k)] + rw [iteratedDeriv_const_mul_field, iteratedDeriv_fun_mul h1 h2] + congr 1 + refine Finset.sum_congr rfl fun l _ => ?_ + rw [iteratedDeriv_pow, iteratedDeriv_cexp_const_mul] + rw [iteratedDeriv_fun_sum (fun i _ => by fun_prop)] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [iteratedDeriv_fun_sum (fun j _ => by fun_prop)] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [iteratedDeriv_fun_sum (fun k _ => by fun_prop)] + exact Finset.sum_congr rfl fun k _ => key i j k + +/-- The integer polynomial `∑_{l ≤ m} C(m,l) i(i-1)⋯(i-l+1) D^l B^(m-l) Z^(i-l) D^(S-i+l) e`. -/ +noncomputable def pres (Dp Bp Zp ep : ℤ[X][X]) (S m i : ℕ) : ℤ[X][X] := + ∑ l ∈ Finset.range (m + 1), C (C ((m.choose l * i.descFactorial l : ℕ) : ℤ)) * + (Dp ^ l * Bp ^ (m - l) * Zp ^ (i - l) * Dp ^ (S - i + l)) * ep + +lemma pres_eval (φ : ℤ[X][X] →+* ℂ) {Dp Bp Zp ep : ℤ[X][X]} {β ζ Λ' e : ℂ} + (hB : β * φ Dp = φ Bp) (hZ : ζ * φ Dp = φ Zp) (he : φ ep = Λ' * e) {S m i : ℕ} (hi : i < S) : + φ (pres Dp Bp Zp ep S m i) = φ Dp ^ (m + S) * Λ' * + ∑ l ∈ Finset.range (m + 1), (m.choose l : ℂ) * ((i.descFactorial l : ℂ) * ζ ^ (i - l)) * + (β ^ (m - l) * e) := by + rw [pres, map_sum φ, Finset.mul_sum] + refine Finset.sum_congr rfl fun l hl => ?_ + have hl' := Finset.mem_range.1 hl + simp only [map_mul φ, map_pow φ] + rw [← hB, ← hZ, he, phi_CC φ, Int.cast_natCast, Nat.cast_mul] + rcases Nat.lt_or_ge i l with h | h + · rw [Nat.descFactorial_eq_zero_iff_lt.2 h, Nat.cast_zero] + ring + · have hδ : φ Dp ^ (m + S) = + φ Dp ^ l * φ Dp ^ (m - l) * φ Dp ^ (i - l) * φ Dp ^ (S - i + l) := by + rw [← pow_add, ← pow_add, ← pow_add] + congr 1 + omega + rw [hδ, mul_pow, mul_pow] + ring + +lemma sz_pres {Dp Bp Zp ep : ℤ[X][X]} {K c E dE S m i : ℕ} (hD : Sz Dp K c) (hB : Sz Bp K c) + (hZ : Sz Zp K c) (he : Sz ep E dE) (hi : i < S) (hK : 2 * (i + 1) ≤ K) : + Sz (pres Dp Bp Zp ep S m i) (K ^ (4 * m + S) * E) ((2 * m + S) * c + dE) := by + have hK0 : 0 < K := by omega + have hcoef : ∀ l, l ≤ m → m.choose l * i.descFactorial l ≤ K ^ m := fun l hl => + calc m.choose l * i.descFactorial l ≤ 2 ^ m * (i + 1) ^ m := + Nat.mul_le_mul (Nat.choose_le_two_pow m l) + ((Nat.descFactorial_le_pow i l).trans ((Nat.pow_le_pow_left (Nat.le_succ i) l).trans + (Nat.pow_le_pow_right (Nat.succ_pos i) hl))) + _ = (2 * (i + 1)) ^ m := (Nat.mul_pow 2 (i + 1) m).symm + _ ≤ K ^ m := Nat.pow_le_pow_left hK m + have h : Sz (pres Dp Bp Zp ep S m i) ((Finset.range (m + 1)).card * (K ^ (3 * m + S) * E)) + ((2 * m + S) * c + dE) := + sz_sum (Finset.range (m + 1)) _ fun l hl => by + have hl' := Finset.mem_range.1 hl + refine sz_mono (sz_mul (sz_mul (sz_CN _) (sz_mul (sz_mul (sz_mul (sz_pow hD l) + (sz_pow hB (m - l))) (sz_pow hZ (i - l))) (sz_pow hD (S - i + l)))) he) ?_ ?_ + · refine Nat.mul_le_mul_right E ?_ + rw [← pow_add, ← pow_add, ← pow_add] + calc m.choose l * i.descFactorial l * K ^ (l + (m - l) + (i - l) + (S - i + l)) + ≤ K ^ m * K ^ (2 * m + S) := + Nat.mul_le_mul (hcoef l (by omega)) (Nat.pow_le_pow_right hK0 (by omega)) + _ = K ^ (3 * m + S) := by rw [← pow_add, show m + (2 * m + S) = 3 * m + S by omega] + · rw [Nat.zero_add, ← Nat.add_mul, ← Nat.add_mul, ← Nat.add_mul] + exact Nat.add_le_add_right (Nat.mul_le_mul_right c (by omega)) dE + refine sz_mono h ?_ le_rfl + rw [Finset.card_range] + calc (m + 1) * (K ^ (3 * m + S) * E) ≤ K ^ m * (K ^ (3 * m + S) * E) := + Nat.mul_le_mul_right _ ((succ_le_two_pow m).trans (Nat.pow_le_pow_left (by omega) m)) + _ = K ^ (4 * m + S) * E := by + rw [← Nat.mul_assoc, ← pow_add, show m + (3 * m + S) = 4 * m + S by omega] + +/-- The polynomial `P_{ijk}`. -/ +noncomputable def Ppol (ℓ : Fin 2 → Fin 2 → ℕ) (r : Fin 2 → Fin 2 → ℕ → ℕ → ℤ) + (L : Fin 2 → Fin 2 → ℤ) (D : ℤ[X][X]) (E G : Fin 2 → ℤ[X][X]) (H : Fin 2 → Fin 2 → ℤ[X][X]) + (S a b m N i j k : ℕ) : ℤ[X][X] := + pres D (C (C (j : ℤ)) * E 0 + C (C (k : ℤ)) * E 1) (C (C (a : ℤ)) * G 0 + C (C (b : ℤ)) * G 1) + (epart ℓ r L H D N a b j k) S m i + +/-- The statement, for an arbitrary ring homomorphism `φ : ℤ[X][Y] → ℂ`. -/ +theorem exists_iteratedDeriv_presentation_main (x₁ x₂ y₁ y₂ : ℂ) + (hexp : ∀ i j : Fin 2, IsAlgebraic ℚ (Complex.exp (![x₁, x₂] i * ![y₁, y₂] j))) + (φ : ℤ[X][X] →+* ℂ) (D : ℤ[X][X]) (E G : Fin 2 → ℤ[X][X]) (H : Fin 2 → Fin 2 → ℤ[X][X]) + (hD : φ D ≠ 0) (hE : ∀ i, ![x₁, x₂] i * φ D = φ (E i)) + (hG : ∀ j, ![y₁, y₂] j * φ D = φ (G j)) + (hH : ∀ i j, Complex.exp (![x₁, x₂] i * ![y₁, y₂] j) * φ D = φ (H i j)) : + ∃ c : ℕ, ∀ S T a b m : ℕ, ∃ Λ : ℂ, Λ ≠ 0 ∧ ‖Λ‖ ≤ (c : ℝ) ^ (c * (1 + m + S + T * (a + b))) ∧ + ∃ P : Fin S → Fin T → Fin T → ℤ[X][X], + (∀ i j k, len (P i j k) ≤ + c ^ (c * (1 + m + S + T * (a + b))) * (1 + m + S + T + a + b) ^ (c * (1 + m + S))) ∧ + (∀ i j k r, ((P i j k).coeff r).natDegree ≤ c * (1 + m + S)) ∧ + (∀ i j k, (P i j k).natDegree ≤ c * (1 + m + S)) ∧ + ∀ f : Fin S → Fin T → Fin T → ℂ, + Λ * iteratedDeriv m (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, f i j k * φ (P i j k) := by + -- integer relations for the powers of the four algebraic exponentials + choose ℓ A L hL hr using fun p q => Transcendence.exists_int_pow_repr (hexp p q) + choose r hr1 hr2 using hr + -- a common size `c₀` for the data + obtain ⟨cD, hcD⟩ := sz_exists D + obtain ⟨cE, hcE⟩ := sz_exists_fam E + obtain ⟨cG, hcG⟩ := sz_exists_fam G + obtain ⟨cH, hcH⟩ := sz_exists_fam (fun pq : Fin 2 × Fin 2 => H pq.1 pq.2) + obtain ⟨c₀, hc₀⟩ : ∃ c₀, c₀ = cD + cE + cG + cH + 1 := ⟨_, rfl⟩ + have hD0 : Sz D c₀ c₀ := sz_mono hcD (by omega) (by omega) + have hE0 : ∀ p, Sz (E p) c₀ c₀ := fun p => sz_mono (hcE p) (by omega) (by omega) + have hG0 : ∀ q, Sz (G q) c₀ c₀ := fun q => sz_mono (hcG q) (by omega) (by omega) + have hH0 : ∀ p q, Sz (H p q) c₀ c₀ := fun p q => sz_mono (hcH (p, q)) (by omega) (by omega) + -- the constants of the four exponential factors + obtain ⟨W, hW⟩ := exists_bound_fin2 fun p q => + ℓ p q * c₀ ^ (ℓ p q - 1) + (ℓ p q - 1) * c₀ + (L p q).natAbs + A p q + ℓ p q + have hW' : ∀ p q, ℓ p q * c₀ ^ (ℓ p q - 1) ≤ W ∧ (ℓ p q - 1) * c₀ ≤ W ∧ + (L p q).natAbs ≤ W ∧ A p q ≤ W := fun p q => by + have h : ℓ p q * c₀ ^ (ℓ p q - 1) + (ℓ p q - 1) * c₀ + (L p q).natAbs + A p q + ℓ p q ≤ W := + hW p q + exact ⟨by omega, by omega, by omega, by omega⟩ + have hℓW : ∀ p q, ℓ p q ≤ W := fun p q => by + have h : ℓ p q * c₀ ^ (ℓ p q - 1) + (ℓ p q - 1) * c₀ + (L p q).natAbs + A p q + ℓ p q ≤ W := + hW p q + omega + obtain ⟨CL, hCL⟩ := exists_bound_fin2 fun p q => ⌈‖(L p q : ℂ)‖⌉₊ + obtain ⟨c, hc⟩ : ∃ c, c = 4 * (W + c₀ + CL + ⌈‖φ D‖⌉₊ + 1) := ⟨_, rfl⟩ + refine ⟨c, fun S T a b m => ?_⟩ + obtain ⟨N, hN⟩ : ∃ N, N = T * (a + b) := ⟨_, rfl⟩ + obtain ⟨Q, hQ⟩ : ∃ Q, Q = 1 + m + S + T + a + b := ⟨_, rfl⟩ + obtain ⟨K, hK⟩ : ∃ K, K = 2 * Q * c₀ := ⟨_, rfl⟩ + rw [← hN, ← hQ] + -- elementary inequalities + have hQK : 2 * Q ≤ K := by + rw [hK] + calc 2 * Q = 2 * Q * 1 := (Nat.mul_one _).symm + _ ≤ 2 * Q * c₀ := Nat.mul_le_mul_left _ (by omega) + have hc₀K : c₀ ≤ K := by + rw [hK] + calc c₀ = 1 * c₀ := (Nat.one_mul _).symm + _ ≤ 2 * Q * c₀ := Nat.mul_le_mul_right _ (by omega) + have hja : ∀ j : Fin T, (j : ℕ) * a ≤ N := fun j => by + rw [hN]; exact Nat.mul_le_mul j.2.le (Nat.le_add_right a b) + have hjb : ∀ j : Fin T, (j : ℕ) * b ≤ N := fun j => by + rw [hN]; exact Nat.mul_le_mul j.2.le (Nat.le_add_left b a) + -- sizes of the `P_{ijk}` + have hsz : ∀ (i : Fin S) (j k : Fin T), Sz (Ppol ℓ r L D E G H S a b m N i j k) + (K ^ (4 * m + S) * W ^ (4 * (N + 1))) ((2 * m + S) * c₀ + 4 * W) := fun i j k => + sz_pres (sz_mono hD0 hc₀K le_rfl) + (sz_mono (sz_lin (hE0 0) (hE0 1) (j : ℕ) (k : ℕ)) + (by rw [hK]; exact Nat.mul_le_mul_right c₀ (by omega)) le_rfl) + (sz_mono (sz_lin (hG0 0) (hG0 1) a b) + (by rw [hK]; exact Nat.mul_le_mul_right c₀ (by omega)) le_rfl) + (sz_epart ℓ r L A hH0 hD0 hr2 hW' (hja j) (hjb j) (hja k) (hjb k)) i.2 + (by have := i.2; omega) + have hdeg : (2 * m + S) * c₀ + 4 * W ≤ c * (1 + m + S) := by + have e1 : (2 * m + S) * c₀ ≤ (2 * m + 2 * S) * c₀ := Nat.mul_le_mul_right c₀ (by omega) + have e2 : (2 * m + 2 * S) * c₀ = 2 * c₀ * (m + S) := by ring + have e3 : 2 * c₀ * (m + S) ≤ c * (m + S) := Nat.mul_le_mul_right (m + S) (by omega) + have e4 : c * (1 + m + S) = c + c * (m + S) := by ring + omega + refine ⟨φ D ^ (m + S) * existsIteratedDerivPresentationLam (φ D) ℓ L N, + mul_ne_zero (pow_ne_zero _ hD) (lam_ne_zero hD ℓ hL N), + ?_, fun i j k => Ppol ℓ r L D E G H S a b m N i j k, fun i j k => ?_, + fun i j k r' => ((hsz i j k).2.1 r').trans hdeg, fun i j k => (hsz i j k).2.2.trans hdeg, + fun f => ?_⟩ + · -- the size of `Λ` + have h1 : (1 : ℝ) ≤ c := Nat.one_le_cast.2 (by omega) + have hδc : ‖φ D‖ ≤ (c : ℝ) := (Nat.le_ceil _).trans (Nat.cast_le.2 (by omega)) + have hLc : ∀ p q, ‖(L p q : ℂ)‖ ≤ (c : ℝ) := fun p q => + (Nat.le_ceil _).trans (Nat.cast_le.2 ((hCL p q).trans (by omega))) + refine (norm_mul_le_pow (norm_pow_le_pow hδc (m + S)) (norm_lam_le hδc ℓ hLc N)).trans + (pow_le_pow_right₀ h1 ?_) + have e1 : c * (1 + m + S + N) = c + c * (m + S + N) := by ring + have e2 : 4 * (m + S + N) ≤ c * (m + S + N) := Nat.mul_le_mul_right _ (by omega) + have := hℓW 0 0 + have := hℓW 0 1 + have := hℓW 1 0 + have := hℓW 1 1 + omega + · -- the length of `P_{ijk}` + have e1 : 4 * m + S ≤ c * (1 + m + S) := by + have : 4 * (1 + m + S) ≤ c * (1 + m + S) := Nat.mul_le_mul_right _ (by omega) + omega + have e2 : 4 * m + S + 4 * (N + 1) ≤ c * (1 + m + S + N) := by + have : 4 * (1 + m + S + N) ≤ c * (1 + m + S + N) := Nat.mul_le_mul_right _ (by omega) + omega + calc len (Ppol ℓ r L D E G H S a b m N i j k) + ≤ K ^ (4 * m + S) * W ^ (4 * (N + 1)) := (hsz i j k).1 + _ = (2 * c₀) ^ (4 * m + S) * W ^ (4 * (N + 1)) * Q ^ (4 * m + S) := by rw [hK]; ring + _ ≤ c ^ (4 * m + S) * c ^ (4 * (N + 1)) * Q ^ (c * (1 + m + S)) := + Nat.mul_le_mul (Nat.mul_le_mul (Nat.pow_le_pow_left (by omega) _) + (Nat.pow_le_pow_left (by omega) _)) (Nat.pow_le_pow_right (by omega) e1) + _ ≤ c ^ (c * (1 + m + S + N)) * Q ^ (c * (1 + m + S)) := by + rw [← pow_add] + exact Nat.mul_le_mul_right _ (Nat.pow_le_pow_right (by omega) e2) + · -- the identity, by Leibniz's rule + rw [iteratedDeriv_expPoly S T m x₁ x₂ f, Finset.mul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + dsimp only [Ppol] + rw [pres_eval φ (lin_eval φ (u := x₁) (v := x₂) (hE 0) (hE 1) (j : ℕ) (k : ℕ)) + (lin_eval φ (u := y₁) (v := y₂) (hG 0) (hG 1) a b) + (epart_eval φ x₁ x₂ y₁ y₂ ℓ r L H D hH hr1 (hja j) (hjb j) (hja k) (hjb k)) i.2] + exact mul_left_comm _ _ _ + +end ExistsIteratedDerivPresentation + +open ExistsIteratedDerivPresentation + +/-- **Derivatives at a grid point, presented.** Let $x_1,x_2,y_1,y_2\in\mathbb{C}$ with every +$e^{x_iy_j}$ algebraic. Let $\omega,\omega_1\in\mathbb{C}$, let $\varphi$ be evaluation at +$(\omega,\omega_1)$, and let $D,E_i,G_j,H_{ij}\in\mathbb{Z}[X][Y]$ with $\varphi(D)\neq0$, +$x_i\varphi(D)=\varphi(E_i)$, $y_j\varphi(D)=\varphi(G_j)$ and +$e^{x_iy_j}\varphi(D)=\varphi(H_{ij})$. There is $c\in\mathbb{N}$ such that for all +$S,T,a,b,m\in\mathbb{N}$ there are $\Lambda\in\mathbb{C}$, $\Lambda\neq0$, with $|\Lambda|\le +c^{\,c(1+m+S+T(a+b))}$, and $P_{ijh}\in\mathbb{Z}[X][Y]$ ($i ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (P i j k) + := by + exact exists_iteratedDeriv_presentation_main x₁ x₂ y₁ y₂ hexp + (Polynomial.eval₂RingHom (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁) D E G H hD hE hG hH + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExistsIteratedDerivPresentationColumn.lean b/LeanPool/FourExponentials/ExistsIteratedDerivPresentationColumn.lean new file mode 100644 index 0000000000..594d523e07 --- /dev/null +++ b/LeanPool/FourExponentials/ExistsIteratedDerivPresentationColumn.lean @@ -0,0 +1,502 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsIntPowRepr +public import LeanPool.FourExponentials.ExistsIteratedDerivPresentationOfExpFactor +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.SplitIfs + +/-! +# Integer presentations of the derivatives, in the column case + +Write `φ(P) = P(ω, ω₁)` for `P ∈ ℤ[X][Y]`, `δ = φ(D)`, `β = j x₁ + k x₂`, `ζ = a y₁ + b y₂` and +`α_{pq} = e^(x_p y_q)`. The shared node `exists_iteratedDeriv_presentation_of_exp_factor` +builds the presentation from integer polynomials `U_{jk}` with `φ(U_{jk}) = Λ₁ e^(βζ)`, so only the +exponential factor `e^(βζ) = α₀₀^(ja) α₀₁^(jb) α₁₀^(ka) α₁₁^(kb)` is presented here. + +* **The column `y₂`.** `α_{p1}` is algebraic. As in `exists_iteratedDeriv_presentation`, + there are `ℓ`, `A` and an integer `L ≠ 0` with `Lⁿ αⁿ = ∑_{t<ℓ} r_t α^t` and `|r_t| ≤ Aⁿ`, and + for `n ≤ N = T b` the number `δ^(ℓ-1) L^N αⁿ` is `φ` of an integer polynomial of length at most + `W^(N+1)` and degrees at most `W`. +* **The column `y₁`.** `α_{p0}` need not be algebraic, but `δ α_{p0} = φ(H_{p0})`, so for + `n ≤ T a` the number `δ^(T a) αⁿ` is `φ(H_{p0}ⁿ D^(T a - n))`, of length at most `c₀^(T a)` and + degrees at most `T a c₀`, where `c₀` bounds the data. +* **Assembly.** The four factors present `Λ₁ e^(βζ)` with + `Λ₁ = δ^(2 T a) δ^(ℓ₀-1) L₀^N δ^(ℓ₁-1) L₁^N ≠ 0`, with length `c₀^(2 T a) W^(2(N+1))` and + degrees `2 T a c₀ + 2 W`. The shared node gives `δ^(m+S) Λ₁ F⁽ᵐ⁾(ζ) = ∑ f_{ijk} φ(P_{ijk})`, so + `Λ = δ^(m+S) Λ₁`, and all the constants are absorbed into one `c`. + +From `Diaz/Mirror/exists_iteratedDeriv_presentation_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.exists_iteratedDeriv_presentation_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace ExistsIteratedDerivPresentationColumn + +open Polynomial + +/-! ### Length and size of integer polynomials in two variables -/ + +/-- The length of `P ∈ ℤ[X][Y]`: the sum of the absolute values of all its integer coefficients. -/ +noncomputable def existsIteratedDerivPresentationColumnLen (P : ℤ[X][X]) : ℕ := + ∑ r ∈ P.support, ∑ h ∈ (P.coeff r).support, ((P.coeff r).coeff h).natAbs + +lemma exists_iteratedDeriv_presentation_column_len_CC (z : ℤ) : + existsIteratedDerivPresentationColumnLen (C (C z)) = z.natAbs := by + rcases eq_or_ne z 0 with rfl | hz + · rw [Polynomial.C_0, Polynomial.C_0, existsIteratedDerivPresentationColumnLen, + Polynomial.support_zero, Finset.sum_empty, + Int.natAbs_zero] + · rw [existsIteratedDerivPresentationColumnLen, + Polynomial.support_C (Polynomial.C_ne_zero.2 hz), Finset.sum_singleton, + Polynomial.coeff_C_zero, Polynomial.support_C hz, Finset.sum_singleton, + Polynomial.coeff_C_zero] + +/-- `P` has length at most `b`, and degrees at most `d` in `X` and in `Y`. -/ +def existsIteratedDerivPresentationColumnSz (P : ℤ[X][X]) (b d : ℕ) : Prop := + existsIteratedDerivPresentationColumnLen P ≤ b ∧ (∀ r, + (P.coeff r).natDegree ≤ d) ∧ P.natDegree ≤ d + +lemma exists_iteratedDeriv_presentation_column_sz_mono {P : ℤ[X][X]} {b b' d d' : ℕ} (h : + existsIteratedDerivPresentationColumnSz P b d) (hb : b ≤ b') (hd : d ≤ d') : + existsIteratedDerivPresentationColumnSz P b' d' := + ⟨h.1.trans hb, fun r => (h.2.1 r).trans hd, h.2.2.trans hd⟩ + +lemma exists_iteratedDeriv_presentation_column_sz_mul {P Q : ℤ[X][X]} {b₁ b₂ d₁ d₂ : ℕ} (hP : + existsIteratedDerivPresentationColumnSz P b₁ d₁) (hQ : + existsIteratedDerivPresentationColumnSz Q b₂ d₂) : + existsIteratedDerivPresentationColumnSz (P * Q) (b₁ * b₂) (d₁ + d₂) := by + refine ⟨(Transcendence.length_mul_le P Q).trans (Nat.mul_le_mul hP.1 hQ.1), fun r => ?_, + Polynomial.natDegree_mul_le.trans (Nat.add_le_add hP.2.2 hQ.2.2)⟩ + rw [Polynomial.coeff_mul] + exact Polynomial.natDegree_sum_le_of_forall_le _ _ fun x _ => + Polynomial.natDegree_mul_le.trans (Nat.add_le_add (hP.2.1 x.1) (hQ.2.1 x.2)) + +lemma exists_iteratedDeriv_presentation_column_sz_sum {ι : Type*} (s : Finset ι) (f : ι → + ℤ[X][X]) {b d : ℕ} + (h : ∀ i ∈ s, existsIteratedDerivPresentationColumnSz (f i) b d) : + existsIteratedDerivPresentationColumnSz (∑ i ∈ s, f i) (s.card * b) d := by + refine ⟨(Transcendence.length_sum_le s f).trans ?_, fun r => ?_, + Polynomial.natDegree_sum_le_of_forall_le _ _ fun i hi => (h i hi).2.2⟩ + · rw [← smul_eq_mul, ← Finset.sum_const] + exact Finset.sum_le_sum fun i hi => (h i hi).1 + · rw [Polynomial.finsetSum_coeff] + exact Polynomial.natDegree_sum_le_of_forall_le _ _ fun i hi => (h i hi).2.1 r + +lemma exists_iteratedDeriv_presentation_column_sz_CC (z : ℤ) : + existsIteratedDerivPresentationColumnSz (C (C z)) z.natAbs 0 := by + refine ⟨(exists_iteratedDeriv_presentation_column_len_CC z).le, fun r => ?_, + (Polynomial.natDegree_C _).le⟩ + rw [Polynomial.coeff_C] + split_ifs + · exact (Polynomial.natDegree_C z).le + · exact Polynomial.natDegree_zero.le + +lemma exists_iteratedDeriv_presentation_column_sz_one : existsIteratedDerivPresentationColumnSz + 1 1 0 := by + have h := exists_iteratedDeriv_presentation_column_sz_CC 1 + rw [Polynomial.C_1, Polynomial.C_1] at h + exact h + +lemma exists_iteratedDeriv_presentation_column_sz_pow {P : ℤ[X][X]} {b d : ℕ} (h : + existsIteratedDerivPresentationColumnSz P b d) : ∀ n : ℕ, + existsIteratedDerivPresentationColumnSz (P ^ n) (b ^ n) (n * d) + | 0 => by + rw [pow_zero, pow_zero, Nat.zero_mul] + exact exists_iteratedDeriv_presentation_column_sz_one + | n + 1 => by + rw [pow_succ, pow_succ, Nat.succ_mul] + exact exists_iteratedDeriv_presentation_column_sz_mul + (exists_iteratedDeriv_presentation_column_sz_pow h n) h + +lemma exists_iteratedDeriv_presentation_column_sz_exists (P : ℤ[X][X]) : ∃ c, + existsIteratedDerivPresentationColumnSz P c c := by + refine ⟨existsIteratedDerivPresentationColumnLen P + (∑ k ∈ Finset.range (P.natDegree + 1), + (P.coeff k).natDegree) + P.natDegree, + by omega, fun r => ?_, by omega⟩ + by_cases hr : r ≤ P.natDegree + · have : (P.coeff r).natDegree ≤ ∑ k ∈ Finset.range (P.natDegree + 1), (P.coeff k).natDegree := + Finset.single_le_sum (f := fun k => (P.coeff k).natDegree) (fun _ _ => Nat.zero_le _) + (Finset.mem_range.2 (Nat.lt_succ_of_le hr)) + omega + · rw [Polynomial.coeff_eq_zero_of_natDegree_lt (not_le.1 hr), Polynomial.natDegree_zero] + exact Nat.zero_le _ + +lemma exists_iteratedDeriv_presentation_column_sz_exists_fam {ι : Type*} [Finite ι] (F : ι → + ℤ[X][X]) : ∃ c, ∀ i, existsIteratedDerivPresentationColumnSz (F i) c c := by + have := Fintype.ofFinite ι + choose c hc using fun i => exists_iteratedDeriv_presentation_column_sz_exists (F i) + have hle : ∀ i, c i ≤ ∑ i', c i' := fun i => + Finset.single_le_sum (f := c) (fun _ _ => Nat.zero_le _) (Finset.mem_univ i) + exact ⟨∑ i, c i, fun i => exists_iteratedDeriv_presentation_column_sz_mono (hc i) (hle i) (hle i)⟩ + +lemma exists_iteratedDeriv_presentation_column_exists_bound_fin2 (w : Fin 2 → ℕ) : ∃ W, ∀ p, + w p ≤ W := + ⟨∑ p, w p, fun p => Finset.single_le_sum (f := w) (fun _ _ => Nat.zero_le _) (Finset.mem_univ p)⟩ + +lemma exists_iteratedDeriv_presentation_column_phi_CC (φ : ℤ[X][X] →+* ℂ) (z : ℤ) : φ (C (C z)) = + (z : ℂ) := + eq_intCast (φ.comp ((C : ℤ[X] →+* ℤ[X][X]).comp (C : ℤ →+* ℤ[X]))) z + +/-! ### The column `y₂`: powers of an algebraic number -/ + +/-- With `r` the coordinates of `Lⁿ αⁿ` in the basis `1, α, …, α^(ℓ-1)` and `φ(H) = α φ(D)`, this +integer polynomial takes the value `φ(D)^(ℓ-1) Lⁿ αⁿ`. -/ +noncomputable def existsIteratedDerivPresentationColumnExpPres (ℓ : ℕ) (r : ℕ → + ℤ) (Hp Dp : ℤ[X][X]) : ℤ[X][X] := + ∑ t ∈ Finset.range ℓ, C (C (r t)) * Hp ^ t * Dp ^ (ℓ - 1 - t) + +lemma exists_iteratedDeriv_presentation_column_expPres_eval (φ : ℤ[X][X] →+* ℂ) (ℓ : ℕ) (r : ℕ → + ℤ) (Hp Dp : ℤ[X][X]) {α : ℂ} + (hH : α * φ Dp = φ Hp) : + φ (existsIteratedDerivPresentationColumnExpPres ℓ r Hp Dp) = φ Dp ^ (ℓ - 1) * + ∑ t ∈ Finset.range ℓ, (r t : ℂ) * α ^ t := by + rw [existsIteratedDerivPresentationColumnExpPres, map_sum φ, Finset.mul_sum] + refine Finset.sum_congr rfl fun t ht => ?_ + have ht' := Finset.mem_range.1 ht + have hsplit : φ Dp ^ (ℓ - 1) = φ Dp ^ t * φ Dp ^ (ℓ - 1 - t) := by + rw [← pow_add] + congr 1 + omega + rw [map_mul φ, map_mul φ, map_pow φ, map_pow φ, ← hH, + exists_iteratedDeriv_presentation_column_phi_CC φ, hsplit, mul_pow] + ring + +lemma exists_iteratedDeriv_presentation_column_sz_expPres (ℓ : ℕ) (r : ℕ → + ℤ) {Hp Dp : ℤ[X][X]} {c R : ℕ} (hH : existsIteratedDerivPresentationColumnSz Hp c c) + (hD : existsIteratedDerivPresentationColumnSz Dp c c) (hr : ∀ t, (r t).natAbs ≤ R) : + existsIteratedDerivPresentationColumnSz (existsIteratedDerivPresentationColumnExpPres ℓ + r Hp Dp) (ℓ * (R * c ^ (ℓ - 1))) ((ℓ - 1) * c) := by + have h : existsIteratedDerivPresentationColumnSz + (existsIteratedDerivPresentationColumnExpPres ℓ r Hp Dp) ((Finset.range ℓ).card * (R * + c ^ (ℓ - 1))) ((ℓ - 1) * c) := + exists_iteratedDeriv_presentation_column_sz_sum (Finset.range ℓ) _ fun t ht => by + have ht' := Finset.mem_range.1 ht + have he : t + (ℓ - 1 - t) = ℓ - 1 := by omega + refine exists_iteratedDeriv_presentation_column_sz_mono + (exists_iteratedDeriv_presentation_column_sz_mul + (exists_iteratedDeriv_presentation_column_sz_mul + (exists_iteratedDeriv_presentation_column_sz_CC (r t)) + (exists_iteratedDeriv_presentation_column_sz_pow hH t)) + (exists_iteratedDeriv_presentation_column_sz_pow hD (ℓ - 1 - t))) ?_ ?_ + · rw [Nat.mul_assoc, ← pow_add, he] + exact Nat.mul_le_mul_right _ (hr t) + · rw [Nat.zero_add, ← Nat.add_mul, he] + rw [Finset.card_range] at h + exact h + +/-- `φ(D)^(ℓ-1) L^N αⁿ` as an integer polynomial, for `n ≤ N`. -/ +noncomputable def existsIteratedDerivPresentationColumnFac (ℓ : ℕ) (r : ℕ → ℕ → + ℤ) (Lc : ℤ) (Hp Dp : ℤ[X][X]) (N n : ℕ) : ℤ[X][X] := + C (C (Lc ^ (N - n))) * existsIteratedDerivPresentationColumnExpPres ℓ (r n) Hp Dp + +lemma exists_iteratedDeriv_presentation_column_fac_eval (φ : ℤ[X][X] →+* ℂ) (ℓ : ℕ) (r : ℕ → ℕ → + ℤ) (Lc : ℤ) (Hp Dp : ℤ[X][X]) {α : ℂ} + (hH : α * φ Dp = φ Hp) + (hr : ∀ n, (Lc : ℂ) ^ n * α ^ n = ∑ t ∈ Finset.range ℓ, (r n t : ℂ) * α ^ t) + {N n : ℕ} (hn : n ≤ N) : + φ (existsIteratedDerivPresentationColumnFac ℓ r Lc Hp Dp N n) = φ Dp ^ (ℓ - 1) * + (Lc : ℂ) ^ N * α ^ n := by + rw [existsIteratedDerivPresentationColumnFac, map_mul φ, + exists_iteratedDeriv_presentation_column_phi_CC φ, + exists_iteratedDeriv_presentation_column_expPres_eval φ ℓ (r n) Hp Dp hH, ← hr n, + Int.cast_pow] + have hsplit : (Lc : ℂ) ^ N = (Lc : ℂ) ^ (N - n) * (Lc : ℂ) ^ n := by + rw [← pow_add, Nat.sub_add_cancel hn] + rw [hsplit] + ring + +lemma exists_iteratedDeriv_presentation_column_sz_fac (ℓ : ℕ) (r : ℕ → ℕ → + ℤ) (Lc : ℤ) {Hp Dp : ℤ[X][X]} {c A W : ℕ} + (hH : existsIteratedDerivPresentationColumnSz Hp c c) (hD : + existsIteratedDerivPresentationColumnSz Dp c c) (hr : ∀ n t, (r n t).natAbs ≤ A ^ n) + (hW : ℓ * c ^ (ℓ - 1) ≤ W ∧ (ℓ - 1) * c ≤ W ∧ Lc.natAbs ≤ W ∧ A ≤ W) {N n : ℕ} + (hn : n ≤ N) : existsIteratedDerivPresentationColumnSz + (existsIteratedDerivPresentationColumnFac ℓ r Lc Hp Dp N n) (W ^ (N + 1)) W := by + refine exists_iteratedDeriv_presentation_column_sz_mono + (exists_iteratedDeriv_presentation_column_sz_mul + (exists_iteratedDeriv_presentation_column_sz_CC _) + (exists_iteratedDeriv_presentation_column_sz_expPres ℓ (r n) hH hD (hr n))) ?_ + ((Nat.zero_add _).trans_le hW.2.1) + rw [Int.natAbs_pow] + calc Lc.natAbs ^ (N - n) * (ℓ * (A ^ n * c ^ (ℓ - 1))) + = Lc.natAbs ^ (N - n) * A ^ n * (ℓ * c ^ (ℓ - 1)) := by ring + _ ≤ W ^ (N - n) * W ^ n * W := + Nat.mul_le_mul (Nat.mul_le_mul (Nat.pow_le_pow_left hW.2.2.1 _) + (Nat.pow_le_pow_left hW.2.2.2 _)) hW.1 + _ = W ^ (N + 1) := by rw [← pow_add, Nat.sub_add_cancel hn, pow_succ] + +/-! ### The column `y₁`: powers of a presented number -/ + +/-- `φ(D)^N αⁿ` as an integer polynomial, for `n ≤ N`, from `φ(H) = α φ(D)` alone. -/ +noncomputable def colfac (Hp Dp : ℤ[X][X]) (N n : ℕ) : ℤ[X][X] := + Hp ^ n * Dp ^ (N - n) + +lemma colfac_eval (φ : ℤ[X][X] →+* ℂ) {Hp Dp : ℤ[X][X]} {α : ℂ} (hH : α * φ Dp = φ Hp) + {N n : ℕ} (hn : n ≤ N) : φ (colfac Hp Dp N n) = φ Dp ^ N * α ^ n := by + have hsplit : φ Dp ^ N = φ Dp ^ n * φ Dp ^ (N - n) := by + rw [← pow_add, Nat.add_sub_of_le hn] + rw [colfac, map_mul φ, map_pow φ, map_pow φ, ← hH, mul_pow, hsplit] + ring + +lemma sz_colfac {Hp Dp : ℤ[X][X]} {c : ℕ} (hH : existsIteratedDerivPresentationColumnSz Hp c c) + (hD : existsIteratedDerivPresentationColumnSz Dp c c) {N n : ℕ} + (hn : n ≤ N) : existsIteratedDerivPresentationColumnSz (colfac Hp Dp N n) (c ^ N) (N * c) := + by + refine exists_iteratedDeriv_presentation_column_sz_mono + (exists_iteratedDeriv_presentation_column_sz_mul + (exists_iteratedDeriv_presentation_column_sz_pow hH n) + (exists_iteratedDeriv_presentation_column_sz_pow hD (N - n))) ?_ ?_ + · rw [← pow_add, Nat.add_sub_of_le hn] + · rw [← Nat.add_mul, Nat.add_sub_of_le hn] + +/-! ### The exponential factor -/ + +/-- The product of the four factors, presenting `Λ₁ e^((j x₁ + k x₂)(a y₁ + b y₂))`. -/ +noncomputable def existsIteratedDerivPresentationColumnEpart (ℓ : Fin 2 → ℕ) (r : Fin 2 → ℕ → ℕ + → ℤ) (L : Fin 2 → ℤ) + (H : Fin 2 → Fin 2 → ℤ[X][X]) (Dp : ℤ[X][X]) (Na N a b j k : ℕ) : ℤ[X][X] := + colfac (H 0 0) Dp Na (j * a) * existsIteratedDerivPresentationColumnFac (ℓ 0) (r 0) (L 0) (H 0 + 1) Dp N (j * b) * + colfac (H 1 0) Dp Na (k * a) * existsIteratedDerivPresentationColumnFac (ℓ 1) (r 1) (L 1) (H + 1 1) Dp N (k * b) + +/-- The constant `Λ₁ = δ^(T a) δ^(ℓ₀-1) L₀^N δ^(T a) δ^(ℓ₁-1) L₁^N`. -/ +noncomputable def existsIteratedDerivPresentationColumnLam (δ : ℂ) (ℓ : Fin 2 → ℕ) (L : Fin 2 → + ℤ) (Na N : ℕ) : ℂ := + δ ^ Na * (δ ^ (ℓ 0 - 1) * (L 0 : ℂ) ^ N) * δ ^ Na * (δ ^ (ℓ 1 - 1) * (L 1 : ℂ) ^ N) + +lemma exists_iteratedDeriv_presentation_column_exp_split (x₁ x₂ y₁ y₂ : ℂ) (a b j k : ℕ) : + Complex.exp (((j : ℂ) * x₁ + (k : ℂ) * x₂) * ((a : ℂ) * y₁ + (b : ℂ) * y₂)) = + Complex.exp (![x₁, x₂] 0 * ![y₁, y₂] 0) ^ (j * a) * + Complex.exp (![x₁, x₂] 0 * ![y₁, y₂] 1) ^ (j * b) * + Complex.exp (![x₁, x₂] 1 * ![y₁, y₂] 0) ^ (k * a) * + Complex.exp (![x₁, x₂] 1 * ![y₁, y₂] 1) ^ (k * b) := by + change _ = Complex.exp (x₁ * y₁) ^ (j * a) * Complex.exp (x₁ * y₂) ^ (j * b) * + Complex.exp (x₂ * y₁) ^ (k * a) * Complex.exp (x₂ * y₂) ^ (k * b) + rw [← Complex.exp_nat_mul, ← Complex.exp_nat_mul, ← Complex.exp_nat_mul, ← Complex.exp_nat_mul, + ← Complex.exp_add, ← Complex.exp_add, ← Complex.exp_add] + congr 1 + push_cast + ring + +lemma exists_iteratedDeriv_presentation_column_epart_eval (φ : ℤ[X][X] →+* ℂ) (x₁ x₂ y₁ y₂ : ℂ) (ℓ : + Fin 2 → ℕ) + (r : Fin 2 → ℕ → ℕ → ℤ) (L : Fin 2 → ℤ) (H : Fin 2 → Fin 2 → ℤ[X][X]) (Dp : ℤ[X][X]) + (hH : ∀ p q, Complex.exp (![x₁, x₂] p * ![y₁, y₂] q) * φ Dp = φ (H p q)) + (hr : ∀ p n, (L p : ℂ) ^ n * Complex.exp (![x₁, x₂] p * ![y₁, y₂] 1) ^ n = + ∑ t ∈ Finset.range (ℓ p), (r p n t : ℂ) * Complex.exp (![x₁, x₂] p * ![y₁, y₂] 1) ^ t) + {Na N a b j k : ℕ} (h1 : j * a ≤ Na) (h2 : j * b ≤ N) (h3 : k * a ≤ Na) (h4 : k * b ≤ N) : + φ (existsIteratedDerivPresentationColumnEpart ℓ r L H Dp Na N a b j k) = + existsIteratedDerivPresentationColumnLam (φ Dp) ℓ L Na N * + Complex.exp (((j : ℂ) * x₁ + (k : ℂ) * x₂) * ((a : ℂ) * y₁ + (b : ℂ) * y₂)) := by + rw [existsIteratedDerivPresentationColumnEpart, map_mul φ, map_mul φ, map_mul φ, + colfac_eval φ (hH 0 0) h1, + exists_iteratedDeriv_presentation_column_fac_eval φ _ _ _ _ _ (hH 0 1) (hr 0) h2, + colfac_eval φ (hH 1 0) h3, + exists_iteratedDeriv_presentation_column_fac_eval φ _ _ _ _ _ (hH 1 1) (hr 1) h4, + exists_iteratedDeriv_presentation_column_exp_split x₁ x₂ y₁ y₂ a b j k, + existsIteratedDerivPresentationColumnLam] + ring + +lemma exists_iteratedDeriv_presentation_column_sz_epart (ℓ : Fin 2 → ℕ) (r : Fin 2 → ℕ → ℕ → + ℤ) (L : Fin 2 → ℤ) (A : Fin 2 → ℕ) + {H : Fin 2 → Fin 2 → ℤ[X][X]} {Dp : ℤ[X][X]} {c W : ℕ} + (hH : ∀ p q, existsIteratedDerivPresentationColumnSz (H p q) c c) (hD : + existsIteratedDerivPresentationColumnSz Dp c c) (hr : ∀ p n t, (r p n t).natAbs ≤ + A p ^ n) + (hW : ∀ p, ℓ p * c ^ (ℓ p - 1) ≤ W ∧ (ℓ p - 1) * c ≤ W ∧ (L p).natAbs ≤ W ∧ A p ≤ W) + {Na N a b j k : ℕ} (h1 : j * a ≤ Na) (h2 : j * b ≤ N) (h3 : k * a ≤ Na) (h4 : k * b ≤ N) : + existsIteratedDerivPresentationColumnSz (existsIteratedDerivPresentationColumnEpart ℓ r + L H Dp Na N a b j k) (c ^ (2 * Na) * W ^ (2 * (N + 1))) + (2 * (Na * c) + 2 * W) := by + have hf : ∀ p n, n ≤ N → existsIteratedDerivPresentationColumnSz + (existsIteratedDerivPresentationColumnFac (ℓ p) (r p) (L p) (H p 1) Dp N n) (W ^ (N + + 1)) W := + fun p n hn => exists_iteratedDeriv_presentation_column_sz_fac (ℓ p) (r p) (L p) (hH p 1) hD (hr + p) (hW p) hn + exact exists_iteratedDeriv_presentation_column_sz_mono + (exists_iteratedDeriv_presentation_column_sz_mul + (exists_iteratedDeriv_presentation_column_sz_mul + (exists_iteratedDeriv_presentation_column_sz_mul (sz_colfac (hH 0 0) hD h1) (hf 0 _ + h2)) + (sz_colfac (hH 1 0) hD h3)) (hf 1 _ h4)) (le_of_eq (by ring)) (le_of_eq (by ring)) + +lemma exists_iteratedDeriv_presentation_column_lam_ne_zero {δ : ℂ} (hδ : δ ≠ 0) (ℓ : Fin 2 → + ℕ) {L : Fin 2 → ℤ} (hL : ∀ p, L p ≠ 0) + (Na N : ℕ) : existsIteratedDerivPresentationColumnLam δ ℓ L Na N ≠ 0 := by + have hf : ∀ p, δ ^ (ℓ p - 1) * (L p : ℂ) ^ N ≠ 0 := fun p => + mul_ne_zero (pow_ne_zero _ hδ) (pow_ne_zero _ (Int.cast_ne_zero.2 (hL p))) + exact mul_ne_zero (mul_ne_zero (mul_ne_zero (pow_ne_zero _ hδ) (hf 0)) (pow_ne_zero _ hδ)) (hf 1) + +lemma exists_iteratedDeriv_presentation_column_norm_mul_le_pow {x y : ℂ} {C : ℝ} {p q : ℕ} (hx : ‖x‖ + ≤ C ^ p) (hy : ‖y‖ ≤ C ^ q) : + ‖x * y‖ ≤ C ^ (p + q) := by + rw [norm_mul, pow_add] + exact mul_le_mul hx hy (norm_nonneg y) ((norm_nonneg x).trans hx) + +lemma exists_iteratedDeriv_presentation_column_norm_pow_le_pow {x : ℂ} {C : ℝ} (hx : ‖x‖ ≤ + C) (n : ℕ) : ‖x ^ n‖ ≤ C ^ n := by + rw [norm_pow] + exact pow_le_pow_left₀ (norm_nonneg x) hx n + +lemma exists_iteratedDeriv_presentation_column_norm_lam_le {δ : ℂ} {C : ℝ} (hδ : ‖δ‖ ≤ C) (ℓ : Fin 2 + → ℕ) {L : Fin 2 → ℤ} + (hL : ∀ p, ‖(L p : ℂ)‖ ≤ C) (Na N : ℕ) : + ‖existsIteratedDerivPresentationColumnLam δ ℓ L Na N‖ ≤ C ^ (Na + (ℓ 0 - 1 + N) + Na + (ℓ 1 + - 1 + N)) := by + have hf : ∀ p, ‖δ ^ (ℓ p - 1) * (L p : ℂ) ^ N‖ ≤ C ^ (ℓ p - 1 + N) := fun p => + exists_iteratedDeriv_presentation_column_norm_mul_le_pow + (exists_iteratedDeriv_presentation_column_norm_pow_le_pow hδ _) + (exists_iteratedDeriv_presentation_column_norm_pow_le_pow (hL p) N) + exact exists_iteratedDeriv_presentation_column_norm_mul_le_pow + (exists_iteratedDeriv_presentation_column_norm_mul_le_pow + (exists_iteratedDeriv_presentation_column_norm_mul_le_pow + (exists_iteratedDeriv_presentation_column_norm_pow_le_pow hδ Na) (hf 0)) + (exists_iteratedDeriv_presentation_column_norm_pow_le_pow hδ Na)) (hf 1) + +end ExistsIteratedDerivPresentationColumn + +open ExistsIteratedDerivPresentationColumn in +/-- **Derivatives at a grid point, one algebraic column.** Let $x_1,x_2,y_1,y_2\in\mathbb{C}$ with +$e^{x_1y_2}$ and $e^{x_2y_2}$ algebraic, and let $\omega,\omega_1$, $\varphi$ and $D,E_i,G_j,H_{ij}$ +be as in Lemma . There is $c\in\mathbb{N}$ such that for all $S,T,a,b,m\in\mathbb{N}$ there are +$\Lambda\neq0$ with $|\Lambda|\le c^{\,c(1+m+S+T(a+b))}$ and $P_{ijh}\in\mathbb{Z}[X][Y]$ ($i ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (P i j k) + := by + -- the shared node, and `φ` as a ring homomorphism + obtain ⟨c₁, hSH⟩ := + exists_iteratedDeriv_presentation_of_exp_factor x₁ x₂ y₁ y₂ ω ω₁ D E G hE hG + obtain ⟨φ, hφ⟩ : ∃ φ : Polynomial (Polynomial ℤ) →+* ℂ, ∀ P, + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ P = φ P := + ⟨Polynomial.eval₂RingHom (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁, fun _ => rfl⟩ + simp only [hφ] at hD hH hSH ⊢ + -- integer relations for the powers of the two algebraic exponentials of the column `y₂` + choose ℓ A Lc hLc hr using fun p : Fin 2 => Transcendence.exists_int_pow_repr + (α := Complex.exp (![x₁, x₂] p * ![y₁, y₂] 1)) (hexp₂ p) + choose r hr1 hr2 using hr + -- a common size `c₀` for `D` and `H`, and the constants of the two algebraic factors + obtain ⟨cD, hcD⟩ := exists_iteratedDeriv_presentation_column_sz_exists D + obtain ⟨cH, hcH⟩ := exists_iteratedDeriv_presentation_column_sz_exists_fam (fun pq : Fin 2 × Fin 2 + => H pq.1 pq.2) + obtain ⟨c₀, hc₀⟩ : ∃ c₀, c₀ = cD + cH + 1 := ⟨_, rfl⟩ + have hD0 : existsIteratedDerivPresentationColumnSz D c₀ c₀ := + exists_iteratedDeriv_presentation_column_sz_mono hcD (by omega) (by omega) + have hH0 : ∀ p q, existsIteratedDerivPresentationColumnSz (H p q) c₀ c₀ := + fun p q => exists_iteratedDeriv_presentation_column_sz_mono (hcH (p, q)) (by omega) (by omega) + obtain ⟨W, hW⟩ := exists_iteratedDeriv_presentation_column_exists_bound_fin2 fun p => + ℓ p * c₀ ^ (ℓ p - 1) + (ℓ p - 1) * c₀ + (Lc p).natAbs + A p + ℓ p + have hW' : ∀ p, ℓ p * c₀ ^ (ℓ p - 1) ≤ W ∧ (ℓ p - 1) * c₀ ≤ W ∧ (Lc p).natAbs ≤ W ∧ + A p ≤ W ∧ ℓ p ≤ W := fun p => by + have h : ℓ p * c₀ ^ (ℓ p - 1) + (ℓ p - 1) * c₀ + (Lc p).natAbs + A p + ℓ p ≤ W := hW p + exact ⟨by omega, by omega, by omega, by omega, by omega⟩ + obtain ⟨CL, hCL⟩ := exists_iteratedDeriv_presentation_column_exists_bound_fin2 fun p => ⌈‖(Lc p : + ℂ)‖⌉₊ + obtain ⟨c, hc⟩ : ∃ c, c = c₁ + 4 * (W + c₀ + CL + ⌈‖φ D‖⌉₊ + 1) := ⟨_, rfl⟩ + refine ⟨c, fun S T a b m => ?_⟩ + obtain ⟨Na, hNa⟩ : ∃ Na, Na = T * a := ⟨_, rfl⟩ + obtain ⟨N, hN⟩ : ∃ N, N = T * b := ⟨_, rfl⟩ + have hX : T * (a + b) = Na + N := by rw [hNa, hN, Nat.mul_add] + rw [hX, ← hNa] + have hja : ∀ j : Fin T, (j : ℕ) * a ≤ Na := fun j => hNa ▸ Nat.mul_le_mul_right a j.2.le + have hjb : ∀ j : Fin T, (j : ℕ) * b ≤ N := fun j => hN ▸ Nat.mul_le_mul_right b j.2.le + -- the exponential factor, presented + have hszU : ∀ j k : Fin T, existsIteratedDerivPresentationColumnSz + (existsIteratedDerivPresentationColumnEpart ℓ r Lc H D Na N a b j k) + (c₀ ^ (2 * Na) * W ^ (2 * (N + 1))) (2 * (Na * c₀) + 2 * W) := fun j k => + exists_iteratedDeriv_presentation_column_sz_epart ℓ r Lc A hH0 hD0 hr2 + (fun p => ⟨(hW' p).1, (hW' p).2.1, (hW' p).2.2.1, (hW' p).2.2.2.1⟩) + (hja j) (hjb j) (hja k) (hjb k) + obtain ⟨P, hPl, hPx, hPy, hPid⟩ := + hSH S T a b m (existsIteratedDerivPresentationColumnLam (φ D) ℓ Lc Na N) _ _ + (fun j k => existsIteratedDerivPresentationColumnEpart ℓ r Lc H D Na N a b j k) (fun j k => + (hszU j k).1) + (fun j k => (hszU j k).2.1) (fun j k => (hszU j k).2.2) + (fun j k => exists_iteratedDeriv_presentation_column_epart_eval φ x₁ x₂ y₁ y₂ ℓ r Lc H D hH hr1 + (hja j) (hjb j) (hja k) (hjb k)) + have hdeg : c₁ * (1 + m + S) + (2 * (Na * c₀) + 2 * W) ≤ c * (1 + m + S + Na) := by + have e1 : c * (1 + m + S + Na) = c * (1 + m + S) + c * Na := by ring + have e2 : (c₁ + 2 * W) * (1 + m + S) ≤ c * (1 + m + S) := Nat.mul_le_mul_right _ (by omega) + have e3 : (c₁ + 2 * W) * (1 + m + S) = c₁ * (1 + m + S) + 2 * W * (1 + m + S) := by ring + have e4 : 2 * W ≤ 2 * W * (1 + m + S) := Nat.le_mul_of_pos_right _ (by omega) + have e5 : 2 * c₀ * Na ≤ c * Na := Nat.mul_le_mul_right _ (by omega) + have e6 : 2 * (Na * c₀) = 2 * c₀ * Na := by ring + omega + refine ⟨φ D ^ (m + S) * existsIteratedDerivPresentationColumnLam (φ D) ℓ Lc Na N, + mul_ne_zero (pow_ne_zero _ hD) (exists_iteratedDeriv_presentation_column_lam_ne_zero hD ℓ hLc Na + N), ?_, P, fun i j k => ?_, + fun i j k r' => (hPx i j k r').trans hdeg, fun i j k => (hPy i j k).trans hdeg, hPid⟩ + · -- the size of `Λ` + have h1 : (1 : ℝ) ≤ c := Nat.one_le_cast.2 (by omega) + have hδc : ‖φ D‖ ≤ (c : ℝ) := (Nat.le_ceil _).trans (Nat.cast_le.2 (by omega)) + have hLc' : ∀ p, ‖(Lc p : ℂ)‖ ≤ (c : ℝ) := fun p => + (Nat.le_ceil _).trans (Nat.cast_le.2 ((hCL p).trans (by omega))) + refine (exists_iteratedDeriv_presentation_column_norm_mul_le_pow + (exists_iteratedDeriv_presentation_column_norm_pow_le_pow hδc (m + + S)) (exists_iteratedDeriv_presentation_column_norm_lam_le hδc ℓ hLc' Na N)).trans + (pow_le_pow_right₀ h1 ?_) + have e1 : c * (1 + m + S + (Na + N)) = c + c * (m + S + Na + N) := by ring + have e2 : 4 * (m + S + Na + N) ≤ c * (m + S + Na + N) := Nat.mul_le_mul_right _ (by omega) + have := (hW' 0).2.2.2.2 + have := (hW' 1).2.2.2.2 + omega + · -- the length of `P_{ijk}` + have hc1 : 1 ≤ c := by omega + have hY : 1 ≤ 1 + m + S + T + a + b := by omega + have hexp : c₁ * (1 + m + S) + (2 * Na + 2 * (N + 1)) ≤ c * (1 + m + S + (Na + N)) := by + have f1 : c * (1 + m + S + (Na + N)) = c * (1 + m + S) + c * (Na + N) := by ring + have f2 : (c₁ + 2) * (1 + m + S) ≤ c * (1 + m + S) := Nat.mul_le_mul_right _ (by omega) + have f3 : (c₁ + 2) * (1 + m + S) = c₁ * (1 + m + S) + 2 * (1 + m + S) := by ring + have f4 : 2 * (Na + N) ≤ c * (Na + N) := Nat.mul_le_mul_right _ (by omega) + omega + calc existsIteratedDerivPresentationColumnLen (P i j k) + ≤ c₁ ^ (c₁ * (1 + m + S)) * (1 + m + S + T + a + b) ^ (c₁ * (1 + m + S)) * + (c₀ ^ (2 * Na) * W ^ (2 * (N + 1))) := hPl i j k + _ ≤ c ^ (c₁ * (1 + m + S)) * (1 + m + S + T + a + b) ^ (c * (1 + m + S)) * + (c ^ (2 * Na) * c ^ (2 * (N + 1))) := + Nat.mul_le_mul (Nat.mul_le_mul (Nat.pow_le_pow_left (by omega) _) + (Nat.pow_le_pow_right hY (Nat.mul_le_mul_right _ (by omega)))) + (Nat.mul_le_mul (Nat.pow_le_pow_left (by omega) _) (Nat.pow_le_pow_left (by omega) _)) + _ = c ^ (c₁ * (1 + m + S) + (2 * Na + 2 * (N + 1))) * + (1 + m + S + T + a + b) ^ (c * (1 + m + S)) := by rw [pow_add, pow_add]; ring + _ ≤ c ^ (c * (1 + m + S + (Na + N))) * (1 + m + S + T + a + b) ^ (c * (1 + m + S)) := + Nat.mul_le_mul_right _ (Nat.pow_le_pow_right hc1 hexp) + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExistsIteratedDerivPresentationOfExpFactor.lean b/LeanPool/FourExponentials/ExistsIteratedDerivPresentationOfExpFactor.lean new file mode 100644 index 0000000000..019781454d --- /dev/null +++ b/LeanPool/FourExponentials/ExistsIteratedDerivPresentationOfExpFactor.lean @@ -0,0 +1,500 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.LengthMulLe +public import LeanPool.FourExponentials.LengthSumLe +public import Mathlib.Algebra.Polynomial.BigOperators +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.SpecialFunctions.ExpDeriv +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.FunProp +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.SplitIfs + +/-! +# Integer presentations of the derivatives, from a presented exponential factor + +Write `φ(P) = P(ω, ω₁)` for `P ∈ ℤ[X][Y]`, `δ = φ(D)`, `β = j x₁ + k x₂` and `ζ = a y₁ + b y₂`. +The exponential factor is given: integer polynomials `U_{jk}` with `φ(U_{jk}) = Λ₁ e^(βζ)`, of +length at most `L` and degrees at most `d`. + +* **Leibniz.** `(z^i e^(βz))⁽ᵐ⁾(ζ) = ∑_{l ≤ m} C(m,l) i(i-1)⋯(i-l+1) ζ^(i-l) β^(m-l) e^(βζ)`, + and the `m`-th derivative is linear in the coefficients `f_{ijk}`. +* **Polynomial factors.** Since `δβ = φ(j E₀ + k E₁)` and `δζ = φ(a G₀ + b G₁)`, for `l ≤ i < S` + the number `δ^(m+S) ζ^(i-l) β^(m-l) Λ₁ e^(βζ)` is `φ` of + `D^l (j E₀ + k E₁)^(m-l) (a G₀ + b G₁)^(i-l) D^(S-i+l) U_{jk}`. For `l > i` the Leibniz term + vanishes. +* **Sizes.** Lengths are controlled by `existsIteratedDerivPresentationOfExpFactorLen(PQ) ≤ + existsIteratedDerivPresentationOfExpFactorLen(P) + existsIteratedDerivPresentationOfExpFactorLen(Q)` and + `existsIteratedDerivPresentationOfExpFactorLen(∑ Pᵢ) ≤ ∑ + existsIteratedDerivPresentationOfExpFactorLen(Pᵢ)`; the + degrees in `X` and `Y` add up under products. If `c₀` bounds the lengths and degrees of `D`, `E` + and `G`, the lengths of the `P_{ijk}` are at most `K^(4m+S) L` with `K = 2(1+m+S+T+a+b)c₀`, + and their degrees at most `(2m+S)c₀ + d`. For `c = 2c₀ + 4`, + `K^(4m+S) ≤ c^(c(1+m+S)) (1+m+S+T+a+b)^(c(1+m+S))`. + +The helpers are those of the accepted proof of `exists_iteratedDeriv_presentation`, which +is this statement with the exponential factor presented from four algebraic exponentials. + +From `Diaz/Mirror/exists_iteratedDeriv_presentation_of_exp_factor.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.exists_iteratedDeriv_presentation_of_exp_factor`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace ExistsIteratedDerivPresentationOfExpFactor + +open Polynomial + +/-! ### Length and size of integer polynomials in two variables -/ + +/-- The length of `P ∈ ℤ[X][Y]`: the sum of the absolute values of all its integer coefficients. -/ +noncomputable def existsIteratedDerivPresentationOfExpFactorLen (P : ℤ[X][X]) : ℕ := + ∑ r ∈ P.support, ∑ h ∈ (P.coeff r).support, ((P.coeff r).coeff h).natAbs + +lemma exists_iteratedDeriv_presentation_of_exp_factor_len_mul (P Q : ℤ[X][X]) : + existsIteratedDerivPresentationOfExpFactorLen (P * Q) ≤ + existsIteratedDerivPresentationOfExpFactorLen P * + existsIteratedDerivPresentationOfExpFactorLen Q := + Transcendence.length_mul_le P Q + +lemma exists_iteratedDeriv_presentation_of_exp_factor_len_sum {ι : Type*} (s : Finset ι) (f : ι → + ℤ[X][X]) : + existsIteratedDerivPresentationOfExpFactorLen (∑ i ∈ s, f i) ≤ ∑ i ∈ s, + existsIteratedDerivPresentationOfExpFactorLen (f i) := + Transcendence.length_sum_le s f + +lemma exists_iteratedDeriv_presentation_of_exp_factor_len_add (P Q : ℤ[X][X]) : + existsIteratedDerivPresentationOfExpFactorLen (P + Q) ≤ + existsIteratedDerivPresentationOfExpFactorLen P + + existsIteratedDerivPresentationOfExpFactorLen Q := by + have h := exists_iteratedDeriv_presentation_of_exp_factor_len_sum (Finset.univ : Finset (Fin 2)) + ![P, Q] + rw [Fin.sum_univ_two, Fin.sum_univ_two] at h + exact h + +lemma exists_iteratedDeriv_presentation_of_exp_factor_len_CC (z : ℤ) : + existsIteratedDerivPresentationOfExpFactorLen (C (C z)) = z.natAbs := by + rcases eq_or_ne z 0 with rfl | hz + · rw [Polynomial.C_0, Polynomial.C_0, existsIteratedDerivPresentationOfExpFactorLen, + Polynomial.support_zero, Finset.sum_empty, + Int.natAbs_zero] + · rw [existsIteratedDerivPresentationOfExpFactorLen, + Polynomial.support_C (Polynomial.C_ne_zero.2 hz), Finset.sum_singleton, + Polynomial.coeff_C_zero, Polynomial.support_C hz, Finset.sum_singleton, + Polynomial.coeff_C_zero] + +/-- `P` has length at most `b`, and degrees at most `d` in `X` and in `Y`. -/ +def existsIteratedDerivPresentationOfExpFactorSz (P : ℤ[X][X]) (b d : ℕ) : Prop := + existsIteratedDerivPresentationOfExpFactorLen P ≤ b ∧ (∀ r, + (P.coeff r).natDegree ≤ d) ∧ P.natDegree ≤ d + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_mono {P : ℤ[X][X]} {b b' d d' : ℕ} (h : + existsIteratedDerivPresentationOfExpFactorSz P b d) (hb : b ≤ b') (hd : d ≤ d') : + existsIteratedDerivPresentationOfExpFactorSz P b' d' := + ⟨h.1.trans hb, fun r => (h.2.1 r).trans hd, h.2.2.trans hd⟩ + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_mul {P Q : ℤ[X][X]} {b₁ b₂ d₁ d₂ : ℕ} (hP : + existsIteratedDerivPresentationOfExpFactorSz P b₁ d₁) (hQ : + existsIteratedDerivPresentationOfExpFactorSz Q b₂ d₂) : + existsIteratedDerivPresentationOfExpFactorSz (P * Q) (b₁ * b₂) (d₁ + d₂) := by + refine ⟨(exists_iteratedDeriv_presentation_of_exp_factor_len_mul P Q).trans (Nat.mul_le_mul hP.1 + hQ.1), fun r => ?_, + Polynomial.natDegree_mul_le.trans (Nat.add_le_add hP.2.2 hQ.2.2)⟩ + rw [Polynomial.coeff_mul] + exact Polynomial.natDegree_sum_le_of_forall_le _ _ fun x _ => + Polynomial.natDegree_mul_le.trans (Nat.add_le_add (hP.2.1 x.1) (hQ.2.1 x.2)) + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_add {P Q : ℤ[X][X]} {b₁ b₂ d : ℕ} (hP : + existsIteratedDerivPresentationOfExpFactorSz P b₁ d) (hQ : + existsIteratedDerivPresentationOfExpFactorSz Q b₂ d) : + existsIteratedDerivPresentationOfExpFactorSz (P + Q) (b₁ + b₂) d := by + refine ⟨(exists_iteratedDeriv_presentation_of_exp_factor_len_add P Q).trans (Nat.add_le_add hP.1 + hQ.1), fun r => ?_, + (Polynomial.natDegree_add_le P Q).trans (max_le hP.2.2 hQ.2.2)⟩ + rw [Polynomial.coeff_add] + exact (Polynomial.natDegree_add_le _ _).trans (max_le (hP.2.1 r) (hQ.2.1 r)) + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_sum {ι : Type*} (s : Finset ι) (f : ι → + ℤ[X][X]) {b d : ℕ} + (h : ∀ i ∈ s, existsIteratedDerivPresentationOfExpFactorSz (f i) b d) : + existsIteratedDerivPresentationOfExpFactorSz (∑ i ∈ s, f i) (s.card * b) d := by + refine ⟨(exists_iteratedDeriv_presentation_of_exp_factor_len_sum s f).trans ?_, fun r => ?_, + Polynomial.natDegree_sum_le_of_forall_le _ _ fun i hi => (h i hi).2.2⟩ + · rw [← smul_eq_mul, ← Finset.sum_const] + exact Finset.sum_le_sum fun i hi => (h i hi).1 + · rw [Polynomial.finsetSum_coeff] + exact Polynomial.natDegree_sum_le_of_forall_le _ _ fun i hi => (h i hi).2.1 r + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_CC (z : ℤ) : + existsIteratedDerivPresentationOfExpFactorSz (C (C z)) z.natAbs 0 := by + refine ⟨(exists_iteratedDeriv_presentation_of_exp_factor_len_CC z).le, fun r => ?_, + (Polynomial.natDegree_C _).le⟩ + rw [Polynomial.coeff_C] + split_ifs + · exact (Polynomial.natDegree_C z).le + · exact Polynomial.natDegree_zero.le + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_CN (n : ℕ) : + existsIteratedDerivPresentationOfExpFactorSz (C (C (n : ℤ))) n 0 := + exists_iteratedDeriv_presentation_of_exp_factor_sz_CC (n : ℤ) + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_one : + existsIteratedDerivPresentationOfExpFactorSz 1 1 0 := by + have h := exists_iteratedDeriv_presentation_of_exp_factor_sz_CC 1 + rw [Polynomial.C_1, Polynomial.C_1] at h + exact h + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_pow {P : ℤ[X][X]} {b d : ℕ} (h : + existsIteratedDerivPresentationOfExpFactorSz P b d) : ∀ n : ℕ, + existsIteratedDerivPresentationOfExpFactorSz (P ^ n) (b ^ n) (n * d) + | 0 => by + rw [pow_zero, pow_zero, Nat.zero_mul] + exact exists_iteratedDeriv_presentation_of_exp_factor_sz_one + | n + 1 => by + rw [pow_succ, pow_succ, Nat.succ_mul] + exact exists_iteratedDeriv_presentation_of_exp_factor_sz_mul + (exists_iteratedDeriv_presentation_of_exp_factor_sz_pow h n) h + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_exists (P : ℤ[X][X]) : ∃ c, + existsIteratedDerivPresentationOfExpFactorSz P c c := by + refine ⟨existsIteratedDerivPresentationOfExpFactorLen P + (∑ k ∈ Finset.range (P.natDegree + + 1), (P.coeff k).natDegree) + P.natDegree, + by omega, fun r => ?_, by omega⟩ + by_cases hr : r ≤ P.natDegree + · have : (P.coeff r).natDegree ≤ ∑ k ∈ Finset.range (P.natDegree + 1), (P.coeff k).natDegree := + Finset.single_le_sum (f := fun k => (P.coeff k).natDegree) (fun _ _ => Nat.zero_le _) + (Finset.mem_range.2 (Nat.lt_succ_of_le hr)) + omega + · rw [Polynomial.coeff_eq_zero_of_natDegree_lt (not_le.1 hr), Polynomial.natDegree_zero] + exact Nat.zero_le _ + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_exists_fam {ι : Type*} [Finite ι] (F : ι → + ℤ[X][X]) : ∃ c, ∀ i, existsIteratedDerivPresentationOfExpFactorSz (F i) c c := by + have := Fintype.ofFinite ι + choose c hc using fun i => exists_iteratedDeriv_presentation_of_exp_factor_sz_exists (F i) + have hle : ∀ i, c i ≤ ∑ i', c i' := fun i => + Finset.single_le_sum (f := c) (fun _ _ => Nat.zero_le _) (Finset.mem_univ i) + exact ⟨∑ i, c i, fun i => exists_iteratedDeriv_presentation_of_exp_factor_sz_mono (hc i) (hle i) + (hle i)⟩ + +lemma exists_iteratedDeriv_presentation_of_exp_factor_succ_le_two_pow : ∀ m : ℕ, m + 1 ≤ 2 ^ m + | 0 => le_rfl + | m + 1 => by + have := exists_iteratedDeriv_presentation_of_exp_factor_succ_le_two_pow m + rw [pow_succ] + omega + +/-! ### Values of integer polynomials -/ + +lemma exists_iteratedDeriv_presentation_of_exp_factor_phi_CC (φ : ℤ[X][X] →+* ℂ) (z : ℤ) : φ (C (C + z)) = (z : ℂ) := + eq_intCast (φ.comp ((C : ℤ[X] →+* ℤ[X][X]).comp (C : ℤ →+* ℤ[X]))) z + +/-- If `u φ(D) = φ(U)` and `v φ(D) = φ(V)`, then `(p u + q v) φ(D) = φ(p U + q V)`. -/ +lemma exists_iteratedDeriv_presentation_of_exp_factor_lin_eval (φ : ℤ[X][X] →+* ℂ) {u v : ℂ} {Dp U V + : ℤ[X][X]} (hU : u * φ Dp = φ U) + (hV : v * φ Dp = φ V) (p q : ℕ) : + ((p : ℂ) * u + (q : ℂ) * v) * φ Dp = φ (C (C (p : ℤ)) * U + C (C (q : ℤ)) * V) := by + rw [map_add φ, map_mul φ, map_mul φ, exists_iteratedDeriv_presentation_of_exp_factor_phi_CC φ, + exists_iteratedDeriv_presentation_of_exp_factor_phi_CC φ, ← hU, ← hV, Int.cast_natCast, + Int.cast_natCast] + ring + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_lin {U V : ℤ[X][X]} {c : ℕ} (hU : + existsIteratedDerivPresentationOfExpFactorSz U c c) (hV : + existsIteratedDerivPresentationOfExpFactorSz V c c) (p q : ℕ) : + existsIteratedDerivPresentationOfExpFactorSz (C (C (p : ℤ)) * U + C (C (q : ℤ)) * V) ((p + + q) * c) c := + exists_iteratedDeriv_presentation_of_exp_factor_sz_mono + (exists_iteratedDeriv_presentation_of_exp_factor_sz_add + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mul + (exists_iteratedDeriv_presentation_of_exp_factor_sz_CN p) hU) + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mul + (exists_iteratedDeriv_presentation_of_exp_factor_sz_CN q) hV)) (Nat.add_mul p + q c).symm.le + (Nat.zero_add c).le + +/-! ### The presentation of the derivative -/ + +/-- Leibniz's rule for the exponential polynomial, linearly in its coefficients. -/ +lemma exists_iteratedDeriv_presentation_of_exp_factor_iteratedDeriv_expPoly (S T m : ℕ) (x₁ x₂ : ℂ) + (f : Fin S → Fin T → Fin T → ℂ) (w : ℂ) : + iteratedDeriv m (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) w = + ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, f i j k * + ∑ l ∈ Finset.range (m + 1), (m.choose l : ℂ) * + (((i : ℕ).descFactorial l : ℂ) * w ^ ((i : ℕ) - l)) * + ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) ^ (m - l) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * w)) := by + have key : ∀ (i : Fin S) (j k : Fin T), iteratedDeriv m (fun z : ℂ => + f i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) w = + f i j k * ∑ l ∈ Finset.range (m + 1), (m.choose l : ℂ) * + (((i : ℕ).descFactorial l : ℂ) * w ^ ((i : ℕ) - l)) * + ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) ^ (m - l) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * w)) := by + intro i j k + have h1 : ContDiffAt ℂ m (fun z : ℂ => z ^ (i : ℕ)) w := (contDiff_id.pow _).contDiffAt + have h2 : ContDiffAt ℂ m (fun z : ℂ => + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) w := by fun_prop + simp_rw [mul_assoc (f i j k)] + rw [iteratedDeriv_const_mul_field, iteratedDeriv_fun_mul h1 h2] + congr 1 + refine Finset.sum_congr rfl fun l _ => ?_ + rw [iteratedDeriv_pow, iteratedDeriv_cexp_const_mul] + rw [iteratedDeriv_fun_sum (fun i _ => by fun_prop)] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [iteratedDeriv_fun_sum (fun j _ => by fun_prop)] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [iteratedDeriv_fun_sum (fun k _ => by fun_prop)] + exact Finset.sum_congr rfl fun k _ => key i j k + +/-- The integer polynomial `∑_{l ≤ m} C(m,l) i(i-1)⋯(i-l+1) D^l B^(m-l) Z^(i-l) D^(S-i+l) e`. -/ +noncomputable def existsIteratedDerivPresentationOfExpFactorPres (Dp Bp Zp ep : ℤ[X][X]) (S m + i : ℕ) : ℤ[X][X] := + ∑ l ∈ Finset.range (m + 1), C (C ((m.choose l * i.descFactorial l : ℕ) : ℤ)) * + (Dp ^ l * Bp ^ (m - l) * Zp ^ (i - l) * Dp ^ (S - i + l)) * ep + +lemma exists_iteratedDeriv_presentation_of_exp_factor_pres_eval (φ : ℤ[X][X] →+* ℂ) {Dp Bp Zp ep : + ℤ[X][X]} {β ζ Λ' e : ℂ} + (hB : β * φ Dp = φ Bp) (hZ : ζ * φ Dp = φ Zp) (he : φ ep = Λ' * e) {S m i : ℕ} (hi : i < S) : + φ (existsIteratedDerivPresentationOfExpFactorPres Dp Bp Zp ep S m i) = φ Dp ^ (m + S) * Λ' + * + ∑ l ∈ Finset.range (m + 1), (m.choose l : ℂ) * ((i.descFactorial l : ℂ) * ζ ^ (i - l)) * + (β ^ (m - l) * e) := by + rw [existsIteratedDerivPresentationOfExpFactorPres, map_sum φ, Finset.mul_sum] + refine Finset.sum_congr rfl fun l hl => ?_ + have hl' := Finset.mem_range.1 hl + simp only [map_mul φ, map_pow φ] + rw [← hB, ← hZ, he, exists_iteratedDeriv_presentation_of_exp_factor_phi_CC φ, Int.cast_natCast, + Nat.cast_mul] + rcases Nat.lt_or_ge i l with h | h + · rw [Nat.descFactorial_eq_zero_iff_lt.2 h, Nat.cast_zero] + ring + · have hδ : φ Dp ^ (m + S) = + φ Dp ^ l * φ Dp ^ (m - l) * φ Dp ^ (i - l) * φ Dp ^ (S - i + l) := by + rw [← pow_add, ← pow_add, ← pow_add] + congr 1 + omega + rw [hδ, mul_pow, mul_pow] + ring + +lemma exists_iteratedDeriv_presentation_of_exp_factor_sz_pres {Dp Bp Zp ep : ℤ[X][X]} {K c E dE S m + i : ℕ} (hD : existsIteratedDerivPresentationOfExpFactorSz Dp K c) (hB : + existsIteratedDerivPresentationOfExpFactorSz Bp K c) + (hZ : existsIteratedDerivPresentationOfExpFactorSz Zp K c) (he : + existsIteratedDerivPresentationOfExpFactorSz ep E dE) (hi : i < S) (hK : 2 * (i + 1) ≤ + K) : + existsIteratedDerivPresentationOfExpFactorSz + (existsIteratedDerivPresentationOfExpFactorPres Dp Bp Zp ep S m i) (K ^ (4 * m + S) * + E) ((2 * m + S) * c + dE) := by + have hK0 : 0 < K := by omega + have hcoef : ∀ l, l ≤ m → m.choose l * i.descFactorial l ≤ K ^ m := fun l hl => + calc m.choose l * i.descFactorial l ≤ 2 ^ m * (i + 1) ^ m := + Nat.mul_le_mul (Nat.choose_le_two_pow m l) + ((Nat.descFactorial_le_pow i l).trans ((Nat.pow_le_pow_left (Nat.le_succ i) l).trans + (Nat.pow_le_pow_right (Nat.succ_pos i) hl))) + _ = (2 * (i + 1)) ^ m := (Nat.mul_pow 2 (i + 1) m).symm + _ ≤ K ^ m := Nat.pow_le_pow_left hK m + have h : existsIteratedDerivPresentationOfExpFactorSz + (existsIteratedDerivPresentationOfExpFactorPres Dp Bp Zp ep S m i) ((Finset.range (m + + 1)).card * (K ^ (3 * m + S) * E)) + ((2 * m + S) * c + dE) := + exists_iteratedDeriv_presentation_of_exp_factor_sz_sum (Finset.range (m + 1)) _ fun l hl => by + have hl' := Finset.mem_range.1 hl + refine exists_iteratedDeriv_presentation_of_exp_factor_sz_mono + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mul + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mul + (exists_iteratedDeriv_presentation_of_exp_factor_sz_CN _) + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mul + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mul + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mul + (exists_iteratedDeriv_presentation_of_exp_factor_sz_pow hD l) + (exists_iteratedDeriv_presentation_of_exp_factor_sz_pow hB (m - + l))) (exists_iteratedDeriv_presentation_of_exp_factor_sz_pow hZ (i - + l))) (exists_iteratedDeriv_presentation_of_exp_factor_sz_pow hD (S - i + + l)))) he) ?_ ?_ + · refine Nat.mul_le_mul_right E ?_ + rw [← pow_add, ← pow_add, ← pow_add] + calc m.choose l * i.descFactorial l * K ^ (l + (m - l) + (i - l) + (S - i + l)) + ≤ K ^ m * K ^ (2 * m + S) := + Nat.mul_le_mul (hcoef l (by omega)) (Nat.pow_le_pow_right hK0 (by omega)) + _ = K ^ (3 * m + S) := by rw [← pow_add, show m + (2 * m + S) = 3 * m + S by omega] + · rw [Nat.zero_add, ← Nat.add_mul, ← Nat.add_mul, ← Nat.add_mul] + exact Nat.add_le_add_right (Nat.mul_le_mul_right c (by omega)) dE + refine exists_iteratedDeriv_presentation_of_exp_factor_sz_mono h ?_ le_rfl + rw [Finset.card_range] + calc (m + 1) * (K ^ (3 * m + S) * E) ≤ K ^ m * (K ^ (3 * m + S) * E) := + Nat.mul_le_mul_right _ ((exists_iteratedDeriv_presentation_of_exp_factor_succ_le_two_pow + m).trans (Nat.pow_le_pow_left (by omega) m)) + _ = K ^ (4 * m + S) * E := by + rw [← Nat.mul_assoc, ← pow_add, show m + (3 * m + S) = 4 * m + S by omega] + +/-! ### The presentation, from a presented exponential factor -/ + +/-- The polynomial `P_{ijk}`, from the polynomial `ep = U_{jk}` presenting the exponential +factor. -/ +noncomputable def existsIteratedDerivPresentationOfExpFactorPpol (D : ℤ[X][X]) (E G : Fin 2 → + ℤ[X][X]) (ep : ℤ[X][X]) (S a b m i j k : ℕ) : + ℤ[X][X] := + existsIteratedDerivPresentationOfExpFactorPres D (C (C (j : ℤ)) * E 0 + C (C (k : ℤ)) * + E 1) (C (C (a : ℤ)) * G 0 + C (C (b : ℤ)) * G 1) + ep S m i + +/-- The statement, for an arbitrary ring homomorphism `φ : ℤ[X][Y] → ℂ`. -/ +theorem exists_iteratedDeriv_presentation_of_exp_factor_main (x₁ x₂ y₁ y₂ : ℂ) (φ : ℤ[X][X] →+* ℂ) + (D : ℤ[X][X]) (E G : Fin 2 → ℤ[X][X]) + (hE : ∀ i, ![x₁, x₂] i * φ D = φ (E i)) (hG : ∀ j, ![y₁, y₂] j * φ D = φ (G j)) : + ∃ c : ℕ, ∀ (S T a b m : ℕ) (Λ₁ : ℂ) (L d : ℕ) (U : Fin T → Fin T → ℤ[X][X]), + (∀ j k, existsIteratedDerivPresentationOfExpFactorLen (U j k) ≤ L) → (∀ j k r, + ((U j k).coeff r).natDegree ≤ d) → + (∀ j k, (U j k).natDegree ≤ d) → + (∀ j k : Fin T, φ (U j k) = Λ₁ * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * + ((a : ℂ) * y₁ + (b : ℂ) * y₂))) → + ∃ P : Fin S → Fin T → Fin T → ℤ[X][X], + (∀ i j k, existsIteratedDerivPresentationOfExpFactorLen (P i j k) ≤ + c ^ (c * (1 + m + S)) * (1 + m + S + T + a + b) ^ (c * (1 + m + S)) * L) ∧ + (∀ i j k r, ((P i j k).coeff r).natDegree ≤ c * (1 + m + S) + d) ∧ + (∀ i j k, (P i j k).natDegree ≤ c * (1 + m + S) + d) ∧ + ∀ f : Fin S → Fin T → Fin T → ℂ, + φ D ^ (m + S) * Λ₁ * iteratedDeriv m (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, + ∑ k : Fin T, f i j k * z ^ (i : ℕ) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, f i j k * φ (P i j k) := by + -- a common size `c₀` for the data + obtain ⟨cD, hcD⟩ := exists_iteratedDeriv_presentation_of_exp_factor_sz_exists D + obtain ⟨cE, hcE⟩ := exists_iteratedDeriv_presentation_of_exp_factor_sz_exists_fam E + obtain ⟨cG, hcG⟩ := exists_iteratedDeriv_presentation_of_exp_factor_sz_exists_fam G + obtain ⟨c₀, hc₀⟩ : ∃ c₀, c₀ = cD + cE + cG + 1 := ⟨_, rfl⟩ + have hD0 : existsIteratedDerivPresentationOfExpFactorSz D c₀ c₀ := + exists_iteratedDeriv_presentation_of_exp_factor_sz_mono hcD (by omega) (by omega) + have hE0 : ∀ p, existsIteratedDerivPresentationOfExpFactorSz (E p) c₀ c₀ := + fun p => exists_iteratedDeriv_presentation_of_exp_factor_sz_mono (hcE p) (by omega) (by omega) + have hG0 : ∀ q, existsIteratedDerivPresentationOfExpFactorSz (G q) c₀ c₀ := + fun q => exists_iteratedDeriv_presentation_of_exp_factor_sz_mono (hcG q) (by omega) (by omega) + obtain ⟨c, hc⟩ : ∃ c, c = 2 * c₀ + 4 := ⟨_, rfl⟩ + refine ⟨c, fun S T a b m Λ₁ L d U hUl hUx hUy hU => ?_⟩ + obtain ⟨Q, hQ⟩ : ∃ Q, Q = 1 + m + S + T + a + b := ⟨_, rfl⟩ + obtain ⟨K, hK⟩ : ∃ K, K = 2 * Q * c₀ := ⟨_, rfl⟩ + rw [← hQ] + -- elementary inequalities + have hQK : 2 * Q ≤ K := by + rw [hK] + calc 2 * Q = 2 * Q * 1 := (Nat.mul_one _).symm + _ ≤ 2 * Q * c₀ := Nat.mul_le_mul_left _ (by omega) + have hc₀K : c₀ ≤ K := by + rw [hK] + calc c₀ = 1 * c₀ := (Nat.one_mul _).symm + _ ≤ 2 * Q * c₀ := Nat.mul_le_mul_right _ (by omega) + have hmS : 4 * m + S ≤ c * (1 + m + S) := by + have : 4 * (1 + m + S) ≤ c * (1 + m + S) := Nat.mul_le_mul_right _ (by omega) + omega + have hdeg : (2 * m + S) * c₀ + d ≤ c * (1 + m + S) + d := by + have e1 : (2 * m + S) * c₀ ≤ (2 * m + 2 * S) * c₀ := Nat.mul_le_mul_right c₀ (by omega) + have e2 : (2 * m + 2 * S) * c₀ = 2 * c₀ * (m + S) := by ring + have e3 : 2 * c₀ * (m + S) ≤ c * (m + S) := Nat.mul_le_mul_right (m + S) (by omega) + have e4 : c * (1 + m + S) = c + c * (m + S) := by ring + omega + -- sizes of the `P_{ijk}` + have hsz : ∀ (i : Fin S) (j k : Fin T), + existsIteratedDerivPresentationOfExpFactorSz + (existsIteratedDerivPresentationOfExpFactorPpol D E G (U j k) S a b m i j k) + (K ^ (4 * m + S) * L) ((2 * m + S) * c₀ + d) := fun i j k => + exists_iteratedDeriv_presentation_of_exp_factor_sz_pres + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mono hD0 hc₀K le_rfl) + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mono + (exists_iteratedDeriv_presentation_of_exp_factor_sz_lin (hE0 0) (hE0 1) (j : ℕ) (k : ℕ)) + (by rw [hK]; exact Nat.mul_le_mul_right c₀ (by omega)) le_rfl) + (exists_iteratedDeriv_presentation_of_exp_factor_sz_mono + (exists_iteratedDeriv_presentation_of_exp_factor_sz_lin (hG0 0) (hG0 1) a b) + (by rw [hK]; exact Nat.mul_le_mul_right c₀ (by omega)) le_rfl) + ⟨hUl j k, hUx j k, hUy j k⟩ i.2 (by have := i.2; omega) + refine ⟨fun i j k => existsIteratedDerivPresentationOfExpFactorPpol D E G (U j k) S a b m i + j k, fun i j k => ?_, + fun i j k r => ((hsz i j k).2.1 r).trans hdeg, fun i j k => (hsz i j k).2.2.trans hdeg, + fun f => ?_⟩ + · -- the length of `P_{ijk}` + calc existsIteratedDerivPresentationOfExpFactorLen + (existsIteratedDerivPresentationOfExpFactorPpol D E G (U j k) S a b m i j k) + ≤ K ^ (4 * m + S) * L := (hsz i j k).1 + _ = (2 * c₀) ^ (4 * m + S) * Q ^ (4 * m + S) * L := by rw [hK]; ring + _ ≤ c ^ (c * (1 + m + S)) * Q ^ (c * (1 + m + S)) * L := + Nat.mul_le_mul_right L (Nat.mul_le_mul + ((Nat.pow_le_pow_left (by omega) _).trans (Nat.pow_le_pow_right (by omega) hmS)) + (Nat.pow_le_pow_right (by omega) hmS)) + · -- the identity, by Leibniz's rule + rw [exists_iteratedDeriv_presentation_of_exp_factor_iteratedDeriv_expPoly S T m x₁ x₂ f, + Finset.mul_sum] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun j _ => ?_ + rw [Finset.mul_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + dsimp only [existsIteratedDerivPresentationOfExpFactorPpol] + rw [exists_iteratedDeriv_presentation_of_exp_factor_pres_eval φ + (exists_iteratedDeriv_presentation_of_exp_factor_lin_eval φ (u := x₁) (v := + x₂) (hE 0) (hE 1) (j : ℕ) (k : ℕ)) + (exists_iteratedDeriv_presentation_of_exp_factor_lin_eval φ (u := y₁) (v := + y₂) (hG 0) (hG 1) a b) (hU j k) i.2] + exact mul_left_comm _ _ _ + +end ExistsIteratedDerivPresentationOfExpFactor + +open ExistsIteratedDerivPresentationOfExpFactor in +/-- **Presentations from the exponential factor.** Let +$x_1,x_2,y_1,y_2,\omega,\omega_1\in\mathbb{C}$, let $\varphi$ be evaluation at $(\omega,\omega_1)$, +and let $D,E_i,G_j\in\mathbb{Z}[X][Y]$ with $x_i\varphi(D)=\varphi(E_i)$ and +$y_j\varphi(D)=\varphi(G_j)$. There is $c\in\mathbb{N}$ with the following property. Let +$S,T,a,b,m,L,\delta\in\mathbb{N}$ and $\Lambda_1\in\mathbb{C}$, and let $U_{jh}\in\mathbb{Z}[X][Y]$ +($j,h ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * z ^ (i : ℕ) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + f i j k * + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (P i j k) := by + exact exists_iteratedDeriv_presentation_of_exp_factor_main x₁ x₂ y₁ y₂ + (Polynomial.eval₂RingHom (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁) D E G hE hG + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExistsIteratedDerivReducedPresentation.lean b/LeanPool/FourExponentials/ExistsIteratedDerivReducedPresentation.lean new file mode 100644 index 0000000000..3f5dfa4c98 --- /dev/null +++ b/LeanPool/FourExponentials/ExistsIteratedDerivReducedPresentation.lean @@ -0,0 +1,211 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsIteratedDerivPresentation +public import LeanPool.FourExponentials.ExistsModByMonicLengthLe +public import Mathlib.Algebra.AffineMonoid.UniqueSums +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set +public import Mathlib.Tactic.SplitIfs + +/-! +# Reduced presentations + +In the setting of Lemma , let moreover $Q\in\mathbb{Z}[X][Y]$ be monic in $Y$ with $\varphi(Q)=0$. +There is $c\in\mathbb{N}$ such that for all $S,T,M,a,b,m\in\mathbb{N}$ there are $\Lambda\neq0$ with +$|\Lambda|\le c^{\,c(1+m+S+T(a+b))}$ and $R_{ijh\mu\nu}\in\mathbb{Z}[X][Y]$ ($i ?_, ?_⟩ + · rw [mul_assoc, coeff_C_mul, coeff_X_pow_mul'] + refine natDegree_mul_le.trans ?_ + split_ifs + · exact add_le_add (natDegree_X_pow_le μ) (he _) + · rw [natDegree_zero, add_zero] + exact (natDegree_X_pow_le μ).trans (Nat.le_add_right μ e) + · calc (C (X ^ μ) * X ^ ν * P).natDegree + ≤ (C (X ^ μ) * X ^ ν : ℤ[X][X]).natDegree + P.natDegree := natDegree_mul_le + _ ≤ ((C (X ^ μ) : ℤ[X][X]).natDegree + (X ^ ν : ℤ[X][X]).natDegree) + P.natDegree := + Nat.add_le_add_right natDegree_mul_le _ + _ ≤ (0 + ν) + n := by + gcongr + · exact (natDegree_C _).le + · exact natDegree_X_pow_le ν + _ = ν + n := by ring + +end ExistsIteratedDerivReducedPresentation + +open Polynomial ExistsIteratedDerivReducedPresentation in +/-- Write `φ(P) = P(ω, ω₁)`. Take `R_{ijkμν} = (X^μ Y^ν P_{ijk}) mod Q`, where `P_{ijk}` and `Λ` +come from the presentation of the derivatives with coefficients `f_{ijk} = ∑ q_{ijkμν} ω^μ ω₁^ν`. +Since `φ(Q) = 0`, `φ(R_{ijkμν}) = ω^μ ω₁^ν φ(P_{ijk})`, which gives the identity after summing +against `q_{ijkμν}`. The remainder has `Y`-degree below `deg Q`. The +product `X^μ Y^ν P_{ijk}` has length at most that of `P_{ijk}`, `X`-degrees at most +`μ + c₄ (1 + m + S)` and `Y`-degree at most `ν + c₄ (1 + m + S)` with `ν < deg Q`, so the +reduction modulo `Q` multiplies the length by at most `C₀^(deg Q + c₄ (1 + m + S))` and adds at +most `C₀ (ν + c₄ (1 + m + S))` to the `X`-degrees. All of this is absorbed into one constant +`c ≥ C₀, c₄`, using `1 + m + S ≤ 1 + m + S + T (a + b)`. -/ +theorem exists_iteratedDeriv_reduced_presentation + (x₁ x₂ y₁ y₂ : ℂ) + (hexp : ∀ i j : Fin 2, IsAlgebraic ℚ (Complex.exp (![x₁, x₂] i * ![y₁, y₂] j))) + (ω ω₁ : ℂ) (Q : Polynomial (Polynomial ℤ)) (hQm : Q.Monic) + (hQroot : Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Q = 0) + (D : Polynomial (Polynomial ℤ)) (E G : Fin 2 → Polynomial (Polynomial ℤ)) + (H : Fin 2 → Fin 2 → Polynomial (Polynomial ℤ)) + (hD : Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D ≠ 0) + (hE : ∀ i, ![x₁, x₂] i * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (E i)) + (hG : ∀ j, ![y₁, y₂] j * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (G j)) + (hH : ∀ i j, Complex.exp (![x₁, x₂] i * ![y₁, y₂] j) * + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (H i j)) : + ∃ c : ℕ, ∀ S T M a b m : ℕ, ∃ Λ : ℂ, Λ ≠ 0 ∧ + ‖Λ‖ ≤ (c : ℝ) ^ (c * (1 + m + S + T * (a + b))) ∧ + ∃ R : Fin S → Fin T → Fin T → Fin M → Fin Q.natDegree → Polynomial (Polynomial ℤ), + (∀ i j k μ ν, (R i j k μ ν).natDegree < Q.natDegree) ∧ + (∀ i j k μ ν, ∑ r ∈ (R i j k μ ν).support, ∑ h ∈ ((R i j k μ ν).coeff r).support, + (((R i j k μ ν).coeff r).coeff h).natAbs ≤ + c ^ (c * (1 + m + S + T * (a + b))) * (1 + m + S + T + a + b) ^ (c * (1 + m + S))) ∧ + (∀ i j k μ ν r, ((R i j k μ ν).coeff r).natDegree ≤ M + c * (1 + m + S)) ∧ + ∀ q : Fin S → Fin T → Fin T → Fin M → Fin Q.natDegree → ℤ, + Λ * iteratedDeriv m (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + (∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + ((q i j k μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) * z ^ (i : ℕ) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ + (∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + Polynomial.C (Polynomial.C (q i j k μ ν)) * R i j k μ ν) := by + obtain ⟨c₄, h4⟩ := exists_iteratedDeriv_presentation x₁ x₂ y₁ y₂ hexp ω ω₁ D E G H + hD hE hG hH + obtain ⟨C₀, h3⟩ := Transcendence.exists_modByMonic_length_le Q + -- `Q ≠ 1`, since `φ(Q) = 0` + have hQ1 : Q ≠ 1 := by + rintro rfl + rw [eval₂_one] at hQroot + exact one_ne_zero hQroot + refine ⟨C₀ + Q.natDegree + 2 * c₄ + C₀ * Q.natDegree + C₀ * c₄ + 1, + fun S T M a b m => ?_⟩ + set c := C₀ + Q.natDegree + 2 * c₄ + C₀ * Q.natDegree + C₀ * c₄ + 1 with hc + obtain ⟨Λ, hΛ, hΛn, P, hPl, hPx, hPy, hPid⟩ := h4 S T a b m + set X' := 1 + m + S + T * (a + b) with hX' + set Y' := 1 + m + S + T + a + b with hY' + set Z := 1 + m + S with hZ + have hZ1 : 1 ≤ Z := by omega + have hZX : Z ≤ X' := by omega + have hZY : 1 ≤ Y' := by omega + have hc1 : 1 ≤ c := by omega + refine ⟨Λ, hΛ, ?_, fun i j k μ ν => (C (X ^ (μ : ℕ)) * X ^ (ν : ℕ) * P i j k) %ₘ Q, + fun i j k μ ν => natDegree_modByMonic_lt _ hQm hQ1, fun i j k μ ν => ?_, + fun i j k μ ν r => ?_, fun q => ?_⟩ + · -- the factor `Λ`: `c₄^(c₄ X') ≤ c^(c X')` + refine hΛn.trans ?_ + calc (c₄ : ℝ) ^ (c₄ * X') ≤ (c : ℝ) ^ (c₄ * X') := + pow_le_pow_left₀ (Nat.cast_nonneg _) (by exact_mod_cast (by omega : c₄ ≤ c)) _ + _ ≤ (c : ℝ) ^ (c * X') := + pow_le_pow_right₀ (by exact_mod_cast hc1) (Nat.mul_le_mul_right _ (by omega)) + · -- the length: `C₀^(deg Q + c₄ Z) c₄^(c₄ X') Y'^(c₄ Z) ≤ c^(c X') Y'^(c Z)` + obtain ⟨hsx, hsy⟩ := monomial_mul_degrees (P i j k) μ ν (hPx i j k) (hPy i j k) + have hν : (ν : ℕ) + c₄ * Z ≤ Q.natDegree + c₄ * Z := by have := ν.2; omega + have hmul := Transcendence.length_mul_le + (C (X ^ (μ : ℕ)) * X ^ (ν : ℕ)) (P i j k) + rw [length_monomial, one_mul] at hmul + refine ((h3 _ _ _ _ (hmul.trans (hPl i j k)) hsx (hsy.trans hν)).1).trans ?_ + have hexp1 : Q.natDegree + c₄ * Z + c₄ * X' ≤ c * X' := by + have h1 : Q.natDegree ≤ Q.natDegree * X' := Nat.le_mul_of_pos_right _ (by omega) + have h2 : c₄ * Z ≤ c₄ * X' := Nat.mul_le_mul_left _ hZX + have h3 := Nat.mul_le_mul_right X' (show Q.natDegree + c₄ + c₄ ≤ c by omega) + rw [Nat.add_mul, Nat.add_mul] at h3 + omega + calc C₀ ^ (Q.natDegree + c₄ * Z) * (c₄ ^ (c₄ * X') * Y' ^ (c₄ * Z)) + ≤ c ^ (Q.natDegree + c₄ * Z) * (c ^ (c₄ * X') * Y' ^ (c₄ * Z)) := + Nat.mul_le_mul (Nat.pow_le_pow_left (by omega) _) + (Nat.mul_le_mul_right _ (Nat.pow_le_pow_left (by omega) _)) + _ = c ^ (Q.natDegree + c₄ * Z + c₄ * X') * Y' ^ (c₄ * Z) := by ring + _ ≤ c ^ (c * X') * Y' ^ (c * Z) := + Nat.mul_le_mul (Nat.pow_le_pow_right hc1 hexp1) + (Nat.pow_le_pow_right hZY (Nat.mul_le_mul_right _ (by omega))) + · -- the `X`-degree: `μ + c₄ Z + C₀ (ν + c₄ Z) ≤ M + c Z` + obtain ⟨hsx, hsy⟩ := monomial_mul_degrees (P i j k) μ ν (hPx i j k) (hPy i j k) + have hmul := Transcendence.length_mul_le + (C (X ^ (μ : ℕ)) * X ^ (ν : ℕ)) (P i j k) + rw [length_monomial, one_mul] at hmul + refine ((h3 _ _ _ _ (hmul.trans (hPl i j k)) hsx hsy).2 r).trans ?_ + have hμ : (μ : ℕ) ≤ M := μ.2.le + have hν : (ν : ℕ) ≤ Q.natDegree := ν.2.le + have h1 : C₀ * ((ν : ℕ) + c₄ * Z) ≤ C₀ * Q.natDegree * Z + C₀ * c₄ * Z := by + have e1 : C₀ * (ν : ℕ) ≤ C₀ * Q.natDegree * Z := + (Nat.mul_le_mul_left C₀ hν).trans (Nat.le_mul_of_pos_right _ hZ1) + have e2 : C₀ * ((ν : ℕ) + c₄ * Z) = C₀ * ν + C₀ * c₄ * Z := by ring + omega + have h2 := Nat.mul_le_mul_right Z (show c₄ + C₀ * Q.natDegree + C₀ * c₄ ≤ c by omega) + rw [Nat.add_mul, Nat.add_mul] at h2 + omega + · -- the identity: `φ((X^μ Y^ν P) mod Q) = ω^μ ω₁^ν φ(P)` because `φ(Q) = 0` + have key := hPid (fun i j k => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + ((q i j k μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) + refine key.trans ?_ + have hφ : ∀ (P : ℤ[X][X]) (μ ν : ℕ), + eval₂ (eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ ((C (X ^ μ) * X ^ ν * P) %ₘ Q) = + ω ^ μ * ω₁ ^ ν * eval₂ (eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ P := by + intro P μ ν + have h := congrArg (eval₂ (eval₂RingHom (Int.castRingHom ℂ) ω) ω₁) + (modByMonic_add_div (C (X ^ μ) * X ^ ν * P) Q) + rw [eval₂_add, eval₂_mul, hQroot, zero_mul, add_zero] at h + rw [h] + simp only [eval₂_mul, eval₂_C, eval₂_X_pow, coe_eval₂RingHom] + simp only [eval₂_finsetSum, eval₂_mul, eval₂_C, hφ, coe_eval₂RingHom, Int.coe_castRingHom, + Finset.sum_mul] + refine Finset.sum_congr rfl fun i _ => Finset.sum_congr rfl fun j _ => + Finset.sum_congr rfl fun k _ => Finset.sum_congr rfl fun μ _ => + Finset.sum_congr rfl fun ν _ => ?_ + ring + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExistsIteratedDerivReducedPresentationColumn.lean b/LeanPool/FourExponentials/ExistsIteratedDerivReducedPresentationColumn.lean new file mode 100644 index 0000000000..9dc5d8069f --- /dev/null +++ b/LeanPool/FourExponentials/ExistsIteratedDerivReducedPresentationColumn.lean @@ -0,0 +1,207 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsIteratedDerivPresentationColumn +public import LeanPool.FourExponentials.ExistsModByMonicLengthLe +public import Mathlib.Algebra.AffineMonoid.UniqueSums +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set +public import Mathlib.Tactic.SplitIfs + +/-! +# The derivatives with integer unknowns, reduced modulo `Q`, in the column case + +As in `exists_iteratedDeriv_reduced_presentation`, with +`exists_iteratedDeriv_presentation_column` in place of +`exists_iteratedDeriv_presentation`. Write `φ(P) = P(ω, ω₁)` and take +`R_{ijkμν} = (X^μ Y^ν P_{ijk}) mod Q`, where `P_{ijk}` and `Λ` present the derivatives with +coefficients `f_{ijk} = ∑ q_{ijkμν} ω^μ ω₁^ν`. Since `φ(Q) = 0`, +`φ(R_{ijkμν}) = ω^μ ω₁^ν φ(P_{ijk})`, which gives the identity after summing against `q_{ijkμν}`. + +The only change is in the degrees. With `Z = 1 + m + S` and `Z' = 1 + m + S + T a`, the +`P_{ijk}` have length at most `c₄^(c₄ X') Y'^(c₄ Z)` and degrees at most `c₄ Z'` in `X` and in `Y`. +So `X^μ Y^ν P_{ijk}` has `Y`-degree at most `ν + c₄ Z'` with `ν < deg Q`, and the reduction +modulo `Q` multiplies the length by at most `C₀^(deg Q + c₄ Z')` and adds at most +`C₀ (ν + c₄ Z')` to the `X`-degrees. Both are absorbed into one constant `c`, using +`Z ≤ Z' ≤ X' = 1 + m + S + T (a + b)`: the length factor `Y'^(c Z)` keeps its exponent, and the +`X`-degrees are at most `M + c Z'`. + +From `Diaz/Mirror/exists_iteratedDeriv_reduced_presentation_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.exists_iteratedDeriv_reduced_presentation_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace ExistsIteratedDerivReducedPresentationColumn + +open Polynomial + +/-- The monomial `X^μ Y^ν` has length one. -/ +lemma exists_iteratedDeriv_reduced_presentation_column_length_monomial (μ ν : ℕ) : + ∑ k ∈ (C (X ^ μ) * X ^ ν : ℤ[X][X]).support, + ∑ i ∈ ((C (X ^ μ) * X ^ ν : ℤ[X][X]).coeff k).support, + (((C (X ^ μ) * X ^ ν : ℤ[X][X]).coeff k).coeff i).natAbs = 1 := by + rw [C_mul_X_pow_eq_monomial, support_monomial _ (pow_ne_zero _ X_ne_zero), Finset.sum_singleton, + coeff_monomial_same, support_X_pow, Finset.sum_singleton, coeff_X_pow_self] + rfl + +/-- Multiplying by `X^μ Y^ν` raises the `X`-degrees of the coefficients by at most `μ` and the +`Y`-degree by at most `ν`. -/ +lemma exists_iteratedDeriv_reduced_presentation_column_monomial_mul_degrees (P : ℤ[X][X]) (μ ν : ℕ) + {e n : ℕ} + (he : ∀ k, (P.coeff k).natDegree ≤ e) (hn : P.natDegree ≤ n) : + (∀ k, ((C (X ^ μ) * X ^ ν * P).coeff k).natDegree ≤ μ + e) ∧ + (C (X ^ μ) * X ^ ν * P).natDegree ≤ ν + n := by + refine ⟨fun k => ?_, ?_⟩ + · rw [mul_assoc, coeff_C_mul, coeff_X_pow_mul'] + refine natDegree_mul_le.trans ?_ + split_ifs + · exact add_le_add (natDegree_X_pow_le μ) (he _) + · rw [natDegree_zero, add_zero] + exact (natDegree_X_pow_le μ).trans (Nat.le_add_right μ e) + · calc (C (X ^ μ) * X ^ ν * P).natDegree + ≤ (C (X ^ μ) * X ^ ν : ℤ[X][X]).natDegree + P.natDegree := natDegree_mul_le + _ ≤ ((C (X ^ μ) : ℤ[X][X]).natDegree + (X ^ ν : ℤ[X][X]).natDegree) + P.natDegree := + Nat.add_le_add_right natDegree_mul_le _ + _ ≤ (0 + ν) + n := by + gcongr + · exact (natDegree_C _).le + · exact natDegree_X_pow_le ν + _ = ν + n := by ring + +end ExistsIteratedDerivReducedPresentationColumn + +open Polynomial ExistsIteratedDerivReducedPresentationColumn in +/-- **Reduced presentations, one algebraic column.** In the setting of Lemma , let moreover +$Q\in\mathbb{Z}[X][Y]$ be monic in $Y$ with $\varphi(Q)=0$. Then the conclusion of Lemma holds with +the $X$-degree bound $M+c(1+m+S+Ta)$ in place of $M+c(1+m+S)$. -/ +theorem exists_iteratedDeriv_reduced_presentation_column + (x₁ x₂ y₁ y₂ : ℂ) + (hexp₂ : ∀ i : Fin 2, IsAlgebraic ℚ (Complex.exp (![x₁, x₂] i * y₂))) + (ω ω₁ : ℂ) (Q : Polynomial (Polynomial ℤ)) (hQm : Q.Monic) + (hQroot : Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Q = 0) + (D : Polynomial (Polynomial ℤ)) (E G : Fin 2 → Polynomial (Polynomial ℤ)) + (H : Fin 2 → Fin 2 → Polynomial (Polynomial ℤ)) + (hD : Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D ≠ 0) + (hE : ∀ i, ![x₁, x₂] i * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (E i)) + (hG : ∀ j, ![y₁, y₂] j * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (G j)) + (hH : ∀ i j, Complex.exp (![x₁, x₂] i * ![y₁, y₂] j) * + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (H i j)) : + ∃ c : ℕ, ∀ S T M a b m : ℕ, ∃ Λ : ℂ, Λ ≠ 0 ∧ + ‖Λ‖ ≤ (c : ℝ) ^ (c * (1 + m + S + T * (a + b))) ∧ + ∃ R : Fin S → Fin T → Fin T → Fin M → Fin Q.natDegree → Polynomial (Polynomial ℤ), + (∀ i j k μ ν, (R i j k μ ν).natDegree < Q.natDegree) ∧ + (∀ i j k μ ν, ∑ r ∈ (R i j k μ ν).support, ∑ h ∈ ((R i j k μ ν).coeff r).support, + (((R i j k μ ν).coeff r).coeff h).natAbs ≤ + c ^ (c * (1 + m + S + T * (a + b))) * (1 + m + S + T + a + b) ^ (c * (1 + m + S))) ∧ + (∀ i j k μ ν r, ((R i j k μ ν).coeff r).natDegree ≤ M + c * (1 + m + S + T * a)) ∧ + ∀ q : Fin S → Fin T → Fin T → Fin M → Fin Q.natDegree → ℤ, + Λ * iteratedDeriv m (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + (∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + ((q i j k μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) * z ^ (i : ℕ) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ + (∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + Polynomial.C (Polynomial.C (q i j k μ ν)) * R i j k μ ν) := by + obtain ⟨c₄, h4⟩ := exists_iteratedDeriv_presentation_column x₁ x₂ y₁ y₂ hexp₂ ω ω₁ + D E G H hD hE hG hH + obtain ⟨C₀, h3⟩ := Transcendence.exists_modByMonic_length_le Q + -- `Q ≠ 1`, since `φ(Q) = 0` + have hQ1 : Q ≠ 1 := by + rintro rfl + rw [eval₂_one] at hQroot + exact one_ne_zero hQroot + refine ⟨C₀ + Q.natDegree + 2 * c₄ + C₀ * Q.natDegree + C₀ * c₄ + 1, + fun S T M a b m => ?_⟩ + set c := C₀ + Q.natDegree + 2 * c₄ + C₀ * Q.natDegree + C₀ * c₄ + 1 with hc + obtain ⟨Λ, hΛ, hΛn, P, hPl, hPx, hPy, hPid⟩ := h4 S T a b m + have hTa : T * a ≤ T * (a + b) := Nat.mul_le_mul_left T (Nat.le_add_right a b) + set X' := 1 + m + S + T * (a + b) with hX' + set Y' := 1 + m + S + T + a + b with hY' + set Z' := 1 + m + S + T * a with hZ' + set Z := 1 + m + S with hZ + have hZ'1 : 1 ≤ Z' := by omega + have hZX : Z' ≤ X' := by omega + have hZY : 1 ≤ Y' := by omega + have hc1 : 1 ≤ c := by omega + refine ⟨Λ, hΛ, ?_, fun i j k μ ν => (C (X ^ (μ : ℕ)) * X ^ (ν : ℕ) * P i j k) %ₘ Q, + fun i j k μ ν => natDegree_modByMonic_lt _ hQm hQ1, fun i j k μ ν => ?_, + fun i j k μ ν r => ?_, fun q => ?_⟩ + · -- the factor `Λ`: `c₄^(c₄ X') ≤ c^(c X')` + refine hΛn.trans ?_ + calc (c₄ : ℝ) ^ (c₄ * X') ≤ (c : ℝ) ^ (c₄ * X') := + pow_le_pow_left₀ (Nat.cast_nonneg _) (by exact_mod_cast (by omega : c₄ ≤ c)) _ + _ ≤ (c : ℝ) ^ (c * X') := + pow_le_pow_right₀ (by exact_mod_cast hc1) (Nat.mul_le_mul_right _ (by omega)) + · -- the length: `C₀^(deg Q + c₄ Z') c₄^(c₄ X') Y'^(c₄ Z) ≤ c^(c X') Y'^(c Z)` + obtain ⟨hsx, hsy⟩ := exists_iteratedDeriv_reduced_presentation_column_monomial_mul_degrees (P i + j k) μ ν (hPx i j k) (hPy i j k) + have hν : (ν : ℕ) + c₄ * Z' ≤ Q.natDegree + c₄ * Z' := by have := ν.2; omega + have hmul := Transcendence.length_mul_le + (C (X ^ (μ : ℕ)) * X ^ (ν : ℕ)) (P i j k) + rw [exists_iteratedDeriv_reduced_presentation_column_length_monomial, one_mul] at hmul + refine ((h3 _ _ _ _ (hmul.trans (hPl i j k)) hsx (hsy.trans hν)).1).trans ?_ + have hexp1 : Q.natDegree + c₄ * Z' + c₄ * X' ≤ c * X' := by + have h1 : Q.natDegree ≤ Q.natDegree * X' := Nat.le_mul_of_pos_right _ (by omega) + have h2 : c₄ * Z' ≤ c₄ * X' := Nat.mul_le_mul_left _ hZX + have h3 := Nat.mul_le_mul_right X' (show Q.natDegree + c₄ + c₄ ≤ c by omega) + rw [Nat.add_mul, Nat.add_mul] at h3 + omega + calc C₀ ^ (Q.natDegree + c₄ * Z') * (c₄ ^ (c₄ * X') * Y' ^ (c₄ * Z)) + ≤ c ^ (Q.natDegree + c₄ * Z') * (c ^ (c₄ * X') * Y' ^ (c₄ * Z)) := + Nat.mul_le_mul (Nat.pow_le_pow_left (by omega) _) + (Nat.mul_le_mul_right _ (Nat.pow_le_pow_left (by omega) _)) + _ = c ^ (Q.natDegree + c₄ * Z' + c₄ * X') * Y' ^ (c₄ * Z) := by ring + _ ≤ c ^ (c * X') * Y' ^ (c * Z) := + Nat.mul_le_mul (Nat.pow_le_pow_right hc1 hexp1) + (Nat.pow_le_pow_right hZY (Nat.mul_le_mul_right _ (by omega))) + · -- the `X`-degree: `μ + c₄ Z' + C₀ (ν + c₄ Z') ≤ M + c Z'` + obtain ⟨hsx, hsy⟩ := exists_iteratedDeriv_reduced_presentation_column_monomial_mul_degrees (P i + j k) μ ν (hPx i j k) (hPy i j k) + have hmul := Transcendence.length_mul_le + (C (X ^ (μ : ℕ)) * X ^ (ν : ℕ)) (P i j k) + rw [exists_iteratedDeriv_reduced_presentation_column_length_monomial, one_mul] at hmul + refine ((h3 _ _ _ _ (hmul.trans (hPl i j k)) hsx hsy).2 r).trans ?_ + have hμ : (μ : ℕ) ≤ M := μ.2.le + have hν : (ν : ℕ) ≤ Q.natDegree := ν.2.le + have h1 : C₀ * ((ν : ℕ) + c₄ * Z') ≤ C₀ * Q.natDegree * Z' + C₀ * c₄ * Z' := by + have e1 : C₀ * (ν : ℕ) ≤ C₀ * Q.natDegree * Z' := + (Nat.mul_le_mul_left C₀ hν).trans (Nat.le_mul_of_pos_right _ hZ'1) + have e2 : C₀ * ((ν : ℕ) + c₄ * Z') = C₀ * ν + C₀ * c₄ * Z' := by ring + omega + have h2 := Nat.mul_le_mul_right Z' (show c₄ + C₀ * Q.natDegree + C₀ * c₄ ≤ c by omega) + rw [Nat.add_mul, Nat.add_mul] at h2 + omega + · -- the identity: `φ((X^μ Y^ν P) mod Q) = ω^μ ω₁^ν φ(P)` because `φ(Q) = 0` + have key := hPid (fun i j k => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + ((q i j k μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) + refine key.trans ?_ + have hφ : ∀ (P : ℤ[X][X]) (μ ν : ℕ), + eval₂ (eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ ((C (X ^ μ) * X ^ ν * P) %ₘ Q) = + ω ^ μ * ω₁ ^ ν * eval₂ (eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ P := by + intro P μ ν + have h := congrArg (eval₂ (eval₂RingHom (Int.castRingHom ℂ) ω) ω₁) + (modByMonic_add_div (C (X ^ μ) * X ^ ν * P) Q) + rw [eval₂_add, eval₂_mul, hQroot, zero_mul, add_zero] at h + rw [h] + simp only [eval₂_mul, eval₂_C, eval₂_X_pow, coe_eval₂RingHom] + simp only [eval₂_finsetSum, eval₂_mul, eval₂_C, hφ, coe_eval₂RingHom, Int.coe_castRingHom, + Finset.sum_mul] + refine Finset.sum_congr rfl fun i _ => Finset.sum_congr rfl fun j _ => + Finset.sum_congr rfl fun k _ => Finset.sum_congr rfl fun μ _ => + Finset.sum_congr rfl fun ν _ => ?_ + ring + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExistsModByMonicLengthLe.lean b/LeanPool/FourExponentials/ExistsModByMonicLengthLe.lean new file mode 100644 index 0000000000..09db14c90c --- /dev/null +++ b/LeanPool/FourExponentials/ExistsModByMonicLengthLe.lean @@ -0,0 +1,332 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.LengthMulLe +public import LeanPool.FourExponentials.LengthSumLe +public import Mathlib.Algebra.Polynomial.BigOperators +public import Mathlib.Algebra.Polynomial.RingDivision +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.LinearCombination +public import Mathlib.Tactic.LinearCombination.Lemmas +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.SplitIfs + +/-! +# Remainders modulo a monic polynomial in `ℤ[X][Y]` + +The length of `P ∈ ℤ[X][Y]` is the sum of the absolute values of all its integer coefficients. +It is subadditive and submultiplicative. + +Let `Q` be monic in `Y` of degree `d ≥ 1`, and write `R_k = Yᵏ %ₘ Q`. Then `R_0 = 1` and +`R_{k+1} = Y R_k - c_k Q`, where `c_k ∈ ℤ[X]` is the coefficient of `Y^(d-1)` in `R_k`: the +right side is congruent to `Y^(k+1)` modulo `Q` and has `Y`-degree below `d`. Since `c_k` is a +coefficient of `R_k`, `existsModByMonicLengthLeLen R_{k+1} ≤ existsModByMonicLengthLeLen R_k ++ existsModByMonicLengthLeLen R_k · existsModByMonicLengthLeLen Q`, so +`existsModByMonicLengthLeLen R_k ≤ (1 + existsModByMonicLengthLeLen Q)ᵏ`, +and the `X`-degrees of the coefficients of `R_k` are at most `k D`, where `D` bounds the +`X`-degrees of the coefficients of `Q`. Division by a monic polynomial is linear, so +`P %ₘ Q = ∑ₖ Pₖ R_k`, and the bounds follow with `C = 1 + existsModByMonicLengthLeLen Q + D`. + +If `Q` is monic of degree `0`, then `Q = 1` and every remainder is `0`; if `Q` is not monic, +then `P %ₘ Q = P`. In both cases `C = 1` works. + +In the code, `Y` is the variable `X` of the outer ring `ℤ[X][Y]`, and `X` is `C X`. + +From `Diaz/Mirror/exists_modByMonic_length_le.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.exists_modByMonic_length_le`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace ExistsModByMonicLengthLe + +open Polynomial + +/-- The length of a polynomial in `ℤ[X]`: the sum of the absolute values of its coefficients. -/ +noncomputable def len1 (p : Polynomial ℤ) : ℕ := + ∑ i ∈ p.support, (p.coeff i).natAbs + +/-- The length of a polynomial in `ℤ[X][Y]`: the sum of the lengths of its coefficients. -/ +noncomputable def existsModByMonicLengthLeLen (P : Polynomial (Polynomial ℤ)) : ℕ := + ∑ k ∈ P.support, len1 (P.coeff k) + +theorem len_mul_le (P R : Polynomial (Polynomial ℤ)) : existsModByMonicLengthLeLen (P * R) ≤ + existsModByMonicLengthLeLen P * existsModByMonicLengthLeLen R := + Transcendence.length_mul_le P R + +theorem len_sum_le {ι : Type*} (s : Finset ι) (f : ι → Polynomial (Polynomial ℤ)) : + existsModByMonicLengthLeLen (∑ i ∈ s, f i) ≤ ∑ i ∈ s, + existsModByMonicLengthLeLen (f i) := + Transcendence.length_sum_le s f + +theorem len1_zero : len1 0 = 0 := by + simp only [len1, support_zero, Finset.sum_empty] + +theorem len_zero : existsModByMonicLengthLeLen 0 = 0 := by + simp only [existsModByMonicLengthLeLen, support_zero, Finset.sum_empty] + +theorem len1_eq_sum (p : Polynomial ℤ) {s : Finset ℕ} (hs : p.support ⊆ s) : + len1 p = ∑ i ∈ s, (p.coeff i).natAbs := by + refine Finset.sum_subset hs fun i _ hi => ?_ + rw [notMem_support_iff.mp hi, Int.natAbs_zero] + +theorem len_eq_sum (P : Polynomial (Polynomial ℤ)) {s : Finset ℕ} (hs : P.support ⊆ s) : + existsModByMonicLengthLeLen P = ∑ k ∈ s, len1 (P.coeff k) := by + refine Finset.sum_subset hs fun k _ hk => ?_ + rw [notMem_support_iff.mp hk, len1_zero] + +/-- A single coefficient is no longer than the whole polynomial. -/ +theorem len1_coeff_le (P : Polynomial (Polynomial ℤ)) (k : ℕ) : len1 (P.coeff k) ≤ + existsModByMonicLengthLeLen P := by + by_cases hk : k ∈ P.support + · exact Finset.single_le_sum (f := fun j => len1 (P.coeff j)) (fun _ _ => Nat.zero_le _) hk + · rw [notMem_support_iff.mp hk, len1_zero] + exact Nat.zero_le _ + +theorem len1_one : len1 1 = 1 := by + have hs : (1 : Polynomial ℤ).support ⊆ {0} := by + rw [← C_1] + exact support_C_subset 1 + rw [len1_eq_sum 1 hs, Finset.sum_singleton, AddMonoidAlgebra.coeff_one_zero, Int.natAbs_one] + +theorem len_C (p : Polynomial ℤ) : existsModByMonicLengthLeLen (C p) = len1 p := by + rw [len_eq_sum (C p) (support_C_subset p), Finset.sum_singleton, coeff_C_zero] + +theorem len_one : existsModByMonicLengthLeLen 1 = 1 := by + rw [← C_1, len_C, len1_one] + +theorem len_X : existsModByMonicLengthLeLen (X : Polynomial (Polynomial ℤ)) = 1 := by + have hs : (X : Polynomial (Polynomial ℤ)).support ⊆ {1} := fun i hi => by + rwa [support_X] at hi + rw [len_eq_sum X hs, Finset.sum_singleton, coeff_X_one, len1_one] + +theorem len_add_le (A B : Polynomial (Polynomial ℤ)) : existsModByMonicLengthLeLen (A + B) ≤ + existsModByMonicLengthLeLen A + existsModByMonicLengthLeLen B := by + have h := len_sum_le Finset.univ (fun b : Bool => cond b A B) + rw [Fintype.sum_bool, Fintype.sum_bool] at h + exact h + +theorem len_neg (A : Polynomial (Polynomial ℤ)) : existsModByMonicLengthLeLen (-A) = + existsModByMonicLengthLeLen A := by + unfold existsModByMonicLengthLeLen len1 + rw [support_neg] + refine Finset.sum_congr rfl fun k _ => ?_ + rw [coeff_neg, support_neg] + refine Finset.sum_congr rfl fun i _ => ?_ + rw [coeff_neg, Int.natAbs_neg] + +theorem len_sub_le (A B : Polynomial (Polynomial ℤ)) : existsModByMonicLengthLeLen (A - B) ≤ + existsModByMonicLengthLeLen A + existsModByMonicLengthLeLen B := by + rw [sub_eq_add_neg, ← len_neg B] + exact len_add_le A (-B) + +/-! ### `X`-degrees of the coefficients -/ + +theorem degX_mul {A B : Polynomial (Polynomial ℤ)} {a b : ℕ} + (hA : ∀ k, (A.coeff k).natDegree ≤ a) (hB : ∀ k, (B.coeff k).natDegree ≤ b) (k : ℕ) : + ((A * B).coeff k).natDegree ≤ a + b := by + rw [coeff_mul] + refine natDegree_sum_le_of_forall_le _ _ fun x _ => ?_ + exact natDegree_mul_le.trans (Nat.add_le_add (hA x.1) (hB x.2)) + +theorem degX_sub {A B : Polynomial (Polynomial ℤ)} {a : ℕ} + (hA : ∀ k, (A.coeff k).natDegree ≤ a) (hB : ∀ k, (B.coeff k).natDegree ≤ a) (k : ℕ) : + ((A - B).coeff k).natDegree ≤ a := by + rw [coeff_sub] + exact (natDegree_sub_le _ _).trans (max_le (hA k) (hB k)) + +theorem degX_X (k : ℕ) : ((X : Polynomial (Polynomial ℤ)).coeff k).natDegree ≤ 0 := by + rw [coeff_X] + split_ifs + · rw [natDegree_one] + · rw [natDegree_zero] + +theorem degX_C (p : Polynomial ℤ) (k : ℕ) : ((C p).coeff k).natDegree ≤ p.natDegree := by + rw [coeff_C] + split_ifs + · exact le_rfl + · rw [natDegree_zero] + exact Nat.zero_le _ + +/-- A bound for the `X`-degrees of the coefficients of `Q`. -/ +noncomputable def degXQ (Q : Polynomial (Polynomial ℤ)) : ℕ := + ∑ k ∈ Q.support, (Q.coeff k).natDegree + +theorem natDegree_coeff_le_degXQ (Q : Polynomial (Polynomial ℤ)) (j : ℕ) : + (Q.coeff j).natDegree ≤ degXQ Q := by + by_cases hj : j ∈ Q.support + · exact Finset.single_le_sum (f := fun k => (Q.coeff k).natDegree) (fun _ _ => Nat.zero_le _) hj + · rw [notMem_support_iff.mp hj, natDegree_zero] + exact Nat.zero_le _ + +/-! ### Reducing the powers of `Y` -/ + +/-- One reduction step: `Y^(k+1) %ₘ Q = Y (Yᵏ %ₘ Q) - c Q`, with `c` the coefficient of +`Y^(d-1)` in `Yᵏ %ₘ Q`. -/ +theorem X_pow_succ_modByMonic {Q : Polynomial (Polynomial ℤ)} (hQ : Q.Monic) + (hd : 1 ≤ Q.natDegree) (k : ℕ) : + X ^ (k + 1) %ₘ Q = X * (X ^ k %ₘ Q) - C ((X ^ k %ₘ Q).coeff (Q.natDegree - 1)) * Q := by + have hQ1 : Q ≠ 1 := by + intro h + rw [h, natDegree_one] at hd + omega + have hR : (X ^ k %ₘ Q).natDegree < Q.natDegree := natDegree_modByMonic_lt _ hQ hQ1 + have hle : (X * (X ^ k %ₘ Q) - C ((X ^ k %ₘ Q).coeff (Q.natDegree - 1)) * Q).natDegree + ≤ Q.natDegree - 1 := by + rw [natDegree_le_iff_coeff_eq_zero] + intro j hj + obtain ⟨i, rfl⟩ : ∃ i, j = i + 1 := ⟨j - 1, by omega⟩ + rw [coeff_sub, coeff_X_mul, coeff_C_mul] + rcases Nat.lt_or_ge Q.natDegree (i + 1) with hgt | hge + · rw [coeff_eq_zero_of_natDegree_lt hgt, coeff_eq_zero_of_natDegree_lt (by omega), + mul_zero, sub_zero] + · have hi : i + 1 = Q.natDegree := by omega + have hi' : i = Q.natDegree - 1 := by omega + rw [hi, hQ.coeff_natDegree, mul_one, hi', sub_self] + have hsplit := modByMonic_add_div (X ^ k) Q + refine (div_modByMonic_unique (X * (X ^ k /ₘ Q) + C ((X ^ k %ₘ Q).coeff (Q.natDegree - 1))) + _ hQ ⟨?_, degree_lt_degree (by omega)⟩).2 + linear_combination X * hsplit + +/-- `existsModByMonicLengthLeLen (Yᵏ %ₘ Q) ≤ (1 + existsModByMonicLengthLeLen Q)ᵏ`, and the + coefficients of `Yᵏ %ₘ Q` have `X`-degree at +most `k D`. -/ +theorem X_pow_modByMonic_le {Q : Polynomial (Polynomial ℤ)} (hQ : Q.Monic) + (hd : 1 ≤ Q.natDegree) {D : ℕ} (hD : ∀ j, (Q.coeff j).natDegree ≤ D) : + ∀ k : ℕ, existsModByMonicLengthLeLen (X ^ k %ₘ Q) ≤ (1 + + existsModByMonicLengthLeLen Q) ^ k ∧ + ∀ j, ((X ^ k %ₘ Q).coeff j).natDegree ≤ k * D + | 0 => by + have h1 : (X ^ 0 : Polynomial (Polynomial ℤ)) %ₘ Q = 1 := by + rw [pow_zero, modByMonic_eq_self_iff hQ] + exact degree_lt_degree (by rw [natDegree_one]; omega) + rw [h1, pow_zero, Nat.zero_mul] + refine ⟨le_of_eq len_one, fun j => ?_⟩ + rw [← C_1] + exact (degX_C 1 j).trans (le_of_eq natDegree_one) + | k + 1 => by + obtain ⟨ih1, ih2⟩ := X_pow_modByMonic_le hQ hd hD k + have hkD : (k + 1) * D = k * D + D := by ring + rw [X_pow_succ_modByMonic hQ hd k] + refine ⟨?_, ?_⟩ + · calc existsModByMonicLengthLeLen (X * (X ^ k %ₘ Q) - C ((X ^ k %ₘ Q).coeff (Q.natDegree - + 1)) * Q) + ≤ existsModByMonicLengthLeLen (X * (X ^ k %ₘ Q)) + + existsModByMonicLengthLeLen (C ((X ^ k %ₘ Q).coeff (Q.natDegree - 1)) * Q) := + len_sub_le _ _ + _ ≤ existsModByMonicLengthLeLen (X ^ k %ₘ Q) + + existsModByMonicLengthLeLen (X ^ k %ₘ Q) * existsModByMonicLengthLeLen Q := by + refine Nat.add_le_add ?_ ?_ + · refine (len_mul_le _ _).trans (le_of_eq ?_) + rw [len_X, Nat.one_mul] + · refine (len_mul_le _ _).trans (Nat.mul_le_mul_right _ ?_) + rw [len_C] + exact len1_coeff_le _ _ + _ = existsModByMonicLengthLeLen (X ^ k %ₘ Q) * (1 + existsModByMonicLengthLeLen Q) + := by ring + _ ≤ (1 + existsModByMonicLengthLeLen Q) ^ k * (1 + existsModByMonicLengthLeLen Q) := + Nat.mul_le_mul_right _ ih1 + _ = (1 + existsModByMonicLengthLeLen Q) ^ (k + 1) := (pow_succ _ _).symm + · refine degX_sub (fun i => (degX_mul degX_X ih2 i).trans ?_) + (fun i => (degX_mul (fun i => (degX_C _ i).trans (ih2 _)) hD i).trans (le_of_eq hkD.symm)) + rw [Nat.zero_add, hkD] + exact Nat.le_add_right _ _ + +/-! ### Linearity of the remainder -/ + +theorem modByMonic_eq_sum (Q P : Polynomial (Polynomial ℤ)) : + P %ₘ Q = ∑ k ∈ Finset.range (P.natDegree + 1), C (P.coeff k) * (X ^ k %ₘ Q) := by + conv_lhs => rw [P.as_sum_range_C_mul_X_pow] + rw [← modByMonicHom_apply, map_sum] + refine Finset.sum_congr rfl fun k _ => ?_ + simp only [modByMonicHom_apply, ← smul_eq_C_mul, smul_modByMonic] + +theorem main_monic {Q : Polynomial (Polynomial ℤ)} (hQ : Q.Monic) (hd : 1 ≤ Q.natDegree) + (P : Polynomial (Polynomial ℤ)) (b e n : ℕ) (hb : existsModByMonicLengthLeLen P ≤ b) + (he : ∀ k, (P.coeff k).natDegree ≤ e) (hn : P.natDegree ≤ n) : + existsModByMonicLengthLeLen (P %ₘ Q) ≤ (1 + existsModByMonicLengthLeLen Q + degXQ Q) ^ n + * b ∧ + ∀ k, ((P %ₘ Q).coeff k).natDegree ≤ e + (1 + existsModByMonicLengthLeLen Q + degXQ Q) * n + := by + have hR := X_pow_modByMonic_le hQ hd (natDegree_coeff_le_degXQ Q) + have hK : 1 ≤ 1 + existsModByMonicLengthLeLen Q + degXQ Q := by omega + rw [modByMonic_eq_sum Q P] + refine ⟨?_, fun j => ?_⟩ + · calc existsModByMonicLengthLeLen (∑ k ∈ Finset.range (P.natDegree + 1), C (P.coeff k) * + (X ^ k %ₘ Q)) + ≤ ∑ k ∈ Finset.range (P.natDegree + 1), existsModByMonicLengthLeLen (C (P.coeff k) * + (X ^ k %ₘ Q)) := + len_sum_le _ _ + _ ≤ ∑ k ∈ Finset.range (P.natDegree + 1), + len1 (P.coeff k) * (1 + existsModByMonicLengthLeLen Q + degXQ Q) ^ n := by + refine Finset.sum_le_sum fun k hk => ?_ + have hkn : k ≤ n := by + have := Finset.mem_range.mp hk + omega + refine (len_mul_le _ _).trans ?_ + rw [len_C] + refine Nat.mul_le_mul_left _ ((hR k).1.trans ?_) + calc (1 + existsModByMonicLengthLeLen Q) ^ k ≤ (1 + existsModByMonicLengthLeLen Q + + degXQ Q) ^ k := + Nat.pow_le_pow_left (Nat.le_add_right _ _) k + _ ≤ (1 + existsModByMonicLengthLeLen Q + degXQ Q) ^ n := Nat.pow_le_pow_right hK hkn + _ = existsModByMonicLengthLeLen P * (1 + existsModByMonicLengthLeLen Q + degXQ Q) ^ n + := by + rw [← Finset.sum_mul, len_eq_sum P supp_subset_range_natDegree_succ] + _ ≤ b * (1 + existsModByMonicLengthLeLen Q + degXQ Q) ^ n := Nat.mul_le_mul_right _ hb + _ = (1 + existsModByMonicLengthLeLen Q + degXQ Q) ^ n * b := Nat.mul_comm _ _ + · rw [finsetSum_coeff] + refine natDegree_sum_le_of_forall_le _ _ fun k hk => ?_ + have hkn : k ≤ n := by + have := Finset.mem_range.mp hk + omega + rw [coeff_C_mul] + refine natDegree_mul_le.trans (Nat.add_le_add (he k) (((hR k).2 j).trans ?_)) + calc k * degXQ Q ≤ n * (1 + existsModByMonicLengthLeLen Q + degXQ Q) := + Nat.mul_le_mul hkn (Nat.le_add_left _ _) + _ = (1 + existsModByMonicLengthLeLen Q + degXQ Q) * n := Nat.mul_comm _ _ + +theorem exists_modByMonic_length_le_main (Q : Polynomial (Polynomial ℤ)) : + ∃ C : ℕ, ∀ (P : Polynomial (Polynomial ℤ)) (b e n : ℕ), + existsModByMonicLengthLeLen P ≤ b → (∀ k, (P.coeff k).natDegree ≤ e) → P.natDegree ≤ n → + existsModByMonicLengthLeLen (P %ₘ Q) ≤ C ^ n * b ∧ ∀ k, + ((P %ₘ Q).coeff k).natDegree ≤ e + C * n := by + by_cases hQ : Q.Monic + · by_cases hd : Q.natDegree = 0 + · refine ⟨1, fun P b e n _ _ _ => ?_⟩ + rw [eq_one_of_monic_natDegree_zero hQ hd, modByMonic_one, len_zero] + refine ⟨Nat.zero_le _, fun k => ?_⟩ + rw [coeff_zero, natDegree_zero] + exact Nat.zero_le _ + · exact ⟨1 + existsModByMonicLengthLeLen Q + degXQ Q, fun P b e n hb he hn => + main_monic hQ (by omega) P b e n hb he hn⟩ + · refine ⟨1, fun P b e n hb he _ => ?_⟩ + rw [modByMonic_eq_of_not_monic P hQ, Nat.one_pow, Nat.one_mul, Nat.one_mul] + exact ⟨hb, fun k => (he k).trans (Nat.le_add_right _ _)⟩ + +end ExistsModByMonicLengthLe + +/-- **Reduction modulo a polynomial.** Let $Q\in\mathbb{Z}[X][Y]$. There is $C\in\mathbb{N}$ such +that for all $b,e,n\in\mathbb{N}$ and every $P\in\mathbb{Z}[X][Y]$ with $L(P)\le b$, every +coefficient of $X$-degree at most $e$, and $Y$-degree at most $n$, the remainder $P\bmod Q$ of the +division by $Q$ in $Y$ satisfies +$$ L(P\bmod Q)\le C^{n}b, $$ +and every coefficient of $P\bmod Q$ has $X$-degree at most $e+Cn$. (When $Q$ is not monic in $Y$, +the remainder is $P$, as in Mathlib's `modByMonic`.) -/ +theorem exists_modByMonic_length_le (Q : Polynomial (Polynomial ℤ)) : + ∃ C : ℕ, ∀ (P : Polynomial (Polynomial ℤ)) (b e n : ℕ), + ∑ k ∈ P.support, ∑ i ∈ (P.coeff k).support, ((P.coeff k).coeff i).natAbs ≤ b → + (∀ k, (P.coeff k).natDegree ≤ e) → P.natDegree ≤ n → + ∑ k ∈ (P.modByMonic Q).support, ∑ i ∈ ((P.modByMonic Q).coeff k).support, + (((P.modByMonic Q).coeff k).coeff i).natAbs ≤ C ^ n * b ∧ + ∀ k, ((P.modByMonic Q).coeff k).natDegree ≤ e + C * n := by + exact ExistsModByMonicLengthLe.exists_modByMonic_length_le_main Q + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/ExistsMonicIntegralModel.lean b/LeanPool/FourExponentials/ExistsMonicIntegralModel.lean new file mode 100644 index 0000000000..749b11ba53 --- /dev/null +++ b/LeanPool/FourExponentials/ExistsMonicIntegralModel.lean @@ -0,0 +1,208 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.CharP.IntermediateField +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.FieldTheory.IntermediateField.Adjoin.Basic +public import Mathlib.RingTheory.Localization.Integral +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# A monic integral model of a simple algebraic extension of `ℚ(ω)` + +Let `ω` be transcendental and `θ` algebraic over `ℚ(ω)`, with minimal polynomial `m` of degree `d`. +Every element of `ℚ(ω)` is a quotient `r(ω) / s(ω)` with `r, s ∈ ℤ[X]`. Clearing the denominators +of the coefficients of `m` with one `v ∈ ℤ[X]`, the product of the `s_k`, and rescaling +`ω₁ = v(ω) θ`, gives a polynomial `Q ∈ ℤ[X][Y]`, monic of degree `d` in `Y`, with +`Q(ω, ω₁) = v(ω)^d m(θ) = 0`. Since `ω₁` also has degree `d` over `ℚ(ω)`, and `q ↦ q(ω)` is +injective on `ℤ[X]` because `ω` is transcendental, no non-zero `A ∈ ℤ[X][Y]` of `Y`-degree below +`d` vanishes at `(ω, ω₁)`. + +From `Diaz/Mirror/exists_monic_integral_model.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.exists_monic_integral_model`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace ExistsMonicIntegralModel + +open Polynomial + +/-- A rational polynomial becomes integral after multiplying by a non-zero integer. -/ +lemma exists_int_scaled (p : ℚ[X]) : + ∃ b : ℤ, b ≠ 0 ∧ ∃ q : ℤ[X], q.map (Int.castRingHom ℚ) = C (b : ℚ) * p := by + obtain ⟨b, hb, h⟩ := IsLocalization.integerNormalization_spec (nonZeroDivisors ℤ) p + refine ⟨b, nonZeroDivisors.ne_zero hb, IsLocalization.integerNormalization (nonZeroDivisors ℤ) p, + AddMonoidAlgebra.ext (Finsupp.ext fun i => ?_)⟩ + simpa [coeff_map, coeff_C_mul, algebraMap_int_eq] using congrArg (fun q => q.coeff i) h + +/-- The embedding `ℤ[X] → ℚ(ω)`, `q ↦ q(ω)`. -/ +noncomputable def phiω (ω : ℂ) : ℤ[X] →+* IntermediateField.adjoin ℚ ({ω} : Set ℂ) := + Polynomial.eval₂RingHom (Int.castRingHom _) ⟨ω, IntermediateField.mem_adjoin_simple_self ℚ ω⟩ + +lemma phi_eval (ω : ℂ) : + (algebraMap (IntermediateField.adjoin ℚ ({ω} : Set ℂ)) ℂ).comp (phiω ω) + = Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω := by + refine Polynomial.ringHom_ext (fun a => ?_) ?_ + · simp [phiω] + · simp [phiω] + +lemma phi_coe (ω : ℂ) (q : ℤ[X]) : + ((phiω ω q : IntermediateField.adjoin ℚ ({ω} : Set ℂ)) : ℂ) = aeval ω q := by + rw [aeval_def, algebraMap_int_eq] + exact RingHom.congr_fun (phi_eval ω) q + +lemma phi_injective {ω : ℂ} (hω : Transcendental ℚ ω) : Function.Injective (phiω ω) := by + rw [injective_iff_map_eq_zero (phiω ω)] + intro q hq + by_contra hq0 + apply hω + refine ⟨q.map (Int.castRingHom ℚ), (Polynomial.map_ne_zero_iff (RingHom.injective_int _)).2 hq0, + ?_⟩ + have h := phi_coe ω q + rw [hq] at h + rw [← algebraMap_int_eq, aeval_map_algebraMap] + simpa using h.symm + +/-- Every element of `ℚ(ω)` is `r(ω)/s(ω)` with `r, s ∈ ℤ[X]`. -/ +lemma int_frac {ω : ℂ} (y : IntermediateField.adjoin ℚ ({ω} : Set ℂ)) : + ∃ r s : ℤ[X], phiω ω s ≠ 0 ∧ y * phiω ω s = phiω ω r := by + have hy := y.2 + rw [IntermediateField.mem_adjoin_simple_iff] at hy + obtain ⟨r, s, hrs⟩ := hy + obtain ⟨n₁, hn₁, q₁, e₁⟩ := exists_int_scaled r + obtain ⟨n₂, hn₂, q₂, e₂⟩ := exists_int_scaled s + have hq : ∀ (q : ℤ[X]) (b : ℤ) (p : ℚ[X]), q.map (Int.castRingHom ℚ) = C (b : ℚ) * p → + ((phiω ω q : IntermediateField.adjoin ℚ ({ω} : Set ℂ)) : ℂ) = (b : ℂ) * aeval ω p := by + intro q b p e + rw [phi_coe, ← aeval_map_algebraMap ℚ, algebraMap_int_eq, e, map_mul (aeval ω), aeval_C, + map_intCast (algebraMap ℚ ℂ)] + by_cases hs : aeval ω s = 0 + · refine ⟨0, 1, by simp, ?_⟩ + apply Subtype.ext + simp [hrs, hs] + refine ⟨C n₂ * q₁, C n₁ * q₂, fun h0 => ?_, Subtype.ext ?_⟩ + · have h := congrArg (fun z : IntermediateField.adjoin ℚ ({ω} : Set ℂ) => (z : ℂ)) h0 + simp only [IntermediateField.coe_zero, map_mul, IntermediateField.coe_mul, hq q₂ n₂ s e₂] at h + rw [phi_coe, aeval_C, algebraMap_int_eq, eq_intCast (Int.castRingHom ℂ)] at h + exact mul_ne_zero (Int.cast_ne_zero.2 hn₁) (mul_ne_zero (Int.cast_ne_zero.2 hn₂) hs) h + · simp only [map_mul, IntermediateField.coe_mul, hq q₁ n₁ r e₁, hq q₂ n₂ s e₂, hrs] + rw [phi_coe, phi_coe, aeval_C, aeval_C, algebraMap_int_eq, eq_intCast (Int.castRingHom ℂ), + eq_intCast (Int.castRingHom ℂ)] + field_simp + +end ExistsMonicIntegralModel + +open Polynomial ExistsMonicIntegralModel in +/-- **A monic integral model.** Let $\omega\in\mathbb{C}$ be transcendental and let +$\theta\in\mathbb{C}$ be algebraic over $\mathbb{Q}(\omega)$. There are $\omega_1\in\mathbb{C}$ and +$Q\in\mathbb{Z}[X][Y]$, monic in $Y$ of degree $d\ge1$, with $Q(\omega,\omega_1)=0$ and minimal +there: no non-zero $A\in\mathbb{Z}[X][Y]$ with $\deg_YA int_frac (ω := ω) (m.coeff k) + set v : ℤ[X] := ∏ k : Fin d, s k with hv + have hv0 : phiω ω v ≠ 0 := by + rw [hv, map_prod (phiω ω)] + exact Finset.prod_ne_zero_iff.2 fun k _ => hs k + set t : Fin d → ℤ[X] := fun k => r k * (∏ j ∈ Finset.univ.erase k, s j) * v ^ (d - 1 - k) with ht + set Q : Polynomial (Polynomial ℤ) := X ^ d + ∑ k : Fin d, C (t k) * X ^ (k : ℕ) with hQ + set c : ℂ := algebraMap F ℂ (phiω ω v) with hc + set ω₁ : ℂ := c * θ with hω₁ + have hc0 : c ≠ 0 := by + rw [hc]; exact (map_ne_zero_iff _ (algebraMap F ℂ).injective).2 hv0 + have hEC : ∀ q : ℤ[X], φ ω₁ (C q) = algebraMap F ℂ (phiω ω q) := fun q => by + simp only [φ, coe_eval₂RingHom, eval₂_C] + exact (RingHom.congr_fun (phi_eval ω) q).symm + have hdeg : (∑ k : Fin d, C (t k) * X ^ (k : ℕ)).degree < (d : WithBot ℕ) := + Polynomial.degree_sum_fin_lt t + have hQmon : Q.Monic := Polynomial.monic_X_pow_add hdeg + have hQdeg : Q.natDegree = d := by + rw [hQ, Polynomial.natDegree_add_eq_left_of_degree_lt (by rwa [Polynomial.degree_X_pow]), + Polynomial.natDegree_X_pow] + refine ⟨ω₁, Q, hQmon, by rw [hQdeg]; exact hdpos, ?_, ?_, v, ?_, ?_⟩ + · -- `Q(ω, ω₁) = c^d · m(θ) = 0` + have hsum : aeval θ m = 0 := minpoly.aeval F θ + rw [hmon.as_sum] at hsum + simp only [map_add, map_pow, aeval_X, map_sum, map_mul, aeval_C] at hsum + rw [← Fin.sum_univ_eq_sum_range (fun i => algebraMap F ℂ (m.coeff i) * θ ^ i) d] at hsum + have key : ∀ k : Fin d, φ ω₁ (C (t k)) * ω₁ ^ (k : ℕ) + = c ^ d * (algebraMap F ℂ (m.coeff k) * θ ^ (k : ℕ)) := by + intro k + have hrk : algebraMap F ℂ (phiω ω (r k)) + = algebraMap F ℂ (m.coeff k) * algebraMap F ℂ (phiω ω (s k)) := by + rw [← map_mul (algebraMap F ℂ), hrs k] + have hvprod : algebraMap F ℂ (phiω ω (s k)) + * algebraMap F ℂ (phiω ω (∏ j ∈ Finset.univ.erase k, s j)) = c := by + rw [← map_mul (algebraMap F ℂ), ← map_mul (phiω ω), hc, hv, + Finset.mul_prod_erase Finset.univ (fun j : Fin d => s j) (Finset.mem_univ k)] + have htk : φ ω₁ (C (t k)) = algebraMap F ℂ (phiω ω (r k)) + * algebraMap F ℂ (phiω ω (∏ j ∈ Finset.univ.erase k, s j)) * c ^ (d - 1 - (k : ℕ)) := by + rw [hEC, ht] + simp only [map_mul, map_pow, hc] + have hexp : c ^ d = c * c ^ (d - 1 - (k : ℕ)) * c ^ (k : ℕ) := by + rw [← pow_succ', ← pow_add]; congr 1; omega + rw [htk, hrk, hω₁, mul_pow, hexp, ← hvprod] + ring + calc φ ω₁ Q = ω₁ ^ d + ∑ k : Fin d, φ ω₁ (C (t k)) * ω₁ ^ (k : ℕ) := by + simp only [hQ, map_add, map_pow, map_sum, map_mul, φ, coe_eval₂RingHom, eval₂_X] + _ = c ^ d * (θ ^ d + ∑ k : Fin d, algebraMap F ℂ (m.coeff k) * θ ^ (k : ℕ)) := by + rw [Finset.sum_congr rfl fun k _ => key k, ← Finset.mul_sum, hω₁, mul_pow] + ring + _ = 0 := by rw [hsum, mul_zero] + · -- minimality: `ω₁` has degree `d` over `ℚ(ω)`, and `q ↦ q(ω)` is injective on `ℤ[X]` + intro A hA hA0 + rw [hQdeg] at hA + have hB : aeval ω₁ (A.map (phiω ω)) = φ ω₁ A := by + rw [aeval_def, eval₂_map, phi_eval] + rfl + have hint : IsIntegral F ω₁ := (isIntegral_algebraMap (x := phiω ω v)).mul hθi + have hadj : IntermediateField.adjoin F ({ω₁} : Set ℂ) = IntermediateField.adjoin F ({θ} : Set ℂ) + := by + apply le_antisymm + · rw [IntermediateField.adjoin_simple_le_iff] + exact mul_mem (IntermediateField.algebraMap_mem _ _) + (IntermediateField.mem_adjoin_simple_self F θ) + · rw [IntermediateField.adjoin_simple_le_iff] + have hθeq : θ = algebraMap F ℂ (phiω ω v)⁻¹ * ω₁ := by + rw [hω₁, hc, ← mul_assoc, ← map_mul (algebraMap F ℂ), inv_mul_cancel₀ hv0, + map_one (algebraMap F ℂ), one_mul] + rw [hθeq] + exact mul_mem (IntermediateField.algebraMap_mem _ _) + (IntermediateField.mem_adjoin_simple_self F ω₁) + have hdeg1 : (minpoly F ω₁).natDegree = d := by + rw [← IntermediateField.adjoin.finrank hint, hadj, IntermediateField.adjoin.finrank hθi] + by_contra hA0' + have hB0 : A.map (phiω ω) ≠ 0 := (Polynomial.map_ne_zero_iff (phi_injective hω)).2 hA0' + have h1 := minpoly.degree_le_of_ne_zero F ω₁ hB0 (hB.trans hA0) + have h2 := Polynomial.natDegree_le_natDegree h1 + rw [hdeg1, Polynomial.natDegree_map_eq_of_injective (phi_injective hω)] at h2 + omega + · rw [← phi_coe]; exact hc0 + · rw [← phi_coe]; rfl + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/ExistsMonicIntegralModelPresentation.lean b/LeanPool/FourExponentials/ExistsMonicIntegralModelPresentation.lean new file mode 100644 index 0000000000..06714edb96 --- /dev/null +++ b/LeanPool/FourExponentials/ExistsMonicIntegralModelPresentation.lean @@ -0,0 +1,193 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsMonicIntegralModel +public import Mathlib.FieldTheory.PrimitiveElement +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# A common presentation over one monic integral model + +Let `ω` be transcendental and let `z₁, …, z_k` be algebraic over `ℚ(ω)`. By the primitive element +theorem they lie in `ℚ(ω)[θ]` for one `θ` algebraic over `ℚ(ω)`; rescale `θ` to `ω₁ = v(ω) θ`, a +root of a polynomial `Q ∈ ℤ[X][Y]` monic in `Y` and minimal at `(ω, ω₁)`. Call `y` presentable if +`y · D(ω, ω₁) = E(ω, ω₁)` for some `D, E ∈ ℤ[X][Y]` with `D(ω, ω₁) ≠ 0`. Presentable numbers are +closed under sums and products; every element of `ℚ(ω)` is presentable, as `r(ω) / s(ω)` with +`r, s ∈ ℤ[X]`, and so is `θ = ω₁ / v(ω)`. Hence every `zᵢ = pᵢ(θ)` is presentable, and a product of +denominators serves all the `zᵢ` at once. + +From `Diaz/Mirror/exists_monic_integral_model_presentation.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.exists_monic_integral_model_presentation`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace ExistsMonicIntegralModelPresentation + +open Polynomial + +/-- Evaluation of `A ∈ ℤ[X][Y]` at `(ω, ω₁)`, as a ring hom. -/ +noncomputable def evH (ω ω₁ : ℂ) : Polynomial (Polynomial ℤ) →+* ℂ := + Polynomial.eval₂RingHom (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ + +/-- `y` has a presentation `y · D = E` at `(ω, ω₁)` with `D ≠ 0` there. -/ +def Presentable (ω ω₁ y : ℂ) : Prop := + ∃ D E : Polynomial (Polynomial ℤ), evH ω ω₁ D ≠ 0 ∧ y * evH ω ω₁ D = evH ω ω₁ E + +lemma presentable_add {ω ω₁ y z : ℂ} (hy : Presentable ω ω₁ y) (hz : Presentable ω ω₁ z) : + Presentable ω ω₁ (y + z) := by + obtain ⟨D₁, E₁, h₁, e₁⟩ := hy + obtain ⟨D₂, E₂, h₂, e₂⟩ := hz + refine ⟨D₁ * D₂, E₁ * D₂ + E₂ * D₁, by simp [h₁, h₂], ?_⟩ + simp only [map_mul, map_add] + rw [← e₁, ← e₂] + ring + +lemma presentable_mul {ω ω₁ y z : ℂ} (hy : Presentable ω ω₁ y) (hz : Presentable ω ω₁ z) : + Presentable ω ω₁ (y * z) := by + obtain ⟨D₁, E₁, h₁, e₁⟩ := hy + obtain ⟨D₂, E₂, h₂, e₂⟩ := hz + refine ⟨D₁ * D₂, E₁ * E₂, by simp [h₁, h₂], ?_⟩ + simp only [map_mul] + rw [← e₁, ← e₂] + ring + +lemma presentable_pow {ω ω₁ θ : ℂ} (hθ : Presentable ω ω₁ θ) (n : ℕ) : + Presentable ω ω₁ (θ ^ n) := by + induction n with + | zero => exact ⟨1, 1, by simp, by simp⟩ + | succ n ih => rw [pow_succ]; exact presentable_mul ih hθ + +lemma common_denominator {ω ω₁ : ℂ} {ι : Type*} [Finite ι] (f : ι → ℂ) + (h : ∀ i, Presentable ω ω₁ (f i)) : + ∃ D : Polynomial (Polynomial ℤ), evH ω ω₁ D ≠ 0 ∧ + ∀ i, ∃ E : Polynomial (Polynomial ℤ), f i * evH ω ω₁ D = evH ω ω₁ E := by + classical + have := Fintype.ofFinite ι + choose D E hD hE using h + refine ⟨∏ i, D i, ?_, fun i => ⟨E i * ∏ j ∈ Finset.univ.erase i, D j, ?_⟩⟩ + · rw [map_prod (evH ω ω₁)] + exact Finset.prod_ne_zero_iff.2 fun i _ => hD i + · rw [map_prod (evH ω ω₁), map_mul (evH ω ω₁), map_prod (evH ω ω₁), + ← Finset.mul_prod_erase Finset.univ (fun j => evH ω ω₁ (D j)) (Finset.mem_univ i), + ← mul_assoc, hE i] + +/-- A rational polynomial becomes integral after multiplying by a non-zero integer. -/ +lemma exists_monic_integral_model_presentation_exists_int_scaled (p : ℚ[X]) : + ∃ b : ℤ, b ≠ 0 ∧ ∃ q : ℤ[X], q.map (Int.castRingHom ℚ) = C (b : ℚ) * p := by + obtain ⟨b, hb, h⟩ := IsLocalization.integerNormalization_spec (nonZeroDivisors ℤ) p + refine ⟨b, nonZeroDivisors.ne_zero hb, IsLocalization.integerNormalization (nonZeroDivisors ℤ) p, + AddMonoidAlgebra.ext (Finsupp.ext fun i => ?_)⟩ + simpa [coeff_map, coeff_C_mul, algebraMap_int_eq] using congrArg (fun q => q.coeff i) h + +lemma evH_C (ω ω₁ : ℂ) (q : ℤ[X]) : + evH ω ω₁ (C q) = aeval ω (q.map (Int.castRingHom ℚ)) := by + simp only [evH, Polynomial.coe_eval₂RingHom, eval₂_C, aeval_def, eval₂_map] + congr 1 + +/-- Every element of `ℚ(ω)` is presentable. -/ +lemma presentable_of_mem {ω ω₁ y : ℂ} (hy : y ∈ IntermediateField.adjoin ℚ ({ω} : Set ℂ)) : + Presentable ω ω₁ y := by + rw [IntermediateField.mem_adjoin_simple_iff] at hy + obtain ⟨r, s, rfl⟩ := hy + obtain ⟨n₁, hn₁, q₁, e₁⟩ := exists_monic_integral_model_presentation_exists_int_scaled r + obtain ⟨n₂, hn₂, q₂, e₂⟩ := exists_monic_integral_model_presentation_exists_int_scaled s + by_cases hs : aeval ω s = 0 + · rw [hs, div_zero] + exact ⟨1, 0, by simp, by simp⟩ + refine ⟨C (C n₁ * q₂), C (C n₂ * q₁), ?_, ?_⟩ + · rw [evH_C, Polynomial.map_mul, e₂, Polynomial.map_C] + simp only [eq_intCast, map_mul, map_intCast] + exact mul_ne_zero (Int.cast_ne_zero.2 hn₁) (mul_ne_zero (Int.cast_ne_zero.2 hn₂) hs) + · rw [evH_C, evH_C, Polynomial.map_mul, Polynomial.map_mul, e₁, e₂, Polynomial.map_C, + Polynomial.map_C] + simp only [eq_intCast, map_mul, map_intCast] + field_simp + +/-- If `θ` is presentable, so is every `p(θ)` with `p ∈ ℚ(ω)[X]`. -/ +lemma presentable_aeval {ω ω₁ θ : ℂ} (hθ : Presentable ω ω₁ θ) + (p : Polynomial (IntermediateField.adjoin ℚ ({ω} : Set ℂ))) : + Presentable ω ω₁ (aeval θ p) := by + induction p using Polynomial.induction_on with + | C a => + rw [aeval_C] + exact presentable_of_mem a.2 + | add p q hp hq => rw [map_add (aeval θ)]; exact presentable_add hp hq + | monomial n a _ => + rw [map_mul (aeval θ), map_pow (aeval θ), aeval_C, aeval_X] + exact presentable_mul (presentable_of_mem a.2) (presentable_pow hθ (n + 1)) + +/-- Finitely many elements algebraic over `F` lie in `F[θ]` for one integral `θ`. -/ +lemma exists_primitive (F : IntermediateField ℚ ℂ) (S : Finset ℂ) (hS : ∀ z ∈ S, IsAlgebraic F z) : + ∃ θ : ℂ, IsIntegral F θ ∧ ∀ z ∈ S, ∃ p : Polynomial F, aeval θ p = z := by + classical + set E := IntermediateField.adjoin F (S : Set ℂ) with hE + have : FiniteDimensional F E := + IntermediateField.finiteDimensional_adjoin fun z hz => (hS z hz).isIntegral + obtain ⟨α, hα⟩ := Field.exists_primitive_element F E + have hαint : IsIntegral F α := .of_finite F α + refine ⟨(α : ℂ), hαint.map E.val, fun z hz => ?_⟩ + have hzE : (⟨z, IntermediateField.subset_adjoin F _ hz⟩ : E) ∈ + IntermediateField.adjoin F ({α} : Set E) := by + rw [hα]; exact IntermediateField.mem_top + have hsub : (IntermediateField.adjoin F ({α} : Set E)).toSubalgebra = Algebra.adjoin F {α} := + IntermediateField.adjoin_simple_toSubalgebra_of_isAlgebraic hαint.isAlgebraic + have hmem : (⟨z, IntermediateField.subset_adjoin F _ hz⟩ : E) ∈ Algebra.adjoin F {α} := by + rw [← hsub]; exact hzE + rw [Algebra.adjoin_singleton_eq_range_aeval] at hmem + obtain ⟨p, hp⟩ := hmem + refine ⟨p, ?_⟩ + have := congrArg E.val hp + simpa [Polynomial.aeval_algHom_apply] using this + +end ExistsMonicIntegralModelPresentation + +open Polynomial ExistsMonicIntegralModelPresentation in +/-- **One model for finitely many numbers.** Let $\omega\in\mathbb{C}$ be transcendental and let +$(z_i)_{i\in I}$ be a finite family of complex numbers algebraic over $\mathbb{Q}(\omega)$. There +are $\omega_1\in\mathbb{C}$ and $Q\in\mathbb{Z}[X][Y]$, monic in $Y$ of degree $d\ge1$, with +$Q(\omega,\omega_1)=0$ and minimal there in the sense of Lemma , and $D,E_i\in\mathbb{Z}[X][Y]$ with +$D(\omega,\omega_1)\neq0$ and +$$ z_i\,D(\omega,\omega_1)=E_i(\omega,\omega_1)\qquad\text{for every }i. $$ -/ +theorem exists_monic_integral_model_presentation (ω : ℂ) (hω : Transcendental ℚ ω) + {ι : Type*} [Finite ι] (z : ι → ℂ) + (hz : ∀ i, IsAlgebraic (IntermediateField.adjoin ℚ ({ω} : Set ℂ)) (z i)) : + ∃ (ω₁ : ℂ) (Q : Polynomial (Polynomial ℤ)), Q.Monic ∧ 0 < Q.natDegree ∧ + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Q = 0 ∧ + (∀ A : Polynomial (Polynomial ℤ), A.natDegree < Q.natDegree → + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ A = 0 → A = 0) ∧ + ∃ (D : Polynomial (Polynomial ℤ)) (E : ι → Polynomial (Polynomial ℤ)), + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D ≠ 0 ∧ + ∀ i, z i * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (E i) := by + classical + have := Fintype.ofFinite ι + obtain ⟨θ, hθ, hgen⟩ := exists_primitive (IntermediateField.adjoin ℚ ({ω} : Set ℂ)) + (Finset.univ.image z) fun y hy => by + obtain ⟨i, -, rfl⟩ := Finset.mem_image.1 hy + exact hz i + obtain ⟨ω₁, Q, hQm, hQd, hQroot, hQmin, v, hv0, hω₁⟩ := + Transcendence.exists_monic_integral_model ω θ hω hθ.isAlgebraic + have hCv : evH ω ω₁ (C v) = aeval ω v := by + simp [evH, aeval_def, algebraMap_int_eq] + have hθpres : Presentable ω ω₁ θ := + ⟨C v, X, by rw [hCv]; exact hv0, by rw [hCv, hω₁, mul_comm]; simp [evH]⟩ + have hpres : ∀ i, Presentable ω ω₁ (z i) := fun i => by + obtain ⟨p, hp⟩ := hgen (z i) (Finset.mem_image_of_mem z (Finset.mem_univ i)) + rw [← hp] + exact presentable_aeval hθpres p + obtain ⟨D, hD, hE⟩ := common_denominator z hpres + choose E hE using hE + exact ⟨ω₁, Q, hQm, hQd, hQroot, hQmin, D, E, hD, hE⟩ + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/ExistsPowMulPowLeExpSqMulSqrtLog.lean b/LeanPool/FourExponentials/ExistsPowMulPowLeExpSqMulSqrtLog.lean new file mode 100644 index 0000000000..c7ab8edd32 --- /dev/null +++ b/LeanPool/FourExponentials/ExistsPowMulPowLeExpSqMulSqrtLog.lean @@ -0,0 +1,165 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Analysis.Complex.ExponentialBounds +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity + +/-! +# The size estimate + +For all $c,r\in\mathbb{N}$ there is $\kappa>0$ such that for all integers $N\ge3$ and +$S,T,a,b,m\in\mathbb{N}$ with +$$ S\le\frac{N^{2}}{\sqrt{\log N}},\quad m\le S,\quad T\le rN,\quad a\le r\frac{N}{\sqrt{\log +N}},\quad b\le rN\sqrt{\log N}, $$ +one has +$$ c^{\,c(1+m+S+T(a+b))}(1+m+S+T+a+b)^{c(1+m+S)}\le e^{\kappa N^{2}\sqrt{\log N}}. $$ + +Source: The parameter estimates in the proofs of [Wal73, Lemmes 4 and 7]. + +## References + +* [Wal73] M. Waldschmidt, *Solution du huitième problème de Schneider*, J. Number Theory 5 (1973), + 191–202. + +From `Diaz/Mirror/exists_pow_mul_pow_le_exp_sq_mul_sqrt_log.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.exists_pow_mul_pow_le_exp_sq_mul_sqrt_log`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace ExistsPowMulPowLeExpSqMulSqrtLog + +/-- `log x ≥ 1` for `x ≥ 3`, since `e < 3`. -/ +lemma one_le_log_of_three_le {x : ℝ} (hx : 3 ≤ x) : 1 ≤ Real.log x := + (Real.log_exp 1).symm.le.trans + (Real.log_le_log (Real.exp_pos 1) (Real.exp_one_lt_three.le.trans hx)) + +/-- The exponent estimate in real variables. Let `s ≥ 1` with `s² = log n` and `s ≤ n`, and let +`m ≤ S`, `S s ≤ n²`, `T ≤ r n`, `a s ≤ r n` and `b ≤ r n s`. Then `(1 + m + S) s ≤ 3 n²`, +`T (a + b) ≤ 2 r² n² s` and `1 + m + S + T + a + b ≤ (3 + 3 r) n²`, so that +`log (1 + m + S + T + a + b) ≤ log (3 + 3 r) + 2 s²`, and the logarithm +`c (1 + m + S + T (a + b)) log c + c (1 + m + S) log (1 + m + S + T + a + b)` of the size bound +is at most `(c (3 + 2 r²) log c + 3 c (log (3 + 3 r) + 2)) n² s`. -/ +lemma exists_pow_mul_pow_le_exp_sq_mul_sqrt_log_exponent_le (c r n s S T a b m : ℝ) (hc : 1 ≤ + c) (hr : 0 ≤ r) (hn : 1 ≤ n) + (hs : 1 ≤ s) (hss : s * s = Real.log n) (hsn : s ≤ n) + (hS0 : 0 ≤ S) (hT0 : 0 ≤ T) (ha0 : 0 ≤ a) (hb0 : 0 ≤ b) (hm0 : 0 ≤ m) + (hS : S * s ≤ n ^ 2) (hmS : m ≤ S) (hT : T ≤ r * n) (ha : a * s ≤ r * n) + (hb : b ≤ r * (n * s)) : + c * (1 + m + S + T * (a + b)) * Real.log c + + c * (1 + m + S) * Real.log (1 + m + S + T + a + b) ≤ + (c * (3 + 2 * r ^ 2) * Real.log c + 3 * c * (Real.log (3 + 3 * r) + 2)) * (n ^ 2 * s) := by + have hs0 : 0 ≤ s := by linarith + have hn0 : 0 ≤ n := by linarith + have hc0 : 0 ≤ c := by linarith + have hnn : n * 1 ≤ n * n := mul_le_mul_of_nonneg_left hn hn0 + have hZ0 : 0 ≤ 1 + m + S := by linarith + have hrn : 0 ≤ r * n := mul_nonneg hr hn0 + -- `(1 + m + S) s ≤ 3 n²`, hence `1 + m + S ≤ 3 n² ≤ 3 n² s` + have hZs : (1 + m + S) * s ≤ 3 * n ^ 2 := by + linarith only [mul_le_mul_of_nonneg_right hmS hs0, hS, hsn, hnn] + have hZ : 1 + m + S ≤ 3 * n ^ 2 := by + linarith only [hZs, mul_le_mul_of_nonneg_left hs hZ0] + have hP : n ^ 2 * 1 ≤ n ^ 2 * s := mul_le_mul_of_nonneg_left hs (pow_nonneg hn0 2) + have hZP : 1 + m + S ≤ 3 * (n ^ 2 * s) := by linarith only [hZ, hP] + -- `a ≤ r n`, and `T (a + b) ≤ r² n² + r² n² s ≤ 2 r² n² s` + have ha1 : a ≤ r * n := by linarith only [ha, mul_le_mul_of_nonneg_left hs ha0] + have hTab : T * (a + b) ≤ 2 * r ^ 2 * (n ^ 2 * s) := by + linarith only [mul_le_mul_of_nonneg_right hT ha0, mul_le_mul_of_nonneg_left ha1 hrn, + mul_le_mul_of_nonneg_left hs (mul_nonneg hrn hrn), mul_le_mul_of_nonneg_right hT hb0, + mul_le_mul_of_nonneg_left hb hrn] + have hX : 1 + m + S + T * (a + b) ≤ (3 + 2 * r ^ 2) * (n ^ 2 * s) := by + linarith only [hZP, hTab] + -- `1 + m + S + T + a + b ≤ (3 + 3 r) n²`, since `r n ≤ r n²` and `r n s ≤ r n²` + have hY : 1 + m + S + T + a + b ≤ (3 + 3 * r) * n ^ 2 := by + linarith only [hZ, hT, ha1, hb, mul_le_mul_of_nonneg_left hnn hr, + mul_le_mul_of_nonneg_left hsn hrn] + have hY0 : 0 < 1 + m + S + T + a + b := by linarith + have h3r : 0 < 3 + 3 * r := by linarith + have hlogY : Real.log (1 + m + S + T + a + b) ≤ Real.log (3 + 3 * r) + 2 * (s * s) := by + calc Real.log (1 + m + S + T + a + b) ≤ Real.log ((3 + 3 * r) * n ^ 2) := + Real.log_le_log hY0 hY + _ = Real.log (3 + 3 * r) + 2 * (s * s) := by + rw [Real.log_mul h3r.ne' (pow_pos (by linarith) 2).ne', Real.log_pow, hss, + Nat.cast_ofNat] + have hlc : 0 ≤ Real.log c := Real.log_nonneg hc + have hlr : 0 ≤ Real.log (3 + 3 * r) := Real.log_nonneg (by linarith) + -- `c X log c ≤ c (3 + 2 r²) n² s log c`, `c Z log(3 + 3 r) ≤ 3 c n² s log(3 + 3 r)` and + -- `2 c Z s² ≤ 6 c n² s`, with `Z = 1 + m + S` + linarith only [mul_le_mul_of_nonneg_left hX (mul_nonneg hc0 hlc), + mul_le_mul_of_nonneg_left hlogY (mul_nonneg hc0 hZ0), + mul_le_mul_of_nonneg_left hZP (mul_nonneg hc0 hlr), + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right hZs hs0) hc0] + +end ExistsPowMulPowLeExpSqMulSqrtLog + +open ExistsPowMulPowLeExpSqMulSqrtLog in +/-- The size bound at the scale `N² √(log N)`. For `c = 0` the left side is `1`. For `c ≥ 1` +write it as `exp (c (1 + m + S + T (a + b)) log c + c (1 + m + S) log (1 + m + S + T + a + b))` +and apply `exists_pow_mul_pow_le_exp_sq_mul_sqrt_log_exponent_le` with `s = √(log N)`, which +satisfies `1 ≤ s`, `s² = log N` and +`s ≤ log N ≤ N`; the exponent `κ` is `c (3 + 2 r²) log c + 3 c (log (3 + 3 r) + 2) + 1`. -/ +theorem exists_pow_mul_pow_le_exp_sq_mul_sqrt_log (c r : ℕ) : + ∃ κ : ℝ, 0 < κ ∧ ∀ N S T a b m : ℕ, 3 ≤ N → + (S : ℝ) ≤ (N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ)) → m ≤ S → T ≤ r * N → + (a : ℝ) ≤ r * ((N : ℝ) / Real.sqrt (Real.log (N : ℝ))) → + (b : ℝ) ≤ r * ((N : ℝ) * Real.sqrt (Real.log (N : ℝ))) → + ((c ^ (c * (1 + m + S + T * (a + b))) * (1 + m + S + T + a + b) ^ (c * (1 + m + S)) : ℕ) : ℝ) + ≤ Real.exp (κ * ((N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ)))) := by + rcases Nat.eq_zero_or_pos c with rfl | hc + · -- for `c = 0` the left side is `1` + refine ⟨1, one_pos, fun N S T a b m _ _ _ _ _ _ => ?_⟩ + simp only [zero_mul, pow_zero, mul_one, one_mul, Nat.cast_one] + exact Real.one_le_exp (by positivity) + have hc1 : (1 : ℝ) ≤ c := by exact_mod_cast hc + have hr0 : (0 : ℝ) ≤ r := Nat.cast_nonneg r + have hκ1 : 0 ≤ (c : ℝ) * (3 + 2 * (r : ℝ) ^ 2) * Real.log c := + mul_nonneg (by positivity) (Real.log_nonneg hc1) + have hκ2 : 0 ≤ 3 * (c : ℝ) * (Real.log (3 + 3 * (r : ℝ)) + 2) := + mul_nonneg (by positivity) (by linarith [Real.log_nonneg (by linarith : (1 : ℝ) ≤ 3 + 3 * r)]) + refine ⟨(c : ℝ) * (3 + 2 * (r : ℝ) ^ 2) * Real.log c + 3 * (c : ℝ) * + (Real.log (3 + 3 * (r : ℝ)) + 2) + 1, by linarith only [hκ1, hκ2], + fun N S T a b m hN hS hmS hT ha hb => ?_⟩ + -- the parameter `s = √(log N)` + have hN3 : (3 : ℝ) ≤ N := by exact_mod_cast hN + have hL1 : 1 ≤ Real.log (N : ℝ) := one_le_log_of_three_le hN3 + have hLN : Real.log (N : ℝ) ≤ N := by + linarith [Real.log_le_sub_one_of_pos (by linarith : (0 : ℝ) < N)] + have hs1 : 1 ≤ Real.sqrt (Real.log (N : ℝ)) := + Real.sqrt_one.symm.le.trans (Real.sqrt_le_sqrt hL1) + have hss : Real.sqrt (Real.log (N : ℝ)) * Real.sqrt (Real.log (N : ℝ)) = Real.log N := + Real.mul_self_sqrt (by linarith) + generalize Real.sqrt (Real.log (N : ℝ)) = s at hs1 hss hS ha hb ⊢ + have hs0 : 0 < s := by linarith + have hsn : s ≤ N := by linarith only [mul_le_mul_of_nonneg_left hs1 hs0.le, hss, hLN] + rw [le_div_iff₀ hs0] at hS + rw [← mul_div_assoc, le_div_iff₀ hs0] at ha + have hT' : (T : ℝ) ≤ r * N := by exact_mod_cast hT + have hmS' : (m : ℝ) ≤ S := by exact_mod_cast hmS + have key := exists_pow_mul_pow_le_exp_sq_mul_sqrt_log_exponent_le (c : ℝ) r N s S T a b m hc1 hr0 + (by linarith) hs1 hss hsn + (Nat.cast_nonneg _) (Nat.cast_nonneg _) (Nat.cast_nonneg _) (Nat.cast_nonneg _) + (Nat.cast_nonneg _) hS hmS' hT' ha hb + -- the left side as an exponential + have hc0 : (0 : ℝ) < c := by linarith + have hY0 : (0 : ℝ) < ((1 + m + S + T + a + b : ℕ) : ℝ) := by positivity + have hLHS : ((c ^ (c * (1 + m + S + T * (a + b))) * (1 + m + S + T + a + b) ^ (c * (1 + m + S)) + : ℕ) : ℝ) = Real.exp (((c * (1 + m + S + T * (a + b)) : ℕ) : ℝ) * Real.log c + + ((c * (1 + m + S) : ℕ) : ℝ) * Real.log ((1 + m + S + T + a + b : ℕ) : ℝ)) := by + rw [Real.exp_add, Real.exp_nat_mul, Real.exp_nat_mul, Real.exp_log hc0, Real.exp_log hY0, + Nat.cast_mul, Nat.cast_pow, Nat.cast_pow] + rw [hLHS, Real.exp_le_exp] + push_cast + linarith only [key, mul_nonneg (pow_nonneg (Nat.cast_nonneg N : (0 : ℝ) ≤ N) 2) hs0.le] + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExpEOrExpESqTranscendental.lean b/LeanPool/FourExponentials/ExpEOrExpESqTranscendental.lean new file mode 100644 index 0000000000..c3b7aa6044 --- /dev/null +++ b/LeanPool/FourExponentials/ExpEOrExpESqTranscendental.lean @@ -0,0 +1,142 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.TwoAlgebraicallyIndependentOfExpColumn +public import Mathlib.Tactic.Convert +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.FinCases +public import Mathlib.Tactic.LinearCombination +public import Mathlib.Tactic.NormNum + +/-! +# `e^e` or `e^{e²}` is transcendental + +Suppose that `e^e` and `e^{e²}` are both algebraic. Apply Waldschmidt's theorem of 1973 +(`FourExponentials.two_algebraically_independent_of_exp_column`) to + + `x₁ = 1`, `x₂ = e`, `y₁ = 1`, `y₂ = e`. + +The number `e` is transcendental by Hermite–Lindemann, so `1, e` are `ℚ`-linearly independent. The +column is `e^{x₁y₂} = e^e` and `e^{x₂y₂} = e^{e²}`, algebraic by assumption. So two of the eight +numbers + + `1`, `e`, `1`, `e`, `e^{1·1} = e`, `e^e`, `e^e`, `e^{e²}` + +are algebraically independent. But all eight are algebraic over `ℚ[e]`, so the `ℚ`-algebra they +generate has transcendence degree at most `1`, which contradicts the two algebraically independent +numbers it contains. + +From `Diaz/Mirror/exp_e_or_exp_e_sq_transcendental.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.exp_e_or_exp_e_sq_transcendental`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace ExpEOrExpESqTranscendental + +/-! ## Numbers algebraic over `ℚ[x]` -/ + +/-- The complex numbers algebraic over `ℚ[x]`, as a `ℚ`-subalgebra of `ℂ`. -/ +noncomputable def expEOrExpESqTranscendentalAlgOver (x : ℂ) : Subalgebra ℚ ℂ := + (Subalgebra.algebraicClosure ↥(Algebra.adjoin ℚ ({x} : Set ℂ)) ℂ).restrictScalars ℚ + +theorem exp_e_or_exp_e_sq_transcendental_mem_algOver_of_isAlgebraic {x z : ℂ} (h : IsAlgebraic ℚ z) + : z ∈ expEOrExpESqTranscendentalAlgOver x := + h.extendScalars (algebraMap ℚ ↥(Algebra.adjoin ℚ ({x} : Set ℂ))).injective + +theorem exp_e_or_exp_e_sq_transcendental_self_mem_algOver (x : ℂ) : x ∈ + expEOrExpESqTranscendentalAlgOver x := + isAlgebraic_algebraMap (⟨x, Algebra.subset_adjoin rfl⟩ : ↥(Algebra.adjoin ℚ ({x} : Set ℂ))) + +/-- If every element of `S` is algebraic over `ℚ[x]`, no two elements of `S` are algebraically +independent over `ℚ`: they would sit in `ℚ[S]`, of transcendence degree at most one. -/ +theorem exp_e_or_exp_e_sq_transcendental_not_algIndep_of_forall_mem_algOver {x : ℂ} {S : Set ℂ} (hS + : ∀ s ∈ S, s ∈ expEOrExpESqTranscendentalAlgOver x) + {a b : ℂ} (ha : a ∈ S) (hb : b ∈ S) : ¬ AlgebraicIndependent ℚ ![a, b] := fun hab => by + have hv : AlgebraicIndependent ℚ (![⟨a, Algebra.subset_adjoin ha⟩, ⟨b, + Algebra.subset_adjoin hb⟩] : + Fin 2 → ↥(Algebra.adjoin ℚ S)) := + .of_comp (Algebra.adjoin ℚ S).val (by convert hab using 1; funext i; fin_cases i <;> rfl) + have h := hv.cardinalMk_le_trdeg.trans + (Transcendence.trdeg_adjoin_le_one_of_isAlgebraic_adjoin (K := ℚ) x S hS) + rw [Cardinal.mk_fin] at h + norm_num at h + +/-! ## The choice of `x` and `y` -/ + +/-- `1` and `e` are `ℚ`-linearly independent, because `e` is irrational. -/ +theorem linIndep_one_exp_one (he : Transcendental ℚ (Complex.exp 1)) : + LinearIndependent ℚ ![(1 : ℂ), Complex.exp 1] := by + rw [LinearIndependent.pair_iff] + intro s t hst + rw [Rat.smul_def, Rat.smul_def, mul_one] at hst + by_cases ht : t = 0 + · subst ht + simp only [Rat.cast_zero, zero_mul, add_zero, Rat.cast_eq_zero] at hst + exact ⟨hst, rfl⟩ + · exfalso + apply he + have htC : (t : ℂ) ≠ 0 := by exact_mod_cast ht + have h' : Complex.exp 1 = ((-s / t : ℚ) : ℂ) := by + push_cast + field_simp + linear_combination hst + rw [h'] + exact isAlgebraic_ratCast ℚ _ + +end ExpEOrExpESqTranscendental + +open ExpEOrExpESqTranscendental in +/-- **Schneider's eighth problem.** At least one of the numbers $e^{e}$ and $e^{e^{2}}$ is +transcendental. -/ +theorem exp_e_or_exp_e_sq_transcendental : + Transcendental ℚ (Complex.exp (Complex.exp 1)) ∨ + Transcendental ℚ (Complex.exp (Complex.exp 1 ^ 2)) := by + by_contra h + simp only [not_or, Transcendental, not_not] at h + obtain ⟨h1, h2⟩ := h + -- `e` is transcendental, by Hermite–Lindemann + have he : Transcendental ℚ (Complex.exp 1) := + FourExponentials.hermite_lindemann_holds 1 one_ne_zero isAlgebraic_one + -- the column `e^{x₁y₂} = e^e`, `e^{x₂y₂} = e^{e²}` + have h12 : IsAlgebraic ℚ (Complex.exp (1 * Complex.exp 1)) := by + rw [one_mul] + exact h1 + have h22 : IsAlgebraic ℚ (Complex.exp (Complex.exp 1 * Complex.exp 1)) := by + rw [← sq] + exact h2 + obtain ⟨a, ha, b, hb, hab⟩ := FourExponentials.two_algebraically_independent_of_exp_column 1 + (Complex.exp 1) 1 (Complex.exp 1) (linIndep_one_exp_one he) (linIndep_one_exp_one he) h12 h22 + -- all eight numbers are algebraic over `ℚ[e]` + refine exp_e_or_exp_e_sq_transcendental_not_algIndep_of_forall_mem_algOver (x := + Complex.exp 1) ?_ ha hb hab + intro s hs + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hs + rcases hs with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl + · -- `x₁ = 1` + exact one_mem _ + · -- `x₂ = e` + exact exp_e_or_exp_e_sq_transcendental_self_mem_algOver _ + · -- `y₁ = 1` + exact one_mem _ + · -- `y₂ = e` + exact exp_e_or_exp_e_sq_transcendental_self_mem_algOver _ + · -- `e^{x₁y₁} = e` + rw [mul_one] + exact exp_e_or_exp_e_sq_transcendental_self_mem_algOver _ + · -- `e^{x₁y₂} = e^e` + exact exp_e_or_exp_e_sq_transcendental_mem_algOver_of_isAlgebraic h12 + · -- `e^{x₂y₁} = e^e` + rw [mul_one] + exact exp_e_or_exp_e_sq_transcendental_mem_algOver_of_isAlgebraic h1 + · -- `e^{x₂y₂} = e^{e²}` + exact exp_e_or_exp_e_sq_transcendental_mem_algOver_of_isAlgebraic h22 + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/ExpPolyGridEstimate.lean b/LeanPool/FourExponentials/ExpPolyGridEstimate.lean new file mode 100644 index 0000000000..0484c11b9c --- /dev/null +++ b/LeanPool/FourExponentials/ExpPolyGridEstimate.lean @@ -0,0 +1,145 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.CauchyEstimateWithZeros +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected +public import Mathlib.Analysis.Convex.Contractible +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.FunProp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# A Cauchy estimate for an exponential polynomial on a grid + +Let `F(z) = ∑ c_k z^(e_k) e^(ω_k z)` vanish to order `n` at every point `∑ m'_j y_j` with +`m'_j < t_j`. These `∏ t_j` points are distinct, since the `y_j` are `ℚ`-linearly independent, and +they lie within `ρ = ∑ A_j |y_j|` of the target `w = ∑ m_j y_j` (`m_j < A_j`). On the circle of +radius `R = (ρ + 1) u` about `w` we have `|z| ≤ Z`, so `|F(z)| ≤ (∑ |c_k|) Z^E e^(W Z)`. The Cauchy +estimate with zeros bounds `|F⁽ʳ⁾(w)|` by `r! · R/(R - 1) · ((ρ + 1)/(R - ρ))^(n ∏ t_j)` times this +maximum, and for `u ≥ 2` we have `R/(R - 1) ≤ 2` and `(ρ + 1)/(R - ρ) ≤ 1/(u - 1)`. + +From `Diaz/Mirror/expPoly_grid_estimate.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.expPoly_grid_estimate`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +/-- **Cauchy's estimate on a grid of zeros.** Let $y_1,\dots,y_l\in\mathbb{C}$ be linearly +independent over $\mathbb{Q}$, and let $F(z)=\sum_{k\in s}c_kz^{e_k}e^{\omega_kz}$ be a finite sum +with $|\omega_k|\le W$ and $e_k\le E$ for all $k$. Let $t_j\le A_j$ ($1\le j\le l$) and $n$ be +natural numbers, and suppose that $F^{(i)}\bigl(\sum_jm'_jy_j\bigr)=0$ for all $i ∑ k ∈ s, c k * z ^ e k * Complex.exp (ω k * z) from funext hF] + fun_prop + set ρ : ℝ := ∑ j, (A j : ℝ) * ‖y j‖ with hρ + have hρ0 : 0 ≤ ρ := by positivity + -- the lattice points `∑ m' j * y j`, `m' j < t j`, are pairwise distinct + set P : Finset ℂ := (Fintype.piFinset fun j => Finset.range (t j)).image + (fun m' : ι → ℕ => ∑ j, (m' j : ℂ) * y j) with hP + have hcard : P.card = ∏ j, t j := by + rw [hP, Finset.card_image_of_injective, Fintype.card_piFinset] + · simp + intro a b hab + have := hy.fintypeLinearCombination_injective (a₁ := fun j => (a j : ℚ)) + (a₂ := fun j => (b j : ℚ)) + (by simpa [Fintype.linearCombination_apply, Rat.smul_def] using hab) + funext j; exact_mod_cast congrFun this j + -- every point of the grid is within `ρ` of the target + have hdist : ∀ m' : ι → ℕ, (∀ j, m' j < A j) → + ‖∑ j, (m' j : ℂ) * y j - ∑ j, (m j : ℂ) * y j‖ ≤ ρ := by + intro m' hm' + rw [← Finset.sum_sub_distrib] + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun j _ => ?_) + rw [← sub_mul, norm_mul, show (m' j : ℂ) - (m j : ℂ) = (((m' j : ℝ) - (m j : ℝ) : ℝ) : ℂ) by + push_cast; ring, Complex.norm_real, Real.norm_eq_abs] + have a1 : (m' j : ℝ) < A j := by exact_mod_cast hm' j + have a2 : (m j : ℝ) < A j := by exact_mod_cast hm j + exact mul_le_mul_of_nonneg_right (abs_sub_le_iff.2 ⟨by linarith [(m j).cast_nonneg (α := ℝ)], + by linarith [(m' j).cast_nonneg (α := ℝ)]⟩) (norm_nonneg _) + have hw : ‖∑ j, (m j : ℂ) * y j‖ ≤ ρ := by + simpa using hdist (fun _ => 0) fun j => (Nat.zero_le _).trans_lt (hm j) + -- the bound on the circle of radius `(ρ + 1) * u` around the target + have hZ1 : 1 ≤ Z := by nlinarith + have hM : ∀ z : ℂ, ‖z - ∑ j, (m j : ℂ) * y j‖ = (ρ + 1) * u → + ‖F z‖ ≤ (∑ k ∈ s, ‖c k‖) * Z ^ E * Real.exp (W * Z) := by + intro z hz + have hzZ : ‖z‖ ≤ Z := by + have := norm_le_insert' z (∑ j, (m j : ℂ) * y j) + nlinarith + rw [hF, Finset.sum_mul, Finset.sum_mul] + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun k hk => ?_) + rw [norm_mul, norm_mul, norm_pow, Complex.norm_exp] + gcongr + · exact (pow_le_pow_left₀ (norm_nonneg _) hzZ _).trans (pow_le_pow_right₀ hZ1 (he k hk)) + · exact (Complex.re_le_norm _).trans (by + rw [norm_mul]; exact mul_le_mul (hω k hk) hzZ (norm_nonneg _) ((norm_nonneg _).trans (hω k + hk))) + -- the target and the grid; every grid point is a zero of order at least `n` + set w : ℂ := ∑ j, (m j : ℂ) * y j with hwdef + set R : ℝ := (ρ + 1) * u with hR + have hPw : ∀ z ∈ P, ‖z - w‖ ≤ ρ := fun z hz => by + obtain ⟨m', hm', rfl⟩ := Finset.mem_image.1 hz + exact hdist m' fun j => ((by simpa using Fintype.mem_piFinset.1 hm' j) : m' j < + t j).trans_le (htA j) + have hM0 : 0 ≤ (∑ k ∈ s, ‖c k‖) * Z ^ E * Real.exp (W * Z) := by + have : 0 ≤ Z ^ E := pow_nonneg (by linarith) _ + positivity + by_cases hF0 : F = 0 + · rw [hF0, iteratedDeriv_const_zero, norm_zero] + have : 0 ≤ 1 / (u - 1) := div_nonneg zero_le_one (by linarith) + positivity + have hle : P.card * n ≤ ∑ z ∈ P, analyticOrderNatAt F z := by + rw [← smul_eq_mul] + refine Finset.card_nsmul_le_sum _ _ _ fun z hz => ?_ + obtain ⟨m', hm', rfl⟩ := Finset.mem_image.1 hz + have h1 := (natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero (hFd.analyticAt _)).2 + (hvan m' fun j => by simpa using Fintype.mem_piFinset.1 hm' j) + rw [← Nat.cast_analyticOrderNatAt fun h => hF0 + ((AnalyticOnNhd.analyticOrderAt_eq_top_iff_eq_zero _ fun u => hFd.analyticAt u).1 h)] at h1 + exact_mod_cast h1 + -- the Cauchy estimate on the circle of radius `R = (ρ + 1) u` around the target + have key := FourExponentials.cauchy_estimate_with_zeros F hFd w ρ R _ hρ0 + (by nlinarith) P hPw hM r + refine key.trans ?_ + have h1 : R / (R - 1) ≤ 2 := by rw [div_le_iff₀ (by nlinarith)]; nlinarith + have h2 : (ρ + 1) / (R - ρ) ≤ 1 / (u - 1) := by + rw [div_le_div_iff₀ (by nlinarith) (by linarith)]; nlinarith + have h3 : 0 ≤ (ρ + 1) / (R - ρ) := div_nonneg (by positivity) (by nlinarith) + have h4 : (ρ + 1) / (R - ρ) ≤ 1 := h2.trans (by rw [div_le_one (by linarith)]; linarith) + rw [← hcard] + calc _ ≤ (r.factorial : ℝ) * 2 * ((ρ + 1) / (R - ρ)) ^ (P.card * n) * + ((∑ k ∈ s, ‖c k‖) * Z ^ E * Real.exp (W * Z)) := by + refine mul_le_mul_of_nonneg_right (mul_le_mul (mul_le_mul_of_nonneg_left h1 (by positivity)) + (pow_le_pow_of_le_one h3 h4 hle) (by positivity) (by positivity)) hM0 + _ ≤ _ := by gcongr + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/ExpPolyIteratedDerivLe.lean b/LeanPool/FourExponentials/ExpPolyIteratedDerivLe.lean new file mode 100644 index 0000000000..aa6a9944ba --- /dev/null +++ b/LeanPool/FourExponentials/ExpPolyIteratedDerivLe.lean @@ -0,0 +1,132 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Calculus.Deriv.Polynomial +public import Mathlib.Analysis.Complex.CauchyIntegral +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring + +/-! +# All derivatives of an exponential polynomial from its first `N` + +Let `f(z) = ∑ⱼ Pⱼ(z) e^{wⱼ z}` with `Pⱼ = 0` or `deg Pⱼ < qⱼ`, `∑ⱼ qⱼ = N` and `‖wⱼ‖ ≤ W`, and +suppose `‖f⁽ˢ⁾(c)‖ ≤ D` for `s < N`. Induct on `N`. If `N = 0`, every `Pⱼ` is zero. Otherwise pick +`j₀` with `q_{j₀} ≠ 0` and peel that frequency: `g = f' - w_{j₀} f = ∑ⱼ Qⱼ(z) e^{wⱼ z}` with +`Qⱼ = Pⱼ' + (wⱼ - w_{j₀}) Pⱼ` has the same shape, with `q_{j₀}` lowered by one. Since +`g⁽ˢ⁾(c) = f⁽ˢ⁺¹⁾(c) - w_{j₀} f⁽ˢ⁾(c)`, the first `N - 1` derivatives of `g` at `c` are at most +`D (W + 1)`, so by induction `‖g⁽ⁿ⁾(c)‖ ≤ D (W + 1)^{n + N}`. Finally +`f⁽ⁿ⁺¹⁾(c) = g⁽ⁿ⁾(c) + w_{j₀} f⁽ⁿ⁾(c)` gives the bound for `f` by induction on `n`, because +`D (W + 1)^{n + N} + W · D (W + 1)^{n + N} = D (W + 1)^{n + 1 + N}`. + +From `Diaz/Mirror/expPoly_iteratedDeriv_le.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.expPoly_iteratedDeriv_le`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +open Finset Polynomial in +/-- **Derivatives at a point.** Let $f(z)=\sum_{j\in J}P_j(z)e^{w_jz}$, over a finite set $J$, with +$|w_j|\le W$ for some $W\ge0$, and each $P_j\in\mathbb{C}[z]$ zero or of degree less than $q_j$; put +$N=\sum_jq_j$. Let $c\in\mathbb{C}$ and $D\ge0$. If $|f^{(s)}(c)|\le D$ for every $s ∑ j, (P j).eval z * Complex.exp (w j * z)) c‖ ≤ D) + (n : ℕ) : + ‖iteratedDeriv n (fun z => ∑ j, (P j).eval z * Complex.exp (w j * z)) c‖ + ≤ D * (W + 1) ^ (n + N) := by + classical + -- the derivative of `∑ Rⱼ(z) e^{wⱼ z}` is `∑ (Rⱼ' + wⱼ Rⱼ)(z) e^{wⱼ z}` + have hder : ∀ (R : ι → ℂ[X]) (z : ℂ), + HasDerivAt (fun y => ∑ j, (R j).eval y * Complex.exp (w j * y)) + (∑ j, (derivative (R j) + C (w j) * R j).eval z * Complex.exp (w j * z)) z := + fun R z => HasDerivAt.fun_sum fun j _ => by + have h2 : HasDerivAt (fun y => Complex.exp (w j * y)) (Complex.exp (w j * z) * w j) z := by + simpa using ((hasDerivAt_id z).const_mul (w j)).cexp + exact (((R j).hasDerivAt z).mul h2).congr_deriv + (by simp only [eval_add, eval_mul, eval_C]; ring) + have hdiff : ∀ R : ι → ℂ[X], Differentiable ℂ (fun y => ∑ j, + (R j).eval y * Complex.exp (w j * y)) := + fun R z => (hder R z).differentiableAt + induction N generalizing q P D n with + | zero => + have hP0 : ∀ j, P j = 0 := fun j => (hP j).resolve_right (by + rw [Finset.sum_eq_zero_iff.1 hN j (Finset.mem_univ j)]; exact Nat.not_lt_zero _) + simp only [hP0, eval_zero, zero_mul, Finset.sum_const_zero] + rw [show (fun _ : ℂ => (0 : ℂ)) = 0 from rfl, iteratedDeriv_const_zero, norm_zero] + positivity + | succ N ih => + obtain ⟨j0, -, hj0⟩ := Finset.exists_ne_zero_of_sum_ne_zero (hN.trans_ne N.succ_ne_zero) + obtain ⟨Q, hQ⟩ : ∃ Q : ι → ℂ[X], ∀ j, Q j = derivative (P j) + C (w j - w j0) * P j := + ⟨_, fun _ => rfl⟩ + -- `f^{(k+1)}(c) = g^{(k)}(c) + w_{j₀} f^{(k)}(c)` with `g = ∑ Qⱼ(z) e^{wⱼ z}` + have hsucc : ∀ k, iteratedDeriv (k + 1) (fun z => ∑ j, (P j).eval z * Complex.exp (w j * z)) c + = iteratedDeriv k (fun z => ∑ j, (Q j).eval z * Complex.exp (w j * z)) c + + w j0 * iteratedDeriv k (fun z => ∑ j, (P j).eval z * Complex.exp (w j * z)) c := by + intro k + have hd : deriv (fun z => ∑ j, (P j).eval z * Complex.exp (w j * z)) + = (fun z => ∑ j, (Q j).eval z * Complex.exp (w j * z)) + + fun z => w j0 * ∑ j, (P j).eval z * Complex.exp (w j * z) := by + funext z + rw [(hder P z).deriv, Pi.add_apply, Finset.mul_sum, ← Finset.sum_add_distrib] + refine Finset.sum_congr rfl fun j _ => ?_ + simp only [hQ, eval_add, eval_mul, eval_C]; ring + rw [iteratedDeriv_succ', hd, iteratedDeriv_add (hdiff Q).contDiff.contDiffAt + ((hdiff P).const_mul _).contDiff.contDiffAt, + iteratedDeriv_const_mul _ (hdiff P).contDiff.contDiffAt] + -- the degree budget drops by one, at `j₀` + have hQd : ∀ j, Q j = 0 ∨ (Q j).natDegree < Function.update q j0 (q j0 - 1) j := by + intro j + rw [hQ] + by_cases hj : j = j0 + · subst hj + simp only [sub_self, map_zero, zero_mul, add_zero, Function.update_self] + rcases hP j with h | h + · left; simp [h] + · by_cases hd : (P j).natDegree = 0 + · left; exact derivative_of_natDegree_zero hd + · right; have := natDegree_derivative_le (P j); omega + · rw [Function.update_of_ne hj] + rcases hP j with h | h + · left; simp [h] + · right + calc (derivative (P j) + C (w j - w j0) * P j).natDegree + ≤ max (derivative (P j)).natDegree (C (w j - w j0) * P j).natDegree := + natDegree_add_le _ _ + _ ≤ (P j).natDegree := + max_le ((natDegree_derivative_le _).trans (Nat.sub_le _ _)) (natDegree_C_mul_le _ _) + _ < q j := h + have hsum' : ∑ j, Function.update q j0 (q j0 - 1) j = N := by + rw [Finset.sum_update_of_mem (Finset.mem_univ j0), Finset.sdiff_singleton_eq_erase] + have h2 := Finset.add_sum_erase Finset.univ q (Finset.mem_univ j0) + omega + have hDG : ∀ s < N, + ‖iteratedDeriv s (fun z => ∑ j, (Q j).eval z * Complex.exp (w j * z)) c‖ ≤ D * (W + 1) := by + intro s hs + rw [eq_sub_of_add_eq (hsucc s).symm] + refine (norm_sub_le _ _).trans ?_ + rw [norm_mul] + exact (add_le_add (hD (s + 1) (by omega)) + (mul_le_mul (hW j0) (hD s (by omega)) (norm_nonneg _) hW0)).trans_eq (by ring) + have ih' := ih (Function.update q j0 (q j0 - 1)) Q hQd hsum' (D * (W + 1)) (by positivity) hDG + induction n with + | zero => + exact (hD 0 (by omega)).trans (le_mul_of_one_le_right hD0 (one_le_pow₀ (by linarith))) + | succ n ihn => + rw [hsucc n] + refine (norm_add_le _ _).trans ?_ + rw [norm_mul] + exact (add_le_add (ih' n) (mul_le_mul (hW j0) ihn (norm_nonneg _) hW0)).trans_eq (by ring) + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/ExpPolyNeZero.lean b/LeanPool/FourExponentials/ExpPolyNeZero.lean new file mode 100644 index 0000000000..22b0b9da14 --- /dev/null +++ b/LeanPool/FourExponentials/ExpPolyNeZero.lean @@ -0,0 +1,195 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Complex.Polynomial.Basic +public import Mathlib.RingTheory.SimpleRing.Principal +public import Mathlib.Tactic.Push +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set +public import Mathlib.Tactic.SplitIfs + +/-! +# Distinct frequencies + +Let $\omega_1,\dots,\omega_l\in\mathbb{C}$ be pairwise distinct, let $q_1,\dots,q_l\in\mathbb{N}$, +and let $b_{j,i}\in\mathbb{C}$ ($1\le j\le l$, $0\le i r.coeff p.natDegree) h + simp only [coeff_add, coeff_derivative, coeff_C_mul, coeff_zero] at hcoeff + rw [coeff_eq_zero_of_natDegree_lt (Nat.lt_succ_self _), zero_mul, zero_add] at hcoeff + exact mul_ne_zero hc (leadingCoeff_ne_zero.mpr hp) hcoeff + +/-- The operator `p ↦ p' + c p` does not increase the size. -/ +theorem meas_derivative_add_le (p : ℂ[X]) (c : ℂ) : meas (derivative p + C c * p) ≤ meas p := by + by_cases hp : p = 0 + · simp [meas, hp] + · unfold meas + rw [ite_eq_right hp] + split_ifs with hq + · exact Nat.zero_le _ + · have h1 : (derivative p).natDegree ≤ p.natDegree := + (natDegree_derivative_le p).trans (Nat.sub_le _ _) + have h2 : (C c * p).natDegree ≤ p.natDegree := natDegree_C_mul_le c p + have h3 : (derivative p + C c * p).natDegree ≤ p.natDegree := + (natDegree_add_le _ _).trans (max_le h1 h2) + omega + +/-- Differentiation strictly decreases the size of a non-zero polynomial. -/ +theorem meas_derivative_lt {p : ℂ[X]} (hp : p ≠ 0) : meas (derivative p) < meas p := by + unfold meas + rw [ite_eq_right hp] + split_ifs with hq + · exact Nat.succ_pos _ + · have hdeg : p.natDegree ≠ 0 := by + intro h0 + exact hq (derivative_of_natDegree_zero h0) + have := natDegree_derivative_lt hdeg + omega + +/-- Polynomial form: `∑ Pⱼ(z) e^{ωⱼ z} ≡ 0` with distinct `ωⱼ` forces every `Pⱼ = 0`. -/ +theorem poly_form (ι : Type) [Fintype ι] : + ∀ n : ℕ, ∀ ω : ι → ℂ, Function.Injective ω → ∀ P : ι → ℂ[X], + ∑ j, meas (P j) = n → + (∀ z : ℂ, ∑ j, (P j).eval z * Complex.exp (ω j * z) = 0) → ∀ j, P j = 0 := by + classical + intro n + induction n using Nat.strong_induction_on with + | _ n ih => + intro ω hω P hM hvan + by_contra hne + push Not at hne + obtain ⟨j₀, hj₀⟩ := hne + set c : ι → ℂ := fun j => ω j - ω j₀ with hc + set Q : ι → ℂ[X] := fun j => derivative (P j) + C (c j) * P j with hQ + -- `e^{-ω_{j₀} z} f(z) = ∑ Pⱼ(z) e^{cⱼ z}` vanishes, hence so does its derivative + have hg : ∀ w : ℂ, ∑ j, (P j).eval w * Complex.exp (c j * w) = 0 := by + intro w + have : ∑ j, (P j).eval w * Complex.exp (c j * w) + = Complex.exp (-(ω j₀ * w)) * ∑ j, (P j).eval w * Complex.exp (ω j * w) := by + rw [Finset.mul_sum] + refine Finset.sum_congr rfl (fun j _ => ?_) + rw [hc] + simp only + rw [show (ω j - ω j₀) * w = -(ω j₀ * w) + ω j * w by ring, Complex.exp_add] + ring + rw [this, hvan w, mul_zero] + have hvan' : ∀ z : ℂ, ∑ j, (Q j).eval z * Complex.exp (c j * z) = 0 := by + intro z + have hd : HasDerivAt (fun w => ∑ j, (P j).eval w * Complex.exp (c j * w)) + (∑ j, (Q j).eval z * Complex.exp (c j * z)) z := by + have hterm : ∀ j ∈ (Finset.univ : Finset ι), + HasDerivAt (fun w => (P j).eval w * Complex.exp (c j * w)) + ((Q j).eval z * Complex.exp (c j * z)) z := by + intro j _ + have h1 := (P j).hasDerivAt z + have h2 : HasDerivAt (fun w => Complex.exp (c j * w)) (Complex.exp (c j * z) * c j) z := by + have := ((hasDerivAt_id z).const_mul (c j)).cexp + simpa using this + have h3 := h1.mul h2 + have hval : eval z (Q j) * Complex.exp (c j * z) + = eval z (derivative (P j)) * Complex.exp (c j * z) + + eval z (P j) * (Complex.exp (c j * z) * c j) := by + rw [show eval z (Q j) = eval z (derivative (P j)) + c j * eval z (P j) by + simp [hQ]] + ring + rw [hval] + exact h3 + have := HasDerivAt.sum hterm + rw [Finset.sum_fn] at this + exact this + have h0 : HasDerivAt (fun w => ∑ j, (P j).eval w * Complex.exp (c j * w)) 0 z := by + have : (fun w => ∑ j, (P j).eval w * Complex.exp (c j * w)) = fun _ => 0 := funext hg + rw [this] + exact hasDerivAt_const z 0 + exact hd.unique h0 + have hcinj : Function.Injective c := by + intro a b h + apply hω + simpa [hc] using h + -- the size drops + have hle : ∀ j ∈ (Finset.univ : Finset ι), meas (Q j) ≤ meas (P j) := + fun j _ => meas_derivative_add_le (P j) (c j) + have hlt : meas (Q j₀) < meas (P j₀) := by + have : Q j₀ = derivative (P j₀) := by simp [hQ, hc] + rw [this] + exact meas_derivative_lt hj₀ + have hM' : ∑ j, meas (Q j) < n := by + rw [← hM] + exact Finset.sum_lt_sum hle ⟨j₀, Finset.mem_univ _, hlt⟩ + have hQ0 := ih _ hM' c hcinj Q rfl hvan' + have hPj : ∀ j, j ≠ j₀ → P j = 0 := by + intro j hj + have hcj : c j ≠ 0 := sub_ne_zero.mpr (hω.ne hj) + exact eq_zero_of_derivative_add hcj (by simpa [hQ] using hQ0 j) + have hroot : ∀ z : ℂ, (P j₀).eval z = 0 := by + intro z + have h := hvan z + rw [Finset.sum_eq_single j₀ (fun j _ hj => by rw [hPj j hj]; simp) (by simp)] at h + exact (mul_eq_zero.mp h).resolve_right (Complex.exp_ne_zero _) + exact hj₀ (Polynomial.funext (fun z => by simpa using hroot z)) + +end FourExpE0 + +/-- **Distinct frequencies.** Let $\omega_1,\dots,\omega_l\in\mathbb{C}$ be pairwise distinct, let +$q_1,\dots,q_l\in\mathbb{N}$, and let $b_{j,i}\in\mathbb{C}$ ($1\le j\le l$, $0\le i ∑ i : Fin (q j), C (b j i) * X ^ (i : ℕ) + have hvan : ∀ z : ℂ, ∑ j, (P j).eval z * Complex.exp (ω j * z) = 0 := by + intro z + rw [← hcon z] + refine Finset.sum_congr rfl (fun j _ => ?_) + simp only [P, eval_finsetSum, eval_mul, eval_C, eval_pow, eval_X, Finset.sum_mul] + have hP := FourExpE0.poly_form (Fin l) _ ω hω P rfl hvan j + have hc := congrArg (fun p => p.coeff (i : ℕ)) hP + simp only [P, finsetSum_coeff, coeff_C_mul_X_pow, coeff_zero] at hc + rw [Finset.sum_eq_single i (fun k _ hk => ite_eq_right (fun h => hk (Fin.ext h).symm)) + (by simp)] at hc + simp only [ite_true] at hc + exact hji hc + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExpPolyValueLeDerivs.lean b/LeanPool/FourExponentials/ExpPolyValueLeDerivs.lean new file mode 100644 index 0000000000..5eaa580536 --- /dev/null +++ b/LeanPool/FourExponentials/ExpPolyValueLeDerivs.lean @@ -0,0 +1,82 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExpPolyIteratedDerivLe +public import Mathlib.Analysis.Complex.TaylorSeries +public import Mathlib.Tactic.FunProp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# The value of an exponential polynomial from its first derivatives at `0` + +Write `N = ∑ⱼ qⱼ` and `f(z) = ∑ⱼ Pⱼ(z) e^{wⱼ z}`. If `N = 0`, every `Pⱼ` is zero and so is `f`. +Otherwise `0 ≤ D` (from `s = 0`), and `Transcendence.expPoly_iteratedDeriv_le` at `c = 0` gives +`‖f⁽ⁿ⁾(0)‖ ≤ D (W + 1)^{n + N}` for every `n`. The Taylor series of the entire function `f` at `0` +then gives `‖f(u)‖ ≤ ∑ₙ Rⁿ/n! · D (W + 1)^{n + N} ≤ D (W + 1)^N e^{(W + 1) R}`, which is at most +`N (W + 1)^{N + 1} e^{R (W + 1)} D`. The injectivity of `w` is not needed. + +From `Diaz/Mirror/expPoly_value_le_derivs.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.expPoly_value_le_derivs`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Finset in +/-- **Values from low-order derivatives.** Let $w_1,\dots,w_l\in\mathbb{C}$ be pairwise distinct +with $|w_j|\le W$ for some $W\ge0$. For each $j$ let $P_j\in\mathbb{C}[z]$ be zero or of degree less +than $q_j$, and put $g(z)=\sum_jP_j(z)e^{w_jz}$ and $n=\sum_jq_j$. Let $R\ge0$. If $|g^{(s)}(0)|\le +D$ for every $s ∑ j, (P j).eval z * Complex.exp (w j * z)) 0‖ ≤ D) + (u : ℂ) (hu : ‖u‖ ≤ R) : + ‖∑ j, (P j).eval u * Complex.exp (w j * u)‖ + ≤ ((∑ j, q j : ℕ) : ℝ) * (W + 1) ^ ((∑ j, q j) + 1) * Real.exp (R * (W + 1)) * D := by + have _ := hw -- the injectivity of `w` is not needed + set N := ∑ j, q j with hN + rcases Nat.eq_zero_or_pos N with hN0 | hNpos + · have hs0 : ∑ j, q j = 0 := hN0 + have hP0 : ∀ j, P j = 0 := fun j => (hP j).resolve_right (by + rw [Finset.sum_eq_zero_iff.1 hs0 j (Finset.mem_univ j)]; exact Nat.not_lt_zero _) + simp [hP0, hN0] + have hD0 : 0 ≤ D := (norm_nonneg _).trans (hD 0 hNpos) + have hbd := Transcendence.expPoly_iteratedDeriv_le w W hW0 hW 0 N q P hP hN.symm D hD0 hD + -- Taylor at `0`: `‖f(u)‖ ≤ ∑ₙ ‖u‖ⁿ/n! · D (W + 1)^(n + N) ≤ D (W + 1)^N e^{(W + 1) R}` + have hT := Complex.hasSum_taylorSeries_of_entire (c := 0) (z := u) + (show Differentiable ℂ (fun z : ℂ => ∑ j, (P j).eval z * Complex.exp (w j * z)) by fun_prop) + have hle : ‖∑ j, (P j).eval u * Complex.exp (w j * u)‖ + ≤ D * (W + 1) ^ N * Real.exp ((W + 1) * R) := by + refine le_of_tendsto' hT.tendsto_sum_nat.norm fun K => (norm_sum_le _ _).trans ?_ + calc _ ≤ ∑ n ∈ range K, D * (W + 1) ^ N * (((W + 1) * R) ^ n / (n.factorial : ℝ)) := by + refine Finset.sum_le_sum fun n _ => ?_ + rw [sub_zero, norm_smul, norm_smul, norm_inv, norm_pow, Complex.norm_natCast] + calc _ ≤ (n.factorial : ℝ)⁻¹ * (R ^ n * (D * (W + 1) ^ (n + N))) := by + gcongr; exact hbd n + _ = _ := by rw [mul_pow, pow_add]; ring + _ = D * (W + 1) ^ N * ∑ n ∈ range K, ((W + 1) * R) ^ n / (n.factorial : ℝ) := by + rw [Finset.mul_sum] + _ ≤ _ := by gcongr; exact Real.sum_le_exp_of_nonneg (by positivity) K + calc _ ≤ D * (W + 1) ^ N * Real.exp ((W + 1) * R) := hle + _ ≤ D * ((N : ℝ) * (W + 1) ^ (N + 1)) * Real.exp (R * (W + 1)) := by + rw [mul_comm (W + 1) R] + gcongr + calc (W + 1) ^ N ≤ (W + 1) ^ (N + 1) := pow_le_pow_right₀ (by linarith) (by omega) + _ ≤ _ := le_mul_of_one_le_left (by positivity) (by exact_mod_cast hNpos) + _ = _ := by ring + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExpPolyZeroCount.lean b/LeanPool/FourExponentials/ExpPolyZeroCount.lean new file mode 100644 index 0000000000..700a3e0020 --- /dev/null +++ b/LeanPool/FourExponentials/ExpPolyZeroCount.lean @@ -0,0 +1,86 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExpPolyZeroCountScaled +public import LeanPool.FourExponentials.ZeroCountArith +public import LeanPool.FourExponentials.ZeroCountArithPoly +public import LeanPool.FourExponentials.ZeroCountDegenerate +public import Mathlib.Tactic.Push + +/-! +# Zeros of an exponential polynomial in a disc + +Let $\omega_1,\dots,\omega_l\in\mathbb{C}$ be pairwise distinct, let $q_1,\dots,q_l\in\mathbb{N}$, +and let $b_{j,i}\in\mathbb{C}$ ($1\le j\le l$, $0\le i0$. Then for every finite set $S$ of points of the +disc $|z-z_0|\le\rho$ +$$ \sum_{z\in S}\operatorname{ord}_zf<\frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log +n}\,(1+\rho\Omega), $$ +where for $n=1$ the second term is read as $0$. No separation between the $\omega_j$ is assumed. + +Source: [Wal71, §4, Lemme 3, (4.2)]; compare [Tij71]. + +## References + +* [Tij71] R. Tijdeman, Proc. Kon. Nederl. Akad. Wetensch. Ser. A 74 (= Indag. Math. 33) (1971), 1–7. +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. + +From `Diaz/Mirror/expPoly_zero_count.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.expPoly_zero_count`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Finset + +/-- **Zeros of an exponential polynomial in a disc.** Let $\omega_1,\dots,\omega_l\in\mathbb{C}$ be +pairwise distinct, let $q_1,\dots,q_l\in\mathbb{N}$, and let $b_{j,i}\in\mathbb{C}$ ($1\le j\le l$, +$0\le i0$. Then for every finite set $S$ of points of the +disc $|z-z_0|\le\rho$ +$$ \sum_{z\in S}\operatorname{ord}_zf<\frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log +n}\,(1+\rho\Omega), $$ +where for $n=1$ the second term is read as $0$. No separation between the $\omega_j$ is assumed. -/ +theorem expPoly_zero_count + {l : ℕ} (q : Fin l → ℕ) (ω : Fin l → ℂ) (hω : Function.Injective ω) + (b : (j : Fin l) → Fin (q j) → ℂ) (hb : ∃ j i, b j i ≠ 0) + (z₀ : ℂ) (ρ : ℝ) (hρ : 0 ≤ ρ) (lam : ℝ) (hlam : 0 < lam) + (S : Finset ℂ) (hS : ∀ z ∈ S, ‖z - z₀‖ ≤ ρ) : + (∑ z ∈ S, (analyticOrderNatAt + (fun w : ℂ => ∑ j, ∑ i : Fin (q j), b j i * w ^ (i : ℕ) * Complex.exp (ω j * w)) z : ℝ)) + < ((∑ j, q j : ℕ) : ℝ) / lam + + 2 * (1 + ((∑ j, q j : ℕ) : ℝ) ^ lam) / (lam * Real.log ((∑ j, q j : ℕ) : ℝ)) + * (1 + ρ * ⨆ j, ‖ω j‖) := by + classical + have hΩ0 : 0 ≤ ⨆ j, ‖ω j‖ := Real.iSup_nonneg (fun j => norm_nonneg _) + have hx : 0 ≤ ρ * ⨆ j, ‖ω j‖ := mul_nonneg hρ hΩ0 + have hcast : (∑ z ∈ S, (analyticOrderNatAt + (fun w : ℂ => ∑ j, ∑ i : Fin (q j), b j i * w ^ (i : ℕ) * Complex.exp (ω j * w)) z : ℝ)) + = ((∑ z ∈ S, analyticOrderNatAt + (fun w : ℂ => ∑ j, ∑ i : Fin (q j), + b j i * w ^ (i : ℕ) * Complex.exp (ω j * w)) z : ℕ) : ℝ) := by + push_cast; rfl + by_cases hdeg : (∑ j, q j) ≤ 1 ∨ (⨆ j, ‖ω j‖) = 0 + · have h1 := zero_count_degenerate q ω hω b hb S hdeg + rw [hcast] + exact zero_count_arith_poly (∑ j, q j) (ρ * ⨆ j, ‖ω j‖) lam hx hlam _ h1 + · push Not at hdeg + obtain ⟨hn, hΩ⟩ := hdeg + have hΩpos : 0 < ⨆ j, ‖ω j‖ := lt_of_le_of_ne hΩ0 (Ne.symm hΩ) + have h2 := expPoly_zero_count_scaled q ω hω b hb z₀ ρ hρ S hS hΩpos + exact zero_count_arith (∑ j, q j) (by omega) (ρ * ⨆ j, ‖ω j‖) lam hx hlam _ + (Finset.sum_nonneg (fun z _ => Nat.cast_nonneg _)) h2 + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExpPolyZeroCountScaled.lean b/LeanPool/FourExponentials/ExpPolyZeroCountScaled.lean new file mode 100644 index 0000000000..083d473a4a --- /dev/null +++ b/LeanPool/FourExponentials/ExpPolyZeroCountScaled.lean @@ -0,0 +1,240 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.CauchyEstimateWithZeros +public import LeanPool.FourExponentials.ExpPolyNeZero +public import LeanPool.FourExponentials.ExpPolyValueLeDerivs +public import Mathlib.AlgebraicTopology.FundamentalGroupoid.SimplyConnected +public import Mathlib.Analysis.Convex.Contractible +public import Mathlib.Order.Filter.Defs +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.FunProp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.LinearCombination +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Push +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set +public import Mathlib.Topology.Separation.CompletelyRegular + +/-! +# The rescaled inequality + +Let $f(z)=\sum_{j=1}^{l}\sum_{i0$. Let +$z_0\in\mathbb{C}$, $\rho\ge0$, let $S$ be a finite set of points of the disc $|z-z_0|\le\rho$, and +put $\sigma=\sum_{z\in S}\operatorname{ord}_zf$ and $x=\rho\Omega$. Then for every $R>x+1$ +$$ \sigma\log\frac{R-x}{x+1} \le\log\Bigl(n!\,2^{n+1}\frac{R}{R-1}\Bigr)+2R. $$ + +Source: [Wal71, §4, (4.14)] and the rescaling that follows it. + +## References + +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. + +From `Diaz/Mirror/expPoly_zero_count_scaled.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.expPoly_zero_count_scaled`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Finset Polynomial + +/-- **The rescaled inequality.** Let $f(z)=\sum_{j=1}^{l}\sum_{i0$. Let $z_0\in\mathbb{C}$, $\rho\ge0$, let $S$ be a +finite set of points of the disc $|z-z_0|\le\rho$, and put $\sigma=\sum_{z\in +S}\operatorname{ord}_zf$ and $x=\rho\Omega$. Then for every $R>x+1$ +$$ \sigma\log\frac{R-x}{x+1} \le\log\Bigl(n!\,2^{n+1}\frac{R}{R-1}\Bigr)+2R. $$ -/ +theorem expPoly_zero_count_scaled + {l : ℕ} (q : Fin l → ℕ) (ω : Fin l → ℂ) (hω : Function.Injective ω) + (b : (j : Fin l) → Fin (q j) → ℂ) (hb : ∃ j i, b j i ≠ 0) + (z₀ : ℂ) (ρ : ℝ) (hρ : 0 ≤ ρ) (S : Finset ℂ) (hS : ∀ z ∈ S, ‖z - z₀‖ ≤ ρ) + (hΩ : 0 < ⨆ j, ‖ω j‖) : + ∀ R : ℝ, ρ * (⨆ j, ‖ω j‖) + 1 < R → + (∑ z ∈ S, (analyticOrderNatAt (fun w : ℂ => ∑ j, ∑ i : Fin (q j), + b j i * w ^ (i : ℕ) * Complex.exp (ω j * w)) z : ℝ)) + * Real.log ((R - ρ * (⨆ j, ‖ω j‖)) / (ρ * (⨆ j, ‖ω j‖) + 1)) + ≤ Real.log (((∑ j, q j).factorial : ℝ) * 2 ^ ((∑ j, q j) + 1) * R / (R - 1)) + 2 * R := by + classical + intro R hR + set Ω : ℝ := ⨆ j, ‖ω j‖ with hΩdef + set n : ℕ := ∑ j, q j with hndef + set f : ℂ → ℂ := fun w : ℂ => ∑ j, ∑ i : Fin (q j), b j i * w ^ (i : ℕ) * Complex.exp (ω j * w) + with hfdef + set x : ℝ := ρ * Ω with hxdef + have hx0 : 0 ≤ x := mul_nonneg hρ hΩ.le + have hR1 : 1 < R := by linarith + have hR0 : 0 < R := by linarith + have hRx : x < R := by linarith + have hΩc : (Ω : ℂ) ≠ 0 := by exact_mod_cast hΩ.ne' + obtain ⟨j₀, i₀, hb₀⟩ := hb + have hn1 : 1 ≤ n := by + have h1 : 1 ≤ q j₀ := by have := i₀.isLt; omega + exact h1.trans (Finset.single_le_sum (fun j _ => Nat.zero_le _) (Finset.mem_univ j₀)) + -- `f` is entire + have hfdiff : Differentiable ℂ f := by rw [hfdef]; fun_prop + -- the rescaled function `G y = f (z₀ + y / Ω)`, written as an exponential polynomial + let w : Fin l → ℂ := fun j => ω j / Ω + let P : Fin l → ℂ[X] := fun j => + ∑ i : Fin (q j), C (b j i * Complex.exp (ω j * z₀)) * (C z₀ + C ((Ω : ℂ)⁻¹) * X) ^ (i : ℕ) + let G : ℂ → ℂ := fun y => ∑ j, (P j).eval y * Complex.exp (w j * y) + have hG : ∀ y, G y = f (z₀ + y / Ω) := by + intro y + simp only [G, P, w, hfdef, eval_finsetSum, eval_mul, eval_C, eval_pow, eval_add, eval_X, + Finset.sum_mul] + refine Finset.sum_congr rfl (fun j _ => Finset.sum_congr rfl (fun i _ => ?_)) + rw [show ω j * (z₀ + y / Ω) = ω j * z₀ + ω j / Ω * y by ring, Complex.exp_add] + ring + have hGdiff : Differentiable ℂ G := by + have : G = fun y => f (z₀ + y / Ω) := funext hG + rw [this] + exact hfdiff.comp ((differentiable_id.div_const _).const_add z₀) + -- hypotheses of the lower bound + have hw : Function.Injective w := fun a c h => hω ((div_left_inj₀ hΩc).mp h) + have hwle : ∀ j, ‖w j‖ ≤ 1 := by + intro j + have hj : ‖ω j‖ ≤ Ω := le_ciSup (f := fun j => ‖ω j‖) (Finite.bddAbove_range _) j + simp only [w, norm_div, Complex.norm_real, Real.norm_eq_abs, abs_of_pos hΩ] + exact (div_le_one hΩ).mpr hj + have hP : ∀ j, P j = 0 ∨ (P j).natDegree < q j := by + intro j + by_cases hq : q j = 0 + · left + exact Finset.sum_eq_zero (fun i _ => by have hi : (i : ℕ) < q j := i.isLt; omega) + · right + have hlin : (C z₀ + C ((Ω : ℂ)⁻¹) * X).natDegree ≤ 1 := + (natDegree_add_le _ _).trans (max_le (by simp) ((natDegree_C_mul_le _ _).trans (by simp))) + have : (P j).natDegree ≤ q j - 1 := by + apply natDegree_sum_le_of_forall_le + intro i _ + refine (natDegree_C_mul_le _ _).trans ((natDegree_pow_le).trans ?_) + have hi : (i : ℕ) < q j := i.isLt + calc (i : ℕ) * (C z₀ + C ((Ω : ℂ)⁻¹) * X).natDegree ≤ (i : ℕ) * 1 := + Nat.mul_le_mul_left _ hlin + _ ≤ q j - 1 := by omega + omega + -- orders transfer along `y ↦ z₀ + y / Ω` + have hφd : ∀ y : ℂ, HasDerivAt (fun y : ℂ => z₀ + y / Ω) ((Ω : ℂ)⁻¹) y := by + intro y + simpa [div_eq_mul_inv] using ((hasDerivAt_id y).mul_const ((Ω : ℂ)⁻¹)).const_add z₀ + have hord : ∀ z, analyticOrderNatAt G ((Ω : ℂ) * (z - z₀)) = analyticOrderNatAt f z := by + intro z + have hcomp : G = f ∘ fun y : ℂ => z₀ + y / Ω := funext hG + have han : AnalyticAt ℂ (fun y : ℂ => z₀ + y / Ω) ((Ω : ℂ) * (z - z₀)) := + ((differentiable_id.div_const _).const_add z₀).analyticAt _ + have := analyticOrderAt_comp_of_deriv_ne_zero (f := f) han + (by rw [(hφd _).deriv]; exact inv_ne_zero hΩc) + unfold analyticOrderNatAt + rw [hcomp, this] + congr 2 + field_simp + ring + let S' : Finset ℂ := S.image (fun z => (Ω : ℂ) * (z - z₀)) + have hinj : Set.InjOn (fun z => (Ω : ℂ) * (z - z₀)) ↑S := by + intro a _ c _ h + have := mul_left_cancel₀ hΩc h + linear_combination this + have hsum : ∑ z ∈ S', analyticOrderNatAt G z = ∑ z ∈ S, analyticOrderNatAt f z := by + rw [Finset.sum_image hinj] + exact Finset.sum_congr rfl (fun z _ => hord z) + have hS' : ∀ z ∈ S', ‖z - 0‖ ≤ x := by + intro z hz + obtain ⟨y, hy, rfl⟩ := Finset.mem_image.mp hz + rw [sub_zero, norm_mul, Complex.norm_real, Real.norm_eq_abs, abs_of_pos hΩ, hxdef, mul_comm ρ] + exact mul_le_mul_of_nonneg_left (hS y hy) hΩ.le + -- the maximum of `|G|` on the circle of radius `R` + obtain ⟨u₀, hu₀, hmax⟩ := (isCompact_sphere (0 : ℂ) R).exists_isMaxOn + (NormedSpace.sphere_nonempty.mpr hR0.le) hGdiff.continuous.norm.continuousOn + set M : ℝ := ‖G u₀‖ with hMdef + have hM : ∀ z : ℂ, ‖z - 0‖ = R → ‖G z‖ ≤ M := by + intro z hz + exact hmax (by simpa [mem_sphere_iff_norm] using hz) + have hMpos : 0 < M := by + by_contra hle + push Not at hle + have hball : ∀ z ∈ Metric.ball (0 : ℂ) R, G z = 0 := by + intro z hz + have := Complex.norm_le_of_forall_mem_frontier_norm_le Metric.isBounded_ball + hGdiff.diffContOnCl (C := M) + (fun y hy => hM y + (by rw [frontier_ball _ hR0.ne'] at hy; simpa [mem_sphere_iff_norm] using hy)) + (subset_closure hz) + exact norm_le_zero_iff.mp (this.trans hle) + have hev : G =ᶠ[nhds 0] 0 := by + filter_upwards [Metric.ball_mem_nhds (0 : ℂ) hR0] with z hz + simpa using hball z hz + have hzero := AnalyticOnNhd.eqOn_zero_of_preconnected_of_eventuallyEq_zero + (fun u _ => hGdiff.analyticAt u) isPreconnected_univ (Set.mem_univ 0) hev + obtain ⟨v, hv⟩ := expPoly_ne_zero q ω hω b ⟨j₀, i₀, hb₀⟩ + apply hv + have h1 := hzero (Set.mem_univ ((Ω : ℂ) * (v - z₀))) + rw [Pi.zero_apply, hG] at h1 + have : z₀ + (Ω : ℂ) * (v - z₀) / Ω = v := by field_simp; ring + rw [this] at h1 + exact h1 + -- Cauchy with zeros, for each derivative of order below `n` + set σ : ℕ := ∑ z ∈ S', analyticOrderNatAt G z with hσdef + set r : ℝ := (x + 1) / (R - x) with hrdef + have hrpos : 0 < r := div_pos (by linarith) (by linarith) + have hRR : 0 < R / (R - 1) := div_pos hR0 (by linarith) + set D : ℝ := ((n - 1).factorial : ℝ) * (R / (R - 1)) * r ^ σ * M with hDdef + have hD : ∀ s : ℕ, s < n → ‖iteratedDeriv s G 0‖ ≤ D := by + intro s hs + have h1 := cauchy_estimate_with_zeros G hGdiff 0 x R M hx0 (by linarith) S' hS' hM s + have hfac : (s.factorial : ℝ) ≤ ((n - 1).factorial : ℝ) := by + exact_mod_cast Nat.factorial_le (by omega) + calc ‖iteratedDeriv s G 0‖ ≤ (s.factorial : ℝ) * (R / (R - 1)) * r ^ σ * M := h1 + _ ≤ D := by + rw [hDdef] + gcongr + -- the interpolation lower bound at the maximum point + have h2 := expPoly_value_le_derivs q w hw P hP 1 R D zero_le_one hwle hR0.le hD u₀ + (by simpa [mem_sphere_iff_norm] using hu₀.le) + have h2' : M ≤ ((n.factorial : ℝ) * 2 ^ (n + 1) * (R / (R - 1)) * Real.exp (2 * R)) * r ^ σ * M := + by + have hnf : (n : ℝ) * ((n - 1).factorial : ℝ) = (n.factorial : ℝ) := by + have : n * (n - 1).factorial = n.factorial := Nat.mul_factorial_pred (by omega) + exact_mod_cast this + calc M = ‖∑ j, (P j).eval u₀ * Complex.exp (w j * u₀)‖ := rfl + _ ≤ ((∑ j, q j : ℕ) : ℝ) * (1 + 1) ^ ((∑ j, q j) + 1) * Real.exp (R * (1 + 1)) * D := h2 + _ = ((n : ℝ) * ((n - 1).factorial : ℝ)) * 2 ^ (n + 1) * (R / (R - 1)) * Real.exp (2 * R) + * r ^ σ * M := by + rw [hDdef, hndef]; ring_nf + _ = _ := by rw [hnf] + have hK : 1 ≤ ((n.factorial : ℝ) * 2 ^ (n + 1) * (R / (R - 1)) * Real.exp (2 * R)) * r ^ σ := by + by_contra hlt + push Not at hlt + have := mul_lt_mul_of_pos_right hlt hMpos + linarith + -- take logarithms + have hfpos : (0 : ℝ) < (n.factorial : ℝ) * 2 ^ (n + 1) * R / (R - 1) := by + have : (0 : ℝ) < n.factorial := by exact_mod_cast Nat.factorial_pos n + have : (0 : ℝ) < R - 1 := by linarith + positivity + have hlog := Real.log_le_log one_pos hK + rw [Real.log_one, Real.log_mul (by positivity) (by positivity), Real.log_pow, + Real.log_mul (by positivity) (Real.exp_pos _).ne', Real.log_exp] at hlog + have hlr : Real.log r = - Real.log ((R - x) / (x + 1)) := by + rw [hrdef, ← Real.log_inv, inv_div] + have hsigma : (∑ z ∈ S, (analyticOrderNatAt f z : ℝ)) = (σ : ℝ) := by + rw [hsum]; push_cast; rfl + rw [hsigma] + have hKeq : (n.factorial : ℝ) * 2 ^ (n + 1) * (R / (R - 1)) = (n.factorial : ℝ) * 2 ^ (n + 1) * R + / (R - 1) := by + ring + rw [hKeq] at hlog + rw [hlr] at hlog + linarith + +end FourExponentials diff --git a/LeanPool/FourExponentials/Extrapolation.lean b/LeanPool/FourExponentials/Extrapolation.lean new file mode 100644 index 0000000000..b88197df7b --- /dev/null +++ b/LeanPool/FourExponentials/Extrapolation.lean @@ -0,0 +1,157 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExpPolyGridEstimate +public import LeanPool.FourExponentials.ExtrapolationNumbers +public import Mathlib.Tactic.FinCases +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# Extrapolation + +Let $x_1,x_2\in\mathbb{C}$, let $y_1,y_2$ be linearly independent over $\mathbb{Q}$, and let +$\kappa>0$. There are $\kappa'>0$ and $N_0$ such that for every $N>N_0$ and all coefficients with +$|c(i,j,h)|\le e^{\kappa N^{2}\sqrt{\log N}}$: if $F^{(m)}(ay_1+by_2)=0$ for all $a0$. There are $\kappa'>0$ and $N_0$ such that for every $N>N_0$ and +all coefficients with $|c(i,j,h)|\le e^{\kappa N^{2}\sqrt{\log N}}$: if $F^{(m)}(ay_1+by_2)=0$ for +all $a ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + c i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k' : ℕ) : ℂ) * x₂) * + z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂) = 0) → + ∀ s : ℕ, s < ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ / 2 → ∀ a b : ℕ, + a < 14 * ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ → b < 14 * ⌊(N : ℝ) * + Real.sqrt (Real.log (N : ℝ))⌋₊ → + ‖iteratedDeriv s (fun z : ℂ => ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + c i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k' : ℕ) : ℂ) * x₂) * + z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂)‖ + ≤ Real.exp (-(((N : ℝ) ^ 4 * Real.sqrt (Real.log (N : ℝ))) / κ')) := by + set X := ‖x₁‖ + ‖x₂‖ with hX + set Y : ℝ := 2 * (14 * (‖y₁‖ + ‖y₂‖) + 1) with hY + have hX0 : 0 ≤ X := by positivity + have hY1 : 1 ≤ Y := by rw [hY]; nlinarith [norm_nonneg y₁, norm_nonneg y₂] + refine ⟨32, by norm_num, ⌈32 * (13 + κ + Real.log Y + 2 * X * Y)⌉₊, fun N hN => ?_⟩ + have hbig : 32 * (13 + κ + Real.log Y + 2 * X * Y) ≤ N := + (Nat.le_ceil _).trans (by exact_mod_cast hN.le) + have hNr : (416 : ℝ) ≤ N := by + nlinarith [Real.log_nonneg hY1, mul_nonneg hX0 (by linarith : (0 : ℝ) ≤ Y)] + -- the scale `q = √(log N)` and the three floors + have hL1 : 1 ≤ Real.log N := by + rw [Real.le_log_iff_exp_le (by positivity)]; linarith [Real.exp_one_lt_d9] + have hLN : Real.log N ≤ N := by linarith [Real.log_le_sub_one_of_pos (by linarith : (0 : ℝ) < N)] + set q := Real.sqrt (Real.log (N : ℝ)) with hq + have hq1 : 1 ≤ q := Real.one_le_sqrt.2 hL1 + have hqq : q * q = Real.log N := Real.mul_self_sqrt (by linarith) + have hqN : q ≤ N := by nlinarith + have hqpos : 0 < q := by linarith + set S := ⌊(N : ℝ) ^ 2 / q⌋₊ with hS + set t₁ := ⌊(N : ℝ) / q⌋₊ with ht₁ + set t₂ := ⌊(N : ℝ) * q⌋₊ with ht₂ + have half : ∀ z : ℝ, 1 ≤ z → z ≤ 2 * ⌊z⌋₊ := fun z hz => by + have := Nat.lt_floor_add_one z + have : (1 : ℝ) ≤ ⌊z⌋₊ := by exact_mod_cast (Nat.one_le_floor_iff z).2 hz + linarith + have hSu : (S : ℝ) * q ≤ (N : ℝ) ^ 2 := by + rw [← le_div_iff₀ hqpos]; exact Nat.floor_le (by positivity) + have hSl : (N : ℝ) ^ 2 ≤ 2 * (S * q) := by + have := half ((N : ℝ) ^ 2 / q) ((one_le_div hqpos).2 (by nlinarith)) + rw [← hS, div_le_iff₀ hqpos] at this; linarith + have h1l : (N : ℝ) ≤ 2 * (t₁ * q) := by + have := half ((N : ℝ) / q) ((one_le_div hqpos).2 hqN) + rw [← ht₁, div_le_iff₀ hqpos] at this; linarith + have h2l : (N : ℝ) * q ≤ 2 * t₂ := half ((N : ℝ) * q) (by nlinarith) + have h1u : (t₁ : ℝ) ≤ N * q := + (Nat.floor_le (by positivity)).trans ((div_le_self (by positivity) hq1).trans (by nlinarith)) + have h2u : (t₂ : ℝ) ≤ N * q := Nat.floor_le (by positivity) + intro c hc hvan s hs a b ha hb + -- the grid estimate, on the grid `a' y₁ + b' y₂` (`a' < t₁`, `b' < t₂`) with `u = N` + have key := Transcendence.expPoly_grid_estimate ![y₁, y₂] hy + (Finset.univ : Finset (Fin S × Fin (2 * N) × Fin (2 * N))) (fun p => c p.1 p.2.1 p.2.2) + (fun p => ((p.2.1 : ℕ) : ℂ) * x₁ + ((p.2.2 : ℕ) : ℂ) * x₂) (fun p => (p.1 : ℕ)) + (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + c i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) + (fun z => by simp only [Fintype.sum_prod_type]) (2 * N * X) S + (fun p _ => ?_) (fun p _ => p.1.2.le) ![t₁, t₂] ![14 * t₁, 14 * t₂] + (fun j => by fin_cases j <;> simp <;> omega) S (fun m hm i hi => ?_) N (Y * ((N : ℝ) ^ 2 * q)) + (by linarith) ?_ ![a, b] (fun j => by fin_cases j <;> simpa) s + · simp only [Fin.sum_univ_two, Fin.prod_univ_two, Matrix.cons_val_zero, + Matrix.cons_val_one] at key + have hcsum : ∑ p : Fin S × Fin (2 * N) × Fin (2 * N), ‖c p.1 p.2.1 p.2.2‖ + ≤ S * (2 * N) * (2 * N) * Real.exp (κ * ((N : ℝ) ^ 2 * q)) := by + refine (Finset.sum_le_card_nsmul _ _ _ fun p _ => hc _ _ _).trans_eq ?_ + simp [Finset.card_univ, Fintype.card_prod, Fintype.card_fin]; ring + refine key.trans (le_trans ?_ (extrapolation_numbers X Y κ hX0 hY1 hκ.le + N S t₁ t₂ s hbig (by omega) hSu hSl h1l h2l)) + have : (0 : ℝ) ≤ 1 / ((N : ℝ) - 1) := div_nonneg zero_le_one (by linarith) + gcongr + · refine (norm_add_le _ _).trans ?_ + rw [norm_mul, norm_mul, Complex.norm_natCast, Complex.norm_natCast, hX] + have h1 : ((p.2.1 : ℕ) : ℝ) ≤ 2 * N := by exact_mod_cast p.2.1.2.le + have h2 : ((p.2.2 : ℕ) : ℝ) ≤ 2 * N := by exact_mod_cast p.2.2.2.le + nlinarith [norm_nonneg x₁, norm_nonneg x₂] + · simp only [Fin.sum_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one] + exact hvan (m 0) (m 1) i (by simpa using hm 0) (by simpa using hm 1) hi + · simp only [Fin.sum_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one] + push_cast + have e1 : 14 * (t₁ : ℝ) * ‖y₁‖ + 14 * t₂ * ‖y₂‖ + 1 ≤ (14 * (‖y₁‖ + ‖y₂‖) + 1) * (N * q) := by + nlinarith [mul_le_mul_of_nonneg_right h1u (norm_nonneg y₁), + mul_le_mul_of_nonneg_right h2u (norm_nonneg y₂)] + calc _ ≤ (14 * (‖y₁‖ + ‖y₂‖) + 1) * (N * q) * (2 * N) := + mul_le_mul e1 (by linarith) (by positivity) (by positivity) + _ = Y * ((N : ℝ) ^ 2 * q) := by rw [hY]; ring + +end FourExponentials diff --git a/LeanPool/FourExponentials/ExtrapolationNumbers.lean b/LeanPool/FourExponentials/ExtrapolationNumbers.lean new file mode 100644 index 0000000000..e945463df0 --- /dev/null +++ b/LeanPool/FourExponentials/ExtrapolationNumbers.lean @@ -0,0 +1,146 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.Complex.ExponentialBounds +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.LinearCombination +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# The numerical inequality of the extrapolation step + +Put `L = log N`, `q = √L`, `A = N² q` and `U = N³ q`; the hypothesis on `N` gives `N ≥ 416`, so +`L ≥ 1` and `A ≤ U`. The zero factor is small: `t₁ t₂ S ≥ N⁴ / (8 q)` and `log (N - 1) ≥ L / 2`, +so `(N - 1)^(-t₁ t₂ S) ≤ e^(-N U / 16)`. Every other factor is at most an exponential: +`s! ≤ S^S ≤ e^(2 A)`, `2 ≤ e`, `S (2N)² ≤ 4 N⁴ ≤ e^(7 U)`, the factor `e^(κ A)`, +`(Y A)^S ≤ e^((log Y + 3) A)` and `e^(2 N X Y A) = e^(2 X Y U)`. With `A ≤ U` and `U ≥ 1` the +total exponent is at most `-N U / 16 + (13 + κ + log Y + 2 X Y) U ≤ -N U / 32 = -N⁴ q / 32`. + +From `Diaz/Mirror/extrapolation_numbers.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.extrapolation_numbers`. +-/ + +@[expose] public section + +namespace FourExponentials + +/-- **The numbers of the extrapolation.** Let $X\ge0$, $Y\ge1$ and $\kappa\ge0$ be real, and let +$N,S,t_1,t_2,s$ be natural numbers with $s\le S$ and $N\ge32(13+\kappa+\log Y+2XY)$. Write +$w=\sqrt{\log N}$ and suppose $Sw\le N^{2}\le2Sw$, $N\le2t_1w$ and $Nw\le2t_2$. Then +$$ 2\,s!\,(N-1)^{-t_1t_2S}\cdot S(2N)^{2}e^{\kappa N^{2}w}\,(YN^{2}w)^{S}\,e^{2NX\cdot YN^{2}w}\le +e^{-N^{4}w/32}. $$ -/ +theorem extrapolation_numbers (X Y κ : ℝ) (hX : 0 ≤ X) (hY : 1 ≤ Y) (hκ : 0 ≤ κ) + (N S t₁ t₂ s : ℕ) (hbig : 32 * (13 + κ + Real.log Y + 2 * X * Y) ≤ N) (hs : s ≤ S) + (hSu : (S : ℝ) * Real.sqrt (Real.log N) ≤ (N : ℝ) ^ 2) + (hSl : (N : ℝ) ^ 2 ≤ 2 * (S * Real.sqrt (Real.log N))) + (h₁ : (N : ℝ) ≤ 2 * (t₁ * Real.sqrt (Real.log N))) + (h₂ : (N : ℝ) * Real.sqrt (Real.log N) ≤ 2 * t₂) : + (s.factorial : ℝ) * 2 * (1 / ((N : ℝ) - 1)) ^ (t₁ * t₂ * S) * + (S * (2 * N) * (2 * N) * Real.exp (κ * ((N : ℝ) ^ 2 * Real.sqrt (Real.log N))) * + (Y * ((N : ℝ) ^ 2 * Real.sqrt (Real.log N))) ^ S * + Real.exp (2 * N * X * (Y * ((N : ℝ) ^ 2 * Real.sqrt (Real.log N))))) + ≤ Real.exp (-((N : ℝ) ^ 4 * Real.sqrt (Real.log N) / 32)) := by + -- the scale: `N ≥ 416`, `L = log N ≥ 1`, `q = √L`, `A = N² q`, `U = N³ q` + have hlogY : 0 ≤ Real.log Y := Real.log_nonneg hY + have hXY : 0 ≤ 2 * X * Y := by positivity + have hNr : (416 : ℝ) ≤ N := by linarith + have hL1 : 1 ≤ Real.log N := by + rw [Real.le_log_iff_exp_le (by positivity)]; linarith [Real.exp_one_lt_d9] + have hLN : Real.log N ≤ N := by linarith [Real.log_le_sub_one_of_pos (by linarith : (0 : ℝ) < N)] + have hLN1 : Real.log N / 2 ≤ Real.log ((N : ℝ) - 1) := by + have := Real.log_le_log (by positivity) (by nlinarith : (N : ℝ) ≤ ((N : ℝ) - 1) ^ 2) + rw [Real.log_pow] at this; push_cast at this; linarith + set L := Real.log N with hLdef + set q := Real.sqrt L with hqdef + have hq1 : 1 ≤ q := Real.one_le_sqrt.2 hL1 + have hqq : q * q = L := Real.mul_self_sqrt (by linarith) + have hqN : q ≤ N := by linarith [le_mul_of_one_le_left (by linarith : (0 : ℝ) ≤ q) hq1] + set A := (N : ℝ) ^ 2 * q with hA + set U := (N : ℝ) ^ 3 * q with hU + have hN2 : (N : ℝ) ^ 2 ≤ (N : ℝ) ^ 3 := pow_le_pow_right₀ (by linarith) (by norm_num) + have hAU : A ≤ U := mul_le_mul_of_nonneg_right hN2 (by linarith) + have hN2A : (N : ℝ) ^ 2 ≤ A := le_mul_of_one_le_right (by positivity) hq1 + have hLU : L ≤ U := hLN.trans (by nlinarith) + have hU1 : 1 ≤ U := hL1.trans hLU + have hS0 : (1 : ℝ) ≤ S := by + rcases Nat.eq_zero_or_pos S with h | h + · rw [h, Nat.cast_zero, zero_mul, mul_zero] at hSl; nlinarith + · exact_mod_cast h + have hS1 : 1 ≤ S := by exact_mod_cast hS0 + have hSN : (S : ℝ) ≤ N ^ 2 := (le_mul_of_one_le_right (by linarith) hq1).trans hSu + have hSL : (S : ℝ) * L ≤ q * N ^ 2 := by + rw [← hqq]; linarith [mul_le_mul_of_nonneg_left hSu (by linarith : (0 : ℝ) ≤ q)] + -- (1) `s! ≤ S ^ S ≤ exp (2 A)` + have e1 : (s.factorial : ℝ) ≤ Real.exp (2 * A) := by + have hnat : s.factorial ≤ S ^ S := + (Nat.factorial_le_pow s).trans ((Nat.pow_le_pow_left hs s).trans (Nat.pow_le_pow_right hS1 + hs)) + refine (show (s.factorial : ℝ) ≤ (S : ℝ) ^ S by exact_mod_cast hnat).trans ?_ + rw [← Real.exp_log (by linarith : (0 : ℝ) < S), ← Real.exp_nat_mul] + have := Real.log_le_log (by linarith) hSN + rw [Real.log_pow] at this; push_cast at this + refine Real.exp_le_exp.2 ?_ + linarith [mul_le_mul_of_nonneg_left this (by linarith : (0 : ℝ) ≤ S)] + -- (2) the zero factor: `t₁ t₂ S ≥ N⁴ / (8 q)` and `log (N - 1) ≥ q² / 2` + have e2 : (1 / ((N : ℝ) - 1)) ^ (t₁ * t₂ * S) ≤ Real.exp (-(N * U / 16)) := by + rw [one_div, ← Real.exp_log (by linarith : (0 : ℝ) < N - 1), ← Real.exp_neg, ← Real.exp_nat_mul] + refine Real.exp_le_exp.2 ?_ + have f1 : (N : ℝ) * (N * q) ≤ (2 * (t₁ * q)) * (2 * t₂) := + mul_le_mul h₁ h₂ (by positivity) (by positivity) + have f2 := mul_le_mul f1 hSl (by positivity) (by positivity) + have g := mul_le_mul_of_nonneg_left hLN1 (Nat.cast_nonneg (α := ℝ) (t₁ * t₂ * S)) + push_cast at g ⊢ + rw [hU]; linear_combination g + f2 / 16 + ((t₁ : ℝ) * t₂ * S / 2) * hqq + -- (3) the remaining factors, each at most `exp (const * U)` + have e3 : (S : ℝ) * (2 * N) * (2 * N) ≤ Real.exp (7 * U) := by + have h4 : (S : ℝ) * (2 * N) * (2 * N) ≤ 4 * (N : ℝ) ^ 4 := by + linear_combination (4 * (N : ℝ) ^ 2) * hSN + refine h4.trans ?_ + rw [show (4 : ℝ) * (N : ℝ) ^ 4 = Real.exp (Real.log 4 + 4 * L) by + rw [Real.exp_add, Real.exp_log (by norm_num), hLdef, ← Real.log_rpow (by positivity), + Real.exp_log (by positivity)]; norm_cast] + have : Real.log 4 ≤ 3 := by linarith [Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 4)] + exact Real.exp_le_exp.2 (by linarith) + have e4 : (Y * A) ^ S ≤ Real.exp ((Real.log Y + 3) * A) := by + rw [← Real.exp_log (by positivity : (0 : ℝ) < Y * A), ← Real.exp_nat_mul] + refine Real.exp_le_exp.2 ?_ + have hA3 : Real.log A ≤ 3 * L := by + have := Real.log_le_log (by positivity) (show A ≤ (N : ℝ) ^ 3 by + rw [hA]; exact (mul_le_mul_of_nonneg_left hqN (by positivity)).trans_eq (by ring)) + rwa [Real.log_pow] at this + rw [Real.log_mul (by positivity) (by positivity)] + have f1 := mul_le_mul_of_nonneg_right (hSN.trans hN2A) hlogY + have f2 := mul_le_mul_of_nonneg_left hA3 (by linarith : (0 : ℝ) ≤ S) + rw [hA] at f1 ⊢ + linear_combination f1 + f2 + 3 * hSL + have e5 : 2 * N * X * (Y * A) = 2 * X * Y * U := by rw [hA, hU]; ring + calc _ ≤ Real.exp (2 * A) * Real.exp 1 * Real.exp (-(N * U / 16)) * + (Real.exp (7 * U) * Real.exp (κ * A) * Real.exp ((Real.log Y + 3) * A) * + Real.exp (2 * X * Y * U)) := by + rw [← e5] + gcongr + · exact pow_nonneg (div_nonneg zero_le_one (by linarith)) _ + · linarith [Real.add_one_le_exp 1] + _ = Real.exp (2 * A + 1 + -(N * U / 16) + (7 * U + κ * A + (Real.log Y + 3) * A + 2 * X * Y * + U)) := by + simp only [Real.exp_add] + _ ≤ Real.exp (-((N : ℝ) ^ 4 * q / 32)) := by + refine Real.exp_le_exp.2 ?_ + rw [show (N : ℝ) ^ 4 * q = N * U by rw [hU]; ring] + have k1 := mul_le_mul_of_nonneg_right hbig (by linarith : (0 : ℝ) ≤ U) + have k2 := mul_le_mul_of_nonneg_left hAU (by linarith : (0 : ℝ) ≤ 5 + κ + Real.log Y) + linear_combination k1 / 32 + k2 + hU1 + +end FourExponentials diff --git a/LeanPool/FourExponentials/FourExponentialsTrdegOne.lean b/LeanPool/FourExponentials/FourExponentialsTrdegOne.lean new file mode 100644 index 0000000000..62e38c12e4 --- /dev/null +++ b/LeanPool/FourExponentials/FourExponentialsTrdegOne.lean @@ -0,0 +1,81 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.SmallPolynomialsOfCounterexample +public import LeanPool.FourExponentials.TranscendenceCriterion + +/-! +# Four exponentials in transcendence degree one + +Let $l_{11},l_{12},l_{21},l_{22}$ be non-zero logarithms of algebraic numbers with +$$ l_{11}l_{22} =l_{12}l_{21}, +\qquad\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}(l_{11},l_{12},l_{21},l_{22}) \le1. $$ +Then the two rows, or the two columns, of $\begin{pmatrix}l_{11}&l_{12}\\ +l_{21}&l_{22}\end{pmatrix}$ are linearly dependent over $\mathbb{Q}$. Equivalently, if $x_1,x_2$ and +$y_1,y_2$ are pairs of complex numbers linearly independent over $\mathbb{Q}$ and the four products +$x_iy_j$ are logarithms of algebraic numbers, then +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}(x_1,x_2,y_1,y_2)\ge2$. + +Source: Waldschmidt [Wal73, Cor. 4] and Brownawell [Bro74, Cor. 7]; stated in this form as [RW95, +Theorem 1]. + +## References + +* [Bro74] W. D. Brownawell, *The algebraic independence of certain numbers related by the + exponential function*, J. Number Theory 6 (1974), 22–31. +* [RW95] D. Roy and M. Waldschmidt, *Quadratic relations between logarithms of algebraic numbers*, + Proc. Japan Acad. Ser. A 71 (1995), 151–153. +* [Wal73] M. Waldschmidt, *Solution du huitième problème de Schneider*, J. Number Theory 5 (1973), + 191–202. + +From `Diaz/Mirror/four_exponentials_trdeg_one.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `DiazModulus.four_exponentials_trdeg_one`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Complex ComplexConjugate + +-- Proof by contradiction. If neither the rows nor the columns are ℚ-dependent, the analytic +-- construction `small_polynomials_of_counterexample` produces a transcendental `ω` and +-- integer polynomials that are too small at `ω`; the transcendence criterion +-- `transcendence_criterion` then makes `ω` algebraic. +/-- **Four exponentials in transcendence degree one.** Let $l_{11},l_{12},l_{21},l_{22}$ be non-zero +logarithms of algebraic numbers with +$$ l_{11}l_{22} =l_{12}l_{21}, +\qquad\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}(l_{11},l_{12},l_{21},l_{22}) \le1. $$ +Then the two rows, or the two columns, of $\begin{pmatrix}l_{11}&l_{12}\\ +l_{21}&l_{22}\end{pmatrix}$ are linearly dependent over $\mathbb{Q}$. Equivalently, if $x_1,x_2$ and +$y_1,y_2$ are pairs of complex numbers linearly independent over $\mathbb{Q}$ and the four products +$x_iy_j$ are logarithms of algebraic numbers, then +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}(x_1,x_2,y_1,y_2)\ge2$. -/ +theorem four_exponentials_trdeg_one : + ∀ l₁₁ l₁₂ l₂₁ l₂₂ : ℂ, + IsAlgebraic ℚ (Complex.exp l₁₁) → IsAlgebraic ℚ (Complex.exp l₁₂) → + IsAlgebraic ℚ (Complex.exp l₂₁) → IsAlgebraic ℚ (Complex.exp l₂₂) → + l₁₁ ≠ 0 → l₁₂ ≠ 0 → l₂₁ ≠ 0 → l₂₂ ≠ 0 → + l₁₁ * l₂₂ = l₁₂ * l₂₁ → + Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({l₁₁, l₁₂, l₂₁, l₂₂} : Set ℂ)) ≤ 1 → + (∃ a b : ℚ, ¬(a = 0 ∧ b = 0) ∧ + (a : ℂ) * l₁₁ + (b : ℂ) * l₂₁ = 0 ∧ (a : ℂ) * l₁₂ + (b : ℂ) * l₂₂ = 0) + ∨ (∃ a b : ℚ, ¬(a = 0 ∧ b = 0) ∧ + (a : ℂ) * l₁₁ + (b : ℂ) * l₁₂ = 0 ∧ (a : ℂ) * l₂₁ + (b : ℂ) * l₂₂ = 0) := by + intro l₁₁ l₁₂ l₂₁ l₂₂ e₁₁ e₁₂ e₂₁ e₂₂ n₁₁ n₁₂ n₂₁ n₂₂ hdet htr + by_contra hcon + obtain ⟨hrows, hcols⟩ := not_or.mp hcon + obtain ⟨ω, hω, σ₁, σ₂, hm₁, hm₂, ht₁, ht₂, a₁, a₂, ha₁, ha₂, h₂₁, hg₁, hg₂, hC⟩ := + small_polynomials_of_counterexample l₁₁ l₁₂ l₂₁ l₂₂ e₁₁ e₁₂ e₂₁ e₂₂ + n₁₁ n₁₂ n₂₁ n₂₂ hdet htr hrows hcols + obtain ⟨N₀, P, hP⟩ := hC (max (10 + 1) ((4 + 1) * (a₁ * a₂))) + exact hω (transcendence_criterion ω 1 one_pos σ₁ σ₂ hm₁ hm₂ ht₁ ht₂ a₁ a₂ ha₁ ha₂ + h₂₁ hg₁ hg₂ N₀ P (fun N hN => (hP N hN).1) (fun N hN => (hP N hN).2.1) + (fun N hN => (hP N hN).2.2.1) (fun N hN => (hP N hN).2.2.2)) + +end FourExponentials diff --git a/LeanPool/FourExponentials/HeightDvdLe.lean b/LeanPool/FourExponentials/HeightDvdLe.lean new file mode 100644 index 0000000000..d8cd13ed5e --- /dev/null +++ b/LeanPool/FourExponentials/HeightDvdLe.lean @@ -0,0 +1,158 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Complex.ExponentialBounds +public import Mathlib.Analysis.Polynomial.MahlerMeasure +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.IntervalCases +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# Height of a divisor + +Let $P\in\mathbb{Z}[X]$ be non-zero and let $Q\in\mathbb{Z}[X]$ divide $P$. If every coefficient of +$P$ has absolute value at most $H$, then every coefficient of $Q$ has absolute value at most +$e^{\deg P}H$. + +Source: [Wal71, §3, Lemme 1] (Gel'fond; a generalisation of a lemma of Popken and Koksma). + +## References + +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. + +From `Diaz/Mirror/height_dvd_le.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.height_dvd_le`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Polynomial + +namespace FourExpHeight + +lemma exp_sq_ge_seven : (7 : ℝ) ≤ Real.exp 1 ^ 2 := by + have h := Real.exp_one_gt_d9 + nlinarith + +/-- `d + 1 ≤ (e²/4)^d` for `d ≥ 2`. -/ +lemma succ_le_pow (d : ℕ) (hd : 2 ≤ d) : (d : ℝ) + 1 ≤ (Real.exp 1 ^ 2 / 4) ^ d := by + have h7 := exp_sq_ge_seven + have hq : (7 : ℝ) / 4 ≤ Real.exp 1 ^ 2 / 4 := by linarith + induction d, hd using Nat.le_induction with + | base => + have : ((7 : ℝ) / 4) ^ 2 ≤ (Real.exp 1 ^ 2 / 4) ^ 2 := pow_le_pow_left₀ (by norm_num) hq 2 + push_cast + nlinarith + | succ n hn ih => + have hn' : (2 : ℝ) ≤ n := by exact_mod_cast hn + rw [pow_succ] + push_cast + have hpos : 0 ≤ (Real.exp 1 ^ 2 / 4) ^ n := by positivity + nlinarith + +/-- `√(d+1) ≤ (e/2)^d` for `d ≥ 2`. -/ +lemma sqrt_le_pow (d : ℕ) (hd : 2 ≤ d) : Real.sqrt ((d : ℝ) + 1) ≤ (Real.exp 1 / 2) ^ d := by + have hsq : ((Real.exp 1 / 2) ^ d) ^ 2 = (Real.exp 1 ^ 2 / 4) ^ d := by + rw [← pow_mul, mul_comm, pow_mul]; congr 1; ring + have h := succ_le_pow d hd + rw [← hsq] at h + calc Real.sqrt ((d : ℝ) + 1) ≤ Real.sqrt (((Real.exp 1 / 2) ^ d) ^ 2) := Real.sqrt_le_sqrt h + _ = (Real.exp 1 / 2) ^ d := Real.sqrt_sq (by positivity) + +/-- The numerical factor: `C(δ, i) · √(d+1) ≤ e^d` whenever `δ ≤ d`. -/ +lemma choose_sqrt_le_exp (d δ i : ℕ) (hδ : δ ≤ d) : + ((δ.choose i : ℕ) : ℝ) * Real.sqrt ((d : ℝ) + 1) ≤ Real.exp (d : ℝ) := by + rcases Nat.lt_or_ge d 2 with hd | hd + · have hδ1 : δ ≤ 1 := by omega + have hc : δ.choose i ≤ 1 := + (Nat.choose_le_middle i δ).trans (by interval_cases δ <;> simp) + have hc' : ((δ.choose i : ℕ) : ℝ) ≤ 1 := by exact_mod_cast hc + have hs : Real.sqrt ((d : ℝ) + 1) ≤ Real.exp (d : ℝ) := by + interval_cases d + · simp + · have h2 : Real.sqrt 2 ≤ 3 / 2 := by + rw [Real.sqrt_le_left (by norm_num)]; norm_num + have he := Real.exp_one_gt_d9 + norm_num + linarith + calc ((δ.choose i : ℕ) : ℝ) * Real.sqrt ((d : ℝ) + 1) ≤ 1 * Real.sqrt ((d : ℝ) + 1) := + mul_le_mul_of_nonneg_right hc' (Real.sqrt_nonneg _) + _ ≤ Real.exp (d : ℝ) := by rw [one_mul]; exact hs + · have hc : ((δ.choose i : ℕ) : ℝ) ≤ 2 ^ d := by + have : δ.choose i ≤ 2 ^ d := (Nat.choose_le_two_pow δ i).trans (Nat.pow_le_pow_right (by + norm_num) hδ) + exact_mod_cast this + calc ((δ.choose i : ℕ) : ℝ) * Real.sqrt ((d : ℝ) + 1) ≤ 2 ^ d * (Real.exp 1 / 2) ^ d := + mul_le_mul hc (sqrt_le_pow d hd) (Real.sqrt_nonneg _) (by positivity) + _ = Real.exp 1 ^ d := by rw [← mul_pow]; congr 1; ring + _ = Real.exp (d : ℝ) := by rw [← Real.exp_nat_mul, mul_one] + +end FourExpHeight + +/-- **Height of a divisor.** Let $P\in\mathbb{Z}[X]$ be non-zero and let $Q\in\mathbb{Z}[X]$ divide +$P$. If every coefficient of $P$ has absolute value at most $H$, then every coefficient of $Q$ has +absolute value at most $e^{\deg P}H$. -/ +theorem height_dvd_le + (P Q : Polynomial ℤ) (hP : P ≠ 0) (hQP : Q ∣ P) (H : ℝ) + (hPH : ∀ i : ℕ, |(P.coeff i : ℝ)| ≤ H) : + ∀ i : ℕ, |(Q.coeff i : ℝ)| ≤ Real.exp (P.natDegree : ℝ) * H := by + obtain ⟨R, rfl⟩ := hQP + intro i + have hR : R ≠ 0 := right_ne_zero_of_mul hP + have hH0 : 0 ≤ H := (abs_nonneg _).trans (hPH 0) + set φ : ℤ →+* ℂ := Int.castRingHom ℂ with hφ + have hinj : Function.Injective φ := Int.cast_injective + have hmap : (Q * R).map φ = Q.map φ * R.map φ := Polynomial.map_mul φ + -- `M(R) ≥ 1` + have hRlc : 1 ≤ ‖(R.map φ).leadingCoeff‖ := by + rw [leadingCoeff_map_of_injective hinj] + have h1 : (1 : ℤ) ≤ |R.leadingCoeff| := Int.one_le_abs (leadingCoeff_ne_zero.mpr hR) + simp only [hφ, eq_intCast, Complex.norm_intCast] + exact_mod_cast h1 + have hRM := one_le_mahlerMeasure_of_one_le_norm_leadingCoeff hRlc + -- the coefficient bound through Mahler measure + have h1 := norm_coeff_le_choose_mul_mahlerMeasure_of_one_le_mahlerMeasure i (Q.map φ) (R.map φ) + hRM + have hcoef : ‖(Q.map φ).coeff i‖ = |(Q.coeff i : ℝ)| := by + simp [hφ, coeff_map, Complex.norm_intCast] + have hM := mahlerMeasure_le_sqrt_natDegree_add_one_mul_supNorm (Q.map φ * R.map φ) + have hsup' : ((Q * R).map φ).supNorm ≤ H := by + obtain ⟨j, hj⟩ := ((Q * R).map φ).exists_eq_supNorm + rw [hj, coeff_map] + simp only [hφ, eq_intCast, Complex.norm_intCast] + exact hPH j + have hsup : (Q.map φ * R.map φ).supNorm ≤ H := by + simpa only [hmap] using hsup' + have hdegP : (Q.map φ * R.map φ).natDegree = (Q * R).natDegree := by + rw [← hmap, natDegree_map_eq_of_injective hinj] + have hdegQ : (Q.map φ).natDegree = Q.natDegree := natDegree_map_eq_of_injective hinj Q + have hδ : Q.natDegree ≤ (Q * R).natDegree := natDegree_le_of_dvd (dvd_mul_right Q R) hP + have hfac := FourExpHeight.choose_sqrt_le_exp (Q * R).natDegree Q.natDegree i hδ + rw [← hcoef] + calc ‖(Q.map φ).coeff i‖ + ≤ ((Q.map φ).natDegree.choose i : ℝ) * (Q.map φ * R.map φ).mahlerMeasure := h1 + _ ≤ ((Q.natDegree.choose i : ℕ) : ℝ) * (Real.sqrt (((Q * R).natDegree : ℝ) + 1) * H) := by + rw [hdegQ] + apply mul_le_mul_of_nonneg_left _ (by positivity) + refine hM.trans ?_ + rw [hdegP] + exact mul_le_mul_of_nonneg_left hsup (Real.sqrt_nonneg _) + _ = (((Q.natDegree.choose i : ℕ) : ℝ) * Real.sqrt (((Q * R).natDegree : ℝ) + 1)) * H := by ring + _ ≤ Real.exp ((Q * R).natDegree : ℝ) * H := mul_le_mul_of_nonneg_right hfac hH0 + +end FourExponentials diff --git a/LeanPool/FourExponentials/HermiteLindemann.lean b/LeanPool/FourExponentials/HermiteLindemann.lean new file mode 100644 index 0000000000..f9cebd18ae --- /dev/null +++ b/LeanPool/FourExponentials/HermiteLindemann.lean @@ -0,0 +1,37 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import TauCeti.NumberTheory.Transcendental.Lindemann.Corollaries + +/-! +# Hermite–Lindemann + +The library states the Hermite–Lindemann theorem as `FourExponentials.HermiteLindemannProp` and uses +it as +`FourExponentials.hermite_lindemann_holds`. The proof is Tau Ceti's +`TauCeti.transcendental_exp_of_isAlgebraic`. + +From `Diaz/HermiteLindemann.lean` and `Diaz/Multipliers.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where the theorem is +proved from a port of the Lindemann–Weierstrass development of Mathlib pull request #28013; Tau +Ceti's proof replaces that port here. +-/ + +@[expose] public section + +namespace FourExponentials + +/-- **Hermite–Lindemann**, as the library states it: for non-zero algebraic `a`, `exp a` is +transcendental. -/ +def HermiteLindemannProp : Prop := + ∀ a : ℂ, a ≠ 0 → IsAlgebraic ℚ a → Transcendental ℚ (Complex.exp a) + +/-- **Hermite–Lindemann** (Tau Ceti's `transcendental_exp_of_isAlgebraic`). -/ +theorem hermite_lindemann_holds : HermiteLindemannProp := + fun _ ha0 ha => TauCeti.transcendental_exp_of_isAlgebraic ha ha0 + +end FourExponentials diff --git a/LeanPool/FourExponentials/Imports.lean b/LeanPool/FourExponentials/Imports.lean new file mode 100644 index 0000000000..dde470f3f8 --- /dev/null +++ b/LeanPool/FourExponentials/Imports.lean @@ -0,0 +1,68 @@ +/- +Copyright (c) 2026 Lean Pool contributors. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Lean Pool contributors +-/ +module -- shake: keep-all --deprecated_module: ignore + +-- Generated project imports; run `lake exe mk_all`. +public import LeanPool.FourExponentials +public import LeanPool.FourExponentials.AuxLinearSystem +public import LeanPool.FourExponentials.AuxLinearSystemColumn +public import LeanPool.FourExponentials.AuxiliaryConstruction +public import LeanPool.FourExponentials.AuxiliaryConstructionColumn +public import LeanPool.FourExponentials.AuxiliaryFunctionAlg +public import LeanPool.FourExponentials.AuxiliaryFunctionAlgColumn +public import LeanPool.FourExponentials.CauchyEstimateWithZeros +public import LeanPool.FourExponentials.ConstructionCore1973 +public import LeanPool.FourExponentials.ConstructionCoreColumn +public import LeanPool.FourExponentials.ConstructionCount1973 +public import LeanPool.FourExponentials.ConstructionGrowth +public import LeanPool.FourExponentials.DvdOfSmallValues +public import LeanPool.FourExponentials.DvdOfSmallValuesAtScale +public import LeanPool.FourExponentials.ExistsIntNorm +public import LeanPool.FourExponentials.ExistsIntPowRepr +public import LeanPool.FourExponentials.ExistsIrreducibleFactorCofactorBound +public import LeanPool.FourExponentials.ExistsIteratedDerivPresentation +public import LeanPool.FourExponentials.ExistsIteratedDerivPresentationColumn +public import LeanPool.FourExponentials.ExistsIteratedDerivPresentationOfExpFactor +public import LeanPool.FourExponentials.ExistsIteratedDerivReducedPresentation +public import LeanPool.FourExponentials.ExistsIteratedDerivReducedPresentationColumn +public import LeanPool.FourExponentials.ExistsModByMonicLengthLe +public import LeanPool.FourExponentials.ExistsMonicIntegralModel +public import LeanPool.FourExponentials.ExistsMonicIntegralModelPresentation +public import LeanPool.FourExponentials.ExistsPowMulPowLeExpSqMulSqrtLog +public import LeanPool.FourExponentials.ExpEOrExpESqTranscendental +public import LeanPool.FourExponentials.ExpPolyGridEstimate +public import LeanPool.FourExponentials.ExpPolyIteratedDerivLe +public import LeanPool.FourExponentials.ExpPolyNeZero +public import LeanPool.FourExponentials.ExpPolyValueLeDerivs +public import LeanPool.FourExponentials.ExpPolyZeroCount +public import LeanPool.FourExponentials.ExpPolyZeroCountScaled +public import LeanPool.FourExponentials.Extrapolation +public import LeanPool.FourExponentials.ExtrapolationNumbers +public import LeanPool.FourExponentials.FourExponentialsTrdegOne +public import LeanPool.FourExponentials.HeightDvdLe +public import LeanPool.FourExponentials.HermiteLindemann +public import LeanPool.FourExponentials.IsAlgebraicAdjoinOfNotAlgebraicIndependentPair +public import LeanPool.FourExponentials.LengthMulLe +public import LeanPool.FourExponentials.LengthSumLe +public import LeanPool.FourExponentials.NonvanishingDerivative +public import LeanPool.FourExponentials.NormResultantLeMaxNormEval +public import LeanPool.FourExponentials.NormToPolynomialAlg +public import LeanPool.FourExponentials.NormToPolynomialAlgColumn +public import LeanPool.FourExponentials.RankOneParametrization +public import LeanPool.FourExponentials.SiegelAux +public import LeanPool.FourExponentials.SiegelEntrywise +public import LeanPool.FourExponentials.SmallIrreducibleFactor +public import LeanPool.FourExponentials.SmallPolynomialsOfColumn +public import LeanPool.FourExponentials.SmallPolynomialsOfCounterexample +public import LeanPool.FourExponentials.TranscendenceCriterion +public import LeanPool.FourExponentials.TranscendenceCriterionContinuous +public import LeanPool.FourExponentials.TrdegAdjoinLeOneOfIsAlgebraicAdjoin +public import LeanPool.FourExponentials.TrdegOnePresentation +public import LeanPool.FourExponentials.TrdegOnePresentationColumn +public import LeanPool.FourExponentials.TwoAlgebraicallyIndependentOfExpColumn +public import LeanPool.FourExponentials.ZeroCountArith +public import LeanPool.FourExponentials.ZeroCountArithPoly +public import LeanPool.FourExponentials.ZeroCountDegenerate diff --git a/LeanPool/FourExponentials/IsAlgebraicAdjoinOfNotAlgebraicIndependentPair.lean b/LeanPool/FourExponentials/IsAlgebraicAdjoinOfNotAlgebraicIndependentPair.lean new file mode 100644 index 0000000000..3a6afd3ae1 --- /dev/null +++ b/LeanPool/FourExponentials/IsAlgebraicAdjoinOfNotAlgebraicIndependentPair.lean @@ -0,0 +1,55 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.RingTheory.AlgebraicIndependent.Transcendental +public import Mathlib.Tactic.Convert +public import Mathlib.Tactic.FinCases + +/-! +# Pair dependence: `z` is algebraic over `R[t]` + +Let `t` be transcendental over `R`, so that the one-element family `t` is algebraically +independent. Suppose that `z` is transcendental over `R[t]`. Then the family indexed by +`Option Unit` that sends `none` to `z` and `some ()` to `t` is algebraically independent +(`AlgebraicIndependent.option_iff_transcendental`), and `![t, z]` is that family composed with the +injection `![some (), none]`, hence algebraically independent too. This contradicts the hypothesis. + +From `Diaz/Mirror/isAlgebraic_adjoin_of_not_algebraicIndependent_pair.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.isAlgebraic_adjoin_of_not_algebraicIndependent_pair`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +/-- **A dependent pair.** Let $R$ be a commutative ring, $A$ a commutative $R$-algebra and $t\in A$ +transcendental over $R$. If $t$ and $z\in A$ are not algebraically independent over $R$, then $z$ is +algebraic over the subalgebra $R[t]$. -/ +theorem isAlgebraic_adjoin_of_not_algebraicIndependent_pair {R A : Type*} [CommRing R] + [CommRing A] [Algebra R A] {t z : A} (ht : Transcendental R t) + (h : ¬ AlgebraicIndependent R ![t, z]) : + IsAlgebraic ↥(Algebra.adjoin R ({t} : Set A)) z := by + by_contra hz + apply h + -- `t` alone is algebraically independent + have hind : AlgebraicIndependent R (fun _ : Unit => t) := + (algebraicIndependent_singleton_iff ()).2 ht + -- `z` is transcendental over `R[t]`, so the family `(t, z)` indexed by `Option Unit` is too + have htrans : Transcendental ↥(Algebra.adjoin R (Set.range fun _ : Unit => t)) z := by + rw [Set.range_const] + exact hz + have hopt := (hind.option_iff_transcendental z).2 htrans + -- `![t, z]` is that family along an injection `Fin 2 → Option Unit` + have he : Function.Injective (![some (), none] : Fin 2 → Option Unit) := by + intro i j hij + fin_cases i <;> fin_cases j <;> simp_all + convert hopt.comp _ he using 1 + funext i + fin_cases i <;> rfl + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/LengthMulLe.lean b/LeanPool/FourExponentials/LengthMulLe.lean new file mode 100644 index 0000000000..8b1d00eba3 --- /dev/null +++ b/LeanPool/FourExponentials/LengthMulLe.lean @@ -0,0 +1,113 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Polynomial.Coeff +public import Mathlib.Algebra.Polynomial.Eval.Defs +public import Mathlib.Tactic.SplitIfs + +/-! +# Length of a product + +For all $P,Q\in\mathbb{Z}[X][Y]$, $L(PQ)\le L(P)\,L(Q)$. + +Source: Standard. + +## Proof outline + +For a size function `ν : R → ℕ` on a semiring `R` and `p ∈ R[X]`, let `λ_ν(p) = ∑ₙ ν(pₙ)`, the +sum running over the support of `p`. The length of `P ∈ ℤ[X][Y]` is `λ_{λ_ν}(P)` with `ν = |·|`. + +Suppose `ν(0) = 0`, `ν(a + b) ≤ ν(a) + ν(b)` and `ν(ab) ≤ ν(a)ν(b)`. Then `λ_ν` has the same three +properties. +* Subadditivity holds termwise, once both sides are summed over the union of the two supports. +* For the product, let `p̂ ∈ ℕ[X]` be the polynomial with coefficients `ν(pₙ)`, so that + `λ_ν(p) = p̂(1)`. Since `(pq)ₙ = ∑_{i+j=n} pᵢqⱼ`, we get + `ν((pq)ₙ) ≤ ∑_{i+j=n} ν(pᵢ)ν(qⱼ) = (p̂q̂)ₙ`, and summing over `n`, + `λ_ν(pq) ≤ (p̂q̂)(1) = p̂(1)q̂(1) = λ_ν(p)λ_ν(q)`. + +Starting from `ν = |·|` on `ℤ`, this gives the one-variable statement on `ℤ[X]`; applied again to +`ν = λ_{|·|}` on `ℤ[X]`, it gives the statement on `ℤ[X][Y]`. + +From `Diaz/Mirror/length_mul_le.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.length_mul_le`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace LengthMulLe + +open Polynomial + +variable {R : Type*} [Semiring R] + +/-- The sum of the sizes of the coefficients of `p`. -/ +def lam (ν : R → ℕ) (p : R[X]) : ℕ := + ∑ n ∈ p.support, ν (p.coeff n) + +theorem lam_zero (ν : R → ℕ) : lam ν 0 = 0 := by + rw [lam, support_zero, Finset.sum_empty] + +/-- The sum may run over any finset containing the support. -/ +theorem lam_eq_sum (ν : R → ℕ) (hν : ν 0 = 0) (p : R[X]) {s : Finset ℕ} (hs : p.support ⊆ s) : + lam ν p = ∑ n ∈ s, ν (p.coeff n) := + Finset.sum_subset hs fun n _ hn => by rw [notMem_support_iff.1 hn, hν] + +theorem lam_add_le (ν : R → ℕ) (hν : ν 0 = 0) (hadd : ∀ a b, ν (a + b) ≤ ν a + ν b) + (p q : R[X]) : lam ν (p + q) ≤ lam ν p + lam ν q := by + classical + rw [lam_eq_sum ν hν (p + q) support_add, lam_eq_sum ν hν p Finset.subset_union_left, + lam_eq_sum ν hν q Finset.subset_union_right, ← Finset.sum_add_distrib] + exact Finset.sum_le_sum fun n _ => by + rw [coeff_add] + exact hadd _ _ + +/-- The polynomial with natural coefficients `ν(pₙ)`. -/ +noncomputable def hat (ν : R → ℕ) (p : R[X]) : ℕ[X] := + ∑ n ∈ p.support, monomial n (ν (p.coeff n)) + +theorem coeff_hat (ν : R → ℕ) (hν : ν 0 = 0) (p : R[X]) (n : ℕ) : + (hat ν p).coeff n = ν (p.coeff n) := by + classical + simp only [hat, finsetSum_coeff, coeff_monomial_apply, Finset.sum_ite_eq'] + split_ifs with h + · rfl + · rw [notMem_support_iff.1 h, hν] + +theorem eval_one_hat (ν : R → ℕ) (p : R[X]) : (hat ν p).eval 1 = lam ν p := by + simp only [hat, eval_finsetSum, eval_monomial, one_pow, mul_one, lam] + +theorem lam_mul_le (ν : R → ℕ) (hν : ν 0 = 0) (hadd : ∀ a b, ν (a + b) ≤ ν a + ν b) + (hmul : ∀ a b, ν (a * b) ≤ ν a * ν b) (p q : R[X]) : + lam ν (p * q) ≤ lam ν p * lam ν q := by + rw [← eval_one_hat ν p, ← eval_one_hat ν q, ← eval_mul, eval_eq_sum, sum_def, lam] + simp only [one_pow, mul_one] + calc ∑ n ∈ (p * q).support, ν ((p * q).coeff n) + ≤ ∑ n ∈ (p * q).support, (hat ν p * hat ν q).coeff n := Finset.sum_le_sum fun n _ => ?_ + _ ≤ ∑ n ∈ (hat ν p * hat ν q).support, (hat ν p * hat ν q).coeff n := + Finset.sum_le_sum_of_ne_zero fun n _ hn => mem_support_iff.2 hn + rw [coeff_mul, coeff_mul] + refine (Finset.le_sum_of_subadditive ν hν.le hadd _ _).trans (Finset.sum_le_sum fun x _ => ?_) + rw [coeff_hat ν hν, coeff_hat ν hν] + exact hmul _ _ + +end LengthMulLe + +open LengthMulLe in +/-- **Length of a product.** For all $P,Q\in\mathbb{Z}[X][Y]$, $L(PQ)\le L(P)\,L(Q)$. -/ +theorem length_mul_le (P Q : Polynomial (Polynomial ℤ)) : + ∑ k ∈ (P * Q).support, ∑ i ∈ ((P * Q).coeff k).support, (((P * Q).coeff k).coeff i).natAbs ≤ + (∑ k ∈ P.support, ∑ i ∈ (P.coeff k).support, ((P.coeff k).coeff i).natAbs) * + ∑ k ∈ Q.support, ∑ i ∈ (Q.coeff k).support, ((Q.coeff k).coeff i).natAbs := by + exact lam_mul_le (lam Int.natAbs) (lam_zero Int.natAbs) + (lam_add_le Int.natAbs Int.natAbs_zero Int.natAbs_add_le) + (lam_mul_le Int.natAbs Int.natAbs_zero Int.natAbs_add_le fun a b => (Int.natAbs_mul a b).le) + P Q + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/LengthSumLe.lean b/LeanPool/FourExponentials/LengthSumLe.lean new file mode 100644 index 0000000000..87d632ff37 --- /dev/null +++ b/LeanPool/FourExponentials/LengthSumLe.lean @@ -0,0 +1,81 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Polynomial.Coeff + +/-! +# Length of a sum + +For every finite family $(f_i)_{i\in s}$ in $\mathbb{Z}[X][Y]$, +$$ L\Bigl(\sum_{i\in s}f_i\Bigr)\le\sum_{i\in s}L(f_i). $$ + +Source: Standard. + +## Proof outline + +For a size function `ν : R → ℕ` on a semiring `R` and `p ∈ R[X]`, let `λ_ν(p) = ∑ₙ ν(pₙ)`, the +sum running over the support of `p`. The length of `P ∈ ℤ[X][Y]` is `λ_{λ_ν}(P)` with `ν = |·|`. + +If `ν(0) = 0` and `ν` is subadditive, then so is `λ_ν`: both sides may be summed over the union +of the two supports, since a coefficient outside the support is `0` and has size `0`, and there +the inequality holds termwise. Applied first to `|·|` on `ℤ` and then to `λ_{|·|}` on `ℤ[X]`, this +makes the length subadditive, and induction on the finset gives the claim. + +From `Diaz/Mirror/length_sum_le.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.length_sum_le`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace LengthSumLe + +open Polynomial + +variable {R : Type*} [Semiring R] + +/-- The sum of the sizes of the coefficients of `p`. -/ +def lengthSumLeLam (ν : R → ℕ) (p : R[X]) : ℕ := + ∑ n ∈ p.support, ν (p.coeff n) + +theorem length_sum_le_lam_zero (ν : R → ℕ) : lengthSumLeLam ν 0 = 0 := by + rw [lengthSumLeLam, support_zero, Finset.sum_empty] + +/-- The sum may run over any finset containing the support. -/ +theorem length_sum_le_lam_eq_sum (ν : R → ℕ) (hν : ν 0 = + 0) (p : R[X]) {s : Finset ℕ} (hs : p.support ⊆ s) : + lengthSumLeLam ν p = ∑ n ∈ s, ν (p.coeff n) := + Finset.sum_subset hs fun n _ hn => by rw [notMem_support_iff.1 hn, hν] + +theorem length_sum_le_lam_add_le (ν : R → ℕ) (hν : ν 0 = 0) (hadd : ∀ a b, ν (a + b) ≤ ν a + ν b) + (p q : R[X]) : lengthSumLeLam ν (p + q) ≤ lengthSumLeLam ν p + lengthSumLeLam ν q := by + classical + rw [length_sum_le_lam_eq_sum ν hν (p + q) support_add, + length_sum_le_lam_eq_sum ν hν p Finset.subset_union_left, + length_sum_le_lam_eq_sum ν hν q Finset.subset_union_right, ← Finset.sum_add_distrib] + exact Finset.sum_le_sum fun n _ => by + rw [coeff_add] + exact hadd _ _ + +end LengthSumLe + +open LengthSumLe in +/-- **Length of a sum.** For every finite family $(f_i)_{i\in s}$ in $\mathbb{Z}[X][Y]$, +$$ L\Bigl(\sum_{i\in s}f_i\Bigr)\le\sum_{i\in s}L(f_i). $$ -/ +theorem length_sum_le {ι : Type*} (s : Finset ι) (f : ι → Polynomial (Polynomial ℤ)) : + ∑ k ∈ (∑ i ∈ s, f i).support, ∑ j ∈ ((∑ i ∈ s, f i).coeff k).support, + (((∑ i ∈ s, f i).coeff k).coeff j).natAbs ≤ + ∑ i ∈ s, ∑ k ∈ (f i).support, ∑ j ∈ ((f i).coeff k).support, + (((f i).coeff k).coeff j).natAbs := by + exact Finset.le_sum_of_subadditive (lengthSumLeLam (lengthSumLeLam Int.natAbs)) + (length_sum_le_lam_zero (lengthSumLeLam Int.natAbs)).le + (length_sum_le_lam_add_le (lengthSumLeLam Int.natAbs) (length_sum_le_lam_zero Int.natAbs) + (length_sum_le_lam_add_le Int.natAbs Int.natAbs_zero Int.natAbs_add_le)) s f + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/NonvanishingDerivative.lean b/LeanPool/FourExponentials/NonvanishingDerivative.lean new file mode 100644 index 0000000000..1a7f0c861f --- /dev/null +++ b/LeanPool/FourExponentials/NonvanishingDerivative.lean @@ -0,0 +1,194 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExpPolyZeroCount +public import Mathlib.Order.Filter.Defs +public import Mathlib.Tactic.FunProp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.LinearCombination +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Push +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# A non-zero derivative on the grid + +Let $x_1,x_2$ be linearly independent over $\mathbb{Q}$, and likewise $y_1,y_2$. Let +$S,T,R_1,R_2,S'\in\mathbb{N}$ and let $c(i,j,h)\in\mathbb{C}$ ($i0$ +$$ \frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log +n}\Bigl(1+(R_1|y_1|+R_2|y_2|)\,T(|x_1|+|x_2|)\Bigr)\le R_1R_2S', $$ +then $G^{(s)}(ay_1+by_2)\neq0$ for some $a0$ +$$ \frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log +n}\Bigl(1+(R_1|y_1|+R_2|y_2|)\,T(|x_1|+|x_2|)\Bigr)\le R_1R_2S', $$ +then $G^{(s)}(ay_1+by_2)\neq0$ for some $a ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + c i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) ≠ 0 := by + classical + by_contra hcon + push Not at hcon + obtain ⟨i₀, j₀, k₀, hc₀⟩ := hc + have hT : 0 < T := j₀.pos + have hS : 0 < S := i₀.pos + set G : ℂ → ℂ := (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + c i j k * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * + z)) with hGdef + -- index the frequencies by `Fin (T * T)` + let e : Fin T × Fin T ≃ Fin (T * T) := finProdFinEquiv + let ω : Fin (T * T) → ℂ := fun m => + (((e.symm m).1 : ℕ) : ℂ) * x₁ + (((e.symm m).2 : ℕ) : ℂ) * x₂ + let q : Fin (T * T) → ℕ := fun _ => S + let b : (m : Fin (T * T)) → Fin (q m) → ℂ := fun m i => c i (e.symm m).1 (e.symm m).2 + have hG : ∀ w, G w = ∑ m, ∑ i : Fin (q m), b m i * w ^ (i : ℕ) * Complex.exp (ω m * w) := by + intro w + rw [← e.sum_comp] + simp only [q, b, ω, Equiv.symm_apply_apply, Fintype.sum_prod_type, hGdef] + rw [Finset.sum_comm] + refine Finset.sum_congr rfl (fun j _ => ?_) + rw [Finset.sum_comm] + -- the frequencies are distinct + have hω : Function.Injective ω := by + intro m m' h + apply e.symm.injective + have h' := (LinearIndependent.pair_iff.mp hx) + ((((e.symm m).1 : ℕ) : ℚ) - (((e.symm m').1 : ℕ) : ℚ)) + ((((e.symm m).2 : ℕ) : ℚ) - (((e.symm m').2 : ℕ) : ℚ)) + (by simp only [ω] at h; rw [Rat.smul_def, Rat.smul_def]; push_cast; linear_combination h) + obtain ⟨h1, h2⟩ := h' + have e1 : (((e.symm m).1 : ℕ)) = (((e.symm m').1 : ℕ)) := by exact_mod_cast sub_eq_zero.mp h1 + have e2 : (((e.symm m).2 : ℕ)) = (((e.symm m').2 : ℕ)) := by exact_mod_cast sub_eq_zero.mp h2 + exact Prod.ext (Fin.ext e1) (Fin.ext e2) + have hb : ∃ m i, b m i ≠ 0 := ⟨e (j₀, k₀), i₀, by simpa [b] using hc₀⟩ + -- `G` is entire and not identically zero + have hdiff : Differentiable ℂ G := by + rw [hGdef]; fun_prop + obtain ⟨w, hw⟩ := expPoly_ne_zero q ω hω b hb + have hw' : G w ≠ 0 := by rw [hG w]; exact hw + have hfin : ∀ z, analyticOrderAt G z ≠ ⊤ := by + intro z htop + have hev : G =ᶠ[nhds z] 0 := by + filter_upwards [analyticOrderAt_eq_top.mp htop] with u hu + simpa using hu + have := AnalyticOnNhd.eqOn_zero_of_preconnected_of_eventuallyEq_zero + (fun u _ => hdiff.analyticAt u) isPreconnected_univ (Set.mem_univ z) hev + exact hw' (by simpa using this (Set.mem_univ w)) + -- every grid point is a zero of order at least `S'` + have hord : ∀ a < R₁, ∀ b' < R₂, + S' ≤ analyticOrderNatAt G ((a : ℂ) * y₁ + (b' : ℂ) * y₂) := by + intro a ha b' hb' + have h1 : (S' : ℕ∞) ≤ analyticOrderAt G ((a : ℂ) * y₁ + (b' : ℂ) * y₂) := + (natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero (hdiff.analyticAt _)).2 + (fun i hi => hcon a b' i ha hb' hi) + have hne := hfin ((a : ℂ) * y₁ + (b' : ℂ) * y₂) + rw [← ENat.natCast_toNat hne] at h1 + exact_mod_cast h1 + -- the grid has `R₁ * R₂` distinct points + let grid : Finset ℂ := + (Finset.range R₁ ×ˢ Finset.range R₂).image (fun p : ℕ × ℕ => (p.1 : ℂ) * y₁ + (p.2 : ℂ) * y₂) + have hinj : Set.InjOn (fun p : ℕ × ℕ => (p.1 : ℂ) * y₁ + (p.2 : ℂ) * y₂) + ↑(Finset.range R₁ ×ˢ Finset.range R₂) := by + intro p _ p' _ h + obtain ⟨h1, h2⟩ := (LinearIndependent.pair_iff.mp hy) ((p.1 : ℚ) - p'.1) ((p.2 : ℚ) - p'.2) + (by simp only at h; rw [Rat.smul_def, Rat.smul_def]; push_cast; linear_combination h) + exact Prod.ext (by exact_mod_cast sub_eq_zero.mp h1) (by exact_mod_cast sub_eq_zero.mp h2) + have hcard : grid.card = R₁ * R₂ := by + rw [Finset.card_image_of_injOn hinj, Finset.card_product, Finset.card_range, Finset.card_range] + have hlow : (((R₁ * R₂ * S' : ℕ)) : ℝ) ≤ ∑ z ∈ grid, (analyticOrderNatAt G z : ℝ) := by + calc (((R₁ * R₂ * S' : ℕ)) : ℝ) = ∑ z ∈ grid, (S' : ℝ) := by + rw [Finset.sum_const, hcard, nsmul_eq_mul]; push_cast; ring + _ ≤ ∑ z ∈ grid, (analyticOrderNatAt G z : ℝ) := by + apply Finset.sum_le_sum + intro z hz + obtain ⟨p, hp, rfl⟩ := Finset.mem_image.mp hz + simp only [Finset.mem_product, Finset.mem_range] at hp + exact_mod_cast hord p.1 hp.1 p.2 hp.2 + -- the zero estimate + set ρ : ℝ := (R₁ : ℝ) * ‖y₁‖ + (R₂ : ℝ) * ‖y₂‖ with hρdef + have hρ : 0 ≤ ρ := by positivity + have hdisc : ∀ z ∈ grid, ‖z - 0‖ ≤ ρ := by + intro z hz + obtain ⟨p, hp, rfl⟩ := Finset.mem_image.mp hz + simp only [Finset.mem_product, Finset.mem_range] at hp + have ha : (p.1 : ℝ) ≤ R₁ := by exact_mod_cast hp.1.le + have hb' : (p.2 : ℝ) ≤ R₂ := by exact_mod_cast hp.2.le + calc ‖(p.1 : ℂ) * y₁ + (p.2 : ℂ) * y₂ - 0‖ ≤ ‖(p.1 : ℂ) * y₁‖ + ‖(p.2 : ℂ) * y₂‖ := by + rw [sub_zero]; exact norm_add_le _ _ + _ = (p.1 : ℝ) * ‖y₁‖ + (p.2 : ℝ) * ‖y₂‖ := by simp + _ ≤ ρ := by rw [hρdef]; gcongr + have hB := expPoly_zero_count q ω hω b hb 0 ρ hρ lam hlam grid hdisc + have hn : (∑ m, q m : ℕ) = S * T * T := by + simp only [q, Finset.sum_const, Finset.card_univ, Fintype.card_fin, smul_eq_mul]; ring + have hsum : ∑ z ∈ grid, (analyticOrderNatAt + (fun w : ℂ => ∑ m, ∑ i : Fin (q m), b m i * w ^ (i : ℕ) * Complex.exp (ω m * w)) z : ℝ) + = ∑ z ∈ grid, (analyticOrderNatAt G z : ℝ) := by + have : (fun w : ℂ => ∑ m, ∑ i : Fin (q m), b m i * w ^ (i : ℕ) * Complex.exp (ω m * w)) = G := + funext (fun w => (hG w).symm) + rw [this] + rw [hsum, hn] at hB + have hΩ : (⨆ m, ‖ω m‖) ≤ (T : ℝ) * (‖x₁‖ + ‖x₂‖) := by + have : Nonempty (Fin (T * T)) := ⟨⟨0, Nat.mul_pos hT hT⟩⟩ + apply ciSup_le + intro m + have hj : (((e.symm m).1 : ℕ) : ℝ) ≤ T := by exact_mod_cast (e.symm m).1.is_lt.le + have hk : (((e.symm m).2 : ℕ) : ℝ) ≤ T := by exact_mod_cast (e.symm m).2.is_lt.le + calc ‖ω m‖ ≤ ‖(((e.symm m).1 : ℕ) : ℂ) * x₁‖ + ‖(((e.symm m).2 : ℕ) : ℂ) * x₂‖ := + norm_add_le _ _ + _ = (((e.symm m).1 : ℕ) : ℝ) * ‖x₁‖ + (((e.symm m).2 : ℕ) : ℝ) * ‖x₂‖ := by simp + _ ≤ (T : ℝ) * ‖x₁‖ + (T : ℝ) * ‖x₂‖ := by gcongr + _ = (T : ℝ) * (‖x₁‖ + ‖x₂‖) := by ring + have hn1 : (1 : ℝ) ≤ ((S * T * T : ℕ) : ℝ) := by + exact_mod_cast Nat.one_le_iff_ne_zero.mpr (by positivity) + have hK : 0 ≤ 2 * (1 + ((S * T * T : ℕ) : ℝ) ^ lam) / (lam * Real.log ((S * T * T : ℕ) : ℝ)) := + div_nonneg (by positivity) (mul_nonneg hlam.le (Real.log_nonneg hn1)) + have hmono : 2 * (1 + ((S * T * T : ℕ) : ℝ) ^ lam) / (lam * Real.log ((S * T * T : ℕ) : ℝ)) + * (1 + ρ * ⨆ m, ‖ω m‖) + ≤ 2 * (1 + ((S * T * T : ℕ) : ℝ) ^ lam) / (lam * Real.log ((S * T * T : ℕ) : ℝ)) + * (1 + ρ * ((T : ℝ) * (‖x₁‖ + ‖x₂‖))) := + mul_le_mul_of_nonneg_left (by gcongr) hK + linarith + +end FourExponentials diff --git a/LeanPool/FourExponentials/NormResultantLeMaxNormEval.lean b/LeanPool/FourExponentials/NormResultantLeMaxNormEval.lean new file mode 100644 index 0000000000..6fcf4259e8 --- /dev/null +++ b/LeanPool/FourExponentials/NormResultantLeMaxNormEval.lean @@ -0,0 +1,184 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Complex.Polynomial.Basic +public import Mathlib.Analysis.Polynomial.MahlerMeasure +public import Mathlib.RingTheory.Polynomial.Resultant.Basic +public import Mathlib.RingTheory.SimpleRing.Principal +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring + +/-! +# A Liouville inequality through the resultant + +Let `F, G ∈ ℂ[X]` have Mahler measures at least `1`. Then at every point `θ`, +`|Res(F, G)| ≤ 2^(deg F · deg G) · M(F)^(deg G) · M(G)^(deg F) · max(|F(θ)|, |G(θ)|)`. + +Let `α₁` be the root of `F` or `G` nearest to `θ`, say a root of `F`. Writing the resultant as +`a^(deg G) ∏ G(α)` over the roots `α` of `F`, the factor `G(α₁)` is at most `2^(deg G) |G(θ)|`, +because every root `β` of `G` has `|α₁ - β| ≤ 2 |θ - β|`, and each other factor `G(α)` is at most +`2^(deg G) max(1, |α|)^(deg G) M(G)`. If neither polynomial has a root, both are constants and the +resultant is `1 ≤ M(F) = |F(θ)|`. This is the complex form of the inequality of Roy–Waldschmidt +(1997), Corollary 3.7, proved as in their Lemma 3.4: when `F, G ∈ ℤ[X]` are coprime, the resultant +is a non-zero integer and the right-hand side is at least `1`. + +From `Diaz/Mirror/norm_resultant_le_max_norm_eval.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.norm_resultant_le_max_norm_eval`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace NormResultantLeMaxNormEval + +open Polynomial + +lemma norm_prod_map {ι : Type*} (s : Multiset ι) (f : ι → ℂ) : + ‖(s.map f).prod‖ = (s.map fun i => ‖f i‖).prod := by + induction s using Multiset.induction_on with + | empty => simp + | cons a s ih => simp [ih] + +/-- At a root `α₁` nearer to `θ` than every root of `G`: `|G(α₁)| ≤ 2ⁿ |G(θ)|`. -/ +lemma eval_near (G : ℂ[X]) (θ α1 : ℂ) (hnear : ∀ β ∈ G.roots, ‖θ - α1‖ ≤ ‖θ - β‖) : + ‖G.eval α1‖ ≤ 2 ^ G.natDegree * ‖G.eval θ‖ := by + rw [(IsAlgClosed.splits G).eval_eq_prod_roots α1, (IsAlgClosed.splits G).eval_eq_prod_roots θ, + norm_mul, norm_mul, norm_prod_map, norm_prod_map] + have hle := Multiset.prod_map_le_prod_map₀ (s := G.roots) (fun β => ‖α1 - β‖) + (fun β => 2 * ‖θ - β‖) (fun _ _ => norm_nonneg _) (fun β hβ => by + have h1 := norm_sub_le_norm_sub_add_norm_sub α1 θ β + rw [norm_sub_rev α1 θ] at h1 + linarith [hnear β hβ]) + rw [Multiset.prod_map_mul, Multiset.map_const', Multiset.prod_replicate, + IsAlgClosed.card_roots_eq_natDegree] at hle + calc ‖G.leadingCoeff‖ * (G.roots.map fun β => ‖α1 - β‖).prod + ≤ ‖G.leadingCoeff‖ * (2 ^ G.natDegree * (G.roots.map fun β => ‖θ - β‖).prod) := + mul_le_mul_of_nonneg_left hle (norm_nonneg _) + _ = _ := by ring + +/-- Anywhere: `|G(a)| ≤ 2ⁿ max(1,|a|)ⁿ M(G)`. -/ +lemma eval_far (G : ℂ[X]) (a : ℂ) : + ‖G.eval a‖ ≤ 2 ^ G.natDegree * max 1 ‖a‖ ^ G.natDegree * G.mahlerMeasure := by + rw [(IsAlgClosed.splits G).eval_eq_prod_roots a, mahlerMeasure_eq_leadingCoeff_mul_prod_roots, + norm_mul, norm_prod_map] + have hle := Multiset.prod_map_le_prod_map₀ (s := G.roots) (fun β => ‖a - β‖) + (fun β => (2 * max 1 ‖a‖) * max 1 ‖β‖) (fun _ _ => norm_nonneg _) (fun β _ => by + have h1 := norm_sub_le a β + have h2 : ‖a‖ ≤ max 1 ‖a‖ := le_max_right _ _ + have h3 : ‖β‖ ≤ max 1 ‖β‖ := le_max_right _ _ + have h4 : (1 : ℝ) ≤ max 1 ‖a‖ := le_max_left _ _ + have h5 : (1 : ℝ) ≤ max 1 ‖β‖ := le_max_left _ _ + nlinarith [mul_le_mul h2 h5 zero_le_one (by linarith), + mul_le_mul h4 h3 (norm_nonneg _) (by linarith)]) + rw [Multiset.prod_map_mul, Multiset.map_const', Multiset.prod_replicate, + IsAlgClosed.card_roots_eq_natDegree] at hle + calc ‖G.leadingCoeff‖ * (G.roots.map fun β => ‖a - β‖).prod + ≤ ‖G.leadingCoeff‖ * ((2 * max 1 ‖a‖) ^ G.natDegree * + (G.roots.map fun β => max 1 ‖β‖).prod) := + mul_le_mul_of_nonneg_left hle (norm_nonneg _) + _ = _ := by rw [mul_pow]; ring + +/-- The root product in `Res(F, G) = a^n ∏ G(α)`, when a root `α₁` of `F` is nearest to `θ`. -/ +lemma bound_near (F G : ℂ[X]) (θ α1 : ℂ) (h1 : α1 ∈ F.roots) + (hnear : ∀ β ∈ G.roots, ‖θ - α1‖ ≤ ‖θ - β‖) (hG1 : 1 ≤ G.mahlerMeasure) : + ‖F.leadingCoeff ^ G.natDegree * (F.roots.map G.eval).prod‖ + ≤ 2 ^ (F.natDegree * G.natDegree) * F.mahlerMeasure ^ G.natDegree + * G.mahlerMeasure ^ F.natDegree * ‖G.eval θ‖ := by + obtain ⟨s, hs⟩ : ∃ s, F.roots = α1 ::ₘ s := ⟨_, (Multiset.cons_erase h1).symm⟩ + have hcard : Multiset.card s + 1 = F.natDegree := by + have := IsAlgClosed.card_roots_eq_natDegree (p := F) + rw [hs, Multiset.card_cons] at this + exact this + have hmax0 : 0 ≤ (s.map fun a => max 1 ‖a‖).prod := Multiset.prod_nonneg fun x hx => by + obtain ⟨a, -, rfl⟩ := Multiset.mem_map.1 hx + exact zero_le_one.trans (le_max_left _ _) + have hMF : ‖F.leadingCoeff‖ * (s.map fun a => max 1 ‖a‖).prod ≤ F.mahlerMeasure := by + rw [mahlerMeasure_eq_leadingCoeff_mul_prod_roots F, hs, Multiset.map_cons, Multiset.prod_cons] + have hnn : 0 ≤ ‖F.leadingCoeff‖ * (s.map fun a => max 1 ‖a‖).prod := + mul_nonneg (norm_nonneg _) hmax0 + nlinarith [le_max_left 1 ‖α1‖] + have hP0 : 0 ≤ (s.map fun a => ‖G.eval a‖).prod := Multiset.prod_nonneg fun x hx => by + obtain ⟨a, -, rfl⟩ := Multiset.mem_map.1 hx + exact norm_nonneg _ + have hA := eval_near G θ α1 (fun β hβ => hnear β hβ) + have hB := Multiset.prod_map_le_prod_map₀ (s := s) (fun a => ‖G.eval a‖) + (fun a => 2 ^ G.natDegree * max 1 ‖a‖ ^ G.natDegree * G.mahlerMeasure) + (fun _ _ => norm_nonneg _) (fun a _ => eval_far G a) + have hfun : (fun a : ℂ => 2 ^ G.natDegree * max 1 ‖a‖ ^ G.natDegree * G.mahlerMeasure) + = fun a => (2 ^ G.natDegree * G.mahlerMeasure) * max 1 ‖a‖ ^ G.natDegree := by + funext a; ring + rw [hfun, Multiset.prod_map_mul, Multiset.map_const', Multiset.prod_replicate, + Multiset.prod_map_pow] at hB + rw [norm_mul, norm_pow, hs, Multiset.map_cons, Multiset.prod_cons, norm_mul, norm_prod_map] + have hMG0 : 0 ≤ G.mahlerMeasure := zero_le_one.trans hG1 + have hMF0 : 0 ≤ F.mahlerMeasure := (mul_nonneg (norm_nonneg _) hmax0).trans hMF + calc ‖F.leadingCoeff‖ ^ G.natDegree * (‖G.eval α1‖ * (s.map fun a => ‖G.eval a‖).prod) + ≤ ‖F.leadingCoeff‖ ^ G.natDegree * ((2 ^ G.natDegree * ‖G.eval θ‖) + * ((2 ^ G.natDegree * G.mahlerMeasure) ^ Multiset.card s + * (s.map fun a => max 1 ‖a‖).prod ^ G.natDegree)) := + mul_le_mul_of_nonneg_left (mul_le_mul hA hB hP0 (by positivity)) (by positivity) + _ = 2 ^ G.natDegree * (2 ^ G.natDegree) ^ Multiset.card s + * (‖F.leadingCoeff‖ * (s.map fun a => max 1 ‖a‖).prod) ^ G.natDegree + * G.mahlerMeasure ^ Multiset.card s * ‖G.eval θ‖ := by ring + _ ≤ 2 ^ G.natDegree * (2 ^ G.natDegree) ^ Multiset.card s * F.mahlerMeasure ^ G.natDegree + * G.mahlerMeasure ^ (Multiset.card s + 1) * ‖G.eval θ‖ := by + apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) + apply mul_le_mul _ (pow_le_pow_right₀ hG1 (Nat.le_succ _)) (pow_nonneg hMG0 _) + (mul_nonneg (by positivity) (pow_nonneg hMF0 _)) + exact mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ (mul_nonneg (norm_nonneg _) hmax0) hMF _) (by positivity) + _ = _ := by + rw [← hcard, show (Multiset.card s + 1) * G.natDegree = G.natDegree * (Multiset.card s + 1) + by ring, pow_mul, pow_succ] + ring + +end NormResultantLeMaxNormEval + +open Polynomial NormResultantLeMaxNormEval in +/-- **Liouville's inequality through the resultant.** Let $F,G\in\mathbb{C}[X]$ with $M(F)\ge1$ and +$M(G)\ge1$. Then for every $\theta\in\mathbb{C}$ +$$ |\operatorname{Res}(F,G)|\le2^{\deg F\deg G}M(F)^{\deg G}M(G)^{\deg +F}\max\bigl(|F(\theta)|,|G(\theta)|\bigr). $$ -/ +theorem norm_resultant_le_max_norm_eval (F G : Polynomial ℂ) (hF : 1 ≤ F.mahlerMeasure) + (hG : 1 ≤ G.mahlerMeasure) (θ : ℂ) : + ‖F.resultant G‖ ≤ 2 ^ (F.natDegree * G.natDegree) * F.mahlerMeasure ^ G.natDegree * + G.mahlerMeasure ^ F.natDegree * max ‖F.eval θ‖ ‖G.eval θ‖ := by + classical + rcases ((F.roots + G.roots).toFinset).eq_empty_or_nonempty with hemp | hne + · -- two constants: the resultant is `1 ≤ M(F) = |F(θ)|` + rw [Multiset.toFinset_eq_empty, add_eq_zero] at hemp + have hF0 : F.natDegree = 0 := by + rw [← IsAlgClosed.card_roots_eq_natDegree, hemp.1, Multiset.card_zero] + have hG0 : G.natDegree = 0 := by + rw [← IsAlgClosed.card_roots_eq_natDegree, hemp.2, Multiset.card_zero] + rw [eq_C_of_natDegree_eq_zero hF0, mahlerMeasure_const] at hF + rw [hF0, hG0, resultant_zero_left_deg, eq_C_of_natDegree_eq_zero hF0, eval_C] + simpa using le_max_of_le_left hF + obtain ⟨z, hzS, hzmin⟩ := Finset.exists_min_image _ (fun x => ‖θ - x‖) hne + have hmem : ∀ x, x ∈ F.roots ∨ x ∈ G.roots → ‖θ - z‖ ≤ ‖θ - x‖ := fun x hx => + hzmin x (Multiset.mem_toFinset.2 (Multiset.mem_add.2 hx)) + rcases Multiset.mem_add.1 (Multiset.mem_toFinset.1 hzS) with hz | hz + · have e := resultant_eq_prod_eval F G G.natDegree le_rfl (IsAlgClosed.splits F) + have hb := bound_near F G θ z hz (fun β hβ => hmem β (Or.inr hβ)) hG + rw [← e] at hb + exact hb.trans (mul_le_mul_of_nonneg_left (le_max_right _ _) (by positivity)) + · have e := resultant_eq_prod_eval G F F.natDegree le_rfl (IsAlgClosed.splits G) + have hb := bound_near G F θ z hz (fun β hβ => hmem β (Or.inl hβ)) hF + rw [← e] at hb + have hcomm : ‖F.resultant G‖ = ‖G.resultant F‖ := by rw [resultant_comm]; simp + rw [hcomm] + refine hb.trans ?_ + calc _ = 2 ^ (F.natDegree * G.natDegree) * F.mahlerMeasure ^ G.natDegree + * G.mahlerMeasure ^ F.natDegree * ‖F.eval θ‖ := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (le_max_left _ _) (by positivity) + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/NormToPolynomialAlg.lean b/LeanPool/FourExponentials/NormToPolynomialAlg.lean new file mode 100644 index 0000000000..00506b8d10 --- /dev/null +++ b/LeanPool/FourExponentials/NormToPolynomialAlg.lean @@ -0,0 +1,331 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsIntNorm +public import LeanPool.FourExponentials.ExistsIteratedDerivReducedPresentation +public import LeanPool.FourExponentials.ExistsPowMulPowLeExpSqMulSqrtLog +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring + +/-! +# A small nonzero derivative gives an integer polynomial that is small at `ω` + +Write `φ(P) = P(ω, ω₁)` for `P ∈ ℤ[X][Y]`, `d = deg Q`, `s = √(log N)`, `A = N² s`, `B = N² / s` +and `S = ⌊B⌋`. The auxiliary function is +`F_q(z) = ∑ (∑_{μ,ν} q_{ijkμν} ω^μ ω₁^ν) z^i e^((j x₁ + k x₂) z)`, with integers +`|q_{ijkμν}| ≤ e^(κ A)`, `i < S`, `j, k < 2N`, `μ < M ≤ κ S` and `ν < d`. + +At the point `a y₁ + b y₂` and the order `m < S / 2`, `Λ F_q⁽ᵐ⁾(a y₁ + b y₂) = φ(Pol)` with +`Λ ≠ 0` and `Pol = ∑ q_{ijkμν} R_{ijkμν}` of `Y`-degree below `d`. Both `|Λ|` and the lengths of +the `R_{ijkμν}` are at most `e^(κ₅ A)`, so `Pol` has length at most `e^(β A)` and `X`-degree at +most `e = M + c (1 + m + S) ≤ (κ + 3 c) B`. If `F_q⁽ᵐ⁾(a y₁ + b y₂) ≠ 0`, the norm of `φ(Pol)` +down to `ℚ(ω)` is an integer polynomial `P ≠ 0` of length at most `(c₁ e^(β A))^d` and degree at +most `d (e + c₁)`, with `|P(ω)| ≤ |φ(Pol)| (c₁ e^(β A) max(1, |ω|)^e)^d`. One constant `k` +bounds the three exponents. So `|P(ω)| ≤ e^(k A - N⁴ s / κ')` when +`|F_q⁽ᵐ⁾(a y₁ + b y₂)| ≤ e^(-N⁴ s / κ')`, and this is below `e^(-C (k A) (k B)) = e^(-C k² N⁴)` +as soon as `s ≥ 2 κ' (|C| k² + k + 1)`. + +From `Diaz/Mirror/norm_to_polynomial_alg.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.norm_to_polynomial_alg`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace NormToPolynomialAlg + +open Polynomial + +/-- A coefficient of an integer polynomial is at most its length. -/ +lemma natAbs_coeff_le (P : Polynomial ℤ) (i : ℕ) : + (P.coeff i).natAbs ≤ ∑ j ∈ P.support, (P.coeff j).natAbs := by + by_cases hi : i ∈ P.support + · exact Finset.single_le_sum (f := fun j => (P.coeff j).natAbs) (fun _ _ => Nat.zero_le _) hi + · rw [notMem_support_iff.1 hi]; simp + +/-- Multiplying by an integer `a` multiplies the length by `|a|` at most. -/ +lemma length_C_C_mul_le {a : ℤ} {P : Polynomial (Polynomial ℤ)} {x y : ℝ} (ha : |(a : ℝ)| ≤ x) + (hP : ((∑ k ∈ P.support, ∑ i ∈ (P.coeff k).support, ((P.coeff k).coeff i).natAbs : ℕ) : ℝ) + ≤ y) : + ((∑ k ∈ (C (C a) * P).support, ∑ i ∈ ((C (C a) * P).coeff k).support, + (((C (C a) * P).coeff k).coeff i).natAbs : ℕ) : ℝ) ≤ x * y := by + have h := Transcendence.length_mul_le (C (C a)) P + have hC : ∑ k ∈ (C (C a)).support, ∑ i ∈ ((C (C a)).coeff k).support, + (((C (C a)).coeff k).coeff i).natAbs = a.natAbs := by + by_cases ha0 : a = 0 + · simp [ha0] + · rw [support_C (C_ne_zero.2 ha0), Finset.sum_singleton, coeff_C_zero, support_C ha0, + Finset.sum_singleton, coeff_C_zero] + rw [hC] at h + refine (Nat.cast_le.2 h).trans ?_ + rw [Nat.cast_mul, Nat.cast_natAbs, Int.cast_abs] + exact mul_le_mul ha hP (Nat.cast_nonneg _) ((abs_nonneg _).trans ha) + +/-- The length of a sum is at most the number of terms times a bound on their lengths. -/ +lemma norm_to_polynomial_alg_length_sum_le {ι : Type*} (s : Finset ι) (f : ι → + Polynomial (Polynomial ℤ)) (B : ℝ) + (h : ∀ i ∈ s, ((∑ k ∈ (f i).support, ∑ j ∈ ((f i).coeff k).support, + (((f i).coeff k).coeff j).natAbs : ℕ) : ℝ) ≤ B) : + ((∑ k ∈ (∑ i ∈ s, f i).support, ∑ j ∈ ((∑ i ∈ s, f i).coeff k).support, + (((∑ i ∈ s, f i).coeff k).coeff j).natAbs : ℕ) : ℝ) ≤ s.card * B := by + refine (Nat.cast_le.2 (Transcendence.length_sum_le s f)).trans ?_ + rw [Nat.cast_sum] + exact (Finset.sum_le_sum h).trans (by rw [Finset.sum_const, nsmul_eq_mul]) + +/-- For `A ≥ 1`, a nonnegative `x` is at most `e^(x A)`. -/ +lemma le_exp_mul {x A : ℝ} (hx : 0 ≤ x) (hA : 1 ≤ A) : x ≤ Real.exp (x * A) := by + nlinarith [Real.add_one_le_exp (x * A), mul_le_mul_of_nonneg_left hA hx] + +end NormToPolynomialAlg + +open Polynomial NormToPolynomialAlg + +/-- **From a small value to a small polynomial.** Let $x_1,x_2,y_1,y_2\in\mathbb{C}$ have +presentation data, suppose every $e^{x_iy_j}$ is algebraic, and let $\kappa,\kappa'>0$. There is +$k>0$ such that for every $C$ there is $N_0$ with the following property. Let $N>N_0$, $M\le\kappa +S$, and let $q(i,j,h,\mu,\nu)$ be integers of absolute value at most $e^{\kappa N^{2}\sqrt{\log +N}}$. If $a ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * + x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂) ≠ 0 → + ‖iteratedDeriv s (fun z : ℂ => ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * + x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂)‖ + ≤ Real.exp (-(((N : ℝ) ^ 4 * Real.sqrt (Real.log (N : ℝ))) / κ')) → + ∃ P : Polynomial ℤ, P ≠ 0 ∧ + (∀ i : ℕ, |(P.coeff i : ℝ)| ≤ Real.exp (k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 * + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ))))) ∧ + (P.natDegree : ℝ) ≤ k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 / + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))) ∧ + ‖Polynomial.aeval ω P‖ < Real.exp (-(C * (k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 * + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ)))) * (k * + (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 / Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 / + Real.sqrt (Real.log (N : ℝ)))))) := by + -- The presentation of the derivatives, the norm down to `ℚ(ω)`, and the growth bound for + -- the grid `T ≤ 14 N`. + obtain ⟨c, hc⟩ := exists_iteratedDeriv_reduced_presentation x₁ x₂ y₁ y₂ hexp ω ω₁ Q + hQm hQroot D E G H hD hE hG hH + obtain ⟨c₁, hc₁⟩ := exists_int_norm ω ω₁ Q hQm hQroot hQmin + obtain ⟨κ₅, hκ₅, hA5⟩ := exists_pow_mul_pow_le_exp_sq_mul_sqrt_log c 14 + -- One constant `k` for the height, the degree and the value. + have hlw : 0 ≤ Real.log (max 1 ‖ω‖) := Real.log_nonneg (le_max_left _ _) + obtain ⟨β, hβ⟩ : ∃ β : ℝ, β = 4 * κ * Q.natDegree + 6 + κ + κ₅ := ⟨_, rfl⟩ + obtain ⟨k, hk⟩ : ∃ k : ℝ, + k = Q.natDegree * (c₁ + β + (κ + 3 * c) * (1 + Real.log (max 1 ‖ω‖))) + κ₅ + 1 := ⟨_, rfl⟩ + have hβ0 : 0 ≤ β := by rw [hβ]; positivity + have hk0 : 0 < k := by rw [hk]; positivity + refine ⟨k, hk0, fun C => ⟨max 3 ⌈Real.exp ((2 * κ' * (|C| * k ^ 2 + k + 1)) ^ 2)⌉₊, + fun N hN => ?_⟩⟩ + -- The scale `s = √(log N)`, with `s ≥ 2 κ' (|C| k² + k + 1)`. + have hN3 : 3 ≤ N := by omega + have hNr : (3 : ℝ) ≤ N := by exact_mod_cast hN3 + have hN3' : ¬ (N : ℝ) ≤ 3 := by + have : (4 : ℝ) ≤ N := by exact_mod_cast (by omega : 4 ≤ N) + linarith + have hL1 : 1 ≤ Real.log N := by + rw [Real.le_log_iff_exp_le (by positivity)]; have := Real.exp_one_lt_d9; linarith + have hLN : Real.log N ≤ N := by + have := Real.log_le_sub_one_of_pos (by positivity : (0 : ℝ) < N); linarith + have hs1 : 1 ≤ Real.sqrt (Real.log N) := Real.one_le_sqrt.2 hL1 + have hss := Real.mul_self_sqrt (by linarith : (0 : ℝ) ≤ Real.log N) + have hσ : 2 * κ' * (|C| * k ^ 2 + k + 1) ≤ Real.sqrt (Real.log N) := by + have h1 : Real.exp ((2 * κ' * (|C| * k ^ 2 + k + 1)) ^ 2) ≤ N := (Nat.le_ceil _).trans + (by exact_mod_cast (by omega : ⌈Real.exp ((2 * κ' * (|C| * k ^ 2 + k + 1)) ^ 2)⌉₊ ≤ N)) + rw [← Real.sqrt_sq (by positivity : 0 ≤ 2 * κ' * (|C| * k ^ 2 + k + 1))] + exact Real.sqrt_le_sqrt ((Real.le_log_iff_exp_le (by positivity)).2 h1) + generalize hs : Real.sqrt (Real.log (N : ℝ)) = s at hs1 hss hσ ⊢ + have hspos : 0 < s := by linarith + have hNN : (N : ℝ) * 1 ≤ N * N := mul_le_mul_of_nonneg_left (by linarith) (by positivity) + have hsN : s ≤ (N : ℝ) ^ 2 := by linarith [mul_le_mul_of_nonneg_left hs1 hspos.le] + -- The three floors. + have hSr : (⌊(N : ℝ) ^ 2 / s⌋₊ : ℝ) ≤ (N : ℝ) ^ 2 / s := Nat.floor_le (by positivity) + have h1r : (⌊(N : ℝ) / s⌋₊ : ℝ) ≤ (N : ℝ) / s := Nat.floor_le (by positivity) + have h2r : (⌊(N : ℝ) * s⌋₊ : ℝ) ≤ (N : ℝ) * s := Nat.floor_le (by positivity) + generalize ⌊(N : ℝ) ^ 2 / s⌋₊ = S at hSr ⊢ + generalize ⌊(N : ℝ) / s⌋₊ = t₁ at h1r ⊢ + generalize ⌊(N : ℝ) * s⌋₊ = t₂ at h2r ⊢ + -- `A = N² s` and `B = N² / s`: `1 ≤ B ≤ A`, `log N ≤ A ≤ N⁴` and `A B = N⁴`. + have hSN : (S : ℝ) ≤ (N : ℝ) ^ 2 := hSr.trans (div_le_self (by positivity) hs1) + have hB1 : 1 ≤ (N : ℝ) ^ 2 / s := by rw [le_div_iff₀ hspos]; linarith + have hBA : (N : ℝ) ^ 2 / s ≤ (N : ℝ) ^ 2 * s := by + rw [div_le_iff₀ hspos, mul_assoc, hss] + linarith [mul_le_mul_of_nonneg_left hL1 (by positivity : (0 : ℝ) ≤ (N : ℝ) ^ 2)] + have hLA : Real.log N ≤ (N : ℝ) ^ 2 * s := by + linarith [mul_le_mul_of_nonneg_left hs1 (by positivity : (0 : ℝ) ≤ (N : ℝ) ^ 2)] + have hAN : (N : ℝ) ^ 2 * s ≤ (N : ℝ) ^ 4 := by + linarith [mul_le_mul_of_nonneg_left hsN (by positivity : (0 : ℝ) ≤ (N : ℝ) ^ 2)] + have hAB : (N : ℝ) ^ 2 * s * ((N : ℝ) ^ 2 / s) = (N : ℝ) ^ 4 := by + field_simp + generalize hA : (N : ℝ) ^ 2 * s = A at hBA hLA hAN hAB ⊢ + generalize hB : (N : ℝ) ^ 2 / s = B at hSr hB1 hBA hAB ⊢ + have hA1 : 1 ≤ A := hB1.trans hBA + intro M hM q hqq a b m ha hb hm hne hsmall + have hmS : m ≤ S := by omega + -- `Λ F_q⁽ᵐ⁾(a y₁ + b y₂) = φ(Pol)`, with `|Λ|` and the lengths of the `R` at most `e^(κ₅ A)`. + obtain ⟨Λ, hΛ, hΛb, R, hRy, hRl, hRx, hRid⟩ := hc S (2 * N) M a b m + have h5 := hA5 N S (2 * N) a b m hN3 + rw [hs, hA, hB] at h5 + have hL5 := h5 hSr hmS (by omega) + (by have : (a : ℝ) ≤ 14 * t₁ := by exact_mod_cast (by omega : a ≤ 14 * t₁) + push_cast; linarith) + (by have : (b : ℝ) ≤ 14 * t₂ := by exact_mod_cast (by omega : b ≤ 14 * t₂) + push_cast; linarith) + have hΛe : ‖Λ‖ ≤ Real.exp (κ₅ * A) := by + refine hΛb.trans (le_trans ?_ hL5) + exact_mod_cast Nat.le_mul_of_pos_right _ (by positivity) + obtain ⟨Pol, hPol⟩ : ∃ Pol : Polynomial (Polynomial ℤ), Pol = ∑ i : Fin S, ∑ j : Fin (2 * N), + ∑ k' : Fin (2 * N), ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + Polynomial.C (Polynomial.C (q i j k' μ ν)) * R i j k' μ ν := ⟨_, rfl⟩ + have hval := hRid q + rw [← hPol] at hval + have hPol0 : eval₂ (eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Pol ≠ 0 := by + rw [← hval]; exact mul_ne_zero hΛ hne + -- `Pol` has `Y`-degree below `d`, `X`-degree at most `e`, and length at most `e^(β A)`. + have hPy : Pol.natDegree < Q.natDegree := by + rw [hPol] + refine lt_of_le_of_lt (natDegree_sum_le_of_forall_le _ _ fun i _ => + natDegree_sum_le_of_forall_le _ _ fun j _ => natDegree_sum_le_of_forall_le _ _ fun k' _ => + natDegree_sum_le_of_forall_le _ _ fun μ _ => natDegree_sum_le_of_forall_le _ _ fun ν _ => + (natDegree_C_mul_le _ _).trans (Nat.le_sub_one_of_lt (hRy i j k' μ ν))) (by omega) + have hPx : ∀ r, (Pol.coeff r).natDegree ≤ M + c * (1 + m + S) := by + intro r + simp only [hPol, finsetSum_coeff, coeff_C_mul] + exact natDegree_sum_le_of_forall_le _ _ fun i _ => + natDegree_sum_le_of_forall_le _ _ fun j _ => natDegree_sum_le_of_forall_le _ _ fun k' _ => + natDegree_sum_le_of_forall_le _ _ fun μ _ => natDegree_sum_le_of_forall_le _ _ fun ν _ => + (natDegree_C_mul_le _ _).trans (hRx i j k' μ ν r) + obtain ⟨lP, hlP⟩ : ∃ lP : ℕ, ∑ k ∈ Pol.support, ∑ i ∈ (Pol.coeff k).support, + ((Pol.coeff k).coeff i).natAbs = lP := ⟨_, rfl⟩ + have hlPe : (lP : ℝ) ≤ Real.exp (β * A) := by + rw [← hlP, hPol] + refine (norm_to_polynomial_alg_length_sum_le _ _ _ fun i _ => + norm_to_polynomial_alg_length_sum_le _ _ _ fun j _ => + norm_to_polynomial_alg_length_sum_le _ _ _ fun k' _ => norm_to_polynomial_alg_length_sum_le _ + _ _ fun μ _ => norm_to_polynomial_alg_length_sum_le _ _ _ fun ν _ => + length_C_C_mul_le (hqq i j k' μ ν) ((Nat.cast_le.2 (hRl i j k' μ ν)).trans hL5)).trans ?_ + simp only [Finset.card_univ, Fintype.card_fin] + push_cast + have hN6 : (N : ℝ) ^ 6 ≤ Real.exp (6 * A) := by + rw [← Real.exp_log (by positivity : (0 : ℝ) < (N : ℝ) ^ 6), Real.log_pow] + exact Real.exp_le_exp.2 (by push_cast; linarith) + have hMN : (M : ℝ) ≤ κ * (N : ℝ) ^ 2 := hM.trans (mul_le_mul_of_nonneg_left hSN hκ.le) + calc _ ≤ (N : ℝ) ^ 2 * (2 * N * (2 * N * (κ * (N : ℝ) ^ 2 * (Q.natDegree * + (Real.exp (κ * A) * Real.exp (κ₅ * A)))))) := by gcongr + _ = 4 * κ * Q.natDegree * (N : ℝ) ^ 6 * (Real.exp (κ * A) * Real.exp (κ₅ * A)) := by ring + _ ≤ Real.exp (4 * κ * Q.natDegree * A) * Real.exp (6 * A) * + (Real.exp (κ * A) * Real.exp (κ₅ * A)) := by + gcongr; exact le_exp_mul (by positivity) hA1 + _ = Real.exp (β * A) := by rw [hβ]; simp only [add_mul, Real.exp_add]; ring + -- The norm `P` of `φ(Pol)`, and the three bounds. + obtain ⟨P, hP0, hPl, hPd, hPv⟩ := hc₁ Pol lP (M + c * (1 + m + S)) hPy hlP.le hPx hPol0 + have he : ((M + c * (1 + m + S) : ℕ) : ℝ) ≤ (κ + 3 * c) * B := by + have hmS' : (m : ℝ) ≤ S := by exact_mod_cast hmS + have hc0 : (0 : ℝ) ≤ c := Nat.cast_nonneg c + push_cast + linarith [mul_le_mul_of_nonneg_left hSr hκ.le, mul_le_mul_of_nonneg_left hB1 hc0, + mul_le_mul_of_nonneg_left (hmS'.trans hSr) hc0, mul_le_mul_of_nonneg_left hSr hc0] + have hX : ((c₁ * lP : ℕ) : ℝ) ≤ Real.exp ((c₁ + β) * A) := by + rw [Nat.cast_mul, add_mul, Real.exp_add] + exact mul_le_mul (le_exp_mul (Nat.cast_nonneg _) hA1) hlPe (Nat.cast_nonneg _) + (Real.exp_pos _).le + have hd0 : (0 : ℝ) ≤ Q.natDegree := Nat.cast_nonneg _ + refine ⟨P, hP0, fun i => ?_, ?_, ?_⟩ + · -- the height + rw [ite_eq_right hN3', ← Int.cast_abs, ← Nat.cast_natAbs] + have h1 : ((P.coeff i).natAbs : ℝ) ≤ ((c₁ * lP : ℕ) : ℝ) ^ Q.natDegree := by + exact_mod_cast (natAbs_coeff_le P i).trans hPl + refine h1.trans ((pow_le_pow_left₀ (Nat.cast_nonneg _) hX _).trans ?_) + rw [← Real.exp_nat_mul] + refine Real.exp_le_exp.2 ?_ + rw [hk] + linarith [mul_nonneg (by positivity : (0 : ℝ) ≤ + Q.natDegree * ((κ + 3 * c) * (1 + Real.log (max 1 ‖ω‖))) + κ₅ + 1) + (by linarith : (0 : ℝ) ≤ A)] + · -- the degree + rw [ite_eq_right hN3'] + have h1 : (P.natDegree : ℝ) ≤ Q.natDegree * (((M + c * (1 + m + S) : ℕ) : ℝ) + c₁) := by + exact_mod_cast hPd + refine h1.trans ?_ + have hc₁B : (c₁ : ℝ) ≤ c₁ * B := le_mul_of_one_le_right (Nat.cast_nonneg _) hB1 + rw [hk] + linarith [mul_le_mul_of_nonneg_left (add_le_add he hc₁B) hd0, mul_nonneg (by positivity : + (0 : ℝ) ≤ Q.natDegree * (β + (κ + 3 * c) * Real.log (max 1 ‖ω‖)) + κ₅ + 1) + (by linarith : (0 : ℝ) ≤ B)] + · -- the value + rw [ite_eq_right hN3', ite_eq_right hN3'] + have hW : max 1 ‖ω‖ ^ (M + c * (1 + m + S)) ≤ + Real.exp ((κ + 3 * c) * Real.log (max 1 ‖ω‖) * A) := by + rw [← Real.exp_log (by positivity : (0 : ℝ) < max 1 ‖ω‖), ← Real.exp_nat_mul, Real.log_exp] + refine Real.exp_le_exp.2 ?_ + linarith [mul_le_mul_of_nonneg_right + (he.trans (mul_le_mul_of_nonneg_left hBA (by positivity))) hlw] + have hXW := pow_le_pow_left₀ (by positivity) (mul_le_mul hX hW (by positivity) + (Real.exp_pos _).le) Q.natDegree + rw [← Real.exp_add, ← Real.exp_nat_mul] at hXW + refine lt_of_le_of_lt (b := Real.exp (k * A - (N : ℝ) ^ 4 * s / κ')) (hPv.trans ?_) + (Real.exp_lt_exp.2 ?_) + · rw [← hval, norm_mul] + refine (mul_le_mul (mul_le_mul hΛe hsmall (norm_nonneg _) (Real.exp_pos _).le) hXW + (by positivity) (by positivity)).trans ?_ + rw [← Real.exp_add, ← Real.exp_add] + refine Real.exp_le_exp.2 ?_ + rw [hk] + linarith [mul_nonneg (by positivity : (0 : ℝ) ≤ Q.natDegree * (κ + 3 * c) + 1) + (by linarith : (0 : ℝ) ≤ A)] + · -- `k A - N⁴ s / κ' < -C (k A) (k B)`, since `A B = N⁴`, `A ≤ N⁴` and `s` is large. + have hN4 : (0 : ℝ) < (N : ℝ) ^ 4 := by positivity + have h1 : 2 * (|C| * k ^ 2 + k + 1) * (N : ℝ) ^ 4 ≤ (N : ℝ) ^ 4 * s / κ' := by + rw [le_div_iff₀ hκ']; linarith [mul_le_mul_of_nonneg_left hσ hN4.le] + have h2 : C * (k * A) * (k * B) ≤ |C| * k ^ 2 * (N : ℝ) ^ 4 := by + rw [show C * (k * A) * (k * B) = C * k ^ 2 * (A * B) by ring, hAB] + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_abs_self C) (by positivity)) hN4.le + have h3 : k * A ≤ k * (N : ℝ) ^ 4 := mul_le_mul_of_nonneg_left hAN hk0.le + linarith [mul_nonneg (mul_nonneg (abs_nonneg C) (sq_nonneg k)) hN4.le, mul_pos hk0 hN4] + +end FourExponentials diff --git a/LeanPool/FourExponentials/NormToPolynomialAlgColumn.lean b/LeanPool/FourExponentials/NormToPolynomialAlgColumn.lean new file mode 100644 index 0000000000..75889a62d2 --- /dev/null +++ b/LeanPool/FourExponentials/NormToPolynomialAlgColumn.lean @@ -0,0 +1,353 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsIntNorm +public import LeanPool.FourExponentials.ExistsPowMulPowLeExpSqMulSqrtLog +public import LeanPool.FourExponentials.LengthMulLe +public import LeanPool.FourExponentials.LengthSumLe +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring + +/-! +# A small non-zero derivative gives an integer polynomial that is small at `ω`, in the column case + +Write `φ(P) = P(ω, ω₁)` for `P ∈ ℤ[X][Y]`, `d = deg Q`, `s = √(log N)`, `A = N² s`, `B = N² / s`, +`S = ⌊B⌋` and `t₁ = ⌊N / s⌋`. The auxiliary function is +`F_q(z) = ∑ (∑_{μ,ν} q_{ijkμν} ω^μ ω₁^ν) z^i e^((j x₁ + k x₂) z)`, with integers +`|q_{ijkμν}| ≤ e^(κ A)`, `i < S`, `j, k < 2N`, `μ < M ≤ κ S` and `ν < d`. + +The proof is that of `norm_to_polynomial_alg`, with the presentation `hpres` in place of +`exists_iteratedDeriv_reduced_presentation`; the original's hypothesis `d > 0` follows +from `Q` monic with `φ(Q) = 0`. At the point `a y₁ + b y₂` and the order `m < S / 2`, +`Λ F_q⁽ᵐ⁾(a y₁ + b y₂) = φ(Pol)` with `Λ ≠ 0` and `Pol = ∑ q_{ijkμν} R_{ijkμν}` of `Y`-degree +below `d`. Both `|Λ|` and the lengths of the `R_{ijkμν}` are at most `e^(κ₅ A)`, so `Pol` has +length at most `e^(β A)`. The `X`-degree of `Pol` now grows with `a`: it is at most +`e = M + c (1 + m + S + 2 N a)`. Since `a < 14 t₁ ≤ 14 N / s`, `2 N a ≤ 28 B`, so +`e ≤ (κ + 31 c) B`, where the original has `(κ + 3 c) B`. + +If `F_q⁽ᵐ⁾(a y₁ + b y₂) ≠ 0`, the norm of `φ(Pol)` down to `ℚ(ω)` is an integer polynomial +`P ≠ 0` of length at most `(c₁ e^(β A))^d` and degree at most `d (e + c₁)`, with +`|P(ω)| ≤ |φ(Pol)| (c₁ e^(β A) max(1, |ω|)^e)^d`. One constant `k` bounds the three exponents. +So `|P(ω)| ≤ e^(k A - N⁴ s / κ')` when `|F_q⁽ᵐ⁾(a y₁ + b y₂)| ≤ e^(-N⁴ s / κ')`, and this is below +`e^(-C (k A) (k B)) = e^(-C k² N⁴)` as soon as `s ≥ 2 κ' (|C| k² + k + 1)`. + +From `Diaz/Mirror/norm_to_polynomial_alg_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.norm_to_polynomial_alg_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace NormToPolynomialAlgColumn + +open Polynomial + +/-- A coefficient of an integer polynomial is at most its length. -/ +lemma norm_to_polynomial_alg_column_natAbs_coeff_le (P : Polynomial ℤ) (i : ℕ) : + (P.coeff i).natAbs ≤ ∑ j ∈ P.support, (P.coeff j).natAbs := by + by_cases hi : i ∈ P.support + · exact Finset.single_le_sum (f := fun j => (P.coeff j).natAbs) (fun _ _ => Nat.zero_le _) hi + · rw [notMem_support_iff.1 hi]; simp + +/-- Multiplying by an integer `a` multiplies the length by `|a|` at most. -/ +lemma norm_to_polynomial_alg_column_length_C_C_mul_le {a : ℤ} {P : Polynomial (Polynomial ℤ)} {x y : + ℝ} (ha : |(a : ℝ)| ≤ x) + (hP : ((∑ k ∈ P.support, ∑ i ∈ (P.coeff k).support, ((P.coeff k).coeff i).natAbs : ℕ) : ℝ) + ≤ y) : + ((∑ k ∈ (C (C a) * P).support, ∑ i ∈ ((C (C a) * P).coeff k).support, + (((C (C a) * P).coeff k).coeff i).natAbs : ℕ) : ℝ) ≤ x * y := by + have h := Transcendence.length_mul_le (C (C a)) P + have hC : ∑ k ∈ (C (C a)).support, ∑ i ∈ ((C (C a)).coeff k).support, + (((C (C a)).coeff k).coeff i).natAbs = a.natAbs := by + by_cases ha0 : a = 0 + · simp [ha0] + · rw [support_C (C_ne_zero.2 ha0), Finset.sum_singleton, coeff_C_zero, support_C ha0, + Finset.sum_singleton, coeff_C_zero] + rw [hC] at h + refine (Nat.cast_le.2 h).trans ?_ + rw [Nat.cast_mul, Nat.cast_natAbs, Int.cast_abs] + exact mul_le_mul ha hP (Nat.cast_nonneg _) ((abs_nonneg _).trans ha) + +/-- The length of a sum is at most the number of terms times a bound on their lengths. -/ +lemma norm_to_polynomial_alg_column_length_sum_le {ι : Type*} (s : Finset ι) (f : ι → + Polynomial (Polynomial ℤ)) (B : ℝ) + (h : ∀ i ∈ s, ((∑ k ∈ (f i).support, ∑ j ∈ ((f i).coeff k).support, + (((f i).coeff k).coeff j).natAbs : ℕ) : ℝ) ≤ B) : + ((∑ k ∈ (∑ i ∈ s, f i).support, ∑ j ∈ ((∑ i ∈ s, f i).coeff k).support, + (((∑ i ∈ s, f i).coeff k).coeff j).natAbs : ℕ) : ℝ) ≤ s.card * B := by + refine (Nat.cast_le.2 (Transcendence.length_sum_le s f)).trans ?_ + rw [Nat.cast_sum] + exact (Finset.sum_le_sum h).trans (by rw [Finset.sum_const, nsmul_eq_mul]) + +/-- For `A ≥ 1`, a nonnegative `x` is at most `e^(x A)`. -/ +lemma norm_to_polynomial_alg_column_le_exp_mul {x A : ℝ} (hx : 0 ≤ x) (hA : 1 ≤ A) : x ≤ Real.exp (x + * A) := by + nlinarith [Real.add_one_le_exp (x * A), mul_le_mul_of_nonneg_left hA hx] + +end NormToPolynomialAlgColumn + +open Polynomial NormToPolynomialAlgColumn in +/-- **A small polynomial, one algebraic column.** Let $x_1,x_2,y_1,y_2,\omega,\omega_1\in\mathbb{C}$ +and let $Q\in\mathbb{Z}[X][Y]$ be monic in $Y$ with $Q(\omega,\omega_1)=0$ and minimal there, and +suppose that the derivatives of the functions $F_q$ have reduced presentations as in the conclusion +of Lemma . Then the conclusion of Lemma holds. -/ +theorem norm_to_polynomial_alg_column + (x₁ x₂ y₁ y₂ : ℂ) (ω ω₁ : ℂ) (Q : Polynomial (Polynomial ℤ)) (hQm : Q.Monic) + (hQroot : Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Q = 0) + (hQmin : ∀ A : Polynomial (Polynomial ℤ), A.natDegree < Q.natDegree → + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ A = 0 → A = 0) + (hpres : ∃ c : ℕ, ∀ S T M a b m : ℕ, ∃ Λ : ℂ, Λ ≠ 0 ∧ + ‖Λ‖ ≤ (c : ℝ) ^ (c * (1 + m + S + T * (a + b))) ∧ + ∃ R : Fin S → Fin T → Fin T → Fin M → Fin Q.natDegree → Polynomial (Polynomial ℤ), + (∀ i j k μ ν, (R i j k μ ν).natDegree < Q.natDegree) ∧ + (∀ i j k μ ν, ∑ r ∈ (R i j k μ ν).support, ∑ h ∈ ((R i j k μ ν).coeff r).support, + (((R i j k μ ν).coeff r).coeff h).natAbs ≤ + c ^ (c * (1 + m + S + T * (a + b))) * (1 + m + S + T + a + b) ^ (c * (1 + m + S))) ∧ + (∀ i j k μ ν r, ((R i j k μ ν).coeff r).natDegree ≤ M + c * (1 + m + S + T * a)) ∧ + ∀ q : Fin S → Fin T → Fin T → Fin M → Fin Q.natDegree → ℤ, + Λ * iteratedDeriv m (fun z : ℂ => ∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, + (∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + ((q i j k μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) * z ^ (i : ℕ) * + Complex.exp ((((j : ℕ) : ℂ) * x₁ + ((k : ℕ) : ℂ) * x₂) * z)) + ((a : ℂ) * y₁ + (b : ℂ) * y₂) = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ + (∑ i : Fin S, ∑ j : Fin T, ∑ k : Fin T, ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + Polynomial.C (Polynomial.C (q i j k μ ν)) * R i j k μ ν)) + (κ κ' : ℝ) (hκ : 0 < κ) (hκ' : 0 < κ') : + ∃ k : ℝ, 0 < k ∧ ∀ C : ℝ, ∃ N₀ : ℕ, ∀ N : ℕ, N₀ < N → + ∀ M : ℕ, (M : ℝ) ≤ κ * ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → + ∀ q : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ → Fin (2 * N) → Fin (2 * N) → Fin M → + Fin Q.natDegree → ℤ, + (∀ i j k' μ ν, |((q i j k' μ ν : ℤ) : ℝ)| ≤ Real.exp (κ * ((N : ℝ) ^ 2 * + Real.sqrt (Real.log (N : ℝ))))) → + ∀ a b s : ℕ, a < 14 * ⌊(N : ℝ) / Real.sqrt (Real.log (N : ℝ))⌋₊ → b < 14 * ⌊(N : ℝ) * + Real.sqrt (Real.log (N : ℝ))⌋₊ → s < ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ / 2 → + iteratedDeriv s (fun z : ℂ => ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * + x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂) ≠ 0 → + ‖iteratedDeriv s (fun z : ℂ => ∑ i : Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊, + ∑ j : Fin (2 * N), ∑ k' : Fin (2 * N), + (fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' * z ^ (i : ℕ) * Complex.exp ((((j : ℕ) : ℂ) * + x₁ + ((k' : ℕ) : ℂ) * x₂) * z)) ((a : ℂ) * y₁ + (b : ℂ) * y₂)‖ + ≤ Real.exp (-(((N : ℝ) ^ 4 * Real.sqrt (Real.log (N : ℝ))) / κ')) → + ∃ P : Polynomial ℤ, P ≠ 0 ∧ + (∀ i : ℕ, |(P.coeff i : ℝ)| ≤ Real.exp (k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 * + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ))))) ∧ + (P.natDegree : ℝ) ≤ k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 / + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))) ∧ + ‖Polynomial.aeval ω P‖ < Real.exp (-(C * (k * (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 * + Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ)))) * (k * + (if (N : ℝ) ≤ 3 then (N : ℝ) - 3 + 9 / Real.sqrt (Real.log 3) else (N : ℝ) ^ 2 / + Real.sqrt (Real.log (N : ℝ)))))) := by + -- The presentation of the derivatives, the norm down to `ℚ(ω)`, and the growth bound for + -- the grid `T ≤ 14 N`. + obtain ⟨c, hc⟩ := hpres + obtain ⟨c₁, hc₁⟩ := exists_int_norm ω ω₁ Q hQm hQroot hQmin + -- `Q` is monic with `φ(Q) = 0`, so `Q ≠ 1` and `d > 0`. + have hQd : 0 < Q.natDegree := hQm.natDegree_pos.2 fun h1 => by + rw [h1, eval₂_one] at hQroot; exact one_ne_zero hQroot + obtain ⟨κ₅, hκ₅, hA5⟩ := exists_pow_mul_pow_le_exp_sq_mul_sqrt_log c 14 + -- One constant `k` for the height, the degree and the value. + have hlw : 0 ≤ Real.log (max 1 ‖ω‖) := Real.log_nonneg (le_max_left _ _) + obtain ⟨β, hβ⟩ : ∃ β : ℝ, β = 4 * κ * Q.natDegree + 6 + κ + κ₅ := ⟨_, rfl⟩ + obtain ⟨k, hk⟩ : ∃ k : ℝ, + k = Q.natDegree * (c₁ + β + (κ + 31 * c) * (1 + Real.log (max 1 ‖ω‖))) + κ₅ + 1 := + ⟨_, rfl⟩ + have hβ0 : 0 ≤ β := by rw [hβ]; positivity + have hk0 : 0 < k := by rw [hk]; positivity + refine ⟨k, hk0, fun C => ⟨max 3 ⌈Real.exp ((2 * κ' * (|C| * k ^ 2 + k + 1)) ^ 2)⌉₊, + fun N hN => ?_⟩⟩ + -- The scale `s = √(log N)`, with `s ≥ 2 κ' (|C| k² + k + 1)`. + have hN3 : 3 ≤ N := by omega + have hNr : (3 : ℝ) ≤ N := by exact_mod_cast hN3 + have hN3' : ¬ (N : ℝ) ≤ 3 := by + have : (4 : ℝ) ≤ N := by exact_mod_cast (by omega : 4 ≤ N) + linarith + have hL1 : 1 ≤ Real.log N := by + rw [Real.le_log_iff_exp_le (by positivity)]; have := Real.exp_one_lt_d9; linarith + have hLN : Real.log N ≤ N := by + have := Real.log_le_sub_one_of_pos (by positivity : (0 : ℝ) < N); linarith + have hs1 : 1 ≤ Real.sqrt (Real.log N) := Real.one_le_sqrt.2 hL1 + have hss := Real.mul_self_sqrt (by linarith : (0 : ℝ) ≤ Real.log N) + have hσ : 2 * κ' * (|C| * k ^ 2 + k + 1) ≤ Real.sqrt (Real.log N) := by + have h1 : Real.exp ((2 * κ' * (|C| * k ^ 2 + k + 1)) ^ 2) ≤ N := (Nat.le_ceil _).trans + (by exact_mod_cast (by omega : ⌈Real.exp ((2 * κ' * (|C| * k ^ 2 + k + 1)) ^ 2)⌉₊ ≤ N)) + rw [← Real.sqrt_sq (by positivity : 0 ≤ 2 * κ' * (|C| * k ^ 2 + k + 1))] + exact Real.sqrt_le_sqrt ((Real.le_log_iff_exp_le (by positivity)).2 h1) + generalize hs : Real.sqrt (Real.log (N : ℝ)) = s at hs1 hss hσ ⊢ + have hspos : 0 < s := by linarith + have hNN : (N : ℝ) * 1 ≤ N * N := mul_le_mul_of_nonneg_left (by linarith) (by positivity) + have hsN : s ≤ (N : ℝ) ^ 2 := by linarith [mul_le_mul_of_nonneg_left hs1 hspos.le] + -- The three floors, and `N t₁ ≤ N² / s`. + have hSr : (⌊(N : ℝ) ^ 2 / s⌋₊ : ℝ) ≤ (N : ℝ) ^ 2 / s := Nat.floor_le (by positivity) + have h1r : (⌊(N : ℝ) / s⌋₊ : ℝ) ≤ (N : ℝ) / s := Nat.floor_le (by positivity) + have h2r : (⌊(N : ℝ) * s⌋₊ : ℝ) ≤ (N : ℝ) * s := Nat.floor_le (by positivity) + generalize ⌊(N : ℝ) ^ 2 / s⌋₊ = S at hSr ⊢ + generalize ⌊(N : ℝ) / s⌋₊ = t₁ at h1r ⊢ + generalize ⌊(N : ℝ) * s⌋₊ = t₂ at h2r ⊢ + have hNt : (N : ℝ) * t₁ ≤ (N : ℝ) ^ 2 / s := + (mul_le_mul_of_nonneg_left h1r (Nat.cast_nonneg _)).trans_eq (by ring) + -- `A = N² s` and `B = N² / s`: `1 ≤ B ≤ A`, `log N ≤ A ≤ N⁴` and `A B = N⁴`. + have hSN : (S : ℝ) ≤ (N : ℝ) ^ 2 := hSr.trans (div_le_self (by positivity) hs1) + have hB1 : 1 ≤ (N : ℝ) ^ 2 / s := by rw [le_div_iff₀ hspos]; linarith + have hBA : (N : ℝ) ^ 2 / s ≤ (N : ℝ) ^ 2 * s := by + rw [div_le_iff₀ hspos, mul_assoc, hss] + linarith [mul_le_mul_of_nonneg_left hL1 (by positivity : (0 : ℝ) ≤ (N : ℝ) ^ 2)] + have hLA : Real.log N ≤ (N : ℝ) ^ 2 * s := by + linarith [mul_le_mul_of_nonneg_left hs1 (by positivity : (0 : ℝ) ≤ (N : ℝ) ^ 2)] + have hAN : (N : ℝ) ^ 2 * s ≤ (N : ℝ) ^ 4 := by + linarith [mul_le_mul_of_nonneg_left hsN (by positivity : (0 : ℝ) ≤ (N : ℝ) ^ 2)] + have hAB : (N : ℝ) ^ 2 * s * ((N : ℝ) ^ 2 / s) = (N : ℝ) ^ 4 := by + field_simp + generalize hA : (N : ℝ) ^ 2 * s = A at hBA hLA hAN hAB ⊢ + generalize hB : (N : ℝ) ^ 2 / s = B at hSr hB1 hBA hAB hNt ⊢ + have hA1 : 1 ≤ A := hB1.trans hBA + intro M hM q hqq a b m ha hb hm hne hsmall + have hmS : m ≤ S := by omega + -- `2 N a ≤ 28 B`, from `a < 14 t₁`. + have hNa : (2 * N * a : ℝ) ≤ 28 * B := by + have h14 : (a : ℝ) ≤ 14 * t₁ := by exact_mod_cast (by omega : a ≤ 14 * t₁) + linarith [mul_le_mul_of_nonneg_left h14 (by positivity : (0 : ℝ) ≤ 2 * N)] + -- `Λ F_q⁽ᵐ⁾(a y₁ + b y₂) = φ(Pol)`, with `|Λ|` and the lengths of the `R` at most `e^(κ₅ A)`. + obtain ⟨Λ, hΛ, hΛb, R, hRy, hRl, hRx, hRid⟩ := hc S (2 * N) M a b m + have h5 := hA5 N S (2 * N) a b m hN3 + rw [hs, hA, hB] at h5 + have hL5 := h5 hSr hmS (by omega) + (by have : (a : ℝ) ≤ 14 * t₁ := by exact_mod_cast (by omega : a ≤ 14 * t₁) + push_cast; linarith) + (by have : (b : ℝ) ≤ 14 * t₂ := by exact_mod_cast (by omega : b ≤ 14 * t₂) + push_cast; linarith) + have hΛe : ‖Λ‖ ≤ Real.exp (κ₅ * A) := by + refine hΛb.trans (le_trans ?_ hL5) + exact_mod_cast Nat.le_mul_of_pos_right _ (by positivity) + obtain ⟨Pol, hPol⟩ : ∃ Pol : Polynomial (Polynomial ℤ), Pol = ∑ i : Fin S, ∑ j : Fin (2 * N), + ∑ k' : Fin (2 * N), ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + Polynomial.C (Polynomial.C (q i j k' μ ν)) * R i j k' μ ν := ⟨_, rfl⟩ + have hval := hRid q + rw [← hPol] at hval + have hPol0 : eval₂ (eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ Pol ≠ 0 := by + rw [← hval]; exact mul_ne_zero hΛ hne + -- `Pol` has `Y`-degree below `d`, `X`-degree at most `e`, and length at most `e^(β A)`. + have hPy : Pol.natDegree < Q.natDegree := by + rw [hPol] + refine lt_of_le_of_lt (natDegree_sum_le_of_forall_le _ _ fun i _ => + natDegree_sum_le_of_forall_le _ _ fun j _ => natDegree_sum_le_of_forall_le _ _ fun k' _ => + natDegree_sum_le_of_forall_le _ _ fun μ _ => natDegree_sum_le_of_forall_le _ _ fun ν _ => + (natDegree_C_mul_le _ _).trans (Nat.le_sub_one_of_lt (hRy i j k' μ ν))) (by omega) + have hPx : ∀ r, (Pol.coeff r).natDegree ≤ M + c * (1 + m + S + 2 * N * a) := by + intro r + simp only [hPol, finsetSum_coeff, coeff_C_mul] + exact natDegree_sum_le_of_forall_le _ _ fun i _ => + natDegree_sum_le_of_forall_le _ _ fun j _ => natDegree_sum_le_of_forall_le _ _ fun k' _ => + natDegree_sum_le_of_forall_le _ _ fun μ _ => natDegree_sum_le_of_forall_le _ _ fun ν _ => + (natDegree_C_mul_le _ _).trans (hRx i j k' μ ν r) + obtain ⟨lP, hlP⟩ : ∃ lP : ℕ, ∑ k ∈ Pol.support, ∑ i ∈ (Pol.coeff k).support, + ((Pol.coeff k).coeff i).natAbs = lP := ⟨_, rfl⟩ + have hlPe : (lP : ℝ) ≤ Real.exp (β * A) := by + rw [← hlP, hPol] + refine (norm_to_polynomial_alg_column_length_sum_le _ _ _ fun i _ => + norm_to_polynomial_alg_column_length_sum_le _ _ _ fun j _ => + norm_to_polynomial_alg_column_length_sum_le _ _ _ fun k' _ => + norm_to_polynomial_alg_column_length_sum_le _ _ _ fun μ _ => + norm_to_polynomial_alg_column_length_sum_le _ _ _ fun ν _ => + norm_to_polynomial_alg_column_length_C_C_mul_le (hqq i j k' μ ν) ((Nat.cast_le.2 (hRl i j k' μ + ν)).trans hL5)).trans ?_ + simp only [Finset.card_univ, Fintype.card_fin] + push_cast + have hN6 : (N : ℝ) ^ 6 ≤ Real.exp (6 * A) := by + rw [← Real.exp_log (by positivity : (0 : ℝ) < (N : ℝ) ^ 6), Real.log_pow] + exact Real.exp_le_exp.2 (by push_cast; linarith) + have hMN : (M : ℝ) ≤ κ * (N : ℝ) ^ 2 := hM.trans (mul_le_mul_of_nonneg_left hSN hκ.le) + calc _ ≤ (N : ℝ) ^ 2 * (2 * N * (2 * N * (κ * (N : ℝ) ^ 2 * (Q.natDegree * + (Real.exp (κ * A) * Real.exp (κ₅ * A)))))) := by gcongr + _ = 4 * κ * Q.natDegree * (N : ℝ) ^ 6 * (Real.exp (κ * A) * Real.exp (κ₅ * A)) := by ring + _ ≤ Real.exp (4 * κ * Q.natDegree * A) * Real.exp (6 * A) * + (Real.exp (κ * A) * Real.exp (κ₅ * A)) := by + gcongr; exact norm_to_polynomial_alg_column_le_exp_mul (by positivity) hA1 + _ = Real.exp (β * A) := by rw [hβ]; simp only [add_mul, Real.exp_add]; ring + -- The norm `P` of `φ(Pol)`, and the three bounds. + obtain ⟨P, hP0, hPl, hPd, hPv⟩ := + hc₁ Pol lP (M + c * (1 + m + S + 2 * N * a)) hPy hlP.le hPx hPol0 + have he : ((M + c * (1 + m + S + 2 * N * a) : ℕ) : ℝ) ≤ (κ + 31 * c) * B := by + have hmS' : (m : ℝ) ≤ S := by exact_mod_cast hmS + have hc0 : (0 : ℝ) ≤ c := Nat.cast_nonneg c + push_cast + linarith [mul_le_mul_of_nonneg_left hSr hκ.le, mul_le_mul_of_nonneg_left hB1 hc0, + mul_le_mul_of_nonneg_left (hmS'.trans hSr) hc0, mul_le_mul_of_nonneg_left hSr hc0, + mul_le_mul_of_nonneg_left hNa hc0] + have hX : ((c₁ * lP : ℕ) : ℝ) ≤ Real.exp ((c₁ + β) * A) := by + rw [Nat.cast_mul, add_mul, Real.exp_add] + exact mul_le_mul (norm_to_polynomial_alg_column_le_exp_mul (Nat.cast_nonneg _) hA1) hlPe + (Nat.cast_nonneg _) + (Real.exp_pos _).le + have hd0 : (0 : ℝ) ≤ Q.natDegree := Nat.cast_nonneg _ + refine ⟨P, hP0, fun i => ?_, ?_, ?_⟩ + · -- the height + rw [ite_eq_right hN3', ← Int.cast_abs, ← Nat.cast_natAbs] + have h1 : ((P.coeff i).natAbs : ℝ) ≤ ((c₁ * lP : ℕ) : ℝ) ^ Q.natDegree := by + exact_mod_cast (norm_to_polynomial_alg_column_natAbs_coeff_le P i).trans hPl + refine h1.trans ((pow_le_pow_left₀ (Nat.cast_nonneg _) hX _).trans ?_) + rw [← Real.exp_nat_mul] + refine Real.exp_le_exp.2 ?_ + rw [hk] + linarith [mul_nonneg (by positivity : (0 : ℝ) ≤ + Q.natDegree * ((κ + 31 * c) * (1 + Real.log (max 1 ‖ω‖))) + κ₅ + 1) + (by linarith : (0 : ℝ) ≤ A)] + · -- the degree + rw [ite_eq_right hN3'] + have h1 : (P.natDegree : ℝ) ≤ + Q.natDegree * (((M + c * (1 + m + S + 2 * N * a) : ℕ) : ℝ) + c₁) := by + exact_mod_cast hPd + refine h1.trans ?_ + have hc₁B : (c₁ : ℝ) ≤ c₁ * B := le_mul_of_one_le_right (Nat.cast_nonneg _) hB1 + rw [hk] + linarith [mul_le_mul_of_nonneg_left (add_le_add he hc₁B) hd0, mul_nonneg (by positivity : + (0 : ℝ) ≤ Q.natDegree * (β + (κ + 31 * c) * Real.log (max 1 ‖ω‖)) + κ₅ + 1) + (by linarith : (0 : ℝ) ≤ B)] + · -- the value + rw [ite_eq_right hN3', ite_eq_right hN3'] + have hW : max 1 ‖ω‖ ^ (M + c * (1 + m + S + 2 * N * a)) ≤ + Real.exp ((κ + 31 * c) * Real.log (max 1 ‖ω‖) * A) := by + rw [← Real.exp_log (by positivity : (0 : ℝ) < max 1 ‖ω‖), ← Real.exp_nat_mul, Real.log_exp] + refine Real.exp_le_exp.2 ?_ + linarith [mul_le_mul_of_nonneg_right + (he.trans (mul_le_mul_of_nonneg_left hBA (by positivity))) hlw] + have hXW := pow_le_pow_left₀ (by positivity) (mul_le_mul hX hW (by positivity) + (Real.exp_pos _).le) Q.natDegree + rw [← Real.exp_add, ← Real.exp_nat_mul] at hXW + refine lt_of_le_of_lt (b := Real.exp (k * A - (N : ℝ) ^ 4 * s / κ')) (hPv.trans ?_) + (Real.exp_lt_exp.2 ?_) + · rw [← hval, norm_mul] + refine (mul_le_mul (mul_le_mul hΛe hsmall (norm_nonneg _) (Real.exp_pos _).le) hXW + (by positivity) (by positivity)).trans ?_ + rw [← Real.exp_add, ← Real.exp_add] + refine Real.exp_le_exp.2 ?_ + rw [hk] + linarith [mul_nonneg (by positivity : (0 : ℝ) ≤ Q.natDegree * (κ + 31 * c) + 1) + (by linarith : (0 : ℝ) ≤ A)] + · -- `k A - N⁴ s / κ' < -C (k A) (k B)`, since `A B = N⁴`, `A ≤ N⁴` and `s` is large. + have hN4 : (0 : ℝ) < (N : ℝ) ^ 4 := by positivity + have h1 : 2 * (|C| * k ^ 2 + k + 1) * (N : ℝ) ^ 4 ≤ (N : ℝ) ^ 4 * s / κ' := by + rw [le_div_iff₀ hκ']; linarith [mul_le_mul_of_nonneg_left hσ hN4.le] + have h2 : C * (k * A) * (k * B) ≤ |C| * k ^ 2 * (N : ℝ) ^ 4 := by + rw [show C * (k * A) * (k * B) = C * k ^ 2 * (A * B) by ring, hAB] + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_abs_self C) (by positivity)) hN4.le + have h3 : k * A ≤ k * (N : ℝ) ^ 4 := mul_le_mul_of_nonneg_left hAN hk0.le + linarith [mul_nonneg (mul_nonneg (abs_nonneg C) (sq_nonneg k)) hN4.le, mul_pos hk0 hN4] + +end FourExponentials diff --git a/LeanPool/FourExponentials/RankOneParametrization.lean b/LeanPool/FourExponentials/RankOneParametrization.lean new file mode 100644 index 0000000000..12a3a2d5ea --- /dev/null +++ b/LeanPool/FourExponentials/RankOneParametrization.lean @@ -0,0 +1,167 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Complex.Exponential +public import Mathlib.RingTheory.AlgebraicIndependent.TranscendenceBasis +public import Mathlib.RingTheory.Flat.FaithfullyFlat.Algebra +public import Mathlib.RingTheory.SimpleRing.Principal +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.FinCases +public import Mathlib.Tactic.LinearCombination + +/-! +# A rank-one matrix of logarithms + +Let $l_{11},l_{12},l_{21},l_{22}$ be non-zero complex numbers with every $e^{l_{ij}}$ algebraic, +$l_{11}l_{22}=l_{12}l_{21}$ and +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}[l_{11},l_{12},l_{21},l_{22}] \le1$, and suppose that +neither the rows nor the columns of $(l_{ij})$ are linearly dependent over $\mathbb{Q}$. Then there +are $x_1,x_2,y_1,y_2\in\mathbb{C}$, with $x_1,x_2$ linearly independent over $\mathbb{Q}$ and +likewise $y_1,y_2$, such that every $e^{x_iy_j}$ is algebraic and +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}[x_1,x_2,y_1,y_2] \le1$. + +Source: Elementary; as in [Wal73, § I]. + +## References + +* [Wal73] M. Waldschmidt, *Solution du huitième problème de Schneider*, J. Number Theory 5 (1973), + 191–202. + +From `Diaz/Mirror/rank_one_parametrization.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.rank_one_parametrization`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace FourExpRank + +/-- If everything in `T` is algebraic over a subalgebra `B` of transcendence degree at most one, +then so is the algebra generated by `T`. -/ +lemma trdeg_adjoin_tower (B : Subalgebra ℚ ℂ) (T : Set ℂ) (hB : Algebra.trdeg ℚ ↥B ≤ 1) + (halg : ∀ x ∈ T, IsAlgebraic ↥B x) : + Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ T) ≤ 1 := by + -- stated once, so that instance search does not have to rediscover them + have : FaithfulSMul ℚ ↥B := + (faithfulSMul_iff_algebraMap_injective ℚ ↥B).2 (algebraMap ℚ ↥B).injective + have : FaithfulSMul ↥B ↥(Algebra.adjoin ↥B T) := + (faithfulSMul_iff_algebraMap_injective _ _).2 fun x y h => by + have h' : (algebraMap ↥B ↥(Algebra.adjoin ↥B T) x : ℂ) = + (algebraMap ↥B ↥(Algebra.adjoin ↥B T) y : ℂ) := congrArg Subtype.val h + exact Subtype.ext h' + have hCalg : Algebra.IsAlgebraic ↥B ↥(Algebra.adjoin ↥B T) := by + rw [← Subalgebra.isAlgebraic_iff, Algebra.isAlgebraic_adjoin_iff] + exact halg + have hsum : Algebra.trdeg ℚ ↥B + Algebra.trdeg ↥B ↥(Algebra.adjoin ↥B T) + = Algebra.trdeg ℚ ↥(Algebra.adjoin ↥B T) := trdeg_add_eq ℚ ↥B + rw [show Algebra.trdeg ↥B ↥(Algebra.adjoin ↥B T) = 0 from trdeg_eq_zero, add_zero] at hsum + have hle : Algebra.adjoin ℚ T ≤ (Algebra.adjoin ↥B T).restrictScalars ℚ := + Algebra.adjoin_le fun x hx => Algebra.subset_adjoin hx + refine (trdeg_le_of_injective (Subalgebra.inclusion hle) + (Subalgebra.inclusion_injective hle)).trans ?_ + change Algebra.trdeg ℚ ↥(Algebra.adjoin ↥B T) ≤ 1 + rw [← hsum] + exact hB + +end FourExpRank + +/-- **A rank-one matrix of logarithms.** Let $l_{11},l_{12},l_{21},l_{22}$ be non-zero complex +numbers with every $e^{l_{ij}}$ algebraic, $l_{11}l_{22}=l_{12}l_{21}$ and +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}[l_{11},l_{12},l_{21},l_{22}] \le1$, and suppose that +neither the rows nor the columns of $(l_{ij})$ are linearly dependent over $\mathbb{Q}$. Then there +are $x_1,x_2,y_1,y_2\in\mathbb{C}$, with $x_1,x_2$ linearly independent over $\mathbb{Q}$ and +likewise $y_1,y_2$, such that every $e^{x_iy_j}$ is algebraic and +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}[x_1,x_2,y_1,y_2] \le1$. -/ +theorem rank_one_parametrization : + ∀ l₁₁ l₁₂ l₂₁ l₂₂ : ℂ, + IsAlgebraic ℚ (Complex.exp l₁₁) → IsAlgebraic ℚ (Complex.exp l₁₂) → + IsAlgebraic ℚ (Complex.exp l₂₁) → IsAlgebraic ℚ (Complex.exp l₂₂) → + l₁₁ ≠ 0 → l₁₂ ≠ 0 → l₂₁ ≠ 0 → l₂₂ ≠ 0 → + l₁₁ * l₂₂ = l₁₂ * l₂₁ → + Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({l₁₁, l₁₂, l₂₁, l₂₂} : Set ℂ)) ≤ 1 → + ¬ (∃ a b : ℚ, ¬(a = 0 ∧ b = 0) ∧ + (a : ℂ) * l₁₁ + (b : ℂ) * l₂₁ = 0 ∧ (a : ℂ) * l₁₂ + (b : ℂ) * l₂₂ = 0) → + ¬ (∃ a b : ℚ, ¬(a = 0 ∧ b = 0) ∧ + (a : ℂ) * l₁₁ + (b : ℂ) * l₁₂ = 0 ∧ (a : ℂ) * l₂₁ + (b : ℂ) * l₂₂ = 0) → + ∃ x₁ x₂ y₁ y₂ : ℂ, LinearIndependent ℚ ![x₁, x₂] ∧ LinearIndependent ℚ ![y₁, y₂] ∧ + (∀ i j : Fin 2, IsAlgebraic ℚ (Complex.exp (![x₁, x₂] i * ![y₁, y₂] j))) ∧ + Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂} : Set ℂ)) ≤ 1 := by + intro l₁₁ l₁₂ l₂₁ l₂₂ he11 he12 he21 he22 h11 h12 h21 h22 hrank htr hcols hrows + have ht12 : l₁₁ * (l₁₂ / l₁₁) = l₁₂ := by field_simp + have ht22 : l₂₁ * (l₁₂ / l₁₁) = l₂₂ := by + field_simp + linear_combination -hrank + refine ⟨l₁₁, l₂₁, 1, l₁₂ / l₁₁, ?_, ?_, ?_, ?_⟩ + · -- the first pair is independent over `ℚ` + rw [LinearIndependent.pair_iff] + intro a b hab + by_contra hne + refine hcols ⟨a, b, hne, ?_, ?_⟩ + · simpa [Rat.smul_def] using hab + · have h : (a : ℂ) * l₁₁ + (b : ℂ) * l₂₁ = 0 := by simpa [Rat.smul_def] using hab + have key : (a : ℂ) * l₁₂ + (b : ℂ) * l₂₂ = (l₁₂ / l₁₁) * ((a : ℂ) * l₁₁ + (b : ℂ) * l₂₁) := by + field_simp + linear_combination (b : ℂ) * hrank + rw [key, h, mul_zero] + · -- the second pair is independent over `ℚ` + rw [LinearIndependent.pair_iff] + intro a b hab + simp only [Rat.smul_def, mul_one] at hab + by_cases hb : b = 0 + · refine ⟨?_, hb⟩ + rw [hb] at hab + simpa using hab + · exfalso + have hbc : (b : ℂ) ≠ 0 := by exact_mod_cast hb + have hab' : (a : ℂ) * l₁₁ + (b : ℂ) * l₁₂ = 0 := by + have key : (a : ℂ) * l₁₁ + (b : ℂ) * l₁₂ = ((a : ℂ) + (b : ℂ) * (l₁₂ / l₁₁)) * l₁₁ := by + field_simp + rw [key, hab, zero_mul] + have hab'' : (a : ℂ) * l₂₁ + (b : ℂ) * l₂₂ = 0 := by + have key : (a : ℂ) * l₂₁ + (b : ℂ) * l₂₂ = (l₂₁ / l₁₁) * ((a : ℂ) * l₁₁ + (b : ℂ) * l₁₂) := + by + field_simp + linear_combination (b : ℂ) * hrank + rw [key, hab', mul_zero] + exact hrows ⟨a, b, fun hzero => hb hzero.2, hab', hab''⟩ + · -- the four exponentials + intro i j + fin_cases i <;> fin_cases j <;> + simp only [Nat.succ_eq_add_one, Nat.reduceAdd, Fin.zero_eta, Fin.isValue, + Matrix.cons_val_zero, Fin.mk_one, Matrix.cons_val_one, Matrix.cons_val_fin_one, mul_one, + ht12, ht22] + · exact he11 + · exact he12 + · exact he21 + · exact he22 + · -- transcendence degree + have htalg : IsAlgebraic ↥(Algebra.adjoin ℚ ({l₁₁, l₁₂, l₂₁, l₂₂} : Set ℂ)) (l₁₂ / l₁₁) := by + refine ⟨Polynomial.C ⟨l₁₁, Algebra.subset_adjoin (by simp)⟩ * Polynomial.X + - Polynomial.C ⟨l₁₂, Algebra.subset_adjoin (by simp)⟩, ?_, ?_⟩ + · intro hzero + have hc := congrArg (fun p => AddMonoidAlgebra.coeff p 1) hzero + simp only [AddMonoidAlgebra.coeff_sub, Finsupp.coe_sub, Pi.sub_apply, + Polynomial.coeff_mul_X, Polynomial.coeff_C, ↓reduceIte, + AddMonoidAlgebra.coeff_zero, Finsupp.coe_zero, Pi.zero_apply] at hc + exact h11 (by simpa using congrArg Subtype.val hc) + · simp [Polynomial.aeval_def, Polynomial.eval₂_sub, Polynomial.eval₂_mul, ht12] + refine FourExpRank.trdeg_adjoin_tower (Algebra.adjoin ℚ ({l₁₁, l₁₂, l₂₁, l₂₂} : Set ℂ)) _ htr ?_ + intro x hx + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hx + rcases hx with h | h | h | h <;> rw [h] + · exact isAlgebraic_algebraMap (⟨l₁₁, Algebra.subset_adjoin (by simp)⟩ : + ↥(Algebra.adjoin ℚ ({l₁₁, l₁₂, l₂₁, l₂₂} : Set ℂ))) + · exact isAlgebraic_algebraMap (⟨l₂₁, Algebra.subset_adjoin (by simp)⟩ : + ↥(Algebra.adjoin ℚ ({l₁₁, l₁₂, l₂₁, l₂₂} : Set ℂ))) + · exact isAlgebraic_one + · exact htalg + +end FourExponentials diff --git a/LeanPool/FourExponentials/SiegelAux.lean b/LeanPool/FourExponentials/SiegelAux.lean new file mode 100644 index 0000000000..a5f1c38f62 --- /dev/null +++ b/LeanPool/FourExponentials/SiegelAux.lean @@ -0,0 +1,288 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.SiegelEntrywise +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Complex.ExponentialBounds +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.GCongr +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# Solving the system + +Let $\omega,\omega_1\in\mathbb{C}$ and $Q\in\mathbb{Z}[X][Y]$ with $d=\deg_YQ\ge1$, such that no +non-zero $A\in\mathbb{Z}[X][Y]$ with $\deg_YA0$. There is $\kappa\ge\kappa_1$ such that for every large $N$, every $M$ with +$0 ∑ μ : Fin M, monomial (μ : ℕ) (a μ ν) + let P : Polynomial (Polynomial ℤ) := ∑ ν : Fin Q.natDegree, C (f ν) * X ^ (ν : ℕ) + have hdeg : P.degree < Q.natDegree := Polynomial.degree_sum_fin_lt f + have hnat : P.natDegree < Q.natDegree := by + by_cases hP : P = 0 + · rw [hP, natDegree_zero]; exact hQd + · exact (natDegree_lt_iff_degree_lt hP).2 hdeg + have hev : Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ P + = ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((a μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ) := by + simp only [P, f, eval₂_finsetSum, eval₂_mul, eval₂_C, eval₂_X_pow, Polynomial.coe_eval₂RingHom, + eval₂_monomial, eq_intCast, Finset.sum_mul] + rw [Finset.sum_comm] + intro h + apply ha + have hP0 := hQmin P hnat (by rw [hev]; exact h) + funext μ ν + have hc := congrArg (fun p : Polynomial (Polynomial ℤ) => (p.coeff ν).coeff μ) hP0 + simp only [P, f, finsetSum_coeff, coeff_C_mul_X_pow, coeff_zero, Fin.val_inj, Finset.sum_ite_eq, + Finset.sum_ite_eq', Finset.mem_univ, ite_true, coeff_monomial_apply] at hc + simpa using hc + +end FourExpSiegel + +open FourExpSiegel in +/-- **Solving the system.** Let $\omega,\omega_1\in\mathbb{C}$ and $Q\in\mathbb{Z}[X][Y]$ with +$d=\deg_YQ\ge1$, such that no non-zero $A\in\mathbb{Z}[X][Y]$ with $\deg_YA0$. There is $\kappa\ge\kappa_1$ such that for every large +$N$, every $M$ with $0 ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((q i j k' μ ν : ℤ) : ℂ) * + ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k' ≠ 0) ∧ + (∀ i j k', ‖(fun i j k' => ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, + ((q i j k' μ ν : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)) i j k'‖ ≤ Real.exp (κ * + ((N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ))))) := by + classical + set W : ℝ := max 1 ‖ω‖ with hW + set W₁ : ℝ := max 1 ‖ω₁‖ with hW₁ + have hW1 : 1 ≤ W := le_max_left _ _ + have hW₁1 : 1 ≤ W₁ := le_max_left _ _ + have hdpos : (0 : ℝ) < Q.natDegree := by exact_mod_cast hQd + refine ⟨κ₁ + 2, by linarith, + max 3 (max ⌈7776 * κ₁ * Q.natDegree⌉₊ (max ⌈W ^ (3 * κ₁)⌉₊ ⌈3 * Q.natDegree * Real.log W₁⌉₊)), + ?_⟩ + intro N hN M hM0 hMle R hR B hB + -- thresholds + have hN3 : (3 : ℝ) ≤ N := by + have : 3 ≤ N := (le_max_left _ _).trans hN.le + exact_mod_cast this + have hT2 : 7776 * κ₁ * Q.natDegree ≤ (N : ℝ) := by + have : ⌈7776 * κ₁ * Q.natDegree⌉₊ ≤ N := + ((le_max_left _ _).trans (le_max_right _ _)).trans hN.le + exact (Nat.le_ceil _).trans (by exact_mod_cast this) + have hT3 : W ^ (3 * κ₁) ≤ (N : ℝ) := by + have : ⌈W ^ (3 * κ₁)⌉₊ ≤ N := + (((le_max_left _ _).trans (le_max_right _ _)).trans (le_max_right _ _)).trans hN.le + exact (Nat.le_ceil _).trans (by exact_mod_cast this) + have hT4 : 3 * Q.natDegree * Real.log W₁ ≤ (N : ℝ) := by + have : ⌈3 * Q.natDegree * Real.log W₁⌉₊ ≤ N := + (((le_max_right _ _).trans (le_max_right _ _)).trans (le_max_right _ _)).trans hN.le + exact (Nat.le_ceil _).trans (by exact_mod_cast this) + -- logarithms + have hL1 : 1 ≤ Real.log (N : ℝ) := by + rw [Real.le_log_iff_exp_le (by linarith)] + have := Real.exp_one_lt_d9 + linarith + have hsL : 1 ≤ Real.sqrt (Real.log (N : ℝ)) := Real.one_le_sqrt.2 hL1 + have hsq : Real.sqrt (Real.log (N : ℝ)) * Real.sqrt (Real.log (N : ℝ)) = Real.log (N : ℝ) := + Real.mul_self_sqrt (by linarith) + have hN0 : (0 : ℝ) ≤ N := by linarith + set A := (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ)) with hA + have hN2A : (N : ℝ) ^ 2 ≤ A := le_mul_of_one_le_right (by positivity) hsL + have hA0 : 0 ≤ A := (by positivity : (0 : ℝ) ≤ (N : ℝ) ^ 2).trans hN2A + have hNN2 : (N : ℝ) ≤ (N : ℝ) ^ 2 := by nlinarith + -- sizes + have hSle : (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) ≤ (N : ℝ) ^ 2 / + Real.sqrt (Real.log (N : ℝ)) := Nat.floor_le (by positivity) + have hSle2 : (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) ≤ (N : ℝ) ^ 2 := + hSle.trans (div_le_self (by positivity) hsL) + have hS1 : 1 ≤ ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ := by + rw [Nat.one_le_floor_iff, one_le_div (by positivity)] + have hLN : Real.log (N : ℝ) ≤ N := by + have := Real.log_le_sub_one_of_pos (by linarith : (0 : ℝ) < N); linarith + nlinarith + have hMle2 : (M : ℝ) ≤ κ₁ * (N : ℝ) ^ 2 := hMle.trans (mul_le_mul_of_nonneg_left hSle2 hκ₁.le) + have hn : ((⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ * (2 * N) * (2 * N) * M * + Q.natDegree : ℕ) : ℝ) ≤ 4 * κ₁ * Q.natDegree * (N : ℝ) ^ 6 := by + push_cast + calc (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ : ℝ) * (2 * N) * (2 * N) * M * Q.natDegree ≤ + (N : ℝ) ^ 2 * (2 * N) * (2 * N) * (κ₁ * (N : ℝ) ^ 2) * Q.natDegree := by + gcongr + _ = 4 * κ₁ * Q.natDegree * (N : ℝ) ^ 6 := by ring + have h8 : ((N : ℝ) ^ 2 / 3) ^ 4 / 24 ≤ Real.exp ((N : ℝ) ^ 2 / 3) := by + have := Real.pow_div_factorial_le_exp (x := (N : ℝ) ^ 2 / 3) (by positivity) 4 + simpa [Nat.factorial] using this + have hnexp : ((⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ * (2 * N) * (2 * N) * M * + Q.natDegree : ℕ) : ℝ) ≤ Real.exp (A / 3) := by + have hN2big : 7776 * κ₁ * Q.natDegree ≤ (N : ℝ) ^ 2 := hT2.trans hNN2 + calc ((⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ * (2 * N) * (2 * N) * M * + Q.natDegree : ℕ) : ℝ) ≤ 4 * κ₁ * Q.natDegree * (N : ℝ) ^ 6 := hn + _ ≤ ((N : ℝ) ^ 2 / 3) ^ 4 / 24 := by + have h6 : 0 ≤ (N : ℝ) ^ 6 := by positivity + nlinarith + _ ≤ Real.exp ((N : ℝ) ^ 2 / 3) := h8 + _ ≤ Real.exp (A / 3) := Real.exp_le_exp.2 (by linarith) + have hWM : W ^ M ≤ Real.exp (A / 3) := by + have hlogW : 0 ≤ Real.log W := Real.log_nonneg hW1 + have h3 : 3 * κ₁ * Real.log W ≤ Real.log (N : ℝ) := by + have := Real.log_le_log (Real.rpow_pos_of_pos (by linarith) _) hT3 + rwa [Real.log_rpow (by linarith)] at this + rw [← Real.exp_log (by linarith : (0 : ℝ) < W), ← Real.exp_nat_mul] + apply Real.exp_le_exp.2 + have hMs : (M : ℝ) * Real.sqrt (Real.log (N : ℝ)) ≤ κ₁ * (N : ℝ) ^ 2 := by + have := mul_le_mul_of_nonneg_right hMle (Real.sqrt_nonneg (Real.log (N : ℝ))) + calc (M : ℝ) * Real.sqrt (Real.log (N : ℝ)) ≤ κ₁ * ⌊(N : ℝ) ^ 2 / + Real.sqrt (Real.log (N : ℝ))⌋₊ * Real.sqrt (Real.log (N : ℝ)) := this + _ ≤ κ₁ * ((N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))) * Real.sqrt (Real.log (N : ℝ)) := + by gcongr + _ = κ₁ * (N : ℝ) ^ 2 := by field_simp + have key : (M : ℝ) * Real.log W * Real.log (N : ℝ) ≤ A / 3 * Real.log (N : ℝ) := by + calc (M : ℝ) * Real.log W * Real.log (N : ℝ) = (M * Real.sqrt (Real.log (N : ℝ))) * + (Real.log W * Real.sqrt (Real.log (N : ℝ))) := by + rw [show (M : ℝ) * Real.log W * Real.log (N : ℝ) = (M : ℝ) * Real.log W * + (Real.sqrt (Real.log (N : ℝ)) * Real.sqrt (Real.log (N : ℝ))) by rw [hsq]] + ring + _ ≤ (κ₁ * (N : ℝ) ^ 2) * (Real.log W * Real.sqrt (Real.log (N : ℝ))) := by gcongr + _ = (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ)) / 3 * (3 * κ₁ * Real.log W) := by ring + _ ≤ (N : ℝ) ^ 2 * Real.sqrt (Real.log (N : ℝ)) / 3 * Real.log (N : ℝ) := by gcongr + _ = A / 3 * Real.log (N : ℝ) := by rw [hA] + exact le_of_mul_le_mul_right key (by linarith) + have hW₁d : W₁ ^ Q.natDegree ≤ Real.exp (A / 3) := by + rw [← Real.exp_log (by linarith : (0 : ℝ) < W₁), ← Real.exp_nat_mul] + apply Real.exp_le_exp.2 + linarith + -- Siegel + let β := Fin ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ × Fin (2 * N) × Fin (2 * + N) × Fin M × Fin Q.natDegree + have hβcard : Fintype.card β = ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ * (2 * N) * (2 * N) * + M * Q.natDegree := by + simp only [β, Fintype.card_prod, Fintype.card_fin]; ring + have hβpos : 0 < Fintype.card β := by + rw [hβcard] + have h2N : 0 < 2 * N := by + have : 3 ≤ N := (le_max_left _ _).trans hN.le + omega + positivity + set K := Real.exp (κ₁ * A) with hK + have hK1 : 1 ≤ K := Real.one_le_exp (mul_nonneg hκ₁.le hA0) + obtain ⟨t, ht0, hts, htb⟩ := Transcendence.siegel_entrywise + (fun (e : Fin R) (u : β) => B e u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2) + hβpos (by rw [Fintype.card_fin, hβcard]; exact hR) hK1 (fun e u => hB _ _ _ _ _ _) + have hqb : ∀ u : β, |((t u : ℤ) : ℝ)| ≤ Real.exp (A / 3) * K := by + intro u + refine (htb u).trans (mul_le_mul_of_nonneg_right ?_ (by positivity)) + rw [hβcard]; exact hnexp + have hfinal : Real.exp (A / 3) * K ≤ Real.exp ((κ₁ + 2) * A) := by + rw [hK, ← Real.exp_add]; apply Real.exp_le_exp.2; linarith + refine ⟨fun i j k' μ ν => t (i, j, k', μ, ν), fun e => ?_, fun i j k' μ ν => (hqb _).trans hfinal, + ?_, ?_⟩ + · have := hts e + simp only [β, Fintype.sum_prod_type] at this + exact this + · obtain ⟨u, hu⟩ := Function.ne_iff.1 ht0 + obtain ⟨i, j, k', μ, ν⟩ := u + refine ⟨i, j, k', c_ne_zero hQd hQmin (fun μ ν => t (i, j, k', μ, ν)) ?_⟩ + intro h + exact hu (congrFun (congrFun h μ) ν) + · intro i j k' + have hterm : ∀ μ : Fin M, ∀ ν : Fin Q.natDegree, + ‖((t (i, j, k', μ, ν) : ℤ) : ℂ) * ω ^ (μ : ℕ) * ω₁ ^ (ν : ℕ)‖ + ≤ Real.exp (A / 3) * K * (W ^ M * W₁ ^ Q.natDegree) := by + intro μ ν + rw [norm_mul, norm_mul, norm_pow, norm_pow, Complex.norm_intCast] + have hω : ‖ω‖ ^ (μ : ℕ) ≤ W ^ M := + (pow_le_pow_left₀ (norm_nonneg _) (le_max_right _ _) _).trans (pow_le_pow_right₀ hW1 μ.2.le) + have hω₁ : ‖ω₁‖ ^ (ν : ℕ) ≤ W₁ ^ Q.natDegree := + (pow_le_pow_left₀ (norm_nonneg _) (le_max_right _ _) _).trans (pow_le_pow_right₀ hW₁1 + ν.2.le) + calc |((t (i, j, k', μ, ν) : ℤ) : ℝ)| * ‖ω‖ ^ (μ : ℕ) * ‖ω₁‖ ^ (ν : ℕ) + ≤ (Real.exp (A / 3) * K) * W ^ M * W₁ ^ Q.natDegree := by gcongr; exact hqb _ + _ = Real.exp (A / 3) * K * (W ^ M * W₁ ^ Q.natDegree) := by ring + have hMd : (M : ℝ) * Q.natDegree ≤ Real.exp (A / 3) := by + refine le_trans ?_ hnexp + push_cast + have hS1' : (1 : ℝ) ≤ ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ := by exact_mod_cast hS1 + have h2N' : (1 : ℝ) ≤ 2 * N := by linarith + have h1 : (1 : ℝ) ≤ ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ * (2 * N) * (2 * N) := + one_le_mul_of_one_le_of_one_le (one_le_mul_of_one_le_of_one_le hS1' h2N') h2N' + calc (M : ℝ) * Q.natDegree = 1 * ((M : ℝ) * Q.natDegree) := by ring + _ ≤ (⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ * (2 * N) * (2 * N)) * ((M : ℝ) * + Q.natDegree) := + mul_le_mul_of_nonneg_right h1 (by positivity) + _ = ⌊(N : ℝ) ^ 2 / Real.sqrt (Real.log (N : ℝ))⌋₊ * (2 * N) * (2 * N) * M * Q.natDegree := + by ring + calc ‖∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ((t (i, j, k', μ, ν) : ℤ) : ℂ) * ω ^ (μ : ℕ) * + ω₁ ^ (ν : ℕ)‖ + ≤ ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, ‖((t (i, j, k', μ, ν) : ℤ) : ℂ) * ω ^ (μ : ℕ) * + ω₁ ^ (ν : ℕ)‖ := + (norm_sum_le _ _).trans (Finset.sum_le_sum fun μ _ => norm_sum_le _ _) + _ ≤ ∑ μ : Fin M, ∑ ν : Fin Q.natDegree, Real.exp (A / 3) * K * (W ^ M * W₁ ^ Q.natDegree) := + Finset.sum_le_sum fun μ _ => Finset.sum_le_sum fun ν _ => hterm μ ν + _ = ((M : ℝ) * Q.natDegree) * (Real.exp (A / 3) * K * (W ^ M * W₁ ^ Q.natDegree)) := by + simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul]; ring + _ ≤ Real.exp (A / 3) * (Real.exp (A / 3) * K * (Real.exp (A / 3) * Real.exp (A / 3))) := by + gcongr + _ ≤ Real.exp ((κ₁ + 2) * A) := by + rw [hK, ← Real.exp_add, ← Real.exp_add, ← Real.exp_add, ← Real.exp_add] + apply Real.exp_le_exp.2; linarith + +end FourExponentials diff --git a/LeanPool/FourExponentials/SiegelEntrywise.lean b/LeanPool/FourExponentials/SiegelEntrywise.lean new file mode 100644 index 0000000000..f618335ebf --- /dev/null +++ b/LeanPool/FourExponentials/SiegelEntrywise.lean @@ -0,0 +1,79 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.NumberTheory.SiegelsLemma +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity + +/-! +# Siegel's lemma with an entrywise bound + +Let `A` be an integer matrix with `m` rows, `n ≥ 2m` columns and entries of absolute value at most +`B ≥ 1`. With no rows, a unit vector is a non-zero siegel_entrywise of `A t = 0`. Otherwise Siegel's +lemma +gives a non-zero integer siegel_entrywise with `|t_b| ≤ (n · max(1, ‖A‖))^(m / (n - m))`, where `‖A‖ +≤ B` +is the largest absolute value of an entry. The exponent `m / (n - m)` lies in `[0, 1]` and +`n B ≥ 1`, so `|t_b| ≤ n B`. + +From `Diaz/Mirror/siegel_entrywise.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.siegel_entrywise`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +attribute [local instance] Matrix.seminormedAddCommGroup in +/-- **Siegel's lemma with an entrywise bound.** Let $A$ be an $m\times n$ matrix with integer +entries, where $n\ge1$ and $2m\le n$, and suppose that every entry satisfies $|A_{ab}|\le B$ for +some real $B\ge1$. Then there is $t\in\mathbb{Z}^{n}$, $t\neq0$, with $At=0$ and $|t_b|\le nB$ for +every $b$. -/ +theorem siegel_entrywise {α β : Type*} [Fintype α] [Fintype β] (A : Matrix α β ℤ) + (hβ : 0 < Fintype.card β) (hcard : 2 * Fintype.card α ≤ Fintype.card β) {B : ℝ} + (hB : 1 ≤ B) (hA : ∀ a b, |(A a b : ℝ)| ≤ B) : + ∃ t : β → ℤ, t ≠ 0 ∧ (∀ a, ∑ b, A a b * t b = 0) ∧ + ∀ b, |(t b : ℝ)| ≤ Fintype.card β * B := by + classical + have hn1 : (1 : ℝ) ≤ Fintype.card β := by exact_mod_cast hβ + rcases Nat.eq_zero_or_pos (Fintype.card α) with h0 | hpos + · -- no equations: a unit vector will do + obtain ⟨b0⟩ : Nonempty β := Fintype.card_pos_iff.1 hβ + have : IsEmpty α := Fintype.card_eq_zero_iff.1 h0 + refine ⟨Pi.single b0 1, fun h => by simpa using congrFun h b0, fun a => isEmptyElim a, + fun b => ?_⟩ + by_cases hb : b = b0 + · subst hb; simp; nlinarith + · simp only [ne_eq, hb, not_false_eq_true, Pi.single_eq_of_ne, Int.cast_zero, abs_zero] + positivity + · obtain ⟨t, ht0, hAt, hnorm⟩ := + Int.Matrix.exists_ne_zero_int_vec_norm_le A (by omega) hpos + refine ⟨t, ht0, fun a => by simpa [Matrix.mulVec, dotProduct] using congrFun hAt a, + fun b => ?_⟩ + have hmax : max 1 ‖A‖ ≤ B := max_le hB <| (Matrix.norm_le_iff (by linarith)).2 + fun i j => by rw [Int.norm_eq_abs]; exact hA i j + have h2 : (2 : ℝ) * Fintype.card α ≤ Fintype.card β := by exact_mod_cast hcard + have hm : (0 : ℝ) < Fintype.card α := by exact_mod_cast hpos + -- with at least twice as many unknowns as equations the Siegel exponent is at most one + have he1 : ((Fintype.card α : ℕ) : ℝ) / ((Fintype.card β : ℕ) - (Fintype.card α : ℕ)) ≤ 1 := by + rw [div_le_one (by linarith)]; linarith + have he0 : (0 : ℝ) ≤ ((Fintype.card α : ℕ) : ℝ) / ((Fintype.card β : ℕ) - (Fintype.card α : ℕ)) + := + div_nonneg hm.le (by linarith) + have hbase : (1 : ℝ) ≤ Fintype.card β * B := by nlinarith + calc |(t b : ℝ)| = ‖t b‖ := (Int.norm_eq_abs _).symm + _ ≤ ‖t‖ := norm_le_pi_norm t b + _ ≤ _ := hnorm + _ ≤ ((Fintype.card β : ℝ) * B) ^ (((Fintype.card α : ℕ) : ℝ) / + ((Fintype.card β : ℕ) - (Fintype.card α : ℕ))) := + Real.rpow_le_rpow (by positivity) (mul_le_mul_of_nonneg_left hmax (by positivity)) he0 + _ ≤ ((Fintype.card β : ℝ) * B) ^ (1 : ℝ) := Real.rpow_le_rpow_of_exponent_le hbase he1 + _ = Fintype.card β * B := Real.rpow_one _ + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/SmallIrreducibleFactor.lean b/LeanPool/FourExponentials/SmallIrreducibleFactor.lean new file mode 100644 index 0000000000..abb1e0dee2 --- /dev/null +++ b/LeanPool/FourExponentials/SmallIrreducibleFactor.lean @@ -0,0 +1,176 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.ExistsIrreducibleFactorCofactorBound +public import Mathlib.Analysis.Complex.ExponentialBounds +public import Mathlib.Tactic.Choose +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# A small irreducible factor (Gel'fond's lemma) + +Let `P ∈ ℤ[X]` be primitive, with coefficients at most `H` and degree `d ≤ n ≤ log H`, and +`|P(α)| < H^(-λ n)`. A primitive constant is `±1`, whose value `1` is not small, so `d > 0`. The +multiplicative step of Gel'fond's lemma writes `P = Q^e R` with `Q` irreducible of positive degree +`δ` and `1 ≤ 2^(δ r) M(Q)^r M(R)^δ |R(α)|`, where `r = deg R` and `M` is the Mahler measure. + +Put `L = log H`, `a = log M(Q) ≥ 0` and `b = log M(R) ≥ 0`. From +`M(Q)^e M(R) = M(P) ≤ √(d+1) H ≤ exp(d) H` we get `e a + b ≤ d + L`, so `a, b ≤ d + L ≤ 2L`. As +`δ, r ≤ d ≤ n ≤ L`, the logarithm of `2^(δ r) M(Q)^r M(R)^δ` is at most `nL + 2nL + 2nL`, and +`e log |Q(α)| < -λ n L - log |R(α)| ≤ -(λ - 5) n L`. For the coefficients, +`|Q_i| ≤ C(δ, i) M(Q) ≤ 2^δ M(Q)` and `e (δ log 2 + a) ≤ e δ + d + L ≤ 2n + L`. Finally +`e δ ≤ d ≤ n`. The multiplicity `e` is the `s` of the statement. + +From `Diaz/Mirror/small_irreducible_factor.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.small_irreducible_factor`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Polynomial + +/-- **Gel'fond's lemma.** Let $\alpha\in\mathbb{C}$ be transcendental and let $P\in\mathbb{Z}[X]$ be +primitive, with every coefficient of absolute value at most $H$. Let $n,\lambda\in\mathbb{R}$ with +$\deg P\le n\le\log H$ and $\lambda>6$. If $|P(\alpha)| simp [h] + have h2 : H ^ (-(lam * n)) ≤ 1 := Real.rpow_le_one_of_one_le_of_nonpos hH1 (by nlinarith) + linarith + obtain ⟨Q, R, e, hQirr, hQpos, he, hPeq, hgood⟩ := + Transcendence.exists_irreducible_factor_cofactor_bound P hdpos α + have hR0 : R ≠ 0 := by rintro rfl; exact hP0 (by rw [hPeq, mul_zero]) + have hdeg_eq : (P.natDegree : ℝ) = e * Q.natDegree + R.natDegree := by + rw [hPeq, natDegree_mul (pow_ne_zero _ hQirr.ne_zero) hR0, natDegree_pow]; push_cast; ring + have he' : (0 : ℝ) < e := by exact_mod_cast he + have he1 : (1 : ℝ) ≤ e := by exact_mod_cast he + -- Mahler measures: `M(Q)^e M(R) = M(P) ≤ √(d+1) H ≤ exp(d) H` + set MQ := (Q.map (Int.castRingHom ℂ)).mahlerMeasure with hMQ + set MR := (R.map (Int.castRingHom ℂ)).mahlerMeasure with hMR + have hMQ1 : 1 ≤ MQ := one_le_mahlerMeasure_of_ne_zero hQirr.ne_zero + have hMR1 : 1 ≤ MR := one_le_mahlerMeasure_of_ne_zero hR0 + have hB : MQ ^ e * MR ≤ Real.exp P.natDegree * H := by + have heq : (P.map (Int.castRingHom ℂ)).mahlerMeasure = MQ ^ e * MR := by + rw [hPeq, Polynomial.map_mul, Polynomial.map_pow, mahlerMeasure_mul, + ← Multiset.prod_replicate, + prod_mahlerMeasure_eq_mahlerMeasure_prod, Multiset.map_replicate, Multiset.prod_replicate] + have hsup : (P.map (Int.castRingHom ℂ)).supNorm ≤ H := by + obtain ⟨j, hj⟩ := (P.map (Int.castRingHom ℂ)).exists_eq_supNorm + rw [hj, coeff_map, eq_intCast, Complex.norm_intCast] + exact hPH j + have hsq : √((P.natDegree : ℝ) + 1) ≤ Real.exp P.natDegree := by + rw [Real.sqrt_le_left (Real.exp_pos _).le, sq, ← Real.exp_add] + linarith [Real.add_one_le_exp (P.natDegree : ℝ), Real.exp_le_exp.2 + (by linarith : (P.natDegree : ℝ) ≤ P.natDegree + P.natDegree)] + have hM := mahlerMeasure_le_sqrt_natDegree_add_one_mul_supNorm (P.map (Int.castRingHom ℂ)) + rw [natDegree_map_eq_of_injective Int.cast_injective, heq] at hM + exact hM.trans (mul_le_mul hsq hsup (supNorm_nonneg _) (Real.exp_pos _).le) + -- the same bounds in logarithmic form + have ha : 0 ≤ Real.log MQ := Real.log_nonneg hMQ1 + have hb : 0 ≤ Real.log MR := Real.log_nonneg hMR1 + have hab : e * Real.log MQ + Real.log MR ≤ P.natDegree + Real.log H := by + have h := Real.log_le_log (by positivity) hB + rwa [Real.log_mul (by positivity) (by positivity), Real.log_pow, + Real.log_mul (Real.exp_pos _).ne' hH0.ne', Real.log_exp] at h + have hvR : 0 < ‖aeval α R‖ := by + rcases (norm_nonneg (aeval α R)).eq_or_lt with h0 | h0 + · rw [← h0, mul_zero] at hgood; linarith + · exact h0 + have hgood' : 0 ≤ (Q.natDegree * R.natDegree : ℝ) * Real.log 2 + R.natDegree * Real.log MQ + + Q.natDegree * Real.log MR + Real.log ‖aeval α R‖ := by + have h := Real.log_le_log one_pos hgood + rwa [Real.log_one, Real.log_mul (by positivity) hvR.ne', Real.log_mul (by positivity) + (by positivity), Real.log_mul (by positivity) (by positivity), Real.log_pow, Real.log_pow, + Real.log_pow, Nat.cast_mul] at h + have hl2 : Real.log 2 ≤ 1 := by linarith [Real.log_two_lt_d9] + have hδd : (e * Q.natDegree : ℝ) ≤ P.natDegree := by + rw [hdeg_eq]; linarith [R.natDegree.cast_nonneg (α := ℝ)] + have hδ : (Q.natDegree : ℝ) ≤ P.natDegree := + (le_mul_of_one_le_left (Nat.cast_nonneg _) he1).trans hδd + have hr : (R.natDegree : ℝ) ≤ P.natDegree := by + rw [hdeg_eq]; nlinarith [(Q.natDegree).cast_nonneg (α := ℝ)] + have ha' : Real.log MQ ≤ P.natDegree + Real.log H := by + linarith [le_mul_of_one_le_left ha he1] + have hb' : Real.log MR ≤ P.natDegree + Real.log H := by nlinarith + refine ⟨Q, ⟨Q ^ (e - 1) * R, by rw [hPeq, ← mul_assoc, ← pow_succ', Nat.sub_add_cancel he]⟩, + hQirr.isPrimitive hQpos.ne', hQirr, e, he, ?_, fun i => ?_, ?_⟩ + · -- the value at `α` + rw [Real.rpow_def_of_pos hH0] + rcases (norm_nonneg (aeval α Q)).eq_or_lt with h0 | hvQ + · rw [← h0]; exact Real.exp_pos _ + have hsm : e * Real.log ‖aeval α Q‖ + Real.log ‖aeval α R‖ < Real.log H * (-(lam * n)) := by + have h : ‖aeval α Q‖ ^ e * ‖aeval α R‖ < Real.exp (Real.log H * (-(lam * n))) := by + rw [← Real.rpow_def_of_pos hH0] + calc _ = ‖aeval α P‖ := by rw [hPeq, map_mul, map_pow, norm_mul, norm_pow] + _ < _ := hsmall + have h' := Real.log_lt_log (by positivity) h + rwa [Real.log_mul (by positivity) hvR.ne', Real.log_pow, Real.log_exp] at h' + have hK : (Q.natDegree * R.natDegree : ℝ) * Real.log 2 + R.natDegree * Real.log MQ + + Q.natDegree * Real.log MR ≤ 5 * n * Real.log H := by + have h1 : (Q.natDegree * R.natDegree : ℝ) ≤ n * Real.log H := + mul_le_mul (hδ.trans hdeg) (hr.trans (hdeg.trans hlog)) (Nat.cast_nonneg _) hn0 + have h2 : (R.natDegree : ℝ) * Real.log MQ ≤ n * (2 * Real.log H) := + mul_le_mul (hr.trans hdeg) (by linarith) ha hn0 + have h3 : (Q.natDegree : ℝ) * Real.log MR ≤ n * (2 * Real.log H) := + mul_le_mul (hδ.trans hdeg) (by linarith) hb hn0 + nlinarith [mul_le_mul_of_nonneg_left hl2 + (by positivity : (0 : ℝ) ≤ Q.natDegree * R.natDegree)] + rw [← Real.log_lt_iff_lt_exp hvQ, + show Real.log H * -((lam - 6) * n / e) = -((lam - 6) * n * Real.log H) / e by ring, + lt_div_iff₀ he'] + linarith [mul_nonneg hn0 hL0] + · -- the coefficients + have hc := norm_coeff_le_choose_mul_mahlerMeasure i (Q.map (Int.castRingHom ℂ)) + rw [natDegree_map_eq_of_injective Int.cast_injective, coeff_map, eq_intCast, + Complex.norm_intCast] at hc + have hch : ((Q.natDegree.choose i : ℕ) : ℝ) ≤ 2 ^ Q.natDegree := by + exact_mod_cast Nat.choose_le_two_pow _ _ + refine hc.trans ((mul_le_mul_of_nonneg_right hch (by positivity)).trans ?_) + have h2 : (2 : ℝ) ^ Q.natDegree * MQ = Real.exp (Q.natDegree * Real.log 2 + Real.log MQ) := by + rw [Real.exp_add, Real.exp_nat_mul, Real.exp_log two_pos, Real.exp_log (by positivity)] + rw [h2, Real.rpow_def_of_pos hH0, ← Real.exp_add] + refine Real.exp_le_exp.2 ?_ + rw [show Real.log H * (1 / e) + 2 * n / e = (Real.log H + 2 * n) / e by ring, le_div_iff₀ he', + show (Q.natDegree * Real.log 2 + Real.log MQ) * e = + e * Q.natDegree * Real.log 2 + e * Real.log MQ by ring] + linarith [mul_le_of_le_one_right (by positivity : (0 : ℝ) ≤ e * Q.natDegree) hl2] + · -- the degree + rw [le_div_iff₀ he'] + linarith + +end FourExponentials diff --git a/LeanPool/FourExponentials/SmallPolynomialsOfColumn.lean b/LeanPool/FourExponentials/SmallPolynomialsOfColumn.lean new file mode 100644 index 0000000000..389f9934c5 --- /dev/null +++ b/LeanPool/FourExponentials/SmallPolynomialsOfColumn.lean @@ -0,0 +1,75 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.AuxiliaryConstructionColumn +public import LeanPool.FourExponentials.NonvanishingDerivative +public import Mathlib.Tactic.Choose + +/-! +# Small integer polynomials at `ω`, in the column case + +As in `small_polynomials_of_counterexample`: `auxiliary_construction_column` +supplies, for each large `N`, an exponential polynomial whose zero count is exceeded on a grid of +points `a y₁ + b y₂`, and turns any non-zero derivative there into a small integer polynomial. +`nonvanishing_derivative` supplies that non-zero derivative, since `x` and `y` are +`ℚ`-linearly independent. A choice for each `N` gives the sequence `P_N`. + +From `Diaz/Mirror/small_polynomials_of_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.small_polynomials_of_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Filter Topology + +/-- **One algebraic column gives small polynomials.** Let $x_1,x_2,y_1,y_2$ satisfy the column +hypotheses. Then there are a transcendental $\omega\in\mathbb{C}$, functions $\sigma_1,\sigma_2$ and +constants $a_1,a_2\ge1$ satisfying the hypotheses of Theorem , such that for every $C\in\mathbb{R}$ +there is $N_0$ and for every $N>N_0$ a polynomial $P_N\in\mathbb{Z}[X]$ that is small at $\omega$ +for $(N,C)$ with respect to $\sigma_1,\sigma_2$. -/ +theorem small_polynomials_of_column : + ∀ x₁ x₂ y₁ y₂ : ℂ, LinearIndependent ℚ ![x₁, x₂] → LinearIndependent ℚ ![y₁, y₂] → + IsAlgebraic ℚ (Complex.exp (x₁ * y₂)) → IsAlgebraic ℚ (Complex.exp (x₂ * y₂)) → + Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), + Complex.exp (x₂ * y₁)} : Set ℂ)) ≤ 1 → + ∃ ω : ℂ, Transcendental ℚ ω ∧ + ∃ σ₁ σ₂ : ℝ → ℝ, StrictMono σ₁ ∧ StrictMono σ₂ ∧ + Tendsto σ₁ atTop atTop ∧ Tendsto σ₂ atTop atTop ∧ + ∃ a₁ a₂ : ℝ, 1 ≤ a₁ ∧ 1 ≤ a₂ ∧ + (∀ x : ℝ, 0 < x → σ₂ x ≤ σ₁ x) ∧ + (∀ x : ℝ, 0 < x → σ₁ (x + 1) ≤ a₁ * σ₁ x) ∧ + (∀ x : ℝ, 0 < x → σ₂ (x + 1) ≤ a₂ * σ₂ x) ∧ + ∀ C : ℝ, ∃ N₀ : ℕ, ∃ P : ℕ → Polynomial ℤ, ∀ N : ℕ, N₀ < N → + P N ≠ 0 ∧ + (∀ i : ℕ, |((P N).coeff i : ℝ)| ≤ Real.exp (σ₁ N)) ∧ + ((P N).natDegree : ℝ) ≤ σ₂ N ∧ + ‖Polynomial.aeval ω (P N)‖ < Real.exp (-(C * σ₁ N * σ₂ N)) := by + intro x₁ x₂ y₁ y₂ hx hy h₁₂ h₂₂ htr + obtain ⟨ω, hω, σ₁, σ₂, hm₁, hm₂, ht₁, ht₂, a₁, a₂, ha₁, ha₂, h₂₁, hg₁, hg₂, hC⟩ := + auxiliary_construction_column x₁ x₂ y₁ y₂ hx hy h₁₂ h₂₂ htr + refine ⟨ω, hω, σ₁, σ₂, hm₁, hm₂, ht₁, ht₂, a₁, a₂, ha₁, ha₂, h₂₁, hg₁, hg₂, fun C => ?_⟩ + obtain ⟨N₀, hN⟩ := hC C + -- for each large `N`, a small polynomial + have key : ∀ N : ℕ, N₀ < N → ∃ P : Polynomial ℤ, P ≠ 0 ∧ + (∀ i : ℕ, |(P.coeff i : ℝ)| ≤ Real.exp (σ₁ N)) ∧ + (P.natDegree : ℝ) ≤ σ₂ N ∧ + ‖Polynomial.aeval ω P‖ < Real.exp (-(C * σ₁ N * σ₂ N)) := by + intro N hN' + obtain ⟨S, T, R₁, R₂, S', c, hc, ⟨lam, hlam, hcount⟩, himp⟩ := hN N hN' + obtain ⟨a, b, s, ha, hb, hs, hne⟩ := + nonvanishing_derivative x₁ x₂ y₁ y₂ hx hy S T R₁ R₂ S' c hc lam hlam hcount + exact himp a b s ha hb hs hne + -- one choice for each `N` + classical + refine ⟨N₀, fun N => if h : N₀ < N then Classical.choose (key N h) else 0, fun N hN' => ?_⟩ + simp only [dite_eq_left hN'] + exact Classical.choose_spec (key N hN') + +end FourExponentials diff --git a/LeanPool/FourExponentials/SmallPolynomialsOfCounterexample.lean b/LeanPool/FourExponentials/SmallPolynomialsOfCounterexample.lean new file mode 100644 index 0000000000..7200d882dc --- /dev/null +++ b/LeanPool/FourExponentials/SmallPolynomialsOfCounterexample.lean @@ -0,0 +1,101 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.AuxiliaryConstruction +public import LeanPool.FourExponentials.NonvanishingDerivative +public import Mathlib.Tactic.Choose + +/-! +# A counterexample gives small polynomials + +Let $l_{11},l_{12},l_{21},l_{22}$ be non-zero complex numbers with every $e^{l_{ij}}$ algebraic, +$l_{11}l_{22}=l_{12}l_{21}$ and +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}[l_{11},l_{12},l_{21},l_{22}] \le1$, and suppose that +neither the rows nor the columns of $(l_{ij})$ are linearly dependent over $\mathbb{Q}$. Then there +are a transcendental $\omega\in\mathbb{C}$, functions $\sigma_1,\sigma_2$ and constants +$a_1,a_2\ge1$ satisfying the hypotheses of Theorem , such that for every $C\in\mathbb{R}$ there is +$N_0$ and for every $N>N_0$ a polynomial $P_N\in\mathbb{Z}[X]$ that is small at $\omega$ for $(N,C)$ +with respect to $\sigma_1,\sigma_2$. + +Source: [Wal73, § III, Lemmes 4–7], with the zero estimate of [Wal71, §4, Lemme 3]; see also +[Bro74]. + +## References + +* [Bro74] W. D. Brownawell, *The algebraic independence of certain numbers related by the + exponential function*, J. Number Theory 6 (1974), 22–31. +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. +* [Wal73] M. Waldschmidt, *Solution du huitième problème de Schneider*, J. Number Theory 5 (1973), + 191–202. + +From `Diaz/Mirror/small_polynomials_of_counterexample.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.small_polynomials_of_counterexample`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Filter Topology + +-- `auxiliary_construction` supplies, for each large `N`, an exponential polynomial whose +-- zero count is exceeded on a grid of points, and turns any non-zero derivative there into a small +-- integer polynomial. `nonvanishing_derivative` supplies that non-zero derivative. +/-- **A counterexample gives small polynomials.** Let $l_{11},l_{12},l_{21},l_{22}$ be non-zero +complex numbers with every $e^{l_{ij}}$ algebraic, $l_{11}l_{22}=l_{12}l_{21}$ and +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}[l_{11},l_{12},l_{21},l_{22}] \le1$, and suppose that +neither the rows nor the columns of $(l_{ij})$ are linearly dependent over $\mathbb{Q}$. Then there +are a transcendental $\omega\in\mathbb{C}$, functions $\sigma_1,\sigma_2$ and constants +$a_1,a_2\ge1$ satisfying the hypotheses of Theorem , such that for every $C\in\mathbb{R}$ there is +$N_0$ and for every $N>N_0$ a polynomial $P_N\in\mathbb{Z}[X]$ that is small at $\omega$ for $(N,C)$ +with respect to $\sigma_1,\sigma_2$. -/ +theorem small_polynomials_of_counterexample : + ∀ l₁₁ l₁₂ l₂₁ l₂₂ : ℂ, + IsAlgebraic ℚ (Complex.exp l₁₁) → IsAlgebraic ℚ (Complex.exp l₁₂) → + IsAlgebraic ℚ (Complex.exp l₂₁) → IsAlgebraic ℚ (Complex.exp l₂₂) → + l₁₁ ≠ 0 → l₁₂ ≠ 0 → l₂₁ ≠ 0 → l₂₂ ≠ 0 → + l₁₁ * l₂₂ = l₁₂ * l₂₁ → + Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({l₁₁, l₁₂, l₂₁, l₂₂} : Set ℂ)) ≤ 1 → + ¬ (∃ a b : ℚ, ¬(a = 0 ∧ b = 0) ∧ + (a : ℂ) * l₁₁ + (b : ℂ) * l₂₁ = 0 ∧ (a : ℂ) * l₁₂ + (b : ℂ) * l₂₂ = 0) → + ¬ (∃ a b : ℚ, ¬(a = 0 ∧ b = 0) ∧ + (a : ℂ) * l₁₁ + (b : ℂ) * l₁₂ = 0 ∧ (a : ℂ) * l₂₁ + (b : ℂ) * l₂₂ = 0) → + ∃ ω : ℂ, Transcendental ℚ ω ∧ + ∃ σ₁ σ₂ : ℝ → ℝ, StrictMono σ₁ ∧ StrictMono σ₂ ∧ + Tendsto σ₁ atTop atTop ∧ Tendsto σ₂ atTop atTop ∧ + ∃ a₁ a₂ : ℝ, 1 ≤ a₁ ∧ 1 ≤ a₂ ∧ + (∀ x : ℝ, 0 < x → σ₂ x ≤ σ₁ x) ∧ + (∀ x : ℝ, 0 < x → σ₁ (x + 1) ≤ a₁ * σ₁ x) ∧ + (∀ x : ℝ, 0 < x → σ₂ (x + 1) ≤ a₂ * σ₂ x) ∧ + ∀ C : ℝ, ∃ N₀ : ℕ, ∃ P : ℕ → Polynomial ℤ, ∀ N : ℕ, N₀ < N → + P N ≠ 0 ∧ + (∀ i : ℕ, |((P N).coeff i : ℝ)| ≤ Real.exp (σ₁ N)) ∧ + ((P N).natDegree : ℝ) ≤ σ₂ N ∧ + ‖Polynomial.aeval ω (P N)‖ < Real.exp (-(C * σ₁ N * σ₂ N)) := by + intro l₁₁ l₁₂ l₂₁ l₂₂ e₁₁ e₁₂ e₂₁ e₂₂ n₁₁ n₁₂ n₂₁ n₂₂ hdet htr hrows hcols + obtain ⟨ω, hω, σ₁, σ₂, hm₁, hm₂, ht₁, ht₂, a₁, a₂, ha₁, ha₂, h₂₁, hg₁, hg₂, + x₁, x₂, y₁, y₂, hx, hy, hC⟩ := + auxiliary_construction l₁₁ l₁₂ l₂₁ l₂₂ e₁₁ e₁₂ e₂₁ e₂₂ n₁₁ n₁₂ n₂₁ n₂₂ hdet htr hrows hcols + refine ⟨ω, hω, σ₁, σ₂, hm₁, hm₂, ht₁, ht₂, a₁, a₂, ha₁, ha₂, h₂₁, hg₁, hg₂, fun C => ?_⟩ + obtain ⟨N₀, hN⟩ := hC C + have key : ∀ N : ℕ, N₀ < N → ∃ P : Polynomial ℤ, P ≠ 0 ∧ + (∀ i : ℕ, |(P.coeff i : ℝ)| ≤ Real.exp (σ₁ N)) ∧ + (P.natDegree : ℝ) ≤ σ₂ N ∧ + ‖Polynomial.aeval ω P‖ < Real.exp (-(C * σ₁ N * σ₂ N)) := by + intro N hN' + obtain ⟨S, T, R₁, R₂, S', c, hc, ⟨lam, hlam, hcount⟩, himp⟩ := hN N hN' + obtain ⟨a, b, s, ha, hb, hs, hne⟩ := + nonvanishing_derivative x₁ x₂ y₁ y₂ hx hy S T R₁ R₂ S' c hc lam hlam hcount + exact himp a b s ha hb hs hne + classical + refine ⟨N₀, fun N => if h : N₀ < N then Classical.choose (key N h) else 0, fun N hN' => ?_⟩ + simp only [dite_eq_left hN'] + exact Classical.choose_spec (key N hN') + +end FourExponentials diff --git a/LeanPool/FourExponentials/TranscendenceCriterion.lean b/LeanPool/FourExponentials/TranscendenceCriterion.lean new file mode 100644 index 0000000000..b326977764 --- /dev/null +++ b/LeanPool/FourExponentials/TranscendenceCriterion.lean @@ -0,0 +1,209 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.TranscendenceCriterionContinuous +public import Mathlib.Order.Filter.Defs +public import Mathlib.Tactic.FunProp +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Ring + +/-! +# Waldschmidt's transcendence criterion + +Let $\alpha\in\mathbb{C}$ and $\varepsilon>0$. Let $\sigma_1,\sigma_2\colon\mathbb{R}\to\mathbb{R}$ +be strictly increasing and tending to $+\infty$, and let $a_1,a_2\ge1$ be such that for every $x>0$ +$$ \sigma_2(x)\le\sigma_1(x),\qquad\sigma_i(x+1)\le a_i\,\sigma_i(x)\quad(i=1,2). $$ +Put $C=\max\{10+\varepsilon,(4+\varepsilon)a_1a_2\}$. Suppose that for every integer $N>N_0$ there +is a non-zero $P_N\in\mathbb{Z}[X]$ with every coefficient of absolute value at most +$e^{\sigma_1(N)}$, $\deg P_N\le\sigma_2(N)$ and $|P_N(\alpha)| σ (j : ℝ) + (y - j) * (σ ((j : ℝ) + 1) - σ (j : ℝ)) + have hL : ∀ j, Continuous (L j) := fun j => by + simp only [L]; fun_prop + have hk := Int.floor_le x + have hk2 := Int.lt_floor_add_one x + by_cases hx : (⌊x⌋ : ℝ) < x + · have hev : I σ =ᶠ[𝓝 x] L ⌊x⌋ := by + filter_upwards [Ioo_mem_nhds hx hk2] with y hy + exact I_eq_of_mem σ ⌊x⌋ y hy.1.le hy.2.le + exact (hL _).continuousAt.congr hev.symm + · have hxk : x = (⌊x⌋ : ℝ) := le_antisymm (not_lt.mp hx) hk + rw [continuousAt_iff_continuous_left_right] + constructor + · have hev : I σ =ᶠ[𝓝[≤] x] L (⌊x⌋ - 1) := by + filter_upwards [Ioc_mem_nhdsLE (show ((⌊x⌋ - 1 : ℤ) : ℝ) < x by push_cast; linarith)] + with y hy + exact I_eq_of_mem σ (⌊x⌋ - 1) y hy.1.le (by push_cast; linarith [hy.2]) + have hval : I σ x = L (⌊x⌋ - 1) x := + I_eq_of_mem σ (⌊x⌋ - 1) x (by push_cast; linarith) (by push_cast; linarith) + exact (hL _).continuousAt.continuousWithinAt.congr_of_eventuallyEq hev hval + · have hev : I σ =ᶠ[𝓝[≥] x] L ⌊x⌋ := by + filter_upwards [Ico_mem_nhdsGE hk2] with y hy + exact I_eq_of_mem σ ⌊x⌋ y (by linarith [hy.1]) hy.2.le + have hval : I σ x = L ⌊x⌋ x := I_eq_of_mem σ ⌊x⌋ x hk hk2.le + exact (hL _).continuousAt.continuousWithinAt.congr_of_eventuallyEq hev hval + +theorem I_tendsto (σ : ℝ → ℝ) (hσ : StrictMono σ) (ht : Tendsto σ atTop atTop) : + Tendsto (I σ) atTop atTop := by + have hshift : Tendsto (fun x : ℝ => σ (x - 1)) atTop atTop := + ht.comp (tendsto_atTop_add_const_right atTop (-1) tendsto_id |>.congr (fun x => + by simp [sub_eq_add_neg])) + refine tendsto_atTop_mono (fun x => ?_) hshift + have hk := Int.floor_le x + have hk2 := Int.lt_floor_add_one x + rw [I_eq_of_mem σ ⌊x⌋ x hk hk2.le] + have h1 : σ (x - 1) ≤ σ (⌊x⌋ : ℝ) := hσ.monotone (by linarith) + have h2 : 0 ≤ (x - ⌊x⌋) * (σ ((⌊x⌋ : ℝ) + 1) - σ (⌊x⌋ : ℝ)) := + mul_nonneg (by linarith) (sub_nonneg.mpr (hσ.monotone (by linarith))) + linarith + +theorem one_le_floor {x : ℝ} (hx : 1 ≤ x) : (1 : ℝ) ≤ (⌊x⌋ : ℝ) := by + have : (1 : ℤ) ≤ ⌊x⌋ := Int.le_floor.mpr (by exact_mod_cast hx) + exact_mod_cast this + +theorem I_le (σ τ : ℝ → ℝ) (h : ∀ x : ℝ, 0 < x → τ x ≤ σ x) (x : ℝ) (hx : 1 ≤ x) : + I τ x ≤ I σ x := by + have hk := Int.floor_le x + have hk2 := Int.lt_floor_add_one x + have hk1 := one_le_floor hx + rw [I_eq_of_mem τ ⌊x⌋ x hk hk2.le, I_eq_of_mem σ ⌊x⌋ x hk hk2.le] + have h1 := h (⌊x⌋ : ℝ) (by linarith) + have h2 := h ((⌊x⌋ : ℝ) + 1) (by linarith) + have ht0 : 0 ≤ x - ⌊x⌋ := by linarith + have ht1 : 0 ≤ 1 - (x - ⌊x⌋) := by linarith + nlinarith [mul_nonneg ht0 (sub_nonneg.mpr h2), mul_nonneg ht1 (sub_nonneg.mpr h1)] + +theorem I_growth (σ : ℝ → ℝ) (a : ℝ) (h : ∀ x : ℝ, 0 < x → σ (x + 1) ≤ a * σ x) (x : ℝ) + (hx : 1 ≤ x) : I σ (x + 1) ≤ a * I σ x := by + have hk := Int.floor_le x + have hk2 := Int.lt_floor_add_one x + have hk1 := one_le_floor hx + have e1 := I_eq_of_mem σ (⌊x⌋ + 1) (x + 1) (by push_cast; linarith) (by push_cast; linarith) + have e2 := I_eq_of_mem σ ⌊x⌋ x hk hk2.le + push_cast at e1 + rw [e1, e2] + have g1 := h (⌊x⌋ : ℝ) (by linarith) + have g2 := h ((⌊x⌋ : ℝ) + 1) (by linarith) + have ht0 : 0 ≤ x - ⌊x⌋ := by linarith + have ht1 : 0 ≤ 1 - (x - ⌊x⌋) := by linarith + have hx1 : x + 1 - ((⌊x⌋ : ℝ) + 1) = x - ⌊x⌋ := by ring + rw [hx1] + nlinarith [mul_nonneg ht0 (sub_nonneg.mpr g2), mul_nonneg ht1 (sub_nonneg.mpr g1)] + +end FourExpInterp + +open FourExpInterp in +/-- **Waldschmidt's transcendence criterion.** Let $\alpha\in\mathbb{C}$ and $\varepsilon>0$. Let +$\sigma_1,\sigma_2\colon\mathbb{R}\to\mathbb{R}$ be strictly increasing and tending to $+\infty$, +and let $a_1,a_2\ge1$ be such that for every $x>0$ +$$ \sigma_2(x)\le\sigma_1(x),\qquad\sigma_i(x+1)\le a_i\,\sigma_i(x)\quad(i=1,2). $$ +Put $C=\max\{10+\varepsilon,(4+\varepsilon)a_1a_2\}$. Suppose that for every integer $N>N_0$ there +is a non-zero $P_N\in\mathbb{Z}[X]$ with every coefficient of absolute value at most +$e^{\sigma_1(N)}$, $\deg P_N\le\sigma_2(N)$ and $|P_N(\alpha)| I_le σ₁ σ₂ h₂₁ x hx) (fun x hx => I_growth σ₁ a₁ hgrowth₁ x hx) + (fun x hx => I_growth σ₂ a₂ hgrowth₂ x hx) N₀ P hP_ne + · intro N hN i + rw [I_natCast] + exact hP_height N hN i + · intro N hN + rw [I_natCast] + exact hP_deg N hN + · intro N hN + rw [I_natCast, I_natCast] + exact hP_small N hN + +end FourExponentials diff --git a/LeanPool/FourExponentials/TranscendenceCriterionContinuous.lean b/LeanPool/FourExponentials/TranscendenceCriterionContinuous.lean new file mode 100644 index 0000000000..07b98678f2 --- /dev/null +++ b/LeanPool/FourExponentials/TranscendenceCriterionContinuous.lean @@ -0,0 +1,265 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.DvdOfSmallValuesAtScale +public import LeanPool.FourExponentials.HeightDvdLe +public import LeanPool.FourExponentials.SmallIrreducibleFactor +public import Mathlib.Tactic.Bound +public import Mathlib.Tactic.ByContra +public import Mathlib.Tactic.Convert +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring +public import Mathlib.Tactic.Set + +/-! +# A transcendence criterion with continuous scales + +Suppose `α` is transcendental, and put `C = max (10 + ε) ((4 + ε) a₁ a₂)`. Heights are Mathlib's +`Polynomial.supNorm`, the largest absolute value of a coefficient. + +* **A small factor.** For large `q`, Gel'fond's lemma (`small_irreducible_factor`, with + `H = exp σ₁(q)`, `n = σ₂(q)` and `λ = C`), applied to the primitive part of `P q`, gives an + irreducible `Q` of positive degree and a real `s ≥ 1` with + `‖Q(α)‖ < exp(-(C - 6) σ₁(q) σ₂(q) / s)`, height at most `exp(3 σ₁(q) / s)` and degree at most + `σ₂(q) / s`. +* **Its scale set** `T(Q) = {x ≥ 1 | height ≤ exp(3 σ₁(x)), degree ≤ (1 + ε/2) σ₂(x)}` is closed + and contains `q`. At a transcendental point, the finitely many non-zero integer polynomials of + bounded degree and height take values bounded away from `0` (`exists_pos_le_norm_aeval`). With + `q` large, `‖Q(α)‖` is below that bound for the degree and height allowed at a fixed scale `Zs`, + so `T(Q)` lies in `[Zs, ∞)`. +* **The least scale.** Let `z = min T(Q)`, `u = σ₁(z)` and `v = σ₂(z)`. By continuity, the two + bounds are not both strict at `z`. Either way `uv ≤ σ₁(q) σ₂(q) / s`, so + `‖Q(α)‖ < exp(-(4 + ε) uv)`. +* **A contradiction.** For `N = ⌊z⌋₊` the growth bounds give `uv ≤ a₁ a₂ σ₁(N) σ₂(N)`, so + `‖P_N(α)‖ < exp(-(4 + ε) uv)` as well. The resultant step at the scale `(u, v)` + (`dvd_of_small_values_at_scale`) gives `Q ∣ P_N`. Gel'fond's height bound + (`height_dvd_le`) and `deg Q ≤ deg P_N ≤ v < (1 + ε/2) v` then make both bounds strict + at `z`. + +From `Diaz/Mirror/transcendence_criterion_continuous.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.transcendence_criterion_continuous`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Filter Topology Polynomial + +namespace TranscendenceCriterionContinuous + +/-- At a transcendental `α`, the non-zero integer polynomials of bounded degree and height take +values bounded away from `0`: there are finitely many of them. -/ +theorem exists_pos_le_norm_aeval (α : ℂ) (hα : Transcendental ℚ α) (D : ℕ) (K : ℝ) : + ∃ m : ℝ, 0 < m ∧ ∀ Q : ℤ[X], Q ≠ 0 → Q.natDegree ≤ D → (∀ i, |(Q.coeff i : ℝ)| ≤ K) → + m ≤ ‖aeval α Q‖ := by + classical + set S := {Q : ℤ[X] | Q ≠ 0 ∧ Q.natDegree ≤ D ∧ ∀ i, |(Q.coeff i : ℝ)| ≤ K} + have hfin : S.Finite := by + let π : ℤ[X] → Fin (D + 1) → ℤ := fun f i => f.coeff i + refine ((Set.Finite.pi fun _ => Set.finite_Icc (-⌈K⌉) ⌈K⌉).subset ?_).of_finite_image + (?_ : Set.InjOn π S) + · rintro _ ⟨Q, hQ, rfl⟩ i - + have h := abs_le.1 ((hQ.2.2 i).trans (Int.le_ceil K)) + exact ⟨by exact_mod_cast h.1, by exact_mod_cast h.2⟩ + · exact fun x hx y hy hxy => (ext_iff_natDegree_le hx.2.1 hy.2.1).2 fun i hi => + congr_fun hxy ⟨i, Nat.lt_succ_of_le hi⟩ + have hval : ∀ Q ∈ hfin.toFinset, 0 < ‖aeval α Q‖ := fun Q hQ => norm_pos_iff.2 fun h => + hα ⟨Q.map (algebraMap ℤ ℚ), (Polynomial.map_ne_zero_iff (algebraMap ℤ ℚ).injective_int).2 + (hfin.mem_toFinset.1 hQ).1, by rwa [aeval_map_algebraMap]⟩ + rcases hfin.toFinset.eq_empty_or_nonempty with he | hne + · exact ⟨1, one_pos, fun Q h0 hD hK => by simpa [he] using hfin.mem_toFinset.2 ⟨h0, hD, hK⟩⟩ + · exact ⟨_, (Finset.lt_inf'_iff hne).2 hval, fun Q h0 hD hK => + Finset.inf'_le _ (hfin.mem_toFinset.2 ⟨h0, hD, hK⟩)⟩ + +end TranscendenceCriterionContinuous + +open TranscendenceCriterionContinuous in +/-- **The criterion for continuous growth functions.** Let $\alpha\in\mathbb{C}$ and +$\varepsilon>0$. Let $\sigma_1,\sigma_2\colon\mathbb{R}\to\mathbb{R}$ be continuous, strictly +increasing and tending to $+\infty$, and let $a_1,a_2\ge1$ be such that for every $x\ge1$ +$$ \sigma_2(x)\le\sigma_1(x),\qquad\sigma_i(x+1)\le a_i\,\sigma_i(x)\quad(i=1,2). $$ +Put $C=\max\{10+\varepsilon,(4+\varepsilon)a_1a_2\}$. Suppose that for every integer $N>N_0$ there +is a non-zero $P_N\in\mathbb{Z}[X]$ with every coefficient of absolute value at most +$e^{\sigma_1(N)}$, $\deg P_N\le\sigma_2(N)$ and $|P_N(\alpha)| by + simpa only [Int.norm_eq_abs] using Q.le_supNorm i + -- where `σ₂ ≥ 1` + obtain ⟨X₀, hX₀1, hX₀⟩ : ∃ X₀ : ℝ, 1 ≤ X₀ ∧ ∀ x, X₀ ≤ x → 1 ≤ σ₂ x := by + obtain ⟨X, hX⟩ := eventually_atTop.mp (hσ₂t.eventually_ge_atTop 1) + exact ⟨max X 1, le_max_right _ _, fun x hx => hX x (le_of_max_le_left hx)⟩ + have hσ₁ge : ∀ x, X₀ ≤ x → 1 ≤ σ₁ x := fun x hx => (hX₀ x hx).trans (h₂₁ x (by linarith)) + -- Step 1: a small irreducible factor of each `P q`, through its primitive part + have step1 : ∀ q : ℕ, N₀ < q → X₀ ≤ (q : ℝ) → ∃ Q : ℤ[X], Irreducible Q ∧ 1 ≤ Q.natDegree ∧ + ∃ s : ℝ, 1 ≤ s ∧ ‖aeval α Q‖ < Real.exp (-((C - 6) * σ₁ q * σ₂ q / s)) ∧ + Q.supNorm ≤ Real.exp (3 * σ₁ q / s) ∧ (Q.natDegree : ℝ) ≤ σ₂ q / s := by + intro q hq hqX + have hdec := eq_C_content_mul_primPart (P q) + have hc1 : (1 : ℝ) ≤ |((P q).content : ℝ)| := by + exact_mod_cast Int.one_le_abs (mt content_eq_zero_iff.1 (hP_ne q hq)) + have hpH : ∀ i, |((P q).primPart.coeff i : ℝ)| ≤ Real.exp (σ₁ q) := fun i => by + have h := hP_height q hq i + rw [hdec, coeff_C_mul, Int.cast_mul, abs_mul] at h + nlinarith [abs_nonneg ((P q).primPart.coeff i : ℝ)] + have hpα : ‖aeval α (P q).primPart‖ ≤ ‖aeval α (P q)‖ := by + conv_rhs => rw [hdec, map_mul, aeval_C, norm_mul] + exact le_mul_of_one_le_left (norm_nonneg _) (by simpa using hc1) + obtain ⟨Q, -, hprim, hirr, s, hs, hQα, hQh, hQd⟩ := small_irreducible_factor α hα + (P q).primPart (isPrimitive_primPart _) (Real.exp (σ₁ q)) (σ₂ q) C hpH + (by rw [Real.log_exp]; exact h₂₁ q (by linarith)) + (by rw [natDegree_primPart]; exact hP_deg q hq) (by linarith) + (by rw [← Real.exp_mul]; exact hpα.trans_lt ((hP_small q hq).trans_eq (by congr 1; ring))) + refine ⟨Q, hirr, ?_, s, by exact_mod_cast hs, ?_, ?_, hQd⟩ + · have := ((IsPrimitive.Int.irreducible_iff_irreducible_map_cast hprim).1 hirr).natDegree_pos + rwa [natDegree_map_eq_of_injective (Int.castRingHom ℚ).injective_int] at this + · rw [← Real.exp_mul] at hQα; convert hQα using 2; ring + · obtain ⟨i, hi⟩ := Q.exists_eq_supNorm + rw [hi, Int.norm_eq_abs] + refine (hQh i).trans ?_ + rw [← Real.exp_mul, ← Real.exp_add, mul_one_div, ← add_div] + exact Real.exp_le_exp.2 (div_le_div_of_nonneg_right (by linarith [h₂₁ q (by linarith)]) + (by positivity)) + -- the scale set of `Q`: the `x ≥ 1` whose height and degree bounds `Q` meets + let T : ℤ[X] → Set ℝ := fun Q => + {x | 1 ≤ x ∧ Q.supNorm ≤ Real.exp (3 * σ₁ x) ∧ (Q.natDegree : ℝ) ≤ (1 + ε / 2) * σ₂ x} + have hTc : ∀ Q, IsClosed (T Q) := fun Q => + (isClosed_le continuous_const continuous_id).inter ((isClosed_le continuous_const + (Real.continuous_exp.comp (continuous_const.mul hσ₁c))).inter + (isClosed_le continuous_const (continuous_const.mul hσ₂c))) + obtain ⟨U, hU⟩ := dvd_of_small_values_at_scale α ε hε + obtain ⟨Z₁, hZ₁⟩ := eventually_atTop.mp (hσ₁t.eventually_ge_atTop U) + set Zs : ℝ := max (max (X₀ + 1) ((N₀ : ℝ) + 2)) Z₁ with hZs + -- Step 2: a factor with value below every bounded polynomial, so its scale set lies past `Zs` + obtain ⟨m, hm0, hm⟩ := + exists_pos_le_norm_aeval α hα ⌈(1 + ε / 2) * σ₂ Zs⌉₊ (Real.exp (3 * σ₁ Zs)) + obtain ⟨q, hq, hqX, hqm⟩ : ∃ q : ℕ, N₀ < q ∧ X₀ ≤ (q : ℝ) ∧ -Real.log m / (C - 6) ≤ σ₁ q := + ((eventually_gt_atTop N₀).and (((tendsto_natCast_atTop_atTop (R := ℝ)).eventually_ge_atTop + X₀).and ((hσ₁t.comp tendsto_natCast_atTop_atTop).eventually_ge_atTop _))).exists + obtain ⟨Q, hirr, hδ1, s, hs, hQα, hQh, hQd⟩ := step1 q hq hqX + have hσ₁q := hσ₁ge q hqX + have hσ₂q := hX₀ q hqX + have hqT : (q : ℝ) ∈ T Q := ⟨by linarith, + hQh.trans (Real.exp_le_exp.2 (div_le_self (by linarith) hs)), + hQd.trans ((div_le_self (by linarith) hs).trans + (le_mul_of_one_le_left (by linarith) (by linarith)))⟩ + have hQm : ‖aeval α Q‖ < m := by + refine hQα.trans_le ((Real.exp_le_exp.2 ?_).trans_eq (Real.exp_log hm0)) + have h1 : (1 : ℝ) ≤ σ₂ q / s := (by exact_mod_cast hδ1 : (1 : ℝ) ≤ Q.natDegree).trans hQd + have h2 := (div_le_iff₀ (by linarith : (0 : ℝ) < C - 6)).1 hqm + rw [show (C - 6) * σ₁ q * σ₂ q / s = (C - 6) * σ₁ q * (σ₂ q / s) by ring] + nlinarith [mul_le_mul_of_nonneg_left h1 (by nlinarith : (0 : ℝ) ≤ (C - 6) * σ₁ q)] + have hZ : ∀ x ∈ T Q, Zs ≤ x := fun x ⟨_, hxh, hxd⟩ => by + by_contra! hx + refine absurd hQm (not_lt.2 (hm Q hirr.ne_zero ?_ fun i => (hco Q i).trans (hxh.trans ?_))) + · exact_mod_cast (hxd.trans (mul_le_mul_of_nonneg_left (hσ₂.monotone hx.le) + (by positivity))).trans (Nat.le_ceil _) + · exact Real.exp_le_exp.2 (by linarith [hσ₁.monotone hx.le]) + -- Step 3: `z`, the least point of the scale set, where one of its bounds is tight + have hbdd : BddBelow (T Q) := ⟨1, fun x hx => hx.1⟩ + set z := sInf (T Q) with hzdef + have hzT : z ∈ T Q := (hTc Q).csInf_mem ⟨q, hqT⟩ hbdd + have hzZ : Zs ≤ z := hZ z hzT + have hzq : z ≤ q := csInf_le hbdd hqT + have hz1 : X₀ + 1 ≤ z := (le_max_left _ _).trans ((le_max_left _ _).trans hzZ) + have hz2 : (N₀ : ℝ) + 2 ≤ z := (le_max_right _ _).trans ((le_max_left _ _).trans hzZ) + have hz3 : Z₁ ≤ z := (le_max_right _ _).trans hzZ + have hnotboth : ¬ (Q.supNorm < Real.exp (3 * σ₁ z) ∧ + (Q.natDegree : ℝ) < (1 + ε / 2) * σ₂ z) := by + rintro ⟨h1, h2⟩ + have hev : ∀ᶠ x in 𝓝 z, 1 < x ∧ Q.supNorm < Real.exp (3 * σ₁ x) ∧ + (Q.natDegree : ℝ) < (1 + ε / 2) * σ₂ x := + (lt_mem_nhds (by linarith)).and + ((((Real.continuous_exp.comp (continuous_const.mul hσ₁c)).tendsto z).eventually + (lt_mem_nhds h1)).and + (((continuous_const.mul hσ₂c).tendsto z).eventually (lt_mem_nhds h2))) + obtain ⟨x, hxz, h1x, h2x, h3x⟩ := hev.exists_lt + exact absurd (csInf_le hbdd ⟨h1x.le, h2x.le, h3x.le⟩) (not_le.2 hxz) + obtain ⟨-, hlh, hdz⟩ := hzT + set u := σ₁ z with hudef + set v := σ₂ z with hvdef + have hv1 : 1 ≤ v := hX₀ z (by linarith) + have hvu : v ≤ u := h₂₁ z (by linarith) + have huq : u ≤ σ₁ q := hσ₁.monotone hzq + have hvq : v ≤ σ₂ q := hσ₂.monotone hzq + -- (3.9) + have h39 : u * v ≤ σ₁ q * σ₂ q / s := by + rcases not_and_or.mp hnotboth with ha | hb + · have h := Real.exp_le_exp.1 ((not_lt.1 ha).trans hQh) + rw [mul_div_assoc] at h + calc u * v ≤ (σ₁ q / s) * σ₂ q := + mul_le_mul (by linarith) hvq (by linarith) (div_nonneg (by linarith) (by linarith)) + _ = σ₁ q * σ₂ q / s := by ring + · calc u * v ≤ σ₁ q * (σ₂ q / s) := + mul_le_mul huq (by nlinarith [not_lt.1 hb]) (by linarith) (by linarith) + _ = σ₁ q * σ₂ q / s := by ring + have hQsmall : ‖aeval α Q‖ < Real.exp (-((4 + ε) * (u * v))) := by + refine hQα.trans_le (Real.exp_le_exp.2 ?_) + rw [show (C - 6) * σ₁ q * σ₂ q / s = (C - 6) * (σ₁ q * σ₂ q / s) by ring] + nlinarith [mul_le_mul_of_nonneg_left h39 (by linarith : (0 : ℝ) ≤ C - 6), + mul_le_mul_of_nonneg_right (by linarith : 4 + ε ≤ C - 6) (by nlinarith : (0 : ℝ) ≤ u * v)] + -- the polynomial `P N`, `N = ⌊z⌋₊`, is as small at the scale `(u, v)` + set N : ℕ := ⌊z⌋₊ with hNdef + have hN1 : (N : ℝ) ≤ z := Nat.floor_le (by linarith) + have hN2 : z - 1 ≤ N := by linarith [Nat.lt_floor_add_one z] + have hNN₀ : N₀ < N := by exact_mod_cast (show (N₀ : ℝ) < N by linarith) + have hPsmall : ‖aeval α (P N)‖ < Real.exp (-((4 + ε) * (u * v))) := by + refine (hP_small N hNN₀).trans_le (Real.exp_le_exp.2 ?_) + have hg₁ : u ≤ a₁ * σ₁ (z - 1) := by simpa using hgrowth₁ (z - 1) (by linarith) + have hg₂ : v ≤ a₂ * σ₂ (z - 1) := by simpa using hgrowth₂ (z - 1) (by linarith) + have h₁ := hσ₁.monotone hN2 + have h₂ := hσ₂.monotone hN2 + have hm₂ := hX₀ (z - 1) (by linarith) + have hm₁ := h₂₁ (z - 1) (by linarith) + have h1 : u * v ≤ (a₁ * a₂) * (σ₁ N * σ₂ N) := by + linarith [mul_le_mul hg₁ hg₂ (by linarith) (mul_nonneg (by linarith) (by linarith)), + mul_le_mul_of_nonneg_left (mul_le_mul h₁ h₂ (by linarith) (by linarith)) + (mul_nonneg (by linarith) (by linarith) : (0 : ℝ) ≤ a₁ * a₂)] + linarith [mul_le_mul_of_nonneg_right hCa (mul_nonneg (by linarith) (by linarith) : + (0 : ℝ) ≤ σ₁ N * σ₂ N), mul_le_mul_of_nonneg_left h1 (by linarith : (0 : ℝ) ≤ 4 + ε)] + -- the resultant step at the scale `(u, v)` + have hdvd : Q ∣ P N := hU u v (hZ₁ z hz3) hv1 hvu (P N) Q hirr + (fun i => (hP_height N hNN₀ i).trans (Real.exp_le_exp.2 (hσ₁.monotone hN1))) + ((hP_deg N hNN₀).trans (hσ₂.monotone hN1)) (fun i => (hco Q i).trans hlh) hdz hPsmall hQsmall + -- Gel'fond's height bound makes both scale bounds strict at `z` + have hd : ((P N).natDegree : ℝ) ≤ v := (hP_deg N hNN₀).trans (hσ₂.monotone hN1) + refine hnotboth ⟨?_, ?_⟩ + · obtain ⟨i, hi⟩ := Q.exists_eq_supNorm + rw [hi, Int.norm_eq_abs] + refine (height_dvd_le (P N) Q (hP_ne N hNN₀) hdvd _ (hP_height N hNN₀) i).trans_lt ?_ + rw [← Real.exp_add] + exact Real.exp_lt_exp.2 (by linarith [hσ₁.monotone hN1]) + · have : (Q.natDegree : ℝ) ≤ (P N).natDegree := by + exact_mod_cast natDegree_le_of_dvd hdvd (hP_ne N hNN₀) + linarith [mul_pos hε (by linarith : (0 : ℝ) < v)] + +end FourExponentials diff --git a/LeanPool/FourExponentials/TrdegAdjoinLeOneOfIsAlgebraicAdjoin.lean b/LeanPool/FourExponentials/TrdegAdjoinLeOneOfIsAlgebraicAdjoin.lean new file mode 100644 index 0000000000..3dfb6dabf7 --- /dev/null +++ b/LeanPool/FourExponentials/TrdegAdjoinLeOneOfIsAlgebraicAdjoin.lean @@ -0,0 +1,101 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.RingTheory.AlgebraicIndependent.TranscendenceBasis +public import Mathlib.RingTheory.Henselian +public import Mathlib.RingTheory.RegularLocalRing.Defs +public import Mathlib.RingTheory.SimpleRing.Principal +public import Mathlib.Tactic.Set + +/-! +# Transcendence degree at most one + +Let $K\subseteq L$ be fields, $x\in L$, and $S\subseteq L$ a set each of whose elements is algebraic +over the ring $K[x]$. Then the $K$-algebra $K[S]$ generated by $S$ has transcendence degree at most +one over $K$. + +Source: Standard. + +From `Diaz/Mirror/trdeg_adjoin_le_one_of_isAlgebraic_adjoin.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `Transcendence.trdeg_adjoin_le_one_of_isAlgebraic_adjoin`. +-/ + +@[expose] public section + +namespace FourExponentials.Transcendence + +namespace Trdeg + +variable {K L : Type*} [Field K] [Field L] [Algebra K L] + +-- A subalgebra containing `x`, all of whose elements are algebraic over `K[x]`, has +-- transcendence degree at most one. +theorem trdeg_adjoin_le_one_of_isAlgebraic_adjoin_trdeg_le_one_of_adjoin_singleton + {B : Subalgebra K L} {x : L} (hxB : x ∈ B) + (halg : ∀ y ∈ B, IsAlgebraic ↥(Algebra.adjoin K ({x} : Set L)) y) : + Algebra.trdeg K ↥B ≤ 1 := by + set x' : (↥B) := ⟨x, hxB⟩ with hx' + have hmap : Subalgebra.map B.val (Algebra.adjoin K ({x'} : Set ↥B)) + = Algebra.adjoin K ({x} : Set L) := by + rw [AlgHom.map_adjoin] + congr 1 + simp [hx'] + let e : ↥(Algebra.adjoin K ({x'} : Set ↥B)) ≃ₐ[K] ↥(Algebra.adjoin K ({x} : Set L)) := + (Subalgebra.equivMapOfInjective _ B.val Subtype.val_injective).trans + (Subalgebra.equivOfEq _ _ hmap) + have : Algebra.IsAlgebraic ↥(Algebra.adjoin K ({x'} : Set ↥B)) ↥B := by + constructor + intro y + refine IsAlgebraic.of_ringHom_of_comp_eq (f := (e : _ →+* _)) + (g := (B.val : ↥B →+* L)) (halg y y.2) e.surjective Subtype.val_injective ?_ + ext c + rfl + simpa using Algebra.IsAlgebraic.trdeg_le_cardinalMk K ({x'} : Set ↥B) + +-- The elements of `L` algebraic over `K[x]`, as a `K`-subalgebra of `L`. +/-- The elements of `L` algebraic over `K[x]`, as a `K`-subalgebra. -/ +noncomputable def trdegAdjoinLeOneOfIsAlgebraicAdjoinE (K : Type*) {L : Type*} [Field K] + [Field L] [Algebra K L] (x : L) : + Subalgebra K L := + (Subalgebra.algebraicClosure ↥(Algebra.adjoin K ({x} : Set L)) L).restrictScalars K + +theorem trdeg_adjoin_le_one_of_isAlgebraic_adjoin_mem_E_iff {x z : L} : z ∈ + trdegAdjoinLeOneOfIsAlgebraicAdjoinE K x ↔ + IsAlgebraic ↥(Algebra.adjoin K ({x} : Set L)) z := + Iff.rfl + +theorem trdeg_adjoin_le_one_of_isAlgebraic_adjoin_self_mem_E (x : L) : x ∈ + trdegAdjoinLeOneOfIsAlgebraicAdjoinE K x := by + rw [trdeg_adjoin_le_one_of_isAlgebraic_adjoin_mem_E_iff] + have h : x = algebraMap ↥(Algebra.adjoin K ({x} : Set L)) L + ⟨x, Algebra.subset_adjoin rfl⟩ := rfl + rw [h] + exact isAlgebraic_algebraMap _ + +theorem trdeg_adjoin_le_one_of_isAlgebraic_adjoin_trdeg_le_one_of_le_E {B : Subalgebra K L} {x : L} + (h : B ≤ trdegAdjoinLeOneOfIsAlgebraicAdjoinE K x) : + Algebra.trdeg K ↥B ≤ 1 := + (trdeg_le_of_injective (Subalgebra.inclusion h) (Subalgebra.inclusion_injective h)).trans + (trdeg_adjoin_le_one_of_isAlgebraic_adjoin_trdeg_le_one_of_adjoin_singleton + (trdeg_adjoin_le_one_of_isAlgebraic_adjoin_self_mem_E x) (fun _ hy => hy)) + +end Trdeg + +open Trdeg in +/-- **Transcendence degree at most one.** Let $K\subseteq L$ be fields, $x\in L$, and $S\subseteq L$ +a set each of whose elements is algebraic over the ring $K[x]$. Then the $K$-algebra $K[S]$ +generated by $S$ has transcendence degree at most one over $K$. -/ +theorem trdeg_adjoin_le_one_of_isAlgebraic_adjoin {K L : Type*} [Field K] [Field L] + [Algebra K L] (x : L) (S : Set L) + (hS : ∀ s ∈ S, IsAlgebraic ↥(Algebra.adjoin K ({x} : Set L)) s) : + Algebra.trdeg K ↥(Algebra.adjoin K S) ≤ 1 := by + exact trdeg_adjoin_le_one_of_isAlgebraic_adjoin_trdeg_le_one_of_le_E (x := + x) (Algebra.adjoin_le fun s hs => trdeg_adjoin_le_one_of_isAlgebraic_adjoin_mem_E_iff.2 (hS s + hs)) + +end FourExponentials.Transcendence diff --git a/LeanPool/FourExponentials/TrdegOnePresentation.lean b/LeanPool/FourExponentials/TrdegOnePresentation.lean new file mode 100644 index 0000000000..f73c813e90 --- /dev/null +++ b/LeanPool/FourExponentials/TrdegOnePresentation.lean @@ -0,0 +1,113 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.HermiteLindemann +public import LeanPool.FourExponentials.ExistsMonicIntegralModelPresentation +public import Mathlib.RingTheory.AlgebraicIndependent.AlgebraicClosure +public import Mathlib.Tactic.Convert +public import Mathlib.Tactic.FinCases +public import Mathlib.Tactic.NormNum + +/-! +# The four exponentials data in transcendence degree one + +Put `ω = x₁ y₁`. It is non-zero, since `x₁` and `y₁` belong to linearly independent pairs, and +`e^ω` is algebraic; by Hermite–Lindemann `ω` is therefore transcendental. It lies in +`ℚ[x₁, x₂, y₁, y₂]`, whose transcendence degree is at most one, so every element of that ring is +algebraic over `ℚ(ω)`: an element transcendental over `ℚ[ω]` would form with `ω` an algebraically +independent pair. The four exponentials `e^(xᵢ yⱼ)` are algebraic over `ℚ`, hence over `ℚ(ω)`. +The eight numbers `xᵢ`, `yⱼ`, `e^(xᵢ yⱼ)` then have a common presentation +`z · D(ω, ω₁) = E(ω, ω₁)` over one monic integral model `Q(ω, ω₁) = 0`. + +From `Diaz/Mirror/trdeg_one_presentation.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.trdeg_one_presentation`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace TrdegOnePresentation + +/-- In `ℚ[S] ⊆ ℂ` of transcendence degree at most one, every element is algebraic over `ℚ(ω)`, +for any transcendental `ω ∈ ℚ[S]`. -/ +lemma isAlgebraic_of_trdeg_le_one (S : Set ℂ) (htr : Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ S) ≤ 1) + {ω z : ℂ} (hωS : ω ∈ Algebra.adjoin ℚ S) (hzS : z ∈ Algebra.adjoin ℚ S) + (hω : Transcendental ℚ ω) : + IsAlgebraic (IntermediateField.adjoin ℚ ({ω} : Set ℂ)) z := by + rw [IntermediateField.isAlgebraic_adjoin_iff] + by_contra hz + have hind : AlgebraicIndependent ℚ (fun _ : Unit => ω) := + (algebraicIndependent_singleton_iff ()).2 hω + have htrans : Transcendental (Algebra.adjoin ℚ (Set.range fun _ : Unit => ω)) z := by + rw [Set.range_const] + exact hz + have hopt := (hind.option_iff_transcendental z).2 htrans + let v : Option Unit → Algebra.adjoin ℚ S := fun o => o.elim ⟨z, hzS⟩ (fun _ => ⟨ω, hωS⟩) + have hv : AlgebraicIndependent ℚ v := by + refine AlgebraicIndependent.of_comp (Algebra.adjoin ℚ S).val ?_ + convert hopt using 1 + funext o + cases o <;> rfl + have hcard := hv.cardinalMk_le_trdeg + rw [show Cardinal.mk (Option Unit) = 2 by simp] at hcard + have := hcard.trans htr + norm_num at this + +end TrdegOnePresentation + +open TrdegOnePresentation in +/-- **Presenting the field.** Let $x_1,x_2$ be linearly independent over $\mathbb{Q}$, and likewise +$y_1,y_2$. If every $e^{x_iy_j}$ is algebraic and +$\operatorname{trdeg}_{\mathbb{Q}}\mathbb{Q}[x_1,x_2,y_1,y_2] \le1$, then $x_1,x_2,y_1,y_2$ have +presentation data. -/ +theorem trdeg_one_presentation + (x₁ x₂ y₁ y₂ : ℂ) (hx : LinearIndependent ℚ ![x₁, x₂]) (hy : LinearIndependent ℚ ![y₁, y₂]) + (hexp : ∀ i j : Fin 2, IsAlgebraic ℚ (Complex.exp (![x₁, x₂] i * ![y₁, y₂] j))) + (htr : Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂} : Set ℂ)) ≤ 1) : + ∃ ω ω₁ : ℂ, Transcendental ℚ ω ∧ ∃ Q : Polynomial (Polynomial ℤ), + Q.Monic ∧ 0 < Q.natDegree ∧ Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) + ω₁ Q = 0 ∧ + (∀ A : Polynomial (Polynomial ℤ), A.natDegree < Q.natDegree → + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ A = 0 → A = 0) ∧ + ∃ (D : Polynomial (Polynomial ℤ)) (E G : Fin 2 → Polynomial (Polynomial ℤ)) (H : Fin 2 → + Fin 2 → Polynomial (Polynomial ℤ)), + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D ≠ 0 ∧ (∀ i, ![x₁, + x₂] i * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (E i)) ∧ + (∀ j, ![y₁, y₂] j * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D + = Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (G j)) ∧ + (∀ i j, Complex.exp (![x₁, x₂] i * ![y₁, y₂] j) * + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (H i j)) := by + -- `ω = x₁ y₁` is transcendental, by Hermite–Lindemann + have hx1 : x₁ ≠ 0 := by simpa using hx.ne_zero 0 + have hy1 : y₁ ≠ 0 := by simpa using hy.ne_zero 0 + have hω : Transcendental ℚ (x₁ * y₁) := fun ha => + hermite_lindemann_holds (x₁ * y₁) (mul_ne_zero hx1 hy1) ha (by simpa using hexp 0 0) + -- the eight numbers are algebraic over `ℚ(ω)` + have hS : ∀ z ∈ ({x₁, x₂, y₁, y₂} : Set ℂ), z ∈ Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂} : Set ℂ) := + fun z hz => Algebra.subset_adjoin hz + have hωS : x₁ * y₁ ∈ Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂} : Set ℂ) := + mul_mem (hS _ (by simp)) (hS _ (by simp)) + let f : Fin 2 ⊕ (Fin 2 ⊕ (Fin 2 × Fin 2)) → ℂ := Sum.elim (fun i => ![x₁, x₂] i) + (Sum.elim (fun j => ![y₁, y₂] j) (fun p => Complex.exp (![x₁, x₂] p.1 * ![y₁, y₂] p.2))) + have hf : ∀ o, IsAlgebraic (IntermediateField.adjoin ℚ ({x₁ * y₁} : Set ℂ)) (f o) := by + rintro (i | j | p) + · exact isAlgebraic_of_trdeg_le_one _ htr hωS (hS (![x₁, x₂] i) (by fin_cases i <;> simp)) hω + · exact isAlgebraic_of_trdeg_le_one _ htr hωS (hS (![y₁, y₂] j) (by fin_cases j <;> simp)) hω + · exact IsAlgebraic.tower_top (L := IntermediateField.adjoin ℚ ({x₁ * + y₁} : Set ℂ)) (hexp p.1 p.2) + -- one integral model presents them all + obtain ⟨ω₁, Q, hQm, hQd, hQroot, hQmin, D, E, hD, hE⟩ := + Transcendence.exists_monic_integral_model_presentation (x₁ * y₁) hω f hf + exact ⟨x₁ * y₁, ω₁, hω, Q, hQm, hQd, hQroot, hQmin, D, fun i => E (.inl i), + fun j => E (.inr (.inl j)), fun i j => E (.inr (.inr (i, j))), hD, fun i => hE (.inl i), + fun j => hE (.inr (.inl j)), fun i j => hE (.inr (.inr (i, j)))⟩ + +end FourExponentials diff --git a/LeanPool/FourExponentials/TrdegOnePresentationColumn.lean b/LeanPool/FourExponentials/TrdegOnePresentationColumn.lean new file mode 100644 index 0000000000..f0abdfdc90 --- /dev/null +++ b/LeanPool/FourExponentials/TrdegOnePresentationColumn.lean @@ -0,0 +1,124 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.HermiteLindemann +public import LeanPool.FourExponentials.ExistsMonicIntegralModelPresentation +public import Mathlib.RingTheory.AlgebraicIndependent.AlgebraicClosure +public import Mathlib.Tactic.Convert +public import Mathlib.Tactic.FinCases +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Set + +/-! +# The column data in transcendence degree one + +As in `trdeg_one_presentation`, with the column hypothesis in place of the four algebraic +exponentials. Put `ω = x₁ y₂`. It is non-zero, since `x₁` and `y₂` belong to linearly independent +pairs, and `e^ω` is algebraic; by Hermite–Lindemann `ω` is therefore transcendental. It lies in +`ℚ[six] = ℚ[x₁, x₂, y₁, y₂, e^{x₁y₁}, e^{x₂y₁}]`, whose transcendence degree is at most one, so +every element of that ring is algebraic over `ℚ(ω)`: an element transcendental over `ℚ[ω]` would +form with `ω` an algebraically independent pair. This covers `xᵢ`, `yⱼ` and the row `e^{xᵢy₁}`. +The column `e^{xᵢy₂}` is algebraic over `ℚ`, hence over `ℚ(ω)`. The eight numbers `xᵢ`, `yⱼ`, +`e^{xᵢyⱼ}` then have a common presentation `z · D(ω, ω₁) = E(ω, ω₁)` over one monic integral +model `Q(ω, ω₁) = 0`, by `Transcendence.exists_monic_integral_model_presentation`. + +From `Diaz/Mirror/trdeg_one_presentation_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.trdeg_one_presentation_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace TrdegOnePresentationColumn + +/-- In `ℚ[S] ⊆ ℂ` of transcendence degree at most one, every element is algebraic over `ℚ(ω)`, +for any transcendental `ω ∈ ℚ[S]`. -/ +lemma trdeg_one_presentation_column_isAlgebraic_of_trdeg_le_one (S : Set ℂ) (htr : Algebra.trdeg ℚ + ↥(Algebra.adjoin ℚ S) ≤ 1) + {ω z : ℂ} (hωS : ω ∈ Algebra.adjoin ℚ S) (hzS : z ∈ Algebra.adjoin ℚ S) + (hω : Transcendental ℚ ω) : + IsAlgebraic (IntermediateField.adjoin ℚ ({ω} : Set ℂ)) z := by + rw [IntermediateField.isAlgebraic_adjoin_iff] + by_contra hz + have hind : AlgebraicIndependent ℚ (fun _ : Unit => ω) := + (algebraicIndependent_singleton_iff ()).2 hω + have htrans : Transcendental (Algebra.adjoin ℚ (Set.range fun _ : Unit => ω)) z := by + rw [Set.range_const] + exact hz + have hopt := (hind.option_iff_transcendental z).2 htrans + let v : Option Unit → Algebra.adjoin ℚ S := fun o => o.elim ⟨z, hzS⟩ (fun _ => ⟨ω, hωS⟩) + have hv : AlgebraicIndependent ℚ v := by + refine AlgebraicIndependent.of_comp (Algebra.adjoin ℚ S).val ?_ + convert hopt using 1 + funext o + cases o <;> rfl + have hcard := hv.cardinalMk_le_trdeg + rw [show Cardinal.mk (Option Unit) = 2 by simp] at hcard + have := hcard.trans htr + norm_num at this + +end TrdegOnePresentationColumn + +open TrdegOnePresentationColumn in +/-- **Presenting the field, one algebraic column.** If $x_1,x_2,y_1,y_2$ satisfy the column +hypotheses, then they have presentation data. -/ +theorem trdeg_one_presentation_column + (x₁ x₂ y₁ y₂ : ℂ) (hx : LinearIndependent ℚ ![x₁, x₂]) (hy : LinearIndependent ℚ ![y₁, y₂]) + (hexp₂ : ∀ i : Fin 2, IsAlgebraic ℚ (Complex.exp (![x₁, x₂] i * y₂))) + (htr : Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), + Complex.exp (x₂ * y₁)} : Set ℂ)) ≤ 1) : + ∃ ω ω₁ : ℂ, Transcendental ℚ ω ∧ ∃ Q : Polynomial (Polynomial ℤ), + Q.Monic ∧ 0 < Q.natDegree ∧ Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) + ω₁ Q = 0 ∧ + (∀ A : Polynomial (Polynomial ℤ), A.natDegree < Q.natDegree → + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ A = 0 → A = 0) ∧ + ∃ (D : Polynomial (Polynomial ℤ)) (E G : Fin 2 → Polynomial (Polynomial ℤ)) (H : Fin 2 → + Fin 2 → Polynomial (Polynomial ℤ)), + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D ≠ 0 ∧ (∀ i, ![x₁, + x₂] i * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (E i)) ∧ + (∀ j, ![y₁, y₂] j * Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D + = Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (G j)) ∧ + (∀ i j, Complex.exp (![x₁, x₂] i * ![y₁, y₂] j) * + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ D = + Polynomial.eval₂ (Polynomial.eval₂RingHom (Int.castRingHom ℂ) ω) ω₁ (H i j)) := by + -- `ω = x₁ y₂` is transcendental, by Hermite–Lindemann applied to the column + have hx1 : x₁ ≠ 0 := by simpa using hx.ne_zero 0 + have hy2 : y₂ ≠ 0 := by simpa using hy.ne_zero 1 + have hω : Transcendental ℚ (x₁ * y₂) := fun ha => + hermite_lindemann_holds (x₁ * y₂) (mul_ne_zero hx1 hy2) ha (by simpa using hexp₂ 0) + -- `ω` and the six generators lie in `ℚ[six]` + set six : Set ℂ := {x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), Complex.exp (x₂ * y₁)} with hsix + have hS : ∀ z ∈ six, z ∈ Algebra.adjoin ℚ six := fun z hz => Algebra.subset_adjoin hz + have hωS : x₁ * y₂ ∈ Algebra.adjoin ℚ six := + mul_mem (hS _ (by simp [hsix])) (hS _ (by simp [hsix])) + -- the eight numbers are algebraic over `ℚ(ω)` + let f : Fin 2 ⊕ (Fin 2 ⊕ (Fin 2 × Fin 2)) → ℂ := Sum.elim (fun i => ![x₁, x₂] i) + (Sum.elim (fun j => ![y₁, y₂] j) (fun p => Complex.exp (![x₁, x₂] p.1 * ![y₁, y₂] p.2))) + have hf : ∀ o, IsAlgebraic (IntermediateField.adjoin ℚ ({x₁ * y₂} : Set ℂ)) (f o) := by + rintro (i | j | ⟨p, q⟩) + · exact trdeg_one_presentation_column_isAlgebraic_of_trdeg_le_one _ htr hωS + (hS (![x₁, x₂] i) (by fin_cases i <;> simp [hsix])) hω + · exact trdeg_one_presentation_column_isAlgebraic_of_trdeg_le_one _ htr hωS + (hS (![y₁, y₂] j) (by fin_cases j <;> simp [hsix])) hω + · fin_cases q + · -- the row `e^{x_p y₁}` is one of the six generators + exact trdeg_one_presentation_column_isAlgebraic_of_trdeg_le_one _ htr hωS + (hS (Complex.exp (![x₁, x₂] p * y₁)) (by fin_cases p <;> simp [hsix])) hω + · -- the column `e^{x_p y₂}` is algebraic over `ℚ` + exact IsAlgebraic.tower_top (L := IntermediateField.adjoin ℚ ({x₁ * y₂} : Set ℂ)) + (hexp₂ p) + -- one integral model presents them all + obtain ⟨ω₁, Q, hQm, hQd, hQroot, hQmin, D, E, hD, hE⟩ := + Transcendence.exists_monic_integral_model_presentation (x₁ * y₂) hω f hf + exact ⟨x₁ * y₂, ω₁, hω, Q, hQm, hQd, hQroot, hQmin, D, fun i => E (.inl i), + fun j => E (.inr (.inl j)), fun i j => E (.inr (.inr (i, j))), hD, fun i => hE (.inl i), + fun j => hE (.inr (.inl j)), fun i j => hE (.inr (.inr (i, j)))⟩ + +end FourExponentials diff --git a/LeanPool/FourExponentials/TwoAlgebraicallyIndependentOfExpColumn.lean b/LeanPool/FourExponentials/TwoAlgebraicallyIndependentOfExpColumn.lean new file mode 100644 index 0000000000..51676bb55e --- /dev/null +++ b/LeanPool/FourExponentials/TwoAlgebraicallyIndependentOfExpColumn.lean @@ -0,0 +1,88 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import LeanPool.FourExponentials.IsAlgebraicAdjoinOfNotAlgebraicIndependentPair +public import LeanPool.FourExponentials.SmallPolynomialsOfColumn +public import LeanPool.FourExponentials.TranscendenceCriterion +public import LeanPool.FourExponentials.TrdegAdjoinLeOneOfIsAlgebraicAdjoin +public import Mathlib.Tactic.Tauto + +/-! +# Waldschmidt's theorem of 1973 + +Suppose that no two of the eight numbers `xᵢ`, `yⱼ`, `e^{xᵢyⱼ}` are algebraically independent. + +* **One of them is transcendental.** `x₁ ≠ 0` and `y₂ ≠ 0`, since they belong to linearly + independent pairs. If `x₁` and `y₂` were both algebraic, then `x₁ y₂` would be a non-zero + algebraic number with `e^{x₁y₂}` algebraic, against Hermite–Lindemann. So one of them, `t`, is + transcendental. +* **Transcendence degree one.** Every one of the eight numbers `s` forms with `t` a pair that is not + algebraically independent, so `s` is algebraic over `ℚ[t]` + (`Transcendence.isAlgebraic_adjoin_of_not_algebraicIndependent_pair`). Hence + `ℚ[x₁, x₂, y₁, y₂, e^{x₁y₁}, e^{x₂y₁}]` has transcendence degree at most one + (`Transcendence.trdeg_adjoin_le_one_of_isAlgebraic_adjoin`). +* **Contradiction.** As in `four_exponentials_trdeg_one`: the analytic construction + `small_polynomials_of_column` gives a transcendental `ω` and integer polynomials that are + too small at `ω`, and Gel'fond's criterion `transcendence_criterion` makes `ω` algebraic. + +No rank-one parametrization is needed: the hypothesis is already stated in `x`, `y` form. + +From `Diaz/Mirror/two_algebraically_independent_of_exp_column.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `DiazModulus.two_algebraically_independent_of_exp_column`. +-/ + +@[expose] public section + +namespace FourExponentials + +/-- **Waldschmidt 1973.** Let $x_1,x_2$ be complex numbers linearly independent over $\mathbb{Q}$, +and $y_1,y_2$ complex numbers linearly independent over $\mathbb{Q}$. If $e^{x_1y_2}$ and +$e^{x_2y_2}$ are algebraic, then two of the eight numbers +$$ x_1,\ x_2,\ y_1,\ y_2,\ e^{x_1y_1},\ e^{x_1y_2},\ e^{x_2y_1},\ e^{x_2y_2} $$ +are algebraically independent over $\mathbb{Q}$. -/ +theorem two_algebraically_independent_of_exp_column : + ∀ x₁ x₂ y₁ y₂ : ℂ, LinearIndependent ℚ ![x₁, x₂] → LinearIndependent ℚ ![y₁, y₂] → + IsAlgebraic ℚ (Complex.exp (x₁ * y₂)) → IsAlgebraic ℚ (Complex.exp (x₂ * y₂)) → + ∃ a ∈ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), Complex.exp (x₁ * y₂), + Complex.exp (x₂ * y₁), Complex.exp (x₂ * y₂)} : Set ℂ), + ∃ b ∈ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), Complex.exp (x₁ * y₂), + Complex.exp (x₂ * y₁), Complex.exp (x₂ * y₂)} : Set ℂ), + AlgebraicIndependent ℚ ![a, b] := by + intro x₁ x₂ y₁ y₂ hx hy h₁₂ h₂₂ + by_contra hne + -- one of `x₁`, `y₂` is transcendental, by Hermite–Lindemann + have hx1 : x₁ ≠ 0 := by simpa using hx.ne_zero 0 + have hy2 : y₂ ≠ 0 := by simpa using hy.ne_zero 1 + have hxy : Transcendental ℚ x₁ ∨ Transcendental ℚ y₂ := by + by_contra h + rw [not_or, Transcendental, Transcendental, not_not, not_not] at h + exact hermite_lindemann_holds (x₁ * y₂) (mul_ne_zero hx1 hy2) (h.1.mul h.2) h₁₂ + obtain ⟨t, ht8, ht⟩ : ∃ t ∈ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), Complex.exp (x₁ * y₂), + Complex.exp (x₂ * y₁), Complex.exp (x₂ * y₂)} : Set ℂ), Transcendental ℚ t := + hxy.elim (fun h => ⟨x₁, by simp, h⟩) (fun h => ⟨y₂, by simp, h⟩) + -- the eight numbers are algebraic over `ℚ[t]` + have halg : ∀ s ∈ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), Complex.exp (x₁ * y₂), + Complex.exp (x₂ * y₁), Complex.exp (x₂ * y₂)} : Set ℂ), + IsAlgebraic ↥(Algebra.adjoin ℚ ({t} : Set ℂ)) s := fun s hs => + Transcendence.isAlgebraic_adjoin_of_not_algebraicIndependent_pair ht + fun h => hne ⟨t, ht8, s, hs, h⟩ + -- so the six numbers of the construction generate transcendence degree at most one + have htr : Algebra.trdeg ℚ ↥(Algebra.adjoin ℚ ({x₁, x₂, y₁, y₂, Complex.exp (x₁ * y₁), + Complex.exp (x₂ * y₁)} : Set ℂ)) ≤ 1 := by + refine Transcendence.trdeg_adjoin_le_one_of_isAlgebraic_adjoin t _ fun s hs => halg s ?_ + simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hs ⊢ + rcases hs with rfl | rfl | rfl | rfl | rfl | rfl <;> simp + -- the analytic construction, and Gel'fond's criterion + obtain ⟨ω, hω, σ₁, σ₂, hm₁, hm₂, ht₁, ht₂, a₁, a₂, ha₁, ha₂, h₂₁, hg₁, hg₂, hC⟩ := + small_polynomials_of_column x₁ x₂ y₁ y₂ hx hy h₁₂ h₂₂ htr + obtain ⟨N₀, P, hP⟩ := hC (max (10 + 1) ((4 + 1) * (a₁ * a₂))) + exact hω (transcendence_criterion ω 1 one_pos σ₁ σ₂ hm₁ hm₂ ht₁ ht₂ a₁ a₂ ha₁ ha₂ + h₂₁ hg₁ hg₂ N₀ P (fun N hN => (hP N hN).1) (fun N hN => (hP N hN).2.1) + (fun N hN => (hP N hN).2.2.1) (fun N hN => (hP N hN).2.2.2)) + +end FourExponentials diff --git a/LeanPool/FourExponentials/ZeroCountArith.lean b/LeanPool/FourExponentials/ZeroCountArith.lean new file mode 100644 index 0000000000..ec432caf8e --- /dev/null +++ b/LeanPool/FourExponentials/ZeroCountArith.lean @@ -0,0 +1,185 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.EuclideanDomain.Basic +public import Mathlib.Algebra.EuclideanDomain.Field +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.Complex.ExponentialBounds +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.NormNum +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Ring + +/-! +# From the rescaled inequality to the count + +Let $n\ge2$ be an integer and let $x\ge0$, $\lambda>0$ and $\sigma\ge0$ be real. If for every +$R>x+1$ +$$ \sigma\log\frac{R-x}{x+1} \le\log\Bigl(n!\,2^{n+1}\frac{R}{R-1}\Bigr)+2R, $$ +then +$$ \sigma<\frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log n}\,(1+x). $$ + +Source: After [Wal71, §4, (4.14)]. + +## References + +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. + +From `Diaz/Mirror/zero_count_arith.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.zero_count_arith`. +-/ + +@[expose] public section + +namespace FourExponentials + +namespace FourExpArith + +/-- `n!·2ⁿ ≤ 2·nⁿ` for `n ≥ 2`, from `(1 + 1/n)ⁿ ≥ 2`. -/ +lemma fact_two_pow_le (n : ℕ) (hn : 2 ≤ n) : + (n.factorial : ℝ) * 2 ^ n ≤ 2 * (n : ℝ) ^ n := by + induction n, hn using Nat.le_induction with + | base => norm_num [Nat.factorial] + | succ m hm ih => + have hm0 : (0 : ℝ) < m := by exact_mod_cast (by omega : 0 < m) + have key : 2 * (m : ℝ) ^ m ≤ ((m : ℝ) + 1) ^ m := by + have h1 := one_add_mul_le_pow (a := 1 / (m : ℝ)) + (by have : (0 : ℝ) ≤ 1 / m := by positivity + linarith) m + rw [mul_one_div_cancel hm0.ne'] at h1 + have h3 : ((m : ℝ) + 1) ^ m = (1 + 1 / (m : ℝ)) ^ m * (m : ℝ) ^ m := by + rw [← mul_pow, add_mul, one_mul, div_mul_cancel₀ _ hm0.ne'] + rw [h3] + calc 2 * (m : ℝ) ^ m = (1 + 1) * (m : ℝ) ^ m := by ring + _ ≤ (1 + 1 / (m : ℝ)) ^ m * (m : ℝ) ^ m := + mul_le_mul_of_nonneg_right h1 (by positivity) + rw [Nat.factorial_succ] + push_cast + calc ((m : ℝ) + 1) * m.factorial * 2 ^ (m + 1) + = 2 * ((m : ℝ) + 1) * (m.factorial * 2 ^ m) := by ring + _ ≤ 2 * ((m : ℝ) + 1) * (2 * (m : ℝ) ^ m) := + mul_le_mul_of_nonneg_left ih (by positivity) + _ ≤ 2 * ((m : ℝ) + 1) * ((m : ℝ) + 1) ^ m := + mul_le_mul_of_nonneg_left key (by positivity) + _ = 2 * ((m : ℝ) + 1) ^ (m + 1) := by ring + +lemma exp_two_gt_six : (6 : ℝ) < Real.exp 2 := by + have h := Real.exp_one_gt_d9 + have h2 : Real.exp 2 = Real.exp 1 * Real.exp 1 := by rw [← Real.exp_add]; norm_num + rw [h2] + nlinarith + +lemma log_three_lt : Real.log 3 < 4 / 3 := by + rw [Real.log_lt_iff_lt_exp (by norm_num)] + have h1 := Real.exp_one_gt_d9 + have h2 := Real.add_one_le_exp (1 / 3 : ℝ) + have h3 : Real.exp (4 / 3) = Real.exp 1 * Real.exp (1 / 3) := by + rw [← Real.exp_add]; norm_num + rw [h3] + nlinarith [mul_le_mul h1.le h2 (by norm_num) (Real.exp_pos 1).le] + +/-- The zero_count_arith_core inequality: with `R = x + (x+1)u` and `u ≥ 3`, the right-hand side of + the hypothesis +is below `n log n + 2(1+u)(1+x)`. -/ +lemma zero_count_arith_core (n : ℕ) (hn : 2 ≤ n) (x : ℝ) (hx : 0 ≤ x) (u : ℝ) (hu : 3 ≤ u) : + Real.log ((n.factorial : ℝ) * 2 ^ (n + 1) * (x + (x + 1) * u) / (x + (x + 1) * u - 1)) + + 2 * (x + (x + 1) * u) < n * Real.log n + 2 * (1 + u) * (1 + x) := by + have hn0 : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) + obtain ⟨R, hR⟩ : ∃ R, R = x + (x + 1) * u := ⟨_, rfl⟩ + rw [← hR] + have hR3 : 3 ≤ R := by rw [hR]; nlinarith + have hR1 : 0 < R - 1 := by linarith + have hfrac : R / (R - 1) ≤ 3 / 2 := by rw [div_le_iff₀ hR1]; linarith + have hfact : (0 : ℝ) < n.factorial := by exact_mod_cast Nat.factorial_pos n + have hpos : 0 < (n.factorial : ℝ) * 2 ^ (n + 1) * R / (R - 1) := + div_pos (mul_pos (mul_pos hfact (by positivity)) (by linarith)) hR1 + have hnn : (0 : ℝ) < (n : ℝ) ^ n := by positivity + have hbound : (n.factorial : ℝ) * 2 ^ (n + 1) * R / (R - 1) + < Real.exp (n * Real.log n + 2) := by + rw [Real.exp_add, Real.exp_nat_mul, Real.exp_log hn0] + calc (n.factorial : ℝ) * 2 ^ (n + 1) * R / (R - 1) + = 2 * ((n.factorial : ℝ) * 2 ^ n) * (R / (R - 1)) := by rw [pow_succ]; ring + _ ≤ 2 * (2 * (n : ℝ) ^ n) * (3 / 2) := + mul_le_mul (mul_le_mul_of_nonneg_left (fact_two_pow_le n hn) (by norm_num)) hfrac + (div_pos (by linarith) hR1).le (by positivity) + _ = 6 * (n : ℝ) ^ n := by ring + _ < Real.exp 2 * (n : ℝ) ^ n := mul_lt_mul_of_pos_right exp_two_gt_six hnn + _ = (n : ℝ) ^ n * Real.exp 2 := by ring + have hlog := (Real.log_lt_iff_lt_exp hpos).2 hbound + have h2R : 2 * R = 2 * (1 + u) * (1 + x) - 2 := by rw [hR]; ring + linarith + +end FourExpArith + +/-- **From the rescaled inequality to the count.** Let $n\ge2$ be an integer and let $x\ge0$, +$\lambda>0$ and $\sigma\ge0$ be real. If for every $R>x+1$ +$$ \sigma\log\frac{R-x}{x+1} \le\log\Bigl(n!\,2^{n+1}\frac{R}{R-1}\Bigr)+2R, $$ +then +$$ \sigma<\frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log n}\,(1+x). $$ -/ +theorem zero_count_arith + (n : ℕ) (hn : 2 ≤ n) (x lam : ℝ) (hx : 0 ≤ x) (hlam : 0 < lam) (σ : ℝ) (_hσ : 0 ≤ σ) + (h : ∀ R : ℝ, x + 1 < R → + σ * Real.log ((R - x) / (x + 1)) ≤ Real.log ((n.factorial : ℝ) * 2 ^ (n + 1) * R / (R - 1)) + + 2 * R) : + σ < (n : ℝ) / lam + 2 * (1 + (n : ℝ) ^ lam) / (lam * Real.log (n : ℝ)) * (1 + x) := by + have hn1 : (1 : ℝ) < n := by exact_mod_cast (by omega : 1 < n) + have hn0 : (0 : ℝ) < n := by linarith + have hL : 0 < Real.log n := Real.log_pos hn1 + obtain ⟨t, ht⟩ : ∃ t, t = (n : ℝ) ^ lam := ⟨_, rfl⟩ + rw [← ht] + have hlogt : Real.log t = lam * Real.log n := by rw [ht]; exact Real.log_rpow hn0 lam + have hlt : 0 < Real.log t := by rw [hlogt]; exact mul_pos hlam hL + have ht0 : 0 < t := by rw [ht]; exact Real.rpow_pos_of_pos hn0 lam + -- Apply the hypothesis at `R = x + (x+1)u` with `u = max t 3`. + obtain ⟨u, hu⟩ : ∃ u, u = max t 3 := ⟨_, rfl⟩ + have hu3 : 3 ≤ u := by rw [hu]; exact le_max_right _ _ + have hu1 : 1 < u := by linarith + have hlogu : 0 < Real.log u := Real.log_pos hu1 + have hRgt : x + 1 < x + (x + 1) * u := by + have := mul_lt_mul_of_pos_left hu1 (by linarith : (0 : ℝ) < x + 1) + linarith + have hH := h _ hRgt + have hq : (x + (x + 1) * u - x) / (x + 1) = u := by + rw [add_sub_cancel_left, mul_div_cancel_left₀ _ (by linarith : (x + 1 : ℝ) ≠ 0)] + rw [hq] at hH + have hσu : σ * Real.log u < n * Real.log n + 2 * (1 + u) * (1 + x) := + lt_of_le_of_lt hH (FourExpArith.zero_count_arith_core n hn x hx u hu3) + -- Passing from `u` back to `t`. + have hmono : (n * Real.log n + 2 * (1 + u) * (1 + x)) * Real.log t + ≤ (n * Real.log n + 2 * (1 + t) * (1 + x)) * Real.log u := by + rcases le_or_gt 3 t with h3 | h3 + · rw [hu, max_eq_left h3] + · rw [hu, max_eq_right h3.le] + have hlt3 : Real.log t ≤ Real.log 3 := Real.log_le_log ht0 h3.le + have htan : Real.log (t / 3) ≤ t / 3 - 1 := Real.log_le_sub_one_of_pos (by positivity) + rw [Real.log_div ht0.ne' (by norm_num)] at htan + have hl3 := FourExpArith.log_three_lt + have hnL : 0 ≤ (n : ℝ) * Real.log n := mul_nonneg hn0.le hL.le + have hx1 : 0 ≤ 1 + x := by linarith + have h4 : 4 * Real.log t ≤ (1 + t) * Real.log 3 := by + nlinarith [mul_pos (sub_pos.2 h3) (sub_pos.2 hl3)] + nlinarith [mul_le_mul_of_nonneg_left hlt3 hnL, mul_le_mul_of_nonneg_left h4 hx1] + have hσt : σ * Real.log t < n * Real.log n + 2 * (1 + t) * (1 + x) := by + have h1 := mul_lt_mul_of_pos_right hσu hlt + have h2 : σ * Real.log t * Real.log u + < (n * Real.log n + 2 * (1 + t) * (1 + x)) * Real.log u := by linarith + exact lt_of_mul_lt_mul_right h2 hlogu.le + have hlam0 := hlam.ne' + have hL0 := hL.ne' + have hgoal : (n : ℝ) / lam + 2 * (1 + t) / (lam * Real.log n) * (1 + x) + = (n * Real.log n + 2 * (1 + t) * (1 + x)) / Real.log t := by + rw [hlogt] + field_simp + rw [hgoal, lt_div_iff₀ hlt] + exact hσt + +end FourExponentials diff --git a/LeanPool/FourExponentials/ZeroCountArithPoly.lean b/LeanPool/FourExponentials/ZeroCountArithPoly.lean new file mode 100644 index 0000000000..625f600cc6 --- /dev/null +++ b/LeanPool/FourExponentials/ZeroCountArithPoly.lean @@ -0,0 +1,89 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Algebra.Order.Ring.Star +public import Mathlib.Algebra.Order.Star.Real +public import Mathlib.Analysis.SpecialFunctions.Pow.Real +public import Mathlib.Tactic.FieldSimp +public import Mathlib.Tactic.Linarith +public import Mathlib.Tactic.Positivity +public import Mathlib.Tactic.Push +public import Mathlib.Tactic.Set + +/-! +# Few zeros beat the bound + +For every integer $n\ge1$, real $x\ge0$ and $\lambda>0$, and every integer $0\le\sigma\le n-1$, +$$ \sigma<\frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log n}\,(1+x), $$ +where for $n=1$ the second term is read as $0$. + +Source: Elementary. + +From `Diaz/Mirror/zero_count_arith_poly.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.zero_count_arith_poly`. +-/ + +@[expose] public section + +namespace FourExponentials + +/-- **Few zeros beat the bound.** For every integer $n\ge1$, real $x\ge0$ and $\lambda>0$, and every +integer $0\le\sigma\le n-1$, +$$ \sigma<\frac{n}{\lambda}+2\,\frac{1+n^{\lambda}}{\lambda\log n}\,(1+x), $$ +where for $n=1$ the second term is read as $0$. -/ +theorem zero_count_arith_poly + (n : ℕ) (x lam : ℝ) (hx : 0 ≤ x) (hlam : 0 < lam) (σ : ℕ) (h : σ + 1 ≤ n) : + (σ : ℝ) < (n : ℝ) / lam + 2 * (1 + (n : ℝ) ^ lam) / (lam * Real.log (n : ℝ)) * (1 + x) := by + have hn1 : 1 ≤ n := by omega + have hσn : (σ : ℝ) + 1 ≤ n := by exact_mod_cast h + have hnpos : (0 : ℝ) < n := by exact_mod_cast hn1 + have hlogn : 0 ≤ Real.log (n : ℝ) := Real.log_nonneg (by exact_mod_cast hn1) + have hsecond : 0 ≤ 2 * (1 + (n : ℝ) ^ lam) / (lam * Real.log (n : ℝ)) * (1 + x) := by + have : 0 ≤ (n : ℝ) ^ lam := Real.rpow_nonneg hnpos.le _ + positivity + by_cases hl : lam ≤ 1 + · have h1 : (n : ℝ) ≤ (n : ℝ) / lam := by + rw [le_div_iff₀ hlam] + nlinarith + linarith + · push Not at hl + rcases Nat.lt_or_ge n 2 with hn2 | hn2 + · have hn : n = 1 := by omega + have hσ : σ = 0 := by omega + subst hn; subst hσ + simp only [Nat.cast_one, Nat.cast_zero, Real.log_one, mul_zero, div_zero, zero_mul, add_zero] + positivity + · set L := Real.log (n : ℝ) with hL + have hLpos : 0 < L := Real.log_pos (by exact_mod_cast hn2) + set t := lam * L with ht + have htpos : 0 < t := by positivity + have htL : L < t := by rw [ht]; nlinarith + have hrpow : (n : ℝ) ^ lam = Real.exp t := by + rw [Real.rpow_def_of_pos hnpos, ht, hL, mul_comm] + have hexp : (n : ℝ) * (1 + (t - L)) ≤ Real.exp t := by + have h1 := Real.add_one_le_exp (t - L) + have h2 : Real.exp t = (n : ℝ) * Real.exp (t - L) := by + rw [Real.exp_sub, hL, Real.exp_log hnpos]; field_simp + rw [h2] + nlinarith + have hlamL : lam * L = t := rfl + have e1 : (n : ℝ) / lam = (n : ℝ) * L / t := by + rw [ht]; field_simp + have hA : 2 * ((n : ℝ) * (1 + (t - L))) / t ≤ 2 * (1 + Real.exp t) / t := by + apply div_le_div_of_nonneg_right _ htpos.le + linarith + have hB : 2 * (1 + Real.exp t) / t ≤ 2 * (1 + Real.exp t) / t * (1 + x) := by + have : 0 ≤ 2 * (1 + Real.exp t) / t := by positivity + nlinarith + have hkey : (n : ℝ) - 1 < (n : ℝ) * L / t + 2 * ((n : ℝ) * (1 + (t - L))) / t := by + rw [← add_div, lt_div_iff₀ htpos] + nlinarith + rw [e1, hrpow] + linarith + +end FourExponentials diff --git a/LeanPool/FourExponentials/ZeroCountDegenerate.lean b/LeanPool/FourExponentials/ZeroCountDegenerate.lean new file mode 100644 index 0000000000..d032f5f369 --- /dev/null +++ b/LeanPool/FourExponentials/ZeroCountDegenerate.lean @@ -0,0 +1,140 @@ +/- +Copyright (c) 2026 Carlo Perassi. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Carlo Perassi +-/ +module + +public import Mathlib.Analysis.Analytic.Order +public import Mathlib.Analysis.CStarAlgebra.Classes +public import Mathlib.Analysis.Calculus.Deriv.Polynomial +public import Mathlib.Analysis.Complex.CauchyIntegral +public import Mathlib.RingTheory.SimpleRing.Principal +public import Mathlib.Tactic.Ring + +/-! +# The degenerate cases + +Let $f$, $n$ and $\Omega$ be as in Lemma , without the hypothesis $\Omega>0$, and suppose that +$n\le1$ or $\Omega=0$. Then for every finite set $S\subset\mathbb{C}$ +$$ \sum_{z\in S}\operatorname{ord}_zf\le n-1. $$ + +Source: Elementary; the degenerate cases of [Wal71, §4, Lemme 3]. + +## References + +* [Wal71] M. Waldschmidt, *Indépendance algébrique des valeurs de la fonction exponentielle*, Bull. + Soc. Math. France 99 (1971), 285–304. + +From `Diaz/Mirror/zero_count_degenerate.lean` of +[diaz-modulus-lean](https://github.com/carlok/diaz-modulus-lean) at `465147a`, where it mirrors the +proof accepted on Prove2Me as `FourExp.zero_count_degenerate`. +-/ + +@[expose] public section + +namespace FourExponentials + +open Polynomial Finset + +namespace FourExpDeg + +/-- A polynomial times an exponential has, at every point, the root multiplicity as its order. -/ +theorem order_poly_mul_exp (P : ℂ[X]) (hP : P ≠ 0) (c z : ℂ) : + analyticOrderNatAt (fun w : ℂ => P.eval w * Complex.exp (c * w)) z = P.rootMultiplicity z := by + obtain ⟨Q, hPQ, hQ⟩ := Polynomial.exists_eq_pow_rootMultiplicity_mul_and_not_dvd P hP z + have hQz : Q.eval z ≠ 0 := fun h => hQ (dvd_iff_isRoot.mpr h) + have hdiff : ∀ R : ℂ[X], Differentiable ℂ (fun w : ℂ => R.eval w * Complex.exp (c * w)) := + fun R => R.differentiable.mul ((differentiable_id.const_mul c).cexp) + have h := ((hdiff P).analyticAt z).analyticOrderAt_eq_natCast (n := P.rootMultiplicity z) + have hord : analyticOrderAt (fun w : ℂ => P.eval w * Complex.exp (c * w)) z + = (P.rootMultiplicity z : ℕ∞) := by + refine h.2 ⟨fun w => Q.eval w * Complex.exp (c * w), (hdiff Q).analyticAt z, + mul_ne_zero hQz (Complex.exp_ne_zero _), Filter.Eventually.of_forall (fun w => ?_)⟩ + simp only [smul_eq_mul] + conv_lhs => rw [hPQ] + simp only [eval_mul, eval_pow, eval_sub, eval_X, eval_C] + ring + simp [analyticOrderNatAt, hord] + +/-- Summed over any finite set, the orders are at most the degree. -/ +theorem sum_order_le (P : ℂ[X]) (hP : P ≠ 0) (c : ℂ) (S : Finset ℂ) : + ∑ z ∈ S, analyticOrderNatAt (fun w : ℂ => P.eval w * Complex.exp (c * w)) z ≤ P.natDegree := by + classical + simp_rw [order_poly_mul_exp P hP c] + calc ∑ z ∈ S, P.rootMultiplicity z + ≤ ∑ z ∈ S ∪ P.roots.toFinset, P.rootMultiplicity z := + Finset.sum_le_sum_of_subset Finset.subset_union_left + _ = ∑ z ∈ P.roots.toFinset, P.rootMultiplicity z := by + symm + apply Finset.sum_subset Finset.subset_union_right + intro z _ hz + rw [Multiset.mem_toFinset, mem_roots hP, IsRoot.def] at hz + exact rootMultiplicity_eq_zero hz + _ = ∑ z ∈ P.roots.toFinset, P.roots.count z := by + refine Finset.sum_congr rfl (fun z _ => ?_) + rw [count_roots] + _ = Multiset.card P.roots := Multiset.toFinset_sum_count_eq _ + _ ≤ P.natDegree := card_roots' P + +end FourExpDeg + +/-- **The degenerate cases.** Let $f$, $n$ and $\Omega$ be as in Lemma , without the hypothesis +$\Omega>0$, and suppose that $n\le1$ or $\Omega=0$. Then for every finite set $S\subset\mathbb{C}$ +$$ \sum_{z\in S}\operatorname{ord}_zf\le n-1. $$ -/ +theorem zero_count_degenerate + {l : ℕ} (q : Fin l → ℕ) (ω : Fin l → ℂ) (hω : Function.Injective ω) + (b : (j : Fin l) → Fin (q j) → ℂ) (hb : ∃ j i, b j i ≠ 0) + (S : Finset ℂ) (hdeg : (∑ j, q j) ≤ 1 ∨ (⨆ j, ‖ω j‖) = 0) : + (∑ z ∈ S, analyticOrderNatAt (fun w : ℂ => ∑ j, ∑ i : Fin (q j), + b j i * w ^ (i : ℕ) * Complex.exp (ω j * w)) z) + 1 ≤ ∑ j, q j := by + classical + obtain ⟨j₀, i₀, hb₀⟩ := hb + -- every other block is empty + have hsingle : ∀ j, j ≠ j₀ → q j = 0 := by + intro j hj + rcases hdeg with h1 | hΩ + · have hle : q j + q j₀ ≤ ∑ k, q k := by + have := Finset.sum_le_sum_of_subset (f := q) (Finset.subset_univ ({j, j₀} : Finset (Fin l))) + rwa [Finset.sum_pair hj] at this + have := i₀.isLt + omega + · exfalso + have hz : ∀ k, ω k = 0 := by + intro k + have hk : ‖ω k‖ ≤ ⨆ j, ‖ω j‖ := + le_ciSup (f := fun j => ‖ω j‖) (Finite.bddAbove_range _) k + rw [hΩ] at hk + exact norm_le_zero_iff.mp hk + exact hj (hω (by rw [hz j, hz j₀])) + let P : ℂ[X] := ∑ i : Fin (q j₀), C (b j₀ i) * X ^ (i : ℕ) + have hfun : (fun w : ℂ => ∑ j, ∑ i : Fin (q j), b j i * w ^ (i : ℕ) * Complex.exp (ω j * w)) + = fun w : ℂ => P.eval w * Complex.exp (ω j₀ * w) := by + funext w + rw [Finset.sum_eq_single j₀ (fun j _ hj => Finset.sum_eq_zero + (fun i _ => by + have hi : (i : ℕ) < q j := i.isLt + have hq := hsingle j hj + omega)) (by simp)] + simp only [P, eval_finsetSum, eval_mul, eval_C, eval_pow, eval_X, Finset.sum_mul] + have hP : P ≠ 0 := by + intro h0 + have hc := congrArg (fun p => p.coeff (i₀ : ℕ)) h0 + simp only [P, finsetSum_coeff, coeff_C_mul_X_pow, coeff_zero] at hc + rw [Finset.sum_eq_single i₀ (fun k _ hk => ite_eq_right (fun h => hk (Fin.ext h).symm)) (by + simp)] at hc + simp only [ite_true] at hc + exact hb₀ hc + have hdegP : P.natDegree + 1 ≤ q j₀ := by + have : P.natDegree ≤ q j₀ - 1 := by + apply natDegree_sum_le_of_forall_le + intro i _ + exact (natDegree_C_mul_X_pow_le _ _).trans (by have := i.isLt; omega) + have := i₀.isLt + omega + rw [hfun] + have h1 := FourExpDeg.sum_order_le P hP (ω j₀) S + have h2 : q j₀ ≤ ∑ j, q j := Finset.single_le_sum (fun j _ => Nat.zero_le _) (Finset.mem_univ j₀) + omega + +end FourExponentials diff --git a/LeanPool/projects/four-exponentials-trdeg-one.yaml b/LeanPool/projects/four-exponentials-trdeg-one.yaml new file mode 100644 index 0000000000..4f88a3dd0f --- /dev/null +++ b/LeanPool/projects/four-exponentials-trdeg-one.yaml @@ -0,0 +1,70 @@ +slug: four-exponentials-trdeg-one +title: The four exponentials theorem in transcendence degree one +summary: 'Proves the four exponentials theorem in transcendence degree one, due to Waldschmidt + (1973) and Brownawell (1974): if λ₁₁, λ₁₂, λ₂₁, λ₂₂ are non-zero complex numbers whose + exponentials are algebraic, with λ₁₁ λ₂₂ = λ₁₂ λ₂₁, and the field they generate has + transcendence degree at most one over ℚ, then the rows or the columns of the matrix (λᵢⱼ) are + linearly dependent over ℚ. Without the hypothesis on the transcendence degree this is the open + four exponentials conjecture. The project also solves Schneider''s eighth problem, showing + that at least one of e^e and e^{e²} is transcendental, and proves Waldschmidt''s column theorem: + if (x₁, x₂) and (y₁, y₂) are each linearly independent over ℚ and exp(x₁ y₂) and exp(x₂ y₂) + are algebraic, two of the eight numbers xᵢ, yⱼ, exp(xᵢ yⱼ) are algebraically independent. The + proof is Waldschmidt''s of 1973 with the tools of his 1971 paper: Siegel''s lemma gives an + auxiliary function Σ c(i, j, h) zⁱ e^{(j x₁ + h x₂) z} with many zeros, an extrapolation and a + zero count for exponential polynomials show that one of its derivatives does not vanish on the + grid, norms down to ℚ(ω) give integer polynomials that are too small at a transcendental ω, and + Gel''fond''s transcendence criterion, in Waldschmidt''s form, makes ω algebraic. + Hermite–Lindemann and Schwarz''s lemma with prescribed zeros are taken from Tau Ceti.' +branch: transcendental number theory +entry_module: LeanPool.FourExponentials +authors: +- Carlo Perassi +source: + title: Solution du huitième problème de Schneider + authors: + - Michel Waldschmidt + url: https://github.com/carlok/four-exponentials-palomar + github_repo: carlok/four-exponentials-palomar + commit: 8eb91e1664667ce90fa4f59272921c228f27d485 + announcement: https://palomar-registry.org/entry?id=PALOMAR-2026-11-28-000054&version=1 + announcement_date: '2026-11-28' + citation: 'M. Waldschmidt, Solution du huitième problème de Schneider, J. Number Theory 5 (1973), + 191–202; W. D. Brownawell, The algebraic independence of certain numbers related by the + exponential function, J. Number Theory 6 (1974), 22–31; M. Waldschmidt, Indépendance + algébrique des valeurs de la fonction exponentielle, Bull. Soc. Math. France 99 (1971), + 285–304.' +license: Apache-2.0 +status: verified +provenance: AI +provenance_evidence: The upstream formalization.yaml states that Claude agents (Claude Code) wrote + the Lean proofs under the author's direction, one statement at a time, checked on the Prove2Me + platform and then mirrored into carlok/diaz-modulus-lean, from which carlok/four-exponentials-palomar + is an extract. The headline theorem was separately registered with Palomar from + carlok/four-exponentials-trdeg-one-lean at 0c87279c91e0959343f4af77f8e25afc97c0be0d. +main_declarations: +- FourExponentials.four_exponentials_trdeg_one +- FourExponentials.Transcendence.exp_e_or_exp_e_sq_transcendental +- FourExponentials.two_algebraically_independent_of_exp_column +main_results: +- declaration: FourExponentials.four_exponentials_trdeg_one + informal: If λ₁₁, λ₁₂, λ₂₁, λ₂₂ are non-zero complex numbers with algebraic exponentials, λ₁₁ λ₂₂ + = λ₁₂ λ₂₁, and ℚ[λ₁₁, λ₁₂, λ₂₁, λ₂₂] has transcendence degree at most one over ℚ, then the rows + or the columns of the matrix (λᵢⱼ) are linearly dependent over ℚ. + source_ref: Waldschmidt 1973; Brownawell 1974 +- declaration: FourExponentials.Transcendence.exp_e_or_exp_e_sq_transcendental + informal: At least one of e^e and e^{e²} is transcendental (Schneider's eighth problem). + source_ref: Waldschmidt 1973; Brownawell 1974 +- declaration: FourExponentials.two_algebraically_independent_of_exp_column + informal: If x₁, x₂ and y₁, y₂ are each linearly independent over ℚ and exp(x₁ y₂), exp(x₂ y₂) + are algebraic, then two of the eight numbers xᵢ, yⱼ, exp(xᵢ yⱼ) are algebraically independent + over ℚ. + source_ref: Waldschmidt 1973; Brownawell 1974 +tags: +- transcendence +- four-exponentials +- gelfond-criterion +- algebraic-independence +msc: +- 11J81 +- 11J85 +- 68V20