Elm Exactly

Theoremclasses_length

StandardElmMech/Src/GroupingProof.lean:149, The classes partition `range n` · tactic proof

Statement

theorem classes_length : (classes n r).length ≤ n

Proof

by
  rw [classes_eq]
  have := (foldl_inv (r := r) (List.range n) [] (fun a ha => List.mem_range.mp ha) ⟨by simp, List.Pairwise.nil⟩).2.2
  simpa using this

Proved with tactics, which Lean expands into a proof term that its kernel checks.

Theorems it uses

Used by

In StandardElmMech/Src/GroupingProof.lean: components_valid: the canonical grouping is one the book allows (ValidNumbering).

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.