Offline · exact source
Exact Lean source

YoungFlatCorrection

formalization/Cloning/YoungFlatCorrection.lean

Source hash: 1162b104ee109f5aaab6d82b78e67c40ea02b1f392a1762caa13f1d9cb4884ed

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.

Declarations in this module
1import Cloning.YoungFlatMass
2 
3/-! A continuous positive-part Vandermonde correction, including collision boundaries. -/
4noncomputable section
5open scoped BigOperators Topology Classical
6open Filter
7namespace Cloning.YoungFlat
8open Cloning.TensorLie
9set_option backward.isDefEq.respectTransparency false
10set_option maxHeartbeats 1200000
11 
12/-- The continuous chamber factor in the flat local limit. -/
13def vandermondeFactor {r : ℕ} (x : Fin r → ℝ) : ℝ :=
14  ∏ a : PositiveRoot r, (max (x a.val.1-x a.val.2) 0)^2 /
15    ((1/(r : ℝ))*((a.val.2.val : ℝ)-a.val.1.val))
16 
17/-- The exact correction expressed at mesh `t=1/sqrt N`. -/
18def scaledCorrection {r : ℕ} (t : ℝ) (x : Fin r → ℝ) : ℝ :=
19  ∏ a : PositiveRoot r,
20    (max (x a.val.1-x a.val.2+((a.val.2.val : ℝ)-a.val.1.val)*t) 0)^2 /
21    ((1/(r : ℝ)+x a.val.1*t+((a.val.2.val : ℝ)-a.val.1.val)*t^2)*
22      ((a.val.2.val : ℝ)-a.val.1.val))
23 
24theorem positiveCorrection_eq_scaled {r N : ℕ} (hN : 0 < N) (μ : Fin r → ℕ) (x : Fin r → ℝ)
25    (hc : ∀ i, (μ i : ℝ) = N*(1/(r : ℝ)+x i/Real.sqrt (N : ℝ))) :
26    positiveCorrection μ = scaledCorrection (Real.sqrt (N : ℝ))⁻¹ x := by
27  have hn : (N : ℝ) ≠ 0 := by positivity
28  have hs : Real.sqrt (N : ℝ) ≠ 0 := by positivity
29  have hsq : Real.sqrt (N : ℝ)^2 = (N : ℝ) := Real.sq_sqrt (Nat.cast_nonneg N)
30  apply Finset.prod_congr rfl
31  intro a _
32  let gap : ℝ := a.val.2.val-a.val.1.val
33  have hnumer : ((μ a.val.1 : ℝ)-μ a.val.2+a.val.2.val-a.val.1.val)/Real.sqrt (N : ℝ) =
34      x a.val.1-x a.val.2+gap*(Real.sqrt (N : ℝ))⁻¹ := by
35    rw [hc, hc]
36    dsimp [gap]
37    field_simp
38    ring_nf
39    simp only [hsq]
40    <;> ring
41  have hdenom : ((μ a.val.1 : ℝ)+a.val.2.val-a.val.1.val)/(N : ℝ) =
42      1/(r : ℝ)+x a.val.1*(Real.sqrt (N : ℝ))⁻¹+gap*((Real.sqrt (N : ℝ))⁻¹)^2 := by
43    rw [hc]
44    dsimp [gap]
45    field_simp
46    ring_nf
47    simp only [hsq]
48    <;> ring
49  change (max ((μ a.val.1 : ℝ)-μ a.val.2+a.val.2.val-a.val.1.val) 0)^2 /
50      (((μ a.val.1 : ℝ)+a.val.2.val-a.val.1.val)*gap) = _
51  rw [← hnumer, ← hdenom, ← zero_div (Real.sqrt (N : ℝ)),
52    max_div_div_right (Real.sqrt_nonneg _), div_pow, hsq]
53  field_simp
54  simp only [zero_div]
55  rfl
56 
57theorem scaledCorrection_tendsto {r : ℕ} (hr : 0 < r)
58    (t : ℕ → ℝ) (ht : Tendsto t atTop (𝓝 0)) (x : ℕ → Fin r → ℝ) (x₀ : Fin r → ℝ)
59    (hx : ∀ i, Tendsto (fun n ↦ x n i) atTop (𝓝 (x₀ i))) :
60    Tendsto (fun n ↦ scaledCorrection (t n) (x n)) atTop (𝓝 (vandermondeFactor x₀)) := by
61  apply tendsto_finset_prod
62  intro a _
63  have hg : 0 < (a.val.2.val : ℝ)-a.val.1.val := by
64    exact sub_pos.mpr (by exact_mod_cast Fin.lt_def.mp a.property)
65  have hrR : 0 < (r : ℝ) := by exact_mod_cast hr
66  have hh := ((((hx a.val.1).sub (hx a.val.2)).add
67    (ht.const_mul ((a.val.2.val : ℝ)-a.val.1.val))).max (tendsto_const_nhds (x := (0 : ℝ)))).pow 2
68  have hd := (((tendsto_const_nhds (x := 1/(r : ℝ))).add ((hx a.val.1).mul ht)).add
69    ((ht.pow 2).const_mul ((a.val.2.val : ℝ)-a.val.1.val))).mul_const
70      ((a.val.2.val : ℝ)-a.val.1.val)
71  simpa only [mul_zero, add_zero, zero_pow (by omega : 2 ≠ 0)] using
72    hh.div hd (by simpa using (show (1/(r : ℝ))*((a.val.2.val : ℝ)-a.val.1.val) ≠ 0 by positivity))
73 
74theorem continuous_vandermondeFactor (r : ℕ) : Continuous (@vandermondeFactor r) := by
75  unfold vandermondeFactor
76  apply continuous_finset_prod
77  intro a _
78  exact (((continuous_apply a.val.1).sub (continuous_apply a.val.2)).max continuous_const).pow 2 |>.div_const _
79 
80theorem vandermondeFactor_nonneg {r : ℕ} (hr : 0 < r) (x : Fin r → ℝ) :
81    0 ≤ vandermondeFactor x := by
82  apply Finset.prod_nonneg
83  intro a _
84  have hg : 0 < (a.val.2.val : ℝ)-a.val.1.val := by
85    exact sub_pos.mpr (by exact_mod_cast Fin.lt_def.mp a.property)
86  exact div_nonneg (sq_nonneg _) (mul_nonneg (by positivity) hg.le)
87 
88end Cloning.YoungFlat