fix: bug in reduceLeDiff simproc proof term (#4065)
As [reported on Zulip](https://leanprover.zulipchat.com/#narrow/stream/348111-std4/topic/v4.2E8.2E0-rc1.20issue/near/437059527).
This commit is contained in:
parent
e362b50fa9
commit
93d7afb00a
2 changed files with 3 additions and 1 deletions
|
|
@ -275,7 +275,7 @@ def reduceLTLE (nm : Name) (arity : Nat) (isLT : Bool) (e : Expr) : SimpM Step :
|
|||
applySimprocConst (mkConst ``True) ``Nat.Simproc.le_add_le #[x, yb, yo, leProof]
|
||||
else
|
||||
let finExpr := mkLENat (toExpr (xn - yn)) yb
|
||||
let geProof ← mkOfDecideEqTrue (mkGENat yo x)
|
||||
let geProof ← mkOfDecideEqTrue (mkGENat x yo)
|
||||
applySimprocConst finExpr ``Nat.Simproc.le_add_ge #[x, yb, yo, geProof]
|
||||
| .offset xb xo xn, .offset yb yo yn => do
|
||||
if xn ≤ yn then
|
||||
|
|
|
|||
|
|
@ -32,3 +32,5 @@ example : x + foo 2 = 12 + x := by
|
|||
-- We can use `-` to disable `simproc`s
|
||||
fail_if_success simp [-reduce_foo]
|
||||
simp_arith
|
||||
|
||||
example (x : Nat) (h : x < 86) : ¬100 ≤ x + 14 := by simp; exact h
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue