All Exercises
#48 Tail-Recursive Reverse Equivalence
live.lean-lang.org
Pure Lean 4 · No Mathlib
MediumVerified Algorithms

48. Tail-Recursive Reverse Equivalence

Prove that the linear-time tail-recursive reversal `fastRev` agrees with `List.reverse` on every list. Keep `revAcc` and `fastRev` unchanged.

Target Theorem
theorem fast_rev_eq {α : Type} (xs : List α) : fastRev xs = xs.reverse
Hints (0/3)

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).