Merge branch 'main' of github.com:leanprover-community/lean4game
This commit is contained in:
@@ -12,7 +12,6 @@ namespace MyNat
|
||||
-- precisely the oddball (to my eyes) classes which nat was an instance of,
|
||||
-- but I think they would make great collectibles.
|
||||
|
||||
|
||||
-- instance addSemigroup : AddSemigroup ℕ :=
|
||||
-- {
|
||||
-- zero := 0
|
||||
@@ -20,4 +19,4 @@ namespace MyNat
|
||||
-- }
|
||||
-- MyNat.addMonoid -- (after level 2)
|
||||
-- MyNat.addCommSemigroup -- (after level 4)
|
||||
-- MyNat.addCommMonoid -- (after level 4)
|
||||
-- MyNat.addCommMonoid -- (after level 4)
|
||||
|
||||
@@ -10,7 +10,7 @@ def le (a b : ℕ) := ∃ (c : ℕ), b = a + c
|
||||
-- the existence definition.
|
||||
|
||||
-- | le 0 _
|
||||
-- | le (succ a) (succ b) = le ab
|
||||
-- | le (succ a) (succ b) = le ab
|
||||
|
||||
-- notation
|
||||
instance : LE MyNat := ⟨MyNat.le⟩
|
||||
@@ -19,4 +19,4 @@ instance : LE MyNat := ⟨MyNat.le⟩
|
||||
|
||||
theorem le_iff_exists_add (a b : ℕ) : a ≤ b ↔ ∃ (c : ℕ), b = a + c := Iff.rfl
|
||||
|
||||
end MyNat
|
||||
end MyNat
|
||||
|
||||
Reference in New Issue
Block a user