Library Karatsuba.Order.Comparison

Require Import Coercions.

Definition comparisonLt a : bool :=
match a with
| Lttrue
| Eqfalse
| Gtfalse
end.

Definition comparisonLe a : bool :=
match a with
| Lttrue
| Eqtrue
| Gtfalse
end.

Definition comparisonGt a : bool :=
match a with
| Ltfalse
| Eqfalse
| Gttrue
end.

Definition comparisonGe a : bool :=
match a with
| Ltfalse
| Eqtrue
| Gttrue
end.

Lemma compareLt : a, comparisonLt a a=Lt.
Proof.
induction a; auto; contradiction.
Qed.

Lemma compareLe : a, comparisonLt a {a=Lt}+{a=Eq}.
Proof.
induction a; auto; contradiction.
Qed.