(* Union_con_la_imagen.thy -- f[s ∪ f⁻¹[v]] ⊆ f[s] ∪ v -- José A. Alonso Jiménez -- Sevilla, 23-abril-2025 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- Demostrar que -- f ` (s \ f -` v) \ f ` s \ v -- ------------------------------------------------------------------ *) theory Union_con_la_imagen imports Main begin (* 1\ demostración *) lemma "f ` (s \ f -` v) \ f ` s \ v" proof (rule subsetI) fix y assume "y \ f ` (s \ f -` v)" then show "y \ f ` s \ v" proof (rule imageE) fix x assume "y = f x" assume "x \ s \ f -` v" then show "y \ f ` s \ v" proof (rule UnE) assume "x \ s" then have "f x \ f ` s" by (rule imageI) with \y = f x\ have "y \ f ` s" by (rule ssubst) then show "y \ f ` s \ v" by (rule UnI1) next assume "x \ f -` v" then have "f x \ v" by (rule vimageD) with \y = f x\ have "y \ v" by (rule ssubst) then show "y \ f ` s \ v" by (rule UnI2) qed qed qed (* 2\ demostración *) lemma "f ` (s \ f -` v) \ f ` s \ v" proof fix y assume "y \ f ` (s \ f -` v)" then show "y \ f ` s \ v" proof fix x assume "y = f x" assume "x \ s \ f -` v" then show "y \ f ` s \ v" proof assume "x \ s" then have "f x \ f ` s" by simp with \y = f x\ have "y \ f ` s" by simp then show "y \ f ` s \ v" by simp next assume "x \ f -` v" then have "f x \ v" by simp with \y = f x\ have "y \ v" by simp then show "y \ f ` s \ v" by simp qed qed qed (* 3\ demostración *) lemma "f ` (s \ f -` v) \ f ` s \ v" proof fix y assume "y \ f ` (s \ f -` v)" then show "y \ f ` s \ v" proof fix x assume "y = f x" assume "x \ s \ f -` v" then show "y \ f ` s \ v" proof assume "x \ s" then show "y \ f ` s \ v" by (simp add: \y = f x\) next assume "x \ f -` v" then show "y \ f ` s \ v" by (simp add: \y = f x\) qed qed qed (* 4\ demostración *) lemma "f ` (s \ f -` v) \ f ` s \ v" proof fix y assume "y \ f ` (s \ f -` v)" then show "y \ f ` s \ v" proof fix x assume "y = f x" assume "x \ s \ f -` v" then show "y \ f ` s \ v" using \y = f x\ by blast qed qed (* 5\ demostración *) lemma "f ` (s \ f -` u) \ f ` s \ u" by auto end