Download data/lean/OAI/Computability/PerfectCompleteness/Sampling/OwnLawHeavyList.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.17 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/PerfectCompleteness/Sampling/OwnLawHeavyList.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/PerfectCompleteness/Sampling/OwnLawHeavyList.lean
-
curl -L -o OwnLawHeavyList.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/PerfectCompleteness/Sampling/OwnLawHeavyList.lean
3.17 kB
| 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 | |