Notes

This is a collection of some math, logic, and CS notes I've taken over the years. The collection comprises two volumes, Review of Computer Science and Review of Mathematics. These two volumes are then divided into topics (corresponding to a course I've taken), articles (a topic in that course), sections, subsections, and so on. The Index button above provides a table of contents.

The sections below define the conventions and styles I adopt throughout the notes. If a particular syntactic structure, idiom, morpheme, glyph, or symbol is unclear, return to this page for reference. These are personal conventions. They should not be treated as standards or assumed to be common place.

Ketib

Natural Numbers

The symbol N{\nat} always denotes the nonnegative integers: {0,1,2,3,}.{\set{0,1,2,3,\ldots}.} To denote the positive integers, I use the notation Z+.{\uint^+.} I adopt this convention because many of the notes assume von Neumann's construction of the naturals, and I've personally found it's much easier constructing them with :=0.{\nil := 0.} This is just anecdote and personal preference. Edmund Landau, in his book foundations of analysis (1960), uses the classical construction starting at 1, and it's a sterling example of mathematical exposition.

Choice of Set Theory

A majority of the notes (roughly 98.73% on the last count) assume ZF set theory. As such, the terms "universal set" or "domain of discourse" of the sets A,{A,} B,{B,} C,{C,} etc., are intended to imply that the sets discussed exist in some larger set U{U} or D.{D.} They do not imply that there exists a set of all sets. A minority of the notes delve into other set theory (e.g., NFU). Those notes will always be prefaced with a bold WITHIN (set theory x{x}). I state this upfront to avoid the "eggshell walking" sensation that occasionally accompanies using set theory terms.

"Calculus"

As Paul Halmos wrote, "Calculus books are bad because there is no such subject as calculus."1 Both linguistics and the history of mathematics are on his side. In Latin, the word calculus is the diminutive of calx, meaning "limestone" (from which we inherit the word calcium). Accordingly, calculus books often translate calculus as "pebble" in a footnote, suggesting the Romans — the people who gaves us arches and the Justinian Code — used rocks to add and subtract. Already, something strange is afoot. Although the Romans certainly weren't as interested in mathematics as the Greeks, they also weren't troglodytes chained to Plato's cave. Those "rocks" were beads on an abacus.

A better citation would be to the Oxford dictionary's definition: "A particular method or system of calculation or reasoning." This would be in line with what Newton and Leibniz ventured — investigating methods of reasoning about infinites and infinitesimals. It would also hint at why topic transitions in calculus feel rough to many readers. The move from derivatives to integrals is often clear, but not so much volumes, disks, sequences and series. Why? Because the standard calculus course is a smorgasbord of ideas from various mathematical domains: logic, set theory, algebra, geometry, analysis, field theory, topology, differentiation, integration, measure theory, linear algebra, ..., some application the author is interested in.

Because of this, there aren't any "calculus" notes, in so far as there isn't a heading called Calculus. There was such a header at first. But organizing my notes over the years, the header's directory emptied steadily — its contents ebbed, flowing into specific folders without my explicit notice (a side effect of working predominantly via console). A colleague asked one day if I had any materials on calculus, and to my surprise, there was no explicit header called Calculus. All of this is to say that branches of mathematics aren't disjoint sets, and the notes may not fall under a heading the reader would expect.

Symbols

Below are some symbols used in the materials.

expressionnote
0{0}The Boolean value false.
1{1}The Boolean value true.
(p){\bot(p)}The proposition p{p} is false.
(p){\top(p)}The proposition p{p} is true.
¬p{\neg p}Not p.{p.}
ab{a \land b}a{a} and b.{b.}
a  b{a \lnand b}Not both a{a} and b{b} (also called nand).
ab{a \lor b}a{a} or b{b} (inclusive or).
a  b{a \lxor b}Either a{a} or b{b} (exclusive or, also called xor).
a  b{a \lnor b}a{a} nor b{b} (also called nor).
a  b{a \lxnor b}Neither a{a} nor b{b} (also called xnor).
ab{a \nc b}If a{a} then b.{b.}
ab{a \cn b}a{a} only if b.{b.}
ab{a \iff b}a{a} if and only if b.{b.}
x[(p)]{\lex x \ix{\top(p)}}There exists an x{x} such that p{p} is true.
x[(p)]{\lnex x \ix{\top(p)}}There is no x{x} such that p{p} is true.
!x[(p)]{\uni x \ix{\top(p)}}There is exactly one x{x} such that p{p} is true (implies that x{x} is unique).
nx[(p)]{\exists_n x \ix{\top(p)}}there exists exactly n{n} x{x}s such that P{P} is true
x[(p)]{\all x \ix{\top(p)}}For all x,{x,} p{p} is true.
  x[(p)]{\nall x \ix{\top(p)}}Not all x{x} satisfy p.{p.}
ab{a \equiv b}a{a} is equivalent to b.{b.}
ab{a \tf b}a{a} therefore b.{b.}
ba{b \ft a}b{b} because a.{a.}
{\nil}The empty set.
{a1,a2,a3,,an1}{\set{a_1, a_2, a_3, \ldots, a_{n-1}}}set of n{n} elements (unordered, no repetitions, variable-size).
(a1,a2,a3,,an1){\ar{a_1, a_2, a_3, \ldots, a_{n_1}}}tuple of n{n} elements (ordered, repetitions permitted, fixed-size).
a1,a2,a3,,an1{\bag{a_1, a_2, a_3, \ldots, a_{n-1}}}bag of n{n} elements (unordered, repetitions permitted, variable-size).
[a1,a2,a3,,an1]{\ix{a_1, a_2, a_3, \ldots, a_{n-1}}}sequence of n{n} elements (ordered, repetitions permitted, variable-size).
a1,a2,a3,,an1{\per{a_1, a_2, a_3, \ldots, a_{n-1}}}permutation of n{n} elements (ordered, no repetitions, variable-size).
{x:P(x)}{\set{x : P(x)}}The set of all x{x} that satisfy the statement P.{P.}
{a,b,c,}{\set{a,b,c,\ldots}}An infinite set starting with a,{a,} b,{b,} c,{c,} and so on.
{,a,b,c,}{\set{\ldots, a,b,c,\ldots}}Infinite set containing a,{a,} b,{b,} and c.{c.}
xS{x \in S}x{x} is an element of S.{S.}
xS{x \nin S}x{x} is not an element of S.{S.}
#(S){\num{S}}The cardinality of S{S} (the number of elements in S{S}).
AB{A \are B}All A{A} are B{B}, not all B{B} are A{A} (A{A} is a strict subset of B{B}).
AB{A \is B}All A{A} are B{B}, and all B{B} are possibly all A.{A.}
A⊄B{A \not\subset B}A{A} is not a strict subset of B{B}; no A{A}s are B{B}s, but all B{B}s are possibly A{A}s
A⊈B{A \not\subseteq B}A{A} is not a subset of B{B}; no A{A}s are B{B}s, and no B{B}s are A{A}s
A=B{A = B}x(xAxxB).{\forall x (x \in A \nc x \iff x \in B).}
 P(A){\pow{A}}The power set of A.{A.}  P({a,b})={,{a},{b},{a,b}}.{\pow{\set{a,b}} = \set{\nil, \set{a}, \set{b}, \set{a,b}}.}
AB{A \cap B}{x:(xA)(xB)}.{\set{x : (x \in A) \land (x \in B)}.}
A  B{A \dis B}AB=.{A \cap B = \nil.}
AB{A \cup B}{x:(xA)(xB)(xAB)}{\set{x : (x \in A) \lor (x \in B) \lor (x \in A \cap B)}}
AB{A \dup B}The disjoint union of A{A} and B.{B.} {x:((xA)  (xB))(A  B)}.{\set{x : ((x \in A) \lxor (x \in B)) \land (A \dis B)}.}
AB{A \rid B}{x:(xA)(xB)}.{\set{x : (x \in A) \land (x \notin B)}.}
AB{A \dif B}Symmetric difference of A{A} and B.{B.} (AB)(BA).{(A \rid B) \cup (B \rid A).}
Ac{\nix{A}}{x:xA}{\set{x : x \nin A}}
(a,b){(a,b)}Ordered pair, or simply pair.
(a,b,c){(a,b,c)}Ordered triple, or simply triple.
A×B{A \times B}Cartesian product of A{A} and B.{B.} {(a,b)(aA)(bB)}{\set{(a,b) \mid (a \in A) \land (b \in B)}}
An{A^n}Cartesian power of A.{A.} A×A××A×A.{A \times A \times \ldots \times A \times A.}
N{\nat}The set of all natural numbers
P{\primes}The set of all primes
2N{\nevens}The set of all even natural numbers
N2N{\nodds}The set of all odd natural numbers
Z{\uint}The set of all integers (from the German zahl, meaning number)
Z+{\pint}The set of all positive integers
Z{\nint}The set of all negative integers
2Z{\evens}The set of all even integers
Z2Z{\odds}The set of all odd integers
Q{\rat}The set of all rationals (from the word quotient)
R{\reals}The set of all real numbers
R+{\reals^+}The set of all positive real numbers.
R{\reals^-}The set of all negative real numbers
C{\com}The set of all complex numbers
a  b{a \dv b}a{a} divides b{b}; a{a} is a factor of b{b}; b{b} is a multiple of a{a}
ab{a \ndv b}a{a} does not divide b{b}
x{\floor{x}}The floor of x{x}
x{\ceil{x}}The ceiling of x{x}
a rem b{a \rem b}The remainder of b/a{b/a}
a div b{a \quo b}Integer quotient of b/a{b/a}
aRb{a \rel b}A relation between a{a} and b{b} (e.g., a<b{a \lt b}). {(a,b):aRb}.{\set{(a,b) : a \rel b}.}
R:SSxS[xRx]{R: S \to S \iff \all x \in S \ix{x \rel x}}Reflexive relation.
R:SSa,bS[aRbbRa]{R: S \to S \iff \all a,b \in S \ix{a \rel b \nc b \rel a}}Symmetric relation.
R:SSa,bS[(aRb)(bRa)(a=b)]{R: S \to S \iff \all a,b \in S \ix{(a \rel b) \land (b \rel a) \nc (a = b)}}Antisymmetric relation.
R:SSa,b,cS[(aRb)(bRc)(aRc)]{R: S \to S \iff \all a,b,c \in S \ix{(a \rel b) \land (b \rel c) \nc (a \rel c)}}Transitive relation.
R:SSa,bS[ab]{R: S \to S \iff \all a,b \in S \ix{a \equiv b}}Equivalence relation (reflexive, symmetric, and transitive).
f:XY{f : X \mapsto Y}A function f{f} from x{x} to y.{y.}
f(x)=ex{f(x) = e_x}Function definition, where ex{e_x} is an expression of x{x} (e.g., f(x)=x2{f(x) = x^2}).
dom(f){\dom{f}}The domain of a function f.{f.}
ran(f){\ran{f}}The range of a function f.{f.}
(f){\image{(f)}}The image of a function f.{f.}
(f:XY)a,bX[f(a)=f(b)a=b]{(f: X \inj Y) \iff \forall a,b \in X \ix{f(a) = f(b) \nc a = b}}Injective function.
(f:XY)(yYxXf(x)=y){(f: X \surj Y) \iff (y \in Y \nc \lex x \in X \land f(x) = y)}Surjective function.
(f:XY)([f:XY][f:XY]){(f: X \bij Y) \iff (\ix{f : X \inj Y} \land \ix{f: X \surj Y})}Bijective function (injective and surjective function).
x=y{x = y}x,yRxy=0{x,y \in \reals \nc x-y = 0}
x{\abs{x}}xRx=x2{x \in \reals \nc \abs{x} = \sqrt{x^2}} (absolute value).
a>b{a \gt b}abR+.{a - b \in \reals^+.}
a<b{a \lt b}b>a.{b \gt a.}
ab{a \ge b}(a>b)(a=b).{(a \gt b) \lor (a = b).}
ab{a \le b}(a<b)(a=b).{(a \lt b) \lor (a = b).}
a<b<c{a \lt b \lt c}(a<b)(b<c).{(a \lt b) \land (b \lt c).}
ab<c{a \le b \lt c}[(a<b)(a=b)](b<c).{\ix{(a \lt b) \lor (a=b)} \land (b \lt c).}
a<bc{a \lt b \le c}(a<b)[(b<c)(b=c)].{(a \lt b) \land \ix{(b \lt c) \lor (b = c)}.}
abc{a \le b \le c}[(a<b)(a=b)][(b<c)(b=c)].{\ix{(a \lt b) \lor (a = b)} \land \ix{(b \lt c) \lor (b=c)}.}

These are expressions used in ISL.

expressionnote
xv{\let{x}{v}}Assign the variable x{x} the value v.{v.}
A1{{A}\push{1}}Push the value 1 into A{A}
“abc”⧺“def”=“abcdef”{\string{abc} \con \string{def} = \string{abcdef}}String concatentation
tail (a0,a1,a2,,an1)=an1{\df{tail}~(a_0,a_1,a_2,\ldots,a_{n-1}) = a_{n-1}}Returns the last element of a linear ordering
head (a0,a1,a2,,an1)=a0{\df{head}~(a_0,a_1,a_2,\ldots,a_{n-1}) = a_{0}}Returns the first element of a linear ordering
{a0,a1,,an1}{{ }0,{ }1,,{ }x1}{\set{a_0, a_1, \ldots, a_{n-1}} \multimap \set{\set{~}_0, \set{~}_1, \ldots, \set{~}_{x-1}}}Pack n{n} objects into x{x} containers.
[e0,e1,,en]{\ix{e_0, e_1, \ldots, e_n}}n{n}-element static array
e0,e1,,en{\lang{e_0, e_1, \ldots, e_n}\rang}n{n}-element dynamic array
(e0,e1,,en){(e_0, e_1, \ldots, e_n)}n{n}-element linked-list
{e0,e1,,en}{\set{e_0, e_1, \ldots, e_n}}n{n}-element set

Basic Propositions

These are basic propositions that may or may not be assumed in the notes.

a{a}b{b}¬a{\neg a}ab{a \land b}ab{a \lor b}ab{a \nc b}ab{a \iff b}a  b{a \lxor b}a  b{a \lnor b}a  b{a \lnand b}a  b{a \lxnor b}
00100110111
01101101010
10001001010
11011110001
logic propositionsnote
¬(¬p)p{\neg(\neg p) \iff p}Double Negation
¬(ab)¬a¬b{\neg(a \land b) \iff \neg a \lor \neg b}De Morgan's Law 1
¬(ab)¬a¬b{\neg(a \lor b) \iff \neg a \land \neg b}De Morgan's Law 2
p1p{p \land 1 \iff p}
p00{p \land 0 \iff 0}
p0p{p \lor 0 \iff p}
p11{p \lor 1 \iff 1}
ppp{p \lor p \iff p}
ppp{p \land p \iff p}
abba{a \lor b \iff b \lor a}
abba{a \land b \iff b \land a}
(abc)(ab)ca(bc){(a \lor b \lor c) \iff (a \lor b) \lor c \iff a \lor (b \lor c)}
(abc)(ab)ca(bc){(a \land b \lor c) \iff (a \land b) \land c \iff a \land (b \land c)}
a(bc)(ab)(ac){a \lor (b \land c) \iff (a \lor b) \land (a \lor c)}
a(bc)(ab)(ac){a \land (b \lor c) \iff (a \land b) \lor (a \land c)}
a(ab)a{a \lor (a \land b) \iff a}
a(ab)a{a \land (a \lor b) \iff a}
p(¬p)1{p \lor (\neg p) \iff 1}
p(¬p)0{p \land (\neg p) \iff 0}
ab(¬a)b{a \nc b \equiv (\neg a) \lor b}
ab(¬b)(¬a){a \nc b \equiv (\neg b) \nc (\neg a)}Contrapositive
ab(¬ab){a \lor b \equiv (\neg a \nc b)}
ϕ, ϕψψ{\phi, ~ \phi \nc \psi \tf \psi}Modus Ponens
¬ψ, ϕψ¬ϕ{\neg \psi, ~ \phi \nc \psi \tf \neg \phi}Modus Tollens
ϕψ, ψξξ{\phi \nc \psi, ~ \psi \nc \xi \tf \xi }Hypothetical Syllogism
ϕψ,¬ϕψ{\phi \lor \psi, \neg \phi \tf \psi}Disjunctive Syllogism

Below are some common natural language propositions alongside their negations.

natural language propositionnegation
A{A} or B{B}(not A{A}) and (not B{B})
A{A} and B{B}(not A{A}) and (not B{B})
If A{A} then B{B}(A{A}) and (not B{B})
For all x,{x,} claim(x){\df{claim}(x)}there exist x{x} such that not claim(x){\df{claim}(x)}
There exists x{x} such that claim(x){\df{claim}(x)}for every x,{x,} not claim(x){\df{claim}(x)}
set theory propositionsnote
(AB)(AB){(A \cap B) \subseteq (A \cup B)}Intersection is always a subset of the union.
AA=A{A \cup A = A}The union of a set and itself is itself.
AA=A{A \cap A = A}The intersection of a set and itself is itself.
(AB=AB)A=B{(A \cup B = A \cap B) \nc A = B}If the union and intersection of two sets are equal, then the two sets are equal.
(AB=A)(BA){(A \cup B = A) \iff (B \is A)}If the union of A{A} and B{B} is A,{A,} then B{B} is a subset of A.{A.}
(AB=A)(AB){(A \cap B = A) \iff (A \is B)}If the intersection of A{A} and B{B} is A,{A,} then A{A} is a subset of B.{B.}
AAc=D{A \cup \nix{A} = \mathbb{D}}The union of A{A} and everything outside of it is the domain of discourse.
A=A{A \cup \nil = A}The intersection of a set and nothing is the set itself.
AD=D{A \cup \mathbb{D} = \mathbb{D}}The union of a domain of discourse and a set is the domain of discourse.
AD=A{A \cap \mathbb{D} = A}The intersection of a domain of discourse and a set is the set itself.
AAc={A \cap \nix{A} = \nil}The intersection of a set and everything outside of it is nothing.
A={A \cap \nil = \nil}The intersection of a set and nothing is nothing.
Dc={\nix{\mathbb{D}} = \nil}There is nothing outside the domain of discourse.
c=D{\nix{\nil}={\mathbb{D}}}Outside nothing is the domain of discourse.
(Ac)c{\nix{(\nix{A})}}Double complement law.
AB=BA{A \cup B = B \cup A}{\cup} is commutative.
AB=BA{A \cap B = B \cap A}{\cap} is commutative.
(AB)C=A(BC){(A \cup B) \cup C = A \cup (B \cup C)}{\cup} is associative.
(AB)C=A(BC){(A \cap B) \cap C = A \cap (B \cap C)}{\cap} is associative.
A(BC)=(AB)(AC){A \cup (B \cap C) = (A \cup B) \cap (A \cup C)}{\cup} is distributive over .{\cap.}
A(BC)=(AB)(AC){A \cap (B \cup C) = (A \cap B) \cup (A \cap C)}{\cap} is distributive over .{\cup.}
(AB)c=AcBc{\nix{(A \cup B)} = \nix{A} \cap \nix{B}}De Morgan's law 1
(AB)c=AcBc{\nix{(A \cap B)} = \nix{A} \cup \nix{B}}De Morgan's law 2
AB=BA{A \dif B = B \dif A}{\dif} is commutative.
A(BC)=(AB)C{A \dif (B \dif C) = (A \dif B) \dif C}{\dif} is associative.
A=A{A \dif \nil = A}The symmetric difference of a set and nothing is the set itself.
AA={A \dif A = \nil}The symmetric difference of a set and itself is nothing.
AAc=D{A \dif \nix{A} = \mathbb{D}}The symmetric difference of a set and everything outside of it is the domain of discourse.
(a,b)=(c,d)(a=cb=d){(a,b)=(c,d) \iff (a=c \land b=d)}Equality of ordered pairs.
#(A×B)=#(A)#(B){\num{A \times B} = \num{A} \by \num{B}}Cardinality of a Cartesian product.
#( P(A))=2#(A){\num{\pow{A}} = 2^{\num{A}}}Cardinality of a power set (2 raised to the cardinality of the set).
#(AB)=#(A)+#(B)#(AB){\num{A \cup B} = \num{A} + \num{B} - \num{A \cap B}}Inclusion-exclusion Principle.
[f:AB(#(A)>#(B))]¬(f:AB){[f : A \mapsto B \land (\num{A} \gt \num{B})] \nc \neg (f: A \inj B)}Pigeonhole Principle. If n{n} objects are placed into k{k} bins, there is at least one object containing at least n/k{\ceil{n/k}} objects.

All variables in the table below are variables in R.{\reals.}

algebra propositionsnotes
a+b=b+a{a + b = b + a}+{+} is commutative on R{\reals}
ab=ba{a \by b = b \by a}{\by} is commutative on R{\reals}
(a+b)+c=a+(b+c){(a + b) + c = a + (b + c)}+{+} is associative on R{\reals}
(ab)c=a(bc){(a \by b) \by c = a \by (b \by c)}{\by} is associative on R{\reals}
a+0=0+a=a{a + 0 = 0 + a = a}R{\reals} has an additive identity
a+(a)=(a)+a=0{a + (-a) = (-a) + a = 0}R{\reals} has an additive inverse
a1=1a=a{a \by 1 = 1 \by a = a}R{\reals} has a multiplicative identity
aa1=a1a=1{a \by a^{-1} = a^{-1} \by a = 1}R{\reals} has a multiplicative inverse
(a+x=a)(x=0){(a + x = a) \iff (x = 0)}
(ab=ba)(a=b){(a - b = b - a) \iff (a = b)}
(ab=ac)[(a=0)(b=c)]{(ab = ac) \nc \ix{(a = 0) \lor (b = c)}}ab=ac{ab = ac} doesn't imply that b=c.{b = c.}
a(b+c)=(ab)+(ac){a \by (b + c) = (a \by b) + (a \by c)}{\by} is distributive over +{+}
(a)(b)=ab{(-a) \by (-b) = a \by b}
xR:(x=0)(x>0)(x<0){\forall x \in \reals: (x = 0) \lor (x \gt 0) \lor (x \lt 0)}Trichotomy Law
a,bR:(a=b)  (a<b)  (b<a){\forall a,b \in \reals: (a = b) \lxor (a \lt b) \lxor (b \lt a)}Corollary of trichotomy law
a,bR:(a<b)(a+c<b+c){\forall a,b \in \reals: (a \lt b) \nc (a + c \lt b + c)}
xR:(a2>0)(a0){\forall x \in \reals: (a^2 \gt 0) \iff (a \neq 0)}
¬(a<b)(a=ba>b){\neg(a \lt b) \nc (a = b \lor a \gt b)}abab{a \not\lt b \equiv a \ge b}
¬(a>b)(a=ba<b){\neg(a \gt b) \nc (a = b \lor a \lt b)}abab{a \not\gt b \equiv a \le b}
¬(ab)(a>b){\neg(a \le b) \nc (a \gt b)}a≰ba>b{a \not\le b \equiv a \gt b}
¬(ab)(a<b){\neg(a \ge b) \nc (a \lt b)}a≱ba<b{a \not\ge b \equiv a \lt b}
¬(a<b<c)[(a=b)(b>a)(b=c)(b>c)]{\neg(a \lt b \lt c) \nc \ix{(a = b) \lor (b \gt a) \lor (b = c) \lor (b \gt c)}}abcabc{a \not\lt b \not\lt c \equiv a \ge b \ge c}
¬(ab<c)[(a>b)((b=c)(b>c))]{\neg(a \le b \lt c) \nc \ix{(a \gt b) \land ((b = c) \lor (b \gt c))}}a≰bca>bc{a \not\le b \not\lt c \equiv a \gt b \ge c}
¬(a<bc)[((a=b)(a>b))(b>c)]{\neg(a \lt b \le c) \nc \ix{((a = b) \lor (a \gt b)) \land (b \gt c)}}ab≰cab>c{a \not\lt b \not\le c \equiv a \ge b \gt c}
¬(a<=b<=c)[(a>b)(b>c)]{\neg(a \lte b \lte c) \nc \ix{(a \gt b) \land (b \gt c)}}a≰b≰ca>b>c{a \not\le b \not\le c \equiv a \gt b \gt c}
(a<bc<d)(a+c<b+d){(a \lt b \land c \lt d) \nc (a + c \lt b + d)}
(a<b)(b<a){(a \lt b) \nc (-b \lt -a)}
[(a<b)(c>d)](ac<bd){\ix{(a \lt b) \land (c \gt d)} \nc (a - c \lt b - d)}

If

The syntactic structure if x then y communicates: if x is true, then y must be true. On its own, it says nothing about whether x is true or y is true. Thus, it has its own truth value, independent of x and y. This point is all too often missed. If it turns out that x is false, then the proposition if x then y is true. The only case where if x then y is false is where x is true and y is false.

Iff

The idiom iff is a clipping of if and only if. It means, if x{x} is true, then y{y} is true and if y{y} is true x{x} is true. Equivalently, if x{x} is is false, then x{x} is false, and if y{y} is false, x{x} is false.

At Least, At Most

The idiom at least x{x} implies a floor — there must be, at a minimum, x.{x.} It also implies that we can have more than x.{x.} For example, the sentence "There are at least four apples in the bag" is just a convenient way of communicating two statements: (1) There can be five, six, seven, ... apples in the bag, and (2) it is not the case that there are three, two, one, or no apples in the bag.

The idiom at most x{x} implies a ceiling — there must be, at most, x.{x.} It also implies that we can have less than x.{x.} The sentence "There are at most three students in the class" is just a more concise way of saying: (1) There are either no students in the class, (2) there are one, two, or three students in the class, and (3) it is not the case that there are four, five, six,... students in the class.

Some

The morpheme some means at least one, which implies that there may or may not be more than one. Thus, when I use the word "some x{x}" I mean that there exists at least one x,{x,} but I don't preclude the possibility of there being many x{x}s. The morphemes many and most and the idioms not all and there exists are all synonyms for some.

But

The syntactic structure x{x} but y{y} is prose for x{x} and not y.{y.} For example, the sentence "Harry ate the cake but didn't like it" is equivalent to "Harry at the cake and did not like it."

Only If

The syntactic structure x{x} only if y{y} is equivalent to the structure if x{x} then y{y}. The idiom "only if" merely introduces the necessary condition y.{y.}

Any, Every, and Each

The morphemes any, every, and each are all synonyms for all. For example, the statement "x0=x{x-0=x} for any real number x{x}" is equivalent to saying, "For all real numbers x,{x,} it is true that x0=x.{x-0=x.}"

But For

The syntactic structure x{x} but for y{y} is equivalent to the statement x{x} was caused by, and only by, y{y}.

Informal Specification Language

The materials on algorithms are often written in pseudocode, using a language called ISL (Informal Specification Language). This is a small language I've constructed to maintain generality and consistency in algorithm specification. I try to keep the specification as programming language neutral as possible, but this is much harder than it sounds — some constructs end up resembling C, others SML, and others Python. There really ought to be a study on programming language deprivation — Roger Shattuck's "forbidden experiment" à la vanille — where logicians or set theorists, devoid of any exposure to programming languages, construct a pseudocode language under memory and processing constraints. Unfortunately (or perhaps fortunately), it's unclear whether such a sample space exists. Some ISL code:

Binary Tree Node Insertion

  • Identifier: insert
  • Preconditions:
    • Structure node{\df{node}} is defined.
    • Structure binary-tree{\df{binary-tree}} is defined.
  • Input:
    • binary-tree{\df{binary-tree}^*} t{t}, the insertion's targeted tree.
    • comparable{\df{comparable}} d{d}, the inserted node's data.
  • Output: binary-tree{\df{binary-tree}^*}
  1. if  t[root]= {~ {t} \ix{\tx{root}} = \nil ~} then
    1. init node{\df{node}^*} nnew node(d){\let{n}{\df{new node}(d)}}
    2. t[root]n{{t} \ix{\tx{root}} \gets n}
  2. else
    1. init node{\df{node}^*} pt[root]{p \gets {t} \ix{\tx{root}}}
    2. init node{\df{node}^*} r{r \gets \nil}
    3. while p{p \neq \nil} do
      1. rp{r \gets p}
      2. if d<p[datum]{{d} \lt p \ix{\tx{datum}}} then pp[left-child]{p \gets p \ix{\tx{left-child}}}
      3. else if d>p[datum]{{d} \gt p \ix{\tx{datum}}} then pp[right-child]{p \gets p \ix{\tx{right-child}}}
      4. else return t{t}
    4. pnew node(d){p \gets \df{new node}({d})}
    5. if d<r[datum]{{d} \lt r \ix{\tx{datum}}} then rp[left-child]{r \gets p \ix{\tx{left-child}}}
    6. else r[right-child]p{r \ix{\tx{right-child}} \gets p}
  3. return t{t} {\blacksquare}

An accompanying node structure:

  • structure node{\df{node}} contains
    1. comparable datum{\df{comparable} ~ \tx{datum}}
    2. node left-child{\df{node}^* ~ \tx{left-child}}
    3. node right-child{\df{node}^* ~ \tx{right-child}}
  • end

The underlying syntax and lexicon are explained as needed in the notes.

Footnotes

  1. Pauls Halmos, How to Write Mathematics 2 (1973) (available at sciencesconf.org).