(* Las_familias_de_conjuntos_definen_relaciones_simetricas.thy -- Las familias de conjuntos definen relaciones simétricas. -- José A. Alonso Jiménez -- Sevilla, 5-julio-2024 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- Cada familia de conjuntos P define una relación de forma que dos -- elementos están relacionados si algún conjunto de P contiene a ambos -- elementos. Se puede definir en Isabelle por -- definition relacion :: "('a set) set \ 'a \ 'a \ bool" where -- "relacion P x y \ (\A\P. x \ A \ y \ A)" -- -- Demostrar que si P es una familia de subconjunt\<^bold>os de X, entonces la -- relación definida por P es simétrica. -- ------------------------------------------------------------------ *) theory Las_familias_de_conjuntos_definen_relaciones_simetricas imports Main begin definition relacion :: "('a set) set \ 'a \ 'a \ bool" where "relacion P x y \ (\A\P. x \ A \ y \ A)" (* 1\ demostración *) lemma "symp (relacion P)" proof (rule sympI) fix x y assume "relacion P x y" then have "\A\P. x \ A \ y \ A" by (unfold relacion_def) then have "\A\P. y \ A \ x \ A" proof (rule bexE) fix A assume hA1 : "A \ P" and hA2 : "x \ A \ y \ A" have "y \ A \ x \ A" using hA2 by (simp only: conj_commute) then show "\A\P. y \ A \ x \ A" using hA1 by (rule bexI) qed then show "relacion P y x" by (unfold relacion_def) qed (* 2\ demostración *) lemma "symp (relacion P)" proof (rule sympI) fix x y assume "relacion P x y" then obtain A where "A \ P \ x \ A \ y \ A" using relacion_def by metis then show "relacion P y x" using relacion_def by metis qed (* 3\ demostración *) lemma "symp (relacion P)" using relacion_def by (metis sympI) end