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 Relations_1. Require Export Relations_1_facts. Require Export Relations_2.forall (U : Type) (R : Relation U), Reflexive U (Rstar U R)auto with sets. Qed.forall (U : Type) (R : Relation U), Reflexive U (Rstar U R)forall (U : Type) (R : Relation U), contains U (Rplus U R) Rauto with sets. Qed.forall (U : Type) (R : Relation U), contains U (Rplus U R) Rforall (U : Type) (R : Relation U), contains U (Rstar U R) Rintros U R; red; intros x y H'; apply Rstar_n with y; auto with sets. Qed.forall (U : Type) (R : Relation U), contains U (Rstar U R) Rforall (U : Type) (R : Relation U), contains U (Rstar U R) (Rplus U R)forall (U : Type) (R : Relation U), contains U (Rstar U R) (Rplus U R)U:TypeR:Relation Uforall x y : U, Rplus U R x y -> Rstar U R x yU:TypeR:Relation Ux, y:UH':Rplus U R x yforall x0 y0 : U, R x0 y0 -> Rstar U R x0 y0U:TypeR:Relation Ux, y:UH':Rplus U R x yforall x0 y0 z : U, R x0 y0 -> Rplus U R y0 z -> Rstar U R y0 z -> Rstar U R x0 zgeneralize Rstar_contains_R; intro T; red in T; auto with sets.U:TypeR:Relation Ux, y:UH':Rplus U R x yforall x0 y0 : U, R x0 y0 -> Rstar U R x0 y0intros x0 y0 z H'0 H'1 H'2; apply Rstar_n with y0; auto with sets. Qed.U:TypeR:Relation Ux, y:UH':Rplus U R x yforall x0 y0 z : U, R x0 y0 -> Rplus U R y0 z -> Rstar U R y0 z -> Rstar U R x0 zforall (U : Type) (R : Relation U), Transitive U (Rstar U R)forall (U : Type) (R : Relation U), Transitive U (Rstar U R)U:TypeR:Relation Uforall x y z : U, Rstar U R x y -> Rstar U R y z -> Rstar U R x zintros x0 y0 z0 H'0 H'1 H'2 H'3; apply Rstar_n with y0; auto with sets. Qed.U:TypeR:Relation Ux, y, z:UH':Rstar U R x yforall x0 y0 z0 : U, R x0 y0 -> Rstar U R y0 z0 -> (Rstar U R z0 z -> Rstar U R y0 z) -> Rstar U R z0 z -> Rstar U R x0 zforall (U : Type) (R : Relation U) (x y : U), Rstar U R x y -> x = y \/ (exists u : U, R x u /\ Rstar U R u y)forall (U : Type) (R : Relation U) (x y : U), Rstar U R x y -> x = y \/ (exists u : U, R x u /\ Rstar U R u y)intros x0 y0 z H'0 H'1 H'2; right; exists y0; auto with sets. Qed.U:TypeR:Relation Ux, y:UH':Rstar U R x yforall x0 y0 z : U, R x0 y0 -> Rstar U R y0 z -> y0 = z \/ (exists u : U, R y0 u /\ Rstar U R u z) -> x0 = z \/ (exists u : U, R x0 u /\ Rstar U R u z)forall (U : Type) (R : Relation U), same_relation U (Rstar U R) (Rstar1 U R)forall (U : Type) (R : Relation U), same_relation U (Rstar U R) (Rstar1 U R)T:forall (U : Type) (R : Relation U) (x y : U), R x y -> Rstar U R x yforall (U : Type) (R : Relation U), same_relation U (Rstar U R) (Rstar1 U R)T:forall (U0 : Type) (R0 : Relation U0) (x y : U0), R0 x y -> Rstar U0 R0 x yU:TypeR:Relation U(forall x y : U, Rstar1 U R x y -> Rstar U R x y) /\ (forall x y : U, Rstar U R x y -> Rstar1 U R x y)T:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), R0 x0 y0 -> Rstar U0 R0 x0 y0U:TypeR:Relation Ux, y:UH':Rstar1 U R x yforall x0 y0 z : U, Rstar1 U R x0 y0 -> Rstar U R x0 y0 -> Rstar1 U R y0 z -> Rstar U R y0 z -> Rstar U R x0 zT:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), R0 x0 y0 -> Rstar U0 R0 x0 y0U:TypeR:Relation Ux, y:UH':Rstar U R x yforall x0 y0 z : U, R x0 y0 -> Rstar U R y0 z -> Rstar1 U R y0 z -> Rstar1 U R x0 zT:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), R0 x0 y0 -> Rstar U0 R0 x0 y0U:TypeR:Relation Ux, y:UH':Rstar1 U R x yforall x0 y0 z : U, Rstar1 U R x0 y0 -> Rstar U R x0 y0 -> Rstar1 U R y0 z -> Rstar U R y0 z -> Rstar U R x0 zintros x0 y0 z H'0 H'1 H'2 H'3; apply T1 with y0; auto with sets.T:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), R0 x0 y0 -> Rstar U0 R0 x0 y0U:TypeR:Relation Ux, y:UH':Rstar1 U R x yT1:forall (U0 : Type) (R0 : Relation U0) (x0 y0 z : U0), Rstar U0 R0 x0 y0 -> Rstar U0 R0 y0 z -> Rstar U0 R0 x0 zforall x0 y0 z : U, Rstar1 U R x0 y0 -> Rstar U R x0 y0 -> Rstar1 U R y0 z -> Rstar U R y0 z -> Rstar U R x0 zintros x0 y0 z H'0 H'1 H'2; apply Rstar1_n with y0; auto with sets. Qed.T:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), R0 x0 y0 -> Rstar U0 R0 x0 y0U:TypeR:Relation Ux, y:UH':Rstar U R x yforall x0 y0 z : U, R x0 y0 -> Rstar U R y0 z -> Rstar1 U R y0 z -> Rstar1 U R x0 zforall (U : Type) (R : Relation U), Symmetric U R -> Symmetric U (Rstar U R)forall (U : Type) (R : Relation U), Symmetric U R -> Symmetric U (Rstar U R)U:TypeR:Relation UH':Symmetric U Rforall x y : U, Rstar U R x y -> Rstar U R y xU:TypeR:Relation UH':Symmetric U Rx, y:UH'0:Rstar U R x yforall x0 y0 z : U, R x0 y0 -> Rstar U R y0 z -> Rstar U R z y0 -> Rstar U R z x0U:TypeR:Relation UH':Symmetric U Rx, y:UH'0:Rstar U R x yx0, y0, z:UH'1:R x0 y0H'2:Rstar U R y0 zH'3:Rstar U R z y0Rstar U R z x0U:TypeR:Relation UH':Symmetric U Rx, y:UH'0:Rstar U R x yx0, y0, z:UH'1:R x0 y0H'2:Rstar U R y0 zH'3:Rstar U R z y0T1:forall (U0 : Type) (R0 : Relation U0) (x1 y1 z0 : U0), Rstar U0 R0 x1 y1 -> Rstar U0 R0 y1 z0 -> Rstar U0 R0 x1 z0Rstar U R z x0apply Rstar_n with x0; auto with sets. Qed.U:TypeR:Relation UH':Symmetric U Rx, y:UH'0:Rstar U R x yx0, y0, z:UH'1:R x0 y0H'2:Rstar U R y0 zH'3:Rstar U R z y0T1:forall (U0 : Type) (R0 : Relation U0) (x1 y1 z0 : U0), Rstar U0 R0 x1 y1 -> Rstar U0 R0 y1 z0 -> Rstar U0 R0 x1 z0Rstar U R y0 x0forall (U : Type) (R S : Relation U), contains U (Rstar U S) R -> contains U (Rstar U S) (Rstar U R)forall (U : Type) (R S : Relation U), contains U (Rstar U S) R -> contains U (Rstar U S) (Rstar U R)forall (U : Type) (R S : Relation U), (forall x y : U, R x y -> Rstar U S x y) -> forall x y : U, Rstar U R x y -> Rstar U S x yU:TypeR, S:Relation UH':forall x0 y0 : U, R x0 y0 -> Rstar U S x0 y0x, y:UH'0:Rstar U R x yforall x0 y0 z : U, R x0 y0 -> Rstar U R y0 z -> Rstar U S y0 z -> Rstar U S x0 zintros x0 y0 z H'1 H'2 H'3; apply T1 with y0; auto with sets. Qed.U:TypeR, S:Relation UH':forall x0 y0 : U, R x0 y0 -> Rstar U S x0 y0x, y:UH'0:Rstar U R x yT1:forall (U0 : Type) (R0 : Relation U0) (x0 y0 z : U0), Rstar U0 R0 x0 y0 -> Rstar U0 R0 y0 z -> Rstar U0 R0 x0 zforall x0 y0 z : U, R x0 y0 -> Rstar U R y0 z -> Rstar U S y0 z -> Rstar U S x0 zforall (U : Type) (R S : Relation U), contains U S R -> contains U (Rstar U S) (Rstar U R)forall (U : Type) (R S : Relation U), contains U S R -> contains U (Rstar U S) (Rstar U R)U:TypeR, S:Relation UH':contains U S Rcontains U (Rstar U S) (Rstar U R)generalize (Rstar_contains_R U S); auto with sets. Qed.U:TypeR, S:Relation UH':contains U S Rcontains U (Rstar U S) Rforall (U : Type) (R : Relation U) (x y z : U), Rstar U R x y -> Rplus U R y z -> exists u : U, R x u /\ Rstar U R u zforall (U : Type) (R : Relation U) (x y z : U), Rstar U R x y -> Rplus U R y z -> exists u : U, R x u /\ Rstar U R u zT:forall (U : Type) (R : Relation U) (x y : U), Rplus U R x y -> Rstar U R x yforall (U : Type) (R : Relation U) (x y z : U), Rstar U R x y -> Rplus U R y z -> exists u : U, R x u /\ Rstar U R u zT:forall (U : Type) (R : Relation U) (x y : U), Rplus U R x y -> Rstar U R x yT1:forall (U : Type) (R : Relation U) (x y z : U), Rstar U R x y -> Rstar U R y z -> Rstar U R x zforall (U : Type) (R : Relation U) (x y z : U), Rstar U R x y -> Rplus U R y z -> exists u : U, R x u /\ Rstar U R u zT:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), Rplus U0 R0 x0 y0 -> Rstar U0 R0 x0 y0T1:forall (U0 : Type) (R0 : Relation U0) (x0 y0 z0 : U0), Rstar U0 R0 x0 y0 -> Rstar U0 R0 y0 z0 -> Rstar U0 R0 x0 z0U:TypeR:Relation Ux, y, z:UH':Rstar U R x yforall x0 : U, Rplus U R x0 z -> exists u : U, R x0 u /\ Rstar U R u zT:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), Rplus U0 R0 x0 y0 -> Rstar U0 R0 x0 y0T1:forall (U0 : Type) (R0 : Relation U0) (x0 y0 z0 : U0), Rstar U0 R0 x0 y0 -> Rstar U0 R0 y0 z0 -> Rstar U0 R0 x0 z0U:TypeR:Relation Ux, y, z:UH':Rstar U R x yforall x0 y0 z0 : U, R x0 y0 -> Rstar U R y0 z0 -> (Rplus U R z0 z -> exists u : U, R y0 u /\ Rstar U R u z) -> Rplus U R z0 z -> exists u : U, R x0 u /\ Rstar U R u zT:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), Rplus U0 R0 x0 y0 -> Rstar U0 R0 x0 y0T1:forall (U0 : Type) (R0 : Relation U0) (x0 y0 z0 : U0), Rstar U0 R0 x0 y0 -> Rstar U0 R0 y0 z0 -> Rstar U0 R0 x0 z0U:TypeR:Relation Ux, y, z:UH':Rstar U R x yforall x0 : U, Rplus U R x0 z -> exists u : U, R x0 u /\ Rstar U R u zT:forall (U0 : Type) (R0 : Relation U0) (x1 y0 : U0), Rplus U0 R0 x1 y0 -> Rstar U0 R0 x1 y0T1:forall (U0 : Type) (R0 : Relation U0) (x1 y0 z0 : U0), Rstar U0 R0 x1 y0 -> Rstar U0 R0 y0 z0 -> Rstar U0 R0 x1 z0U:TypeR:Relation Ux, y, z:UH':Rstar U R x yx0:UH'0:Rplus U R x0 zforall x1 y0 : U, R x1 y0 -> exists u : U, R x1 u /\ Rstar U R u y0T:forall (U0 : Type) (R0 : Relation U0) (x1 y0 : U0), Rplus U0 R0 x1 y0 -> Rstar U0 R0 x1 y0T1:forall (U0 : Type) (R0 : Relation U0) (x1 y0 z0 : U0), Rstar U0 R0 x1 y0 -> Rstar U0 R0 y0 z0 -> Rstar U0 R0 x1 z0U:TypeR:Relation Ux, y, z:UH':Rstar U R x yx0:UH'0:Rplus U R x0 zforall x1 y0 z0 : U, R x1 y0 -> Rplus U R y0 z0 -> (exists u : U, R y0 u /\ Rstar U R u z0) -> exists u : U, R x1 u /\ Rstar U R u z0intros x1 y0 H'1; exists y0; auto with sets.T:forall (U0 : Type) (R0 : Relation U0) (x1 y0 : U0), Rplus U0 R0 x1 y0 -> Rstar U0 R0 x1 y0T1:forall (U0 : Type) (R0 : Relation U0) (x1 y0 z0 : U0), Rstar U0 R0 x1 y0 -> Rstar U0 R0 y0 z0 -> Rstar U0 R0 x1 z0U:TypeR:Relation Ux, y, z:UH':Rstar U R x yx0:UH'0:Rplus U R x0 zforall x1 y0 : U, R x1 y0 -> exists u : U, R x1 u /\ Rstar U R u y0intros x1 y0 z0 H'1 H'2 H'3; exists y0; auto with sets.T:forall (U0 : Type) (R0 : Relation U0) (x1 y0 : U0), Rplus U0 R0 x1 y0 -> Rstar U0 R0 x1 y0T1:forall (U0 : Type) (R0 : Relation U0) (x1 y0 z0 : U0), Rstar U0 R0 x1 y0 -> Rstar U0 R0 y0 z0 -> Rstar U0 R0 x1 z0U:TypeR:Relation Ux, y, z:UH':Rstar U R x yx0:UH'0:Rplus U R x0 zforall x1 y0 z0 : U, R x1 y0 -> Rplus U R y0 z0 -> (exists u : U, R y0 u /\ Rstar U R u z0) -> exists u : U, R x1 u /\ Rstar U R u z0T:forall (U0 : Type) (R0 : Relation U0) (x0 y0 : U0), Rplus U0 R0 x0 y0 -> Rstar U0 R0 x0 y0T1:forall (U0 : Type) (R0 : Relation U0) (x0 y0 z0 : U0), Rstar U0 R0 x0 y0 -> Rstar U0 R0 y0 z0 -> Rstar U0 R0 x0 z0U:TypeR:Relation Ux, y, z:UH':Rstar U R x yforall x0 y0 z0 : U, R x0 y0 -> Rstar U R y0 z0 -> (Rplus U R z0 z -> exists u : U, R y0 u /\ Rstar U R u z) -> Rplus U R z0 z -> exists u : U, R x0 u /\ Rstar U R u zT:forall (U0 : Type) (R0 : Relation U0) (x1 y1 : U0), Rplus U0 R0 x1 y1 -> Rstar U0 R0 x1 y1T1:forall (U0 : Type) (R0 : Relation U0) (x1 y1 z1 : U0), Rstar U0 R0 x1 y1 -> Rstar U0 R0 y1 z1 -> Rstar U0 R0 x1 z1U:TypeR:Relation Ux, y, z:UH':Rstar U R x yx0, y0, z0:UH'0:R x0 y0H'1:Rstar U R y0 z0H'2:Rplus U R z0 z -> exists u : U, R y0 u /\ Rstar U R u zH'3:Rplus U R z0 zR x0 y0 /\ Rstar U R y0 zapply T1 with z0; auto with sets. Qed.T:forall (U0 : Type) (R0 : Relation U0) (x1 y1 : U0), Rplus U0 R0 x1 y1 -> Rstar U0 R0 x1 y1T1:forall (U0 : Type) (R0 : Relation U0) (x1 y1 z1 : U0), Rstar U0 R0 x1 y1 -> Rstar U0 R0 y1 z1 -> Rstar U0 R0 x1 z1U:TypeR:Relation Ux, y, z:UH':Rstar U R x yx0, y0, z0:UH'0:R x0 y0H'1:Rstar U R y0 z0H'2:Rplus U R z0 z -> exists u : U, R y0 u /\ Rstar U R u zH'3:Rplus U R z0 zRstar U R y0 zforall (U : Type) (R : Relation U), Strongly_confluent U R -> forall x b : U, Rstar U R x b -> forall a : U, R x a -> exists z : U, Rstar U R a z /\ R b zforall (U : Type) (R : Relation U), Strongly_confluent U R -> forall x b : U, Rstar U R x b -> forall a : U, R x a -> exists z : U, Rstar U R a z /\ R b zU:TypeR:Relation UH':Strongly_confluent U Rx, b:UH'0:Rstar U R x bforall x0 a : U, R x0 a -> exists z : U, Rstar U R a z /\ R x0 zU:TypeR:Relation UH':Strongly_confluent U Rx, b:UH'0:Rstar U R x bforall x0 y z : U, R x0 y -> Rstar U R y z -> (forall a : U, R y a -> exists z0 : U, Rstar U R a z0 /\ R z z0) -> forall a : U, R x0 a -> exists z0 : U, Rstar U R a z0 /\ R z z0intros x0 a H'1; exists a; auto with sets.U:TypeR:Relation UH':Strongly_confluent U Rx, b:UH'0:Rstar U R x bforall x0 a : U, R x0 a -> exists z : U, Rstar U R a z /\ R x0 zU:TypeR:Relation UH':Strongly_confluent U Rx, b:UH'0:Rstar U R x bforall x0 y z : U, R x0 y -> Rstar U R y z -> (forall a : U, R y a -> exists z0 : U, Rstar U R a z0 /\ R z z0) -> forall a : U, R x0 a -> exists z0 : U, Rstar U R a z0 /\ R z z0U:TypeR:Relation UH':Strongly_confluent U Rx, b:UH'0:Rstar U R x bx0, y, z:UH'1:R x0 yH'2:Rstar U R y zH'3:forall a0 : U, R y a0 -> exists z0 : U, Rstar U R a0 z0 /\ R z z0a:UH'4:R x0 aexists z0 : U, Rstar U R a z0 /\ R z z0U:TypeR:Relation UH':forall x1 a0 b0 : U, R x1 a0 -> R x1 b0 -> exists z0 : U, R a0 z0 /\ R b0 z0x, b:UH'0:Rstar U R x bx0, y, z:UH'1:R x0 yH'2:Rstar U R y zH'3:forall a0 : U, R y a0 -> exists z0 : U, Rstar U R a0 z0 /\ R z z0a:UH'4:R x0 aexists z0 : U, Rstar U R a z0 /\ R z z0U:TypeR:Relation Ux0, y, a, x, b:UH'0:Rstar U R x bz:UH'1:R x0 yH'2:Rstar U R y zH'3:forall a0 : U, R y a0 -> exists z0 : U, Rstar U R a0 z0 /\ R z z0H'4:R x0 aH'9:exists z0 : U, R a z0 /\ R y z0exists z0 : U, Rstar U R a z0 /\ R z z0U:TypeR:Relation Ux0, y, a, x, b:UH'0:Rstar U R x bz:UH'1:R x0 yH'2:Rstar U R y zH'3:forall a0 : U, R y a0 -> exists z0 : U, Rstar U R a0 z0 /\ R z z0H'4:R x0 aH'9:exists z0 : U, R a z0 /\ R y z0forall x1 : U, R a x1 /\ R y x1 -> exists z0 : U, Rstar U R a z0 /\ R z z0U:TypeR:Relation Ux0, y, a, x, b:UH'0:Rstar U R x bz:UH'1:R x0 yH'2:Rstar U R y zH'3:forall a0 : U, R y a0 -> exists z0 : U, Rstar U R a0 z0 /\ R z z0H'4:R x0 aH'9:exists z0 : U, R a z0 /\ R y z0t:UH'6:R a tH'7:R y texists z0 : U, Rstar U R a z0 /\ R z z0U:TypeR:Relation Ux0, y, a, x, b:UH'0:Rstar U R x bz:UH'1:R x0 yH'2:Rstar U R y zH'3:forall a0 : U, R y a0 -> exists z0 : U, Rstar U R a0 z0 /\ R z z0H'4:R x0 aH'9:exists z0 : U, R a z0 /\ R y z0t:UH'6:R a tH'7:R y tforall x1 : U, Rstar U R t x1 /\ R z x1 -> exists z0 : U, Rstar U R a z0 /\ R z z0U:TypeR:Relation Ux0, y, a, x, b:UH'0:Rstar U R x bz:UH'1:R x0 yH'2:Rstar U R y zH'3:forall a0 : U, R y a0 -> exists z0 : U, Rstar U R a0 z0 /\ R z z0H'4:R x0 aH'9:exists z0 : U, R a z0 /\ R y z0t:UH'6:R a tH'7:R y tz1:UH'8:Rstar U R t z1H'10:R z z1exists z0 : U, Rstar U R a z0 /\ R z z0apply Rstar_n with t; auto with sets. Qed.U:TypeR:Relation Ux0, y, a, x, b:UH'0:Rstar U R x bz:UH'1:R x0 yH'2:Rstar U R y zH'3:forall a0 : U, R y a0 -> exists z0 : U, Rstar U R a0 z0 /\ R z z0H'4:R x0 aH'9:exists z0 : U, R a z0 /\ R y z0t:UH'6:R a tH'7:R y tz1:UH'8:Rstar U R t z1H'10:R z z1Rstar U R a z1