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.
Natural Numbers
The symbol always denotes the nonnegative integers: To denote the positive integers, I use the notation 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 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 etc., are intended to imply that the sets discussed exist in some larger set or 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 ). 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.
expression | note |
---|---|
The Boolean value false. | |
The Boolean value true. | |
The proposition is false. | |
The proposition is true. | |
Not | |
and | |
Not both and (also called nand). | |
or (inclusive or). | |
Either or (exclusive or, also called xor). | |
nor (also called nor). | |
Neither nor (also called xnor). | |
If then | |
only if | |
if and only if | |
There exists an such that is true. | |
There is no such that is true. | |
There is exactly one such that is true (implies that is unique). | |
there exists exactly s such that is true | |
For all is true. | |
Not all satisfy | |
is equivalent to | |
therefore | |
because | |
The empty set. | |
set of elements (unordered, no repetitions, variable-size). | |
tuple of elements (ordered, repetitions permitted, fixed-size). | |
bag of elements (unordered, repetitions permitted, variable-size). | |
sequence of elements (ordered, repetitions permitted, variable-size). | |
permutation of elements (ordered, no repetitions, variable-size). | |
The set of all that satisfy the statement | |
An infinite set starting with and so on. | |
Infinite set containing and | |
is an element of | |
is not an element of | |
The cardinality of (the number of elements in ). | |
All are , not all are ( is a strict subset of ). | |
All are , and all are possibly all | |
is not a strict subset of ; no s are s, but all s are possibly s | |
is not a subset of ; no s are s, and no s are s | |
The power set of | |
The disjoint union of and | |
Symmetric difference of and | |
Ordered pair, or simply pair. | |
Ordered triple, or simply triple. | |
Cartesian product of and | |
Cartesian power of | |
The set of all natural numbers | |
The set of all primes | |
The set of all even natural numbers | |
The set of all odd natural numbers | |
The set of all integers (from the German zahl, meaning number) | |
The set of all positive integers | |
The set of all negative integers | |
The set of all even integers | |
The set of all odd integers | |
The set of all rationals (from the word quotient) | |
The set of all real numbers | |
The set of all positive real numbers. | |
The set of all negative real numbers | |
The set of all complex numbers | |
divides ; is a factor of ; is a multiple of | |
does not divide | |
The floor of | |
The ceiling of | |
The remainder of | |
Integer quotient of | |
A relation between and (e.g., ). | |
Reflexive relation. | |
Symmetric relation. | |
Antisymmetric relation. | |
Transitive relation. | |
Equivalence relation (reflexive, symmetric, and transitive). | |
A function from to | |
Function definition, where is an expression of (e.g., ). | |
The domain of a function | |
The range of a function | |
The image of a function | |
Injective function. | |
Surjective function. | |
Bijective function (injective and surjective function). | |
(absolute value). | |
These are expressions used in ISL.
expression | note |
---|---|
Assign the variable the value | |
Push the value 1 into | |
String concatentation | |
Returns the last element of a linear ordering | |
Returns the first element of a linear ordering | |
Pack objects into containers. | |
-element static array | |
-element dynamic array | |
-element linked-list | |
-element set |
Basic Propositions
These are basic propositions that may or may not be assumed in the notes.
0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 |
0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 |
1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
logic propositions | note |
---|---|
Double Negation | |
De Morgan's Law 1 | |
De Morgan's Law 2 | |
Contrapositive | |
Modus Ponens | |
Modus Tollens | |
Hypothetical Syllogism | |
Disjunctive Syllogism |
Below are some common natural language propositions alongside their negations.
natural language proposition | negation |
---|---|
or | (not ) and (not ) |
and | (not ) and (not ) |
If then | () and (not ) |
For all | there exist such that not |
There exists such that | for every not |
set theory propositions | note |
---|---|
Intersection is always a subset of the union. | |
The union of a set and itself is itself. | |
The intersection of a set and itself is itself. | |
If the union and intersection of two sets are equal, then the two sets are equal. | |
If the union of and is then is a subset of | |
If the intersection of and is then is a subset of | |
The union of and everything outside of it is the domain of discourse. | |
The intersection of a set and nothing is the set itself. | |
The union of a domain of discourse and a set is the domain of discourse. | |
The intersection of a domain of discourse and a set is the set itself. | |
The intersection of a set and everything outside of it is nothing. | |
The intersection of a set and nothing is nothing. | |
There is nothing outside the domain of discourse. | |
Outside nothing is the domain of discourse. | |
Double complement law. | |
is commutative. | |
is commutative. | |
is associative. | |
is associative. | |
is distributive over | |
is distributive over | |
De Morgan's law 1 | |
De Morgan's law 2 | |
is commutative. | |
is associative. | |
The symmetric difference of a set and nothing is the set itself. | |
The symmetric difference of a set and itself is nothing. | |
The symmetric difference of a set and everything outside of it is the domain of discourse. | |
Equality of ordered pairs. | |
Cardinality of a Cartesian product. | |
Cardinality of a power set (2 raised to the cardinality of the set). | |
Inclusion-exclusion Principle. | |
Pigeonhole Principle. If objects are placed into bins, there is at least one object containing at least objects. |
All variables in the table below are variables in
algebra propositions | notes |
---|---|
is commutative on | |
is commutative on | |
is associative on | |
is associative on | |
has an additive identity | |
has an additive inverse | |
has a multiplicative identity | |
has a multiplicative inverse | |
doesn't imply that | |
is distributive over | |
Trichotomy Law | |
Corollary of trichotomy law | |
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 is true, then is true and if is true is true. Equivalently, if is is false, then is false, and if is false, is false.
At Least, At Most
The idiom at least implies a floor — there must be, at a minimum, It also implies that we can have more than 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 implies a ceiling — there must be, at most, It also implies that we can have less than 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 " I mean that there exists at least one but I don't preclude the possibility of there being many s. The morphemes many and most and the idioms not all and there exists are all synonyms for some.
But
The syntactic structure but is prose for and not 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 only if is equivalent to the structure if then . The idiom "only if" merely introduces the necessary condition
Any, Every, and Each
The morphemes any, every, and each are all synonyms for all. For example, the statement " for any real number " is equivalent to saying, "For all real numbers it is true that "
But For
The syntactic structure but for is equivalent to the statement was caused by, and only by, .
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 is defined.
- Structure is defined.
- Input:
- , the insertion's targeted tree.
- , the inserted node's data.
- Output:
- if then
- init
- else
- init
- init
- while do
- if then
- else if then
- else return
- if then
- else
- return
An accompanying node structure:
- structure contains
- end
The underlying syntax and lexicon are explained as needed in the notes.
Footnotes
-
Pauls Halmos, How to Write Mathematics 2 (1973) (available at sciencesconf.org). ↩