File size: 3,089 Bytes
4a56cd6 | 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 62 63 64 65 66 67 68 69 70 71 72 73 74 | import OAI.Dynamics.ConditionalShuffle.FiniteMinorization
namespace OAI
noncomputable section
open scoped BigOperators Classical
open Filter Topology
namespace Thorp.Conditional.Reset
lemma kernel_add (D b s t : β) (x y : Injection D b) :
kernel D b (s+t) x y = β z, kernel D b s x z * kernel D b t z y := by
unfold kernel
rw [fairMass_test, fairMass_eq_mean, mean_history_add]
apply mean_congr; intro Ο
rw [fairMass_eq_mean]
apply mean_congr; intro Ξ·
rw [Reachability.run_append, act_mul]
lemma reset_minorization (Ο : β) (hΟ : 0 < Ο) (hΟβ : Ο β€ 1) :
βαΆ d : β in atTop, β (b : β), (b : β) β€ (1-Ο)*(2^(d+2) : β) β
β x y : Injection (d+2) b,
(1-2*(1/2 : β)^(8*(d+2))) / Fintype.card (Injection (d+2) b) β€
kernel (d+2) b (4*resetS Ο*(d+2)) x y := by
filter_upwards [kernel_row_bound Ο hΟ hΟβ, kernel_column_bound Ο hΟ hΟβ] with d hr hc
intro b hb x y
let : Nonempty (Injection (d+2) b) := β¨xβ©
have hh := square_minorization (kernel (d+2) b (2*resetS Ο*(d+2)))
(kernel_nonneg _ _ _) (kernel_row_sum _ _ _) (kernel_column_sum _ _ _)
((1/2 : β)^(8*(d+2))) (hr b hb) (hc b hb) x y
have ht : 4*resetS Ο*(d+2) = 2*resetS Ο*(d+2)+2*resetS Ο*(d+2) := by ring
rw [ht, kernel_add]
exact hh
def resetRho : β := (2 : β)β»ΒΉ^20
def resetBlocks : β := 128
def resetSuccess (D : β) : β := 1-2*(1/2 : β)^(8*D)
lemma resetSuccess_pos (d : β) : 0 < resetSuccess (d+2) := by
have hh : (1/2 : β)^(8*(d+2)) β€ (1/2 : β)^2 :=
pow_le_pow_of_le_one (by norm_num) (by norm_num) (by omega)
norm_num at hh
unfold resetSuccess; linarith
lemma resetS_exact : resetS resetRho = 335544320 := by norm_num [resetS, resetRho]
lemma reset_time_exact : resetBlocks*(4*resetS resetRho+1) = 171798691968 := by
rw [resetS_exact]; rfl
theorem reset_split :
βαΆ d : β in atTop, β (b : β), (b : β) β€ (1-resetRho)*(2^(d+2) : β) β
β x : Injection (d+2) b,
(β y, 0 β€ acceptance (kernel (d+2) b (4*resetS resetRho*(d+2))) (resetSuccess (d+2)) x y β§
acceptance (kernel (d+2) b (4*resetS resetRho*(d+2))) (resetSuccess (d+2)) x y β€ 1) β§
(β y, markedKernel (kernel (d+2) b (4*resetS resetRho*(d+2))) (resetSuccess (d+2)) x (y,true) =
resetSuccess (d+2) / Fintype.card (Injection (d+2) b)) β§
(β y, (β z : Bool, markedKernel (kernel (d+2) b (4*resetS resetRho*(d+2)))
(resetSuccess (d+2)) x (y,z)) = kernel (d+2) b (4*resetS resetRho*(d+2)) x y) β§
(β z, markedKernel (kernel (d+2) b (4*resetS resetRho*(d+2))) (resetSuccess (d+2)) x z) = 1 := by
filter_upwards [reset_minorization resetRho (by norm_num [resetRho]) (by norm_num [resetRho])] with d hd
intro b hb x
let : Nonempty (Injection (d+2) b) := β¨xβ©
have hm := hd b hb
exact β¨acceptance_bounds _ _ (resetSuccess_pos d) hm x,
marked_true _ _ (resetSuccess_pos d) hm x,
marked_marginal _ _ x, marked_sum _ _ (kernel_row_sum _ _ _) xβ©
end Thorp.Conditional.Reset
end
end OAI
|