Constructing ℤ, ℚ and ℝ
Warm-upHumanWith iff , which pairs of natural numbers lie in the class that represents the integer ? (Choose all that apply.)
With iff , which pairs of natural numbers lie in the class that represents the integer ? (Choose all that apply.)
Using , compute . Which integer does the resulting class represent?
In the proof that equality of fractions () is transitive, from and we derive . Which step needs the hypothesis that the ring has no zero divisors?
Each rule below is defined on a representative (or two, and ) of a rational number, with . Which rules are not well defined as functions of the rational numbers? (Choose all that apply.)
Which of these subsets of are Dedekind cuts (non-empty, not all of , closed downwards, no greatest element)? (Choose all that apply.)
Which example shows that is not complete (that not every non-empty, bounded-above subset has a least upper bound in )?
In the lesson's Lean file, PairInt.add is defined with Quotient.map₂ (fun p q => (p.1 + q.1, p.2 + q.2)) (proof). What is the second argument, and what happens if you leave it out?
Implement the integers as pairs of natural numbers. Write canonical(p), returning the representative of the class of p that has a in at least one coordinate, and mul(p, q) using . Then check, for all pairs with entries up to , that mul is well defined: equivalent inputs give outputs with the same canonical form.