Definition 2.3.1 (Multiplication of natural numbers)
Equations
- n.mul m = Chapter2.Nat.recurse (fun (x prod : Chapter2.Nat) => prod + m) 0 n
Instances For
This instance allows for the * notation to be used for natural number multiplication.
Equations
- Chapter2.Nat.instMul = { mul := Chapter2.Nat.mul }
Definition 2.3.1 (Multiplication of natural numbers)
Compare with Mathlib's Nat.zero_mul
Definition 2.3.1 (Multiplication of natural numbers)
Compare with Mathlib's Nat.succ_mul
This lemma will be useful to prove Lemma 2.3.2.
Compare with Mathlib's Nat.mul_zero
This lemma will be useful to prove Lemma 2.3.2.
Compare with Mathlib's Nat.mul_succ
Lemma 2.3.2 (Multiplication is commutative) / Exercise 2.3.1
Compare with Mathlib's Nat.mul_comm
This lemma will be useful to prove Lemma 2.3.3.
Compare with Mathlib's Nat.mul_pos
Lemma 2.3.3 (Positive natural numbers have no zero divisors) / Exercise 2.3.2.
Compare with Mathlib's Nat.mul_eq_zero.
Proposition 2.3.4 (Distributive law)
Compare with Mathlib's Nat.mul_add
Proposition 2.3.4 (Distributive law)
Compare with Mathlib's Nat.add_mul
Proposition 2.3.5 (Multiplication is associative) / Exercise 2.3.3
Compare with Mathlib's Nat.mul_assoc
(Not from textbook) Nat is a commutative semiring.
This allows tactics such as ring to apply to the Chapter 2 natural numbers.
Equations
- One or more equations did not get rendered due to their size.
Proposition 2.3.6 (Multiplication preserves order)
Compare with Mathlib's Nat.mul_lt_mul_of_pos_right
Proposition 2.3.6 (Multiplication preserves order)
Compare with Mathlib's Nat.mul_lt_mul_of_pos_left
Corollary 2.3.7 (Cancellation law)
Compare with Mathlib's Nat.mul_right_cancel
(Not from textbook) Nat is an ordered semiring.
This allows tactics such as gcongr to apply to the Chapter 2 natural numbers.
Definition 2.3.11 (Exponentiation for natural numbers)
Equations
- m.pow n = Chapter2.Nat.recurse (fun (x prod : Chapter2.Nat) => prod * m) 1 n
Instances For
Equations
- Chapter2.Nat.instPow = { pow := Chapter2.Nat.pow }
Definition 2.3.11 (Exponentiation for natural numbers)
Compare with Mathlib's Nat.pow_zero
Definition 2.3.11 (Exponentiation for natural numbers)
Definition 2.3.11 (Exponentiation for natural numbers)
Compare with Mathlib's Nat.pow_succ