        {"id":955,"date":"2022-06-27T12:48:03","date_gmt":"2022-06-27T10:48:03","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=955"},"modified":"2022-06-27T12:48:03","modified_gmt":"2022-06-27T10:48:03","slug":"si-g%c2%b7f-es-suprayectiva-entonces-g-es-suprayectiva","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/si-g%c2%b7f-es-suprayectiva-entonces-g-es-suprayectiva\/","title":{"rendered":"Si g\u00b7f es suprayectiva, entonces g es suprayectiva"},"content":{"rendered":"<p>Demostrar que si g\u00b7f es suprayectiva, entonces g es suprayectiva.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport tactic\nopen function\n\nvariables {X Y Z : Type}\nvariable  {f : X \u2192 Y}\nvariable  {g : Y \u2192 Z}\n\nexample\n  (Hgf : surjective (g \u2218 f))\n  : surjective g :=\nsorry\n<\/pre>\n<p><!--more--><\/p>\n<p><strong>Soluciones con Lean<\/strong><\/p>\n<pre lang=\"lean\">\nimport tactic\nopen function\n\nvariables {X Y Z : Type}\nvariable  {f : X \u2192 Y}\nvariable  {g : Y \u2192 Z}\n\n-- 1\u00aa demostraci\u00f3n\nexample\n  (Hgf : surjective (g \u2218 f))\n  : surjective g :=\nbegin\n  intros z,\n  rcases Hgf z with \u27e8x, hx\u27e9,\n  use f x,\n  calc g (f x) = (g \u2218 f) x : rfl\n           ... = z         : hx,\nend\n\nexample\n  (Hgf : surjective (g \u2218 f))\n  : surjective g  := \nbegin\n  assume z : Z,\n  rcases Hgf z with \u27e8x : X, hx : (g \u2218 f) x = z\u27e9,\n  let y : Y := f x,\n  use y,\n  show g y = z, from\n    calc g y = g (f x)   : rfl\n         ... = (g \u2218 f) x : rfl\n         ... = z         : hx,\nend  \n<\/pre>\n<p>El c\u00f3digo de las demostraciones se encuentra en <a href=\"https:\/\/github.com\/jaalonso\/Calculemus\/blob\/main\/src\/Si_gf_es_suprayectiva_entonces_g_es_suprayectiva.lean\">GitHub<\/a> y puede ejecutarse con el <a href=\"https:\/\/leanprover-community.github.io\/lean-web-editor\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus\/main\/src\/Si_gf_es_suprayectiva_entonces_g_es_suprayectiva.lean\">Lean Web editor<\/a>.<\/p>\n<p><strong>Soluciones con Isabelle\/HOL<\/strong><\/p>\n<pre lang=\"isar\">\ntheory Si_gf_es_suprayectiva_entonces_g_es_suprayectiva\nimports Main\nbegin \n\nlemma\n  fixes   f :: \"'a \u21d2 'b\" and \n          g :: \"'b \u21d2 'c\"\n  assumes \"surj (g \u2218 f)\"\n  shows   \"surj g\"\nusing assms by fastforce\n\nend\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que si g\u00b7f es suprayectiva, entonces g es suprayectiva. Para ello, completar la siguiente teor\u00eda de Lean: import tactic open function variables {X Y Z : Type} variable {f : X \u2192 Y} variable {g : Y \u2192 Z} example (Hgf : surjective (g \u2218 f)) : surjective g := 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\/955"}],"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=955"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/955\/revisions"}],"predecessor-version":[{"id":956,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/955\/revisions\/956"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}