{"id":7412,"date":"2020-09-23T12:56:53","date_gmt":"2020-09-23T10:56:53","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/?p=7412"},"modified":"2020-12-20T12:57:44","modified_gmt":"2020-12-20T11:57:44","slug":"formatus-reglas-de-eliminacion-del-bicondicional-en-p-%e2%86%94-q-p-%e2%88%a8-q-%e2%8a%a2-p-%e2%88%a7-q","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/formatus-reglas-de-eliminacion-del-bicondicional-en-p-%e2%86%94-q-p-%e2%88%a8-q-%e2%8a%a2-p-%e2%88%a7-q\/","title":{"rendered":"ForMatUS: Reglas de eliminaci\u00f3n del bicondicional en P \u2194 Q, P \u2228 Q \u22a2 P \u2227 Q"},"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\/U3U8bXiKPF8\">v\u00eddeo<\/a> en el que se comentan 9 pruebas en Lean de<\/p>\n<pre lang=\"lean\">P \u2194 Q, P \u2228 Q \u22a2 P \u2227 Q\n<\/pre>\n<p>usando los estilos declarativos, aplicativos, funcional y autom\u00e1tico.<\/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\/U3U8bXiKPF8\" 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\/1_Proposicional\/Regla_de_eliminacion_del_bicondicional_en_P%E2%86%94Q,P%E2%88%A8Q%7C-P%E2%88%A7Q.lean\">c\u00f3digo<\/a> de la teor\u00eda utilizada<\/p>\n<pre lang=\"lean\">-- ----------------------------------------------------\n-- Ej. 1. (p. 18) Demostrar\n--     P \u2194 Q, P \u2228 Q \u22a2 P \u2227 Q\n-- ----------------------------------------------------\n\nimport tactic\n\nvariables (P Q : Prop)\n\n-- 1\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nor.elim h2\n  ( assume h3 : P,\n    have h4 : P \u2192 Q,\n      from iff.elim_left h1,\n    have h5 : Q,\n      from h4 h3,\n    show P \u2227 Q,\n      from and.intro h3 h5 )\n  ( assume h6 : Q,\n    have h7 : Q \u2192 P,\n      from iff.elim_right h1,\n    have h8 : P,\n      from h7 h6,\n    show P \u2227 Q,\n      from and.intro h8 h6 )\n\n-- 2\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nor.elim h2\n  ( assume h3 : P,\n    have h4 : P \u2192 Q := h1.1,\n    have h5 : Q := h4 h3,\n    show P \u2227 Q, from \u27e8h3, h5\u27e9 )\n  ( assume h6 : Q,\n    have h7 : Q \u2192 P := h1.2,\n    have h8 : P := h7 h6,\n    show P \u2227 Q, from \u27e8h8, h6\u27e9 )\n\n-- 3\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nor.elim h2\n  ( assume h3 : P,\n    show P \u2227 Q, from \u27e8h3, (h1.1 h3)\u27e9 )\n  ( assume h6 : Q,\n    show P \u2227 Q, from \u27e8h1.2 h6, h6\u27e9 )\n\n-- 4\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nor.elim h2\n  (\u03bbh, \u27e8h, (h1.1 h)\u27e9)\n  (\u03bbh, \u27e8h1.2 h, h\u27e9)\n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nh2.elim\n  (\u03bbh, \u27e8h, (h1.1 h)\u27e9)\n  (\u03bbh, \u27e8h1.2 h, h\u27e9)\n\n-- 5\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nbegin\n  cases h2 with h3 h4,\n  { split,\n    { exact h3, },\n    { apply h1.mp,\n      exact h3, }},\n  { split,\n    { apply h1.mpr,\n      exact h4, },\n    { exact h4, }},\nend\n\n-- 6\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nbegin\n  cases h2 with h3 h4,\n  { split,\n    { exact h3, },\n    { rw \u2190 h1,\n      exact h3, }},\n  { split,\n    { rw h1,\n      exact h4, },\n    { exact h4, }},\nend\n\n-- 7\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\n-- by hint\nby tauto\n\n-- 8\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nby finish\n\n-- 9\u00aa demostraci\u00f3n\nexample\n  (h1 : P \u2194 Q)\n  (h2 : P \u2228 Q)\n  : P \u2227 Q :=\nbegin\n  simp [h1] at h2 |-,\n  assumption,\nend\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 9 pruebas en Lean de P \u2194 Q, P \u2228 Q \u22a2 P \u2227 Q usando los estilos declarativos, aplicativos, funcional y autom\u00e1tico. A continuaci\u00f3n, se muestra el v\u00eddeo y el c\u00f3digo de la teor\u00eda utilizada &#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212; Ej&#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":[],"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\/7412"}],"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=7412"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7412\/revisions"}],"predecessor-version":[{"id":7413,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7412\/revisions\/7413"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/media?parent=7412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/categories?post=7412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/tags?post=7412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}