introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
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