havehlocal : assignment ∘ rename =
FoldedEquation.storedAssignment (fun h => h.val i) (fun h => h.val j) :=by
funext a
cases a with
| inl h => exact hleft h
| inr h => exact hright h
rw [satisfied_mapEquation, hlocal]
exact conditioned_equation_honest_satisfied valid π i₀ i j₀ j hπ f g μ
theoremnumbered_assignment_restriction
(vE : EncodingV) (cE : EncodingC) (iE : EncodingI) (jE : EncodingJ)
(left : V→I) (right : C→J) (v : V) («c» : C)
(valid : J→Bool) (i₀ : I) (j₀ j : {j : J // valid j = true})
(hright : right «c» = j.val) :
assignmentOfKey vE cE iE jE (taggedAssignment left right) ∘
localAddress vE cE iE jE v «c» valid i₀ j₀ =
FoldedEquation.storedAssignment (fun h => h.val (left v)) (fun h => h.val j) :=by
proof · 9
lines
funext a
cases a with
| inl h =>
simp only [Function.comp_apply, localAddress, assignmentOfKey_code,
taggedAssignment_left, FoldedEquation.storedAssignment, Sum.elim_inl]
| inr h =>
simp only [Function.comp_apply, localAddress, assignmentOfKey_code,
taggedAssignment_right, hright, extendRestricted_valid,
FoldedEquation.storedAssignment, Sum.elim_inr]
theoremconditionedOccurrence_honest_satisfied
(vE : EncodingV) (cE : EncodingC) (iE : EncodingI) (jE : EncodingJ)
(left : V→I) (right : C→J) (v : V) («c» : C)
(valid : J→Bool) (π : J→I) (i₀ : I)
(j₀ j : {j : J // valid j = true})
(hright : right «c» = j.val) (hπ : π j.val = left v)
(f : CubeI) (g μ : CubeJ) :
satisfied (conditionedOccurrence vE cE iE jE v «c» valid π i₀ j₀ f g μ)
(assignmentOfKey vE cE iE jE (taggedAssignment left right)) = !(μ j.val) :=by
proof · 3
lines
rw [conditionedOccurrence, satisfied_mapEquation,
numbered_assignment_restriction vE cE iE jE left right v «c» valid i₀ j₀ j hright]
exact conditioned_equation_honest_satisfied valid π i₀ (left v) j₀ j hπ f g μ
conditionedOccurrence vE cE iE jE v «c» valid π i₀ j₀
t.1 t.2.2 (realizedNoise t.2.1))
((equations.countP (fun e => satisfied e
(assignmentOfKey vE cE iE jE (taggedAssignment left right)))) : ℝ) /
equations.length = 1 - (D : ℝ)⁻¹:=by
dsimp only
rw [occurrenceList_acceptance]
calc
_ = SourceTape.tapeAcceptance D π (fun f => f (left v)) (fun g => g j.val) :=by
unfold SourceTape.tapeAcceptance
apply Finset.expect_congr rfl
intro t _
rw [conditionedOccurrence_honest_satisfied vE cE iE jE left right v «c»
valid π i₀ j₀ j hright hπ, dictator_test_parity π (left v) j.val hπ]
cases realizedNoise t.2.1 j.val <;> rfl
_ = _ :=by
rw [SourceTape.tapeAcceptance_eq_realizedTestAcceptance]
exact realizedTestAcceptance_dictator positive π (left v) j.val hπ
@[simp]theoremhonestBits_dummy (F : Target.Formula) (u : ℕ)
(assignment : FinF.«variables»→Bool) :
honestBits F u assignment (dummyIndex F u) = false:=by
theoremleftResponse_honest (F : Target.Formula) (u : ℕ)
(assignment : FinF.«variables»→Bool) (v : VariableContextF u) :
leftResponse F u (honestBits F u assignment) v =
fun f => f (honestI F v assignment) :=by
proof · 3
lines
funext f
simp only [leftResponse, honestBits_code, honestGlobal, taggedAssignment,
foldedAnswer_dictator]
theoremsourceEquation_honest_satisfied (F : Target.Formula) (u D : ℕ)
(assignment : FinF.«variables»→Bool)
(hs : ∀ clause ∈F.clauses, clause.eval assignment = true)
(p : SourceIndexF u D) :
satisfied (sourceEquation F u D p) (honestBits F u assignment) =
!(realizedNoise p.2.2.1 (honestJ F p.1.1 assignment)) :=by
proof · 3
lines
simp only [sourceEquation, contextEquation_satisfied, leftResponse_honest,
rightResponse_honest F u assignment hs]
rw [dictator_test_parity _ _ _ (pi_honest_sampled F p.1.1 p.1.2 assignment)]
theoremrawSourceList_honest_acceptance (F : Target.Formula) (u D : ℕ)
(hD : 0 < D) (hF : F.clauses ≠ [])
(assignment : FinF.«variables»→Bool)
(hs : ∀ clause ∈F.clauses, clause.eval assignment = true) :
((rawSourceList F u D).countP
(fun e => satisfied e (honestBits F u assignment)) : ℝ) /
(rawSourceList F u D).length = 1 - (D : ℝ)⁻¹:=by
proof · 11
lines
havehc : 0 < F.clauses.length :=List.length_pos_iff.mpr hF
let : Nonempty (FinF.clauses.length) := ⟨⟨0, hc⟩⟩
rw [rawSourceList_acceptance F u D hD]
have heq («c» : ClauseContextF u) (s : SlotContext u) :
testAcceptance ((D : ℝ)⁻¹) (pi F«c» (sampledVariables F«c» s))
(leftResponse F u (honestBits F u assignment) (sampledVariables F«c» s))
(rightResponse F u (honestBits F u assignment) «c») = 1 - (D : ℝ)⁻¹:=by
rw [leftResponse_honest, rightResponse_honest F u assignment hs]
exact testAcceptance_dictator _ _ _ _ (pi_honest_sampled F«c» s assignment)
simp_rw [heq]
simp only [Fintype.expect_const]
theoremsourceList_honest_acceptance_rat (F : Target.Formula) (u D : ℕ)
(hD : 0 < D) (assignment : FinF.«variables»→Bool)
(hs : ∀ clause ∈F.clauses, clause.eval assignment = true) :
1 - (D : ℚ)⁻¹≤ ((sourceList F u D).countP
(fun e => satisfied e (honestBits F u assignment)) : ℚ) /
(sourceList F u D).length :=by
proof · 3
lines
apply (Rat.cast_le (K:=ℝ)).mp
simpa only [Rat.cast_sub, Rat.cast_one, Rat.cast_inv, Rat.cast_natCast, Rat.cast_div] using
sourceList_honest_acceptance F u D hD assignment hs
theoremsourceList_honest_acceptance_nonempty_rat (F : Target.Formula) (u D : ℕ)
(hD : 0 < D) (hF : F.clauses ≠ [])
(assignment : FinF.«variables»→Bool)
(hs : ∀ clause ∈F.clauses, clause.eval assignment = true) :
((sourceList F u D).countP
(fun e => satisfied e (honestBits F u assignment)) : ℚ) /
(sourceList F u D).length = 1 - (D : ℚ)⁻¹:=by
proof · 3
lines
apply Rat.cast_injective (α :=ℝ)
simpa only [Rat.cast_sub, Rat.cast_one, Rat.cast_inv, Rat.cast_natCast, Rat.cast_div] using
sourceList_honest_acceptance_nonempty F u D hD hF assignment hs