        {"id":1806,"date":"2023-11-24T06:00:50","date_gmt":"2023-11-24T04:00:50","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=1806"},"modified":"2023-11-13T11:51:09","modified_gmt":"2023-11-13T09:51:09","slug":"24-nov-23","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/24-nov-23\/","title":{"rendered":"Si (\u2200\u03b5 > 0)[x \u2264 \u03b5], entonces x \u2264 0"},"content":{"rendered":"\n<p>Demostrar con Lean4 que si &#92;((\u2200\u03b5 > 0)[x \u2264 \u03b5]&#92;), entonces &#92;(x \u2264 0&#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 : \u211d)\n\nexample\n  (h : \u2200 \u03b5 > 0, x \u2264 \u03b5)\n  : x \u2264 0 :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<p><b>Demostraci\u00f3n en lenguaje natural<\/b><\/p>\n<p>Basta demostrar que &#92;(x \u226f 0&#92;). Para ello, supongamos que &#92;(x > 0&#92;) y vamos a demostrar que<br \/>\n&#92;[ \u00ac(\u2200\u03b5)[\u03b5 > 0 \u2192 x \u2264 \u03b5] &#92;tag{1} &#92;]<br \/>\nque es una contradicci\u00f3n con la hip\u00f3tesis. Interiorizando la negaci\u00f3n, (1) es equivalente a<br \/>\n&#92;[ (\u2203\u03b5)[\u03b5 > 0 \u2227 \u03b5 &lt; x] &#92;tag{2} &#92;]<br \/>\nPara demostrar (2), elegimos &#92;(\u03b5 = &#92;dfrac{x}{2}&#92;) ya que, como &#92;(x > 0&#92;), se tiene<br \/>\n&#92;[ 0 &lt; &#92;dfrac{x}{2} &lt; x&#92;]<\/p>\n<p><b>Demostraciones con Lean4<\/b><\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\n\nvariable (x : \u211d)\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (h : \u2200 \u03b5 > 0, x \u2264 \u03b5)\n  : x \u2264 0 :=\nby\n  apply le_of_not_gt\n  -- \u22a2 \u00acx > 0\n  intro hx0\n  -- hx0 : x > 0\n  -- \u22a2 False\n  apply absurd h\n  -- \u22a2 \u00ac\u2200 (\u03b5 : \u211d), \u03b5 > 0 \u2192 x \u2264 \u03b5\n  push_neg\n  -- \u22a2 \u2203 \u03b5, \u03b5 > 0 \u2227 \u03b5 < x\n  use x \/2\n  -- \u22a2 x \/ 2 > 0 \u2227 x \/ 2 < x\n  constructor\n  { show x \/ 2 > 0\n    exact half_pos hx0 }\n  { show x \/ 2 < x\n    exact half_lt_self hx0 }\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (x : \u211d)\n  (h : \u2200 \u03b5 > 0, x \u2264 \u03b5)\n  : x \u2264 0 :=\nby\n  contrapose! h\n  -- \u22a2 \u2203 \u03b5, \u03b5 > 0 \u2227 \u03b5 < x\n  use x \/ 2\n  -- \u22a2 x \/ 2 > 0 \u2227 x \/ 2 < x\n  constructor\n  { show x \/ 2 > 0\n    exact half_pos h }\n  { show x \/ 2 < x\n    exact half_lt_self h }\n\n-- Lemas usados\n-- ============\n\n-- variable (a b : \u211d)\n-- variable (p q : Prop)\n-- #check (le_of_not_gt : \u00aca > b \u2192 a \u2264 b)\n-- #check (half_lt_self : 0 < a \u2192 a \/ 2 < a)\n-- #check (half_pos : 0 < a \u2192 0 < a \/ 2)\n-- #check (absurd : p \u2192 \u00acp \u2192 q)\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\/Condicion_para_no_positivo.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;((\u2200\u03b5 > 0)[x \u2264 \u03b5]&#92;), entonces &#92;(x \u2264 0&#92;). Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Data.Real.Basic variable (x : \u211d) example (h : \u2200 \u03b5 > 0, x \u2264 \u03b5) : x \u2264 0 := 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":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1806"}],"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=1806"}],"version-history":[{"count":3,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1806\/revisions"}],"predecessor-version":[{"id":1809,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/1806\/revisions\/1809"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=1806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=1806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=1806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}