lean4-htt/tests/lean/run/issue8093.lean
Joachim Breitner 3fe195a4a9
fix: FunInd with nested well-founded recurison and late fixed parameters (#8094)
This PR fixes the generation of functional induction principles for
functions with nested nested well-founded recursion and late fixed
parameters. This is a follow-up for #7166. Fixes #8093.
2025-04-25 09:20:27 +00:00

13 lines
335 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

axiom testSorry : α
def foo (n : Nat) (p : Nat) : Nat :=
foo (foo (n - 1) p) p
termination_by n
decreasing_by all_goals exact testSorry
/--
info: foo.induct (p : Nat) (motive : Nat → Prop) (case1 : ∀ (x : Nat), motive (x - 1) → motive (foo (x - 1) p) → motive x)
(n : Nat) : motive n
-/
#guard_msgs in
#check foo.induct