theorempositive_snapshot_survival_before (p : Parameters) (q t : ℕ) (G : InputIV)
(before out : SnapshotIV) (hout : out.1≠ none)
(hpos : 0 < snapshotWeight p q t G before out) :
∃S r, before.1 = some S∧ out.2 = some r ∧Precheck p q t GS:=by
proof · 13
lines
unfold snapshotWeight at hpos
split at hpos
next hcons =>cases hb : before.1with
| none => exact (hout (by simpa [advance, hb] using hcons)).elim
| some S=>cases hr : out.2with
| none => exact (hout (by simpa [advance, hb, hr] using hcons)).elim
| some r =>
refine ⟨S, r, rfl, rfl, ?_⟩
by_contra hpre
simp [drawStepWeight, hb, hr, hpre] at hpos
next => exact (lt_irrefl 0 hpos).elim
theoremoccupancyPrefix_succ_of_draw (q : ℕ) (A : FiniteAffine.Plane q PDL)
(line : V→L) (l : L) (T : FinsetP) (t : ℕ)
(ω : Path (SnapshotIV)) (r : NoiseIV) (hr : (ω (t + 1)).2 = some r) :
occupancyPrefix q A line l T (t + 1) (frestrictLe (t + 1) ω) =
SelectionOccupancy.afterPlaneLine A
(occupancyPrefix q A line l T t (frestrictLe t ω)) l (line r.2.1) :=by
proof · 17
lines
ext x
simp only [occupancyPrefix, SelectionOccupancy.afterPlaneLine, Finset.mem_filter]
constructor
· rintro ⟨hx, havoid⟩
refine ⟨⟨hx, ?_⟩, ?_⟩
· intro j hj s hs
exact havoid j (by omega) s hs
· exact havoid t (by omega) r hr
· rintro ⟨⟨hx, havoid⟩, hlast⟩
refine ⟨hx, ?_⟩
intro j hj s hs
by_cases hlt : j < t
· exact havoid j hlt s hs
· haveheq : j = t :=by omega
subst j
havehrs : r = s :=Option.some.inj (hr.symm.trans hs)
simpa [← hrs] using hlast
theoremoccupancyTrack_eq_on_surviving_path (p : Parameters) (q : ℕ) (G : InputIV)
(A : FiniteAffine.Plane q PDL) (line : V→L) (l : L) (T : FinsetP)
(ω : Path (SnapshotIV))
(hsupport : ∀ j, snapshotPMF p q j G (ω j) (ω (j + 1)) ≠0) :
∀ t, (ω t).1≠ none →
occupancyTrack p q GA line l T t ω =
((occupancyPrefix q A line l T t (frestrictLe t ω)).card : ℝ) /
(1 - p.Bstar / q) ^ t :=by
proof · 23
lines
intro t
induction t with
| zero => intro _; simp [occupancyTrack]
| succ t ih =>
intro hsurv
havehp : 0 < snapshotWeight p q t G (ω t) (ω (t + 1)) :=byhavehn : snapshotWeight p q t G (ω t) (ω (t + 1)) ≠0:=by
intro hz
apply hsupport t
change ENNReal.ofReal (snapshotWeight p q t G (ω t) (ω (t + 1))) = 0
rw [hz, ENNReal.ofReal_zero]
exact lt_of_le_of_ne (snapshotWeight_nonnegative p q t G _ _) (Ne.symm hn)
obtain ⟨S, r, hb, hr, hpre⟩ :=
positive_snapshot_survival_before p q t G (ω t) (ω (t + 1)) hsurv hp
have hprev := ih (by rw [hb]; simp)
have hinc := additiveTrack_increment (T.card : ℝ)
(occupancyResponse p q GA line l T) t ω
change occupancyTrack p q GA line l T (t + 1) ω -
occupancyTrack p q GA line l T t ω = _ at hinc
havehlast : (frestrictLe t ω ⟨t, Finset.mem_Iic.mpr le_rfl⟩).1 = some S:= hb
simp only [stepObservable, occupancyResponse, hlast, hr, hpre, ite_true] at hinc
rw [occupancyPrefix_succ_of_draw q A line l T t ω r hr]
linarith
theoremae_occupancyTrack_eq (p : Parameters) (q : ℕ) (G : InputIV)
(A : FiniteAffine.Plane q PDL) (line : V→L) (l : L) (T : FinsetP) :
∀ᵐ ω ∂snapshotPathLaw p q G, ∀ t, (ω t).1≠ none →
occupancyTrack p q GA line l T t ω =
((occupancyPrefix q A line l T t (frestrictLe t ω)).card : ℝ) /
(1 - p.Bstar / q) ^ t :=by
proof · 4
lines
have hs := ae_all_iff.2 (fun j =>FiniteHistory.ae_step_support
(fun n => snapshotPMF p q n G) (initialSnapshot (I:=I) (V:=V)) j)
filter_upwards [hs] with ω hω
exact occupancyTrack_eq_on_surviving_path p q GA line l T ω hω
theoremsurviving_occupancy_lower_tail (p : Parameters) (q N : ℕ) (G : InputIV)
(hc : 0 < p.c) (hq : 0 < q) (hN : 1≤N)
(hscale : ∀ j < N, p.smin ≤ p.sizeScale q j)
(hfactor : 0 < 1 - p.Bstar / q)
(A : FiniteAffine.Plane q PDL) (index : I ≃ D×Bool) (line : V→L)
(hline : Selection.LineAssignmentGA index line) (l : L) (T : FinsetP)
(hT : ∀ x ∈T, A.incident x l) (d : ℝ) (hd : 0 < d)
(hdenom : ∀ j < N, d ≤ (1 - p.Bstar / q) ^ (j + 1))
(u : ℝ) (hu : 0 < u) (hub : u ≤ (T.card : ℝ))
(t : ℕ) (ht : t ≤N) (hdt : d ≤ (1 - p.Bstar / q) ^ t) :
(snapshotPathLaw p q G).real {ω | (ω t).1≠ none ∧
((occupancyPrefix q A line l T t (frestrictLe t ω)).card : ℝ) ≤
d * ((T.card : ℝ) - u)} ≤2 * Real.exp (-u ^ 2 / (8 * (N : ℝ) * ((1 + p.Bstar) / d) ^ 2)) :=by
proof · 9
lines
refine le_trans ?_ (occupancyTrack_lower_tail p q NG hc hq hN hscale hfactor
A index line hline l T hT d hd hdenom u hu t ht)
apply ENNReal.toReal_mono (measure_ne_top _ _)
apply measure_mono_ae
filter_upwards [ae_occupancyTrack_eq p q GA line l T] with ω hω hbad
rcases hbad with ⟨hsurv, hsmall⟩
rw [hω t hsurv]
apply (div_le_iff₀ (pow_pos hfactor t)).2
exact hsmall.trans (by nlinarith [mul_le_mul_of_nonneg_right hdt (sub_nonneg.mpr hub)])