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 Constructive_sets. Require Export Classical. Section Ensembles_classical. Variable U : Type.U:Typeforall A : Ensemble U, ~ Included U A (Empty_set U) -> Inhabited U AU:Typeforall A : Ensemble U, ~ Included U A (Empty_set U) -> Inhabited U AU:TypeA:Ensemble UNI:~ Included U A (Empty_set U)Inhabited U AU:TypeA:Ensemble UNI:~ Included U A (Empty_set U)forall x : U, ~ ~ In U A x -> Inhabited U AU:TypeA:Ensemble UNI:~ Included U A (Empty_set U)~ (forall n : U, ~ In U A n)U:TypeA:Ensemble UNI:~ Included U A (Empty_set U)x:UH:~ ~ In U A xIn U A xU:TypeA:Ensemble UNI:~ Included U A (Empty_set U)~ (forall n : U, ~ In U A n)U:TypeA:Ensemble UNI:~ Included U A (Empty_set U)~ (forall n : U, ~ In U A n)U:TypeA:Ensemble UNI:~ Included U A (Empty_set U)H:forall n : U, ~ In U A nFalseintros x H'; elim (H x); trivial with sets. Qed.U:TypeA:Ensemble UNI:~ Included U A (Empty_set U)H:forall n : U, ~ In U A nforall x : U, In U A x -> In U (Empty_set U) xU:Typeforall A : Ensemble U, A <> Empty_set U -> Inhabited U AU:Typeforall A : Ensemble U, A <> Empty_set U -> Inhabited U Ared; auto with sets. Qed.U:TypeA:Ensemble UH:A <> Empty_set U~ Included U A (Empty_set U)U:Typeforall X Y : Ensemble U, Included U X Y -> ~ Included U Y X -> Inhabited U (Setminus U Y X)U:Typeforall X Y : Ensemble U, Included U X Y -> ~ Included U Y X -> Inhabited U (Setminus U Y X)U:TypeX, Y:Ensemble UI:Included U X YNI:~ Included U Y XInhabited U (Setminus U Y X)U:TypeX, Y:Ensemble UI:Included U X YNI:~ Included U Y Xforall x : U, ~ (In U Y x -> In U X x) -> Inhabited U (Setminus U Y X)U:TypeX, Y:Ensemble UI:Included U X YNI:~ Included U Y Xx:UYX:~ (In U Y x -> In U X x)Inhabited U (Setminus U Y X)U:TypeX, Y:Ensemble UI:Included U X YNI:~ Included U Y Xx:UYX:~ (In U Y x -> In U X x)In U (Setminus U Y X) xU:TypeX, Y:Ensemble UI:Included U X YNI:~ Included U Y Xx:UYX:~ (In U Y x -> In U X x)In U Y xU:TypeX, Y:Ensemble UI:Included U X YNI:~ Included U Y Xx:UYX:~ (In U Y x -> In U X x)~ In U X xauto with sets. Qed.U:TypeX, Y:Ensemble UI:Included U X YNI:~ Included U Y Xx:UYX:~ (In U Y x -> In U X x)~ In U X xU:Typeforall X Y : Ensemble U, Included U X Y -> X <> Y -> Inhabited U (Setminus U Y X)auto 7 using Inhabited_Setminus with sets. Qed.U:Typeforall X Y : Ensemble U, Included U X Y -> X <> Y -> Inhabited U (Setminus U Y X)U:Typeforall (A : Ensemble U) (x y : U), In U A y -> x <> y -> In U (Subtract U A x) yunfold Subtract at 1; auto with sets. Qed. Hint Resolve Subtract_intro : sets.U:Typeforall (A : Ensemble U) (x y : U), In U A y -> x <> y -> In U (Subtract U A x) yU:Typeforall (A : Ensemble U) (x y : U), In U (Subtract U A x) y -> In U A y /\ x <> yintros A x y H'; elim H'; auto with sets. Qed.U:Typeforall (A : Ensemble U) (x y : U), In U (Subtract U A x) y -> In U A y /\ x <> yU:Typeforall X Y : Ensemble U, Included U X Y -> Strict_Included U X Y \/ X = YU:Typeforall X Y : Ensemble U, Included U X Y -> Strict_Included U X Y \/ X = Yelim (classic (X = Y)); auto with sets. Qed.U:TypeX, Y:Ensemble UH':Included U X YStrict_Included U X Y \/ X = YU:Typeforall X Y : Ensemble U, Strict_Included U X Y -> Included U X Y /\ Inhabited U (Setminus U Y X)U:Typeforall X Y : Ensemble U, Strict_Included U X Y -> Included U X Y /\ Inhabited U (Setminus U Y X)U:TypeX, Y:Ensemble UH':Included U X Y /\ X <> YIncluded U X Y /\ Inhabited U (Setminus U Y X)U:TypeX, Y:Ensemble UH':Included U X Y /\ X <> YInhabited U (Setminus U Y X)apply Strict_super_set_contains_new_element; auto with sets. Qed.U:TypeX, Y:Ensemble UH'0:Included U X YH'1:X <> YInhabited U (Setminus U Y X)U:Typeforall X : Ensemble U, ~ Strict_Included U X (Empty_set U)U:Typeforall X : Ensemble U, ~ Strict_Included U X (Empty_set U)U:TypeX:Ensemble UH':Strict_Included U X (Empty_set U)FalseU:TypeX:Ensemble UH':Strict_Included U X (Empty_set U)Included U X (Empty_set U) /\ Inhabited U (Setminus U (Empty_set U) X) -> FalseU:TypeX:Ensemble UH':Strict_Included U X (Empty_set U)H'1:Included U X (Empty_set U)H'2:Inhabited U (Setminus U (Empty_set U) X)forall x : U, In U (Setminus U (Empty_set U) X) x -> Falseintro H'3; elim H'3. Qed.U:TypeX:Ensemble UH':Strict_Included U X (Empty_set U)H'1:Included U X (Empty_set U)H'2:Inhabited U (Setminus U (Empty_set U) X)x:UH'0:In U (Setminus U (Empty_set U) X) xIn U (Empty_set U) x -> ~ In U X x -> FalseU:Typeforall A : Ensemble U, Complement U (Complement U A) = AU:Typeforall A : Ensemble U, Complement U (Complement U A) = AU:TypeA:Ensemble USame_set U (fun x : U => ~ In U (fun x0 : U => ~ In U A x0) x) Ared; intros; apply NNPP; auto with sets. Qed. End Ensembles_classical. Hint Resolve Strict_super_set_contains_new_element Subtract_intro not_SIncl_empty: sets.U:TypeA:Ensemble UIncluded U (fun x : U => ~ In U (fun x0 : U => ~ In U A x0) x) A