(* Copyright 2012-2015 by Adam Petcher.				* * Use of this source code is governed by the license described	* * in the LICENSE file at the root of the source tree.		*)
(* Definitions and theory of natural numbers that is useful in cryptographi proofs. *)
Set Implicit Arguments.
Require Export Arith.
Require Export Omega.
Require Export Arith.Div2.
Require Export Coq.Numbers.Natural.Peano.NPeano.
induction n1; destruct n2; intuition; simpl in *.
remember (n2 * n3) as x.
omega.
remember (n1 * n3) as x.
omega.
f_equal.
eapply IHn1; eauto.
eapply plus_reg_l. eauto.
Qed.
intuition.
eapply mult_same_r; eauto.
rewrite mult_comm.
rewrite (mult_comm n2 n3).
trivial.
Qed.
destruct n1; intuition; simpl in *.
remember (n1 * n2) as x.
omega.
Qed.
intuition.
Qed.
intuition.
Qed.

Lemma minus_diag_eq : forall n1 n2,
n1 = n2 ->
n1 - n2 = 0.