introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
5.37 kB

Agreement on the sacrificed labels is the exact information needed to replay an actual fixed vector. Values supplied outside that mask are irrelevant.

25
lemma glue_eq_of_agree {n : β„•} (mask : Finset (Fin n)) (s w : Weights n)
    (hs : βˆ€ e ∈ mask, s e = w e) : glue mask s w = w := by
proof Β· 5 lines
  classical
  funext e
  by_cases he : e ∈ mask
  Β· simp [glue, he, hs e he]
  Β· simp [glue, he]
33
lemma observed_agrees {n bits : β„•} (A : HiddenRule n bits) (r : Seed bits)
    (w : Weights n) : βˆ€ e ∈ A.mask r, observed A r w e = w e := by
proof Β· 3 lines
  classical
  intro e he
  simp [observed, he]

The actual current and past label--weight pairs, including rejected prefix arrivals, are passed to the source core unchanged.

41
lemma history_replay {n bits : β„•} (A : HiddenRule n bits) (r : Seed bits)
    (s w : Weights n) (hs : βˆ€ e ∈ A.mask r, s e = w e)
    (Ο€ : ArrivalOrder n) (k : Fin n) :
    simulationHistory A r s (history w Ο€ k) = history w Ο€ k := by
proof Β· 1 line
  rw [simulationHistory_eq, glue_eq_of_agree _ _ _ hs]

Exact accepted-set identity at every time, not just equality of total reward.

48
theorem acceptedThrough_replay {n bits : β„•} (A : HiddenRule n bits) (r : Seed bits)
    (s w : Weights n) (hs : βˆ€ e ∈ A.mask r, s e = w e)
    (Ο€ : ArrivalOrder n) (t : β„•) :
    acceptedThrough (sampleSimulation A) r s w Ο€ t =
      hiddenAcceptedThrough A r w Ο€ t := by
proof Β· 1 line
  rw [sampleSimulation_acceptedThrough, glue_eq_of_agree _ _ _ hs]

Replay never replaces a realized payoff by a sampled or auxiliary value.

56
theorem reward_replay {n bits : β„•} (A : HiddenRule n bits) (r : Seed bits)
    (s w : Weights n) (hs : βˆ€ e ∈ A.mask r, s e = w e)
    (Ο€ : ArrivalOrder n) :
    reward (sampleSimulation A) r s w Ο€ = hiddenReward A r w Ο€ := by
proof Β· 1 line
  rw [sampleSimulation_reward, glue_eq_of_agree _ _ _ hs]

Only the revealed vector is needed for the initial observation.

63
theorem observed_replay {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 :=
proof Β· 1 line
  acceptedThrough_replay A r _ w (observed_agrees A r w) Ο€ t

If the mask is exactly the observed prefix set, no prefix label is accepted. The bound includes both zero-length and full-length prefixes.

71
theorem prefix_rejected {n bits : β„•} (A : HiddenRule n bits) (r : Seed bits)
    (s w : Weights n) (Ο€ : ArrivalOrder n) (K : β„•)
    (hmask : βˆ€ e, e ∈ A.mask r ↔ (Ο€.symm e).val < K) :
    acceptedThrough (sampleSimulation A) r s w Ο€ K = βˆ… := by
proof Β· 6 lines
  classical
  rw [sampleSimulation_acceptedThrough]
  apply Finset.eq_empty_iff_forall_notMem.mpr
  intro e he
  obtain ⟨he, hnot⟩ := Finset.mem_sdiff.mp he
  exact hnot ((hmask e).mpr (acceptedThrough_arrived _ _ _ _ _ _ _ he))

The prefix is still excluded at all later times.

83
theorem accepted_after_prefix {n bits : β„•} (A : HiddenRule n bits) (r : Seed bits)
    (s w : Weights n) (Ο€ : ArrivalOrder n) (K t : β„•)
    (hmask : βˆ€ e, e ∈ A.mask r ↔ (Ο€.symm e).val < K)
    {e : Fin n} (he : e ∈ acceptedThrough (sampleSimulation A) r s w Ο€ t) :
    K ≀ (Ο€.symm e).val := by
proof Β· 3 lines
  classical
  rw [sampleSimulation_acceptedThrough] at he
  exact Nat.le_of_not_gt (fun h => (Finset.mem_sdiff.mp he).2 ((hmask e).mpr h))

An arbitrary suffix order, even one knowing all unused seed coordinates, cannot defeat the pointwise minimum over completed permutations.

94
theorem worstReward_le_replay {n bits : β„•} (A : HiddenRule n bits) (r : Seed bits)
    (s w : Weights n) (hs : βˆ€ e ∈ A.mask r, s e = w e)
    (Ο€ : ArrivalOrder n) :
    hiddenWorstReward A w r ≀ reward (sampleSimulation A) r s w Ο€ := by
proof Β· 2 lines
  rw [reward_replay A r s w hs Ο€]
  exact hiddenWorstReward_le A w r Ο€

Every-prefix matroid feasibility transfers without a condition on the suffix adversary or on weights assigned outside the observation mask.

103
theorem feasible_replay {n bits : β„•} (M : Matroid (Fin n)) (A : HiddenRule n bits)
    (hA : βˆ€ (w : Weights n), (βˆ€ e, 0 ≀ w e) β†’
      βˆ€ (r : Seed bits) (Ο€ : ArrivalOrder n) (t : β„•),
        M.Indep (hiddenAcceptedThrough A r w Ο€ t : Set (Fin n)))
    (r : Seed bits) (s w : Weights n) (hw : βˆ€ e, 0 ≀ w e)
    (hs : βˆ€ e ∈ A.mask r, s e = w e) (Ο€ : ArrivalOrder n) (t : β„•) :
    M.Indep (acceptedThrough (sampleSimulation A) r s w Ο€ t : Set (Fin n)) := by
proof Β· 2 lines
  rw [acceptedThrough_replay A r s w hs Ο€ t]
  exact hA w hw r Ο€ t