{"id":7400,"date":"2020-09-20T12:28:15","date_gmt":"2020-09-20T10:28:15","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/?p=7400"},"modified":"2020-12-20T12:29:04","modified_gmt":"2020-12-20T11:29:04","slug":"formatus-pruebas-de-q-%e2%86%92-r-%e2%8a%a2-p-%e2%88%a8-q-%e2%86%92-p-%e2%88%a8-r","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/formatus-pruebas-de-q-%e2%86%92-r-%e2%8a%a2-p-%e2%88%a8-q-%e2%86%92-p-%e2%88%a8-r\/","title":{"rendered":"ForMatUS: Pruebas de Q \u2192 R \u22a2 P \u2228 Q \u2192 P \u2228 R"},"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\/mNT4FFBjGtk\">v\u00eddeo<\/a> en el que se comentan 10 pruebas en Lean de<\/p>\n<pre class=\"example\">Q \u2192 R \u22a2 P \u2228 Q \u2192 P \u2228 R\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\/mNT4FFBjGtk\" 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\/Pruebas_de_Q%E2%86%92R%E2%8A%A2P%E2%88%A8Q%E2%86%92P%E2%88%A8R.lean\">c\u00f3digo<\/a> de la teor\u00eda utilizada<\/p>\n<pre lang=\"lean\">-- Pruebas de Q \u2192 R \u22a2 P \u2228 Q \u2192 P \u2228 R\n-- ================================\n\n-- ----------------------------------------------------\n-- Ej. 1. (p. 12) Demostrar\n--    Q \u2192 R \u22a2 P \u2228 Q \u2192 P \u2228 R\n-- ----------------------------------------------------\n\nimport tactic\n\nvariables (P Q R : Prop)\n\n-- 1\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\nassume h2 : P \u2228 Q,\nor.elim h2\n  ( assume h3 : P,\n    show P \u2228 R,\n      from or.inl h3 )\n  ( assume h4 : Q,\n    have h5 : R := h1 h4,\n    show P \u2228 R,\n      from or.inr h5 )\n\n-- 2\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\nassume h2 : P \u2228 Q,\nor.elim h2\n  ( assume h3 : P, or.inl h3 )\n  ( assume h4 : Q,\n    show P \u2228 R,\n      from or.inr (h1 h4) )\n\n-- 3\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\nassume h2 : P \u2228 Q,\nor.elim h2\n  ( assume h3 : P, or.inl h3 )\n  ( assume h4 : Q, or.inr (h1 h4) )\n\n-- 4\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\nassume h2 : P \u2228 Q,\nor.elim h2\n  (\u03bb h3, or.inl h3)\n  (\u03bb h4, or.inr (h1 h4))\n\n-- 5\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\nassume h2 : P \u2228 Q,\nor.elim h2\n  or.inl\n  (\u03bb h, or.inr (h1 h) )\n\n-- 6\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\n\u03bb h2, or.elim h2 or.inl (\u03bb h, or.inr (h1 h))\n\n-- 7\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\n\u03bb h2, h2.elim or.inl (\u03bb h, or.inr (h1 h))\n\n-- 8\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\n\u03bb h2, h2.elim or.inl (or.inr \u2218 h1)\n\n-- 9\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\n-- by library_search\nor.imp_right h1\n\n-- 10\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\nbegin\n  intro h2,\n  cases h2 with h3 h4,\n  { left,\n    exact h3, },\n  { right,\n    exact (h1 h4), },\nend\n\n-- 11\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\nbegin\n  rintro (h3 | h4),\n  { left,\n    exact h3, },\n  { right,\n    exact (h1 h4), },\nend\n\n-- 12\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\nbegin\n  rintro (h3 | h4),\n  { exact or.inl h3, },\n  { exact or.inr (h1 h4), },\nend\n\n-- 13\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\n-- by hint\nby tauto\n\n-- 14\u00aa demostraci\u00f3n\nexample\n  (h1 : Q \u2192 R)\n  : P \u2228 Q \u2192 P \u2228 R :=\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 10 pruebas en Lean de Q \u2192 R \u22a2 P \u2228 Q \u2192 P \u2228 R 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; Pruebas de&#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\/7400"}],"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=7400"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7400\/revisions"}],"predecessor-version":[{"id":7401,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/posts\/7400\/revisions\/7401"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/media?parent=7400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/categories?post=7400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/vestigium\/wp-json\/wp\/v2\/tags?post=7400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}