Download data/lean/OAI/Probability/MatroidSecretary/Transport/SimulationInformation.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.8 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/MatroidSecretary/Transport/SimulationInformation.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/MatroidSecretary/Transport/SimulationInformation.lean
-
curl -L -o SimulationInformation.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/MatroidSecretary/Transport/SimulationInformation.lean
4.8 kB
| import OAI.Probability.MatroidProphet.Main | |
| namespace OAI | |
| /-! | |
| # Information restrictions of the one-sample simulation | |
| These pointwise statements make explicit the information restrictions used in | |
| `sections/setup.tex`, Lemma `lem:simulation`: unused samples and online values | |
| of sacrificed labels cannot affect the execution. The final two replay | |
| identities also support the prefix/suffix construction in `sections/secretary.tex`. | |
| No independence, positivity, or feasibility assumptions are needed for these | |
| deterministic identities. | |
| -/ | |
| namespace MatroidProphet | |
| lemma simulationObserved_eq_of_eq_on_mask {n bits : β} (A : HiddenRule n bits) | |
| (r : Seed bits) (s s' : Weights n) | |
| (hs : β e β A.mask r, s e = s' e) : | |
| observed A r s = observed A r s' := by | |
| classical | |
| funext e | |
| by_cases he : e β A.mask r | |
| Β· simp [observed, he, hs e he] | |
| Β· simp [observed, he] | |
| lemma simulationHistory_eq_of_eq_on_mask {n bits : β} (A : HiddenRule n bits) | |
| (r : Seed bits) (s s' : Weights n) {k : Fin n} (h : History n k) | |
| (hs : β e β A.mask r, s e = s' e) : | |
| simulationHistory A r s h = simulationHistory A r s' h := by | |
| classical | |
| funext j | |
| by_cases he : (h j).1 β A.mask r | |
| Β· simp [simulationHistory, he, hs _ he] | |
| Β· simp [simulationHistory, he] | |
| /-- The simulator's current decision ignores every sample outside its mask. -/ | |
| theorem sampleSimulation_decide_eq_of_eq_on_mask {n bits : β} | |
| (A : HiddenRule n bits) (r : Seed bits) (s s' : Weights n) | |
| (k : Fin n) (h : History n k) | |
| (hs : β e β A.mask r, s e = s' e) : | |
| (sampleSimulation A).decide k r s h = | |
| (sampleSimulation A).decide k r s' h := by | |
| classical | |
| simp only [sampleSimulation] | |
| rw [simulationObserved_eq_of_eq_on_mask A r s s' hs, | |
| simulationHistory_eq_of_eq_on_mask A r s s' h hs] | |
| lemma glue_eq_of_eq_on_regions {n : β} (mask : Finset (Fin n)) | |
| (s s' v v' : Weights n) | |
| (hs : β e β mask, s e = s' e) | |
| (hv : β e β mask, v e = v' e) : | |
| glue mask s v = glue mask s' v' := by | |
| classical | |
| funext e | |
| by_cases he : e β mask | |
| Β· simp [glue, he, hs e he] | |
| Β· simp [glue, he, hv e he] | |
| /-- Neither unused samples nor sacrificed online values change any accepted prefix. -/ | |
| theorem sampleSimulation_acceptedThrough_noninterference {n bits : β} | |
| (A : HiddenRule n bits) (r : Seed bits) (s s' v v' : Weights n) | |
| (Ο : ArrivalOrder n) (t : β) | |
| (hs : β e β A.mask r, s e = s' e) | |
| (hv : β e β A.mask r, v e = v' e) : | |
| acceptedThrough (sampleSimulation A) r s v Ο t = | |
| acceptedThrough (sampleSimulation A) r s' v' Ο t := by | |
| rw [sampleSimulation_acceptedThrough, sampleSimulation_acceptedThrough, | |
| glue_eq_of_eq_on_regions (A.mask r) s s' v v' hs hv] | |
| /-- The same information invariance holds for the reward in actual online values. -/ | |
| theorem sampleSimulation_reward_noninterference {n bits : β} | |
| (A : HiddenRule n bits) (r : Seed bits) (s s' v v' : Weights n) | |
| (Ο : ArrivalOrder n) | |
| (hs : β e β A.mask r, s e = s' e) | |
| (hv : β e β A.mask r, v e = v' e) : | |
| reward (sampleSimulation A) r s v Ο = | |
| reward (sampleSimulation A) r s' v' Ο := by | |
| rw [sampleSimulation_reward, sampleSimulation_reward, | |
| glue_eq_of_eq_on_regions (A.mask r) s s' v v' hs hv] | |
| /-- A sacrificed label is rejected at every prefix, irrespective of its value. -/ | |
| theorem sampleSimulation_rejects_mask {n bits : β} (A : HiddenRule n bits) | |
| (r : Seed bits) (s v : Weights n) (Ο : ArrivalOrder n) (t : β) | |
| (e : Fin n) (he : e β A.mask r) : | |
| e β acceptedThrough (sampleSimulation A) r s v Ο t := by | |
| rw [sampleSimulation_acceptedThrough] | |
| exact fun h => (Finset.mem_sdiff.mp h).2 he | |
| lemma glue_observed_left {n bits : β} (A : HiddenRule n bits) | |
| (r : Seed bits) (w : Weights n) : | |
| glue (A.mask r) (observed A r w) w = w := by | |
| classical | |
| funext e | |
| by_cases he : e β A.mask r <;> simp [glue, observed, he] | |
| /-- Replaying the full arrived history after supplying only the observed mask | |
| agrees exactly with the hidden rule, at every prefix including zero. -/ | |
| theorem sampleSimulation_replay_acceptedThrough {n bits : β} | |
| (A : HiddenRule n bits) (r : Seed bits) (w : Weights n) | |
| (Ο : ArrivalOrder n) (t : β) : | |
| acceptedThrough (sampleSimulation A) r (observed A r w) w Ο t = | |
| hiddenAcceptedThrough A r w Ο t := by | |
| rw [sampleSimulation_acceptedThrough, glue_observed_left] | |
| /-- The replay identity preserves the actual reward without a numerical loss. -/ | |
| theorem sampleSimulation_replay_reward {n bits : β} | |
| (A : HiddenRule n bits) (r : Seed bits) (w : Weights n) | |
| (Ο : ArrivalOrder n) : | |
| reward (sampleSimulation A) r (observed A r w) w Ο = hiddenReward A r w Ο := by | |
| rw [sampleSimulation_reward, glue_observed_left] | |
| end MatroidProphet | |
| end OAI | |