-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEquivalencia_de_inversos_iguales_al_neutro.thy
66 lines (55 loc) · 2.26 KB
/
Equivalencia_de_inversos_iguales_al_neutro.thy
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
(* Equivalencia_de_inversos_iguales_al_neutro.thy
-- Equivalencia de inversos iguales al neutro
-- José A. Alonso Jiménez <https://jaalonso.github.io>
-- Sevilla, 7-mayo-2024
-- ------------------------------------------------------------------ *)
(* ---------------------------------------------------------------------
-- Sea M un monoide y a, b \<in> M tales que a * b = 1. Demostrar que a = 1
-- si y sólo si b = 1.
-- ------------------------------------------------------------------ *)
theory Equivalencia_de_inversos_iguales_al_neutro
imports Main
begin
context monoid
begin
(* 1\<ordfeminine> demostración *)
lemma
assumes "a \<^bold>* b = \<^bold>1"
shows "a = \<^bold>1 \<longleftrightarrow> b = \<^bold>1"
proof (rule iffI)
assume "a = \<^bold>1"
have "b = \<^bold>1 \<^bold>* b" by (simp only: left_neutral)
also have "\<dots> = a \<^bold>* b" by (simp only: \<open>a = \<^bold>1\<close>)
also have "\<dots> = \<^bold>1" by (simp only: \<open>a \<^bold>* b = \<^bold>1\<close>)
finally show "b = \<^bold>1" by this
next
assume "b = \<^bold>1"
have "a = a \<^bold>* \<^bold>1" by (simp only: right_neutral)
also have "\<dots> = a \<^bold>* b" by (simp only: \<open>b = \<^bold>1\<close>)
also have "\<dots> = \<^bold>1" by (simp only: \<open>a \<^bold>* b = \<^bold>1\<close>)
finally show "a = \<^bold>1" by this
qed
(* 2\<ordfeminine> demostración *)
lemma
assumes "a \<^bold>* b = \<^bold>1"
shows "a = \<^bold>1 \<longleftrightarrow> b = \<^bold>1"
proof
assume "a = \<^bold>1"
have "b = \<^bold>1 \<^bold>* b" by simp
also have "\<dots> = a \<^bold>* b" using \<open>a = \<^bold>1\<close> by simp
also have "\<dots> = \<^bold>1" using \<open>a \<^bold>* b = \<^bold>1\<close> by simp
finally show "b = \<^bold>1" .
next
assume "b = \<^bold>1"
have "a = a \<^bold>* \<^bold>1" by simp
also have "\<dots> = a \<^bold>* b" using \<open>b = \<^bold>1\<close> by simp
also have "\<dots> = \<^bold>1" using \<open>a \<^bold>* b = \<^bold>1\<close> by simp
finally show "a = \<^bold>1" .
qed
(* 3\<ordfeminine> demostración *)
lemma
assumes "a \<^bold>* b = \<^bold>1"
shows "a = \<^bold>1 \<longleftrightarrow> b = \<^bold>1"
by (metis assms left_neutral right_neutral)
end
end