        {"id":1849,"date":"2023-12-11T06:00:37","date_gmt":"2023-12-11T04:00:37","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1849"},"modified":"2023-12-07T14:22:46","modified_gmt":"2023-12-07T12:22:46","slug":"11-dic-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/11-dic-23\/","title":{"rendered":"{x \u2264 y, y \u2270 x} \u22a2 x \u2264 y \u2227 x \u2260 y"},"content":{"rendered":"\n<p>Demostrar con Lean4 que<br \/>\n&#92;[&#92;{x \u2264 y, y \u2270 x&#92;} \u22a2 x \u2264 y \u2227 x \u2260 y&#92;]<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\n\nvariable {x y : \u211d}\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00acy \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p>Como la conclusi\u00f3n es una conjunci\u00f3n, tenemos que desmostrar sus  partes. La primera parte (&#92;(x \u2264 y&#92;)) coincide con la hip\u00f3tesis. Para demostrar la segunda parte (&#92;(x \u2260 y&#92;)), supongamos que &#92;(x = y&#92;); entonces &#92;(y \u2264 x&#92;) en contradicci\u00f3n con la segunda hip\u00f3tesis.<\/p>\n<p><b>Demostraciones con Lean4<\/b><\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\n\nvariable {x y : \u211d}\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00acy \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\nby\n  constructor\n  . -- \u22a2 x \u2264 y\n    exact h1\n  . -- \u22a2 x \u2260 y\n    intro h3\n    -- h3 : x = y\n    -- \u22a2 False\n    have h4 : y \u2264 x := h3.symm.le\n    show False\n    exact h2 h4\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00acy \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\nby\n  constructor\n  . -- \u22a2 x \u2264 y\n    exact h1\n  . -- \u22a2 x \u2260 y\n    intro h3\n    -- h3 : x = y\n    -- \u22a2 False\n    exact h2 (h3.symm.le)\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00acy \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\n\u27e8h1, fun h3 \u21a6 h2 (h3.symm.le)\u27e9\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00acy \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\nby\n  constructor\n  . -- \u22a2 x \u2264 y\n    exact h1\n  . -- \u22a2 x \u2260 y\n    intro h3\n    -- h3 : x = y\n    -- \u22a2 False\n    apply h2\n    -- \u22a2 y \u2264 x\n    rw [h3]\n\n-- 5\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00acy \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\nby\n  constructor\n  . -- \u22a2 x \u2264 y\n    exact h1\n  . -- \u22a2 x \u2260 y\n    intro h3\n    -- h3 : x = y\n    -- \u22a2 False\n    exact h2 (by rw [h3])\n\n-- 6\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00ac y \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\n\u27e8h1, fun h \u21a6 h2 (by rw [h])\u27e9\n\n-- 7\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00ac y \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\nby\n  have h3 : x \u2260 y\n  . contrapose! h2\n    -- \u22a2 y \u2264 x\n    rw [h2]\n  exact \u27e8h1, h3\u27e9\n\n-- 8\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : x \u2264 y)\n  (h2 : \u00ac y \u2264 x)\n  : x \u2264 y \u2227 x \u2260 y :=\nby aesop\n<\/pre>\n<p><b>Demostraciones interactivas<\/b><\/p>\n<p>Se puede interactuar con las demostraciones anteriores en <a href=\"https:\/\/live.lean-lang.org\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus2\/main\/src\/Introduccion_de_la_conjuncion.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. 35.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que {x \u2264 y, y \u2270 x} \u22a2 x \u2264 y \u2227 x \u2260 y<\/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":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1849"}],"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=1849"}],"version-history":[{"count":2,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1849\/revisions"}],"predecessor-version":[{"id":1856,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1849\/revisions\/1856"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}