Offline · exact source
Exact Lean source

CloningValueComparisonGeometric

formalization/Cloning/CloningValueComparisonGeometric.lean

Source hash: f50df4f9c7686bdea68a0d712ae136f0481819e2a5a5d456604074a7033230da

Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.

The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.

In the dependency map: Spectral bounds

Declarations in this module
1import Cloning.CloningValueComparisonMonotone
2import Mathlib.Analysis.SpecificLimits.Basic
3import Mathlib.Algebra.BigOperators.Intervals
4 
5/-! Concrete simple spectra with every eigenvalue ratio tending to zero. -/
6noncomputable section
7open scoped BigOperators Topology
8open Filter
9namespace Cloning.ValueComparison
10set_option maxHeartbeats 500000
11set_option backward.isDefEq.respectTransparency false
12 
13def geometricNormalizer (d : ℕ) (t : ℝ) : ℝ := ∑i : Fin d, t^i.val
14 
15theorem geometricNormalizer_pos {d : ℕ} (hd : 1≤d) {t : ℝ} (ht : 0<t) :
16    0<geometricNormalizer d t := by
17  apply Finset.sum_pos
18  · intro i _
19    exact pow_pos ht _
20  · exact ⟨⟨0,by omega⟩,Finset.mem_univ _⟩
21 
22def geometricSpectrum (d : ℕ) (hd : 1≤d) (t : ℝ) (ht0 : 0<t) (ht1 : t<1) :
23    SimpleSpectrum d where
24  eigenvalue i := t^i.val/geometricNormalizer d t
25  positive i := div_pos (pow_pos ht0 _) (geometricNormalizer_pos hd ht0)
26  strictAnti := by
27    intro i j hij
28    exact (div_lt_div_iff_of_pos_right (geometricNormalizer_pos hd ht0)).mpr
29      (pow_lt_pow_right_of_lt_one₀ ht0 ht1 hij)
30  normalized := by
31    rw [←Finset.sum_div]
32    exact div_self (geometricNormalizer_pos hd ht0).ne'
33 
34theorem geometricSpectrum_ratio (d : ℕ) (hd : 1≤d) (t : ℝ) (ht0 : 0<t)
35    (ht1 : t<1) (ij : PairIndex d) :
36    (geometricSpectrum d hd t ht0 ht1).ratio ij = t^(ij.val.2.val-ij.val.1.val) := by
37  dsimp [SimpleSpectrum.ratio,geometricSpectrum]
38  rw [div_div_div_cancel_right₀ (geometricNormalizer_pos hd ht0).ne']
39  exact (pow_sub₀ t ht0.ne' (Nat.le_of_lt ij.property)).symm
40 
41def geometricSequence (d : ℕ) (hd : 1≤d) (n : ℕ) : SimpleSpectrum d :=
42  geometricSpectrum d hd ((1/2:ℝ)^(n+1)) (pow_pos (by norm_num) _)
43    (pow_lt_one₀ (by norm_num) (by norm_num) (by omega))
44 
45theorem geometricSequence_ratio_tendsto (d : ℕ) (hd : 1≤d) (ij : PairIndex d) :
46    Tendsto (fun n => (geometricSequence d hd n).ratio ij) atTop (𝓝 0) := by
47  have ht : Tendsto (fun n : ℕ => (1/2:ℝ)^(n+1)) atTop (𝓝 0) :=
48    (tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0:ℝ)≤1/2)
49      (by norm_num : (1/2:ℝ)<1)).comp (tendsto_add_atTop_nat 1)
50  have hpos : 0 < ij.val.2.val - ij.val.1.val := Nat.sub_pos_of_lt ij.property
51  simpa only [geometricSequence,geometricSpectrum_ratio,zero_pow (Nat.ne_of_gt hpos)] using
52    ht.pow (ij.val.2.val-ij.val.1.val)
53 
54/-- Counting each unordered pair once, without assuming a mode enumeration. -/
55theorem pairIndex_card (d : ℕ) : Fintype.card (PairIndex d)*2=d*(d-1) := by
56  let e : PairIndex d ≃ Σj : Fin d, Fin j.val :=
57    { toFun := fun ij => ⟨ij.val.2,⟨ij.val.1.val,ij.property⟩⟩
58      invFun := fun ji => ⟨(⟨ji.2.val,lt_trans ji.2.isLt ji.1.isLt⟩,ji.1),ji.2.isLt⟩
59      left_inv := by intro ij; rfl
60      right_inv := by intro ji; rfl }
61  rw [Fintype.card_congr e,Fintype.card_sigma]
62  simp only [Fintype.card_fin]
63  rw [Fin.sum_univ_eq_sum_range (fun i : ℕ => i)]
64  exact Finset.sum_range_id_mul_two d
65 
66theorem pairIndex_card_real (d : ℕ) (hd : 1≤d) :
67    (Fintype.card (PairIndex d):ℝ)=(d:ℝ)*((d:ℝ)-1)/2 := by
68  have h := pairIndex_card d
69  have hr : (Fintype.card (PairIndex d):ℝ)*2=(d:ℝ)*((d:ℝ)-1) := by
70    exact_mod_cast h
71  linarith
72 
73end Cloning.ValueComparison