Download data/lean/OAI/Combinatorics/EditApproximation/Geometry/ChargedRandomCoarseKeys.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.69 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Geometry/ChargedRandomCoarseKeys.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/EditApproximation/Geometry/ChargedRandomCoarseKeys.lean
-
curl -L -o ChargedRandomCoarseKeys.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Geometry/ChargedRandomCoarseKeys.lean
4.69 kB
| import OAI.Combinatorics.EditApproximation.Geometry.SourceRankedKeys | |
| import OAI.Combinatorics.EditApproximation.Geometry.ChargedRandomCoarseOracle | |
| import OAI.Combinatorics.EditApproximation.Geometry.ChargedRandomMemo | |
| namespace OAI | |
| namespace EditApproximation | |
| section Keys | |
| variable {Ο Ξ± : Type*} [DecidableEq Ξ±] {M J R : β} [NeZero M] [NeZero R] | |
| (source target : List Ξ±) (N P F exponent H Q T S passes copies : β) | |
| (factor : β β β) (multiplier : β β β) (tau eta kappa delta : β) | |
| (readGroup : β β β β PhysicalInternalNode M J β Fin R β GroupScalarKey M F Q β FiniteQuery Ο) | |
| (readInteger : β β β β PhysicalInternalNode M J β Fin R β | |
| (β Γ TargetInterval target.length) β β β FiniteQuery Ο) | |
| (sourceAnswer : Ο β β) (initial : PhysicalEntry M J target.length β β) | |
| local notation "mixed" => chargedRandomGlobalQuery source target N P F exponent H Q T S | |
| passes copies factor multiplier tau eta kappa delta readGroup readInteger initial | |
| local notation "program" => SourceRanked.projectedBody ChargedPhysicalRequest.rank mixed sourceAnswer | |
| local notation "coarse" => chargedRandomCoarseQuery source target N P F exponent H Q T S | |
| passes copies factor multiplier tau eta kappa delta readGroup readInteger sourceAnswer | |
| theorem chargedRandomCoarseQuery_uncached_keys | |
| (root : ChargedPhysicalRequest M J target.length passes copies T S) | |
| (entry : PhysicalEntry M J target.length) | |
| (hentry : Sum.inl entry β rankedUncachedKeys ChargedPhysicalRequest.rank program root) : | |
| entry β (coarse root).keys (fun entry => (initial entry : β)) := by | |
| have hall : β level root, root.rank = level β β entry, | |
| Sum.inl entry β rankedUncachedKeys ChargedPhysicalRequest.rank program root β | |
| entry β (coarse root).keys (fun entry => (initial entry : β)) := by | |
| intro level | |
| induction level using Nat.strong_induction_on with | |
| | h level ih => | |
| intro root hlevel entry he | |
| cases root with | |
| | inl base => | |
| rw [rankedUncachedKeys] at he | |
| simp only [SourceRanked.projectedBody, chargedRandomGlobalQuery, | |
| FiniteQuery.eraseSources, FiniteQuery.keys, List.flatMap_nil, List.mem_cons, | |
| List.not_mem_nil, or_false, Sum.inl.injEq] at he | |
| subst entry | |
| rw [chargedRandomCoarseQuery] | |
| exact List.mem_cons_self | |
| | inr parent => | |
| rw [rankedUncachedKeys] at he | |
| rcases List.mem_cons.mp he with he | he | |
| Β· cases he | |
| obtain β¨child, hc, heβ© := List.mem_flatMap.mp he | |
| rw [chargedRandomCoarseQuery, FiniteQuery.substitute_keys] | |
| apply List.mem_flatMap.mpr | |
| refine β¨child, ?_, ih child.val.rank (hlevel βΈ child.property) child.val rfl entry heβ© | |
| have hv (child) := chargedRandomCoarseQuery_value source target N P F exponent H Q T S | |
| passes copies factor multiplier tau eta kappa delta readGroup readInteger sourceAnswer initial child | |
| simp_rw [hv] | |
| unfold SourceRanked.projectedBody | |
| rw [chargedRandomGlobalQuery_table_initial_independent source target N P F exponent H Q T S | |
| passes copies factor multiplier tau eta kappa delta readGroup readInteger (fun _ => 0) initial parent] | |
| exact hc | |
| exact hall root.rank root rfl entry hentry | |
| theorem chargedRandomMemo_coarse_key | |
| (values : ChargedPhysicalRequest M J target.length passes copies T S β β) | |
| (hbody : β key, (mixed key).value (Sum.elim sourceAnswer (fun next => values next.val)) = values key) | |
| (bits : β) (encode : Sum Ο (ChargedPhysicalRequest M J target.length passes copies T S) β β) | |
| (hinjective : Function.Injective encode) (hbounded : β key, encode key < 2 ^ bits) | |
| (root : ChargedPhysicalRequest M J target.length passes copies T S) | |
| (entry : PhysicalEntry M J target.length) | |
| (hentry : Sum.inr (Sum.inl entry) β | |
| (chargedRandomMemoEvaluate source target N P F exponent H Q T S passes copies factor multiplier | |
| tau eta kappa delta readGroup readInteger initial sourceAnswer bits encode root).freshKeys) : | |
| entry β (coarse root).keys (fun entry => (initial entry : β)) := by | |
| apply chargedRandomCoarseQuery_uncached_keys source target N P F exponent H Q T S passes copies | |
| factor multiplier tau eta kappa delta readGroup readInteger sourceAnswer initial root entry | |
| apply SourceRanked.uncachedKeys_table_mem ChargedPhysicalRequest.rank mixed sourceAnswer values hbody root | |
| (Sum.inl entry) | |
| exact rankedMemoEvaluate_freshKeys_mem _ _ bits encode hinjective hbounded (.inr root) .empty | |
| (memoSound_empty _ _ _) (.inr (.inl entry)) hentry | |
| end Keys | |
| end EditApproximation | |
| end OAI | |