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.reverseHints (0/3)
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).