OAI/Combinatorics/EditApproximation/Coarse/CoarseIndexedArrayHistory.lean
4 declarations, 0 contain sorry, 0 declared as axioms
- def
OAI.EditApproximation.BinaryFraction.coarseIndexArrayHistoryline 8 - theorem
OAI.EditApproximation.BinaryFraction.coarseIndexArrayHistory_eqline 27 - def
OAI.EditApproximation.BinaryFraction.coarseIndexedArrayHistoryline 61Source documentation
Every array footprint of the literal indexed recursion. Descriptor and address words are charged separately by the indexed bit counter.
def coarseIndexedArrayHistory {B : ℕ} (k q L n : ℕ) (source target : List ℕ) (two : BinaryFraction) : (d offset : ℕ) → CoarseThresholdDraws B d → BinaryFraction → ℕ → ℕ | 0, offset, draws, allowance, start => if (leWithWork (nat (coarseDescriptorLength B 0 n offset)) allowance).1 then 1 else coarseArrayStorage (coarseIndexedWithWork k q L n source target two 0 offset draws allowance start).1 | d + 1, offset, (draws, below), allowance, start => if (leWithWork (nat (coarseDescriptorLength B (d + 1) n offset)) allowance).1 then 1 else coarseArrayStorage (coarseIndexedWithWork k q L n source target two (d + 1) offset (draws, below) allowance start).1 + coarseIndexArrayHistory k q L two (fun i => coarseDescriptorLength B d n (offset + i.val * B ^ d)) (fun i => coarseIndexedWithWork k q L n source target two d (offset + i.val * B ^ d) (below i)) …Mentions: OAI.EditApproximation.BinaryFraction, OAI.EditApproximation.CoarseThresholdDraws, OAI.EditApproximation.BinaryFraction.leWithWork, OAI.EditApproximation.BinaryFraction.nat, OAI.EditApproximation.coarseDescriptorLength, OAI.EditApproximation.BinaryFraction.coarseArrayStorage, OAI.EditApproximation.BinaryFraction.coarseIndexedWithWork, OAI.EditApproximation.BinaryFraction.coarseIndexArrayHistory
- theorem
OAI.EditApproximation.BinaryFraction.coarseIndexedArrayHistory_eqline 78