doc: add historical comments about definition of LE.

This commit is contained in:
Kevin Buzzard
2025-03-14 17:06:32 +00:00
parent ff20831ad7
commit a022b0673d

View File

@@ -4,13 +4,26 @@ namespace MyNat
def le (a b : ) := (c : ), b = a + c
-- Another choice is to define it recursively:
-- (kb) note: I didn't choose this option because tests showed
-- that mathematicians found it a lot more confusing than
-- the existence definition.
/-
-- | le 0 _
-- | le (succ a) (succ b) = le ab
Another choice would have been to define `MyNat.le` recursively, like `Nat.le` is
defined in core:
```
protected inductive Nat.le (n : Nat) : Nat → Prop
/-- Less-equal is reflexive: `n ≤ n` -/
| refl : Nat.le n n
/-- If `n ≤ m`, then `n ≤ m + 1`. -/
| step {m} : Nat.le n m → Nat.le n (succ m)
```
Yet another option would be the definition I tried in Exercise 9 of the 2017 prototype version
of the game (see https://xenaproject.wordpress.com/2017/10/31/building-the-non-negative-integers-from-scratch/).
I ultimately didn't choose these options because tests showed
that mathematicians found building the basic API a lot more confusing than
with the existence definition.
-/
-- notation
instance : LE MyNat := MyNat.le