Skip to content

Commit

Permalink
alternate proof for add_right_eq_self
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickseurin authored Jun 12, 2024
1 parent 401d973 commit 2ba1b70
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 2ba1b70

Please sign in to comment.