Download data/lean/OAI/Computability/UniqueGames/Decoding/ActualSeedPointwise.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.07 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/UniqueGames/Decoding/ActualSeedPointwise.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/UniqueGames/Decoding/ActualSeedPointwise.lean
-
curl -L -o ActualSeedPointwise.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/UniqueGames/Decoding/ActualSeedPointwise.lean
8.07 kB
| import OAI.Computability.UniqueGames.Decoding.ActualAdviceUpperLemmas | |
| namespace OAI | |
| section | |
| /-! | |
| Pointwise and uniform-law identification of the retained projection seed with | |
| the actual decoder draw. Auxiliary slots at full positions affect neither the | |
| projection nor the displayed target question. The entire target map is retained | |
| when it is repacked into its independent hidden and complement components. | |
| -/ | |
| namespace UniqueGamesTheorem.Decoder.ActualSeedPointwise | |
| open UniqueGamesTheorem.Integration.BinaryLinear | |
| open UniqueGamesTheorem.Reduction UniqueGamesTheorem.Soundness | |
| open UniqueGamesTheorem.Foundations.Games | |
| open ActualSource | |
| open scoped BigOperators | |
| noncomputable section | |
| attribute [local instance] Classical.propDecidable | |
| attribute [local instance] Fintype.ofFinite | |
| theorem rawProjection_congr_slots {k : Nat} (rhsB : Fin k β Bool) | |
| (J : Finset (Fin k)) (slot slot' : Fin k β PartnerProjection.Slot) | |
| (h : β j, j β J β slot j = slot' j) : | |
| RawPartnerTarget.rawProjection rhsB J slot = | |
| RawPartnerTarget.rawProjection rhsB J slot' := by | |
| have hp : PartnerLinear.projection rhsB (PartnerMapCoordinates.activeOf J) slot = | |
| PartnerLinear.projection rhsB (PartnerMapCoordinates.activeOf J) slot' := by | |
| apply LinearMap.ext | |
| intro x | |
| change PartnerProjection.project rhsB (PartnerMapCoordinates.activeOf J) slot x = | |
| PartnerProjection.project rhsB (PartnerMapCoordinates.activeOf J) slot' x | |
| apply PartnerProjection.partner_ext | |
| Β· rfl | |
| Β· rfl | |
| Β· funext j | |
| by_cases hj : j β J | |
| Β· simp [PartnerProjection.project, PartnerMapCoordinates.activeOf, hj, h j hj] | |
| Β· simp [PartnerProjection.project, PartnerMapCoordinates.activeOf, hj] | |
| simp only [RawPartnerTarget.rawProjection, hp] | |
| theorem supported_congr_slots {k : Nat} {Id Name : Type} | |
| (J : Finset (Fin k)) (names : Id β Fin 3 β Name) (occ : Fin k β Id) | |
| (slot slot' : Fin k β PartnerProjection.Slot) | |
| (h : β j, j β J β slot j = slot' j) : | |
| RawPrivateTable.supported J names occ slot = | |
| RawPrivateTable.supported J names occ slot' := by | |
| apply Subtype.ext | |
| funext j | |
| by_cases hj : j β J | |
| Β· simp [RawPrivateTable.supported, RawPrivateTable.displayed, hj, h j hj] | |
| Β· simp [RawPrivateTable.supported, RawPrivateTable.displayed, hj] | |
| variable {k s d rs : Nat} | |
| /-- This applies to every hidden draw, with all its other data fixed. -/ | |
| theorem observedAgreement_changePositions (S : Source) | |
| (labeling : Fin (TableKeysGame.vertexCount S k s d) β Fin (2 ^ s)) | |
| (good : VisiblePolicies.LeftInput S k s d (Vector rs) β | |
| VisiblePolicies.ResponseWitness k β Prop) | |
| (draw : AdviceExperiment.Draw k (Fin S.occurrences) (Alphabet s) (Vector d) (Vector rs)) | |
| (slot : Fin k β PartnerProjection.Slot) | |
| (hslot : β j, j β draw.singletons β draw.positions j = slot j) : | |
| VisiblePolicies.observedAgreement S labeling good draw = | |
| VisiblePolicies.observedAgreement S labeling good { draw with positions := slot } := by | |
| cases draw with | |
| | mk J occ positions A M T => | |
| have hp := rawProjection_congr_slots (fun j => toBit (ActualGame.rhs S (occ j))) | |
| J positions slot hslot | |
| have hs := supported_congr_slots J (ActualGame.names S) occ positions slot hslot | |
| simp only [VisiblePolicies.observedAgreement, AdviceExperiment.leftObservation, | |
| AdviceExperiment.rightObservation, AdviceExperiment.projection, | |
| RawPrivateTable.projection, hp, hs] | |
| rfl | |
| /-- Seed and actual-draw agreement before averaging any sampled map. -/ | |
| theorem seedAgreement_pointwise (S : Source) | |
| (labeling : Fin (TableKeysGame.vertexCount S k s d) β Fin (2 ^ s)) | |
| (good : VisiblePolicies.LeftInput S k s d (Vector rs) β | |
| VisiblePolicies.ResponseWitness k β Prop) | |
| (occ : Fin k β Fin S.occurrences) (A : Alphabet s ββ[F2] Vector rs) | |
| (choices : Fin k β PaddedLaw.ProjectionChoice) | |
| (slot : Fin k β PartnerProjection.Slot) | |
| (hslot : β j, j β PaddedLaw.choiceMask choices β | |
| PaddedLaw.choiceSlots choices j = slot j) | |
| (Y : RawPartnerTarget.RawPoint (PaddedLaw.choiceMask choices) ββ[F2] | |
| (Alphabet s Γ Vector d)) : | |
| VisiblePolicies.observedAgreement S labeling good | |
| (AdviceLaw.seedToActualDraw occ A β¨choices, Yβ©) = | |
| VisiblePolicies.observedAgreement S labeling good | |
| (ActualAdviceUpper.actualDraw S A (PaddedLaw.choiceMask choices) occ slot | |
| ((LinearMap.snd F2 (Alphabet s) (Vector d)).comp Y) | |
| ((LinearMap.fst F2 (Alphabet s) (Vector d)).comp Y)) := | |
| observedAgreement_changePositions S labeling good | |
| (AdviceLaw.seedToActualDraw occ A β¨choices, Yβ©) slot hslot | |
| private theorem seedAgreement_repack_at (S : Source) | |
| (labeling : Fin (TableKeysGame.vertexCount S k s d) β Fin (2 ^ s)) | |
| (good : VisiblePolicies.LeftInput S k s d (Vector rs) β | |
| VisiblePolicies.ResponseWitness k β Prop) | |
| (occ : Fin k β Fin S.occurrences) (A : Alphabet s ββ[F2] Vector rs) | |
| (choices : Fin k β PaddedLaw.ProjectionChoice) (J : Finset (Fin k)) | |
| (hJ : PaddedLaw.choiceMask choices = J) | |
| (slot : Fin k β PartnerProjection.Slot) | |
| (hslot : β j, j β PaddedLaw.choiceMask choices β | |
| PaddedLaw.choiceSlots choices j = slot j) : | |
| (FiniteDistribution.uniform | |
| (RawPartnerTarget.RawPoint (PaddedLaw.choiceMask choices) ββ[F2] | |
| (Alphabet s Γ Vector d))).expectation (fun Y => | |
| VisiblePolicies.observedAgreement S labeling good | |
| (AdviceLaw.seedToActualDraw occ A β¨choices, Yβ©)) = | |
| (FiniteDistribution.uniform | |
| ((RawPartnerTarget.RawPoint J ββ[F2] Vector d) Γ | |
| (RawPartnerTarget.RawPoint J ββ[F2] Alphabet s))).expectation (fun TM => | |
| VisiblePolicies.observedAgreement S labeling good | |
| (ActualAdviceUpper.actualDraw S A J occ slot TM.1 TM.2)) := by | |
| subst J | |
| simp only [FiniteDistribution.expectation_uniform, β Fintype.expect_eq_sum_div_card] | |
| apply Fintype.expect_equiv | |
| ((LinearMap.prodEquiv F2).toEquiv.symm.trans (Equiv.prodComm _ _)) | |
| intro Y | |
| exact seedAgreement_pointwise S labeling good occ A choices slot hslot Y | |
| /-- Exact uniform-law identification with Bernoulli-mask and iid-slot sampling. | |
| All dependent mask transport is confined to this theorem. -/ | |
| theorem seedAgreement_repack (S : Source) | |
| (labeling : Fin (TableKeysGame.vertexCount S k s d) β Fin (2 ^ s)) | |
| (good : VisiblePolicies.LeftInput S k s d (Vector rs) β | |
| VisiblePolicies.ResponseWitness k β Prop) | |
| (occ : Fin k β Fin S.occurrences) (A : Alphabet s ββ[F2] Vector rs) | |
| (mask : Fin k β Bool) (slots : Fin k β Fin 3) : | |
| (FiniteDistribution.uniform | |
| (RawPartnerTarget.RawPoint | |
| (PaddedLaw.choiceMask (AdviceLaw.choicesOfMaskSlots mask slots)) ββ[F2] | |
| (Alphabet s Γ Vector d))).expectation (fun Y => | |
| VisiblePolicies.observedAgreement S labeling good | |
| (AdviceLaw.seedToActualDraw occ A | |
| β¨AdviceLaw.choicesOfMaskSlots mask slots, Yβ©)) = | |
| (FiniteDistribution.uniform | |
| ((RawPartnerTarget.RawPoint (Clean.NativeExperiment.maskSet mask) ββ[F2] Vector d) Γ | |
| (RawPartnerTarget.RawPoint (Clean.NativeExperiment.maskSet mask) ββ[F2] | |
| Alphabet s))).expectation (fun TM => | |
| VisiblePolicies.observedAgreement S labeling good | |
| (ActualAdviceUpper.actualDraw S A (Clean.NativeExperiment.maskSet mask) | |
| occ (fun j => Clean.ActualAdviceBridge.indexSlot (slots j)) TM.1 TM.2)) := by | |
| apply seedAgreement_repack_at S labeling good occ A | |
| (AdviceLaw.choicesOfMaskSlots mask slots) (Clean.NativeExperiment.maskSet mask) | |
| (AdviceLaw.choices_mask mask slots) | |
| intro j hj | |
| have hmask : mask j = true := by | |
| rw [AdviceLaw.choices_mask] at hj | |
| simpa only [Clean.NativeExperiment.maskSet, Finset.mem_filter, Finset.mem_univ, | |
| true_and] using hj | |
| exact AdviceLaw.choices_active_slot mask slots j hmask | |
| end | |
| end UniqueGamesTheorem.Decoder.ActualSeedPointwise | |
| end | |
| end OAI | |