All Exercises
#41 Map Preserves List Length
live.lean-lang.org
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.length
Hints (0/2)

Stuck? Reveal hints one step at a time without spoiling the full proof.

Symbols:
Initializing Lean 4 editor…
Infoview & Diagnosticsline 1idle
Write your proof above and click Submit Proof (or open in live.lean-lang.org).