1 (** This module (Toolbox - subsets: basics) defines:
2 - subset membership: [Eps] (epsilon)
3 - empty subset: [SBot] (subset bottom)
4 - full subset: [STop] (subset top)
5 - singleton: [Sing] (singleton)
6 - relative universal quantifier: [RAll] (relative all)
7 - relative existential quantifier: [REx] (relative exists)
10 - introduction and elimination rules for the defined constants
11 - epsilon conditions: [eps_1], [eps_2]
12 - alternative form of epsilon with sigma: [eps2]
16 We require the support for finite sets and finite domain functions ([xt_fin])
17 that includes the basic type theory (the [st] package).
20 Require Export xt_fin.
22 Section Subset_Definitions.
24 Section subset_membership.
26 (** Epsilon: [(Eps S a U)] corresponds to $ a \e_S U $. *)
27 Definition Eps: (S:Set) S -> (S -> Set) -> Set.
29 Exact (LAnd (U a) (Id S a a)).
32 End subset_membership.
34 Section subset_constants.
36 (** Subset bottom: [(SBot S)] corresponds to $ \sbot_S $. *)
37 Definition SBot: (S:Set) S -> Set.
42 (** Subset top: [(STop S)] corresponds to $ \stop_S $, %{\ie}% to $S$ as a subset of itself. *)
43 Definition STop: (S:Set) S -> Set.
48 (** Singleton: [(Sing S a)] corresponds to $ \subset{a} $. *)
49 Definition Sing: (S:Set) S -> (S -> Set).
56 Section relative_quantification.
58 (** Relative all: [(RAll S U P)] corresponds to $ (\lall x \e U) P(x) $. *)
59 Definition RAll: (S:Set) (S -> Set) -> (S -> Set) -> Set.
61 Exact (a:S) (Eps S a U) -> (P a).
64 (** Relative exists: [(REx S U P)] corresponds to $ (\lex x \e U) P(x) $. *)
65 Definition REx: (S:Set) (S -> Set) -> (S -> Set) -> Set.
67 Exact (LEx S [a](LAnd (Eps S a U) (P a))).
70 End relative_quantification.
72 End Subset_Definitions.
74 Section Subset_Results.
76 Section epsilon_conditions.
78 (** Epsilon elimination: $ a \e U \limp U(a) $. *)
79 Theorem eps_e: (S:Set; a:S; U:S->Set) (Eps S a U) -> (U a).
82 MApply '(land_e2 (Id S a a)).
85 (** Epsilon introduction: $ U(a) \limp a \e U $. *)
86 Theorem eps_i: (S:Set; a:S; U:S->Set) (U a) -> (Eps S a U).
92 (** Epsilon condition 1: $ a \e U \liff U(a) $. *)
93 Theorem eps_1: (S:Set; U:(S -> Set)) (a:S)(LIff (Eps S a U) (U a)).
100 (** Epsilon condition 2: $ a \e_S U \limp a \in S $. *)
101 Theorem eps_2: (S:Set; a:S; U:(S -> Set)) (Eps S a U) -> S.
106 (** Epsilon in sigma form: $ a \e_S U \liff (\lex z \in (\Sigma x \in S) U) Id(S, p(z), a) $. *)
107 Theorem eps2: (S:Set; a:S; U:(S -> Set)) (LIff (Eps S a U) (LEx (Sigma S U) [z](Id S (sp S U z) a))).
112 MApply '(lex_i (Sigma S U) (pair S U a H0)).
115 MApply '(id_repl ? a (sp S U a0)).
119 End epsilon_conditions.
121 Section subset_top_bottom.
123 (** Subset top, epsilon introduction: $ a \e \stop $. *)
124 Theorem stop_eps_i: (S:Set; a:S) (Eps S a (STop S)).
131 (** Subset bottom, epsilon elimination: $ a \e \sbot \limp \lbot $. *)
132 Theorem sbot_eps_e: (S:Set; a:S) (Eps S a (SBot S)) -> LBot.
137 End subset_top_bottom.
141 (** Singleton, epsilon introduction: $ Id(S, a, b) \limp b \e \subset{a} $. *)
142 Theorem sing_eps_i: (S:Set; b,a:S) (Id S a b) -> (Eps S b (Sing S a)).
147 (** Singleton, epsilon elimination: $ b \e \subset{a} \limp Id(S, a, b) $. *)
148 Theorem sing_eps_e: (S:Set; a,b:S) (Eps S b (Sing S a)) -> (Id S a b).
155 Section relative_universal.
157 (** Relative all introduction: $ ((\lall a \in S)\ a \e U \limp P(a)) \limp (\lall x \e U) P(x) $. *)
158 Theorem rall_i: (S:Set; U:S->Set; P:S->Set) ((a:S) (Eps S a U) -> (P a)) -> (RAll S U P).
164 (** Relative all elimination: $ a \e U \limp (\lall x \e U) P(x) \limp P(a) $. *)
165 Theorem rall_e: (S:Set; a:S; U:S->Set; P:S->Set) (Eps S a U) -> (RAll S U P) -> (P a).
171 End relative_universal.
173 Section relative_existential.
175 (** Relative exists introduction: $ a \e U \limp P(a) \limp (\lex x \e U) P(x) $. *)
176 Theorem rex_i: (S:Set; a:S; U:S->Set; P:S->Set) (Eps S a U) -> (P a) -> (REx S U P).
183 (** Relative exists elimination: $ ((\lall a \in S)\ a \e U \limp P(a) \limp T) \limp (\lex x \e U) P(x) \limp T $. *)
184 Theorem rex_e: (S:Set; U:S->Set; P:S->Set; T:Set) ((a:S) (Eps S a U) -> (P a) -> T) -> (REx S U P) -> T.
189 MApply '(land_e2 (P a)).
190 MApply '(land_e1 (Eps S a U)).
193 End relative_existential.