Download data/lean/OAI/Combinatorics/EditApproximation/Refinement/ComputedCoarseCopySpace.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.12 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Refinement/ComputedCoarseCopySpace.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/EditApproximation/Refinement/ComputedCoarseCopySpace.lean
-
curl -L -o ComputedCoarseCopySpace.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Refinement/ComputedCoarseCopySpace.lean
3.12 kB
| import OAI.Combinatorics.EditApproximation.Coarse.CoarseInputStorage | |
| import OAI.Combinatorics.EditApproximation.Coarse.CoarseInitialStorage | |
| import OAI.Combinatorics.EditApproximation.Refinement.ComputedFreshWork | |
| import OAI.Combinatorics.EditApproximation.Definitions | |
| namespace OAI | |
| namespace EditApproximation | |
| open Filter | |
| theorem physicalCoarseInputStorage_polynomial {M J : β} (source target : List β) (N : β) | |
| (hsize : source.length + target.length β€ N) | |
| (hsymbol : β a β source ++ target, Nat.size a β€ inputHeight N ^ 3) | |
| (entry : PhysicalEntry M J target.length) : | |
| physicalCoarseInputStorage source target entry β€ (N + 2) ^ 16 := by | |
| unfold physicalCoarseInputStorage | |
| exact coarsePreparedInputStorage_polynomial source target N | |
| (physicalSourceInterval source.length entry.1).lo | |
| (physicalSourceInterval source.length entry.1).hi entry.2.lo entry.2.hi | |
| (physicalSourceInterval source.length entry.1).ordered | |
| (physicalSourceInterval source.length entry.1).valid entry.2.ordered entry.2.valid hsize hsymbol | |
| theorem computedFamilyCoarseCopyStorage_eq (source target : List β) (N : β) | |
| (input : ComputedFamilyInput source target N) : | |
| computedFamilyCoarseCopyStorage source target N input = | |
| ((computedFamilyResult source target N input).freshKeys.map (coarseHistoryKeyCost | |
| (physicalCoarseInputStorage (M := (integerParameters N).M) | |
| (J := intervalTreeDepth (integerParameters N).M source.length) source target))).sum := | |
| computedFamilyKernelWork_eq_fresh_sum source target N input _ | |
| theorem computedFamilyCoarseCopyStorage_bound (source target : List β) (N : β) | |
| (hsize : source.length + target.length β€ N) | |
| (hsymbol : β a β source ++ target, Nat.size a β€ inputHeight N ^ 3) | |
| (input : ComputedFamilyInput source target N) : | |
| computedFamilyCoarseCopyStorage source target N input β€ | |
| (N + 2) ^ 16 * (computedFamilyResult source target N input).requests := by | |
| apply computedFamilyKernelWork_le | |
| apply coarseHistoryKeyCost_le | |
| intro entry | |
| exact physicalCoarseInputStorage_polynomial source target N hsize hsymbol entry | |
| theorem computedFamilyCoarseCopyStorage_polynomial : | |
| βαΆ N : β in atTop, β source target : List β, source.length + target.length β€ N β | |
| (β a β source ++ target, Nat.size a β€ inputHeight N ^ 3) β | |
| β input : ComputedFamilyInput source target N, | |
| computedFamilyCoarseCopyStorage source target N input β€ (N + 2) ^ 18 := by | |
| filter_upwards [computedFamilyResult_requests_near_linear 1 (by norm_num)] with N hr | |
| intro source target hsize hsymbol input | |
| have hrequests : (computedFamilyResult source target N input).requests β€ (N + 2) ^ 2 := by | |
| have h := hr source target hsize input | |
| norm_num at h | |
| exact_mod_cast h | |
| calc | |
| _ β€ (N + 2) ^ 16 * (computedFamilyResult source target N input).requests := | |
| computedFamilyCoarseCopyStorage_bound source target N hsize hsymbol input | |
| _ β€ (N + 2) ^ 16 * (N + 2) ^ 2 := Nat.mul_le_mul_left _ hrequests | |
| _ = _ := by rw [β pow_add] | |
| end EditApproximation | |
| end OAI | |