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. Section Ensembles_facts. Variable U : Type.U:Typeforall B C : Ensemble U, B = C -> Same_set U B Cintros B C H'; rewrite H'; auto with sets. Qed.U:Typeforall B C : Ensemble U, B = C -> Same_set U B CU:Typeforall x : U, ~ In U (Empty_set U) xred; destruct 1. Qed.U:Typeforall x : U, ~ In U (Empty_set U) xU:Typeforall A : Ensemble U, Included U (Empty_set U) AU:Typeforall A : Ensemble U, Included U (Empty_set U) Aintros x H; elim (Noone_in_empty x); auto with sets. Qed.U:TypeA:Ensemble Uforall x : U, In U (Empty_set U) x -> In U A xU:Typeforall (A : Ensemble U) (x y : U), In U A y -> In U (Add U A x) yunfold Add at 1; auto with sets. Qed.U:Typeforall (A : Ensemble U) (x y : U), In U A y -> In U (Add U A x) yU:Typeforall (A : Ensemble U) (x : U), In U (Add U A x) xunfold Add at 1; auto with sets. Qed.U:Typeforall (A : Ensemble U) (x : U), In U (Add U A x) xU:Typeforall (A : Ensemble U) (x : U), Inhabited U (Add U A x)U:Typeforall (A : Ensemble U) (x : U), Inhabited U (Add U A x)apply Inhabited_intro with (x := x); auto using Add_intro2 with sets. Qed.U:TypeA:Ensemble Ux:UInhabited U (Add U A x)U:Typeforall X : Ensemble U, Inhabited U X -> X <> Empty_set UU:Typeforall X : Ensemble U, Inhabited U X -> X <> Empty_set UU:TypeX:Ensemble UH':Inhabited U Xforall x : U, In U X x -> X <> Empty_set UU:TypeX:Ensemble UH':Inhabited U Xx:UH'0:In U X xH'1:X = Empty_set UFalserewrite H'1; auto using Noone_in_empty with sets. Qed.U:TypeX:Ensemble UH':Inhabited U Xx:UH'0:In U X xH'1:X = Empty_set U~ In U X xU:Typeforall (A : Ensemble U) (x : U), Add U A x <> Empty_set Uintros A x; apply Inhabited_not_empty; apply Inhabited_add. Qed.U:Typeforall (A : Ensemble U) (x : U), Add U A x <> Empty_set UU:Typeforall (A : Ensemble U) (x : U), Empty_set U <> Add U A xintros; red; intro H; generalize (Add_not_Empty A x); auto with sets. Qed.U:Typeforall (A : Ensemble U) (x : U), Empty_set U <> Add U A xU:Typeforall x y : U, In U (Singleton U x) y -> x = yintros x y H'; elim H'; trivial with sets. Qed.U:Typeforall x y : U, In U (Singleton U x) y -> x = yU:Typeforall x y : U, x = y -> In U (Singleton U x) yintros x y H'; rewrite H'; trivial with sets. Qed.U:Typeforall x y : U, x = y -> In U (Singleton U x) yU:Typeforall (B C : Ensemble U) (x : U), In U (Union U B C) x -> In U B x \/ In U C xintros B C x H'; elim H'; auto with sets. Qed.U:Typeforall (B C : Ensemble U) (x : U), In U (Union U B C) x -> In U B x \/ In U C xU:Typeforall (A : Ensemble U) (x y : U), In U (Add U A x) y -> In U A y \/ x = yU:Typeforall (A : Ensemble U) (x y : U), In U (Add U A x) y -> In U A y \/ x = yU:TypeA:Ensemble Ux, x0:UH:In U A x0In U A x0 \/ x = x0U:TypeA:Ensemble Ux, x0:UH:In U (Singleton U x) x0In U A x0 \/ x = x0left; assumption.U:TypeA:Ensemble Ux, x0:UH:In U A x0In U A x0 \/ x = x0right; apply Singleton_inv; assumption. Qed.U:TypeA:Ensemble Ux, x0:UH:In U (Singleton U x) x0In U A x0 \/ x = x0U:Typeforall (B C : Ensemble U) (x : U), In U (Intersection U B C) x -> In U B x /\ In U C xintros B C x H'; elim H'; auto with sets. Qed.U:Typeforall (B C : Ensemble U) (x : U), In U (Intersection U B C) x -> In U B x /\ In U C xU:Typeforall x y z : U, In U (Couple U x y) z -> z = x \/ z = yintros x y z H'; elim H'; auto with sets. Qed.U:Typeforall x y z : U, In U (Couple U x y) z -> z = x \/ z = yU:Typeforall (A B : Ensemble U) (x : U), In U A x -> ~ In U B x -> In U (Setminus U A B) xunfold Setminus at 1; red; auto with sets. Qed.U:Typeforall (A B : Ensemble U) (x : U), In U A x -> ~ In U B x -> In U (Setminus U A B) xU:Typeforall X Y : Ensemble U, Included U X Y /\ X <> Y -> Strict_Included U X Yauto with sets. Qed.U:Typeforall X Y : Ensemble U, Included U X Y /\ X <> Y -> Strict_Included U X YU:Typeforall X : Ensemble U, ~ Strict_Included U X XU:Typeforall X : Ensemble U, ~ Strict_Included U X Xintros H'0 H'1; elim H'1; auto with sets. Qed. End Ensembles_facts. Hint Resolve Singleton_inv Singleton_intro Add_intro1 Add_intro2 Intersection_inv Couple_inv Setminus_intro Strict_Included_intro Strict_Included_strict Noone_in_empty Inhabited_not_empty Add_not_Empty not_Empty_Add Inhabited_add Included_Empty: sets.U:TypeX:Ensemble UH':Strict_Included U X XIncluded U X X -> X <> X -> False