(* Union_con_la_imagen_inversa.thy -- s ∪ f⁻¹[v] ⊆ f⁻¹[f[s] ∪ v] -- José A. Alonso Jiménez -- Sevilla, 22-junio-2021 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- Demostrar que -- s \ f⁻¹[v] \ f⁻¹[f[s] \ v] -- ------------------------------------------------------------------ *) theory Union_con_la_imagen_inversa imports Main begin (* 1\ demostración *) lemma "s \ f -` v \ f -` (f ` s \ v)" proof (rule subsetI) fix x assume "x \ s \ f -` v" then have "f x \ f ` s \ v" proof (rule UnE) assume "x \ s" then have "f x \ f ` s" by (rule imageI) then show "f x \ f ` s \ v" by (rule UnI1) next assume "x \ f -` v" then have "f x \ v" by (rule vimageD) then show "f x \ f ` s \ v" by (rule UnI2) qed then show "x \ f -` (f ` s \ v)" by (rule vimageI2) qed (* 2\ demostración *) lemma "s \ f -` v \ f -` (f ` s \ v)" proof fix x assume "x \ s \ f -` v" then have "f x \ f ` s \ v" proof assume "x \ s" then have "f x \ f ` s" by simp then show "f x \ f ` s \ v" by simp next assume "x \ f -` v" then have "f x \ v" by simp then show "f x \ f ` s \ v" by simp qed then show "x \ f -` (f ` s \ v)" by simp qed (* 3\ demostración *) lemma "s \ f -` v \ f -` (f ` s \ v)" proof fix x assume "x \ s \ f -` v" then have "f x \ f ` s \ v" proof assume "x \ s" then show "f x \ f ` s \ v" by simp next assume "x \ f -` v" then show "f x \ f ` s \ v" by simp qed then show "x \ f -` (f ` s \ v)" by simp qed (* 4\ demostración *) lemma "s \ f -` v \ f -` (f ` s \ v)" by auto end