        {"id":1790,"date":"2023-11-21T06:00:39","date_gmt":"2023-11-21T04:00:39","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1790"},"modified":"2023-11-08T15:02:49","modified_gmt":"2023-11-08T13:02:49","slug":"21-nov-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/21-nov-23\/","title":{"rendered":"Si f es mon\u00f3tona y f(a) < f(b), entonces a < b"},"content":{"rendered":"\n<p>Demostrar con Lean4 que si &#92;(f&#92;) es mon\u00f3tona y &#92;(f(a) &lt; f(b)&#92;), entonces &#92;(a &lt; b&#92;).<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\nvariable (f : \u211d \u2192 \u211d)\nvariable (a b : \u211d)\n\nexample\n  (h1 : Monotone f)\n  (h2 : f a < f b)\n  : a < b :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p>Usaremos los lemas<br \/>\n&#92;begin{align}<br \/>\n   &amp;a \u2271 b \u2192 a &lt; b &#92;tag{L1} &#92;&#92;<br \/>\n   &amp;a \u2265 b \u2192 a \u226e b &#92;tag{L2}<br \/>\n&#92;end{align}<\/p>\n<p>Por el lema L1, basta demostrar que &#92;(a \u2271 b&#92;). Lo haremos  reducci\u00f3n al absurdo. Para ello, supongamos que &#92;(a \u2265 b&#92;). Como &#92;(f&#92;) es mon\u00f3tona, se tiene &#92;(f(a) \u2265 f(b)&#92;) y, aplicando el lema L2, &#92;(f(a) \u226e f(b)&#92;), que contradice a la hip\u00f3tesis.<\/p>\n<p><b>Demostraciones con Lean4<\/b><\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\nvariable (f : \u211d \u2192 \u211d)\nvariable (a b : \u211d)\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : Monotone f)\n  (h2 : f a < f b)\n  : a < b :=\nby\n  apply lt_of_not_ge\n  -- \u22a2 \u00aca \u2265 b\n  intro h3\n  -- h3 : a \u2265 b\n  -- \u22a2 False\n  have h4 : f a \u2265 f b := h1 h3\n  have h5 : \u00ac f a < f b := not_lt_of_ge h4\n  exact h5 h2\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : Monotone f)\n  (h2 : f a < f b)\n  : a < b :=\nby\n  apply lt_of_not_ge\n  -- \u22a2 \u00aca \u2265 b\n  intro h3\n  -- h3 : a \u2265 b\n  -- \u22a2 False\n  have h5 : \u00ac f a < f b := not_lt_of_ge (h1 h3)\n  exact h5 h2\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : Monotone f)\n  (h2 : f a < f b)\n  : a < b :=\nby\n  apply lt_of_not_ge\n  -- \u22a2 \u00aca \u2265 b\n  intro h3\n  -- h3 : a \u2265 b\n  -- \u22a2 False\n  exact (not_lt_of_ge (h1 h3)) h2\n\n-- 4\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : Monotone f)\n  (h2 : f a < f b)\n  : a < b :=\nby\n  apply lt_of_not_ge\n  -- \u22a2 \u00aca \u2265 b\n  exact fun h3 \u21a6 (not_lt_of_ge (h1 h3)) h2\n\n-- 5\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h1 : Monotone f)\n  (h2 : f a < f b)\n  : a < b :=\nlt_of_not_ge (fun h3 \u21a6 (not_lt_of_ge (h1 h3)) h2)\n\n-- Lemas usados\n-- ============\n\n-- #check (lt_of_not_ge : \u00ac a \u2265 b \u2192 a < b)\n-- #check (not_lt_of_ge : a \u2265 b \u2192 \u00ac a < b)\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\/CN_de_monotona.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. 32.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que si &#92;(f&#92;) es mon\u00f3tona y &#92;(f(a) &lt; f(b)&#92;), entonces &#92;(a &lt; b&#92;). Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Data.Real.Basic variable (f : \u211d \u2192 \u211d) variable (a b : \u211d) example (h1 : Monotone f) (h2 : f a < f b) : a < b := 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\/1790"}],"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=1790"}],"version-history":[{"count":2,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1790\/revisions"}],"predecessor-version":[{"id":1792,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1790\/revisions\/1792"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}