Download data/lean/OAI/Probability/MatroidSecretary/Transport/InformationRestriction.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.59 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/MatroidSecretary/Transport/InformationRestriction.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/MatroidSecretary/Transport/InformationRestriction.lean
-
curl -L -o InformationRestriction.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/MatroidSecretary/Transport/InformationRestriction.lean
5.59 kB
| import OAI.Probability.MatroidProphet.Main | |
| namespace OAI | |
| /-! | |
| # Explicit information restrictions for hidden-vector rules | |
| These lemmas formalize the no-future-information and irrevocability clauses of | |
| `sections/algorithm.tex`, Lemma `lem:feasibility`. They use only the concrete | |
| history and acceptance definitions; no correctness hypothesis for an algorithm | |
| is introduced. | |
| -/ | |
| namespace MatroidProphet | |
| open Finset | |
| lemma observed_eq_of_eq_on_mask {n bits : β} (A : HiddenRule n bits) | |
| (r : Seed bits) (w w' : Weights n) | |
| (h : β e β A.mask r, w e = w' e) : | |
| observed A r w = observed A r w' := by | |
| classical | |
| funext e | |
| by_cases he : e β A.mask r | |
| Β· simp only [observed, ite_eq_left he, h e he] | |
| Β· simp only [observed, ite_eq_right he] | |
| lemma history_eq_of_agree_before {n : β} (v v' : Weights n) | |
| (Ο Ο' : ArrivalOrder n) (t : β) | |
| (h : β j : Fin n, j.val < t β (Ο j, v (Ο j)) = (Ο' j, v' (Ο' j))) | |
| (k : Fin n) (hk : k.val < t) : | |
| history v Ο k = history v' Ο' k := by | |
| funext j | |
| exact h (prefixIndex k j) (by dsimp [prefixIndex]; omega) | |
| /-- Equal available label/value pairs give the same accepted set through a prefix. | |
| The two complete arrival orders and all later values may be different. -/ | |
| theorem acceptedThrough_eq_of_agree_before {n bits : β} (A : OnlineRule n bits) | |
| (r : Seed bits) (s v v' : Weights n) (Ο Ο' : ArrivalOrder n) (t : β) | |
| (h : β j : Fin n, j.val < t β (Ο j, v (Ο j)) = (Ο' j, v' (Ο' j))) : | |
| acceptedThrough A r s v Ο t = acceptedThrough A r s v' Ο' t := by | |
| classical | |
| have subset (vβ vβ : Weights n) (Οβ Οβ : ArrivalOrder n) | |
| (hΟ : β j : Fin n, j.val < t β | |
| (Οβ j, vβ (Οβ j)) = (Οβ j, vβ (Οβ j))) : | |
| acceptedThrough A r s vβ Οβ t β acceptedThrough A r s vβ Οβ t := by | |
| intro e he | |
| have hmem := (Finset.mem_filter.mp he).2 | |
| have hl := congrArg Prod.fst (hΟ (Οβ.symm e) hmem.1) | |
| have hidx : Οβ.symm e = Οβ.symm e := by | |
| apply Οβ.injective | |
| simpa only [Equiv.apply_symm_apply] using hl | |
| apply Finset.mem_filter.mpr | |
| refine β¨Finset.mem_univ e, ?_, ?_β© | |
| Β· simpa only [hidx] using hmem.1 | |
| Β· rw [hidx] | |
| rw [β decisionAt_congr A r s vβ vβ Οβ Οβ (Οβ.symm e) | |
| (history_eq_of_agree_before vβ vβ Οβ Οβ t hΟ _ hmem.1)] | |
| exact hmem.2 | |
| exact Finset.Subset.antisymm (subset v v' Ο Ο' h) | |
| (subset v' v Ο' Ο (fun j hj => (h j hj).symm)) | |
| /-- A hidden-vector execution depends only on its revealed coordinates and the | |
| actual arrival history, never on the unobserved future values or future order. -/ | |
| theorem hiddenAcceptedThrough_eq_of_same_information {n bits : β} | |
| (A : HiddenRule n bits) (r : Seed bits) (w w' : Weights n) | |
| (Ο Ο' : ArrivalOrder n) (t : β) | |
| (hmask : β e β A.mask r, w e = w' e) | |
| (hhist : β j : Fin n, j.val < t β | |
| (Ο j, w (Ο j)) = (Ο' j, w' (Ο' j))) : | |
| hiddenAcceptedThrough A r w Ο t = hiddenAcceptedThrough A r w' Ο' t := by | |
| unfold hiddenAcceptedThrough | |
| rw [observed_eq_of_eq_on_mask A r w w' hmask] | |
| rw [acceptedThrough_eq_of_agree_before A.core r (observed A r w') w w' Ο Ο' t hhist] | |
| /-- Hidden-vector acceptances cannot be revoked. -/ | |
| theorem hiddenAcceptedThrough_monotone {n bits : β} (A : HiddenRule n bits) | |
| (r : Seed bits) (w : Weights n) (Ο : ArrivalOrder n) : | |
| Monotone (hiddenAcceptedThrough A r w Ο) := by | |
| intro t t' htt' e he | |
| have hm := Finset.mem_sdiff.mp he | |
| exact Finset.mem_sdiff.mpr | |
| β¨acceptedThrough_mono A.core r (observed A r w) w Ο htt' hm.1, hm.2β© | |
| /-- Sacrifice is literal rejection, not merely exclusion from the reward sum. -/ | |
| theorem hiddenAcceptedThrough_disjoint_mask {n bits : β} (A : HiddenRule n bits) | |
| (r : Seed bits) (w : Weights n) (Ο : ArrivalOrder n) (t : β) : | |
| Disjoint (hiddenAcceptedThrough A r w Ο t) (A.mask r) := by | |
| exact Finset.sdiff_disjoint | |
| /-- Every accepted hidden-vector label has actually arrived. -/ | |
| theorem hiddenAcceptedThrough_arrived {n bits : β} (A : HiddenRule n bits) | |
| (r : Seed bits) (w : Weights n) (Ο : ArrivalOrder n) (t : β) | |
| (e : Fin n) (he : e β hiddenAcceptedThrough A r w Ο t) : | |
| (Ο.symm e).val < t := | |
| acceptedThrough_arrived A.core r (observed A r w) w Ο t e | |
| (Finset.mem_sdiff.mp he).1 | |
| /-- The observation operation is jointly measurable in the complete initial seed | |
| and the hidden vector, despite an arbitrary seed-dependent mask. -/ | |
| lemma measurable_observed_seed {n bits : β} (A : HiddenRule n bits) : | |
| Measurable (fun x : Seed bits Γ Weights n => observed A x.1 x.2) := by | |
| classical | |
| apply measurable_from_prod_countable_right | |
| intro r | |
| apply Measurable.of_eval | |
| intro e | |
| by_cases he : e β A.mask r | |
| Β· simpa only [observed, ite_eq_left he] using | |
| (measurable_pi_apply e : Measurable (fun w : Weights n => w e)) | |
| Β· simpa only [observed, ite_eq_right he] using | |
| (measurable_const : Measurable (fun _ : Weights n => (0 : β))) | |
| /-- With observations substituted, the actual core decision remains measurable. -/ | |
| lemma measurable_hidden_core_decide {n bits : β} (A : HiddenRule n bits) | |
| (k : Fin n) : | |
| Measurable (fun x : Seed bits Γ (Weights n Γ History n k) => | |
| A.core.decide k x.1 (observed A x.1 x.2.1) x.2.2) := by | |
| apply measurable_from_prod_countable_right | |
| intro r | |
| exact (A.core.measurable_decide k).comp | |
| (measurable_const.prodMk | |
| (((measurable_observed_seed A).comp | |
| (measurable_const.prodMk measurable_fst)).prodMk measurable_snd)) | |
| end MatroidProphet | |
| end OAI | |