theoremallocatedChosenScaleBudget_bounds (m : ℕ) {p ET : ℝ}
(hp : 0≤ p) (hE : 0≤E) (hT : 0≤T) :
letP:= allocatedChosenScaleBudget m p ET
proof · 9
lines
0≤P∧ p ≤P∧E≤P∧T≤P∧ allocatedComparisonDimension m p ≤P∧
allocatedPrimitiveNormalizedScaleLog m p ET≤P:=byhave hD := (allocatedComparisonDimension_bounds m hp).1
obtain ⟨_, hQ, hDQ, _, _, hQL⟩ := allocatedNormalizedScaleBudget_bounds m hp hD hE hT
havehL : 0≤ allocatedPrimitiveNormalizedScaleLog m p ET:= hQ.trans hQL
havehDL : allocatedComparisonDimension m p ≤ allocatedPrimitiveNormalizedScaleLog m p ET:=
hDQ.trans hQL
dsimp only [allocatedChosenScaleBudget]
exact ⟨by linarith, by linarith, by linarith, by linarith, by linarith, by linarith⟩
theoremexists_allocatedChosenThreshold_bound (m AK : ℕ) :
∃a : ℕ, 2≤ a ∧∀ {p ET : ℝ}, 0≤ p →0≤E→0≤T→letP:= allocatedChosenScaleBudget m p ET
proof · 30
lines
letV:= (p + E + T + a) ^ a
P≤V∧ (P + A) ^ A≤V∧ (P + p + E + K) ^ K≤V:=by
obtain ⟨b, _, hlog⟩ := exists_allocatedPrimitiveNormalizedScaleLog_bound m
letH : Polynomialℕ:= (Polynomial.X + Polynomial.C b) ^ b + Polynomial.Xletpoly : Polynomialℕ:=H + (H + Polynomial.CA) ^ A +
(H + 2 * Polynomial.X + Polynomial.CK) ^ K + 1
obtain ⟨a, ha, hbound⟩ := exists_natPolynomial_eval_budget poly
refine ⟨a, ha, ?_⟩
intro p ET hp hE hT
let u := p + E + TletHval:= (u + b) ^ b + u
letP:= allocatedChosenScaleBudget m p EThavehu : 0≤ u :=by dsimp [u]; positivity
havehH : 0≤Hval:=by dsimp [Hval]; positivity
havehP : 0≤P:= (allocatedChosenScaleBudget_bounds m hp hE hT).1havehPH : P≤Hval:=byhave h := hlog hp hE hT
dsimp [P, allocatedChosenScaleBudget, Hval, u]
linarith
havehA : (P + A) ^ A≤ (Hval + A) ^ A:=
pow_le_pow_left₀ (by positivity) (add_le_add hPH le_rfl) AhavehK : (P + p + E + K) ^ K≤ (Hval + 2 * u + K) ^ K:=by
apply pow_le_pow_left₀ (by positivity)
dsimp [u] at *
linarith
havehbnd : Hval + (Hval + A) ^ A + (Hval + 2 * u + K) ^ K + 1≤ (u + a) ^ a :=by
simpa [poly, H, Hval, Polynomial.eval₂_pow] using hbound u hu
havehA0 : 0≤ (Hval + A) ^ A:=by positivity
havehK0 : 0≤ (Hval + 2 * u + K) ^ K:=by positivity
exact ⟨by linarith, by linarith, by linarith⟩