Ring and Omega Tactics for Naturals


Require Import Arith Omega.

Goal forall x y, (x+y)*(x+y)=x*x+y*y+2*x*y.
intros. ring_simplify. reflexivity.

Goal forall x y z, x<=y -> y+1<=z -> x<z.
intros. omega.

Fixpoint sum n := match n with
| 0 => 0
| S n => sum n + S n
end.

Goal forall n, n>=2 -> sum n > n.
destruct n. omega.
destruct n. omega.
simpl. omega.

Goal forall n, 2*sum n = n*(n+1).
induction n. trivial.
simpl. ring_simplify. rewrite IHn. ring.

This page has been generated by coqdoc