Files
NNG/Game/MyNat/LE.lean
2023-11-22 09:26:49 +01:00

22 lines
566 B
Lean4
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Game.MyNat.Multiplication
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
-- notation
instance : LE MyNat := MyNat.le
-- We don't use this any more; I tell the users `≤` is *notation*
-- theorem le_iff_exists_add (a b : ) : a ≤ b ↔ ∃ (c : ), b = a + c := Iff.rfl
end MyNat