Skip to content

Commit

Permalink
Merge pull request #15 from hhu-adam/docstrings
Browse files Browse the repository at this point in the history
better? docstrings
  • Loading branch information
joneugster authored Aug 6, 2023
2 parents 134d5cc + f3792e5 commit 0e360a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Game/MyNat/Addition.lean
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ instance : Add MyNat where
add := MyNat.add

/--
This theorem proves that if you add zero to a MyNat you get back the same number.
If `a` is a natural number, then `add_zero a` is the proof that `a + 0 = a`.
-/
theorem add_zero (a : MyNat) : a + 0 = a := by rfl

/--
This theorem proves that (a + (d + 1)) = ((a + d) + 1) for a,d in MyNat.
If `a` and `d` are natural numbers, then `add_succ a d` is the proof that
`a + succ d = succ (a + d)`.
-/
theorem add_succ (a d : MyNat) : a + (succ d) = succ (a + d) := by rfl
2 changes: 1 addition & 1 deletion Game/MyNat/Definition.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/-- Our copy of the natural numbers called `MyNat`. -/
/-- Our copy of the natural numbers called `MyNat`, with notation `ℕ`. -/
inductive MyNat where
| zero : MyNat
| succ : MyNat → MyNat
Expand Down

0 comments on commit 0e360a1

Please sign in to comment.