You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lean4game/server/nng/NNG/MyNat/LE.lean

22 lines
550 B
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import NNG.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⟩
--@[leakage] theorem le_def' : MyNat.le = (≤) := rfl
theorem le_iff_exists_add (a b : ) : a ≤ b ↔ ∃ (c : ), b = a + c := Iff.rfl
end MyNat