Pure Lean 4 · No Mathlib
EasyLists
41. Map Preserves List Length
Prove that mapping any function `f : α → β` over a list `xs` preserves its length.
Target Theorem
theorem list_map_length {α β : Type} (f : α → β) (xs : List α) : (xs.map f).length = xs.lengthHints (0/2)
Stuck? Reveal hints one step at a time without spoiling the full proof.
Symbols:
Infoview & Diagnosticsline 1idle
Write your proof above and click Submit Proof (or open in live.lean-lang.org).