summaryrefslogtreecommitdiff
path: root/library/set/filter.tex
blob: 7662cce15707abe2811e099f085b80364524f875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
\import{set.tex}
\import{set/powerset.tex}

\section{Filters}

\subsection{Definition and basic properties of filters}

\begin{abbreviation}\label{upwardclosed}
    $F$ is upward-closed in $S$ iff
    for all $A, B$ such that $A\subseteq B\subseteq S$ and $A\in F$ we have $B\in F$.
\end{abbreviation}

\begin{definition}\label{filter}
    $F$ is a filter on $S$ iff
    $F$ is a family of subsets of $S$
    and $S\in F$
    and $\emptyset\notin F$
    and $F$ is closed under binary intersections
    and $F$ is upward-closed in $S$.
\end{definition}

\begin{proposition}\label{filter_ext_complement}
    Let $F, G$ be filters on $S$.
    Suppose for all $A\subseteq S$ we have $S\setminus A\in F$ iff $S\setminus A\in G$.
    Then $F = G$.
\end{proposition}
\begin{proof}
    We have for all $X\in F$ we have $X\in G$
        by \cref{filter,setminus_subseteq,double_relative_complement}.
    We have for all $X\in G$ we have $X\in F$
        by \cref{filter,setminus_subseteq,double_relative_complement}.
    Follows by set extensionality.
\end{proof}

\begin{proposition}\label{filter_inter_in_iff}
    Let $F$ be a filter on $S$.
    Suppose $A, B\subseteq S$.
    Then $A\inter B\in F$ iff $A, B\in F$.
\end{proposition}
\begin{proof}
    We have $A\inter B\subseteq A, B$ by \cref{inter,subseteq}.
    Follows by \cref{filter}.
\end{proof}

\begin{proposition}\label{filter_setminus_in}
    Let $F$ be a filter on $S$.
    Suppose $A\in F$.
    Suppose $B\subseteq S$ and $S\setminus B\in F$.
    Then $A\setminus B\in F$.
\end{proposition}
\begin{proof}
    We have $A\subseteq S$ by \cref{filter}.
    Thus $A\setminus B = A\inter (S\setminus B)$ by \cref{setminus_eq_inter_complement}.
    Now $S\setminus B\subseteq S$ by \cref{setminus_subseteq}.
    Follows by \cref{filter_inter_in_iff}.
\end{proof}

\begin{proposition}\label{filter_in_iff_exists_subset}
    Let $F$ be a filter on $S$.
    Suppose $B\subseteq S$.
    Then $B\in F$ iff there exists $A\subseteq B$ such that $A\in F$.
\end{proposition}
\begin{proof}
    Follows by \cref{filter,subseteq_refl}.
\end{proof}


\subsection{Principal filters over a set}

\begin{definition}\label{principalfilter}
    $\principalfilter{S}{A} = \{X\in\pow{S}\mid A\subseteq X\}$.
\end{definition}

\begin{proposition}\label{principalfilter_iff}
    Suppose $A, B\subseteq S$.
    Then $B\in\principalfilter{S}{A}$ iff $A\subseteq B$.
\end{proposition}
\begin{proof}
    We have $B\subseteq S$ by assumption.
    We have $B\in\pow{S}$ by \cref{pow_iff,subseteq}.
    Follows by \cref{principalfilter}.
\end{proof}

\begin{proposition}\label{principalfilter_bottom}
    Suppose $A\subseteq S$.
    Then $A\in\principalfilter{S}{A}$.
\end{proposition}
\begin{proof}
    Follows by \cref{principalfilter_iff,subseteq_refl}.
\end{proof}

\begin{proposition}\label{principalfilter_top}
    Suppose $A\subseteq S$.
    Then $S\in\principalfilter{S}{A}$.
\end{proposition}
\begin{proof}
    Follows by \cref{principalfilter_iff,subseteq_refl}.
\end{proof}

\begin{proposition}\label{principalfilter_is_filter}
    Suppose $A\subseteq S$.
    Suppose $A$ is inhabited.
    Then $\principalfilter{S}{A}$ is a filter on $S$.
\end{proposition}
\begin{proof}
    $S$ is inhabited by \cref{subseteq}.
    $\principalfilter{S}{A}$ is a family of subsets of $S$
        by \cref{principalfilter,pow_iff,subseteq}.
    $S\in \principalfilter{S}{A}$ by \cref{principalfilter_top}.
    $\emptyset\notin \principalfilter{S}{A}$
        by \cref{principalfilter_iff,subseteq_emptyset_iff}.
    $\principalfilter{S}{A}$ is closed under binary intersections
        by \cref{principalfilter_iff,subseteq_inter_iff,inter_subseteq}.
    $\principalfilter{S}{A}$ is upward-closed in $S$
        by \cref{principalfilter_iff,subseteq_transitive}.
    Follows by \cref{filter}.
\end{proof}

\begin{proposition}\label{principalfilter_elem_generator}
    Suppose $A\subseteq S$.
    $A\in\principalfilter{S}{A}$.
\end{proposition}
\begin{proof}
    Follows by \cref{principalfilter_bottom}.
\end{proof}

\begin{proposition}\label{principalfilter_notelem_implies_notsupseteq}
    Let $X\in\pow{S}$.
    Suppose $X\notin\principalfilter{S}{A}$.
    Then $A\not\subseteq X$.
\end{proposition}
\begin{proof}
    Follows by \cref{principalfilter}.
\end{proof}

\begin{definition}\label{maximalfilter}
    $F$ is a maximal filter on $S$ iff
    $F$ is a filter on $S$ and there exists no filter $F'$ on $S$ such that $F\subset F'$.
\end{definition}

\begin{proposition}\label{principalfilter_singleton_is_filter}
    Suppose $a\in S$.
    Then $\principalfilter{S}{\{a\}}$ is a filter on $S$.
\end{proposition}
\begin{proof}
    $\{a\}\subseteq S$ by \cref{singleton_subset_intro}.
    $\{a\}$ is inhabited by \cref{cons_iff}.
    Follows by \cref{principalfilter_is_filter}.
\end{proof}

\begin{proposition}\label{principalfilter_singleton_is_maximal_filter}
    Suppose $a\in S$.
    Then $\principalfilter{S}{\{a\}}$ is a maximal filter on $S$.
\end{proposition}
\begin{proof}
    $\{a\}\subseteq S$ by \cref{singleton_subset_intro}.
    $\{a\}$ is inhabited by \cref{cons_iff}.
    Thus $\principalfilter{S}{\{a\}}$ is a filter on $S$ by \cref{principalfilter_is_filter}.
    Show for all $F'$ such that $F'$ is a filter on $S$
        and $\principalfilter{S}{\{a\}}\subseteq F'$
        we have $F'\subseteq\principalfilter{S}{\{a\}}$.
    \begin{subproof}
        Fix $F'$.
        Assume $F'$ is a filter on $S$
            and $\principalfilter{S}{\{a\}}\subseteq F'$.
        We have $\{a\}\in F'$
            by \cref{principalfilter_bottom,elem_subseteq}.
        Show for all $X\in F'$ we have $X\in\principalfilter{S}{\{a\}}$.
        \begin{subproof}
            Fix $X$.
            Assume $X\in F'$.
            We have $X\inter\{a\}\in F'$
                by \cref{filter,filter_inter_in_iff}.
            Thus $X\inter\{a\}\neq\emptyset$ by \cref{filter}.
            Take $b$ such that $b\in X\inter\{a\}$
                by \cref{emptyset,setext}.
            We have $b\in X$ by \cref{inter}.
            We have $b = a$ by \cref{inter,cons_iff,emptyset}.
            Thus $a\in X$ by assumption.
            Thus $\{a\}\subseteq X$ by \cref{singleton_subset_intro}.
            Follows by \cref{filter,principalfilter_iff}.
        \end{subproof}
        Follows by \cref{subseteq}.
    \end{subproof}
    We have for all $F'$ such that $F'$ is a filter on $S$
        and $\principalfilter{S}{\{a\}}\subseteq F'$
        we have $F'=\principalfilter{S}{\{a\}}$
        by \cref{subseteq_antisymmetric}.
    Follows by \cref{maximalfilter,subset}.
\end{proof}