        {"id":2243,"date":"2024-02-17T06:00:25","date_gmt":"2024-02-17T04:00:25","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=2243"},"modified":"2024-02-19T09:37:34","modified_gmt":"2024-02-19T07:37:34","slug":"17-feb-24","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/17-feb-24\/","title":{"rendered":"Si u\u2099 y v\u2099 convergen a 0, entonces u\u2099v\u2099 converge a 0"},"content":{"rendered":"\n<p>Demostrar con Lean4 que si &#92;(u\u2099&#92;) y &#92;(v\u2099&#92;) convergen a &#92;(0&#92;), entonces &#92;(u\u2099v\u2099&#92;) converge a &#92;(0&#92;).<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean4:<\/p>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\nimport Mathlib.Tactic\n\nvariable {u v : \u2115 \u2192 \u211d}\n\ndef limite : (\u2115 \u2192 \u211d) \u2192 \u211d \u2192 Prop :=\n  fun u c \u21a6 \u2200 \u03b5 > 0, \u2203 N, \u2200 n \u2265 N, |u n - c| < \u03b5\n\nexample\n  (hu : limite u 0)\n  (hv : limite v 0)\n  : limite (u * v) 0 :=\nby sorry\n<\/pre>\n<p><!--more--><\/p>\n<h2>1. Demostraci\u00f3n en lenguaje natural<\/h2>\n<p>Sea &#92;(\u03b5 \u2208 \u211d&#92;) tal que &#92;(\u03b5 > 0&#92;). Tenemos que demostrar que<br \/>\n&#92;[ (\u2203N \u2208 \u2115)(\u2200n \u2265 N)[|(u\u00b7v)(n) - 0| &lt; \u03b5] &#92;tag{1} &#92;]<br \/>\nPuesto que el l\u00edmite de &#92;(u\u2099&#92;) es &#92;(0&#92;), existe un &#92;(U \u2208 \u2115&#92;) tal que<br \/>\n&#92;[ (\u2200n \u2265 U)[|u(n) - 0| &lt; \u03b5] &#92;tag{2} &#92;]<br \/>\ny, puesto que el l\u00edmite de &#92;(v\u2099&#92;) es &#92;(0&#92;), existe un &#92;(V \u2208 \u2115&#92;) tal que<br \/>\n&#92;[ (\u2200n \u2265 V)[|v(n) - 0| &lt; 1] &#92;tag{3} &#92;]<br \/>\nEntonces, &#92;(N = &#92;text{m\u00e1x}(U, V)&#92;) cumple (1). En efecto, sea &#92;(n \u2265 N&#92;). Entonces,<br \/>\n&#92;(n \u2265 U&#92;) y &#92;(n \u2265 V&#92;) y, aplicando (2) y (3), se tiene<br \/>\n&#92;begin{align}<br \/>\n   &amp;|u(n) - 0| &lt; \u03b5 &#92;tag{4} &#92;&#92;<br \/>\n   &amp;|v(n) - 0| &lt; 1 &#92;tag{5}<br \/>\n&#92;end{align}<br \/>\nPor tanto,<br \/>\n&#92;begin{align}<br \/>\n   |(u\u00b7v)(n) - 0| &amp;= |u(n)\u00b7v(n)|     &#92;&#92;<br \/>\n                  &amp;= |u(n)|\u00b7|v n|    &#92;&#92;<br \/>\n                  &amp;&lt; \u03b5\u00b71             &amp;&amp;&#92;text{[por (4) y (5)]} &#92;&#92;<br \/>\n                  &amp;= \u03b5<br \/>\n&#92;end{align}<\/p>\n<h2>2. Demostraciones con Lean4<\/h2>\n<pre lang=\"lean\">\nimport Mathlib.Data.Real.Basic\nimport Mathlib.Tactic\n\nvariable {u v : \u2115 \u2192 \u211d}\n\ndef limite : (\u2115 \u2192 \u211d) \u2192 \u211d \u2192 Prop :=\n  fun u c \u21a6 \u2200 \u03b5 > 0, \u2203 N, \u2200 n \u2265 N, |u n - c| < \u03b5\n\n-- 1\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hu : limite u 0)\n  (hv : limite v 0)\n  : limite (u * v) 0 :=\nby\n  intros \u03b5 h\u03b5\n  -- \u03b5 : \u211d\n  -- h\u03b5 : \u03b5 > 0\n  -- \u22a2 \u2203 N, \u2200 (n : \u2115), n \u2265 N \u2192 |(u * v) n - 0| < \u03b5\n  cases' hu \u03b5 h\u03b5 with U hU\n  -- U : \u2115\n  -- hU : \u2200 (n : \u2115), n \u2265 U \u2192 |u n - 0| < \u03b5\n  cases' hv 1 zero_lt_one with V hV\n  -- V : \u2115\n  -- hV : \u2200 (n : \u2115), n \u2265 V \u2192 |v n - 0| < 1\n  let N := max U V\n  use N\n  -- \u22a2 \u2200 (n : \u2115), n \u2265 N \u2192 |(u * v) n - 0| < \u03b5\n  intros n hn\n  -- n : \u2115\n  -- hn : n \u2265 N\n  -- \u22a2 |(u * v) n - 0| < \u03b5\n  specialize hU n (le_of_max_le_left hn)\n  -- hU : |u n - 0| < \u03b5\n  specialize hV n (le_of_max_le_right hn)\n  -- hV : |v n - 0| < 1\n  rw [sub_zero] at *\n  -- hU : |u n - 0| < \u03b5\n  -- hV : |v n - 0| < 1\n  -- \u22a2 |(u * v) n - 0| < \u03b5\n  calc |(u * v) n|\n       = |u n * v n|   := rfl\n     _ = |u n| * |v n| := abs_mul (u n) (v n)\n     _ < \u03b5 * 1         := mul_lt_mul'' hU hV (abs_nonneg (u n)) (abs_nonneg (v n))\n     _ = \u03b5             := mul_one \u03b5\n\n-- 2\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hu : limite u 0)\n  (hv : limite v 0)\n  : limite (u * v) 0 :=\nby\n  intros \u03b5 h\u03b5\n  -- \u03b5 : \u211d\n  -- h\u03b5 : \u03b5 > 0\n  -- \u22a2 \u2203 N, \u2200 (n : \u2115), n \u2265 N \u2192 |(u * v) n - 0| < \u03b5\n  cases' hu \u03b5 h\u03b5 with U hU\n  -- U : \u2115\n  -- hU : \u2200 (n : \u2115), n \u2265 U \u2192 |u n - 0| < \u03b5\n  cases' hv 1 (by linarith) with V hV\n  -- V : \u2115\n  -- hV : \u2200 (n : \u2115), n \u2265 V \u2192 |v n - 0| < 1\n  let N := max U V\n  use N\n  -- \u22a2 \u2200 (n : \u2115), n \u2265 N \u2192 |(u * v) n - 0| < \u03b5\n  intros n hn\n  -- n : \u2115\n  -- hn : n \u2265 N\n  -- \u22a2 |(u * v) n - 0| < \u03b5\n  specialize hU n (le_of_max_le_left hn)\n  -- hU : |u n - 0| < \u03b5\n  specialize hV n (le_of_max_le_right hn)\n  -- hV : |v n - 0| < 1\n  rw [sub_zero] at *\n  -- hU : |u n| < \u03b5\n  -- hV : |v n| < 1\n  -- \u22a2 |(u * v) n| < \u03b5\n  calc |(u * v) n|\n       = |u n * v n|   := rfl\n     _ = |u n| * |v n| := abs_mul (u n) (v n)\n     _ < \u03b5 * 1         := by { apply mul_lt_mul'' hU hV <;> simp [abs_nonneg] }\n     _ = \u03b5             := mul_one \u03b5\n\n-- 3\u00aa demostraci\u00f3n\n-- ===============\n\nexample\n  (hu : limite u 0)\n  (hv : limite v 0)\n  : limite (u * v) 0 :=\nby\n  intros \u03b5 h\u03b5\n  -- \u03b5 : \u211d\n  -- h\u03b5 : \u03b5 > 0\n  -- \u22a2 \u2203 N, \u2200 (n : \u2115), n \u2265 N \u2192 |(u * v) n - 0| < \u03b5\n  cases' hu \u03b5 h\u03b5 with U hU\n  -- U : \u2115\n  -- hU : \u2200 (n : \u2115), n \u2265 U \u2192 |u n - 0| < \u03b5\n  cases' hv 1 (by linarith) with V hV\n  -- V : \u2115\n  -- hV : \u2200 (n : \u2115), n \u2265 V \u2192 |v n - 0| < 1\n  let N := max U V\n  use N\n  -- \u22a2 \u2200 (n : \u2115), n \u2265 N \u2192 |(u * v) n - 0| < \u03b5\n  intros n hn\n  -- n : \u2115\n  -- hn : n \u2265 N\n  -- \u22a2 |(u * v) n - 0| < \u03b5\n  have hUN : U \u2264 N := le_max_left U V\n  have hVN : V \u2264 N := le_max_right U V\n  specialize hU n (by linarith)\n  -- hU : |u n - 0| < \u03b5\n  specialize hV n (by linarith)\n  -- hV : |v n - 0| < 1\n  rw [sub_zero] at *\n  -- hU : |u n| < \u03b5\n  -- hV : |v n| < 1\n  -- \u22a2 |(u * v) n| < \u03b5\n  rw [Pi.mul_apply]\n  -- \u22a2 |u n * v n| < \u03b5\n  rw [abs_mul]\n  -- \u22a2 |u n| * |v n| < \u03b5\n  convert mul_lt_mul'' hU hV _ _ using 2 <;> simp\n\n-- Lemas usados\n-- ============\n\n-- variable (a b c d : \u211d)\n-- variable (I : Type _)\n-- variable (f : I \u2192 Type _)\n-- #check (zero_lt_one : 0 < 1)\n-- #check (le_of_max_le_left : max a b \u2264 c \u2192 a \u2264 c)\n-- #check (le_of_max_le_right : max a b \u2264 c \u2192 b \u2264 c)\n-- #check (sub_zero a : a - 0 = a)\n-- #check (abs_mul a b : |a * b| = |a| * |b|)\n-- #check (mul_lt_mul'' : a < c \u2192 b < d \u2192 0 \u2264 a \u2192 0 \u2264 b \u2192 a * b < c * d)\n-- #check (abs_nonneg a : 0 \u2264 |a|)\n-- #check (mul_one a : a * 1 = a)\n<\/pre>\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\/Producto_de_sucesiones_convergentes_a_cero.lean\" rel=\"noopener noreferrer\" target=\"_blank\">Lean 4 Web<\/a>.<\/p>\n<h2>3. Demostraciones con Isabelle\/HOL<\/h2>\n<pre lang=\"isar\">\ntheory Producto_de_sucesiones_convergentes_a_cero\nimports Main HOL.Real\nbegin\n\ndefinition limite :: \"(nat \u21d2 real) \u21d2 real \u21d2 bool\"\n  where \"limite u c \u27f7 (\u2200\u03b5>0. \u2203k::nat. \u2200n\u2265k. \u00a6u n - c\u00a6 < \u03b5)\"\n\nlemma\n  assumes \"limite u 0\"\n          \"limite v 0\"\n  shows   \"limite (\u03bb n. u n * v n) 0\"\nproof (unfold limite_def; intro allI impI)\n  fix \u03b5 :: real\n  assume  h\u03b5 : \"0 < \u03b5\"\n  then obtain U where hU : \"\u2200n\u2265U. \u00a6u n - 0\u00a6 < \u03b5\"\n    using assms(1) limite_def\n    by auto\n  obtain V where hV : \"\u2200n\u2265V. \u00a6v n - 0\u00a6 < 1\"\n    using h\u03b5 assms(2) limite_def\n    by fastforce\n  have \"\u2200n\u2265max U V. \u00a6u n * v n - 0\u00a6 < \u03b5\"\n  proof (intro allI impI)\n    fix n\n    assume hn : \"max U V \u2264 n\"\n    then have \"U \u2264 n\"\n      by simp\n    then have \"\u00a6u n - 0\u00a6 < \u03b5\"\n      using hU by blast\n    have hnV : \"V \u2264 n\"\n      using hn by simp\n    then have \"\u00a6v n - 0\u00a6 < 1\"\n      using hV by blast\n    have \"\u00a6u n * v n - 0\u00a6 = \u00a6(u n - 0) * (v n - 0)\u00a6\"\n      by simp\n    also have \"\u2026 = \u00a6u n - 0\u00a6 * \u00a6v n - 0\u00a6\"\n      by (simp add: abs_mult)\n    also have \"\u2026 < \u03b5 * 1\"\n      using \u2039\u00a6u n - 0\u00a6 < \u03b5\u203a \u2039\u00a6v n - 0\u00a6 < 1\u203a\n      by (rule abs_mult_less)\n    also have \"\u2026 = \u03b5\"\n      by simp\n    finally show \"\u00a6u n * v n - 0\u00a6 < \u03b5\"\n      by this\n  qed\n  then show \"\u2203k. \u2200n\u2265k. \u00a6u n * v n - 0\u00a6 < \u03b5\"\n    by (rule exI)\nqed\n\nend\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar con Lean4 que si &#92;(u\u2099&#92;) y &#92;(v\u2099&#92;) convergen a &#92;(0&#92;), entonces &#92;(u\u2099v\u2099&#92;) converge a &#92;(0&#92;). Para ello, completar la siguiente teor\u00eda de Lean4: import Mathlib.Data.Real.Basic import Mathlib.Tactic variable {u v : \u2115 \u2192 \u211d} def limite : (\u2115 \u2192 \u211d) \u2192 \u211d \u2192 Prop := fun u c \u21a6 \u2200 \u03b5 > 0, \u2203 N, \u2200 n \u2265 N, |u n &#8211; c| < \u03b5 example (hu : limite u 0) (hv : limite v 0) : limite (u * v) 0 := 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":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_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":[14],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/2243"}],"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=2243"}],"version-history":[{"count":2,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/2243\/revisions"}],"predecessor-version":[{"id":2245,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/2243\/revisions\/2245"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=2243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=2243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=2243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}