(* Diferencia_de_diferencia_de_conjuntos.thy -- (s - t) - u \ s - (t \ u) -- José A. Alonso -- Sevilla, 21-mayo-2021 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- Demostrar que -- (s - t) - u \ s - (t \ u) -- ------------------------------------------------------------------ *) theory Diferencia_de_diferencia_de_conjuntos_2 imports Main begin (* 1\ demostración *) lemma "(s - t) - u \ s - (t \ u)" proof (rule subsetI) fix x assume hx : "x \ (s - t) - u" then show "x \ s - (t \ u)" proof (rule DiffE) assume xst : "x \ s - t" assume xnu : "x \ u" note xst then show "x \ s - (t \ u)" proof (rule DiffE) assume xs : "x \ s" assume xnt : "x \ t" have xntu : "x \ t \ u" proof (rule notI) assume xtu : "x \ t \ u" then show False proof (rule UnE) assume xt : "x \ t" with xnt show False by (rule notE) next assume xu : "x \ u" with xnu show False by (rule notE) qed qed show "x \ s - (t \ u)" using xs xntu by (rule DiffI) qed qed qed (* 2\ demostración *) lemma "(s - t) - u \ s - (t \ u)" proof fix x assume hx : "x \ (s - t) - u" then have xst : "x \ (s - t)" by simp then have xs : "x \ s" by simp have xnt : "x \ t" using xst by simp have xnu : "x \ u" using hx by simp have xntu : "x \ t \ u" using xnt xnu by simp then show "x \ s - (t \ u)" using xs by simp qed (* 3\ demostración *) lemma "(s - t) - u \ s - (t \ u)" proof fix x assume "x \ (s - t) - u" then show "x \ s - (t \ u)" by simp qed (* 4\ demostración *) lemma "(s - t) - u \ s - (t \ u)" by auto end