        {"id":2338,"date":"2024-03-14T12:58:52","date_gmt":"2024-03-14T10:58:52","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=2338"},"modified":"2024-03-14T12:58:52","modified_gmt":"2024-03-14T10:58:52","slug":"14-mar-24","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/14-mar-24\/","title":{"rendered":"s \u2286 f\u207b\u00b9[f[s]\u200b]"},"content":{"rendered":"\n<p>Demostrar que si &#92;(s&#92;) es un subconjunto del dominio de la funci\u00f3n &#92;(f&#92;), entonces &#92;(s&#92;) est\u00e1 contenido en la imagen inversa de la imagen de &#92;(s&#92;) por &#92;(f&#92;); es decir,<br \/>\n&#92;[ s \u2286 f\u207b\u00b9[f[s]] &#92;]<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Set.Function\nopen Set\nvariable {\u03b1 \u03b2 : Type _}\nvariable (f : \u03b1 \u2192 \u03b2)\nvariable (s : Set \u03b1)\n\nexample : s \u2286 f \u207b\u00b9' (f '' s) :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<h2>1. Demostraci\u00f3n en lenguaje natural<\/h2>\n<p>Se demuestra mediante la siguiente cadena de implicaciones<br \/>\n&#92;begin{align}<br \/>\n   x \u2208 s &amp;\u27f9 f(x) \u2208 f[s] &#92;&#92;<br \/>\n         &amp;\u27f9 x \u2208 f\u207b\u00b9[f[s]]<br \/>\n&#92;end{align}<\/p>\n<h2>2. Demostraciones con Lean4<\/h2>\n<pre lang=\"lean\">\nimport Mathlib.Data.Set.Function\n\nopen Set\n\nvariable {\u03b1 \u03b2 : Type _}\nvariable (f : \u03b1 \u2192 \u03b2)\nvariable (s : Set \u03b1)\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample : s \u2286 f \u207b\u00b9' (f '' s) :=\nby\n  intros x xs\n  -- x : \u03b1\n  -- xs : x \u2208 s\n  -- \u22a2 x \u2208 f \u207b\u00b9' (f '' s)\n  have h1 : f x \u2208 f '' s := mem_image_of_mem f xs\n  show x \u2208 f \u207b\u00b9' (f '' s)\n  exact mem_preimage.mp h1\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample : s \u2286 f \u207b\u00b9' (f '' s) :=\nby\n  intros x xs\n  -- x : \u03b1\n  -- xs : x \u2208 s\n  -- \u22a2 x \u2208 f \u207b\u00b9' (f '' s)\n  apply mem_preimage.mpr\n  -- \u22a2 f x \u2208 f '' s\n  apply mem_image_of_mem\n  -- \u22a2 x \u2208 s\n  exact xs\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample : s \u2286 f \u207b\u00b9' (f '' s) :=\nby\n  intros x xs\n  -- x : \u03b1\n  -- xs : x \u2208 s\n  -- \u22a2 x \u2208 f \u207b\u00b9' (f '' s)\n  apply mem_image_of_mem\n  -- \u22a2 x \u2208 s\n  exact xs\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample : s \u2286 f \u207b\u00b9' (f '' s) :=\nfun _ \u21a6 mem_image_of_mem f\n\n-- 5\u00aa demostraci\u00f3n\n-- ===============\n\nexample : s \u2286 f \u207b\u00b9' (f '' s) :=\nby\n  intros x xs\n  -- x : \u03b1\n  -- xs : x \u2208 s\n  -- \u22a2 x \u2208 f \u207b\u00b9' (f '' s)\n  show f x \u2208 f '' s\n  use x, xs\n\n-- 6\u00aa demostraci\u00f3n\n-- ===============\n\nexample : s \u2286 f \u207b\u00b9' (f '' s) :=\nby\n  intros x xs\n  -- x : \u03b1\n  -- xs : x \u2208 s\n  -- \u22a2 x \u2208 f \u207b\u00b9' (f '' s)\n  use x, xs\n\n-- 7\u00aa demostraci\u00f3n\n-- ===============\n\nexample : s \u2286 f \u207b\u00b9' (f '' s) :=\nsubset_preimage_image f s\n\n-- Lemas usados\n-- ============\n\n-- variable (x : \u03b1)\n-- variable (t : Set \u03b2)\n-- #check (mem_preimage : x \u2208 f \u207b\u00b9' t \u2194 f x \u2208 t)\n-- #check (mem_image_of_mem f : x \u2208 s \u2192 f x \u2208 f '' s)\n-- #check (subset_preimage_image f s : s \u2286 f \u207b\u00b9' (f '' s))\n<\/pre>\n<p>Se puede interactuar con las demostraciones anteriores en <a href=\"https:\/\/live.lean-lang.org\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus2\/main\/src\/Imagen_inversa_de_la_imagen.lean\" rel=\"noopener noreferrer\" target=\"_blank\">Lean 4 Web<\/a>.<\/p>\n<h2>3. Demostraciones con Isabelle\/HOL<\/h2>\n<pre lang=\"isar\">\ntheory Imagen_inversa_de_la_imagen\nimports Main\nbegin\n\n(* 1\u00aa demostraci\u00f3n *)\nlemma \"s \u2286 f -` (f ` s)\"\nproof (rule subsetI)\n  fix x\n  assume \"x \u2208 s\"\n  then have \"f x \u2208 f ` s\"\n    by (simp only: imageI)\n  then show \"x \u2208 f -` (f ` s)\"\n    by (simp only: vimageI)\nqed\n\n(* 2\u00aa demostraci\u00f3n *)\nlemma \"s \u2286 f -` (f ` s)\"\nproof\n  fix x\n  assume \"x \u2208 s\"\n  then have \"f x \u2208 f ` s\" by simp\n  then show \"x \u2208 f -` (f ` s)\" by simp\nqed\n\n(* 3\u00aa demostraci\u00f3n *)\nlemma \"s \u2286 f -` (f ` s)\"\n  by auto\n\nend\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que si &#92;(s&#92;) es un subconjunto del dominio de la funci\u00f3n &#92;(f&#92;), entonces &#92;(s&#92;) est\u00e1 contenido en la imagen inversa de la imagen de &#92;(s&#92;) por &#92;(f&#92;); es decir, &#92;[ s \u2286 f\u207b\u00b9[f[s]] &#92;] Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Data.Set.Function open Set variable {\u03b1 \u03b2 : Type _} variable (f : \u03b1 \u2192 \u03b2) variable (s : Set \u03b1) example : s \u2286 f \u207b\u00b9&#8217; (f \u00bb s) := by sorry<\/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":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_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":[17],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/2338"}],"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=2338"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/2338\/revisions"}],"predecessor-version":[{"id":2339,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/2338\/revisions\/2339"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=2338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=2338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=2338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}