        {"id":1218,"date":"2022-11-24T06:00:09","date_gmt":"2022-11-24T04:00:09","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1218"},"modified":"2022-11-23T17:18:20","modified_gmt":"2022-11-23T15:18:20","slug":"24-nov-22","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/24-nov-22\/","title":{"rendered":"Si f: A \u2192 B y g: B \u2192 C son inyectiva, entonces g \u2218 f es inyectiva"},"content":{"rendered":"<p>Demostrar que si f: A \u2192 B y g: B \u2192 C son inyectiva, entonces g \u2218 f es inyectiva.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport tactic\n\nopen function\n\nvariables {A : Type*} {B : Type*} {C : Type*}\nvariables {f : A \u2192 B} {g : B \u2192 C}\n\nexample\n  (hg : injective g)\n  (hf : injective f) :\n  injective (g \u2218 f) :=\nsorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Soluciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\nimport tactic\n\nopen function\n\nvariables {A : Type*} {B : Type*} {C : Type*}\nvariables {f : A \u2192 B} {g : B \u2192 C}\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hg : injective g)\n  (hf : injective f) :\n  injective (g \u2218 f) :=\nbegin\n  assume x : A,\n  assume y : A,\n  assume h1: (g \u2218 f) x = (g \u2218 f) y,\n  have h2: g (f x) = g (f y) := h1,\n  have h3: f x = f y := hg h2,\n  show x = y,\n    by exact hf h3,\nend\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hg : injective g)\n  (hf : injective f) :\n  injective (g \u2218 f) :=\nbegin\n  intros x y h,\n  apply hf,\n  apply hg,\n  apply h,\nend\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hg : injective g)\n  (hf : injective f) :\n  injective (g \u2218 f) :=\n\u03bb x y h, hf (hg h)\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hg : injective g)\n  (hf : injective f) :\n  injective (g \u2218 f) :=\n-- by library_search\ninjective.comp hg hf\n\n-- 5\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hg : injective g)\n  (hf : injective f) :\n  injective (g \u2218 f) :=\n-- by hint\nby tauto\n<\/pre>\n<p>Se puede interactuar con la prueba anterior en <a href=\"https:\/\/leanprover-community.github.io\/lean-web-editor\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus\/main\/src\/Composicion_de_funciones_inyectivas.lean\" rel=\"noopener noreferrer\" target=\"_blank\">esta sesi\u00f3n con Lean<\/a>.<\/p>\n<p><b>Referencias<\/b><\/p>\n<ul>\n<li>J. Avigad, K. Buzzard, R.Y. Lewis y P. Massot. <a href=\"https:\/\/bit.ly\/3U4UjBk\">Mathematics in Lean<\/a>, p. 29.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que si f: A \u2192 B y g: B \u2192 C son inyectiva, entonces g \u2218 f es inyectiva. Para ello, completar la siguiente teor\u00eda de Lean: import tactic open function variables {A : Type*} {B : Type*} {C : Type*} variables {f : A \u2192 B} {g : B \u2192 C} example (hg : injective g) (hf : injective f) : injective (g \u2218 f) := 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":"","_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":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1218"}],"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=1218"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1218\/revisions"}],"predecessor-version":[{"id":1219,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1218\/revisions\/1219"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}