File size: 3,898 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | import OAI.Computability.PerfectCompleteness.Decoding.LeftDecoder
namespace OAI
namespace PerfectCompleteness.LeftDecoderKnownRows
open scoped Classical
open UniqueGamesTheorem.Foundations.Games
open ClauseSupport MixedSupport
open LeftDecoder (F2)
noncomputable section
variable {n : Nat} {K Z : Type*} [AddCommGroup K] [Module F2 K]
(slots : Fin n β Slot) (H : Submodule F2 (Assignment slots β F2))
(other : Assignment slots β Z) (labeling : KeyStrategy.Strategy n)
(W : Submodule F2 H) (s : (H β§Έ W) ββ[F2] H)
(hs : W.mkQ.comp s = LinearMap.id)
theorem exists_fallback_candidate_realizer
(hW : RepresentativeMatrixTable.Determined slots H other W) :
β x : Assignment slots,
other x = (CanonicalMatrixTable.response slots H other labeling
(0 : CanonicalMatrixTable.Matrix (K := K) slots H)).2 β§
β q : PulledColumnSpace.Candidates W β₯
(RepresentativeMatrixTable.correctionFunctional slots H other W s hs
(CanonicalMatrixTable.response slots H other labeling
(0 : CanonicalMatrixTable.Matrix (K := K) slots H)).2),
β b : W, q.val (b : H) = b.val.val x := by
obtain β¨x, _, hxβ© := CanonicalMatrixTable.response_realized slots H other labeling
(0 : CanonicalMatrixTable.Matrix (K := K) slots H)
refine β¨x, hx, ?_β©
intro q b
rw [PulledColumnSpace.candidate_apply_known, β hx]
simpa only [add_zero] using RepresentativeDecoder.coset_apply_at_image
slots H other W s hs hW x 0 W.dualAnnihilator.zero_mem b
attribute [local instance] UniqueGamesTheorem.Appendix.RankLevelFilter.linearMapFintype
variable [FiniteDimensional F2 H]
[Fintype H] [Fintype K]
(useful : (Module.Dual F2 (H β§Έ W) ββ[F2] K) β Prop)
local instance representativeDualFintype : Fintype (Module.Dual F2 H) :=
LeftDecoder.dualFintype (V := H)
theorem adviceLaw_probability_eq_one_of_known_realizer
(hW : RepresentativeMatrixTable.Determined slots H other W)
(r : Nat) (Ο : β) (hΟ : 0 < Ο) (A : ManyGoodRows.RowMap K r)
(U : Module.Dual F2 (H β§Έ W) ββ[F2] (Fin r β F2))
(event : Module.Dual F2 H β Bool)
(hevent : β q : Module.Dual F2 H,
(β x : Assignment slots, β b : W, q (b : H) = b.val.val x) β event q = true) :
(LeftDecoder.adviceLaw slots H other labeling W s hs useful r Ο A U).probability
event = 1 := by
by_cases hgood : ManyGoodRows.GoodRow
(RepresentativeMatrixTable.partialTable slots H other labeling W s useful) r Ο A U
Β· rw [LeftDecoder.adviceLaw_of_good slots H other labeling W s hs useful r Ο A U hgood]
unfold LeftDecoder.law
apply LeftDecoder.affineLaw_probability_eq_one
intro q
obtain β¨x, _, hknownβ© := LeftDecoder.exists_candidate_realizer
slots H other labeling W s hs useful hW
(ManyGoodRows.selectWitness
(RepresentativeMatrixTable.partialTable slots H other labeling W s useful)
r Ο A U hgood) hΟ
exact hevent q.val β¨x, hknown qβ©
Β· simp only [LeftDecoder.adviceLaw, dite_eq_right hgood]
apply LeftDecoder.affineLaw_probability_eq_one
intro q
obtain β¨x, _, hknownβ© :=
exists_fallback_candidate_realizer (K := K) slots H other labeling W s hs hW
exact hevent q.val β¨x, hknown qβ©
theorem adviceLaw_known_realizer
(hW : RepresentativeMatrixTable.Determined slots H other W)
(r : Nat) (Ο : β) (hΟ : 0 < Ο) (A : ManyGoodRows.RowMap K r)
(U : Module.Dual F2 (H β§Έ W) ββ[F2] (Fin r β F2)) :
(LeftDecoder.adviceLaw slots H other labeling W s hs useful r Ο A U).probability
(fun q => decide (β x : Assignment slots,
β b : W, q (b : H) = b.val.val x)) = 1 :=
adviceLaw_probability_eq_one_of_known_realizer
slots H other labeling W s hs useful hW r Ο hΟ A U _
(fun _ hx => decide_eq_true hx)
end
end PerfectCompleteness.LeftDecoderKnownRows
end OAI
|