1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
8
(****************************************************************************)
10
(* Naive Set Theory in Coq *)
13
(* Rocquencourt Sophia-Antipolis *)
22
(* Acknowledgments: This work was started in July 1993 by F. Prost. Thanks *)
23
(* to the Newton Institute for providing an exceptional work environment *)
24
(* in Summer 1995. Several developments by E. Ledinot were an inspiration. *)
25
(****************************************************************************)
27
(*i $Id: Relations_1_facts.v 8642 2006-03-17 10:09:02Z notin $ i*)
29
Require Export Relations_1.
31
Definition Complement (U:Type) (R:Relation U) : Relation U :=
34
Theorem Rsym_imp_notRsym :
35
forall (U:Type) (R:Relation U),
36
Symmetric U R -> Symmetric U (Complement U R).
38
unfold Symmetric, Complement in |- *.
39
intros U R H' x y H'0; red in |- *; intro H'1; apply H'0; auto with sets.
42
Theorem Equiv_from_preorder :
43
forall (U:Type) (R:Relation U),
44
Preorder U R -> Equivalence U (fun x y:U => R x y /\ R y x).
46
intros U R H'; elim H'; intros H'0 H'1.
47
apply Definition_of_equivalence.
48
red in H'0; auto 10 with sets.
49
2: red in |- *; intros x y h; elim h; intros H'3 H'4; auto 10 with sets.
50
red in H'1; red in |- *; auto 10 with sets.
51
intros x y z h; elim h; intros H'3 H'4; clear h.
52
intro h; elim h; intros H'5 H'6; clear h.
53
split; apply H'1 with y; auto 10 with sets.
55
Hint Resolve Equiv_from_preorder.
57
Theorem Equiv_from_order :
58
forall (U:Type) (R:Relation U),
59
Order U R -> Equivalence U (fun x y:U => R x y /\ R y x).
61
intros U R H'; elim H'; auto 10 with sets.
63
Hint Resolve Equiv_from_order.
65
Theorem contains_is_preorder :
66
forall U:Type, Preorder (Relation U) (contains U).
70
Hint Resolve contains_is_preorder.
72
Theorem same_relation_is_equivalence :
73
forall U:Type, Equivalence (Relation U) (same_relation U).
75
unfold same_relation at 1 in |- *; auto 10 with sets.
77
Hint Resolve same_relation_is_equivalence.
79
Theorem cong_reflexive_same_relation :
80
forall (U:Type) (R R':Relation U),
81
same_relation U R R' -> Reflexive U R -> Reflexive U R'.
83
unfold same_relation in |- *; intuition.
86
Theorem cong_symmetric_same_relation :
87
forall (U:Type) (R R':Relation U),
88
same_relation U R R' -> Symmetric U R -> Symmetric U R'.
90
compute in |- *; intros; elim H; intros; clear H;
91
apply (H3 y x (H0 x y (H2 x y H1))).
95
Theorem cong_antisymmetric_same_relation :
96
forall (U:Type) (R R':Relation U),
97
same_relation U R R' -> Antisymmetric U R -> Antisymmetric U R'.
99
compute in |- *; intros; elim H; intros; clear H;
100
apply (H0 x y (H3 x y H1) (H3 y x H2)).
104
Theorem cong_transitive_same_relation :
105
forall (U:Type) (R R':Relation U),
106
same_relation U R R' -> Transitive U R -> Transitive U R'.
108
intros U R R' H' H'0; red in |- *.
110
intros H'1 H'2 x y z H'3 H'4; apply H'2.
111
apply H'0 with y; auto with sets.
b'\\ No newline at end of file'