-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
133 lines (118 loc) · 3.6 KB
/
demo.html
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
<!doctype html>
<html>
<head>
<title>Counters Demo</title>
<script>
MathJax = {
loader: {
load: ["[tex]/tagformat", "[counter]/counter.js"],
paths: { counter: "./browser" },
},
tex: {
tags: "ams",
tagformat: {
number: (n) => {
const subsectionString = MathJax.config.counters.subsection[0];
return `${subsectionString}.${n}`;
},
},
packages: {
"[+]": ["counter", "tagformat"],
},
macros: {
intersects: "\\ni\\mathrel{\\mkern-3mu}\\in",
},
},
};
</script>
<script
type="text/javascript"
async
src="./node_modules/mathjax-full/bundle/tex-mml-chtml.js"
></script>
<style>
.hidden {
display: none;
}
body {
margin-left: 6em;
margin-right: 6em;
margin-top: 2em;
margin-bottom: 2em;
}
h3 {
margin-left: 1em;
margin-right: 1em;
}
p {
margin-left: 2.5em;
margin-right: 2.5em;
}
</style>
</head>
<body>
<h1>Set Operations</h1>
<!-- prettier-ignore -->
<span class="hidden">\[
\newcounter{section} \newcounter{subsection} % counters start at 0
% Reset subsection (set it to 0) whenever section is stepped
\counterwithin{subsection}{section}
\newcommand{\section}{\stepcounter{section} \thesection}
\newcommand{\subsection}{\stepcounter{subsection} \thesubsection}
\]</span>
<h2>\(\section\) Union</h2>
<!-- prettier-ignore -->
<p>
The <i>union</i> (denoted by \(\cup\)) of a collection of sets is the set
of all elements in the collection. For example, if \(A\) and \(B\) are
sets, their union is
\begin{equation}
A \cup B = \{ x \mid x \in A \text{ or } x \in B \} \,.
\end{equation}
</p>
<h3>\(\subsection\) Notation</h3>
<p>
For a union of sets \(S_{1}, S_{2}, S_{3}, \dots, S_{n}\) one can use the
notation \(\bigcup_{i=1}^{n} S_{i}\) instead of \(S_{1} \cup S_{2} \cup
S_{3} \cup \dots \cup S_{n}\).
</p>
<h3>\(\subsection\) Properties</h3>
<!-- prettier-ignore -->
<p>
The union operation is commutative, associative, and idempotent. That is,
for any sets \(A\), \(B\), and \(C\):
\begin{align}
A \cup B &= B \cup A \\
A \cup (B \cup C) &= (A \cup B) \cup C \\
A \cup A &= A
\end{align}
</p>
<h2>\(\section\) Intersection</h2>
<!-- prettier-ignore -->
<p>
The <i>intersection</i> (denoted by \(\cap\)) of a collection of sets is the
set containing every element \(x\) where \(x\) belongs to every set in the
collection. For example, if \(A\) and \(B\) are sets, their intersection is
\begin{equation}
A \cap B = \{ x \mid x \in A \text{ and } x \in B \} \,.
\end{equation}
</p>
<h3>\(\subsection\) Notation</h3>
<p>
For an intersection of sets \(S_{1}, S_{2}, S_{3}, \dots, S_{n}\) one can
use the notation \(\bigcap_{i=1}^{n} S_{i}\) instead of \(S_{1} \cap S_{2}
\cap S_{3} \cap \dots \cap S_{n}\).
</p>
<h3>\(\subsection\) Properties</h3>
<!-- prettier-ignore -->
<p>
The intersection operator is commutative, associative, and idempotent. That
is, for any sets \(A\), \(B\), and \(C\):
\begin{align}
A \cap B &= B \cap A \\
A \cap (B \cap C) &= (A \cap B) \cap C \\
A \cap A &= A
\end{align}
</p>
</body>
</html>