Definition 1.1.1: An ordered set is a set S with a relation < such that
(i) (trichotomy) for all x y ∈ S, exactly one of x < y, x = y, or y < x
holds, and (ii) (transitivity) if x < y and y < z then x < z. We write
x ≤ y if x < y or x = y, and define >, ≥ analogously.
Instances For
The weak order associated to an ordered set.
Instances For
The axioms of an ordered set give a strict total order in mathlib's sense.
A strict total order in mathlib yields the ordered-set structure described in Definition 1.1.1.
Instances For
Definition 1.1.2: For a subset E of an ordered set S, (i) E is
bounded above if there is b with x ≤ b for all x ∈ E, and such a b is an
upper bound; (ii) E is bounded below if there is b with x ≥ b for all
x ∈ E, and such a b is a lower bound; (iii) an upper bound b₀ is a least
upper bound (supremum) if b₀ ≤ b for all upper bounds b, written
sup E = b₀; (iv) a lower bound b₀ is a greatest lower bound (infimum) if
b ≤ b₀ for all lower bounds b, written inf E = b₀. A set bounded above and
below is called bounded.
An element bounding every member of E above.
Instances For
An element bounding every member of E below.
Instances For
Existence of an upper bound for E.
Instances For
Existence of a lower bound for E.
Instances For
An upper bound that is minimal among all upper bounds.
Instances For
A lower bound that is maximal among all lower bounds.
Instances For
A set that is both bounded above and bounded below.
Instances For
Instances For
Instances For
Definition 1.1.3: An ordered set has the least-upper-bound property if every nonempty subset that is bounded above has a least upper bound (supremum) in the set.
Instances For
Example 1.1.4: The subset {x : ℚ | x^2 < 2} has no supremum in ℚ, so
ℚ does not have the least-upper-bound property. Equivalently, there is no
rational square root of 2.
No rational number has square equal to 2.
Definition 1.1.5: A field is a set F with addition and multiplication such
that (A1) if x,y ∈ F then x + y ∈ F; (A2) addition is commutative; (A3)
addition is associative; (A4) there is 0 ∈ F with 0 + x = x; (A5) every
x has an additive inverse -x with x + (-x) = 0; (M1) if x,y ∈ F then
x * y ∈ F; (M2) multiplication is commutative; (M3) multiplication is
associative; (M4) there is 1 ∈ F with 1 * x = x and 1 ≠ 0; (M5) every
x ≠ 0 has a multiplicative inverse x⁻¹ with x * x⁻¹ = 1; and (D)
distributivity x * (y + z) = x * y + x * z holds.
- add_comm (x y : F) : x + y = y + x
- add_assoc (x y z : F) : x + y + z = x + (y + z)
- zero_add (x : F) : 0 + x = x
- add_left_neg (x : F) : x + -x = 0
- mul_comm (x y : F) : x * y = y * x
- mul_assoc (x y z : F) : x * y * z = x * (y * z)
- one_mul (x : F) : 1 * x = x
- mul_inv_cancel {x : F} : x ≠ 0 → x * x⁻¹ = 1
- distrib (x y z : F) : x * (y + z) = x * y + x * z
- one_ne_zero : 1 ≠ 0
Instances For
Mathlib's Field structure satisfies the axioms in Definition 1.1.5.
From the field axioms we can derive the right identity for addition.
From the field axioms we can derive right multiplication by 1.
From the field axioms we obtain right distributivity.
From the field axioms we can show that x * 0 = 0.
From the field axioms we can show that 0 * x = 0.
Construct a mathlib Field structure from the axioms in Definition 1.1.5.
Instances For
The axioms in Definition 1.1.5 recover the existence of a mathlib Field
structure.
The book's axioms for a field are equivalent to the existence of a mathlib
Field structure using the same operations.
Example 1.1.6: The rationals ℚ form a field, while the integers ℤ
fail axiom (M5) because 2 has no multiplicative inverse; this is the only
field axiom that does not hold for ℤ.
The multiplicative inverse required by (M5) for 2 : ℤ does not exist.
The usual ring structure on the integers does not extend to a field structure.
Definition 1.1.7: An ordered field is a field equipped with a strict total
order such that (i) x < y implies x + z < y + z for all x y z, and
(ii) 0 < x and 0 < y imply 0 < x * y. Elements with 0 < x are positive,
those with x < 0 are negative, 0 < x ∨ x = 0 are nonnegative, and
x < 0 ∨ x = 0 are nonpositive.
- order : IsStrictTotalOrder F fun (x1 x2 : F) => x1 < x2
- add_lt_add {x y z : F} : x < y → x + z < y + z
- mul_pos {x y : F} : 0 < x → 0 < y → 0 < x * y
Instances For
An element is positive if it is greater than zero.
Instances For
An element is negative if it is less than zero.
Instances For
An element is nonnegative if it is positive or zero.
Instances For
An element is nonpositive if it is negative or zero.
Instances For
Mathlib's ordered ring structure (Field together with a linear order and
compatibility axioms) satisfies the ordered-field axioms in Definition 1.1.7.
The book's ordered-field axioms are equivalent to the existence of a mathlib structure using the same operations.
Proposition 1.1.8: Let F be an ordered field and x y z w ∈ F.
(i) If x > 0, then -x < 0 (and conversely).
(ii) If x > 0 and y < z, then x * y < x * z.
(iii) If x < 0 and y < z, then x * y > x * z.
(iv) If x ≠ 0, then x^2 > 0.
(v) If 0 < x < y, then 0 < 1 / y < 1 / x.
(vi) If 0 < x < y, then x^2 < y^2.
(vii) If x ≤ y and z ≤ w, then x + z ≤ y + w.
Proposition 1.1.9: In an ordered field, if x * y > 0 then either both
x and y are positive or both are negative.
Example 1.1.10: The complex numbers ℂ = {x + iy | x y ∈ ℝ} satisfy
I^2 = -1 and form a field. No ordering of ℂ can make it an ordered field:
in every ordered field, -1 < 0 and squares of nonzero elements are positive,
but (I : ℂ)^2 = -1.
There is no way to equip ℂ with a linear order making it an ordered
field.
Proposition 1.1.11: In an ordered field with the least-upper-bound property, every nonempty subset that is bounded below has an infimum.