        {"id":1590,"date":"2023-09-21T06:09:16","date_gmt":"2023-09-21T04:09:16","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1590"},"modified":"2023-09-05T19:17:09","modified_gmt":"2023-09-05T17:17:09","slug":"21-sep-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/21-sep-23\/","title":{"rendered":"En los ret\u00edculos, x \u2293 (x \u2294 y) = x"},"content":{"rendered":"<p>Demostrar con Lean4 que en los ret\u00edculos se verifica que<br \/>\n\\[ x \u2293 (x \u2294 y) = x \\]<\/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 (x y : \u03b1)\r\n\r\nexample : x \u2293 (x \u2294 y) = x :=\r\nby sorry\r\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p><br \/>\nEn la demostraci\u00f3n se usar\u00e1n los siguientes lemas<br \/>\n\\begin{align}<br \/>\n   &#038;x \u2264 y \u2192 y \u2264 x \u2192 x = y      \\tag{L1} \\\\<br \/>\n   &#038;x \u2293 y \u2264 x                  \\tag{L2} \\\\<br \/>\n   &#038;z \u2264 x \u2192 z \u2264 y \u2192 z \u2264 x \u2293 y  \\tag{L3} \\\\<br \/>\n   &#038;x \u2264 x                      \\tag{L4} \\\\<br \/>\n   &#038;x \u2264 x \u2294 y                  \\tag{L5} \\\\<br \/>\n\\end{align}<\/p>\n<p>Por L1, basta demostrar las siguientes relaciones:<br \/>\n\\begin{align}<br \/>\n   &#038;x \u2293 (x \u2294 y) \u2264 x           \\tag{1} \\\\<br \/>\n   &#038;x \u2264 x \u2293 (x \u2294 y) \\tag{2}<br \/>\n\\end{align}<\/p>\n<p>La (1) se tiene por L2.<\/p>\n<p>Para demostrar la (2), por L3, basta probar las relaciones:<br \/>\n\\begin{align}<br \/>\n   x &#038;\u2264 x       \\tag{2a} \\\\<br \/>\n   x &#038;\u2264 x \u2294 y   \\tag{2b}<br \/>\n\\end{align}<\/p>\n<p>La (2a) se tiene por L4.<\/p>\n<p>La (2b) se tiene por L5<\/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 (x y : \u03b1)\r\n\r\n-- 1\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample : x \u2293 (x \u2294 y) = x :=\r\nby\r\n  have h1 : x \u2293 (x \u2294 y) \u2264 x := inf_le_left\r\n  have h2 : x \u2264 x \u2293 (x \u2294 y)\r\n  { have h2a : x \u2264 x := le_rfl\r\n    have h2b : x \u2264 x \u2294 y := le_sup_left\r\n    show x \u2264 x \u2293 (x \u2294 y)\r\n    exact le_inf h2a h2b }\r\n  show x \u2293 (x \u2294 y) = x\r\n  exact le_antisymm h1 h2\r\n\r\n-- 2\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample : x \u2293 (x \u2294 y) = x :=\r\nby\r\n  have h1 : x \u2293 (x \u2294 y) \u2264 x := by simp\r\n  have h2 : x \u2264 x \u2293 (x \u2294 y) := by simp\r\n  show x \u2293 (x \u2294 y) = x\r\n  exact le_antisymm h1 h2\r\n\r\n-- 3\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample : x \u2293 (x \u2294 y) = x :=\r\nby\r\n  apply le_antisymm\r\n  . -- x \u2293 (x \u2294 y) \u2264 x\r\n    apply inf_le_left\r\n  . -- x \u2264 x \u2293 (x \u2294 y)\r\n    apply le_inf\r\n    . -- x \u2264 x\r\n      apply le_rfl\r\n    . -- x \u2264 x \u2294 y\r\n      apply le_sup_left\r\n\r\n-- 4\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample : x \u2293 (x \u2294 y) = x :=\r\nle_antisymm inf_le_left (le_inf le_rfl le_sup_left)\r\n\r\n-- 5\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample : x \u2293 (x \u2294 y) = x :=\r\n-- by apply?\r\ninf_sup_self\r\n\r\n-- 6\u00aa demostraci\u00f3n\r\n-- ===============\r\n\r\nexample : x \u2293 (x \u2294 y) = x :=\r\nby simp\r\n\r\n-- Lemas usados\r\n-- ============\r\n\r\n-- variable (z : \u03b1)\r\n-- #check (inf_le_left : x \u2293 y \u2264 x)\r\n-- #check (inf_sup_self : x \u2293 (x \u2294 y) = x)\r\n-- #check (le_antisymm : x \u2264 y \u2192 y \u2264 x \u2192 x = y)\r\n-- #check (le_inf : z \u2264 x \u2192 z \u2264 y \u2192 z \u2264 x \u2293 y)\r\n-- #check (le_rfl : x \u2264 x)\r\n-- #check (le_sup_left : x \u2264 x \u2294 y)\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\/Leyes_de_absorcion_1.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. 21.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que en los ret\u00edculos se verifica que \\[ x \u2293 (x \u2294 y) = x \\] Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Order.Lattice variable {\u03b1 : Type _} [Lattice \u03b1] variable (x y : \u03b1) example : x \u2293 (x \u2294 y) = x := 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\/1590"}],"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=1590"}],"version-history":[{"count":3,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1590\/revisions"}],"predecessor-version":[{"id":1593,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1590\/revisions\/1593"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}