Download data/lean/OAI/Combinatorics/EditApproximation/Specification/RawBandOuter.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Specification/RawBandOuter.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Combinatorics/EditApproximation/Specification/RawBandOuter.lean
-
curl -L -o RawBandOuter.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Combinatorics/EditApproximation/Specification/RawBandOuter.lean
2.3 kB
| import OAI.Combinatorics.EditApproximation.Specification.RawBandConsumers | |
| import OAI.Combinatorics.EditApproximation.Definitions | |
| namespace OAI.EditApproximation.BinaryFraction | |
| def dyadicSampledGroupActionReadWithWorkRaw {ny M : β} | |
| (b exponent Q : β) (F : BinaryFraction) | |
| (initial current : Fin M β TargetInterval ny β BinaryFraction Γ β) | |
| (raw : List BinaryFraction) (hraw : raw.map value = groupDyadicScales M b F.value) | |
| (draw : β t : Fin (groupDyadicScales M b F.value).length, | |
| Fin (groupSampleCount M Q b (groupDyadicScaleAt M b F.value t)) β Fin M) | |
| (members : List (RawUnskippedBand M ny)) (hne : members β []) := | |
| sampledGroupActionReadWithWorkRaw b exponent Q initial current | |
| (indexedGroupScales raw M b F.value hraw) | |
| (fun t j => draw t (Fin.cast (congrArg (groupSampleCount M Q b) | |
| (indexedGroupScales_value raw M b F.value hraw t)) j)) members hne | |
| def preparedCellGroupReadWithWorkRaw {Ξ± : Type*} (source target : List Ξ±) {M : β} | |
| (parent : TargetInterval source.length) (b P F exponent Q : β) (_hb : 0 < b) (_hP : 0 < P) | |
| (tau a : BinaryFraction) | |
| (parentInitial : TargetInterval target.length β BinaryFraction Γ β) | |
| (child initial current : Fin M β TargetInterval target.length β BinaryFraction Γ β) | |
| (R C : β) (_hr : β i q, (child i q).2 β€ R) (_hi : β i q, (initial i q).2 β€ C) | |
| (raw : List BinaryFraction) (hraw : raw.map value = groupDyadicScales M b (nat F).value) | |
| (draw : β t : Fin (groupDyadicScales M b (nat F).value).length, | |
| Fin (groupSampleCount M Q b (groupDyadicScaleAt M b (nat F).value t)) β Fin M) | |
| (cell : β Γ β) : | |
| Option (BinaryBellmanAction (TargetInterval target.length) | |
| (Fin M Γ TargetInterval target.length) M) Γ β := | |
| let centers := cellCentersReadWithWork P F b a (inversePowerTwo exponent) parentInitial cell | |
| let members := filterMapWithWork | |
| (preparedUnskippedReadWithWorkRaw parent b P exponent tau (nat F) child initial) centers.1 | |
| if h : members.1 = [] then (none, centers.2 + members.2 + 1) else | |
| let selected := dyadicSampledGroupActionReadWithWorkRaw b exponent Q (nat F) initial current raw hraw draw members.1 h | |
| (some selected.1, centers.2 + members.2 + selected.2 + 2) | |
| end OAI.EditApproximation.BinaryFraction | |