-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImagen_de_la_union_general.thy
126 lines (115 loc) · 3.87 KB
/
Imagen_de_la_union_general.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
118
119
120
121
122
123
124
125
126
(* Imagen_de_la_union_general.thy
-- Imagen de la unión general
-- José A. Alonso Jiménez <https://jaalonso.github.io>
-- Sevilla, 25-abril-2024
-- ------------------------------------------------------------------ *)
(* ---------------------------------------------------------------------
-- Demostrar que
-- f[\<Union>ᵢAᵢ] = \<Union>ᵢf[Aᵢ]
-- ------------------------------------------------------------------ *)
theory Imagen_de_la_union_general
imports Main
begin
(* 1\<ordfeminine> demostración *)
lemma "f ` (\<Union> i \<in> I. A i) = (\<Union> i \<in> I. f ` A i)"
proof (rule equalityI)
show "f ` (\<Union> i \<in> I. A i) \<subseteq> (\<Union> i \<in> I. f ` A i)"
proof (rule subsetI)
fix y
assume "y \<in> f ` (\<Union> i \<in> I. A i)"
then show "y \<in> (\<Union> i \<in> I. f ` A i)"
proof (rule imageE)
fix x
assume "y = f x"
assume "x \<in> (\<Union> i \<in> I. A i)"
then have "f x \<in> (\<Union> i \<in> I. f ` A i)"
proof (rule UN_E)
fix i
assume "i \<in> I"
assume "x \<in> A i"
then have "f x \<in> f ` A i"
by (rule imageI)
with \<open>i \<in> I\<close> show "f x \<in> (\<Union> i \<in> I. f ` A i)"
by (rule UN_I)
qed
with \<open>y = f x\<close> show "y \<in> (\<Union> i \<in> I. f ` A i)"
by (rule ssubst)
qed
qed
next
show "(\<Union> i \<in> I. f ` A i) \<subseteq> f ` (\<Union> i \<in> I. A i)"
proof (rule subsetI)
fix y
assume "y \<in> (\<Union> i \<in> I. f ` A i)"
then show "y \<in> f ` (\<Union> i \<in> I. A i)"
proof (rule UN_E)
fix i
assume "i \<in> I"
assume "y \<in> f ` A i"
then show "y \<in> f ` (\<Union> i \<in> I. A i)"
proof (rule imageE)
fix x
assume "y = f x"
assume "x \<in> A i"
with \<open>i \<in> I\<close> have "x \<in> (\<Union> i \<in> I. A i)"
by (rule UN_I)
then have "f x \<in> f ` (\<Union> i \<in> I. A i)"
by (rule imageI)
with \<open>y = f x\<close> show "y \<in> f ` (\<Union> i \<in> I. A i)"
by (rule ssubst)
qed
qed
qed
qed
(* 2\<ordfeminine> demostración *)
lemma "f ` (\<Union> i \<in> I. A i) = (\<Union> i \<in> I. f ` A i)"
proof
show "f ` (\<Union> i \<in> I. A i) \<subseteq> (\<Union> i \<in> I. f ` A i)"
proof
fix y
assume "y \<in> f ` (\<Union> i \<in> I. A i)"
then show "y \<in> (\<Union> i \<in> I. f ` A i)"
proof
fix x
assume "y = f x"
assume "x \<in> (\<Union> i \<in> I. A i)"
then have "f x \<in> (\<Union> i \<in> I. f ` A i)"
proof
fix i
assume "i \<in> I"
assume "x \<in> A i"
then have "f x \<in> f ` A i" by simp
with \<open>i \<in> I\<close> show "f x \<in> (\<Union> i \<in> I. f ` A i)" by (rule UN_I)
qed
with \<open>y = f x\<close> show "y \<in> (\<Union> i \<in> I. f ` A i)" by simp
qed
qed
next
show "(\<Union> i \<in> I. f ` A i) \<subseteq> f ` (\<Union> i \<in> I. A i)"
proof
fix y
assume "y \<in> (\<Union> i \<in> I. f ` A i)"
then show "y \<in> f ` (\<Union> i \<in> I. A i)"
proof
fix i
assume "i \<in> I"
assume "y \<in> f ` A i"
then show "y \<in> f ` (\<Union> i \<in> I. A i)"
proof
fix x
assume "y = f x"
assume "x \<in> A i"
with \<open>i \<in> I\<close> have "x \<in> (\<Union> i \<in> I. A i)" by (rule UN_I)
then have "f x \<in> f ` (\<Union> i \<in> I. A i)" by simp
with \<open>y = f x\<close> show "y \<in> f ` (\<Union> i \<in> I. A i)" by simp
qed
qed
qed
qed
(* 3\<ordfeminine> demostración *)
lemma "f ` (\<Union> i \<in> I. A i) = (\<Union> i \<in> I. f ` A i)"
by (simp only: image_UN)
(* 4\<ordfeminine> demostración *)
lemma "f ` (\<Union> i \<in> I. A i) = (\<Union> i \<in> I. f ` A i)"
by auto
end