        {"id":1918,"date":"2024-01-09T06:00:12","date_gmt":"2024-01-09T04:00:12","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1918"},"modified":"2024-01-08T11:32:19","modified_gmt":"2024-01-08T09:32:19","slug":"09-ene-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/09-ene-23\/","title":{"rendered":"En \u211d, -y > x\u00b2 + 1 \u22a2 y > 0 \u2228 y < -1"},"content":{"rendered":"\n<p>Demostrar con Lean4 que en &#92;(\u211d&#92;),<br \/>\n&#92;[ -y > x\u00b2 + 1 \u22a2 y > 0 \u2228 y &lt; -1 &#92;]<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\nvariable {x y : \u211d}\n\nexample\n  (h : -y > x^2 + 1)\n  : y > 0 \u2228 y < -1 :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p>Usaremos los siguientes lemas<br \/>\n&#92;begin{align}<br \/>\n   &amp;(\u2200 b, c \u2208 \u211d)[b \u2264 c \u2192 \u2200 (a : \u211d),  b + a \u2264 c + a)]               &#92;tag{L1} &#92;&#92;<br \/>\n   &amp;(\u2200 a \u2208 \u211d)[0 \u2264 a\u00b2]                                              &#92;tag{L2} &#92;&#92;<br \/>\n   &amp;(\u2200 a  \u2208 \u211d)[0 + a = a]                                          &#92;tag{L3} &#92;&#92;<br \/>\n   &amp;(\u2200 a, b \u2208 \u211d)[a &lt; -b \u2194 b &lt; -a]                                  &#92;tag{L4}<br \/>\n&#92;end{align}<\/p>\n<p>Se tiene<br \/>\n&#92;begin{align}<br \/>\n   -y &amp;> x^2 + 1    &amp;&amp;&#92;text{[por la hip\u00f3tesis]} &#92;&#92;<br \/>\n      &amp;\u2265 0 + 1      &amp;&amp;&#92;text{[por L1 y L2]} &#92;&#92;<br \/>\n      &amp;= 1          &amp;&amp;&#92;text{[por L3]}<br \/>\n&#92;end{align}<br \/>\nPor tanto,<br \/>\n&#92;[ -y > 1 &#92;]<br \/>\ny, aplicando el lema L4, se tiene<br \/>\n&#92;[ y &lt; -1 &#92;]<br \/>\nComo se verifica la segunda parte de la disyunci\u00f3n, se verifica la disyunci\u00f3n.<\/p>\n<p><b>Demostraciones con Lean4<\/b><\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\nvariable {x y : \u211d}\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : -y > x^2 + 1)\n  : y > 0 \u2228 y < -1 :=\nby\n  have h1 : -y > 1 := by\n    calc -y > x^2 + 1 := by exact h\n          _ \u2265 0 + 1   := add_le_add_right (pow_two_nonneg x) 1\n          _ = 1       := zero_add 1\n  have h2: y < -1 := lt_neg.mp h1\n  show y > 0 \u2228 y < -1\n  exact Or.inr h2\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : -y > x^2 + 1)\n  : y > 0 \u2228 y < -1 :=\nby\n  have h1 : -y > 1 := by linarith [pow_two_nonneg x]\n  have h2: y < -1 := lt_neg.mp h1\n  show y > 0 \u2228 y < -1\n  exact Or.inr h2\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : -y > x^2 + 1)\n  : y > 0 \u2228 y < -1 :=\nby\n  have h1: y < -1 := by linarith [pow_two_nonneg x]\n  show y > 0 \u2228 y < -1\n  exact Or.inr h1\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : -y > x^2 + 1)\n  : y > 0 \u2228 y < -1 :=\nby\n  right\n  -- \u22a2 y < -1\n  linarith [pow_two_nonneg x]\n\n-- 5\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : -y > x^2 + 1)\n  : y > 0 \u2228 y < -1 :=\nby { right ; linarith [pow_two_nonneg x] }\n\n-- Lemas usados\n-- ============\n\n-- variable (a b c : \u211d)\n-- #check (add_le_add_right : b \u2264 c \u2192 \u2200 (a : \u211d),  b + a \u2264 c + a)\n-- #check (lt_neg : a < -b \u2194 b < -a)\n-- #check (pow_two_nonneg a : 0 \u2264 a ^ 2)\n-- #check (zero_add a : 0 + a = a)\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_disyuncion_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. 39.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que en &#92;(\u211d&#92;), &#92;[ -y > x\u00b2 + 1 \u22a2 y > 0 \u2228 y &lt; -1 &#92;] Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Data.Real.Basic variable {x y : \u211d} example (h : -y > x^2 + 1) : y > 0 \u2228 y < -1 := by sorry\n<\/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\/1918"}],"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=1918"}],"version-history":[{"count":3,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1918\/revisions"}],"predecessor-version":[{"id":1921,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1918\/revisions\/1921"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}