(* Interseccion_con_su_union.thy -- s \ (s \ t) = s -- José A. Alonso -- Sevilla, 25-mayo-2021 -- ------------------------------------------------------------------- *) (* --------------------------------------------------------------------- -- Demostrar que -- s \ (s \ t) = s -- ------------------------------------------------------------------ *) theory Interseccion_con_su_union imports Main begin (* 1\ demostración *) lemma "s \ (s \ t) = s" proof (rule equalityI) show "s \ (s \ t) \ s" proof (rule subsetI) fix x assume "x \ s \ (s \ t)" then show "x \ s" by (simp only: IntD1) qed next show "s \ s \ (s \ t)" proof (rule subsetI) fix x assume "x \ s" then have "x \ s \ t" by (simp only: UnI1) with \x \ s\ show "x \ s \ (s \ t)" by (rule IntI) qed qed (* 2\ demostración *) lemma "s \ (s \ t) = s" proof show "s \ (s \ t) \ s" proof fix x assume "x \ s \ (s \ t)" then show "x \ s" by simp qed next show "s \ s \ (s \ t)" proof fix x assume "x \ s" then have "x \ s \ t" by simp then show "x \ s \ (s \ t)" using \x \ s\ by simp qed qed (* 3\ demostración *) lemma "s \ (s \ t) = s" by (fact Un_Int_eq) (* 4\ demostración *) lemma "s \ (s \ t) = s" by auto