(* Imagen_de_la_union_general.thy -- Imagen de la unión general -- José A. Alonso Jiménez -- Sevilla, 25-abril-2024 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- Demostrar que -- f[\ᵢAᵢ] = \ᵢf[Aᵢ] -- ------------------------------------------------------------------ *) theory Imagen_de_la_union_general imports Main begin (* 1\ demostración *) lemma "f ` (\ i \ I. A i) = (\ i \ I. f ` A i)" proof (rule equalityI) show "f ` (\ i \ I. A i) \ (\ i \ I. f ` A i)" proof (rule subsetI) fix y assume "y \ f ` (\ i \ I. A i)" then show "y \ (\ i \ I. f ` A i)" proof (rule imageE) fix x assume "y = f x" assume "x \ (\ i \ I. A i)" then have "f x \ (\ i \ I. f ` A i)" proof (rule UN_E) fix i assume "i \ I" assume "x \ A i" then have "f x \ f ` A i" by (rule imageI) with \i \ I\ show "f x \ (\ i \ I. f ` A i)" by (rule UN_I) qed with \y = f x\ show "y \ (\ i \ I. f ` A i)" by (rule ssubst) qed qed next show "(\ i \ I. f ` A i) \ f ` (\ i \ I. A i)" proof (rule subsetI) fix y assume "y \ (\ i \ I. f ` A i)" then show "y \ f ` (\ i \ I. A i)" proof (rule UN_E) fix i assume "i \ I" assume "y \ f ` A i" then show "y \ f ` (\ i \ I. A i)" proof (rule imageE) fix x assume "y = f x" assume "x \ A i" with \i \ I\ have "x \ (\ i \ I. A i)" by (rule UN_I) then have "f x \ f ` (\ i \ I. A i)" by (rule imageI) with \y = f x\ show "y \ f ` (\ i \ I. A i)" by (rule ssubst) qed qed qed qed (* 2\ demostración *) lemma "f ` (\ i \ I. A i) = (\ i \ I. f ` A i)" proof show "f ` (\ i \ I. A i) \ (\ i \ I. f ` A i)" proof fix y assume "y \ f ` (\ i \ I. A i)" then show "y \ (\ i \ I. f ` A i)" proof fix x assume "y = f x" assume "x \ (\ i \ I. A i)" then have "f x \ (\ i \ I. f ` A i)" proof fix i assume "i \ I" assume "x \ A i" then have "f x \ f ` A i" by simp with \i \ I\ show "f x \ (\ i \ I. f ` A i)" by (rule UN_I) qed with \y = f x\ show "y \ (\ i \ I. f ` A i)" by simp qed qed next show "(\ i \ I. f ` A i) \ f ` (\ i \ I. A i)" proof fix y assume "y \ (\ i \ I. f ` A i)" then show "y \ f ` (\ i \ I. A i)" proof fix i assume "i \ I" assume "y \ f ` A i" then show "y \ f ` (\ i \ I. A i)" proof fix x assume "y = f x" assume "x \ A i" with \i \ I\ have "x \ (\ i \ I. A i)" by (rule UN_I) then have "f x \ f ` (\ i \ I. A i)" by simp with \y = f x\ show "y \ f ` (\ i \ I. A i)" by simp qed qed qed qed (* 3\ demostración *) lemma "f ` (\ i \ I. A i) = (\ i \ I. f ` A i)" by (simp only: image_UN) (* 4\ demostración *) lemma "f ` (\ i \ I. A i) = (\ i \ I. f ` A i)" by auto end