diff options
| author | clrenard | 2001-06-12 16:19:37 +0000 |
|---|---|---|
| committer | clrenard | 2001-06-12 16:19:37 +0000 |
| commit | 8e6b70111512b0ec60bd7f9a656207f03252c609 (patch) | |
| tree | 709114d45db35d690e05c970f3ebc9cfcfc03165 /contrib/setoid/Setoid_replace.v | |
| parent | f2d06f15a11fa4261483ac59eda33fa11f784e9a (diff) | |
Ajout de la tactique Setoid_replace.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1782 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/setoid/Setoid_replace.v')
| -rw-r--r-- | contrib/setoid/Setoid_replace.v | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/contrib/setoid/Setoid_replace.v b/contrib/setoid/Setoid_replace.v new file mode 100644 index 0000000000..eb7d0a182a --- /dev/null +++ b/contrib/setoid/Setoid_replace.v @@ -0,0 +1,65 @@ +(***********************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *) +(* \VV/ *************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(***********************************************************************) + +(* $Id$: *) + +Declare ML Module "setoid_replace". + +Grammar tactic simple_tactic : ast := + setoid_replace [ "Setoid_replace" constrarg($c1) "with" constrarg($c2) ] -> [(Setoid_replace $c1 $c2)] +. + +Syntax tactic level 0 : + setoid_replace [<<(Setoid_replace $c1 $c2)>>] -> [[<hov 0>"Setoid_replace " $c1 [1 1] "with " $c2]] +. + +Grammar vernac vernac : ast := + add_setoid [ "Add" "Setoid" constrarg($a) constrarg($aeq) constrarg($t) "." ] + -> [(AddSetoid $a $aeq $t)] +| new_morphism [ "New" "Morphism" identarg($s) constrarg($m) "." ] -> [(NamedNewMorphism $s $m)] +| new_morphism [ "New" "Morphism" identarg($m) "." ] -> [(NewMorphism $m)] +. + +Section Setoid. + +Variable A : Type. +Variable Aeq : A -> A -> Prop. + +Record Setoid_Theory : Prop := +{ Seq_refl : (x:A) (Aeq x x); + Seq_sym : (x,y:A) (Aeq x y) -> (Aeq y x); + Seq_trans : (x,y,z:A) (Aeq x y) -> (Aeq y z) -> (Aeq x z) +}. + +End Setoid. + +Definition Prop_S : (Setoid_Theory Prop ([x,y:Prop] x<->y)). +Split; Tauto. +Save. + +Add Setoid Prop iff Prop_S. + +Hint prop_set : setoid := Resolve (Seq_refl Prop iff Prop_S). +Hint prop_set : setoid := Resolve (Seq_sym Prop iff Prop_S). +Hint prop_set : setoid := Resolve (Seq_trans Prop iff Prop_S). + +New Morphism or. +Tauto. +Save. + +New Morphism and. +Tauto. +Save. + +New Morphism not. +Tauto. +Save. + +Lemma fleche_ext : (a,b,c,d : Prop) (a<->c) -> (b <-> d) -> (a -> b) -> (c -> d). +Tauto. +Save. |
