        {"id":1598,"date":"2023-09-26T06:00:04","date_gmt":"2023-09-26T04:00:04","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1598"},"modified":"2023-09-07T11:01:25","modified_gmt":"2023-09-07T09:01:25","slug":"26-sep-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/26-sep-23\/","title":{"rendered":"En los ret\u00edculos, una distributiva del supremo implica la otra"},"content":{"rendered":"<p>Demostrar con Lean4 que si \\(R\\) es un ret\u00edculo tal que<br \/>\n\\[   (\u2200 x,\\ y,\\ z \\in R) [x \u2294 (y \u2293 z) = (x \u2294 y) \u2293 (x \u2294 z)] \\]<br \/>\nentonces<br \/>\n\\[   (a \u2293 b) \u2294 c = (a \u2294 c) \u2293 (b \u2294 c) \\]<br \/>\npara todos los elementos del ret\u00edculo.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\r\nimport Mathlib.Order.Lattice\r\nvariable {\u03b1 : Type _} [Lattice \u03b1]\r\nvariable (a b c : \u03b1)\r\n\r\nexample\r\n  (h : \u2200 x y z : \u03b1, x \u2294 (y \u2293 z) = (x \u2294 y) \u2293 (x \u2294 z))\r\n  : (a \u2293 b) \u2294 c = (a \u2294 c) \u2293 (b \u2294 c) :=\r\nby sorry\r\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p><br \/>\nSe demuestra por la siguiente cadena de igualdades<br \/>\n\\begin{align}<br \/>\n   (a \u2293 b) \u2294 c &#038;= c \u2294 (a \u2293 b)          &#038;&#038;\\text{[por la conmutatividad de \u2294]} \\\\<br \/>\n               &#038;= (c \u2294 a) \u2293 (c \u2294 b)    &#038;&#038;\\text{[por la hip\u00f3tesis]} \\\\<br \/>\n               &#038;= (a \u2294 c) \u2293 (c \u2294 b)    &#038;&#038;\\text{[por la conmutatividad de \u2294]} \\\\<br \/>\n               &#038;= (a \u2294 c) \u2293 (b \u2294 c)    &#038;&#038;\\text{[por la conmutatividad de \u2294]}<br \/>\n\\end{align}<\/p>\n<p><b>Demostraciones con Lean4<\/b><\/p>\n<pre lang=\"lean\">\r\nimport Mathlib.Order.Lattice\r\nvariable {\u03b1 : Type _} [Lattice \u03b1]\r\nvariable (a b c : \u03b1)\r\n\r\n-- 1\u00aa demostraci\u00f3n\r\nexample\r\n  (h : \u2200 x y z : \u03b1, x \u2294 (y \u2293 z) = (x \u2294 y) \u2293 (x \u2294 z))\r\n  : (a \u2293 b) \u2294 c = (a \u2294 c) \u2293 (b \u2294 c) :=\r\ncalc\r\n  (a \u2293 b) \u2294 c = c \u2294 (a \u2293 b)       := by rw [sup_comm]\r\n            _ = (c \u2294 a) \u2293 (c \u2294 b) := by rw [h]\r\n            _ = (a \u2294 c) \u2293 (c \u2294 b) := by rw [@sup_comm _ _ c a]\r\n            _ = (a \u2294 c) \u2293 (b \u2294 c) := by rw [@sup_comm _ _ c b]\r\n\r\n-- 2\u00aa demostraci\u00f3n\r\nexample\r\n  (h : \u2200 x y z : \u03b1, x \u2294 (y \u2293 z) = (x \u2294 y) \u2293 (x \u2294 z))\r\n  : (a \u2293 b) \u2294 c = (a \u2294 c) \u2293 (b \u2294 c) :=\r\nby simp [h, sup_comm]\r\n\r\n-- Lemas usados\r\n-- ============\r\n\r\n-- #check (sup_comm : a \u2294 b = b \u2294 a)\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\/Propiedad_distributiva_2.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. 22.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que si \\(R\\) es un ret\u00edculo tal que \\[ (\u2200 x,\\ y,\\ z \\in R) [x \u2294 (y \u2293 z) = (x \u2294 y) \u2293 (x \u2294 z)] \\] entonces \\[ (a \u2293 b) \u2294 c = (a \u2294 c) \u2293 (b \u2294 c) \\] para todos los elementos del ret\u00edculo. Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Order.Lattice variable {\u03b1 : Type _} [Lattice \u03b1] variable (a b c : \u03b1) example (h : \u2200 x y z : \u03b1, x \u2294 (y \u2293 z) = (x \u2294 y) \u2293 (x \u2294 z)) : (a \u2293 b) \u2294 c = (a \u2294 c) \u2293 (b \u2294 c) := 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,293],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1598"}],"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=1598"}],"version-history":[{"count":5,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1598\/revisions"}],"predecessor-version":[{"id":1603,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1598\/revisions\/1603"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}