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