1

I have two theorems tst4 and tst3, why `omega' can solve tst4 but not tst3? This just does not make sense to me.

   Theorem tst4 : forall (a b c : nat), 
    (a = b + 1 /\ b = 0) -> (False \/ a >= 1).
    Proof. 
    intros.
    omega.
    Qed.

    Theorem tst3 : forall (a b c : nat), 
    (a = b + 1 /\ b = 0) -> (False \/ (a >= 1 /\ True)).
    Proof. 
    intros.
    omega.
    Qed.
yrZhang
  • 55
  • 3

1 Answers1

3

omega (or lia which—as pointed by @Anton Trunov—you should use instead) operates on integers and tries to prove properties about them or deduce falsehood from a contradiction in them. Hence it is able to deal with False in your goal. True however has nothing to do with that. omega shouldn't be thought as an all-purpose tactic, it's really to deal with natural numbers or integers.

Actually lia is able to solve your goal, but I wouldn't rely on either to deal with stuff that doesn't have anything to do with numbers. In your case, and assuming you stick with omega (or make the switch to lia and end up with another similar goal it can't solve) you can combine it with another tactic like the tactical intuition:

Theorem tst3 : 
  forall (a b c : nat), 
    (a = b + 1 /\ b = 0) -> 
    (False \/ (a >= 1 /\ True)).
Proof. 
  intros.
  intuition omega.
Qed.
Théo Winterhalter
  • 4,908
  • 2
  • 18
  • 34