File size: 4,229 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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | import Mathlib
import OAI.Probability.BinarySweep.Analytic.OneAxisPerturbation
import OAI.Probability.BinarySweep.FiniteLaws.QuantitativeMoment
import OAI.Probability.BinarySweep.Conditional.MainEasyCases
namespace OAI
noncomputable section
open scoped BigOperators
namespace BinaryCoordinateSweeps
def oneAxisRadius (r : β) : β :=
(2 * (((2^(2*r) : β).factorial : β))^2)β»ΒΉ
lemma oneAxisRadius_pos (r : β) : 0 < oneAxisRadius r := by
unfold oneAxisRadius
positivity
lemma oneAxisRadius_le_half (r : β) : oneAxisRadius r β€ 1/2 := by
have hB : (1 : β) β€ ((2^(2*r) : β).factorial : β) := by
exact_mod_cast Nat.factorial_pos (2^(2*r))
unfold oneAxisRadius
calc
_ β€ (2 : β)β»ΒΉ := inv_antiβ (by norm_num) (by nlinarith)
_ = 1/2 := by norm_num
lemma oneAxis_size_le {r : β} {bits : Fin 1 β β} (hd : β j, bits j β€ 2*r) :
gridSize bits β€ 2^(2*r) := by
simp only [gridSize, Fin.prod_univ_one]
exact Nat.pow_le_pow_right (by omega) (hd 0)
lemma oneAxis_norm_le_inv_dimension {r h D : β} {bits : Fin 1 β β}
(hd : β j, bits j β€ 2*r) (H : PathFamily bits h)
{z : β} (hz : 0 β€ z) (hzr : z β€ oneAxisRadius r)
(Ο : Representation β (Equiv.Perm (FreeSlot H 0)) (RepSpace D))
[Ο.IsIrreducible] (hΟ : IsUnitaryRep Ο) (hD : 1 < D) :
βconditionalOperator H z Οβ β€ (D : β)β»ΒΉ := by
let B : β := ((2^(2*r) : β).factorial : β)
have hB : 0 < B := by dsimp [B]; positivity
have hfac : ((gridSize bits).factorial : β) β€ B := by
dsimp [B]
exact_mod_cast Nat.factorial_le (oneAxis_size_le hd)
have hdim : D β€ (gridSize bits).factorial := by
have hbound := Irrep.finrank_le_card Ο
simp only [finrank_euclideanSpace_fin, Fintype.card_perm, card_freeSlot] at hbound
exact hbound.trans (Nat.factorial_le (Nat.sub_le _ _))
have hDB : (D : β) β€ B := (by exact_mod_cast hdim :
(D : β) β€ ((gridSize bits).factorial : β)).trans hfac
have hD0 : (0 : β) < D := by exact_mod_cast (by omega : 0 < D)
calc
_ β€ 2 * ((gridSize bits).factorial : β) * z :=
oneAxis_conditional_norm_le H hz (hzr.trans (oneAxisRadius_le_half r)) Ο hΟ hD
_ β€ 2 * B * oneAxisRadius r := by gcongr
_ = Bβ»ΒΉ := by dsimp [oneAxisRadius, B]; field_simp
_ β€ (D : β)β»ΒΉ := inv_antiβ hD0 hDB
theorem conditional_moment_one_axis {r q : β}
(hr : (400000000 : β) β€ (r : β) * Real.log 2) (hq : 0 < q)
(bits : Fin 1 β β) (hd : β j, r β€ bits j β§ bits j β€ 2*r)
{h D : β} (H : PathFamily bits h) {z : β} (hz : 0 β€ z)
(hzr : z β€ oneAxisRadius r)
(Ο : Representation β (Equiv.Perm (FreeSlot H 0)) (RepSpace D))
[Ο.IsIrreducible] (hΟ : IsUnitaryRep Ο) :
logMoment (traceMoment q (conditionalOperator H z Ο)) β€
((-cExponent (gridSize bits) * Real.log D +
eExponent (gridSize bits) * h * Real.log (gridSize bits) - pathCost H : β) : EReal) := by
have ha := grid_parameter_allowance (by omega : 1 β€ 1) (fun j => (hd j).1) hr H
have hl0 : 0 β€ Real.log (gridSize bits) := Real.log_nonneg (by
exact_mod_cast gridSize_pos bits)
have hallow : 0 β€ eExponent (gridSize bits) * h * Real.log (gridSize bits) - pathCost H := by
apply le_trans _ ha.2.2
unfold e0
positivity
by_cases hD : 1 < D
Β· have hn := oneAxis_norm_le_inv_dimension (fun j => (hd j).2) H hz hzr Ο hΟ hD
apply (logMoment_le_neg_log_dimension (by omega) hq _ hn).trans
have hc : cExponent (gridSize bits) β€ 1 := by
have := ha.1
unfold c0 at this
linarith
have hlog : 0 β€ Real.log D := Real.log_nonneg (by exact_mod_cast (by omega : 1 β€ D))
exact_mod_cast (show -Real.log D β€ -cExponent (gridSize bits) * Real.log D +
eExponent (gridSize bits) * h * Real.log (gridSize bits) - pathCost H by nlinarith)
Β· have hlog : Real.log D = 0 := by
have hD' : D = 0 β¨ D = 1 := by omega
rcases hD' with rfl | rfl <;> norm_num
apply conditional_moment_of_automatic_regime H hz
(lt_of_le_of_lt (hzr.trans (oneAxisRadius_le_half r)) (by norm_num)) q Ο hΟ
simpa only [hlog, mul_zero] using hallow
end BinaryCoordinateSweeps
end
end OAI
|