File size: 2,588 Bytes
dd14c26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import OAI.Probability.MatroidSecretary.Sampling.SourceSeedSupport
import OAI.Probability.MatroidSecretary.Secretary.Coupling

namespace OAI

/-!
Strict support for the actual finite conditional reconstruction. Every advertised
branch/mask fiber has positive source mass, so the zero-fiber fallback is never
used for these concrete kernels. The conditional law is supported exactly on its
fiber, not on the whole source space; this does not remove the secretary replay's
every-seed mismatch guard.

Source: `sections/secretary.tex`, lines 68--78, SHA256
`3554fe0f7296782edf63cc7f1305c377e7a7b9d8f8948b9510ea4ad02a702d63`.
-/

namespace MatroidProphet.SourceSeedSupport

open MeasureTheory Secretary

theorem coupling_fiberMass_pos {n : ℕ} (M : Matroid (Fin n))
    (hE : M.E = Set.univ) (b : SourceObservation n) :
    0 < fiberMass (fun r => (sourceSeedLaw n).real {r}) (couplingObservation M hE) b := by
  have hpos : 0 < sourceSeedLaw n {r | couplingObservation M hE r = b} := by
    rcases b with ⟨j, P⟩
    simpa only [couplingObservation, Prod.mk.injEq] using
      sourceSeedLaw_actual_branch_mask_pos M hE j P
  have hr : 0 < ((sourceSeedLaw n).map (couplingObservation M hE)).real {b} := by
    rw [measureReal_def, Measure.map_apply (measurable_of_finite _) (measurableSet_singleton _)]
    exact ENNReal.toReal_pos hpos.ne' (measure_ne_top _ _)
  have hmass : fiberMass (fun r => (sourceSeedLaw n).real {r})
      (couplingObservation M hE) b =
      ((sourceSeedLaw n).map (couplingObservation M hE)).real {b} := by
    rw [FiniteLaw.map_real_singleton]
    unfold fiberMass
    apply Finset.sum_congr rfl
    intro r _
    by_cases h : couplingObservation M hE r = b <;> simp [h]
  rw [hmass]
  exact hr

/-- Each complete source seed has positive conditional mass exactly in its
advertised branch/mask fiber, including unused source coordinates. -/
theorem couplingKernel_singleton_pos_iff {n : ℕ} (M : Matroid (Fin n))
    (hE : M.E = Set.univ) (b : SourceObservation n) (r : Seed (mainSeedBits n)) :
    0 < couplingKernel M hE b {r} ↔ couplingObservation M hE r = b := by
  have hb := coupling_fiberMass_pos M hE b
  have hr : 0 < (sourceSeedLaw n).real {r} :=
    ENNReal.toReal_pos (sourceSeedLaw_singleton_pos n r).ne' (measure_ne_top _ _)
  rw [couplingKernel, conditionalSourceLaw, FiniteLaw.weightMeasure_singleton,
    ENNReal.ofReal_pos]
  simp only [fiberKernel, hb.ne', ite_false]
  by_cases h : couplingObservation M hE r = b
  · simp only [h, ite_true, iff_true]
    exact div_pos hr hb
  · simp [h]

end MatroidProphet.SourceSeedSupport

end OAI