-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImagen_inversa_de_la_union.thy
117 lines (106 loc) · 3.22 KB
/
Imagen_inversa_de_la_union.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
(* Imagen_inversa_de_la_union.thy
f⁻¹[A \<union> B] = f⁻¹[A] \<union> f⁻¹[B].
José A. Alonso Jiménez <https://jaalonso.github.io>
Sevilla, 5-abril-2024
------------------------------------------------------------------ *)
(* ---------------------------------------------------------------------
-- Demostrar que
-- f -` (u \<union> v) = f -` u \<union> f -` v
-- ------------------------------------------------------------------ *)
theory Imagen_inversa_de_la_union
imports Main
begin
(* 1\<ordfeminine> demostración *)
lemma "f -` (u \<union> v) = f -` u \<union> f -` v"
proof (rule equalityI)
show "f -` (u \<union> v) \<subseteq> f -` u \<union> f -` v"
proof (rule subsetI)
fix x
assume "x \<in> f -` (u \<union> v)"
then have "f x \<in> u \<union> v"
by (rule vimageD)
then show "x \<in> f -` u \<union> f -` v"
proof (rule UnE)
assume "f x \<in> u"
then have "x \<in> f -` u"
by (rule vimageI2)
then show "x \<in> f -` u \<union> f -` v"
by (rule UnI1)
next
assume "f x \<in> v"
then have "x \<in> f -` v"
by (rule vimageI2)
then show "x \<in> f -` u \<union> f -` v"
by (rule UnI2)
qed
qed
next
show "f -` u \<union> f -` v \<subseteq> f -` (u \<union> v)"
proof (rule subsetI)
fix x
assume "x \<in> f -` u \<union> f -` v"
then show "x \<in> f -` (u \<union> v)"
proof (rule UnE)
assume "x \<in> f -` u"
then have "f x \<in> u"
by (rule vimageD)
then have "f x \<in> u \<union> v"
by (rule UnI1)
then show "x \<in> f -` (u \<union> v)"
by (rule vimageI2)
next
assume "x \<in> f -` v"
then have "f x \<in> v"
by (rule vimageD)
then have "f x \<in> u \<union> v"
by (rule UnI2)
then show "x \<in> f -` (u \<union> v)"
by (rule vimageI2)
qed
qed
qed
(* 2\<ordfeminine> demostración *)
lemma "f -` (u \<union> v) = f -` u \<union> f -` v"
proof
show "f -` (u \<union> v) \<subseteq> f -` u \<union> f -` v"
proof
fix x
assume "x \<in> f -` (u \<union> v)"
then have "f x \<in> u \<union> v" by simp
then show "x \<in> f -` u \<union> f -` v"
proof
assume "f x \<in> u"
then have "x \<in> f -` u" by simp
then show "x \<in> f -` u \<union> f -` v" by simp
next
assume "f x \<in> v"
then have "x \<in> f -` v" by simp
then show "x \<in> f -` u \<union> f -` v" by simp
qed
qed
next
show "f -` u \<union> f -` v \<subseteq> f -` (u \<union> v)"
proof
fix x
assume "x \<in> f -` u \<union> f -` v"
then show "x \<in> f -` (u \<union> v)"
proof
assume "x \<in> f -` u"
then have "f x \<in> u" by simp
then have "f x \<in> u \<union> v" by simp
then show "x \<in> f -` (u \<union> v)" by simp
next
assume "x \<in> f -` v"
then have "f x \<in> v" by simp
then have "f x \<in> u \<union> v" by simp
then show "x \<in> f -` (u \<union> v)" by simp
qed
qed
qed
(* 3\<ordfeminine> demostración *)
lemma "f -` (u \<union> v) = f -` u \<union> f -` v"
by (simp only: vimage_Un)
(* 4\<ordfeminine> demostración *)
lemma "f -` (u \<union> v) = f -` u \<union> f -` v"
by auto
end