(* Imagen_de_la_diferencia_de_conjuntos.thy -- f[s] \ f[t] \ f[s \ t]. -- José A. Alonso Jiménez -- Sevilla, 17-junio-2021 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- Demostrar que -- f ` s - f ` t \ f ` (s - t) -- ------------------------------------------------------------------- *) theory Imagen_de_la_diferencia_de_conjuntos imports Main begin (* 1\ demostración *) lemma "f ` s - f ` t \ f ` (s - t)" proof (rule subsetI) fix y assume hy : "y \ f ` s - f ` t" then show "y \ f ` (s - t)" proof (rule DiffE) assume "y \ f ` s" assume "y \ f ` t" note \y \ f ` s\ then show "y \ f ` (s - t)" proof (rule imageE) fix x assume "y = f x" assume "x \ s" have \x \ t\ proof (rule notI) assume "x \ t" then have "f x \ f ` t" by (rule imageI) with \y = f x\ have "y \ f ` t" by (rule ssubst) with \y \ f ` t\ show False by (rule notE) qed with \x \ s\ have "x \ s - t" by (rule DiffI) then have "f x \ f ` (s - t)" by (rule imageI) with \y = f x\ show "y \ f ` (s - t)" by (rule ssubst) qed qed qed (* 2\ demostración *) lemma "f ` s - f ` t \ f ` (s - t)" proof fix y assume hy : "y \ f ` s - f ` t" then show "y \ f ` (s - t)" proof assume "y \ f ` s" assume "y \ f ` t" note \y \ f ` s\ then show "y \ f ` (s - t)" proof fix x assume "y = f x" assume "x \ s" have \x \ t\ proof assume "x \ t" then have "f x \ f ` t" by simp with \y = f x\ have "y \ f ` t" by simp with \y \ f ` t\ show False by simp qed with \x \ s\ have "x \ s - t" by simp then have "f x \ f ` (s - t)" by simp with \y = f x\ show "y \ f ` (s - t)" by simp qed qed qed (* 3\ demostración *) lemma "f ` s - f ` t \ f ` (s - t)" by (simp only: image_diff_subset) (* 4\ demostración *) lemma "f ` s - f ` t \ f ` (s - t)" by auto end