File size: 4,288 Bytes
2f887db | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | import Mathlib
import OAI.Computability.MinUncut.Estimates.Assembly
namespace OAI
section
noncomputable section
open scoped BigOperators
namespace MinUncut.Inner
open MeasureTheory ProbabilityTheory BinaryFourier RowNoise GaussianHermite Subbox
structure InnerParameters (J : ℝ) where
s : ℕ
m : ℕ
k : ℕ
n : ℕ
H : ℕ
A₀ : ℕ
γ : ℚ
p : ℚ
θ : ℚ
hm : 2 ≤ m
hn : k+2 ≤ n
hk : 1 ≤ k
hs : ∀ t : ℕ, s+2 ≤ t → (t:ℝ)*(smoothingRho (sourceSigma J))^(2*t) ≤ 1/16
hroom : sourceR J*m < (m-s).choose 2
hH : 0 < H
hA : 0 < A₀
hγ : 0 < (γ:ℝ)
hp : 0 < (p:ℝ)
hp1 : (p:ℝ) < 1
hθ : 0 < (θ:ℝ)
hθ1 : (θ:ℝ) < 1
hloc : (sourceSigma J)⁻¹*Real.sqrt (((s+sourceR J*m:ℕ):ℝ)*((k:ℝ)/((n:ℝ)-1))) <
classTarget (sourceT J) m/10
henergy : (sourceSigma J)⁻¹^2/(H:ℝ) < classTarget (sourceT J) m/10
hclip : 2*((sourceSigma J)⁻¹^2)/(A₀:ℝ) < classTarget (sourceT J) m/10
hcollision : 2*(A₀:ℝ)*((m:ℝ)/((k:ℝ)+1))^(((2^m:ℕ):ℝ)⁻¹) < classTarget (sourceT J) m/10
hfourth : Real.sqrt ((H:ℝ)*((γ:ℝ)+(H:ℝ)^2/(A₀:ℝ))) < classTarget (sourceT J) m/10
hatom : Real.sqrt ((sourceSigma J)⁻¹^2)*Real.sqrt
(((4:ℝ)^Fintype.card (Row m n)*((Fintype.card (Point m n)+s).choose s:ℝ)*
Real.sqrt ((θ:ℝ)^2+(m:ℝ)*(p:ℝ)*(n^m:ℕ)/(sourceSigma J)^2))/(γ:ℝ)) <
classTarget (sourceT J) m/10
lemma exists_innerParameters {J : ℝ} (hJ : 1 ≤ J) : Nonempty (InnerParameters J) := by
have hσ := sourceSigma_pos hJ
have hT : (0:ℝ) < sourceT J := by exact_mod_cast sourceT_pos hJ
obtain ⟨s,hs⟩ := exists_cutoff (smoothingRho_lt_one hσ.ne') (by norm_num : (0:ℝ) < 1/16)
obtain ⟨m,hm,_,hroom⟩ := exists_dimension (sourceR J) s
let e := classTarget (sourceT J) m/10
have he : 0 < e := div_pos (classTarget_pos hT m) (by norm_num)
obtain ⟨H,A₀,γ,hH,hA,hγ,_,henergy,hclip,hfourth⟩ :=
exists_reciprocal_processing (E := (sourceSigma J)⁻¹^2) he
have hAr : (0:ℝ) < A₀ := by exact_mod_cast hA
obtain ⟨k,hk,hcollision⟩ := exists_box_scale m hAr he
obtain ⟨n,hn,hloc⟩ := exists_ambient_scale s (sourceR J*m) k hσ he
let C := (4:ℝ)^Fintype.card (Row m n)*((Fintype.card (Point m n)+s).choose s:ℝ)
have hchoose : 0 < (Fintype.card (Point m n)+s).choose s := Nat.choose_pos (by omega)
have hC : 0 < C := by dsimp [C]; positivity
let L := (m:ℝ)*(n^m:ℕ)/(sourceSigma J)^2
have hnpos : 0 < n := by omega
have hmpos : 0 < m := by omega
have hL : 0 < L := by dsimp [L]; positivity
obtain ⟨p,θ,hp,hp1,hθ,hθ1,hQ⟩ := exists_small_rational_atoms hL
(show 0 < (e^2*(sourceSigma J)^2*(γ:ℝ)/C)^2 by positivity)
have hQ' : (θ:ℝ)^2+(m:ℝ)*(p:ℝ)*(n^m:ℕ)/(sourceSigma J)^2 <
(e^2*(sourceSigma J)^2*(γ:ℝ)/C)^2 := by
convert hQ using 1
dsimp [L]
ring
have hatom := nested_atom_lt hσ he hγ hC hQ'
exact ⟨⟨s,m,k,n,H,A₀,γ,p,θ,hm,hn,hk,hs,hroom,hH,hA,hγ,hp,hp1,hθ,hθ1,
hloc,henergy,hclip,hcollision,hfourth,hatom⟩⟩
theorem InnerParameters.decode {J : ℝ} (hJ : 1 ≤ J) (P : InnerParameters J)
{Ξ : Type*} [Fintype Ξ] (V A : Ξ → Type*)
[∀ ξ, AddCommGroup (V ξ)] [∀ ξ, Module F₂ (V ξ)] [∀ ξ, AddTorsor (V ξ) (A ξ)]
[∀ ξ, Fintype (A ξ)] (w : Ξ → ℝ) (hw : ∀ ξ, 0 ≤ w ξ) (hw1 : ∑ ξ, w ξ=1)
(f : ∀ ξ, FoldedProof (A ξ))
(h1 : (∑ ξ, w ξ*firstError (m := P.m) (n := P.n) (f ξ) (sourceSigma J) (sourceEta J)) ≤
J*(10*sourceSigma J))
(h2 : (∑ ξ, w ξ*secondError (m := P.m) (n := P.n) (f ξ)
((sourceEta J)^2/(P.m:ℝ)) (sourceSigma J) (sourceEta J)) ≤ J*(10*(sourceEta J+sourceEta J)))
(h3 : (∑ ξ, w ξ*thirdError (m := P.m) (n := P.n) (f ξ) (sourceSigma J) (sourceEta J)) ≤
J/(Fintype.card (Code P.m P.n):ℝ)) :
(P.p:ℝ) ≤ ∑ ξ, w ξ*atomProbability (m := P.m) (n := P.n) (f ξ)
(sourceSigma J) (sourceEta J) (P.θ:ℝ) := by
apply inner_atom_of_errors V A w hw hw1 f hJ P.hm (by have := P.hn; omega)
(by have := P.hn; omega) P.hs P.hroom (by exact_mod_cast P.hH) P.hγ
(by exact_mod_cast P.hA) P.hθ.le P.hloc P.henergy P.hclip P.hcollision P.hfourth P.hatom
h1 h2 h3
end MinUncut.Inner
end
end
end OAI
|