math / data /lean /OAI /Probability /MatroidSecretary /Transport /InformationRestriction.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
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