aboutsummaryrefslogtreecommitdiff
path: root/theories/Classes/Functions.v
diff options
context:
space:
mode:
authormsozeau2008-12-14 16:34:43 +0000
committermsozeau2008-12-14 16:34:43 +0000
commitc74f11d65b693207cdfa6d02f697e76093021be7 (patch)
treeb32866140d9f5ecde0bb719c234c6603d44037a8 /theories/Classes/Functions.v
parent2f63108dccc104fe32344d88b35193d34a88f743 (diff)
Generalized binding syntax overhaul: only two new binders: `() and `{},
guessing the binding name by default and making all generalized variables implicit. At the same time, continue refactoring of Record/Class/Inductive etc.., getting rid of [VernacRecord] definitively. The AST is not completely satisfying, but leaning towards Record/Class as restrictions of inductive (Arnaud, anyone ?). Now, [Class] declaration bodies are either of the form [meth : type] or [{ meth : type ; ... }], distinguishing singleton "definitional" classes and inductive classes based on records. The constructor syntax is accepted ([meth1 : type1 | meth1 : type2]) but raises an error immediately, as support for defining a class by a general inductive type is not there yet (this is a bugfix!). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11679 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Classes/Functions.v')
-rw-r--r--theories/Classes/Functions.v17
1 files changed, 8 insertions, 9 deletions
diff --git a/theories/Classes/Functions.v b/theories/Classes/Functions.v
index c3a00259b1..602b7b09dd 100644
--- a/theories/Classes/Functions.v
+++ b/theories/Classes/Functions.v
@@ -1,4 +1,3 @@
-(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *)
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
@@ -21,22 +20,22 @@ Require Import Coq.Classes.Morphisms.
Set Implicit Arguments.
Unset Strict Implicit.
-Class Injective ((m : Morphism (A -> B) (RA ++> RB) f)) : Prop :=
+Class Injective `(m : Morphism (A -> B) (RA ++> RB) f) : Prop :=
injective : forall x y : A, RB (f x) (f y) -> RA x y.
-Class ((m : Morphism (A -> B) (RA ++> RB) f)) => Surjective : Prop :=
+Class Surjective `(m : Morphism (A -> B) (RA ++> RB) f) : Prop :=
surjective : forall y, exists x : A, RB y (f x).
-Definition Bijective ((m : Morphism (A -> B) (RA ++> RB) (f : A -> B))) :=
+Definition Bijective `(m : Morphism (A -> B) (RA ++> RB) (f : A -> B)) :=
Injective m /\ Surjective m.
-Class MonoMorphism (( m : Morphism (A -> B) (eqA ++> eqB) )) :=
+Class MonoMorphism `(m : Morphism (A -> B) (eqA ++> eqB)) :=
monic :> Injective m.
-Class EpiMorphism ((m : Morphism (A -> B) (eqA ++> eqB))) :=
+Class EpiMorphism `(m : Morphism (A -> B) (eqA ++> eqB)) :=
epic :> Surjective m.
-Class IsoMorphism ((m : Morphism (A -> B) (eqA ++> eqB))) :=
- monomorphism :> MonoMorphism m ; epimorphism :> EpiMorphism m.
+Class IsoMorphism `(m : Morphism (A -> B) (eqA ++> eqB)) :=
+ { monomorphism :> MonoMorphism m ; epimorphism :> EpiMorphism m }.
-Class ((m : Morphism (A -> A) (eqA ++> eqA))) [ I : ! IsoMorphism m ] => AutoMorphism.
+Class AutoMorphism `(m : Morphism (A -> A) (eqA ++> eqA)) {I : IsoMorphism m}.