Zulip Chat Archive
Stream: new members
Topic: simpler tactic than linarith for < > comparisons? (beginner)
rzeta0 (Jun 15 2024 at 13:27):
The following is a very simple proof that if then .
-- 01 - First Proof
import Mathlib.Tactic
example {a: ℕ} (h1: a = 4) : a > 1 := by linarith
The linarith tactic, as far as I can tell does a lot more than justify ordering in the natural numbers. The docs tell me is does more sophisticated linear algebra.
My question therefore is - is there a simpler, smaller, tactic that can prove the above? Something that just encodes the ordering on the natural numbers, integers, reals, perhaps? Is there a "inequalities" tactic?
Rida Hamadani (Jun 15 2024 at 13:36):
Perhaps omega
is a special case of what you want, that works only for natural numbers. Replacing linarith
by omega
in your proof reduces its time to less than 10%.
Last updated: May 02 2025 at 03:31 UTC