TheoremallAssignments_mem_length
Statement
theorem allAssignments_mem_length : ∀ (k : Nat) (a : Assignment), a ∈ allAssignments k → a.length = k
| 0, a, h => by simp [allAssignments] at h; subst h; rfl
| k + 1, a, h => by
simp only [allAssignments, List.mem_flatMap, List.mem_cons, List.not_mem_nil, or_false] at h
obtain ⟨b, hb, rfl | rfl⟩Proof
h <;> simp [allAssignments_mem_length k b hb]Proved by a term, which Lean's kernel checks directly.
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.