-
Notifications
You must be signed in to change notification settings - Fork 0
/
Equivalencia_de_inversos_iguales_al_neutro.lean
97 lines (80 loc) · 1.78 KB
/
Equivalencia_de_inversos_iguales_al_neutro.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
-- Equivalencia_de_inversos_iguales_al_neutro.lean
-- Equivalencia de inversos iguales al neutro
-- José A. Alonso Jiménez
-- Sevilla, 1 de julio de 2021
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Sea M un monoide y a, b ∈ M tales que a * b = 1. Demostrar que a = 1
-- si y sólo si b = 1.
-- ---------------------------------------------------------------------
import algebra.group.basic
variables {M : Type} [monoid M]
variables {a b : M}
-- 1ª demostración
-- ===============
example
(h : a * b = 1)
: a = 1 ↔ b = 1 :=
begin
split,
{ intro a1,
rw a1 at h,
rw one_mul at h,
exact h, },
{ intro b1,
rw b1 at h,
rw mul_one at h,
exact h, },
end
-- 2ª demostración
-- ===============
example
(h : a * b = 1)
: a = 1 ↔ b = 1 :=
begin
split,
{ intro a1,
calc b = 1 * b : (one_mul b).symm
... = a * b : congr_arg (* b) a1.symm
... = 1 : h, },
{ intro b1,
calc a = a * 1 : (mul_one a).symm
... = a * b : congr_arg ((*) a) b1.symm
... = 1 : h, },
end
-- 3ª demostración
-- ===============
example
(h : a * b = 1)
: a = 1 ↔ b = 1 :=
begin
split,
{ rintro rfl,
simpa using h, },
{ rintro rfl,
simpa using h, },
end
-- 4ª demostración
-- ===============
example
(h : a * b = 1)
: a = 1 ↔ b = 1 :=
by split ; { rintro rfl, simpa using h }
-- 5ª demostración
-- ===============
example
(h : a * b = 1)
: a = 1 ↔ b = 1 :=
by split ; finish
-- 6ª demostración
-- ===============
example
(h : a * b = 1)
: a = 1 ↔ b = 1 :=
by finish [iff_def]
-- 7ª demostración
-- ===============
example
(h : a * b = 1)
: a = 1 ↔ b = 1 :=
eq_one_iff_eq_one_of_mul_eq_one h