File size: 4,117 Bytes
4a56cd6 | 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 99 100 | import OAI.Probability.FreeIsing.Estimates.ThresholdArithmetic
import OAI.Probability.FreeIsing.Gaussian.ComponentSignalAttenuation
namespace OAI
noncomputable section
namespace Problem367
theorem half_path_cut_admissible {n m : β} (hn : 8 β€ n) (hm : n / 2 β€ m) :
let k := m / 2 - 1
let L := m - m / 2
k + 1 + L = m β§
(n : β) / 8 - 1 β€ (k + 1 : β) β§ (n : β) / 8 β€ (L : β) := by
dsimp only
have hk : m / 2 - 1 + 1 = m / 2 := by omega
rw [hk]
refine β¨by omega, ?_, ?_β©
Β· have hround : n β€ 8 * (m / 2) + 8 := by omega
have hr : (n : β) β€ 8 * (m / 2 : β) + 8 := by exact_mod_cast hround
linarith
Β· have hround : n β€ 8 * (m - m / 2) := by omega
have hr : (n : β) β€ 8 * (m - m / 2 : β) := by exact_mod_cast hround
linarith
def criticalNoiseEta (d : β) (beta : β) : β :=
min (ComponentSignalAttenuation.lossCoefficient (Real.tanh beta) / 4)
(Real.log ((d : β) - 1) / 8)
def criticalNoiseLengthConstant (beta : β) : β :=
max 8 (32 * Real.log 2 / ComponentSignalAttenuation.lossCoefficient (Real.tanh beta))
def criticalNoiseTailBase (d : β) : β := ((d : β) - 1) ^ (1 / 16 : β)
theorem criticalNoise_constants_positive {d : β} {beta : β}
(hd : 3 β€ d) (hb : 0 β€ beta)
(hcritical : ((d - 1 : β) : β) * Real.tanh beta ^ 2 = 1) :
0 < criticalNoiseEta d beta β§ 0 < criticalNoiseLengthConstant beta β§
1 < criticalNoiseTailBase d β§ 0 < 1 / (2 * ((d : β) - 1)) := by
have hb1 : 1 < (d : β) - 1 := by
have hdR : (3 : β) β€ d := by exact_mod_cast hd
linarith
have hΞΈ : 0 < Real.tanh beta := by
by_contra h
have hz := le_antisymm (not_lt.mp h) (tanh_nonneg_of_beta_nonneg hb)
simp [hz] at hcritical
have hΞ³ := ComponentSignalAttenuation.lossCoefficient_pos hΞΈ (Real.tanh_lt_one beta)
refine β¨lt_min (div_pos hΞ³ (by norm_num))
(div_pos (Real.log_pos hb1) (by norm_num)), ?_, ?_, ?_β©
Β· exact lt_of_lt_of_le (by norm_num) (le_max_left _ _)
Β· exact Real.one_lt_rpow hb1 (by norm_num)
Β· have : 0 < (d : β) - 1 := zero_lt_one.trans hb1
positivity
theorem criticalNoise_length_admissible {d n : β} {beta Ο : β}
(_hd : 3 β€ d) (hb : 0 β€ beta)
(hcritical : ((d - 1 : β) : β) * Real.tanh beta ^ 2 = 1)
(hΟ : 0 < Ο) (hΟ1 : Ο β€ 1)
(hn : criticalNoiseLengthConstant beta / Ο β€ (n : β)) :
8 β€ n β§ 8 * Real.log 2 β€
ComponentSignalAttenuation.lossCoefficient (Real.tanh beta) * (Ο * ((n : β) / 4)) := by
have hΞΈ : 0 < Real.tanh beta := by
by_contra h
have hz := le_antisymm (not_lt.mp h) (tanh_nonneg_of_beta_nonneg hb)
simp [hz] at hcritical
have hΞ³ := ComponentSignalAttenuation.lossCoefficient_pos hΞΈ (Real.tanh_lt_one beta)
have hlarge := (div_le_iffβ hΟ).mp hn
have hlow : (8 : β) β€ criticalNoiseLengthConstant beta := le_max_left _ _
have hmul := mul_le_mul_of_nonneg_left hΟ1 (Nat.cast_nonneg n : (0 : β) β€ _)
have hnR : (8 : β) β€ n := by nlinarith
refine β¨by exact_mod_cast hnR, ?_β©
have hfrac : 32 * Real.log 2 / ComponentSignalAttenuation.lossCoefficient (Real.tanh beta) β€
(n : β) * Ο := (le_max_right _ _).trans hlarge
have h := (div_le_iffβ hΞ³).mp hfrac
nlinarith
theorem criticalNoise_threshold_eq (d : β) (beta Ο : β) (n : β) :
Real.exp (-(criticalNoiseEta d beta * Ο) * ((n : β) / 4)) =
Real.exp (-((criticalNoiseEta d beta / 4) * Ο) * n) := by congr 1; ring
theorem criticalNoise_tail_eq {d : β} (hd : 3 β€ d) (n : β) :
Real.exp (-(((d : β) - 1) ^ (((n : β) / 4) / 4)) /
(2 * ((d : β) - 1))) =
Real.exp (-(1 / (2 * ((d : β) - 1))) * criticalNoiseTailBase d ^ n) := by
have hb : 0 β€ (d : β) - 1 := by
have hdR : (3 : β) β€ d := by exact_mod_cast hd
linarith
have hp : ((d : β) - 1) ^ (((n : β) / 4) / 4) = criticalNoiseTailBase d ^ n := by
rw [show ((n : β) / 4) / 4 = (1 / 16 : β) * n by ring,
Real.rpow_mul hb, Real.rpow_natCast]
rfl
rw [hp]
congr 1
ring
end Problem367
end
end OAI
|