(* La_equipotencia_es_una_relacion_transitiva.lean -- La equipotencia es una relación transitiva. -- José A. Alonso Jiménez -- Sevilla, 24-junio-2024 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- Dos conjuntos A y B son equipotentes (y se denota por A \ B) si -- existe una aplicación biyectiva entre ellos. La equipotencia está -- definida en Isabelle por -- definition eqpoll :: "'a set \ 'b set \ bool" (infixl "\" 50) -- where "eqpoll A B \ \f. bij_betw f A B" -- -- Demostrar que la relación de equipotencia es transitiva. -- ------------------------------------------------------------------ *) theory La_equipotencia_es_una_relacion_transitiva imports Main "HOL-Library.Equipollence" begin (* 1\ demostración *) lemma "transp (\)" proof (rule transpI) fix x y z :: "'a set" assume "x \ y" and "y \ z" show "x \ z" proof (unfold eqpoll_def) obtain f where hf : "bij_betw f x y" using \x \ y\ eqpoll_def by auto obtain g where hg : "bij_betw g y z" using \y \ z\ eqpoll_def by auto have "bij_betw (g \ f) x z" using hf hg by (rule bij_betw_trans) then show "\h. bij_betw h x z" by auto qed qed (* 2\ demostración *) lemma "transp (\)" unfolding eqpoll_def transp_def by (meson bij_betw_trans) (* 3\ demostración *) lemma "transp (\)" by (simp add: eqpoll_trans transpI) end