If you want to make an apple pie from scratch, you must first create the universe.— Carl Sagan
Contrariwise,continued Tweedledee,if it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.— Through the Looking Glass by Lewis Carroll
A familiar argument:
Conclusion: Socrates is mortal.
A less familiar, but still sound, argument:
Conclusion: Ghormnast has napthroma.
Desirable properties of a formal system include:
Any sufficiently powerful formal system is either inconsistent or incomplete. (Gödel 1931 CE)
Propositional calculus (Frege 1879 CE and Łukasiewicz 1930 CE) deals with statements which are either true or false.
Real examples are complicated by things like time, geography, scale and opinion. Propositional calculus has no tools for dealing with these.
Operator | Stroke (NAND): P ⊼ Q |
---|---|
Axiom | Łukasiewicz: (P ⊼ (Q ⊼ R)) ⊼ ((S ⊼ (S ⊼ S)) ⊼ ((S ⊼ Q) ⊼ ((P ⊼ S) ⊼ (P ⊼ S)))) |
Rules |
|
A stroke (Sheffer 1913 CE) is true unless both the statements it comprises are true: P ⊼ Q
P | Q | P ⊼ Q | Q ⊼ P |
---|---|---|---|
true | true | false | false |
true | false | true | true |
false | true | true | true |
false | false | true | true |
Negation inverts a
statement (not P
or P is false
):
¬P ≝
(P ⊼ P)
P | P ⊼ P | ¬P |
---|---|---|
true | false | false |
false | true | true |
A conjunction is true if and only if both statements are true.
(P ∧ Q) ≝ ¬(P ⊼ Q) = (P ⊼ Q) ⊼ (P ⊼ Q)
P | Q | P ⊼ Q | ¬(P ⊼ Q) | P ∧ Q |
---|---|---|---|---|
true | true | false | true | true |
true | false | true | false | false |
false | true | true | false | false |
false | false | true | false | false |
A disjunction of two propositions is true when at least one statement is true.
(P ∨ Q) ≝ ¬P ⊼ ¬Q = (P ⊼ P) ⊼ (Q ⊼ Q)
P | Q | ¬P | ¬Q | ¬P ⊼ ¬Q | P ∨ Q |
---|---|---|---|---|---|
true | true | false | false | true | true |
true | false | false | true | true | true |
false | true | true | false | true | true |
false | false | true | true | false | false |
An antecedant implies
a consequent
(P implies Q
or if P then Q
):
(P ⟹ Q) ≝
P ⊼ ¬Q =
P ⊼ (Q ⊼ Q)
P | Q | P ⊼ ¬Q | P ⟹ Q |
---|---|---|---|
true | true | true | true |
true | false | false | false |
false | true | true | true |
false | false | true | true |
Every implication has a contrapositive, which is always equivalent.
P | Q | P ⟹ Q | ¬Q | ¬P | ¬Q ⟹ ¬P |
---|---|---|---|---|---|
true | true | true | false | false | true |
true | false | false | true | false | false |
false | true | true | false | true | true |
false | false | true | true | true | true |
Every implication has a converse, which is not logically equivalent.
P | Q | P ⟹ Q | Q ⟹ P |
---|---|---|---|
true | true | true | true |
true | false | false | true |
false | true | true | false |
false | false | true | true |
An implication and its converse are a biconditional.
(P ⟺ Q) ≝ (P ⟹ Q) ∧ (Q ⟹ P) = ((P ⊼ (Q ⊼ Q)) ⊼ (Q ⊼ (P ⊼ P))) ⊼ ((P ⊼ (Q ⊼ Q)) ⊼ (Q ⊼ (P ⊼ P)))
P | Q | P ⟹ Q | Q ⟹ P | (P ⟹ Q) ∧ (Q ⟹ P) | P ⟺ Q |
---|---|---|---|---|---|
true | true | true | true | true | true |
true | false | false | true | false | false |
false | true | true | false | false | false |
false | false | true | true | true | true |
Every statement in propositional calculus is can be classified as one of the following:
A contradiction is false regardless of the value of the atomic statements it comprises.
P | Q | ¬P | P∧¬P | ¬(P⟹(Q⟹P)) |
---|---|---|---|---|
true | true | false | false | false |
true | false | false | false | false |
false | true | true | false | false |
false | false | true | false | false |
A tautology is true regardless of the value of the atomic statements it comprises.
P | Q | ¬P | P∨¬P | Q⟹Q | P⟹(Q⟹P) |
---|---|---|---|---|---|
true | true | false | true | true | true |
true | false | false | true | true | true |
false | true | true | true | true | true |
false | false | true | true | true | true |
All theses of propositional calculus are tautologies. All tautologies are theses of propositional calculus, which is both consistent and complete. This is possible because propositional calculus is not complex enough to provoke Gödel.
Substitution allows us to construct theorems by replacing variables in an established thesis with any well formed statement.
P ⊢ P (Q := Statement, ...)
There's no way to make a tautology false so we can substitute any statement for its variables.
Replacement allows us to construct theorems either by replacing expressions in a thesis with definitions or replacing definitions with their underlying meanings.
Replacing a definition with its value or a value with a definition leaves it unchanged.
Detatchment allows us to construct theorems by extracting part of an established thesis.
P ⊼ (Q ⊼ R), P ⊢ R
P ⊼ (Q ⊼ R), P ⊢ R
P* | Q | R | Q ⊼ R | P ⊼ (Q ⊼ R) |
---|---|---|---|---|
true | true | true | false | true |
true | true | false | true | false |
true | true | true | true | false |
true | false | true | true | false |
P ⟹ Q, P ⊢ Q
Modus ponens follows from our detatchment rule.
Thomas Scharle worked through the process of proving more convenient axioms from the single Łukasiewicz axiom: Axiomatization of Propositional Calculus with Scheffer Functors (Scharle 1965 CE)
P ∧ Q ⟺ ¬(¬P ∨ ¬Q)
P ∨ Q ⟺ ¬(¬P ∧ ¬Q)
A predicate is a proposition that is true or false based on the value of its variables. This is also called first order logic.
An apple isn't true or false. It's an object rather than a statement. This distinction is important.
|
|
|
|
∀a P(a)
A universal quantifier asserts that a predicate is true for all possible values of a variable. This binds a variable so that it is no longer free in the predicate.
∃a P(a) ≝ ¬∀a ¬P(a)
From the universal quantifier we construct the existential quantifier. This asserts that some value of a variable satisfies the predicate.
The negation of this quantifier is sometimes useful.
∄a P(a) ≝ ¬∃a P(a) ⟺ ∀a ¬P(a)
Rule of Generalization: P ⊢ ∀a P |
Quantified Implication:
(∀a (P ⟹ Q)) ⟹ ((∀a P) ⟹ (∀a Q)) |
Distinctness: P ⟹ ∀a P |
Existance: ¬∀a ¬(a = b) |
Equality: (a = b) ⟹ ((a = c) ⟹ (b = c)) |
∀a,b (a = b) ⟹ (P(a) ⟺ P(b))
When a and b are equal the value of any predicate using a is the same as the same predicate using b. We can substitute equal values without changing any results.
Set theory is a formal system in which the only objects are sets and the only thing sets can do is contain other objects. From this we will construct relations, functions, arithmetic and algebra. (Zermelo-Fraenkel 1908-1922 CE)
Extensionality | Same members, same set |
Specification | A subset exists for any predicate |
Pairing | Make a set with two members |
Union | Sets can be merged |
Power Set | Sets of subsets exist |
Replacement | Any function can map a set |
Regularity | Sets can't contain themselves |
Infinity | There is at least one infinite set |
Choice | One member from each set |
The simplest way to describe a set by enumerating its members.
{ ♠, ♥ , ♣, ♦ }
♠ ∈ {♠, ♥, ♣, ♦} | member of |
a ∉
{b, c} ⟹ (a≠b ∧ a≠c) |
not a member of (a ∉ b) ≝ ¬(a ∈ b) |
∀a,b (a = b) ⟺ (∀c c∈a ⟺ c∈b)
Set equality is determined by membership.
Sets have no order: { ♣, ♦, ♠, ♥ } = { ♠, ♥, ♣, ♦ }
Sets have no repetition: { ♠, ♠, ♥ ♣, ♦ } = { ♠, ♥, ♣, ♦ }
∀a,P ∃b ∀c c∈b ⟺ (c∈a ∧ P(c))
Given a set and a predicate there is a set which contains only members for which the predicate is true. Any predicate can filter any set.
Notation: { a∈b : P(a) }
{} ≝ ∀a a∉{}
The empty set doesn't contain anything.
Extensionality means this set must be unique.
The empty set can be created by specification:
∃a ⟹ ∃{ b∈a : b ≠ b }
= {}
∀a,b ∃{a, b} ∀c (c∈{a, b} ⟺ (c=a ∨ c=b))
Any two sets can be used to create a set which contains only themselves: { ♠, ♣ }
Elements of the pair may be equal, in which case extensionality means there is a single member:
{ ♠, ♠ } = { ♠ }
∀a ∃∪a ∀b∈∪a (∃c∈a b∈c)
Any set can be used to create a set by combining all the members of its members.
∪{ { ♠, ♣ }, { ♥, ♦ } } = {♠, ♥, ♣, ♦}
∀a,b (a ∪ b) ≝ ∪{ a, b }
∀a ∩a ≝ { c∈∪a : ∀b∈a c∈b }
The intersection of a set of sets contains all members that are present in all the members. This can be defined on a pair of sets.
∩ { { ♠, ♥ }, { ♠, ♦ } } = { ♠ }
∀a,b (a ∩ b) ≝ ∩{ a, b }
∀a,b (a ⊖ b) ≝ { c∈a : c∉b }
The difference between two sets contains only the elements of the first that are not in the second.
{ ♠, ♥, ♣ } ⊖ { ♥, ♦ } = { ♠, ♣ }
Pairing and union axioms allow us to create sets of any size from whatever elements exist.
These easily follow from extensionality.
∀a,b (a ⊆ b) ≝ (∪{a, b} = b)
One set is a subset of another if the union operator leaves the other set unchanged.
∀a,b (a ⊆ b) ⟹ ∀c (c∈a ⟹ c∈b)
These easily follow from extensionality.
∀a,b (a ⊂ b) ≝ (a ⊆ b) ∧ (a ≠ b)
A proper subset is not equal the other set. It follows from extensionality that b must contain at least one element not found in a.
∀a,b (a ⊆ b) ∧ (a ≠ b) ⟹ ∃c (c ∈ b) ∧ (c ∉ a)
∀a ∃℘a ∀b (b∈℘a ⟺ b⊆a)
The subsets of any set make up a set of their own.
℘{♠,
♥, ♣,
♦}
= {{}, {♠},
{♥},
{♣}, {♦},
{♠, ♥},
{♠, ♣},
{♠, ♦},
{♥, ♣},
{♥,
♦},
{♣, ♦},
{♥, ♣,
♦},
{♠, ♣,
♦},
{♠, ♥,
♣}, {♠,
♥,
♦},
{♠, ♥,
♣, ♦}}
∀a,f ∃b ∀c c∈b ⟺ ∃d∈a f(c) = d
Given a function and a subset of the domain there is a set which contains all the function outputs for all members of the set.
Notation: { f(a) : a∈b }
∀a ∃b∈a ⟹ ∃c∈a ∄d (d∈a ∧ d∈c)
A set that contains any members must contain at least one member that does not share any members with itself. No set can contain itself.
∃a (({}∈a) ∧ (∀b∈a ∪{b, {b, b}} ∈ a))
A set with infinitely many distinct members exists. Specifically the set containing the empty set and all sets we can get by taking the union of any member with a set containing only that member exists.
∀a {}∉a ⟹ ∃f: a ⟶ ∪a ∀b∈a f(b) ∈ b
For any set that doesn't have any empty members a function exists that chooses one member from each of the sets members.
Extensionality | ∀a,b (a = b) ⟺ (∀c c∈a ⟺ c∈b) |
Specification (S) | ∀a,P ∃b ∀c c∈b ⟺ (c∈a ∧ P(c)) |
Pairing | ∀a,b ∃{a, b} ∀c (c∈{a, b} ⟺ (c=a ∨ c=b)) |
Union | ∀a ∃∪a ∀b∈∪a (∃c∈a b∈c) |
Power Set | ∀a ∃℘a ∀b (b∈℘a ⟺ b⊆a) |
Replacement (S) | ∀a,f ∃b ∀c c∈b ⟺ ∃d∈a f(c) = d |
Regularity | ∀a ∃b∈a ⟹ ∃c∈a ∄d (d∈a ∧ d∈c) |
Infinity | ∃a (({}∈a) ∧ (∀b∈a b∪{b} ∈ a)) |
Choice | ∀a {}∉a ⟹ ∃f: a ⟶ ∪a ∀b∈a f(b) ∈ b |
We describe sets using one of these forms.
{} | Empty Set: ∀a a∉{} |
{ a, b, c } | Enumeration |
{ a∈b : P(a) } | Specification (predicate filter) |
{ f(a) : a∈b } | Replacement (function outputs) |
A relation is a set that embodies a relationship between other sets. Examples of relations include equivalence, order and functions. Relations can also represent complex data.
Extensionality means that members of a set have no meaningful order.
∀a,b {a, b} = {b, a}
Let's impose some order on them!
⟨a, b⟩ ≝ {{a}, {a, b}} (Kuratowski 1921 CE)
Ordered pairs extend naturally to tuples which are not limited to pairs of elements.
REST(t) ≝ { a ⊖ {FIRST(t)} :
a ∈ t ∧ (a ⊖ {FIRST(t)}) ≠ {} }
A union turns a tuple into an unordered set
∪⟨♠, ♣⟩ = ∪{{♠}, {♠, ♣}} = {♠, ♣}
Two unions collapse a set of tuples
∪∪{
⟨♠,
♥⟩,
⟨♥,
♦⟩,
⟨♦,
♣⟩}
=
∪{{♠}, {♠,
♥},
{♥},
{♥,
♦},
{♦},
{♦, ♣}}
=
{
♠, ♥,
♣, ♦ }
∀a,b (a R b) ≝ ⟨a, b⟩∈R
A relation is a set of ordered pairs that represents a relationship between elements
is-husband-of ≝ {
⟨James, Mary⟩,
⟨John, Patrica⟩,
⟨Robert, Jennifer⟩,
⟨Michael, William⟩,
⟨William, Michael⟩ }
is-wife-of ≝ {
⟨Mary, James⟩,
⟨Patrica, John⟩,
⟨Jennifer, Robert⟩,
⟨Linda, Elizabeth⟩,
⟨Elizabeth, Linda⟩ }
is-spouse-of ≝ is-husband-of ∪ is-wife-of
∀a,b,c (b∈a ∧ c∈a) ⟹ ({b} ⊆ a) ∧ ({b, c} ⊆ a) ⟹ {{b}, {b, c}}⊆℘a ⟹ ⟨b, c⟩⊆℘a ⟹ ⟨b, c⟩∈℘℘a
All possible ordered pairs of members of a set are themselves members of the power set of the power set of that set.
∀a,b (a ⊛ b) ≝ { ⟨c, d⟩ ∈ ℘℘∪{ a, b } : c∈a ∧ d∈b }
We can use pairing, union and power set axioms to construct all possible ordered pairs from two sets.
{ A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K }
⊛
{ ♠, ♥,
♣, ♦ } = {
⟨A, ♠⟩,
⟨2, ♠⟩,
⟨3, ♠⟩,
⟨4, ♠⟩, ... }
∀a,b,c (a
⊛ b
⊛ c)
≝
{ ⟨d, e, f⟩ ∈
℘℘∪{a, b, c} :
d∈a ∧ e∈b ∧ f∈c }
Cartesian products can make tuples
{ ♠, ♥,
♣, ♦ }
⊛
{ 😃, 😞 }
⊛
{ □, △ } =
{ ⟨♠, 😃, □⟩,
⟨♠, 😃, △⟩,
⟨♠, 😞, □⟩,
⟨♠, 😞, △⟩,
⟨♥,
😃, □⟩,
⟨♥,
😃, △⟩,
⟨♥,
😞, □⟩,
⟨♥,
😞, △⟩,
⟨♣, 😃, □⟩,
⟨♣, 😃, △⟩,
⟨♣, 😞, □⟩,
⟨♣, 😞, △⟩,
⟨♦,
😃, □⟩,
⟨♦,
😃, △⟩,
⟨♦,
😞, □⟩,
⟨♦,
😞, △⟩ }
R ⊆ Domain(R) ⊛ Range(R)
We can use the axiom schema of specification to define relations over large or even infinite sets.
An equivalence relation has three properties:
This partitions a set into classes that don't overlap.
An ordering of a set has the following properties:
A total order is a partial order with connex:
This organizes a set into concentric rings.
∀a ∃{ ⟨b, c⟩∈a⊛a : b = c }
Set equality can be used to construct an equivalence relation over any set: this is always reflexive, symmetric and transitive.
∀a (a = a)
Any set contains all the members in itself and vice versa.
∀a,b (a = b) ⟺ (b = a)
∀a,b,c (a = b) ∧ (b = c) ⟹ (a = c)
∀a ∃{ ⟨b, c⟩∈a⊛a : b ⊆ c }
Subset relationships can be used to construct an ordering over any set. This is always reflexive, antisymmetric and transitive.
Not always connex: {{♠, ♥}, {♠}, {♠, ♦}}
∀a (a ⊆ a)
∀a,b (a ⊆ b) ∧ (b ⊆ a) ⟹ (a = b)
∀a,b,c (a ⊆ b) ∧ (b ⊆ c) ⟹ (a ⊆ c)
A function is a special kind of relation which maps every member of its domain to exactly one member of its range.
(f : D ⟶ R)
≝ ∀a∈D (∃b∈R
⟨a, b⟩∈f) ∧
(∀b,c∈R
(⟨a, b⟩∈f ∧
⟨a, c⟩∈f)
⟹ b ≑ c)
Given function f : D ⟶ R
Given function f : D ⟶ R
A function can have more than one argument.
This is the same as having a domain consisting of ordered pairs or tuples.
Function can return ordered pairs or tuples.
This is the same as having a range consisting of ordered pairs or tuples.
Cardinality is a property of every set: any pair of sets for which a bijection exists have the same cardinality.
a+ ≝ ∪{a, {a, a}} = a ∪ {a}
ℕ ≝ { a : (a = {}) ∨ ∃b∈ℕ a = b+ }
Natural numbers are an effective way to represent discrete and indivisible quantities.
Peano 1889 CE and Von Neumann 1923 CE
Increment the digit to the left and then replace 9 with 0. (Unknown Indian mathematicians ~500 CE)
∀a∈ℕ a ⊆ a+
∀a,b∈ℕ (a ∈ b) ⟹ (a ∈ b+)
∀a,b∈ℕ (a =ℕ b) ≝ (a = b)
Every natural number is a distinct set. Set equality is an equivalence relation (reflexive, symmetric and transitive) so we'll use it to compare them.
Every natural number contains its predecessors, so the subset predicate is a good way to define order.
∀a,b∈ℕ | (a ≤ℕ b) ≝ (a ⊆ b) |
(a ≥ℕ b) ≝ (b ⊆ a) | |
(a <ℕ b) ≝ ¬(a ≥ℕ b) | |
(a >ℕ b) ≝ ¬(a ≤ℕ b) |
Subset relations are always reflexive, antisymmetric and transitive so they always form a partial order. Over the natural numbers this predicate is also connex which makes it a total order. We must prove that.
Induction allows us to prove something for a set like the natural numbers by showing that it's true for some base case (usually 0ℕ) and that when it's true for some value it follows that the successor also has the same property.
∀a,b∈ℕ (a ⊆ b) ∨ (b ⊆ a)
∀a,b∈ℕ (a ⊆ b) ∨ (b ⊆ a)
∀a,b∈ℕ (a = b) ∨ (a < b) ∨ (b < a)
Let's define addition
which maps two
natural numbers to another natural number
(Grassman 1861 CE, Peano 1889 CE):
+: ℕ⊛ℕ ⟶ ℕ
∀a,b∈ℕ a + b ∈ℕ
Addition is constructed entirely from successor operations, which are closed over the natural numbers. Therefore addition is closed.
∀a∈ℕ a + 0ℕ = a = 0ℕ + a
∀a,b,c∈ℕ (a + b) + c = a + (b + c)
∀a,b∈ℕ a + b = b + a
We will prove two simpler results (lemmas) and use them to prove that addition is commutative
∀a∈ℕ a+ = a + 1ℕ
∀a∈ℕ a + 1ℕ = 1ℕ + a
∀a,b∈ℕ a + b = b + a
Let's define multiplication
which maps two
natural numbers to another natural number
(Grassman 1861 CE, Peano 1889 CE):
×: ℕ⊛ℕ ⟶ ℕ
∀a,b∈ℕ a × b ∈ℕ
Multiplication is constructed entirely from successor operations and addition, both of which are closed for natural numbers. Therefore multiplication is closed.
∀a∈ℕ a × 1ℕ = a = 1ℕ × a
Right identity:
∀a∈ℕ a × 1ℕ = a = 1ℕ × a
Left identity:
When we multiply a sum we can push the product through to each term.
∀a,b,c∈ℕ ((a + b) × c =
(a × c) + (b × c)) ∧
(c × (a + b) =
(c × a) + (c × b))
∀a,b,c∈ℕ (a + b) × c = (a × c) + (b × c)
∀a,b∈ℕ (a + b) × 0ℕ = (a × 0ℕ) + (b × 0ℕ)
∀a,b,c∈ℕ c × (a + b) = (c × a) + (c × b)
∀a,c∈ℕ c × (a + 0ℕ) = (c × a) + (c × 0ℕ)
∀a,b,c∈ℕ (a × b) × c = a × (b × c)
∀a,b∈ℕ (a × b) × 0ℕ = a × (b × 0ℕ)
∀a,b∈ℕ a × b = b × a
∀a,b∈ℕ a × 0ℕ = 0ℕ × a
∀a,b∈ℕ a|b ≝ (a ≠ 0) ∧ (∃c∈ℕ a × c = b)
A non-zero natural number divides another if and only if there's a third that can be multiplied by the first to get the second.
A natural number is irreducible if it can be divided only by one and itself.
∀a∈ℕ (a is irreducible)
≝
∀b,c∈ℕ
(a = b × c) ⟹
(b = 1ℕ ∨ c = 1ℕ)
We say that a natural number greater than one is
prime
it divides at least one of the parts
of any number it divides.
∀a∈ℕ (a is prime) ≝
(a > 1ℕ) ∧
(∀b,c∈ℕ
a|(b × c) ⟹ (a|b ∨ a|c))
No non-zero natural number multiplied by another non-zero natural number is equal to zero.
∀a∈ℕ (a ≠ 0ℕ) ⟹ ∄b∈ℕ a × b = 0ℕ
Natural numbers greater than one can be factored into a unique tuple of ordered prime numbers.
∀a∈ℕ (a > 1ℕ)
⟹ ∃⟨a0, a1,
..., an⟩
IS-PRIME(ai) ∧
(ai ≤ ai + 1) ∧
(1ℕ × a0 ×
a1 × ... × an = a)
ℤ ≝ { ⟨a, b⟩∈ℕ⊛ℕ }
[a - b] ≝ { ⟨c1, c2⟩∈ℕ⊛ℕ : (a + c2 = c1 + b) }
Integers extend the natural numbers. They introduce inverses for addition and negative numbers which can represent concepts like debt.
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℤ
(⟨a1, a2⟩
=ℤ ⟨b1,
b2⟩) ≝
(a1 + b2 =
a2 + b1)
∀a,b∈ℕ ⟨a, b⟩ =ℤ ⟨a), SCCR(b+⟩
Every integer has a simplest form, which has at least one member that is natural number zero.
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℤ
(⟨a1, a2⟩
≤ℤ ⟨b1,
b2⟩) ≝
(a1 + b2
≤ℕ a2 +
b1)
∀a∈ℤ ∃a1,a2∈ℕ a = ⟨a1, a2⟩
Let's define addition
which maps two
integers to another integer.
+: ℤ⊛ℤ ⟶ ℤ
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℤ
⟨a1, a2⟩ +
⟨b1, b2⟩
≝
⟨a1 + b1,
a2 + b2⟩
∀ a,b∈ℕ ⟨a, 0⟩ + ⟨b, 0⟩ = ⟨a + b, 0 + 0⟩ = ⟨a + b, 0⟩
Adding any two integers that match natural numbers results in the natural number their sum would match.
∀ a,b,c∈ℤ (a = b) ⟹ ((a + c) = (b + c))
∀a,b∈ℤ a + b ∈ℤ
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℤ
⟨a1, a2⟩ +
⟨b1, b2⟩ ≝
⟨a1 + b1,
a2 + b2⟩
Addition for integers is constructed entirely from natural number addition. The result of adding two integers is an ordered pair consisting of sums of natural numbers.
∀a∈ℤ a + 0ℤ = a = 0ℤ + a
∀a,b,c∈ℤ (a + b) + c = a + (b + c)
∀a,b∈ℤ a + b = b + a
∀a∈ℤ ∃(-a)∈ℤ a + (-a) = 0ℤ
∀a=⟨a1, a2⟩∈ℤ (-a) ≝ ⟨a2, a1⟩
Let's define subtraction
which maps two
integers to another integer:
-: ℤ⊛ℤ ⟶ ℤ
∀a,b∈ℤ a - b ≝ a + (-b)
∀a,b∈ℤ a - b ∈ℤ
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℤ
⟨a1, a2⟩ -
⟨b1, b2⟩ =
⟨a1 + b2,
a2 + b1⟩
Subtraction is closed because the result is always an ordered pair of natural numbers and therefore always another integer.
∀a∈ℤ a - 0ℤ = a
Subtracting zero from the right leaves the number on the left unchanged.
∀a∈ℤ 0ℤ - a ≟ a
Subtracting from zero gives the additive inverse, not the element itself, so there's no left identity.
∀a,b,c∈ℤ (a - b) - c ≟ a - (b - c)
Subtraction is not generally associative.
∀a,b∈ℤ a - b ≟ b - a
Subtraction is not generally commutative. (Actually it's anticommutative: a - b = -(b - a))
∀a∈ℤ a - a = 0ℤ
Every integer is its own subtractive inverse.
Let's define multiplication
which maps two
integers to another integer:
×: ℤ⊛ℤ ⟶ ℤ
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℤ
⟨a1, a2⟩ ×
⟨b1, b2⟩
≝
⟨(a1 × b1) +
(a2 × b2),
(a1 × b2) +
(a2 × b1)⟩
∀ a,b∈ℕ
⟨a, 0⟩ × ⟨b, 0⟩ =
⟨(a × b) + (0 × 0),
(a × 0) + (b × 0)⟩ =
⟨a × b, 0⟩
Multiplying any two integers that match natural numbers results in the natural number their product would match.
∀ a,b,c∈ℤ (a = b) ⟹ ((a × c) = (b × c))
∀ a,b,c∈ℤ (a = b) ⟹ ((a × c) = (b × c))
∀ a,b,c∈ℤ (a = b) ⟹ ((a × c) = (b × c))
∀a,b∈ℤ a × b ∈ℤ
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℤ
⟨a1, a2⟩
× ⟨b1,
b2⟩ ≝
⟨(a1 × b1) +
(a2 × b2),
(a1 × b2) +
(a2 × b1)⟩
Multiplication for integers is constructed entirely from natural number addition and multiplication. The result of adding and multiplying natural numbers is an ordered pair consisting of natural numbers.
∀a∈ℤ a × 1ℤ = a = 1ℤ × a
∀a,b,c∈ℤ (a × b) × c = a × (b × c)
∀a,b∈ℤ : a × b = b × a
∀a,b,c∈ℤ a × (b + c) = (a × b) + (a × c)
We only need to consider the distributive property from one side because integer multiplication is commutative.
∀a,b,c∈ℤ a × (b + c) = (a × b) + (a × c)
ℚ ≝ { ⟨a, b⟩∈ℤ⊛ℤ : b > 0ℤ }
[a / b] ≝ { ⟨c1, c2⟩∈ℤ⊛ℤ : c2 > 0ℤ ∧ (c1 × b = c2 × a) }
Rational numbers extend the integers. They introduce inverses for multiplication and can represent fractional quantities.
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℚ
(⟨a1,
a2⟩ =ℚ
⟨b1,b2⟩)
≝ (a1 ×
b2 =ℤ a2 ×
b1)
∀⟨a1,
a2⟩,⟨b1,
b2⟩∈ℚ
(⟨a1,
a2⟩ ≤ℚ
⟨b1, b2⟩)
≝ (a1 ×
b2 ≤ℤ a2
× b1)
-4/3ℚ = ⟨-4ℤ,
3ℤ⟩ = ⟨⟨0, 4⟩,
⟨3, 0⟩⟩ =
{{⟨0, 4⟩},
{⟨0, 4⟩, ⟨3, 0⟩}} =
{{{{0}, {0, 4}}}, {{{0}, {0, 4}}, {{3}, {3, 0}}}} =
{{{{{}}, {{}, {{}, {{}}, {{}, {{}}}, {{}, {{}},
{{}, {{}}}}}}}}, {{{{}}, {{}, {{}, {{}}, {{},
{{}}}, {{}, {{}}, {{}, {{}}}}}}}, {{{{}, {{}},
{{}, {{}}}}}, {{{}, {{}}, {{}, {{}}}}, {}}}}}
2ℚ = 2/1ℚ =
⟨2ℤ,
1ℤ⟩ = ⟨⟨2,
0⟩, ⟨1, 0⟩⟩ =
{{⟨2, 0⟩}, {⟨2, 0⟩,
⟨1, 0⟩}} =
{{{{2}, {2, 0}}}, {{{2}, {2, 0}}, {{1}, {1, 0}}}} =
{{{{{{}, {{}}}}, {{{}, {{}}}, {}}}},
{{{{{}, {{}}}}, {{{}, {{}}}, {}}}, {{{{}}},
{{{}}, {}}}}}
(⟨4ℤ,
2ℤ⟩ =ℚ
⟨2ℤ,
1ℤ⟩) ⟹
(4ℤ × 1ℤ
=ℤ 2ℤ ×
2ℤ) ⟹ (4ℤ
=ℤ 4ℤ)
2ℚ = 4/2ℚ =
⟨4ℤ,
2ℤ⟩ = ⟨⟨4,
0⟩, ⟨2, 0⟩⟩ =
{{⟨4, 0⟩}, {⟨4, 0⟩,
⟨2, 0⟩}} =
{{{{4}, {4, 0}}},
{{{4}, {4, 0}}, {{2}, {2, 0}}}} =
{{{{{{}, {{}}, {{{}, {{}}}}, {{{}, {{}},
{{{}, {{}}}}}}}}, {{{}, {{}}, {{{}, {{}}}},
{{{}, {{}}, {{{}, {{}}}}}}}, {}}}}, {{{{{}, {{}},
{{{}, {{}}}}, {{{}, {{}}, {{{}, {{}}}}}}}},
{{{}, {{}}, {{{}, {{}}}}, {{{}, {{}}, {{{},
{{}}}}}}}, {}}}, {{{{}, {{}}}}, {{{}, {{}}}, {}}}}}
Let's define addition
which maps two rational
numbers to another. This will preserve all properties
of integer addition, including inverses:
+: ℚ⊛ℚ ⟶ ℚ
∀a,b∈ℚ a + b ≝
⟨a1,
a2⟩ +
⟨b1, b2⟩ =
⟨(a1 × b2) +
(a2 × b1),
a2 × b2⟩
∀ a,b∈ℤ
⟨a, 1ℤ⟩ +
⟨b, 1ℤ⟩ =
⟨(a × 1ℤ) +
(1ℤ × b),
1ℤ ×
1ℤ⟩ =
⟨a + b, 1ℤ⟩
Adding any two rational numbers that match integers results in the integer their sum would match.
∀a,b∈ℚ a + b ∈ℚ
∀a,b∈ℚ a + b ≝
⟨a1, a2⟩ +
⟨b1, b2⟩ =
⟨(a1 × b2) +
(a2 × b1),
a2 × b2⟩
Addition for rational numbers is constructed entirely from integer arithmetic, which is closed. The product of two positive numbers is always positve so second element is positive.
∀a∈ℚ a + 0ℚ = a = 0ℚ + a
∀a,b,c∈ℚ (a + b) + c = a + (b + c)
∀a,b,c∈ℚ (a + b) + c = a + (b + c)
∀a,b∈ℚ a + b = b + a
∀a∈ℚ ∃(-a)∈ℚ a + (-a) = 0
∀a=⟨a1, a2⟩∈ℚ (-a) ≝ ⟨-a1, a2⟩
Let's define multiplication
which maps two
rational numbers to another. This will presearve
all properties of integer multiplication and will
add inverses for everything except zero:
×: ℚ⊛ℚ ⟶ ℚ
∀a,b∈ℚ a × b ≝ ⟨a1, a2⟩ × ⟨b1, b2⟩ = ⟨a1 × b1, a2 × b2⟩
∀ a,b∈ℤ
⟨a, 1ℤ⟩ ×
⟨b, 1ℤ⟩ =
⟨a × b, 1ℤ ×
1ℤ⟩ =
⟨a × b, 1ℤ⟩
Multiplying any two rational numbers that match integers results in the integer their product would match.
∀a,b∈ℚ a × b ∈ℚ
∀a,b∈ℚ a × b ≝ ⟨a1, a2⟩ × ⟨b1, b2⟩ = ⟨a1 × b1, a2 × b2⟩
Because integer multiplication is commutative and two positive integers always multiply to another positive, rational number multiplication is closed.
∀a∈ℚ a × 1ℚ = a = 1ℚ × a
∀a,b,c∈ℚ (a × b) × c = a × (b × c)
∀a,b∈ℚ a × b = b × a
Before we prove the distributive property, let's notice something useful: One Invariance
∀a1, a2 >0ℤ, c>0ℤ∈ℤ ⟨a1, a2⟩ × ⟨c, c⟩ = ⟨a1, a2⟩
∀a,b,c∈ℚ a × (b + c) = (a × b) + (a × c)
∀a,b,c∈ℚ a × (b + c) = (a × b) + (a × c)
∀a∈ℚ a≠0ℚ ⟹ ∃a-1∈ℚ a × a-1 = 1ℚ
∀a=⟨a1≠0ℤ,
a2⟩∈ℚ
(a1 > 0ℤ ⟹
a-1 ≝ ⟨a2,
a1⟩) ∧ (a1 <
0ℤ ⟹
a-1 ≝
⟨-a2, -a1⟩)
ℝ ≝ { a∈℘ℚ :
(a ≠ {}) ∧ (a ≠ ℚ) ∧
(∀b,c∈ℚ (b∈a ∧
c≤b) ⟹ c∈a) ∧
(∀b∈a ∃c∈a c>b) }
Real numbers extend the rational numbers by filing in all the holes. (Dedekind 1858-1862)
Dedekind cuts are continuous partitions of ℚ
∀a∈ℝ a = ⟨{ b∈ℚ : P(b) }, { b∈ℚ : ¬P(b) }⟩
This is a more conventional definition of Dedekind cuts. Ours is simpler and makes proofs easier, but proofs for the upper set are similar.
∀a,b∈ℚ (a <ℚ b) ⟹ a <ℚ ((a + b) × 1/2ℚ) <ℚ b
Given a rational number strictly less than another we can show that there is always a rational number in between the two.
∀a,b∈ℚ (a <ℚ b) ⟹ a <ℚ ((a + b) × 1/2ℚ) <ℚ b
∀a,b∈ℚ (a <ℚ b) ⟹ a <ℚ ((a + b) × 1/2ℚ) <ℚ b
{ a∈ℚ : a ≤ 0ℚ } ∉ℝ
This set is closed downward but it has a largest member: 0ℚ This set is not a real number.
{ a∈ℚ : (a > -1ℚ) ∧ (a < 0ℚ) } ∉ℝ
This set has no largest member but it's not closed downward. -2ℚ is not a member of this set even though it's less than -1/2ℚ which is. This set is not a real number.
0ℝ ≝ { a∈ℚ : a < 0ℚ }
∀a∈ℚ ∃{ b∈ℚ : b < a }∈ℝ
∀a,b∈ℝ (a =ℝ b) ≝ (a = b)
Real numbers are equal if and only if the sets that represent them are equal. This is reflexive symmetric and transitive because set equality has these properties.
∀a,b∈ℝ (a ≤ℝ b) ≝ (a ⊆ b)
Real number order is defined by the subset relation. This is always reflexive, antisymmetric and transitive. We only have to prove the connex property to have a total order.
∀a,b∈ℝ (a ≤ b) ∨ (b ≤ a)
Let's define addition
which maps two real
numbers to another. This will preserve all properties
of rational addition, including inverses:
+: ℝ⊛ℝ ⟶ ℝ
∀a,b∈ℝ a + b ≝ { (c + d)∈ℚ : c∈a ∧ d∈b }
∀a,b∈ℝ a + b ∈ℝ
∀a,b,c∈ℝ (a + b) + c = a + (b + c)
TODO
∀a,b∈ℝ a + b = b + a
{ c∈ℚ : ∃d∈a,e∈b
(d + e = c) } =
{ c∈ℚ : ∃e∈b,d∈a
(e + d = c) }
∀a∈ℝ a + 0ℝ = a = 0ℝ + a
TODO
∀a∈ℝ ∃(-a)∈ℝ a + (-a) = 0ℝ
∀a∈ℝ -a ≝ { b∈ℚ : ∃c∈ℚ (c > b) ∧ (-c ∉ a) }
∀a∈ℝ ∃(-a)∈ℝ a + (-a) = 0ℝ
Suppose we could add something from a and (-a) to get 0ℚ or greater.
Let's define multiplication
which maps two real
numbers to another:
×: ℝ⊛ℝ ⟶ ℝ
∀a∈ℝ |a| ≝ a ∪ (-a)
TODO
ℚ ≝ { ⟨a, b⟩∈ℤ⊛ℤ : b > 0ℤ }
Our construction excludes ordered pairs without positive integers for the second member. Why? What would the consequences be?
∀a1, a2∈ℤ ⟨a1, -a2⟩ =ℚ ⟨-a1, a2⟩
Every negative denominator rational is equivalent to some positive denominator rational. Excluding negative values isn't necessary but it's convenient.
∀a,b∈ℤ ⟨a, 0ℤ⟩ =ℚ ⟨b, 0ℤ⟩
All zero denominator rational numbers are equal to
one another. We will use the term infinity
to refert to this special rational number.
∀a,b,c∈ℤ ⟨a, b⟩ + ⟨c, 0ℤ⟩ =ℚ ⟨c, 0ℤ⟩
Adding a rational number to infinity gives infinity.
∀a,b,c∈ℤ ⟨a, b⟩ × ⟨c, 0ℤ⟩ =ℚ ⟨c, 0ℤ⟩
Multiplying a rational number by infinity gives infinity.
∀a,b∈ℤ ⟨a, 0ℤ⟩ × ⟨0ℤ, b⟩ ≟ℚ ⟨1ℤ, 1ℤ⟩
While interesting, infinity doesn't function as an inverse for zero. Multiplying by zero destroys information and there's no way to recover it.
∀a,b∈ℤ ⟨a, b⟩ =ℚ ⟨0ℤ, 0ℤ⟩
Rational number zero over zero is equal to everything, which destroys the transitive property of equality. This breaks the rational numbers. We must exclude it.
If a bijection exists between two sets we say the sets have the same cardinality.
If a bijection between a natural number and some other
set then we say that other set has that many elements.
For example, if a bijection exists between set and
the natural number 3 we say that the set has
three elements.
If a bijection between a set b and the set of
natural numbers itself exists then we say that b
has a countably infinite number of elements.
How many integers are there? A bijection exists between integers and natural numbers.
f = {⟨0ℕ, 0ℤ⟩,
⟨1ℕ, 1ℤ⟩,
⟨2ℕ, -1ℤ⟩,
⟨3ℕ, 2ℤ⟩,
⟨4ℕ, -2ℤ⟩, ...}
How many rational numbers are there?
⟨1ℕ, 1/1ℚ⟩ | ⟨2ℕ, 1/2ℚ⟩ | ⟨4ℕ, 1/3ℚ⟩ | ⟨7ℕ, 1/4ℚ⟩ |
⟨3ℕ, 2/1ℚ⟩ | ⟨5ℕ, 2/2ℚ⟩ | ⟨8ℕ, 2/3ℚ⟩ | ⟨12ℕ, 2/4ℚ⟩ |
⟨6ℕ, 3/1ℚ⟩ | ⟨9ℕ, 3/2ℚ⟩ | ⟨13ℕ, 3/3ℚ⟩ | ⟨18ℕ, 3/4ℚ⟩ |
⟨10ℕ, 4/1ℚ⟩ | ⟨14ℕ, 4/2ℚ⟩ | ⟨19ℕ, 4/3ℚ⟩ | ⟨25ℕ, 4/4ℚ⟩ |
Skipping values already obtained and alternating negative numbers would give a bijection between the natural and rational numbers.
TODO: prove more reals than naturals, integers and rationals using Cantor diagonalization
Algebra: from Arabical-jabr, literally meaningreunion of broken parts
— Oxford English Dictionary
A group is a set and a binary function
∘: G ⊛ G ⟶ G
A group is the simplest mathematical structure that makes algebra possible.
By definition identity and inverses work when applied from the right.
Do these work from the left?
Suppose we have know a, b and (a ∘ x = b):
An abelian group has a commutative function:
G = {♠, ♥, ♣, ♦}
∘ | ♠ | ♥ | ♣ | ♦ |
---|---|---|---|---|
♠ | ♠ | ♥ | ♣ | ♦ |
♥ | ♥ | ♣ | ♦ | ♠ |
♣ | ♣ | ♦ | ♠ | ♥ |
♦ | ♦ | ♠ | ♥ | ♣ |
A ring is a set and two binary functions
(∘: R ⊛ R ⟶ R) and
(⊚: R ⊛ R ⟶ R) with four
properties:
∀a,b∈R a|b ≝ ∃c∈R (a ⊚ c = b)
One member of a ring divides another if and only if there's a third member that that can be multiplied by the first to get the second.
∀a∈R (a is a zero divisor) ≝
∃b≠e∘∈R
a ⊚ b = e∘
A zero divisor is a member of a ring which can reach the additive identity when multiplied by something other than the additive identity.
∀a∈R (a is irreducible) ≝
∀b,c∈R (a = b ⊚ c) ⟹
(b = e⊚ ∨ c = e⊚)
An irreducible element is a member of a ring that is not the product of any non-unit.
∀a∈R (a is prime) ≝
∀b,c∈R
a|(b ⊚ c) ⟹ (a|b ∨ a|c)
A prime element of a ring is one that divides at least one of the terms if it divides a product.
A commutative ring has commutative functions:
A unitary ring has an identity element for the second function:
A division ring is a unitary ring with an inverse for every element under the second function:
A field is a commutative division ring:
A finite field is a field with a finite number of members. Finite fields can sometimes be expressed using tables (Cayley 1854 CE)
∘ | ♠ | ♥ | ♣ | ♦ |
---|---|---|---|---|
♠ | ♠ | ♥ | ♣ | ♦ |
♥ | ♥ | ♣ | ♦ | ♠ |
♣ | ♣ | ♦ | ♠ | ♥ |
♦ | ♦ | ♠ | ♥ | ♣ |
⊚ | ♠ | ♥ | ♣ | ♦ |
---|---|---|---|---|
♠ | ♠ | ♠ | ♠ | ♠ |
♥ | ♠ | ♥ | ♣ | ♦ |
♣ | ♠ | ♣ | ♠ | ♣ |
♦ | ♠ | ♦ | ♣ | ♥ |
Algebra: from Arabical-jabr, literally meaningreunion of broken parts
— Oxford English Dictionary
+ | 0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|---|
0 | 0 | 1 | 2 | 3 | 4 |
1 | 1 | 2 | 3 | 4 | 0 |
2 | 2 | 3 | 4 | 0 | 1 |
3 | 3 | 4 | 0 | 1 | 2 |
4 | 4 | 0 | 1 | 2 | 3 |
× | 0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 |
1 | 0 | 1 | 2 | 3 | 4 |
2 | 0 | 2 | 4 | 1 | 3 |
3 | 0 | 3 | 1 | 4 | 2 |
4 | 0 | 4 | 3 | 2 | 1 |
ax ≝ a ⊚ x
When it isn't likely to cause confusion we usually
omit the symbol for the second operation of a ring or
field. This is especially useful when working with
numeric systems with a variable is named x
:
ax ≝ a × x
⟬ℚ, +, ⟬ℚ, +, ×⟭⟭
Rational numbers can be used to construct a trivial example of a vector space. There isn't anything we can do with this that we couldn't also do with the field of rational numbers, but it demonstrates that at least one vector space exists.
⟬ℚ × ℚ, +, ⟬ℚ, +, ×⟭⟭
We can make a more interesting vector space using tuples of rational numbers.
Tuples can be used to generalize the vector space created by ordered pairs.
Pure mathematics is, in its way, the poetry of logical ideas.
— Albert Einstein
Repeating successor creates addition. Repeating addition creates multiplication. Repeating multiplication creates exponentiation. Addition and multiplication are connected by the distributive property. Mutiplication and exponentiantion are connected by the exponent product rule.
ab ⊚ ac = ab + c
Any natural number can be used as an exponent in a straightforward way.
A natural way to extend our notation for inverses is to use integer exponents.
What could it mean to use rational numbers as exponents?
A field member with a rational exponent may or may not exist, depending on the field.
Could we use real numbers as exponents? Vectors? We can! And it will turn out to be useful (particularly for rotations).
a3x3 + a2x2 + a1x + a0 = 0
We can define a polynomial as a series of integer value rational numbers multiplied by powers of a variable. The degree of a polynomial is the highest power of the variable for which the coefficient is not zero (3 in this example). When we set a polynomial equal to 0 the solutions are called roots.
(bx - a = 0) ⟹ (x = a(b-1))
This degree one polynomial can be used to create any rational number [a / b]. This shows that all rational numbers are the root of at least one polynomial expression.
x2 - 2 = 0
Are all algebraic numbers rational? There is no rational number that can solve this equation. (TODO: use fundamental theorem of arithmetic to prove this)
What if we had an infinite number of terms?
What if we had an infinite number of terms?
(Extremely abbreviated)
Euclid defines a point as that which has no part.
A point is a position in space but has no spacial extents in any direction. We call the set of all possible points ℙ
A metric space consists of a set of points and a distance function: ⟨ℙ, d: ℙ ⊛ ℙ ⟶ ℝ⟩
∀A,B,C∈ℙ
B ⧳ (A, C) ≝
d(A, C) = d(A, B) + d(B, C)
Point B is between points A and B when the sum of the distances from B to the other points is exactly the distance between the other two points.
∀𝓁∈℘ℙ IS-LINE(𝓁) ≝
A line is a set of points that corresponds to real numbers.
∠AOB ≝ ∃A,O,B∈ℙ (d(O,A) > 0 ∧ d(O, B) > 0)
Any point with two other points distinct from it make an angle.
Given a circle with postive radius:
Every point except the center has an inversion point with the above properties.
∀A∈ℙ (A ≠ O) ⟹ ∃ A'
∀A∈ℙ (A ≠ O) ∃ A' ∧ A' ≠ O ⟹ ∃ A'' ⟹ A'' = A
Inversion is a bijection between inside and outside.
We can use similar triangles to find the distance between inverted points in terms of original points
Given a cyclic quadrilateral with points A, B, C and D we can create a inversion circle with center D and radius r > 0. Because the circle on which points A, B and C lie goes through the origin, D, the points A', B' and C' lie on a line.
|A' - B'| + |B' - C'| = |A' - C'|
Suppose our cyclic quadrilateral is a rectangle.
A vector is the difference between two points. We will call the set of all vectors 𝕍
Any two vectors can be added by placing the tail of the second at the head of the first: tip-to-tail
Any real number can be multiplied by a vector to produce another vector.
Only the zero vector lacks direction
Any two distinct points can be extended by taking the difference and multiplying by scalars to form a set with one point for every real number. We call such a set a line.
∀A,B∈ℙ (A ≠ B) ⟹ ∃{ A + a(B - A) : a∈ℝ }
∀A∈ℙ ∀v∈𝕍 (v ≠ 0) ⟹ ∃{ A + av : a∈ℝ }
Why do we need to distinct points to make a line?
We could have started with the third step for lines defined by a point and a vector.
A segment is a line with constraints.
∀A,B∈ℙ (A ≠ B)
⟹
∃{
A + a(B - A) :
a∈ℝ ∧ (a ≥ 0ℝ)
∧ (a ≤ 1ℝ) }
Any vector that can be produced by vector addition and scalar multiplication from a set of vectors is spanned by that set. The vectors that spans some set are considered a basis for that set.
V⊆𝕍 ⟹
SPAN(V) ≝
{
0 +
a0v0 +
a1v1 + ... +
anvn :
ai∈ℝ
vi∈V }
A set of vectors is independent if no vector is spanned by the remaining vectors in the set:
V⊆𝕍 ⟹
INDEPENDENT(V) ≝
∀v∈V
v ∉ SPAN(V ⊖
{v})
Any point with two independent vectors can form a plane. Vectors that are not independent cause this to devolve to a line or a single point.
∀A∈ℙ
∀ v,
u ∈𝕍
INDEPENDENT({v,
u}) ⟹
∃{ A +
av + bu
: a,b∈ℝ }
Any set of vectors that spans another set is called a basis for that set.
Any independent basis for a set of vectors has one vector for each dimension of that set.
Any vector spanned by an independent basis can be unquiely represented by a set of scalars.
There are many possible sets of basis vectors. We conventionally think of the x axis pointing to the right, the y axis pointing up and the z axis pointing toward us.
v1 |
v2 |
Most common ways to represent vectors are confusing and make dimensions rigid. Blech!
Basis vectors and addition are already indispensable. Why not use them?
Adding the zero vector leaves a vector unchanged. Guess what else does that?
We could add non-zero scalars to vectors but that would be weird. Just because you can stick peas up your nose doesn't mean you should.
Educating yourself in public is painful, but the lessons stick.— Peter Schjeldahl
Geometric Algebra extends vector spaces by introducing an invertable geometric product. Many forms of math, including complex numbers and quaternions, emerge in an intuitive way.
Geometric algebra is a mathematical lost city.
We will use an orthonormal basis. That means all vectors are the same length and perpendicular to one another.
Multivectors 𝕄 and Blades 𝔹 ⊆ 𝕄
(a + b) × (c + d)
=
ac + bc + ad + bd
× | c | d |
---|---|---|
a | ac | ad |
b | bc | bd |
This follows from the distributive law. It could just as well be FIOL, OILF and so on.
(a + b + c) × (d + e + f)
=
ad + ae + af + bd + be + bf + cd + ce + cf
× | d | e | f |
---|---|---|---|
a | ad | ae | af |
b | bd | be | bf |
c | cd | ce | cf |
(a1 + a2 + ...) ×
(b1 + b2 + ...)
=
a1b1 +
a1b2 +
a2b1 +
a2b2 + ...
× | b1 | b2 | ... |
---|---|---|---|
a1 | a1b1 | a1b2 | ... |
a2 | a2b1 | a2b2 | ... |
... | ... | ... | ... |
How do we multiply vectors? The same way we multiply anything.
We can think of basis vectors like variables.
v u
= v1o1
u1o1 +
v1o1
u2o2 +
v2o2
u1o1 +
v2o2
u2o2 + ...
∀A,B∈𝕄 A · B ≝ <A B>0
v u = v1u1 + v2u2 + (v1u2 - v2u1) o1o2 + ...
v · u =
v1u1 +
v2u2 +
(v1u2 -
v2u1)
o1 ·
o2
+ ...
The scalar product is the geometric product with non-scalar terms discarded. It's always commutative.
v·u | u1o1 | u2o2 | u3o3 | ... |
v1o1 | v1u1 o1 · o1 |
|
| ... |
v2o2 |
| v2u2 o2 · o2 |
| ... |
v3o3 |
|
| v3u3 o3 · o3 | ... |
... | ... | ... | ... | ... |
∀M∈𝕄 ∃M†∈𝕄
A conjugate reverses basis component order.
Obviously (M†)†
= M
a (o1
o2 ...
on - 1
on)†
≝ a on
on - 1 ...
o2
o1
=
±a o1
o2 ...
on - 1
on
Multiply a multivector by its conjugate to get the quadrance (Wildberger 2005).
∀M∈𝕄 ⊠(M) ≝ M M†
A multivector with a scalar quadrance has a norm.
∀M∈𝕄 (⊠(M) = M·M†) ⟹ ⊠(|M|) ≝ ⊠(M) = M M†
What kind of multivector has no norm?
Scalars, vectors, pseudo-vectors and pseudo-scalars always have norms.
A multivector with non-zero scalar quadrance has an inverse. We call such multivectors blades.
TODO: prove that all mutlivectors can be decomposed into sums of blades
(o1 o2 ... on - 1 on)^ = (-1)n o1 o2 ... on - 1 on
on+1 (o1 o2 ... on - 1 on)^ = o1 o2 ... on - 1 on on + 1
∀ i∈ℕ,
a∈𝕍,
B∈𝔹
a ^ B ≝
(a B +
B^ a) / 2
B ^
a ≝ (B a +
a B^) / 2
The outer product (or wedge product) is defined in terms of the geometric product and the grade involution operator.
Let's observe some consequences of the definition:
v u = v1u1 + v2u2 + (v1u2 - v2u1) o1o2 + ...
v ^ u =
v1u1
o1 ^
o1
+
v2u2
o2 ^
o2
+
(v1u2 -
v2u1)
o1 ^
o2 +
...
The outer (or wedge) product is the geometric product with all terms containing duplicate basis vectors dropped.
v^u | u1o1 | u2o2 | u3o3 | ... |
v1o1 |
| v1u2 o1 ^ o2 | v1u3 o1 ^ o3 | ... |
v2o2 | v2u1 o2 ^ o1 |
| v2u3 o2 ^ o3 | ... |
v3o3 | v3u1 o3 ^ o1 | v3u2 o3 ^ o2 |
| ... |
... | ... | ... | ... | ... |
v^u | u1o1 | u2o2 | u3o3 | ... |
v1o1 |
| v1u2 o1o2 | v1u3 o1o3 | ... |
v2o2 | v2u1 o2o1 |
| v2u3 o2o3 | ... |
v3o3 | v3u1 o3o1 | v3u2 o3o2 |
| ... |
... | ... | ... | ... | ... |
u^v | v1o1 | v2o2 | v3o3 | ... |
u1o1 |
| u1v2 o1o2 | u1v3 o1o3 | ... |
u2o2 | u2v1 o2o1 |
| u2v3 o2o3 | ... |
u3o3 | u3v1 o3o1 | u3v2 o3o2 |
| ... |
... | ... | ... | ... | ... |
Let's notice some important properties...
A set of vectors is independent exactly when we can wedge them together and not get zero!
∀ i∈ℕ,
a∈<𝔹>1,
B∈𝔹
a ⌋
B ≝ (a B -
B^ a) / 2
B ⌊
a ≝ (B a -
a B^) / 2
The contraction is defined in terms of the geometric product and the grade involution operator. The use of subtraction means it is not always associative.
TODO: turn these into theorems
v u = v1u1 + v2u2 + (v1u2 - v2u1) o1o2 + ...
v ⌋ u =
v1u1 +
v2u2 +
v1u2
o1 ⌋
o2
+
v2u1
o2 ⌋
o1
+ ...
The contraction is the geometric product with terms that don't contract discarded. It's isomorphic to the scalar product for vectors but can be used to compute duals.
v⌋u | u1o1 | u2o2 | u3o3 | ... |
v1o1 | v1u1 o1 ⌋ o1 |
|
| ... |
v2o2 |
| v2u2 o2 ⌋ o2 |
| ... |
v3o3 |
|
| v3u3 o3 ⌋ o3 | ... |
... | ... | ... | ... | ... |
cos(α - β) = cosα cosβ + sinα sinβ
|
|
Any pair of vectors can be represented in a two dimensional basis, so this formula always applies.
v u =
v·u +
v^u =
(v1u1 +
v2u2 + ...) +
((v1u2 -
v2u1)
o1o2 + ...)
Because the vector contraction and wedge products discard complementary terms their sum is equal to the geometric product. (This is not true for general multivectors.)
We're ready to formally define some familiar terms:
Multiply all basis vectors in order to create a multi-vector that represents the entire space. This can only ever have a single term, much like a scalar.
What does the inverse of a pseudo-scalar look like?
Positive signature pseudo-scalars have inverses equal to their conjugates.
∀M∈𝕄 ∃M*∈𝕄 M* = M⌋In-1
A dual subtracts parts of a space from a multivector and returns the rest.
v ⨯ u
=
(v ^
u)⌋
(o1 o2
o3)-1
= (v ^
u)⌋
o3 o2
o1
The cross product is the three dimensional dual of the wedge product.
And yes, it's Evil, Bad and Wrong.
Any time you encounter a cross product someone is trying to hide a bivector!
Let's turn our attention to... turning.
What happens when we square o1o2?
Imaginary numbers are NOT imaginary!
Complex numbers are NOT complex!
The geometric product of a pair of two dimensional vectors is ismorphic to a complex number.
Let's tame these too! Every product of a pair of three dimensional vectors is isomorphic to a quaternion. Quaternion multiplication is the geometric product.
Curiously, octonians almost match the product of a pair of four dimensional vectors, but not quite. Octonians are NOT associative, unlike the geometric product.
eiej | 1 | e1 | e2 | e3 | e4 | e5 | e6 | e7 |
---|---|---|---|---|---|---|---|---|
1 | 1 | e1 | e2 | e3 | e4 | e5 | e6 | e7 |
e1 | e1 | -1 | e3 | -e2 | e5 | -e4 | -e7 | e6 |
e2 | e2 | -e3 | -1 | e1 | e6 | e7 | -e4 | -e5 |
e3 | e3 | e2 | -e1 | -1 | e7 | -e6 | e5 | -e4 |
e4 | e4 | -e5 | -e6 | -e7 | -1 | e1 | e2 | e3 |
e5 | e5 | e4 | -e7 | e6 | -e1 | -1 | -e3 | e2 |
e6 | e6 | e7 | e4 | -e5 | -e2 | e3 | -1 | -e1 |
e7 | e7 | -e6 | e5 | e4 | -e3 | -e2 | e1 | -1 |
Basis | 1 | o1o2 | o2o3 | o1o3 | o1o4 | o2o4 | o3o4 | o1o2o3o4 |
---|---|---|---|---|---|---|---|---|
1 | 1 | o1o2 | o2o3 | o1o3 | o1o4 | o2o4 | o3o4 | o1o2o3o4 |
o1o2 | o1o2 | -1 | o1o3 | -o2o3 | -o2o4 | o1o4 | o1o2o3o4 | -o3o4 |
o2o3 | o2o3 | -o1o3 | -1 | o1o2 | o1o2o3o4 | -o3o4 | o2o4 | -o1o4 |
o1o3 | o1o3 | o2o3 | -o1o2 | -1 | o3o4 | o1o2o3o4 | -o1o4 | -o2o4 |
o1o4 | o1o4 | o2o4 | o1o2o3o4 | o3o4 | -1 | -o1o2 | -o1o3 | -o2o3 |
o2o4 | o2o4 | -o1o4 | o3o4 | -o1o2o3o4 | o1o2 | -1 | -o2o3 | o1o3 |
o3o4 | o3o4 | o1o2o3o4 | -o2o4 | -o1o4 | o1o3 | o2o3 | -1 | o1o2 |
o1o2o3o4 | o1o2o3o4 | -o3o4 | o1o4 | o2o4 | -o2o3 | o1o3 | -o1o2 | 1 |
Division Algebras
|
Reality
|
v = v∥u + v⟂u
Any vector can be broken down into a projection and a rejection with respect to another vector.
Reflection is achieved by subtracting the rejection instead of adding it.
Geometric algebra gives us an elegant and compact way to understand these operations.
A reflection is performed by multiplying from the left and dividing from the right.
What happens if we reflect twice?
Reflecting twice preserved the vector length but changed its orientation. What else does that?
Reflecting across two vectors is a rotation!
This works in any number of dimensions. Multiply by a vector product (complex number, quaternion and so on) to rotate and scale. Divide afterward to undo the scaling -- and double the rotation angle.
Notice that the sum of two vectors is halfway between them in angle. Use this in place of one of the vectors to rotate by the exact angle.
How can we interpolate a rotation?
Use this to produce intermediate rotations. Some irrational computation required.
A direct way to uncover the components of a vector for a given basis.
v = v1b1 + v2b2 + ...
u^v = (u1o1 + u2o2) ^ (v1o1 + v2o2)
Doesn't that formula seem familiar?
u ^ v ^
w =
(u1o1 +
u2o2 +
u3o3) ^
(v1o1 +
v2o2 +
v3o3) ^
(w1o1 +
w2o2 +
w3o3)
A determinant is the dual of a pseudo-scalar created by wedging n n-dimensional vectors.
v1b1 + v2b2 = v
Given b1, b2 and v solve for v1 and v2
|
|
|
|
v1b1 + v2b2 + v3b3 = v
Given b1, b2, b3 and v solve for v1, v2 and v3
|
|
|
This approach works for any number of dimensions as long as the determinant is not zero.
v1b1 + v2b2 + ... = v
Space | Point | Direction | Advantage | |
---|---|---|---|---|
Standard | ℝn | Vector | Vector | Simple |
Homogeneous | ℝn + 1 | p · o0 ≠ 0 | v · o0 = 0 | Linear |
Conformal | ℝn + 1, 1 |
p · p = 0 ∧ -∞ · p ≠ 0 |
v ·
v ≠ 0 ∧ -∞ · v = 0 |
Structure Preserving |
∀p∈𝔼 p ≝ p
There's a one-to-one correspondence between points and vectors in the standard model.
distance2(p, q) ≝ ⊠(p - q) = (p - q) (p - q)†
Subtract to get a vector between the points and then take the norm of that.
Basis signatures, updated:
∀i∈ℕ oioi = 1
To support the homogeneous model we introduce a non-Euclidean o0 lexigraphically before the x axis. This extra dimension gives a weight to each point representation.
∀a∈ℝ, p∈𝔼 p ≝ a (o0 + p)
distance2(p, q)
≝ ⊠((p / p ·
o0) - (q /
q ·
o0))
=
((p / p ·
o0) - (q /
q ·
o0))
((p / p ·
o0) - (q /
q ·
o0))†
Normalizing first ensures that the o0 component does not contribute to the distance metric.
Basis signatures, updated:
To support the conformal model we introduce o0 with positive signature (o02 = 1) and i0 with negative signature (i02 = -1).
𝔼 ≝ { v : v ∈ <𝕄>1 ∧ (v · o0 = 0) ∧ ∀a∈ℕ (v · ia = 0)}
All vectors we've considered so far can be represented using positive signature orthonormal basis terms with indices greater than zero. Before we expand on this, let's name them.
o0i0
A Minkowski space mixes basis vectors of positive and negative signature. We will refer to the two basis vectors we've added to the Euclidean space as the Minkowski plane for this reason.
Meet the null vectors:
o ≝ (i0 + o0) / 2 | ∞ ≝ i0 - o0 |
Both have zero quadrance and exist entirely within the Minkowski plane.
Both are orthogonal to the base space:
Putting them together...
p = o + p + a∞
p ≝ w (o + p + p2/2 ∞)
distance2(p, q) ≝ -2 (p / (-∞ · p)) · (q / (-∞ · q))
No subtraction is necessary?
pv = V p V-1
Euclidean versors preserve the point at infinity:
V ∞ V-1 = ∞
Vt ≝ e∞t/2 = 1 + ∞t/2 = 1 - t∞/2
Vt ∞ Vt-1 = (1 + ∞t/2) ∞ (1 - ∞t/2)
Translation preserves the point at infinity, which makes it a Euclidean transformation.
Vr ∞ Vr-1 = (cos(θ/2) + Isin(θ/2)) ∞ (cos(θ/2) - Isin(θ/2))
Euclidean rotation preserves the point at infinity.
What if we want to do more than one operation?
pab =
Vb (Va p
Va-1) Vb-1
=
(Vb Va) p
(Vb Va)-1
Versors can be composed using multiplication, which is efficient when many objects must be transformed. Order must be reversed as shown.
A conformal round represents a set of points a fixed distance from some center.
A direct circle is a wedge of three distinct points:
C = p1 ^ p2 ^ p3
Any three distinct points define a circumcircle.
A direct sphere is a wedge of four distinct points:
S = p1 ^ p2 ^ p3 ^ p4
What does a circle look like in one dimension? A pair
of points.
P = p1 ^
p2
Radius2: ⊠(R (R ^ ∞)-1) ...but what if (R ^ ∞ = 0)?
As with rounds, we can test whether a point is part of a flat by checking whether it wedges to zero:
Test: ∀p∈ℙ p∈F ⟺ F ^ p = 0
F ^ ∞ = 0
The point at infinity is always part of a flat. This is what distinguishes them from rounds.
A circle that passes through infinity is a line:
L = p1 ^ p2 ^ ∞
Alternative: L = p1 ^ v ^ ∞
COLINEAR(p1, p2, p3) ≝ p1 ^ p2 ^ p3 ^ ∞ = 0
A sphere that passes through infinity is a plane:
P = p1 ^ p2 ^ p3 ^ ∞
Alternative: P = p1 ^ B ^ ∞
COPLANAR(p1, p2, p3, p4) ≝ p1 ^ p2 ^ p3 ^ p4 ^ ∞ = 0
A single point wedged with infinity is the flat
equivalent of a point pair.
F = p ^ ∞
p = - ((o^∞) ⌋ (o ^ F)) ((o^∞) ⌋ F)-1
p = o + p + p2/2 ∞
Consider a conformal round R. What is R ^ ∞?
It's a conformal flat of one dimension more!
Radius2(R) = ⊠(R (R ^ ∞)-1)
Using the conformal pseudo-scalar we can construct a dual round.
D = R ⌋ (R ^ ∞)-1
Dual rounds are vectors so unlike rounds they have no carrier flat or readily identifiable dimension. Many rounds may have the same dual round.
Dual flats have a direction and position but no dimension. They serve the same purpose as normal vectors in traditional linear algebra.
D = F ⌋ (o ^ I ^ ∞)-1
F = D ⌋ (o ^ I ^ ∞)
Formula | Quad | Weight | |
---|---|---|---|
Point | w (o + p + p2/2 ∞) | ⊠(p) = 0 | -∞ · p ≠ 0 |
Dual Round | w (p - r2/2 ∞) | ⊠(r) > 0 | -∞ · r ≠ 0 |
Dual Imaginary | w (p + r2/2 ∞) | ⊠(i) < 0 | -∞ · i ≠ 0 |
Direction | v | ⊠(v) > 0 | -∞ · v = 0 |
Dual Flat | n + d ∞ | ⊠(f) > 0 | -∞ · f = 0 |
∀a∈ℝ
∀i∈ℤ ∀t
(⟨a, {}⟩ ∈ 𝕄) ∧
(⟨a, t⟩∈𝕄
⟹ ⟨a, ⟨i,
t⟩⟩∈𝕄)
A multivector component consists of a real number and an integer tuple in an ordered pair. The tuple may be empty or have any number of integers.
Equal integers can be combined. Unequal integers can be swapped by negating the real number.
A multivector is a tuple consisting of one or more multivector components.
Multivectors the same if their components are the same. Swapping is allowed and components with matching tuples can be merged.
Representing multivectors as sums of vectors is more convenient than using ordered pairs.
∀⟨a,
ta⟩,⟨b,
tb⟩∈𝕄
∀c∈({{}} ∪ 𝔾)
∀d∈𝔾
⟨⟨a,
ta⟩, c⟩ +
⟨⟨b,
tb⟩, {}⟩
≝
⟨⟨b,
tb⟩, ⟨⟨a,
ta⟩, c⟩⟩
∧
⟨⟨a,
ta⟩, c⟩ +
⟨⟨b,
tb⟩, d⟩
≝
⟨⟨b,
tb⟩, ⟨⟨a,
ta⟩, c⟩⟩ + d
Multivector addition merges the components of both into a single chain which can then be manipulated according to equality rules.
∀a,b∈𝔾 a + b ∈𝔾
Multivector addition moves components from one to another. At each step parts of the sum are multivectors.
∀a∈𝔾 a + 0 = a = 0 + a
Multivector 0 is the identity. Multivector addition allows swapping pairs of components and dropping zero components.
∀a,b,c∈𝔾 (a + b) + c = a + (b + c)
Multivector equality allows us to swap components into any order.
∀a,b∈𝔾 a + b = b + a
Multivector equality allows us to swap components into any order.
∀a∈𝔾 ∃(-a)∈𝔾 a + (-a) = 0
Each multivector component can be negated by replacing the real number with its addative inverse. Adding a multivector to its inverse results in pairs of zero valued components.
∀⟨a, ta⟩,⟨b, tb⟩∈𝕄 ∀c∈({{}} ∪ 𝔾) ∀d∈𝔾