Download data/lean/OAI/Computability/UniqueGames/Gadgets/Final.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.54 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/UniqueGames/Gadgets/Final.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/UniqueGames/Gadgets/Final.lean
-
curl -L -o Final.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/UniqueGames/Gadgets/Final.lean
3.54 kB
| import OAI.Computability.UniqueGames.Gadgets.ActualGadgetLemmas | |
| import OAI.Computability.UniqueGames.Gadgets.BaseConstruction | |
| import OAI.Computability.UniqueGames.Reduction.ActualSourceLemmas | |
| namespace OAI | |
| section | |
| namespace UniqueGamesTheorem.Gadget | |
| open Quadratic QuadraticStageNoise | |
| open UniqueGamesTheorem.Integration.BinaryLinear | |
| open scoped Classical | |
| noncomputable section | |
| /-- Actual finite gadget data, with a rank threshold independent of the final | |
| logical dimension and an arbitrarily small nonlinear change probability. -/ | |
| theorem exists_actual_gadget (p : β) (hp : 0 < p) : | |
| β r : β, 1 β€ r β§ β β : β, r β€ β β | |
| β g : UniqueGamesTheorem.Gadget.ActualGadget.Data (Vector β), | |
| UniqueGamesTheorem.Gadget.ActualGadget.Satisfies g p (7 / 8) r := by | |
| obtain β¨d, _hd, n, herror, hdetectβ© := BaseConstruction.exists_base p hp | |
| let B := Vec (BinaryField d) | |
| let s := quotientStage (F := BinaryField d) n | |
| let : Fintype B := Fintype.ofFinite _ | |
| let : FiniteDimensional (ZMod 2) B := Module.Finite.of_finite | |
| let : Fintype s.Input := Fintype.ofFinite _ | |
| let : Fintype s.Noise := Fintype.ofFinite _ | |
| let i : B ββ[ZMod 2] s.Input := s.embed | |
| let r := Module.finrank (ZMod 2) B + 2 | |
| refine β¨r, by omega, ?_β© | |
| intro β hβ | |
| have hdim : Module.finrank (ZMod 2) B β€ | |
| Module.finrank (ZMod 2) (Vector β) := by | |
| rw [finrank_vector] | |
| omega | |
| let bβ : B := fun _ => 1 | |
| have hbβ : bβ β 0 := by | |
| intro h | |
| have hzero := congrFun h (0 : Fin 3) | |
| exact one_ne_zero hzero | |
| have hequiv : β u (b : B), s.output (u + i b) = s.output u + b := by | |
| intro u b | |
| exact s.equivariant u b | |
| have hc : Enlargement.probability (fun z : s.Input Γ s.Noise => | |
| s.output (z.1 + s.noise z.2) β s.output z.1) β€ p := by | |
| rw [β StageData.error_eq_count_probability s] | |
| exact herror | |
| have hb : β (E : Type) [AddCommGroup E] [Module (ZMod 2) E] | |
| (U : s.Input ββ[ZMod 2] E), Function.Injective (U.comp i) β | |
| (1 / 4 : β) β€ Enlargement.probability (fun t => U (s.noise t) β 0) := by | |
| intro E _ _ U hU | |
| have h := hdetect E U hU | |
| rw [StageNoiseRecurrence.average_eq_expect] at h | |
| refine h.trans_eq ?_ | |
| rw [StageData.count_probability_eq_expect] | |
| apply Finset.expect_congr rfl | |
| intro t _ | |
| by_cases ht : U (s.noise t) = 0 | |
| Β· simp only [s] at ht β’ | |
| simp only [ht, ne_eq, not_true_eq_false, ite_false] | |
| Β· simp only [s] at ht β’ | |
| simp only [ht, ne_eq, not_false_eq_true, ite_true] | |
| exact EnlargementEndpoint.exists_data (B := B) (K := Vector β) | |
| i s.embed_injective s.output hequiv s.noise hdim bβ hbβ p hc hb | |
| theorem exists_split_gadget (p : β) (hp : 0 < p) : | |
| β r : β, 1 β€ r β§ β β : β, r β€ β β | |
| β d : β, β g : UniqueGamesTheorem.Reduction.ActualSource.SplitGadget β d, | |
| g.stabilityError β€ p β§ | |
| β (P : Type) [AddCommGroup P] [Module F2 P] | |
| (S : UniqueGamesTheorem.Reduction.ActualSource.Ambient β d ββ[F2] P), | |
| r β€ Module.finrank F2 | |
| (S.comp (UniqueGamesTheorem.Reduction.ActualSource.alphabetEmbedding β d)).range β | |
| UniqueGamesTheorem.Integration.SplitGadget.kernelProbability g S β€ 7 / 8 := by | |
| obtain β¨r, hr, hgβ© := exists_actual_gadget p hp | |
| refine β¨r, hr, ?_β© | |
| intro β hβ | |
| obtain β¨g, hgoodβ© := hg β hβ | |
| exact UniqueGamesTheorem.Integration.SplitGadget.exists_split_gadget_general g hgood | |
| end | |
| end UniqueGamesTheorem.Gadget | |
| end | |
| end OAI | |