File size: 3,174 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 | import OAI.Computability.PerfectCompleteness.Construction.OwnBucketBias
namespace OAI
section
namespace PerfectCompleteness.OwnLawHeavyList
open QuarterBalance
open HiddenBucketBias (recursiveLaw)
open UniqueGamesTheorem.Foundations.Games
open scoped TensorProduct Classical
noncomputable section
variable {V : Type*} [AddCommGroup V] [Module F2 V] [Fintype V]
local instance dualFintype : Fintype (Module.Dual F2 V) :=
Fintype.ofInjective (fun f : Module.Dual F2 V => (f : V β F2)) DFunLike.coe_injective
def character (f : Module.Dual F2 V) (x : V) : β := sign (f x)
omit [Fintype V] in
theorem character_sq (f : Module.Dual F2 V) (x : V) : character f x ^ 2 = 1 := by
unfold character sign
split <;> norm_num
omit [Fintype V] in
theorem character_pair (f g : Module.Dual F2 V) (x : V) :
character f x * character g x = character (f - g) x := by
simp only [character, sub_eq_add_neg,
LinearMap.add_apply, LinearMap.neg_apply, ZMod.neg_eq_self_mod_two, sign_add]
def heavyList (ΞΌ : FiniteDistribution V) (target : V β β) (threshold : β) :
Finset (Module.Dual F2 V) :=
SmallBias.heavySet ΞΌ character target threshold
theorem mem_heavyList (ΞΌ : FiniteDistribution V) (target : V β β) (threshold : β)
(f : Module.Dual F2 V) :
f β heavyList ΞΌ target threshold β
threshold β€ |ΞΌ.expectation (fun x => target x * character f x)| := by
simp only [heavyList, SmallBias.heavySet, Finset.mem_filter, Finset.mem_univ, true_and]
theorem heavyList_card_le (ΞΌ : FiniteDistribution V) (target : V β β)
(threshold bias : β) (hthreshold : 0 < threshold) (hbias : 0 β€ bias)
(hsmall : bias β€ threshold ^ 2 / 2) (htarget : β x, target x ^ 2 β€ 1)
(hdual : β f : Module.Dual F2 V, f β 0 β
|ΞΌ.expectation (fun x => sign (f x))| β€ bias) :
((heavyList ΞΌ target threshold).card : β) β€ 2 / threshold ^ 2 := by
apply SmallBias.heavySet_card_le ΞΌ character target threshold bias
hthreshold hbias hsmall htarget (fun f x => (character_sq f x).le)
intro f g hfg
simp only [character_pair]
exact hdual (f - g) (sub_ne_zero.mpr hfg)
universe u
variable {branch : Nat β Nat} {n m width : Nat}
theorem own_heavyList_card_le (W : Submodule F2 (Fin width β F2))
(repeats : Nat β Nat) (hrep : RecursiveSamplerBias.RepetitionsBalanced repeats)
(p : DescendantSpaces.Path branch n m)
(A : RecursiveSpaces.Slots branch n β Type u) [β s, Finite (A s)]
(target : (W β[F2] RecursiveSpaces.space F2 branch n A) β β)
(threshold : β) (hthreshold : 0 < threshold)
(hsmall : (7 / 8 : β) ^ repeats n β€ threshold ^ 2 / 2)
(htarget : β x, target x ^ 2 β€ 1) :
((heavyList (recursiveLaw W repeats p A) target threshold).card : β) β€
2 / threshold ^ 2 := by
let : Fintype (RecursiveSpaces.space F2 branch n A) := Fintype.ofFinite _
apply heavyList_card_le (recursiveLaw W repeats p A) target threshold
((7 / 8 : β) ^ repeats n) hthreshold (pow_nonneg (by norm_num) _) hsmall htarget
exact fun f hf => OwnBucketBias.bias_le W repeats hrep p A f hf
end
end PerfectCompleteness.OwnLawHeavyList
end
end OAI
|