Download data/lean/OAI/Probability/MatroidSecretary/Accounting/MainFeasibilityContract.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.24 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/MatroidSecretary/Accounting/MainFeasibilityContract.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/MatroidSecretary/Accounting/MainFeasibilityContract.lean
-
curl -L -o MainFeasibilityContract.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/MatroidSecretary/Accounting/MainFeasibilityContract.lean
4.24 kB
| import OAI.Probability.MatroidProphet.Main | |
| import OAI.Probability.MatroidSecretary.Transport.InformationRestriction | |
| import Mathlib.Combinatorics.Matroid.Loop | |
| namespace OAI | |
| /-! | |
| # Source-facing feasibility and information contract | |
| Pinned source: `sections/algorithm.tex`, Lemma `lem:feasibility`, lines 179β204. | |
| The rule here is the actual main rule, not an abstract feasible substitute. | |
| The first component gives prefix feasibility. The remaining components make | |
| measurability, the permitted observations, irrevocability, and sacrifice explicit. | |
| None of these components assumes a source theorem or any algorithm-validity axiom. | |
| -/ | |
| namespace MatroidProphet.MainAlgorithm | |
| /-- Full feasibility/information content of the manuscript's main-rule lemma. -/ | |
| theorem source_feasibility_contract {n : β} (M : Matroid (Fin n)) | |
| (hE : M.E = Set.univ) : | |
| Feasible M (core M hE) β§ | |
| (β k : Fin n, Measurable | |
| (fun x : Seed (mainSeedBits n) Γ (Weights n Γ History n k) => | |
| (hidden M hE).core.decide k x.1 | |
| (observed (hidden M hE) x.1 x.2.1) x.2.2)) β§ | |
| (β (w : Weights n), (β e, 0 β€ w e) β | |
| β (r : Seed (mainSeedBits n)) (Ο : ArrivalOrder n) (t : β), | |
| M.Indep (hiddenAcceptedThrough (hidden M hE) r w Ο t : Set (Fin n))) β§ | |
| (β (r : Seed (mainSeedBits n)) (w w' : Weights n) | |
| (Ο Ο' : ArrivalOrder n) (t : β), | |
| (β e β (hidden M hE).mask r, w e = w' e) β | |
| (β j : Fin n, j.val < t β | |
| (Ο j, w (Ο j)) = (Ο' j, w' (Ο' j))) β | |
| hiddenAcceptedThrough (hidden M hE) r w Ο t = | |
| hiddenAcceptedThrough (hidden M hE) r w' Ο' t) β§ | |
| (β (r : Seed (mainSeedBits n)) (w : Weights n) (Ο : ArrivalOrder n), | |
| Monotone (hiddenAcceptedThrough (hidden M hE) r w Ο)) β§ | |
| (β (r : Seed (mainSeedBits n)) (w : Weights n) (Ο : ArrivalOrder n) (t : β), | |
| Disjoint (hiddenAcceptedThrough (hidden M hE) r w Ο t) | |
| ((mainMasks r).H βͺ (mainMasks r).D βͺ (mainMasks r).C)) := by | |
| refine β¨core_feasible M hE, ?_, hidden_feasible M hE, ?_, ?_, ?_β© | |
| Β· exact measurable_hidden_core_decide (hidden M hE) | |
| Β· exact hiddenAcceptedThrough_eq_of_same_information (hidden M hE) | |
| Β· exact hiddenAcceptedThrough_monotone (hidden M hE) | |
| Β· exact hiddenAcceptedThrough_disjoint_mask (hidden M hE) | |
| /-- Loops are never selected, including when their weights have no moment bound. -/ | |
| theorem source_accepted_isNonloop {n : β} (M : Matroid (Fin n)) | |
| (hE : M.E = Set.univ) (w : Weights n) (hw : β e, 0 β€ w e) | |
| (r : Seed (mainSeedBits n)) (Ο : ArrivalOrder n) (t : β) (e : Fin n) | |
| (he : e β hiddenAcceptedThrough (hidden M hE) r w Ο t) : | |
| M.IsNonloop e := | |
| (hidden_feasible M hE w hw r Ο t).isNonloop_of_mem he | |
| /-- The disclosed mask is determined by the initial seed, with no weight input. -/ | |
| theorem source_observation_mask {n : β} (M : Matroid (Fin n)) | |
| (hE : M.E = Set.univ) (r : Seed (mainSeedBits n)) : | |
| (hidden M hE).mask r = (mainMasks r).H βͺ (mainMasks r).D βͺ (mainMasks r).C := rfl | |
| /-- Loops fail the candidate test before the layer selection is attempted. -/ | |
| theorem source_loop_not_candidate {n : β} (M : Matroid (Fin n)) | |
| (d : MainMasks n) (seen : Fin n β Option β€) (e : Fin n) (level : Option β€) | |
| (he : e β M.closure β ) : Β¬ candidate M d seen e level := by | |
| intro hc | |
| exact hc.2.2 (M.closure_mono (Set.empty_subset _) he) | |
| /-- Zero (and negative off-domain) values never receive an eligible layer. -/ | |
| theorem source_nonpositive_unassigned {n : β} (M : Matroid (Fin n)) | |
| (hE : M.E = Set.univ) (d : MainMasks n) (seen : Fin n β Option β€) | |
| (e : Fin n) (x : β) (hx : x β€ 0) : | |
| assign M hE d seen e (roundedLevel weightBase x) = none := by | |
| simp only [roundedLevel, ite_eq_right (not_lt.mpr hx), assign] | |
| /-- An empty listed-group collection assigns no arriving value to a layer. -/ | |
| theorem source_empty_groups_unassigned {n : β} (M : Matroid (Fin n)) | |
| (hE : M.E = Set.univ) (d : MainMasks n) (seen : Fin n β Option β€) | |
| (hg : groups M d seen = []) (e : Fin n) (level : Option β€) : | |
| assign M hE d seen e level = none := by | |
| classical | |
| cases level <;> simp [assign, eligible, hg] | |
| end MatroidProphet.MainAlgorithm | |
| end OAI | |