1

I have two conditions for nat numbers:

H:  a < b
H1: b < a

How to discriminate goal? Does exist any tactics for < ?

he11boy
  • 71
  • 3

2 Answers2

2

Use lia:

From Coq Require Import Lia.

Goal forall a b, a < b -> b < a -> False.
  lia.
Qed.

You can learn more about lia and other decision procedures for arithmetic here.

0

For reference, doing a manual proof is not so difficult in this case:

From mathcomp Require Import all_ssreflect.

Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.

Lemma foo a b (a_lt_b : a < b) : b < a -> False.
Proof. by rewrite ltnNge (ltnW a_lt_b). Qed.
ejgallego
  • 6,709
  • 1
  • 14
  • 29