Skip to content

Commit

Permalink
Merge pull request #64 from yannickseurin/add_right_eq_self
Browse files Browse the repository at this point in the history
alternate proof for `add_right_eq_self`
  • Loading branch information
joneugster authored Aug 28, 2024
2 parents 7400b12 + 2ba1b70 commit 66b27f3
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions Game/Levels/AdvAddition/L04add_right_eq_self.lean
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,17 @@ rw [add_comm]
exact add_left_eq_self y x
```
Alternatively you can just prove it by induction on `x`
(the dots in the proof just indicate the two goals and
can be omitted):
Alternatively you can just prove it by induction on `x`:
```
induction x with d hd
· intro h
rw [zero_add] at h
assumption
· intro h
rw [succ_add] at h
apply succ_inj at h
apply hd at h
assumption
induction x with d hd
intro h
rw [zero_add] at h
exact h
intro h
rw [succ_add] at h
apply succ_inj at h
apply hd at h
exact h
```
"

0 comments on commit 66b27f3

Please sign in to comment.