blob: c52fe299320a22c6f2857d0a53df57f5eccbfe5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
(* Evgeny Makarov, INRIA, 2007 *)
(************************************************************************)
(*i $Id: ZAxioms.v 13323 2010-07-24 15:57:30Z herbelin $ i*)
Require Export NZAxioms.
Set Implicit Arguments.
Module Type Opp (Import T:Typ).
Parameter Inline opp : t -> t.
End Opp.
Module Type OppNotation (T:Typ)(Import O : Opp T).
Notation "- x" := (opp x) (at level 35, right associativity).
End OppNotation.
Module Type Opp' (T:Typ) := Opp T <+ OppNotation T.
(** We obtain integers by postulating that every number has a predecessor. *)
Module Type IsOpp (Import Z : NZAxiomsSig')(Import O : Opp' Z).
Declare Instance opp_wd : Proper (eq==>eq) opp.
Axiom succ_pred : forall n, S (P n) == n.
Axiom opp_0 : - 0 == 0.
Axiom opp_succ : forall n, - (S n) == P (- n).
End IsOpp.
Module Type ZAxiomsSig := NZOrdAxiomsSig <+ Opp <+ IsOpp.
Module Type ZAxiomsSig' := NZOrdAxiomsSig' <+ Opp' <+ IsOpp.
|