aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Lists/SetoidList.v
diff options
context:
space:
mode:
authorGravatar notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-03-15 17:45:57 +0000
committerGravatar notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-03-15 17:45:57 +0000
commit84592f2d128fcb322a59b40bb4ce6dc6e388943f (patch)
treebdd46f7bf82300fa2a343a0adae1a8539430d136 /theories/Lists/SetoidList.v
parentbb3aa221cec09dc997b0f7dac7bc4e1a1b51c744 (diff)
Ajout de fonctions sur les listes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8632 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Lists/SetoidList.v')
-rw-r--r--theories/Lists/SetoidList.v12
1 files changed, 12 insertions, 0 deletions
diff --git a/theories/Lists/SetoidList.v b/theories/Lists/SetoidList.v
index 9d3581a5c..f43aeeddd 100644
--- a/theories/Lists/SetoidList.v
+++ b/theories/Lists/SetoidList.v
@@ -229,6 +229,18 @@ Proof.
destruct l2; auto.
Qed.
+Section Remove.
+
+Hypothesis eqA_dec : forall x y : A, {eqA x y}+{~(eqA x y)}.
+
+Fixpoint removeA : (x : A) (l : list A){struct l} : list A :=
+ match l with
+ | nil => nil
+ | y::tl => if (eqA_dec x y) then removeA tl else y::(removeA tl)
+ end.
+
+End Remove.
+
End Type_with_equality.
Hint Constructors InA.