(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
Unset Standard Proposition Elimination Names.
(** Divisibility *)
Inductive divide (a b : Z) : Prop :=
divide_intro : forall q : Z, b = (q * a)%Z -> divide a b.
Notation "( x | y )" := (divide x y) (at level 0) : Z_scope.
Local Open Scope Z_scope.
(** Results *)

(* Specifications: *)
Lemma divide_refl : forall a : Z, (a | a).
Lemma one_divide : forall a : Z, (1 | a).
Lemma divide_0 : forall a : Z, (a | 0).
Hint Resolve divide_refl one_divide divide_0.
Lemma divide_mult_left : forall a b c : Z, (a | b) -> (c * a | c * b).
Lemma divide_mult_right : forall a b c : Z, (a | b) -> (a * c | b * c).
Hint Resolve divide_mult_left divide_mult_right.
Lemma divide_plus : forall a b c : Z, (a | b) -> (a | c) -> (a | b + c).
Lemma divide_opp : forall a b : Z, (a | b) -> (a | - b).
Lemma divide_opp_rev : forall a b : Z, (a | - b) -> (a | b).
Lemma divide_opp_left : forall a b : Z, (a | b) -> (- a | b).
Lemma divide_opp_left_rev : forall a b : Z, (- a | b) -> (a | b).
Lemma divide_minus : forall a b c : Z, (a | b) -> (a | c) -> (a | b - c).
Lemma divide_left : forall a b c : Z, (a | b) -> (a | b * c).
Lemma divide_right : forall a b c : Z, (a | c) -> (a | b * c).
Lemma divide_a_ab : forall a b : Z, (a | a * b).
Lemma divide_a_ba : forall a b : Z, (a | b * a).
Hint Resolve divide_plus divide_opp divide_opp_rev divide_opp_left
divide_opp_left_rev divide_minus divide_left divide_right divide_a_ab
divide_a_ba.