{"id":7453,"date":"2020-10-16T17:44:13","date_gmt":"2020-10-16T15:44:13","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/?p=7453"},"modified":"2020-12-20T17:45:03","modified_gmt":"2020-12-20T16:45:03","slug":"formatus-regla-de-eliminacion-de-la-igualdad-en-lean","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/formatus-regla-de-eliminacion-de-la-igualdad-en-lean\/","title":{"rendered":"ForMatUS: Regla de eliminaci\u00f3n de la igualdad en Lean"},"content":{"rendered":"<p>He a\u00f1adido a la lista <a href=\"https:\/\/bit.ly\/2FcUrwQ\">L\u00f3gica con Lean<\/a> el <a href=\"https:\/\/youtu.be\/xFgxX6ZQtz4\">v\u00eddeo<\/a> en el que se comentan 5 pruebas en Lean de un ejemplo que ilustra la regla de eliminaci\u00f3n de la igualdad.<\/p>\n<p>A continuaci\u00f3n, se muestra el v\u00eddeo<\/p>\n<p><center><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/xFgxX6ZQtz4\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p><\/center>y el <a href=\"https:\/\/github.com\/jaalonso\/Logica_con_Lean\/blob\/master\/src\/2_LPO\/Regla_de_eliminacion_de_la_igualdad.lean\">c\u00f3digo<\/a> de la teor\u00eda utilizada<\/p>\n<pre lang=\"lean\">import tactic\n\n-- #check @eq.subst\n\n-- ----------------------------------------------------\n-- Ej. 1. Demostrar que\n--      x + 1 = 1 + x\n--      x + 1 &gt; 1 \u2192 x + 1 &gt; 0\n--      \u22a2 1 + x &gt; 1 \u2192 1 + x &gt; 0\n-- ----------------------------------------------------\n\nvariable (U : Type)\nvariable (x : U)\nvariable [has_add U]\nvariable [has_one U]\nvariable [has_lt U]\nvariable [has_zero U]\n\n-- 1\u00aa demostraci\u00f3n\nexample\n  (h1 : x + 1 = 1 + x)\n  (h2 : x + 1 &gt; 1 \u2192 x + 1 &gt; 0)\n  : 1 + x &gt; 1 \u2192 1 + x &gt; 0 :=\neq.subst h1 h2\n\n\n-- 2\u00aa demostraci\u00f3n\nexample\n  (h1 : x + 1 = 1 + x)\n  (h2 : x + 1 &gt; 1 \u2192 x + 1 &gt; 0)\n  : 1 + x &gt; 1 \u2192 1 + x &gt; 0 :=\nh1 \u25b8 h2\n\n-- 3\u00aa demostraci\u00f3n\nexample\n  (h1 : x + 1 = 1 + x)\n  (h2 : x + 1 &gt; 1 \u2192 x + 1 &gt; 0)\n  : 1 + x &gt; 1 \u2192 1 + x &gt; 0 :=\nbegin\n  rw h1 at h2,\n  exact h2,\nend\n\n-- 4\u00aa demostraci\u00f3n\nexample\n  (h1 : x + 1 = 1 + x)\n  (h2 : x + 1 &gt; 1 \u2192 x + 1 &gt; 0)\n  : 1 + x &gt; 1 \u2192 1 + x &gt; 0 :=\nbegin\n  rw \u2190h1,\n  exact h2,\nend\n\n-- 5\u00aa demostraci\u00f3n\nexample\n  (h1 : x + 1 = 1 + x)\n  (h2 : x + 1 &gt; 1 \u2192 x + 1 &gt; 0)\n  : 1 + x &gt; 1 \u2192 1 + x &gt; 0 :=\n-- by hint\nby finish\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>He a\u00f1adido a la lista L\u00f3gica con Lean el v\u00eddeo en el que se comentan 5 pruebas en Lean de un ejemplo que ilustra la regla de eliminaci\u00f3n de la igualdad. A continuaci\u00f3n, se muestra el v\u00eddeo y el c\u00f3digo de la teor\u00eda utilizada import tactic &#8212; #check @eq.subst &#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212; Ej. 1. Demostrar&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","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,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[335],"tags":[336],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7453"}],"collection":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/comments?post=7453"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7453\/revisions"}],"predecessor-version":[{"id":7454,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7453\/revisions\/7454"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/media?parent=7453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/categories?post=7453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/tags?post=7453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}