lean4-htt/tests/lean/run/issue8490.lean
Rob23oba a912652b7d
fix: simp_all? and simp_all?! (#8491)
This PR fixes the behavior of `simp_all?` and `simp_all?!`, aligning
them with `simp_all` and `simp_all!` respectively.

Closes #8490
2025-05-27 07:07:12 +00:00

18 lines
430 B
Text

inductive Aexp where
| val : Int → Aexp
| plus : Aexp → Aexp → Aexp
@[simp]
def asimp_const : Aexp -> Aexp
| .val x => .val x
| .plus x y => .plus x y
@[simp]
def optimal' (a : Aexp) : Prop :=
optimal' a ∧ True
least_fixpoint
/-- info: Try this: simp_all only [asimp_const, reduceCtorEq] -/
#guard_msgs in
example (x y : Aexp) (k : Int) (h : asimp_const (.val k) = x.plus y) : optimal' x := by
simp_all?