(* Propiedad_semidistributiva_de_la_interseccion_sobre_la_union.thy -- Propiedad semidistributiva de la intersección sobre la unión -- José A. Alonso Jiménez -- Sevilla, 18-mayo-2021 -- --------------------------------------------------------------------- *) (* --------------------------------------------------------------------- -- Demostrar que -- s \ (t \ u) \ (s \ t) \ (s \ u) -- ------------------------------------------------------------------ *) theory Propiedad_semidistributiva_de_la_interseccion_sobre_la_union imports Main begin (* 1\ demostración *) lemma "s \ (t \ u) \ (s \ t) \ (s \ u)" proof (rule subsetI) fix x assume hx : "x \ s \ (t \ u)" then have xs : "x \ s" by (simp only: IntD1) have xtu: "x \ t \ u" using hx by (simp only: IntD2) then have "x \ t \ x \ u" by (simp only: Un_iff) then show " x \ s \ t \ s \ u" proof (rule disjE) assume xt : "x \ t" have xst : "x \ s \ t" using xs xt by (simp only: Int_iff) then show "x \ (s \ t) \ (s \ u)" by (simp only: UnI1) next assume xu : "x \ u" have xst : "x \ s \ u" using xs xu by (simp only: Int_iff) then show "x \ (s \ t) \ (s \ u)" by (simp only: UnI2) qed qed (* 2\ demostración *) lemma "s \ (t \ u) \ (s \ t) \ (s \ u)" proof fix x assume hx : "x \ s \ (t \ u)" then have xs : "x \ s" by simp have xtu: "x \ t \ u" using hx by simp then have "x \ t \ x \ u" by simp then show " x \ s \ t \ s \ u" proof assume xt : "x \ t" have xst : "x \ s \ t" using xs xt by simp then show "x \ (s \ t) \ (s \ u)" by simp next assume xu : "x \ u" have xst : "x \ s \ u" using xs xu by simp then show "x \ (s \ t) \ (s \ u)" by simp qed qed (* 3\ demostración *) lemma "s \ (t \ u) \ (s \ t) \ (s \ u)" proof (rule subsetI) fix x assume hx : "x \ s \ (t \ u)" then have xs : "x \ s" by (simp only: IntD1) have xtu: "x \ t \ u" using hx by (simp only: IntD2) then show " x \ s \ t \ s \ u" proof (rule UnE) assume xt : "x \ t" have xst : "x \ s \ t" using xs xt by (simp only: Int_iff) then show "x \ (s \ t) \ (s \ u)" by (simp only: UnI1) next assume xu : "x \ u" have xst : "x \ s \ u" using xs xu by (simp only: Int_iff) then show "x \ (s \ t) \ (s \ u)" by (simp only: UnI2) qed qed (* 4\ demostración *) lemma "s \ (t \ u) \ (s \ t) \ (s \ u)" proof fix x assume hx : "x \ s \ (t \ u)" then have xs : "x \ s" by simp have xtu: "x \ t \ u" using hx by simp then show " x \ s \ t \ s \ u" proof (rule UnE) assume xt : "x \ t" have xst : "x \ s \ t" using xs xt by simp then show "x \ (s \ t) \ (s \ u)" by simp next assume xu : "x \ u" have xst : "x \ s \ u" using xs xu by simp then show "x \ (s \ t) \ (s \ u)" by simp qed qed (* 5\ demostración *) lemma "s \ (t \ u) \ (s \ t) \ (s \ u)" by (simp only: Int_Un_distrib) (* 6\ demostración *) lemma "s \ (t \ u) \ (s \ t) \ (s \ u)" by auto end