File size: 2,111 Bytes
f0f05de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Combinatorics.BooleanFunctions.MomentTransfer
import OAI.Combinatorics.BooleanFunctions.FiniteCLT

namespace OAI

open scoped BigOperators Topology NNReal ENNReal
open MeasureTheory ProbabilityTheory Filter Real

noncomputable section

namespace SquareRootDegree
namespace ReadoutCLT
open MeasureTheory ProbabilityTheory Filter UniformFinite FiniteCLT
open scoped Topology
attribute [local instance] Classical.propDecidable

def test (x : ℝ) : ℝ := (1/2)*SmoothGaussian.tent 1 (1/2) x
def constant : ℝ := (∫ x, test x ∂gaussianReal 0 1)/2

theorem constant_pos : 0 < constant := by
  have h := SmoothGaussian.tent_mass_pos (a := (1:ℝ)) (h := (1/2:ℝ)) (by norm_num)
  unfold constant test
  rw [integral_const_mul]
  positivity

theorem test_le_abs (x : ℝ) : test x ≤ |x| := by
  by_cases h : |x-1| < 1/2
  · have hx := (abs_lt.mp h).1
    have ht := SmoothGaussian.tent_le_one (by norm_num : (0:ℝ) < 1/2) 1 x
    unfold test
    have ha := le_abs_self x
    linarith
  · rw [test,SmoothGaussian.tent_eq_zero (by norm_num : (0:ℝ) < 1/2) (le_of_not_gt h),mul_zero]
    exact abs_nonneg x

variable {α : Type*} [Fintype α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α]

theorem exists_abs_gain (T : α → ℝ) (h0 : average T = 0)
    (h1 : average (fun a => (T a)^2) = 1) :
    ∃ n : ℕ, 0 < n ∧ constant < average (fun x => |normalizedSum T n x|) := by
  have hc := MomentTransfer.compact_test_tendsto
    (fun n => uniformMeasure (Fin n → α)) (normalizedSum T) (uniform_clt T h0 h1)
    test (by unfold test; fun_prop)
    ((SmoothGaussian.tent_compactSupport (a := (1:ℝ)) (by norm_num : (0:ℝ) < 1/2)).mul_left (f := fun _ : ℝ => (1/2:ℝ)))
  have hl : constant < ∫ x, test x ∂gaussianReal 0 1 := by
    have := constant_pos
    unfold constant at *
    linarith
  obtain ⟨n,hn,hg⟩ := ((eventually_gt_atTop 0).and (hc.eventually (lt_mem_nhds hl))).exists
  refine ⟨n,hn,hg.trans_le ?_⟩
  rw [integral_uniform]
  exact average_mono (fun x => test_le_abs (normalizedSum T n x))

end ReadoutCLT
end SquareRootDegree

end

end OAI