Theoremlength_le_pow
Distinct assignments of length k are at most 2^k.
Statement
theorem length_le_pow {k : Nat} {l : List Assignment} (hn : l.Nodup) (hk : ∀ a ∈ l, a.length = k) :
l.length ≤ 2 ^ kProof
by
rw [← allAssignments_length k]
apply hn.length_le_of_subset
intro a ha
have := allAssignments_complete a
rwa [hk a ha] at thisProved 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.