TheoremallAssignments_length
Statement
theorem allAssignments_length (k : Nat) : (allAssignments k).length = 2 ^ kProof
by
induction k with
| zero => rfl
| succ k ih =>
simp only [allAssignments]
have := length_flatMap_two (fun a : Assignment => Num.float :: a) (fun a => Num.int :: a) (allAssignments k)
rw [this, ih, Nat.pow_succ]
omegaProved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
Used by
In StandardElmMech/Stat/CopyLoop.lean: The copy loop terminates within 2^k + 1 rounds, makes the least set of copies closed under requests, at most 2^k (copyLoop_fuel, copyLoop_least, copies_le_pow).
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.