lean4-htt/tests/lean/run/issue4726.lean
Arthur Adjedj 1138062a70
fix: normalize imax 1 u to u (#7631)
This PR fixes `Lean.Level.mkIMaxAux` (`mk_imax` in the kernel) such that
`imax 1 u` reduces to `u`.

Closes #7096
2025-05-21 20:27:53 +00:00

17 lines
465 B
Text

-- A refexive type, with multiple parameters to make sure
-- we get the order right
inductive N : Type where
| cons : (Nat -> Bool → N) -> N
-- set_option trace.Elab.definition.structural true
mutual
def f : N -> List Nat → List Bool → Nat
| .cons a, _, _ => g (a 32 true) [true] [1] + 1
termination_by structural n => n
def g : N -> List Bool → List Nat → Nat
| .cons a, _, _ => f (a 42 false) [1] [true] + 1
termination_by structural n => n
end