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 Relations_1. Require Export Relations_1_facts. Require Export Partial_Order. Require Export Cpo. Require Export Powerset. Section Sets_as_an_algebra. Variable U : Type.U:Typeforall X : Ensemble U, Union U (Empty_set U) X = Xauto 6 with sets. Qed.U:Typeforall X : Ensemble U, Union U (Empty_set U) X = XU:Typeforall X : Ensemble U, Union U X (Empty_set U) = Xauto 6 with sets. Qed.U:Typeforall X : Ensemble U, Union U X (Empty_set U) = XU:Typeforall x : U, Add U (Empty_set U) x = Singleton U xunfold Add at 1; auto using Empty_set_zero with sets. Qed.U:Typeforall x : U, Add U (Empty_set U) x = Singleton U xU:Typeforall X : Ensemble U, Included U X (Empty_set U) -> X = Empty_set Uauto with sets. Qed.U:Typeforall X : Ensemble U, Included U X (Empty_set U) -> X = Empty_set UU:Typeforall A B : Ensemble U, Union U A B = Union U B Aauto with sets. Qed.U:Typeforall A B : Ensemble U, Union U A B = Union U B AU:Typeforall A B C : Ensemble U, Union U (Union U A B) C = Union U A (Union U B C)auto 9 with sets. Qed.U:Typeforall A B C : Ensemble U, Union U (Union U A B) C = Union U A (Union U B C)U:Typeforall A : Ensemble U, Union U A A = Aauto 7 with sets. Qed.U:Typeforall A : Ensemble U, Union U A A = AU:Typeforall A B : Ensemble U, Included U B A -> Union U A B = Aauto 7 with sets. Qed.U:Typeforall A B : Ensemble U, Included U B A -> Union U A B = AU:Typeforall x y : U, Union U (Singleton U x) (Singleton U y) = Couple U x yU:Typeforall x y : U, Union U (Singleton U x) (Singleton U y) = Couple U x yU:Typex, y:Uforall x0 : U, In U (Union U (Singleton U x) (Singleton U y)) x0 -> In U (Couple U x y) x0U:Typex, y:Uforall x0 : U, In U (Couple U x y) x0 -> In U (Union U (Singleton U x) (Singleton U y)) x0intros x0 H'; elim H'; (intros x1 H'0; elim H'0; auto with sets).U:Typex, y:Uforall x0 : U, In U (Union U (Singleton U x) (Singleton U y)) x0 -> In U (Couple U x y) x0intros x0 H'; elim H'; auto with sets. Qed.U:Typex, y:Uforall x0 : U, In U (Couple U x y) x0 -> In U (Union U (Singleton U x) (Singleton U y)) x0U:Typeforall x y z : U, Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z) = Triple U x y zU:Typeforall x y z : U, Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z) = Triple U x y zU:Typex, y, z:Uforall x0 : U, In U (Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z)) x0 -> In U (Triple U x y z) x0U:Typex, y, z:Uforall x0 : U, In U (Triple U x y z) x0 -> In U (Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z)) x0U:Typex, y, z:Uforall x0 : U, In U (Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z)) x0 -> In U (Triple U x y z) x0U:Typex, y, z, x0:UH':In U (Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z)) x0forall x1 : U, In U (Union U (Singleton U x) (Singleton U y)) x1 -> In U (Triple U x y z) x1U:Typex, y, z, x0:UH':In U (Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z)) x0forall x1 : U, In U (Singleton U z) x1 -> In U (Triple U x y z) x1intros x1 H'0; elim H'0; (intros x2 H'1; elim H'1; auto with sets).U:Typex, y, z, x0:UH':In U (Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z)) x0forall x1 : U, In U (Union U (Singleton U x) (Singleton U y)) x1 -> In U (Triple U x y z) x1intros x1 H'0; elim H'0; auto with sets.U:Typex, y, z, x0:UH':In U (Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z)) x0forall x1 : U, In U (Singleton U z) x1 -> In U (Triple U x y z) x1intros x0 H'; elim H'; auto with sets. Qed.U:Typex, y, z:Uforall x0 : U, In U (Triple U x y z) x0 -> In U (Union U (Union U (Singleton U x) (Singleton U y)) (Singleton U z)) x0U:Typeforall x y : U, Couple U x y = Triple U x x yU:Typeforall x y : U, Couple U x y = Triple U x x yU:Typex, y:UCouple U x y = Triple U x x yU:Typex, y:UUnion U (Singleton U x) (Singleton U y) = Triple U x x yapply Triple_as_union. Qed.U:Typex, y:UUnion U (Union U (Singleton U x) (Singleton U x)) (Singleton U y) = Triple U x x yU:Typeforall x y z : U, Triple U x y z = Union U (Couple U x y) (Singleton U z)U:Typeforall x y z : U, Triple U x y z = Union U (Couple U x y) (Singleton U z)U:Typex, y, z:UTriple U x y z = Union U (Couple U x y) (Singleton U z)rewrite <- (Couple_as_union x y); auto with sets. Qed.U:Typex, y, z:UUnion U (Union U (Singleton U x) (Singleton U y)) (Singleton U z) = Union U (Couple U x y) (Singleton U z)U:Typeforall A B : Ensemble U, Intersection U A B = Intersection U B AU:Typeforall A B : Ensemble U, Intersection U A B = Intersection U B AU:TypeA, B:Ensemble UIntersection U A B = Intersection U B Asplit; red; intros x H'; elim H'; auto with sets. Qed.U:TypeA, B:Ensemble USame_set U (Intersection U A B) (Intersection U B A)U:Typeforall A B C : Ensemble U, Intersection U A (Union U B C) = Union U (Intersection U A B) (Intersection U A C)U:Typeforall A B C : Ensemble U, Intersection U A (Union U B C) = Union U (Intersection U A B) (Intersection U A C)U:TypeA, B, C:Ensemble UIntersection U A (Union U B C) = Union U (Intersection U A B) (Intersection U A C)U:TypeA, B, C:Ensemble USame_set U (Intersection U A (Union U B C)) (Union U (Intersection U A B) (Intersection U A C))U:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U A (Union U B C)) xIn U (Union U (Intersection U A B) (Intersection U A C)) xU:TypeA, B, C:Ensemble Ux:UH':In U (Union U (Intersection U A B) (Intersection U A C)) xIn U (Intersection U A (Union U B C)) xU:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U A (Union U B C)) xIn U (Union U (Intersection U A B) (Intersection U A C)) xU:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U A (Union U B C)) xforall x0 : U, In U A x0 -> In U (Union U B C) x0 -> In U (Union U (Intersection U A B) (Intersection U A C)) x0elim H'1; auto with sets.U:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U A (Union U B C)) xx0:UH'0:In U A x0H'1:In U (Union U B C) x0In U A x0 -> In U (Union U (Intersection U A B) (Intersection U A C)) x0elim H'; intros x0 H'0; elim H'0; auto with sets. Qed.U:TypeA, B, C:Ensemble Ux:UH':In U (Union U (Intersection U A B) (Intersection U A C)) xIn U (Intersection U A (Union U B C)) xU:Typeforall A B C : Ensemble U, Intersection U (Union U A B) C = Union U (Intersection U A C) (Intersection U B C)U:Typeforall A B C : Ensemble U, Intersection U (Union U A B) C = Union U (Intersection U A C) (Intersection U B C)U:TypeA, B, C:Ensemble UIntersection U (Union U A B) C = Union U (Intersection U A C) (Intersection U B C)U:TypeA, B, C:Ensemble UIntersection U C (Union U A B) = Union U (Intersection U A C) (Intersection U B C)f_equal; apply Intersection_commutative. Qed.U:TypeA, B, C:Ensemble UUnion U (Intersection U C A) (Intersection U C B) = Union U (Intersection U A C) (Intersection U B C)U:Typeforall A B C : Ensemble U, Union U A (Intersection U B C) = Intersection U (Union U A B) (Union U A C)U:Typeforall A B C : Ensemble U, Union U A (Intersection U B C) = Intersection U (Union U A B) (Union U A C)U:TypeA, B, C:Ensemble UUnion U A (Intersection U B C) = Intersection U (Union U A B) (Union U A C)U:TypeA, B, C:Ensemble USame_set U (Union U A (Intersection U B C)) (Intersection U (Union U A B) (Union U A C))U:TypeA, B, C:Ensemble Ux:UH':In U (Union U A (Intersection U B C)) xIn U (Intersection U (Union U A B) (Union U A C)) xU:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U (Union U A B) (Union U A C)) xIn U (Union U A (Intersection U B C)) xU:TypeA, B, C:Ensemble Ux:UH':In U (Union U A (Intersection U B C)) xIn U (Intersection U (Union U A B) (Union U A C)) xintros x0 H'0; elim H'0; auto with sets.U:TypeA, B, C:Ensemble Ux:UH':In U (Union U A (Intersection U B C)) xforall x0 : U, In U (Intersection U B C) x0 -> In U (Intersection U (Union U A B) (Union U A C)) x0U:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U (Union U A B) (Union U A C)) xIn U (Union U A (Intersection U B C)) xU:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U (Union U A B) (Union U A C)) xforall x0 : U, In U (Union U A B) x0 -> In U (Union U A C) x0 -> In U (Union U A (Intersection U B C)) x0U:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U (Union U A B) (Union U A C)) xx0:UH'0:In U (Union U A B) x0forall x1 : U, In U B x1 -> In U (Union U A C) x1 -> In U (Union U A (Intersection U B C)) x1U:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U (Union U A B) (Union U A C)) xx0:UH'0:In U (Union U A B) x0x1:UH'1:In U B x1H'2:In U (Union U A C) x1In U (Union U A (Intersection U B C)) x1elim H'2; auto with sets. Qed.U:TypeA, B, C:Ensemble Ux:UH':In U (Intersection U (Union U A B) (Union U A C)) xx0:UH'0:In U (Union U A B) x0x1:UH'1:In U B x1H'2:In U (Union U A C) x1In U B x1 -> In U (Union U A (Intersection U B C)) x1U:Typeforall (A B : Ensemble U) (x : U), Add U (Union U A B) x = Union U A (Add U B x)unfold Add; auto using Union_associative with sets. Qed.U:Typeforall (A B : Ensemble U) (x : U), Add U (Union U A B) x = Union U A (Add U B x)U:Typeforall (X : Ensemble U) (x : U), In U X x -> Add U X x = XU:Typeforall (X : Ensemble U) (x : U), In U X x -> Add U X x = XU:TypeX:Ensemble Ux:UH':In U X xUnion U X (Singleton U x) = XU:TypeX:Ensemble Ux:UH':In U X xIncluded U (Union U X (Singleton U x)) X /\ Included U X (Union U X (Singleton U x))U:TypeX:Ensemble Ux:UH':In U X xforall x0 : U, In U (Union U X (Singleton U x)) x0 -> In U X x0intros t H'1; elim H'1; auto with sets. Qed.U:TypeX:Ensemble Ux:UH':In U X xx0:UH'0:In U (Union U X (Singleton U x)) x0forall x1 : U, In U (Singleton U x) x1 -> In U X x1U:Typeforall (X : Ensemble U) (x : U), ~ In U X x -> Subtract U X x = XU:Typeforall (X : Ensemble U) (x : U), ~ In U X x -> Subtract U X x = XU:TypeX:Ensemble Ux:UH':~ In U X xSetminus U X (Singleton U x) = XU:TypeX:Ensemble Ux:UH':~ In U X xSame_set U (Setminus U X (Singleton U x)) XU:TypeX:Ensemble Ux:UH':~ In U X xforall x0 : U, In U (Setminus U X (Singleton U x)) x0 -> In U X x0U:TypeX:Ensemble Ux:UH':~ In U X xforall x0 : U, In U X x0 -> In U (Setminus U X (Singleton U x)) x0intros x0 H'0; elim H'0; auto with sets.U:TypeX:Ensemble Ux:UH':~ In U X xforall x0 : U, In U (Setminus U X (Singleton U x)) x0 -> In U X x0U:TypeX:Ensemble Ux:UH':~ In U X xforall x0 : U, In U X x0 -> In U (Setminus U X (Singleton U x)) x0U:TypeX:Ensemble Ux:UH':~ In U X xx0:UH'0:In U X x0~ In U (Singleton U x) x0U:TypeX:Ensemble Ux:UH':~ In U X xx0:UH'0:In U X x0H'1:In U (Singleton U x) x0Falseintro H'4; apply H'; rewrite H'4; auto with sets. Qed.U:TypeX:Ensemble Ux:UH':~ In U X xx0:UH'0:In U X x0H'1:In U (Singleton U x) x0x = x0 -> FalseU:Typeforall x y : U, In U (Add U (Empty_set U) x) y -> x = yintro x; rewrite (Empty_set_zero' x); auto with sets. Qed.U:Typeforall x y : U, In U (Add U (Empty_set U) x) y -> x = yU:Typeforall (A B : Ensemble U) (x : U), Included U A B -> Included U (Add U A x) (Add U B x)U:Typeforall (A B : Ensemble U) (x : U), Included U A B -> Included U (Add U A x) (Add U B x)U:TypeA, B:Ensemble Ux:UH':Included U A Bforall x0 : U, In U (Add U A x) x0 -> In U (Add U B x) x0U:TypeA, B:Ensemble Ux:UH':Included U A Bx0:UH'0:In U (Add U A x) x0In U (Add U B x) x0intro H'1; elim H'1; [ intro H'2; clear H'1 | intro H'2; rewrite <- H'2; clear H'1 ]; auto with sets. Qed.U:TypeA, B:Ensemble Ux:UH':Included U A Bx0:UH'0:In U (Add U A x) x0In U A x0 \/ x = x0 -> In U (Add U B x) x0U:Typeforall (A B : Ensemble U) (x : U), ~ In U A x -> Included U (Add U A x) (Add U B x) -> Included U A BU:Typeforall (A B : Ensemble U) (x : U), ~ In U A x -> Included U (Add U A x) (Add U B x) -> Included U A BU:Typeforall (A B : Ensemble U) (x : U), ~ In U A x -> (forall x0 : U, In U (Add U A x) x0 -> In U (Add U B x) x0) -> forall x0 : U, In U A x0 -> In U B x0U:TypeA, B:Ensemble Ux:UH':~ In U A xH'0:forall x1 : U, In U (Add U A x) x1 -> In U (Add U B x) x1x0:UH'1:In U A x0In U B x0U:TypeA, B:Ensemble Ux:UH':~ In U A xH'0:forall x1 : U, In U (Add U A x) x1 -> In U (Add U B x) x1x0:UH'1:In U A x0In U (Add U B x) x0 -> In U B x0U:TypeA, B:Ensemble Ux:UH':~ In U A xH'0:forall x1 : U, In U (Add U A x) x1 -> In U (Add U B x) x1x0:UH'1:In U A x0H'2:In U (Add U B x) x0In U B x0 \/ x = x0 -> In U B x0U:TypeA, B:Ensemble Ux:UH':~ In U A xH'0:forall x1 : U, In U (Add U A x) x1 -> In U (Add U B x) x1x0:UH'1:In U A x0H'2:In U (Add U B x) x0H'4:x = x0In U B x0rewrite <- H'4; auto with sets. Qed.U:TypeA, B:Ensemble Ux:UH':~ In U A xH'0:forall x1 : U, In U (Add U A x) x1 -> In U (Add U B x) x1x0:UH'1:In U A x0H'2:In U (Add U B x) x0H'4:x = x0~ In U A x0U:Typeforall (A : Ensemble U) (x y : U), Add U (Add U A x) y = Add U (Add U A y) xU:Typeforall (A : Ensemble U) (x y : U), Add U (Add U A x) y = Add U (Add U A y) xU:TypeA:Ensemble Ux, y:UAdd U (Add U A x) y = Add U (Add U A y) xU:TypeA:Ensemble Ux, y:UUnion U (Union U A (Singleton U x)) (Singleton U y) = Union U (Union U A (Singleton U y)) (Singleton U x)U:TypeA:Ensemble Ux, y:UUnion U A (Union U (Singleton U x) (Singleton U y)) = Union U (Union U A (Singleton U y)) (Singleton U x)rewrite <- (Union_associative A (Singleton U y) (Singleton U x)); auto with sets. Qed.U:TypeA:Ensemble Ux, y:UUnion U A (Union U (Singleton U y) (Singleton U x)) = Union U (Union U A (Singleton U y)) (Singleton U x)U:Typeforall (A : Ensemble U) (x y z : U), Add U (Add U (Add U A x) y) z = Add U (Add U (Add U A z) x) yU:Typeforall (A : Ensemble U) (x y z : U), Add U (Add U (Add U A x) y) z = Add U (Add U (Add U A z) x) yU:TypeA:Ensemble Ux, y, z:UAdd U (Add U (Add U A x) y) z = Add U (Add U (Add U A z) x) yrewrite (Add_commutative A x z); auto with sets. Qed.U:TypeA:Ensemble Ux, y, z:UAdd U (Add U (Add U A x) z) y = Add U (Add U (Add U A z) x) yU:Typeforall (A B : Ensemble U) (x y : U), Included U B A -> Add U (Add U A x) y = Union U (Add U A x) (Add U B y)U:Typeforall (A B : Ensemble U) (x y : U), Included U B A -> Add U (Add U A x) y = Union U (Add U A x) (Add U B y)U:TypeA, B:Ensemble Ux, y:UH':Included U B AAdd U (Add U A x) y = Union U (Add U A x) (Add U B y)U:TypeA, B:Ensemble Ux, y:UH':Included U B AAdd U (Add U A x) y = Add U (Union U (Add U A x) B) yU:TypeA, B:Ensemble Ux, y:UH':Included U B AAdd U (Add U A x) y = Add U (Union U (Union U A (Singleton U x)) B) yU:TypeA, B:Ensemble Ux, y:UH':Included U B AAdd U (Add U A x) y = Add U (Union U (Union U (Singleton U x) A) B) yU:TypeA, B:Ensemble Ux, y:UH':Included U B AAdd U (Add U A x) y = Add U (Union U (Singleton U x) (Union U A B)) yU:TypeA, B:Ensemble Ux, y:UH':Included U B AAdd U (Add U A x) y = Add U (Union U (Singleton U x) A) yauto with sets. Qed.U:TypeA, B:Ensemble Ux, y:UH':Included U B AAdd U (Add U A x) y = Add U (Union U A (Singleton U x)) yU:Typeforall (U0 : Type) (A x y : Ensemble U0), Strict_Included U0 x y -> ~ (exists z : Ensemble U0, Strict_Included U0 x z /\ Strict_Included U0 z y) -> covers (Ensemble U0) (Power_set_PO U0 A) y xintros; apply Definition_of_covers; auto with sets. Qed.U:Typeforall (U0 : Type) (A x y : Ensemble U0), Strict_Included U0 x y -> ~ (exists z : Ensemble U0, Strict_Included U0 x z /\ Strict_Included U0 z y) -> covers (Ensemble U0) (Power_set_PO U0 A) y xU:Typeforall (A : Type) (s1 s2 : Ensemble A), Disjoint A s1 s2 -> Intersection A s1 s2 = Empty_set AU:Typeforall (A : Type) (s1 s2 : Ensemble A), Disjoint A s1 s2 -> Intersection A s1 s2 = Empty_set AU, A:Types1, s2:Ensemble AH:Disjoint A s1 s2Intersection A s1 s2 = Empty_set AU, A:Types1, s2:Ensemble AH:Disjoint A s1 s2Same_set A (Intersection A s1 s2) (Empty_set A)U, A:Types1, s2:Ensemble AH:Disjoint A s1 s2Included A (Intersection A s1 s2) (Empty_set A)U, A:Types1, s2:Ensemble AH:Disjoint A s1 s2Included A (Empty_set A) (Intersection A s1 s2)U, A:Types1, s2:Ensemble AH:Disjoint A s1 s2Included A (Intersection A s1 s2) (Empty_set A)U, A:Types1, s2:Ensemble AH:forall x : A, ~ In A (Intersection A s1 s2) xIncluded A (Intersection A s1 s2) (Empty_set A)U, A:Types1, s2:Ensemble AH:forall x0 : A, ~ In A (Intersection A s1 s2) x0x:AH1:In A (Intersection A s1 s2) xIn A (Empty_set A) xU, A:Types1, s2:Ensemble AH:forall x0 : A, ~ Intersection A s1 s2 x0x:AH1:Intersection A s1 s2 xEmpty_set A xU, A:Types1, s2:Ensemble AH:forall x0 : A, ~ Intersection A s1 s2 x0x:AH1:Intersection A s1 s2 xFalseapply (H _ H1).U, A:Types1, s2:Ensemble AH:forall x0 : A, Intersection A s1 s2 x0 -> Falsex:AH1:Intersection A s1 s2 xFalseintuition. Qed.U, A:Types1, s2:Ensemble AH:Disjoint A s1 s2Included A (Empty_set A) (Intersection A s1 s2)U:Typeforall (A : Type) (s : Ensemble A), Intersection A (Empty_set A) s = Empty_set AU:Typeforall (A : Type) (s : Ensemble A), Intersection A (Empty_set A) s = Empty_set Aauto with sets. Qed.U, A:Types:Ensemble AIntersection A (Empty_set A) s = Empty_set AU:Typeforall (A : Type) (s : Ensemble A), Intersection A s (Empty_set A) = Empty_set AU:Typeforall (A : Type) (s : Ensemble A), Intersection A s (Empty_set A) = Empty_set Aauto with sets. Qed.U, A:Types:Ensemble AIntersection A s (Empty_set A) = Empty_set AU:Typeforall (A : Type) (s : Ensemble A), Setminus A (Empty_set A) s = Empty_set AU:Typeforall (A : Type) (s : Ensemble A), Setminus A (Empty_set A) s = Empty_set AU, A:Types:Ensemble ASetminus A (Empty_set A) s = Empty_set AU, A:Types:Ensemble ASame_set A (Setminus A (Empty_set A) s) (Empty_set A)U, A:Types:Ensemble AIncluded A (Setminus A (Empty_set A) s) (Empty_set A)U, A:Types:Ensemble AIncluded A (Empty_set A) (Setminus A (Empty_set A) s)U, A:Types:Ensemble AIncluded A (Setminus A (Empty_set A) s) (Empty_set A)U, A:Types:Ensemble Ax:AH1:In A (Setminus A (Empty_set A) s) xIn A (Empty_set A) xU, A:Types:Ensemble Ax:AH:In A (Empty_set A) xH0:~ In A s xIn A (Empty_set A) xassumption.U, A:Types:Ensemble Ax:AH:Empty_set A xH0:~ s xEmpty_set A xintuition. Qed.U, A:Types:Ensemble AIncluded A (Empty_set A) (Setminus A (Empty_set A) s)U:Typeforall (A : Type) (s : Ensemble A), Setminus A s (Empty_set A) = sU:Typeforall (A : Type) (s : Ensemble A), Setminus A s (Empty_set A) = sU, A:Types:Ensemble ASetminus A s (Empty_set A) = sU, A:Types:Ensemble ASame_set A (Setminus A s (Empty_set A)) sU, A:Types:Ensemble AIncluded A (Setminus A s (Empty_set A)) sU, A:Types:Ensemble AIncluded A s (Setminus A s (Empty_set A))U, A:Types:Ensemble AIncluded A (Setminus A s (Empty_set A)) sU, A:Types:Ensemble Ax:AH1:In A (Setminus A s (Empty_set A)) xIn A s xU, A:Types:Ensemble Ax:AH:In A s xH0:~ In A (Empty_set A) xIn A s xassumption.U, A:Types:Ensemble Ax:AH:s xH0:~ Empty_set A xs xintuition. Qed.U, A:Types:Ensemble AIncluded A s (Setminus A s (Empty_set A))U:Typeforall (A : Type) (s1 s2 s3 : Ensemble A), Setminus A (Union A s1 s2) s3 = Union A (Setminus A s1 s3) (Setminus A s2 s3)U:Typeforall (A : Type) (s1 s2 s3 : Ensemble A), Setminus A (Union A s1 s2) s3 = Union A (Setminus A s1 s3) (Setminus A s2 s3)U, A:Types1, s2, s3:Ensemble ASetminus A (Union A s1 s2) s3 = Union A (Setminus A s1 s3) (Setminus A s2 s3)U, A:Types1, s2, s3:Ensemble ASame_set A (Setminus A (Union A s1 s2) s3) (Union A (Setminus A s1 s3) (Setminus A s2 s3))U, A:Types1, s2, s3:Ensemble AIncluded A (Setminus A (Union A s1 s2) s3) (Union A (Setminus A s1 s3) (Setminus A s2 s3))U, A:Types1, s2, s3:Ensemble AIncluded A (Union A (Setminus A s1 s3) (Setminus A s2 s3)) (Setminus A (Union A s1 s2) s3)U, A:Types1, s2, s3:Ensemble AIncluded A (Setminus A (Union A s1 s2) s3) (Union A (Setminus A s1 s3) (Setminus A s2 s3))U, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A (Union A s1 s2) s3) xIn A (Union A (Setminus A s1 s3) (Setminus A s2 s3)) xinversion H0; intuition.U, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A (Union A s1 s2) s3) xH0:In A (Union A s1 s2) xH1:~ In A s3 xIn A (Union A (Setminus A s1 s3) (Setminus A s2 s3)) xU, A:Types1, s2, s3:Ensemble AIncluded A (Union A (Setminus A s1 s3) (Setminus A s2 s3)) (Setminus A (Union A s1 s2) s3)constructor; inversion H; inversion H0; intuition. Qed.U, A:Types1, s2, s3:Ensemble Ax:AH:In A (Union A (Setminus A s1 s3) (Setminus A s2 s3)) xIn A (Setminus A (Union A s1 s2) s3) xU:Typeforall (A : Type) (s1 s2 s3 : Ensemble A), Setminus A s1 (Union A s2 s3) = Setminus A (Setminus A s1 s2) s3U:Typeforall (A : Type) (s1 s2 s3 : Ensemble A), Setminus A s1 (Union A s2 s3) = Setminus A (Setminus A s1 s2) s3U, A:Types1, s2, s3:Ensemble ASetminus A s1 (Union A s2 s3) = Setminus A (Setminus A s1 s2) s3U, A:Types1, s2, s3:Ensemble ASame_set A (Setminus A s1 (Union A s2 s3)) (Setminus A (Setminus A s1 s2) s3)U, A:Types1, s2, s3:Ensemble AIncluded A (Setminus A s1 (Union A s2 s3)) (Setminus A (Setminus A s1 s2) s3)U, A:Types1, s2, s3:Ensemble AIncluded A (Setminus A (Setminus A s1 s2) s3) (Setminus A s1 (Union A s2 s3))U, A:Types1, s2, s3:Ensemble AIncluded A (Setminus A s1 (Union A s2 s3)) (Setminus A (Setminus A s1 s2) s3)U, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A s1 (Union A s2 s3)) xIn A (Setminus A (Setminus A s1 s2) s3) xU, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A s1 (Union A s2 s3)) xH0:In A s1 xH1:~ In A (Union A s2 s3) xIn A (Setminus A (Setminus A s1 s2) s3) xU, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A s1 (Union A s2 s3)) xH0:In A s1 xH1:~ In A (Union A s2 s3) xIn A (Setminus A s1 s2) xU, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A s1 (Union A s2 s3)) xH0:In A s1 xH1:~ In A (Union A s2 s3) x~ In A s3 xintuition.U, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A s1 (Union A s2 s3)) xH0:In A s1 xH1:~ In A (Union A s2 s3) xIn A (Setminus A s1 s2) xU, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A s1 (Union A s2 s3)) xH0:In A s1 xH1:~ In A (Union A s2 s3) x~ In A s3 xintuition.U, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A s1 (Union A s2 s3)) xH0:In A s1 xH1:In A s3 xIn A (Union A s2 s3) xU, A:Types1, s2, s3:Ensemble AIncluded A (Setminus A (Setminus A s1 s2) s3) (Setminus A s1 (Union A s2 s3))U, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A (Setminus A s1 s2) s3) xIn A (Setminus A s1 (Union A s2 s3)) xU, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A (Setminus A s1 s2) s3) xH0:In A (Setminus A s1 s2) xH1:~ In A s3 xIn A (Setminus A s1 (Union A s2 s3)) xU, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A (Setminus A s1 s2) s3) xH0:In A (Setminus A s1 s2) xH1:~ In A s3 xH2:In A s1 xH3:~ In A s2 xIn A (Setminus A s1 (Union A s2 s3)) xinversion H4; intuition. Qed.U, A:Types1, s2, s3:Ensemble Ax:AH:In A (Setminus A (Setminus A s1 s2) s3) xH0:In A (Setminus A s1 s2) xH1:In A s3 x -> FalseH2:In A s1 xH3:In A s2 x -> FalseH4:In A (Union A s2 s3) xFalseU:Typeforall (A : Type) (s1 s2 : Ensemble A), Intersection A s1 s2 = Empty_set A -> Setminus A s1 s2 = s1U:Typeforall (A : Type) (s1 s2 : Ensemble A), Intersection A s1 s2 = Empty_set A -> Setminus A s1 s2 = s1U, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set ASetminus A s1 s2 = s1U, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set ASame_set A (Setminus A s1 s2) s1U, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set AIncluded A (Setminus A s1 s2) s1U, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set AIncluded A s1 (Setminus A s1 s2)U, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set AIncluded A (Setminus A s1 s2) s1U, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set Ax:AH1:In A (Setminus A s1 s2) xIn A s1 xintuition.U, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set Ax:AH0:In A s1 xH2:~ In A s2 xIn A s1 xU, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set AIncluded A s1 (Setminus A s1 s2)U, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set Ax:AH1:In A s1 xIn A (Setminus A s1 s2) xU, A:Types1, s2:Ensemble AH:Intersection A s1 s2 = Empty_set Ax:AH1:In A s1 xH0:In A s2 xFalseU, A:Types1, s2:Ensemble Ax:AH1:In A s1 xH0:In A s2 xIntersection A s1 s2 <> Empty_set AU, A:Types1, s2:Ensemble Ax:AH1:In A s1 xH0:In A s2 xInhabited A (Intersection A s1 s2)intuition. Qed.U, A:Types1, s2:Ensemble Ax:AH1:In A s1 xH0:In A s2 xIn A (Intersection A s1 s2) xU:Typeforall (A : Type) (s1 s2 : Ensemble A), Included A s1 s2 -> Setminus A s1 s2 = Empty_set AU:Typeforall (A : Type) (s1 s2 : Ensemble A), Included A s1 s2 -> Setminus A s1 s2 = Empty_set AU, A:Types1, s2:Ensemble AH:Included A s1 s2Setminus A s1 s2 = Empty_set AU, A:Types1, s2:Ensemble AH:Included A s1 s2Same_set A (Setminus A s1 s2) (Empty_set A)U, A:Types1, s2:Ensemble AH:Included A s1 s2Included A (Setminus A s1 s2) (Empty_set A)U, A:Types1, s2:Ensemble AH:Included A s1 s2Included A (Empty_set A) (Setminus A s1 s2)U, A:Types1, s2:Ensemble AH:Included A s1 s2Included A (Setminus A s1 s2) (Empty_set A)U, A:Types1, s2:Ensemble AH:Included A s1 s2x:AH1:In A (Setminus A s1 s2) xIn A (Empty_set A) xU, A:Types1, s2:Ensemble AH:Included A s1 s2x:AH0:In A s1 xH2:~ In A s2 xIn A (Empty_set A) xintuition.U, A:Types1, s2:Ensemble AH:Included A s1 s2x:AH0:In A s1 xH2:~ In A s2 xIn A s2 xintuition. Qed. End Sets_as_an_algebra. Hint Resolve Empty_set_zero Empty_set_zero' Union_associative Union_add singlx incl_add: sets.U, A:Types1, s2:Ensemble AH:Included A s1 s2Included A (Empty_set A) (Setminus A s1 s2)