lean4-htt/tests/lean/run/kernel_maxheartbeats.lean
Joachim Breitner 4b6f07060d
feat: remove support for reducible well-founded recursion (#10714)
This PR removes support for reducible well-founded recursion, a Breaking
Change. Using `@[semireducible]` on a definition by well-founded
recursion prints a warning that this is no longer effective.

With the upcoming module system, proofs are often not available. With
this change, we remove a fringe use case hat may require proofs, and
that would not be supported under the module system anyways.

At least for now, direct use of `WellFounded.fix` is not affected.

This fixes: #5192
2025-10-10 15:48:28 +00:00

20 lines
428 B
Text

import Lean
def fib : Nat → Nat
| 0 => 0
| 1 => 1
| n + 2 => fib (n + 1) + fib n
set_option maxHeartbeats 500
open Lean Meta
/-- error: (kernel) deterministic timeout -/
#guard_msgs in
run_meta do
let type ← mkEq (← mkAppM ``fib #[mkNatLit 10000]) (mkNatLit 100000)
let value ← mkEqRefl (mkNatLit 100000)
addDecl <| .thmDecl {
name := `ack_4_4
levelParams := []
type, value
}