        {"id":1274,"date":"2023-07-18T06:00:48","date_gmt":"2023-07-18T04:00:48","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1274"},"modified":"2023-07-19T17:15:25","modified_gmt":"2023-07-19T15:15:25","slug":"18-jul-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/18-jul-23\/","title":{"rendered":"Si c = ba-d y d = ab, entonces c = 0"},"content":{"rendered":"<p>Demostrar con Lean4 que si a, b, c y d son n\u00fameros reales tales<\/p>\n<pre lang=\"text\">\r\n   c = b * a - d\r\n   d = a * b\r\n<\/pre>\n<p>entonces<\/p>\n<pre lang=\"text\">\r\n   c = 0\r\n<\/pre>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\r\nimport Mathlib.Data.Real.Basic\r\nimport Mathlib.Tactic\r\n\r\nexample\r\n  (a b c d : \u211d)\r\n  (h1 : c = b * a - d)\r\n  (h2 : d = a * b)\r\n  : c = 0 :=\r\nby sorry\r\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p><br \/>\nPor la siguiente cadena de igualdades<br \/>\n\\[<br \/>\n\\begin{align}<br \/>\n   c &#038;= ba &#8211; d     &#038;&#038;\\text{[por la primera hip\u00f3tesis]} \\\\<br \/>\n     &#038;= ab &#8211; d     &#038;&#038;\\text{[por la conmutativa]}       \\\\<br \/>\n     &#038;= ab &#8211; ab    &#038;&#038;\\text{[por la segunda hip\u00f3tesis]} \\\\<br \/>\n     &#038;= 0<br \/>\n\\end{align}<br \/>\n\\]<\/p>\n<p><b>Demostraciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\r\nimport Mathlib.Data.Real.Basic\r\nimport Mathlib.Tactic\r\n\r\n-- 1\u00aa demostraci\u00f3n\r\nexample\r\n  (a b c d : \u211d)\r\n  (h1 : c = b * a - d)\r\n  (h2 : d = a * b)\r\n  : c = 0 :=\r\ncalc\r\n  c = b * a - d     := by rw [h1]\r\n  _ = a * b - d     := by rw [mul_comm]\r\n  _ = a * b - a * b := by rw [h2]\r\n  _ = 0             := by rw [sub_self]\r\n\r\n-- 2\u00aa demostraci\u00f3n\r\nexample\r\n  (a b c d : \u211d)\r\n  (h1 : c = b * a - d)\r\n  (h2 : d = a * b)\r\n  : c = 0 :=\r\nby\r\n  rw [h1]\r\n  rw [mul_comm]\r\n  rw [h2]\r\n  rw [sub_self]\r\n\r\n-- 3\u00aa demostraci\u00f3n\r\nexample\r\n  (a b c d : \u211d)\r\n  (h1 : c = b * a - d)\r\n  (h2 : d = a * b)\r\n  : c = 0 :=\r\nby\r\n  rw [h1, mul_comm, h2, sub_self]\r\n<\/pre>\n<p><b>Demostraciones interactivas<\/b><\/p>\n<p>Se puede interactuar con las demostraciones anteriores en <a href=\"https:\/\/lean.math.hhu.de\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus2\/main\/src\/Si_c_eq_ba-d_y_d_eq_ab_entonces_c_eq_0.lean\" rel=\"noopener noreferrer\" target=\"_blank\">Lean 4 Web<\/a>.<\/p>\n<p><b>Referencias<\/b><\/p>\n<ul>\n<li> J. Avigad y P. Massot. <a href=\"https:\/\/bit.ly\/3U4UjBk\">Mathematics in Lean<\/a>, p. 7.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que si a, b, c y d son n\u00fameros reales tales c = b * a &#8211; d d = a * b entonces c = 0 Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Data.Real.Basic import Mathlib.Tactic example (a b c d : \u211d) (h1 : c = b * a &#8211; d) (h2 : d = a * b) : c = 0 := by 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":[297],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1274"}],"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=1274"}],"version-history":[{"count":9,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1274\/revisions"}],"predecessor-version":[{"id":1381,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1274\/revisions\/1381"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}