Skip to content

Commit 44a1992

Browse files
committed
Add Inv_Inj
1 parent cad12fa commit 44a1992

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

Game/Levels/Group.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Game.Levels.Group.L05_CombinedInv
66
import Game.Levels.Group.L06_CombinedInv2
77
import Game.Levels.Group.L07_InvId
88
import Game.Levels.Group.L08_InvInv
9+
import Game.Levels.Group.L09_InvInj
910

1011

1112
World "Group"

Game/Levels/Group/L09_InvInj.lean

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import Game.Levels.Group.L07_InvId
2+
3+
World "Group"
4+
Level 9
5+
6+
Title "Inverse is Injective"
7+
8+
namespace MyAlgebra
9+
10+
Introduction "
11+
Since the inverse of an inverse to be the original element it follows that if two elements have the same inverse, they must be equal.
12+
"
13+
14+
/--
15+
`inv_inj` is a proof that the inverse is injective.
16+
-/
17+
TheoremDoc MyAlgebra.inv_inv as "inv_inj" in "Group"
18+
@[to_additive]
19+
Statement inv_inj (a b : G) [Group G] : a⁻¹ = b⁻¹ ↔ a = b := by
20+
apply Iff.intro
21+
· intro h
22+
calc a = a := by rfl
23+
_ = a * 1 := by rw [mul_one]
24+
_ = a * (b⁻¹ * b) := by rw [inv_mul]
25+
_ = (a * b⁻¹) * b := by rw [mul_assoc]
26+
_ = (a * a⁻¹) * b := by rw [← h]
27+
_ = 1 * b := by rw [mul_inv]
28+
_ = b := by rw [one_mul]
29+
· intro h
30+
rw [h]
31+
32+
Conclusion "Congrats!"

0 commit comments

Comments
 (0)