lean4-htt/tests/lean/run/issue8939wf.lean
Tom Levy 2ca3bc2859
chore: fix spelling (#11531)
Hi, these are just some spelling corrections.

There is one I wasn't completely sure about in
src/Init/Data/List/Lemmas.lean:

> See also
> ...
> Also
> \* \`Init.Data.List.Monadic\` for **addiation** _(additional?)_ lemmas
about \`List.mapM\` and \`List.forM\`
2025-12-06 13:54:27 +00:00

43 lines
1.3 KiB
Text

module
/-!
variant of issue8939 with well-founded recursion
(Or is this just 8938 showing up with 8939 fixed? anyways, more tests don't hurt)
-/
public axiom g : Nat → Nat → Nat
public axiom magic_dec : f - 1 < f
set_option warn.sorry false
set_option pp.proofs true
-- set_option trace.Elab.definition.wf true
-- set_option trace.Kernel true in
@[expose] public
def ackermann_fuel : (n m : Nat) → (fuel : Nat) → (h : g n m < fuel) → Nat
| 0, m, _, _ => m+1
| n + 1, 0, f, h => ackermann_fuel n 1 (f - 1) (by sorry)
| n + 1, m + 1, f, h =>
ackermann_fuel n (ackermann_fuel (n + 1) m (f - 1) (by sorry)) (f - 1) (by as_aux_lemma => sorry)
termination_by _ _ fuel => fuel
decreasing_by
-- At some point, using as_aux_lemma in decreasing_by did not work
as_aux_lemma => sorry
as_aux_lemma => sorry
as_aux_lemma => sorry
done
def ackermann_fuel'' : (n m : Nat) → (fuel : Nat) → (h : g n m < fuel) → Nat
| 0, m, _, _ => m+1
| n + 1, 0, f, h => ackermann_fuel'' n 1 (f - 1) (by sorry)
| n + 1, m + 1, f, h =>
ackermann_fuel'' n (ackermann_fuel'' (n + 1) m (f - 1) (by sorry)) (f - 1) (by as_aux_lemma => sorry)
termination_by _ _ fuel => fuel
decreasing_by
as_aux_lemma => sorry
as_aux_lemma => sorry
as_aux_lemma => sorry
done
#print ackermann_fuel''._unary