summaryrefslogtreecommitdiff
path: root/theories/Wellfounded/Transitive_Closure.v
diff options
context:
space:
mode:
Diffstat (limited to 'theories/Wellfounded/Transitive_Closure.v')
-rw-r--r--theories/Wellfounded/Transitive_Closure.v47
1 files changed, 47 insertions, 0 deletions
diff --git a/theories/Wellfounded/Transitive_Closure.v b/theories/Wellfounded/Transitive_Closure.v
new file mode 100644
index 00000000..2e9d497b
--- /dev/null
+++ b/theories/Wellfounded/Transitive_Closure.v
@@ -0,0 +1,47 @@
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(************************************************************************)
+
+(*i $Id: Transitive_Closure.v,v 1.7.2.1 2004/07/16 19:31:19 herbelin Exp $ i*)
+
+(** Author: Bruno Barras *)
+
+Require Import Relation_Definitions.
+Require Import Relation_Operators.
+
+Section Wf_Transitive_Closure.
+ Variable A : Set.
+ Variable R : relation A.
+
+ Notation trans_clos := (clos_trans A R).
+
+ Lemma incl_clos_trans : inclusion A R trans_clos.
+ red in |- *; auto with sets.
+ Qed.
+
+ Lemma Acc_clos_trans : forall x:A, Acc R x -> Acc trans_clos x.
+ induction 1 as [x0 _ H1].
+ apply Acc_intro.
+ intros y H2.
+ induction H2; auto with sets.
+ apply Acc_inv with y; auto with sets.
+ Qed.
+
+ Hint Resolve Acc_clos_trans.
+
+ Lemma Acc_inv_trans : forall x y:A, trans_clos y x -> Acc R x -> Acc R y.
+ Proof.
+ induction 1 as [| x y]; auto with sets.
+ intro; apply Acc_inv with y; assumption.
+ Qed.
+
+ Theorem wf_clos_trans : well_founded R -> well_founded trans_clos.
+ Proof.
+ unfold well_founded in |- *; auto with sets.
+ Qed.
+
+End Wf_Transitive_Closure. \ No newline at end of file