File size: 4,134 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 | import OAI.Combinatorics.EditApproximation.Refinement.ComputedParameterRegisters
import OAI.Combinatorics.EditApproximation.Refinement.PhysicalCoarsePreparation
import OAI.Combinatorics.EditApproximation.Refinement.ComputedCoarseInputWork
import OAI.Combinatorics.EditApproximation.Definitions
namespace OAI
namespace EditApproximation
open Filter MeasureTheory
theorem computedExecutionCoarsePreparationWork_integrable (source target : List β) (N : β) :
Integrable (computedExecutionCoarsePreparationWork source target N) (computedExecutionLaw source target N) :=
computedExecutionAcceptedWork_integrable source target N (computedFamilyCoarsePreparationWork source target N)
theorem computedExecutionCoarsePreparationWork_bound :
βαΆ N : β in atTop, β source target : List β, source.length + target.length β€ N β
(β a β source ++ target, Nat.size a β€ inputHeight N ^ 3) β
β execution : ComputedExecutionOutcome source target N,
computedExecutionCoarsePreparationWork source target N execution β€
(inputHeight N : β) ^ 6 * computedExecutionCoarseInputWork source target N execution := by
filter_upwards [eventually_ge_atTop 1,
inputSmallLog_tendsto.eventually (eventually_ge_atTop 200)] with N hN hell
intro source target hsize hsymbol execution
have hH : 100 β€ inputHeight N := (by decide : 100 β€ 256).trans
(computed_coarse_height_large N (by omega) hell)
have hl : Nat.size N β€ inputHeight N + 1 :=
(Nat.size_le_size (Nat.le_add_right N 2)).trans (inputLength_register_word N)
have hp : inputHeight N + 1 β€ inputHeight N ^ 3 := by
have h : inputHeight N β€ inputHeight N ^ 2 := Nat.le_pow (by decide)
have hh := Nat.mul_le_mul_right (inputHeight N ^ 2) (show 2 β€ inputHeight N by omega)
nlinarith only [h, hh, hH]
exact physicalFamilyCoarsePreparationWork_bound source target N (integerParameters N).P (inputHeight N)
(integerParameters N).T (integerParameters N).S (computedSeedPassCount N) (inputHeight N ^ 2)
(scheduledSeedFactor N) (scheduledSeedMultiplier N)
(rationalParameters (inputSmallLog N)).tau (rationalParameters (inputSmallLog N)).eta
(rationalParameters (inputSmallLog N)).kappa (rationalParameters (inputSmallLog N)).delta
(clampedSeedNat (computedExecutionAccepted source target N execution).1)
(computedExecutionAccepted source target N execution).2 (16384 * inputHeight N + 5)
(computedFamilyMemoCode source target N (inputHeight N ^ 2)) (computedFinalRoot source target N)
hH ((Nat.size_le_size (by omega : source.length β€ N)).trans (hl.trans hp))
((Nat.size_le_size (by omega : target.length β€ N)).trans (hl.trans hp)) hsymbol
theorem computedExecutionCoarsePreparationWork_expected_near_linear (epsilon : β) (hepsilon : 0 < epsilon) :
βαΆ N in atTop, β source target : List β, source.length + target.length β€ N β
(β a β source ++ target, Nat.size a β€ inputHeight N ^ 3) β
(β« execution, computedExecutionCoarsePreparationWork source target N execution
βcomputedExecutionLaw source target N) β€ (N + 2 : β) ^ (1 + epsilon) := by
have he : 0 < epsilon / 2 := half_pos hepsilon
filter_upwards [computedExecutionCoarsePreparationWork_bound,
computedExecutionCoarseInputWork_expected_near_linear (epsilon / 2) he,
fixed_height_power_subpolynomial 6 (epsilon / 2) he] with N hb hi hp
intro source target hsize hsymbol
have hm := integral_mono (computedExecutionCoarsePreparationWork_integrable source target N)
((computedExecutionCoarseInputWork_integrable source target N).const_mul ((inputHeight N : β) ^ 6))
(hb source target hsize hsymbol)
rw [integral_const_mul] at hm
calc
_ β€ (inputHeight N : β) ^ 6 * (N + 2 : β) ^ (1 + epsilon / 2) :=
hm.trans (mul_le_mul_of_nonneg_left (hi source target hsize) (by positivity))
_ β€ (N + 2 : β) ^ (epsilon / 2) * (N + 2 : β) ^ (1 + epsilon / 2) :=
mul_le_mul_of_nonneg_right hp (by positivity)
_ = _ := by rw [β Real.rpow_add (by positivity)]; congr 1; ring
end EditApproximation
end OAI
|