Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) (* v * INRIA, CNRS and contributors - Copyright 1999-2018 *) (* <O___,, * (see CREDITS file for the list of authors) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************) (****************************************************************************) (* *) (* Naive Set Theory in Coq *) (* *) (* INRIA INRIA *) (* Rocquencourt Sophia-Antipolis *) (* *) (* Coq V6.1 *) (* *) (* Gilles Kahn *) (* Gerard Huet *) (* *) (* *) (* *) (* Acknowledgments: This work was started in July 1993 by F. Prost. Thanks *) (* to the Newton Institute for providing an exceptional work environment *) (* in Summer 1995. Several developments by E. Ledinot were an inspiration. *) (****************************************************************************) Require Export Ensembles. Require Export Relations_1. Section Partial_orders. Variable U : Type. Definition Carrier := Ensemble U. Definition Rel := Relation U. Record PO : Type := Definition_of_PO { Carrier_of : Ensemble U; Rel_of : Relation U; PO_cond1 : Inhabited U Carrier_of; PO_cond2 : Order U Rel_of }. Variable p : PO. Definition Strict_Rel_of : Rel := fun x y:U => Rel_of p x y /\ x <> y. Inductive covers (y x:U) : Prop := Definition_of_covers : Strict_Rel_of x y -> ~ (exists z : _, Strict_Rel_of x z /\ Strict_Rel_of z y) -> covers y x. End Partial_orders. Hint Unfold Carrier_of Rel_of Strict_Rel_of: sets. Hint Resolve Definition_of_covers: sets. Section Partial_order_facts. Variable U : Type. Variable D : PO U.U:TypeD:PO Uforall x y z : U, Strict_Rel_of U D x y -> Rel_of U D y z -> Strict_Rel_of U D x zU:TypeD:PO Uforall x y z : U, Strict_Rel_of U D x y -> Rel_of U D y z -> Strict_Rel_of U D x zU:TypeD:PO Uforall x y z : U, Rel_of U D x y /\ x <> y -> Rel_of U D y z -> Strict_Rel_of U D x zU:TypeD:PO Uforall x y z : U, Rel_of U D x y /\ x <> y -> Rel_of U D y z -> Rel_of U D x z /\ x <> zU:TypeD:PO Uforall (Carrier_of0 : Ensemble U) (Rel_of0 : Relation U), Inhabited U Carrier_of0 -> Order U Rel_of0 -> forall x y z : U, Rel_of0 x y /\ x <> y -> Rel_of0 y z -> Rel_of0 x z /\ x <> zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RReflexive U R -> Transitive U R -> Antisymmetric U R -> forall x y z : U, R x y /\ x <> y -> R y z -> R x z /\ x <> zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x y /\ x <> yH'5:R y zR x zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x y /\ x <> yH'5:R y zx <> zapply H'2 with (y := y); tauto.U:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x y /\ x <> yH'5:R y zR x zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x y /\ x <> yH'5:R y zx <> zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x y /\ x <> yH'5:R y zH'6:x = zFalseU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'5:R y zH'6:x = zH'7:R x yH'8:x <> yx = yrewrite H'6; tauto. Qed.U:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'5:R y zH'6:x = zH'7:R x yH'8:x <> yR y xU:TypeD:PO Uforall x y z : U, Rel_of U D x y -> Strict_Rel_of U D y z -> Strict_Rel_of U D x zU:TypeD:PO Uforall x y z : U, Rel_of U D x y -> Strict_Rel_of U D y z -> Strict_Rel_of U D x zU:TypeD:PO Uforall x y z : U, Rel_of U D x y -> Rel_of U D y z /\ y <> z -> Strict_Rel_of U D x zU:TypeD:PO Uforall x y z : U, Rel_of U D x y -> Rel_of U D y z /\ y <> z -> Rel_of U D x z /\ x <> zU:TypeD:PO Uforall (Carrier_of0 : Ensemble U) (Rel_of0 : Relation U), Inhabited U Carrier_of0 -> Order U Rel_of0 -> forall x y z : U, Rel_of0 x y -> Rel_of0 y z /\ y <> z -> Rel_of0 x z /\ x <> zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RReflexive U R -> Transitive U R -> Antisymmetric U R -> forall x y z : U, R x y -> R y z /\ y <> z -> R x z /\ x <> zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x yH'5:R y z /\ y <> zR x zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x yH'5:R y z /\ y <> zx <> zapply H'2 with (y := y); tauto.U:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x yH'5:R y z /\ y <> zR x zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x yH'5:R y z /\ y <> zx <> zU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x yH'5:R y z /\ y <> zH'6:x = zFalseU:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x yH'6:x = zH'7:R y zH'8:y <> zy = zrewrite <- H'6; auto. Qed.U:TypeD:PO UC:Ensemble UR:Relation UH':Inhabited U CH'0:Order U RH'1:Reflexive U RH'2:Transitive U RH'3:Antisymmetric U Rx, y, z:UH'4:R x yH'6:x = zH'7:R y zH'8:y <> zR z yU:TypeD:PO UTransitive U (Strict_Rel_of U D)U:TypeD:PO Uforall x y z : U, Strict_Rel_of U D x y -> Strict_Rel_of U D y z -> Strict_Rel_of U D x zapply Strict_Rel_Transitive_with_Rel with (y := y); [ intuition | unfold Strict_Rel_of in H', H'0; intuition ]. Qed. End Partial_order_facts.U:TypeD:PO Ux, y, z:UH':Strict_Rel_of U D x yH'0:Strict_Rel_of U D y zStrict_Rel_of U D x z