Download data/lean/OAI/Computability/PerfectCompleteness/Repetition/FixedCleanRate.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.77 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/PerfectCompleteness/Repetition/FixedCleanRate.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/PerfectCompleteness/Repetition/FixedCleanRate.lean
-
curl -L -o FixedCleanRate.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/PerfectCompleteness/Repetition/FixedCleanRate.lean
3.77 kB
| import OAI.Computability.PerfectCompleteness.Construction.OriginalChildScalarAssemblyLemmas | |
| import OAI.Computability.PerfectCompleteness.Reduction.FixedCallBudgetLemmas | |
| import OAI.Computability.PerfectCompleteness.Repetition.CutChildCleanLawLemmas | |
| namespace OAI | |
| section | |
| namespace PerfectCompleteness.FixedCleanRate | |
| open ChildBlockCardinality ProjectedCleanRate | |
| noncomputable section | |
| theorem zeroProbability_lower (branch : Nat β Nat) (height t calls : Nat) | |
| (rows : Nat β Nat) : | |
| 1 / (bound branch height t calls rows : β) β€ | |
| zeroProbability branch height t calls rows := by | |
| let ids : RecursiveSpaces.Slots branch height β Fin t β Nat := fun _ _ => 0 | |
| rw [β raw_zero_probability branch height t calls rows ids, | |
| CleanTreeFactors.rawLaw_uniform] | |
| exact cleanLowerBound_le_probability | |
| (slots := ProjectedCardinality.projectedSlots ids) | |
| theorem conservative_coefficient_le {calls budget cost : Nat} | |
| (hcalls : calls β€ budget) (hcost : 0 < cost) | |
| (branch : Nat β Nat) (height t : Nat) (rows : Nat β Nat) : | |
| FixedBranching.cleanRate cost (bound branch height t budget rows : β) β€ | |
| coefficient cost branch height t calls rows := by | |
| have hbound : (bound branch height t calls rows : β) β€ | |
| (bound branch height t budget rows : β) := by | |
| exact_mod_cast FixedCallBudget.child_bound_mono hcalls branch height t rows | |
| have hpositive : (0 : β) < bound branch height t calls rows := | |
| Nat.cast_pos.mpr (shape_bound_pos branch height t calls rows) | |
| have hzero : 1 / (bound branch height t budget rows : β) β€ | |
| zeroProbability branch height t calls rows := | |
| (one_div_le_one_div_of_le hpositive hbound).trans | |
| (zeroProbability_lower branch height t calls rows) | |
| have hden : (0 : β) < 48000 * cost := by | |
| have : (0 : β) < cost := by exact_mod_cast hcost | |
| positivity | |
| calc | |
| _ = (1 / (bound branch height t budget rows : β)) / (48000 * cost) := by | |
| unfold FixedBranching.cleanRate | |
| ring | |
| _ β€ _ := div_le_div_of_nonneg_right hzero hden.le | |
| theorem decay_le_conservative {calls budget cost cube : Nat} | |
| (hcalls : calls β€ budget) (hcost : 0 < cost) (hcube : 2 β€ cube) | |
| (branch : Nat β Nat) (height t : Nat) (rows : Nat β Nat) : | |
| (1 - coefficient cost branch height t calls rows / (cube : β) ^ 2) ^ (cube ^ 3) β€ | |
| (1 - FixedBranching.cleanRate cost | |
| (bound branch height t budget rows : β) / (cube : β) ^ 2) ^ (cube ^ 3) := by | |
| have hc : (2 : β) β€ cube := by exact_mod_cast hcube | |
| have hsquare : (1 : β) β€ (cube : β) ^ 2 := by nlinarith | |
| have hden : (0 : β) < (cube : β) ^ 2 := by positivity | |
| have hcoef := (coefficient_bounds hcost branch height t calls rows).2 | |
| have hbase : 0 β€ 1 - coefficient cost branch height t calls rows / (cube : β) ^ 2 := by | |
| have := (div_le_one hden).mpr (hcoef.trans hsquare) | |
| linarith | |
| apply pow_le_pow_leftβ hbase | |
| have h := div_le_div_of_nonneg_right | |
| (conservative_coefficient_le hcalls hcost branch height t rows) hden.le | |
| linarith | |
| variable {Ξ΄ : β} {hΞ΄ : 0 < Ξ΄} (p : FixedParameters.Parameters Ξ΄ hΞ΄) | |
| theorem actual_clean_error {calls : Nat} (hcalls : calls β€ FixedParameters.calls p.plan) | |
| (height : Nat) : | |
| (1 - coefficient p.alphabetCost (FixedParameters.branch p) height | |
| (FixedRows.sourceLength p.plan hΞ΄) calls (FixedRows.rows p.plan) / | |
| (p.cubeSize height : β) ^ 2) ^ (p.cubeSize height ^ 3) < p.accuracy := by | |
| have hdecay := decay_le_conservative hcalls p.alphabetCost_pos | |
| (p.cube_errors height).1 (FixedParameters.branch p) height | |
| (FixedRows.sourceLength p.plan hΞ΄) (FixedRows.rows p.plan) | |
| exact hdecay.trans_lt (p.cube_errors height).2.2.2.2 | |
| end | |
| end PerfectCompleteness.FixedCleanRate | |
| end | |
| end OAI | |