Require Export Omega.
Require Export ArithRing.
Require Export Arith.

Fixpoint power (a n:nat) :=
match n with 
| O => 1
| S p => a*(power a p)
end.

Lemma l : forall a b, a<=a*b\/b<=a*b.
Proof.
induction a.
intros;omega.
induction b.
intros;omega.
intros.
elim (IHa (S b)).

intros.
left; simpl; omega.
intros.
right; simpl; omega.
Qed.

Lemma apoweran : forall  n a, 0< a -> 0< n -> a <= power a n.
induction n.
intros;omega.
induction n.
intros; simpl; omega.
intros.
generalize (l a (power a (S n))); intros Hnew.
elim Hnew.
intros; simpl in *.
omega.
intros.
intros.
apply le_trans with (power a (S n)).
apply IHn.
assumption.
omega.
simpl; assumption.
Qed.

Lemma l2 : forall a n m, power a (n+m)=(power a n)*(power a m).
Proof.
intros a n; induction n.
simpl.
intros; ring.
intros; simpl.
rewrite IHn.
ring.
Qed.
