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. Require Export Relations_1_facts. Require Export Partial_Order. Require Export Cpo. Section The_power_set_partial_order. Variable U : Type. Inductive Power_set (A:Ensemble U) : Ensemble (Ensemble U) := Definition_of_Power_set : forall X:Ensemble U, Included U X A -> In (Ensemble U) (Power_set A) X. Hint Resolve Definition_of_Power_set : core.U:Typeforall X : Ensemble U, Included U (Empty_set U) Xintros x H'; elim H'. Qed. Hint Resolve Empty_set_minimal : core.U:TypeX:Ensemble Uforall x : U, In U (Empty_set U) x -> In U X xU:Typeforall X : Ensemble U, Inhabited (Ensemble U) (Power_set X)apply Inhabited_intro with (Empty_set U); auto with sets. Qed. Hint Resolve Power_set_Inhabited : core.U:TypeX:Ensemble UInhabited (Ensemble U) (Power_set X)auto 6 with sets. Qed. Hint Resolve Inclusion_is_an_order : core.U:TypeOrder (Ensemble U) (Included U)elim Inclusion_is_an_order; auto with sets. Qed. Hint Resolve Inclusion_is_transitive : core.U:TypeTransitive (Ensemble U) (Included U)U:TypeEnsemble U -> PO (Ensemble U)apply Definition_of_PO with (Power_set A) (Included U); auto with sets. Defined. Hint Unfold Power_set_PO : core.U:TypeA:Ensemble UPO (Ensemble U)auto with sets. Qed. Hint Resolve Strict_Rel_Transitive Strict_Rel_is_Strict_Included : core.U:Typesame_relation (Ensemble U) (Strict_Included U) (Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)))U:Typeforall x y z : Ensemble U, Strict_Included U x y -> Included U y z -> Strict_Included U x zU:Typex, y, z:Ensemble UH':Strict_Included U x yH'0:Included U y zStrict_Included U x zU:Typex, y, z:Ensemble UH':Strict_Included U x yH'0:Included U y zcontains (Ensemble U) (Strict_Included U) (Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U))) -> contains (Ensemble U) (Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U))) (Strict_Included U) -> Strict_Included U x zU:Typex, y, z:Ensemble UH':Strict_Included U x yH'0:Included U y z(forall x0 y0 : Ensemble U, Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0 -> Strict_Included U x0 y0) -> (forall x0 y0 : Ensemble U, Strict_Included U x0 y0 -> Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0) -> Strict_Included U x zU:Typex, y, z:Ensemble UH':Strict_Included U x yH'0:Included U y zH'1:forall x0 y0 : Ensemble U, Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0 -> Strict_Included U x0 y0H'2:forall x0 y0 : Ensemble U, Strict_Included U x0 y0 -> Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0Strict_Included U x zapply Strict_Rel_Transitive_with_Rel with (y := y); auto with sets. Qed.U:Typex, y, z:Ensemble UH':Strict_Included U x yH'0:Included U y zH'1:forall x0 y0 : Ensemble U, Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0 -> Strict_Included U x0 y0H'2:forall x0 y0 : Ensemble U, Strict_Included U x0 y0 -> Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x zU:Typeforall x y z : Ensemble U, Included U x y -> Strict_Included U y z -> Strict_Included U x zU:Typex, y, z:Ensemble UH':Included U x yH'0:Strict_Included U y zStrict_Included U x zU:Typex, y, z:Ensemble UH':Included U x yH'0:Strict_Included U y zcontains (Ensemble U) (Strict_Included U) (Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U))) -> contains (Ensemble U) (Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U))) (Strict_Included U) -> Strict_Included U x zU:Typex, y, z:Ensemble UH':Included U x yH'0:Strict_Included U y z(forall x0 y0 : Ensemble U, Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0 -> Strict_Included U x0 y0) -> (forall x0 y0 : Ensemble U, Strict_Included U x0 y0 -> Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0) -> Strict_Included U x zU:Typex, y, z:Ensemble UH':Included U x yH'0:Strict_Included U y zH'1:forall x0 y0 : Ensemble U, Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0 -> Strict_Included U x0 y0H'2:forall x0 y0 : Ensemble U, Strict_Included U x0 y0 -> Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0Strict_Included U x zapply Strict_Rel_Transitive_with_Rel_left with (y := y); auto with sets. Qed.U:Typex, y, z:Ensemble UH':Included U x yH'0:Strict_Included U y zH'1:forall x0 y0 : Ensemble U, Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0 -> Strict_Included U x0 y0H'2:forall x0 y0 : Ensemble U, Strict_Included U x0 y0 -> Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x0 y0Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U)) x zapply cong_transitive_same_relation with (R := Strict_Rel_of (Ensemble U) (Power_set_PO (Full_set U))); auto with sets. Qed.U:TypeTransitive (Ensemble U) (Strict_Included U)intro A; apply Bottom_definition; simpl; auto with sets. Qed. Hint Resolve Empty_set_is_Bottom : core.U:Typeforall A : Ensemble U, Bottom (Ensemble U) (Power_set_PO A) (Empty_set U)U:Typeforall a b X : Ensemble U, Included U a X -> Included U b X -> Included U (Union U a b) Xintros x H'1; elim H'1; auto with sets. Qed. Hint Resolve Union_minimal : core.U:Typea, b, X:Ensemble UH':Included U a XH'0:Included U b Xforall x : U, In U (Union U a b) x -> In U X xauto with sets. Qed.U:Typeforall a b X : Ensemble U, Included U X a -> Included U X b -> Included U X (Intersection U a b)auto with sets. Qed.U:Typeforall a b : Ensemble U, Included U a (Union U a b)auto with sets. Qed.U:Typeforall a b : Ensemble U, Included U b (Union U a b)U:Typeforall a b : Ensemble U, Included U (Intersection U a b) aintros x H'; elim H'; auto with sets. Qed.U:Typea, b:Ensemble Uforall x : U, In U (Intersection U a b) x -> In U a xU:Typeforall a b : Ensemble U, Included U (Intersection U a b) bintros x H'; elim H'; auto with sets. Qed. Hint Resolve Union_increases_l Union_increases_r Intersection_decreases_l Intersection_decreases_r : core.U:Typea, b:Ensemble Uforall x : U, In U (Intersection U a b) x -> In U b xU:Typeforall A a b : Ensemble U, Included U a A -> Included U b A -> Lub (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) (Union U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b ALub (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) (Union U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b AUpper_Bound (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) (Union U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b Aforall y : Ensemble U, Upper_Bound (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) y -> Included U (Union U a b) yU:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b AUpper_Bound (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) (Union U a b)intros y H'1; elim H'1; auto with sets.U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b Aforall y : Ensemble U, In (Ensemble U) (Couple (Ensemble U) a b) y -> Included U y (Union U a b)intros y H'1; elim H'1; simpl; auto with sets. Qed.U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b Aforall y : Ensemble U, Upper_Bound (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) y -> Included U (Union U a b) yU:Typeforall A a b : Ensemble U, Included U a A -> Included U b A -> Glb (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) (Intersection U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b AGlb (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) (Intersection U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b ALower_Bound (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) (Intersection U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b Aforall y : Ensemble U, Lower_Bound (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) y -> Included U y (Intersection U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b ALower_Bound (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) (Intersection U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b AIn (Ensemble U) (Power_set A) (Intersection U a b)U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b Aforall y : Ensemble U, In (Ensemble U) (Couple (Ensemble U) a b) y -> Included U (Intersection U a b) yU:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b AIn (Ensemble U) (Power_set A) (Intersection U a b)generalize Inclusion_is_transitive; intro IT; red in IT; apply IT with a; auto with sets.U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b AIncluded U (Intersection U a b) Aintros y H'1; elim H'1; auto with sets.U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b Aforall y : Ensemble U, In (Ensemble U) (Couple (Ensemble U) a b) y -> Included U (Intersection U a b) yintros y H'1; elim H'1; simpl; auto with sets. Qed. End The_power_set_partial_order. Hint Resolve Empty_set_minimal: sets. Hint Resolve Power_set_Inhabited: sets. Hint Resolve Inclusion_is_an_order: sets. Hint Resolve Inclusion_is_transitive: sets. Hint Resolve Union_minimal: sets. Hint Resolve Union_increases_l: sets. Hint Resolve Union_increases_r: sets. Hint Resolve Intersection_decreases_l: sets. Hint Resolve Intersection_decreases_r: sets. Hint Resolve Empty_set_is_Bottom: sets. Hint Resolve Strict_inclusion_is_transitive: sets.U:TypeA, a, b:Ensemble UH':Included U a AH'0:Included U b Aforall y : Ensemble U, Lower_Bound (Ensemble U) (Power_set_PO A) (Couple (Ensemble U) a b) y -> Included U y (Intersection U a b)