        {"id":396,"date":"2021-06-09T06:00:37","date_gmt":"2021-06-09T04:00:37","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=396"},"modified":"2021-06-12T13:38:36","modified_gmt":"2021-06-12T11:38:36","slug":"imagen-inversa-de-la-imagen-de-aplicaciones-inyectivas","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/imagen-inversa-de-la-imagen-de-aplicaciones-inyectivas\/","title":{"rendered":"Imagen inversa de la imagen de aplicaciones inyectivas"},"content":{"rendered":"<p>Demostrar que si f es inyectiva, entonces<\/p>\n<pre lang=\"text\">\n    f\u207b\u00b9[f[s]] \u2286 s\n<\/pre>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport data.set.basic\n\nopen set function\n\nvariables {\u03b1 : Type*} {\u03b2 : Type*}\nvariable  f : \u03b1 \u2192 \u03b2\nvariable  s : set \u03b1\n\nexample\n  (h : injective f)\n  : f \u207b\u00b9' (f '' s) \u2286 s :=\nsorry\n<\/pre>\n<p>[expand title=\u00bbSoluciones con Lean\u00bb]<\/p>\n<pre lang=\"lean\">\r\nimport data.set.basic\r\n\r\nopen set function\r\n\r\nvariables {\u03b1 : Type*} {\u03b2 : Type*}\r\nvariable  f : \u03b1 \u2192 \u03b2\r\nvariable  s : set \u03b1\r\n\r\n-- 1\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample\r\n  (h : injective f)\r\n  : f \u207b\u00b9' (f '' s) \u2286 s :=\r\nbegin\r\n  intros x hx,\r\n  rw mem_preimage at hx,\r\n  rw mem_image_eq at hx,\r\n  cases hx with y hy,\r\n  cases hy with ys fyx,\r\n  unfold injective at h,\r\n  have h1 : y = x := h fyx,\r\n  rw \u2190 h1,\r\n  exact ys,\r\nend\r\n\r\n-- 2\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample\r\n  (h : injective f)\r\n  : f \u207b\u00b9' (f '' s) \u2286 s :=\r\nbegin\r\n  intros x hx,\r\n  rw mem_preimage at hx,\r\n  rcases hx with \u27e8y, ys, fyx\u27e9,\r\n  rw \u2190 h fyx,\r\n  exact ys,\r\nend\r\n\r\n-- 3\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample\r\n  (h : injective f)\r\n  : f \u207b\u00b9' (f '' s) \u2286 s :=\r\nbegin\r\n  rintros x \u27e8y, ys, hy\u27e9,\r\n  rw \u2190 h hy,\r\n  exact ys,\r\nend\r\n<\/pre>\n<p>Se puede interactuar con la prueba anterior en <a href=\"https:\/\/bit.ly\/3ptTl2C\" rel=\"noopener noreferrer\" target=\"_blank\">esta sesi\u00f3n con Lean<\/a>,<br \/>\n[\/expand]<\/p>\n<p>[expand title=\u00bbSoluciones con Isabelle\/HOL\u00bb]<\/p>\n<pre lang=\"isar\">\r\ntheory Imagen_inversa_de_la_imagen_de_aplicaciones_inyectivas\r\nimports Main\r\nbegin\r\n\r\nsection \u2039?\u00aa demostraci\u00f3n\u203a\r\n\r\nlemma\r\n  assumes \"inj f\"\r\n  shows \"f -` (f ` s) \u2286 s\"\r\nproof (rule subsetI)\r\n  fix x\r\n  assume \"x \u2208 f -` (f ` s)\"\r\n  then have \"f x \u2208 f ` s\"\r\n    by (rule vimageD)\r\n  then show \"x \u2208 s\"\r\n  proof (rule imageE)\r\n    fix y\r\n    assume \"f x = f y\"\r\n    assume \"y \u2208 s\"\r\n    have \"x = y\"\r\n      using \u2039inj f\u203a \u2039f x = f y\u203a by (rule injD)\r\n    then show \"x \u2208 s\"\r\n      using \u2039y \u2208 s\u203a  by (rule ssubst)\r\n  qed\r\nqed\r\n\r\nsection \u20392\u00aa demostraci\u00f3n\u203a\r\n\r\nlemma\r\n  assumes \"inj f\"\r\n  shows \"f -` (f ` s) \u2286 s\"\r\nproof\r\n  fix x\r\n  assume \"x \u2208 f -` (f ` s)\"\r\n  then have \"f x \u2208 f ` s\"\r\n    by simp\r\n  then show \"x \u2208 s\"\r\n  proof\r\n    fix y\r\n    assume \"f x = f y\"\r\n    assume \"y \u2208 s\"\r\n    have \"x = y\"\r\n      using \u2039inj f\u203a \u2039f x = f y\u203a by (rule injD)\r\n    then show \"x \u2208 s\"\r\n      using \u2039y \u2208 s\u203a  by simp\r\n  qed\r\nqed\r\n\r\nsection \u20393\u00aa demostraci\u00f3n\u203a\r\n\r\nlemma\r\n  assumes \"inj f\"\r\n  shows \"f -` (f ` s) \u2286 s\"\r\n  using assms\r\n  unfolding inj_def\r\n  by auto\r\n\r\nsection \u20394\u00aa demostraci\u00f3n\u203a\r\n\r\nlemma\r\n  assumes \"inj f\"\r\n  shows \"f -` (f ` s) \u2286 s\"\r\n  using assms\r\n  by (simp only: inj_vimage_image_eq)\r\n\r\nend\r\n<\/pre>\n<p>[\/expand]<\/p>\n<p>[expand title=\u00bbNuevas soluciones\u00bb]<\/p>\n<ul>\n<li>En los comentarios se pueden escribir nuevas soluciones.\n<li>El c\u00f3digo se debe escribir entre una l\u00ednea con &#60;pre lang=&quot;isar&quot;&#62; y otra con &#60;\/pre&#62;\n<\/ul>\n<p>[\/expand]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que si f es inyectiva, entonces f\u207b\u00b9[f[s]] \u2286 s Para ello, completar la siguiente teor\u00eda de Lean: import data.set.basic open set function variables {\u03b1 : Type*} {\u03b2 : Type*} variable f : \u03b1 \u2192 \u03b2 variable s : set \u03b1 example (h : injective f) : f \u207b\u00b9&#8217; (f \u00bb s) \u2286 s := sorry [expand title=\u00bbSoluciones con Lean\u00bb] import data.set.basic open set function variables {\u03b1 : Type*} {\u03b2 : Type*} variable f : \u03b1 \u2192 \u03b2 variable s : set \u03b1 &#8212; 1\u00aa demostraci\u00f3n &#8212; =============== example (h : injective f) : f \u207b\u00b9&#8217; (f \u00bb s) \u2286 s := begin intros x hx, rw mem_preimage at hx, rw mem_image_eq at hx, cases hx with y hy, cases hy with ys fyx, unfold&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/396"}],"collection":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/comments?post=396"}],"version-history":[{"count":2,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/396\/revisions"}],"predecessor-version":[{"id":471,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/396\/revisions\/471"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}