Skip to content

Commit

Permalink
feat: omega using Fin.isLt (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em authored Feb 6, 2024
1 parent 325604c commit 546f933
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Std/Tactic/Omega/OmegaM.lean
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ def analyzeAtom (e : Expr) : OmegaM (HashSet Expr) := do
| _, (``Int.natAbs, #[x]) =>
r := r.insert (mkApp (.const ``Int.le_natAbs []) x)
r := r.insert (mkApp (.const ``Int.neg_le_natAbs []) x)
| _, (``Fin.val, #[n, i]) =>
r := r.insert (mkApp2 (.const ``Fin.isLt []) n i)
| _, _ => pure ()
return r
| (``HDiv.hDiv, #[_, _, _, _, x, k]) => match natCast? k with
Expand Down
2 changes: 2 additions & 0 deletions test/omega/test.lean
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,5 @@ example (i j : Nat) (p : i ≥ j) : True := by
let k := l
have _ : i ≥ k := by omega
trivial

example (i : Fin 7) : (i : Nat) < 8 := by omega

0 comments on commit 546f933

Please sign in to comment.