cfahlgren1's picture
download
raw
3.75 kB
import Mathlib
import OAI.Computability.VertexCover.PCP.PoweringCounting
import OAI.Computability.VertexCover.PCP.PoweringSoundness
namespace OAI
namespace UniqueGames.Foundations.PCP.PoweringGap
open PoweringWalks PoweringLabels PoweringOpinions PoweringTest
open SpectralReturn PoweringSoundness PoweringCounting
variable {V D A : Type*}
theorem gain_nonneg (q M : Nat) (lambda : ℝ) (hlambda : lambda < 1) :
0 ≤ gain q M lambda := by
have hden : 0 < 1 - lambda := sub_pos.mpr hlambda
unfold gain
positivity
variable [Fintype V] [Fintype D] [Nonempty V] [Nonempty D]
[Fintype A] [Nonempty A]
theorem uniform_count_gap (G : PortGraph V D) (lambda : ℝ)
(certificate : SpectralCertificate (lazyGraph G) lambda)
(accepts : Edge V (Bool × D) → A → A → Bool)
(reverse_accepts : ∀ e a b, accepts ((lazyGraph G).rot e) b a = accepts e a b)
(M : Nat) (hM : 1 ≤ M)
(selectors : ∀ v, AddressSelector (lazyGraph G)
(2 * center (Fintype.card A) M + 1) v)
(epsilon : ℝ) (hepsilon : 0 ≤ epsilon)
(hgap : ∀ assignment : V → A,
epsilon * (Fintype.card (Edge V (Bool × D)) : ℝ) ≤
((baseGraph (lazyGraph G) accepts reverse_accepts).rejectionCount assignment : ℝ))
(labels : V → PaddedLabel (Bool × D) (2 * center (Fintype.card A) M + 1) A) :
(gain (Fintype.card A) M lambda *
min epsilon (1 / ((2 * center (Fintype.card A) M + 1 : Nat) : ℝ))) *
(Fintype.card (Dart V (Bool × D) (2 * center (Fintype.card A) M)) : ℝ) ≤
((poweredGraph (lazyGraph G) accepts (2 * center (Fintype.card A) M)
selectors).rejectionCount labels : ℝ) := by
classical
let L := lazyGraph G
let N := center (Fintype.card A) M
let n := 2 * N
let H := poweredGraph L accepts n selectors
change (gain (Fintype.card A) M lambda *
min epsilon (1 / ((n + 1 : Nat) : ℝ))) *
(Fintype.card (Dart V (Bool × D) n) : ℝ) ≤
(H.rejectionCount labels : ℝ)
rcases eq_or_lt_of_le hepsilon with hzero | hpositive
· rw [← hzero]
have hcap : (0 : ℝ) ≤ 1 / ((n + 1 : Nat) : ℝ) := by positivity
rw [min_eq_left hcap, mul_zero, zero_mul]
exact Nat.cast_nonneg _
· let fallback : A := Classical.choice (inferInstance : Nonempty A)
let assignment := decoded L (n + 1) N selectors labels fallback
have hdecoded : epsilon ≤ decodedError L accepts n N selectors labels fallback := by
change epsilon ≤ edgeDensity (decodedBad L accepts assignment)
exact base_count_lower_to_density L accepts reverse_accepts assignment
Fintype.card_pos epsilon (hgap assignment)
have herror : 0 < decodedError L accepts n N selectors labels fallback :=
hpositive.trans_le hdecoded
have hsound := PoweringSoundness.rejection_lower_bound G lambda certificate
accepts reverse_accepts M hM selectors labels fallback herror
have hgain : 0 ≤ gain (Fintype.card A) M lambda :=
gain_nonneg (Fintype.card A) M lambda certificate.lt_one
have hmin : min epsilon (1 / ((n + 1 : Nat) : ℝ)) ≤
min (decodedError L accepts n N selectors labels fallback)
(1 / ((n + 1 : Nat) : ℝ)) :=
min_le_min hdecoded (le_refl _)
have hlower : gain (Fintype.card A) M lambda *
min epsilon (1 / ((n + 1 : Nat) : ℝ)) ≤
poweredRejection L accepts n selectors labels :=
(mul_le_mul_of_nonneg_left hmin hgain).trans hsound
exact (constraint_rejection_lower_iff H labels Fintype.card_pos
(gain (Fintype.card A) M lambda *
min epsilon (1 / ((n + 1 : Nat) : ℝ)))).mp hlower
end UniqueGames.Foundations.PCP.PoweringGap
end OAI

Xet Storage Details

Size:
3.75 kB
·
Xet hash:
f3305ff336a7e32b5e249a1c2db6a872cb1488411b6c28b08b3d2abdda47133d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.