        {"id":1263,"date":"2023-07-14T07:00:08","date_gmt":"2023-07-14T05:00:08","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1263"},"modified":"2023-07-19T13:17:38","modified_gmt":"2023-07-19T11:17:38","slug":"14-jul-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/14-jul-23\/","title":{"rendered":"Si ab = cd y e = f, entonces a(be) = c(df)"},"content":{"rendered":"<p>Demostrar con Lean4 que si ab = cd y e = f, entonces a(be) = c(df)<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\r\nimport Mathlib.Tactic\r\nimport Mathlib.Data.Real.Basic\r\n\r\nexample\r\n  (a b c d e f : \u211d)\r\n  (h1 : a * b = c * d)\r\n  (h2 : e = f)\r\n  : a * (b * e) = c * (d * f) :=\r\nby sorry\r\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en leguaje natural<\/b><\/p>\n<p><br \/>\nPor la siguiente cadena de igualdades<br \/>\n\\begin{align}<br \/>\n   a(be)<br \/>\n   &#038;= a(bf)    &#038;&#038;\\text{[por la segunda hip\u00f3tesis]} \\\\<br \/>\n   &#038;= (ab)f    &#038;&#038;\\text{[por la asociativa]} \\\\<br \/>\n   &#038;= (cd)f    &#038;&#038;\\text{[por la primera hip\u00f3tesis]} \\\\<br \/>\n   &#038;= c(df)    &#038;&#038;\\text{[por la asociativa]}<br \/>\n\\end{align}<\/p>\n<p><b>Demostraciones con Lean<\/b><\/p>\n<pre lang=\"lean\">\r\nimport Mathlib.Tactic\r\nimport Mathlib.Data.Real.Basic\r\n\r\n-- 1\u00aa demostraci\u00f3n\r\nexample\r\n  (a b c d e f : \u211d)\r\n  (h1 : a * b = c * d)\r\n  (h2 : e = f)\r\n  : a * (b * e) = c * (d * f) :=\r\ncalc\r\n  a * (b * e)\r\n    = a * (b * f) := by rw [h2]\r\n  _ = (a * b) * f := by rw [\u2190mul_assoc]\r\n  _ = (c * d) * f := by rw [h1]\r\n  _ = c * (d * f) := by rw [mul_assoc]\r\n\r\n-- 2\u00aa demostraci\u00f3n\r\nexample\r\n  (a b c d e f : \u211d)\r\n  (h1 : a * b = c * d)\r\n  (h2 : e = f)\r\n  : a * (b * e) = c * (d * f) :=\r\nby\r\n  rw [h2]\r\n  rw [\u2190mul_assoc]\r\n  rw [h1]\r\n  rw [mul_assoc]\r\n\r\n-- 3\u00aa demostraci\u00f3n\r\nexample\r\n  (a b c d e f : \u211d)\r\n  (h1 : a * b = c * d)\r\n  (h2 : e = f)\r\n  : a * (b * e) = c * (d * f) :=\r\nby\r\n  simp [*, \u2190mul_assoc]\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\/a(be)_eq_c(df).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. 6.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que si ab = cd y e = f, entonces a(be) = c(df) Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Tactic import Mathlib.Data.Real.Basic example (a b c d e f : \u211d) (h1 : a * b = c * d) (h2 : e = f) : a * (b * e) = c * (d * f) := 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\/1263"}],"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=1263"}],"version-history":[{"count":7,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1263\/revisions"}],"predecessor-version":[{"id":1373,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1263\/revisions\/1373"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}