        {"id":615,"date":"2021-07-31T08:26:59","date_gmt":"2021-07-31T06:26:59","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=615"},"modified":"2021-07-31T08:26:59","modified_gmt":"2021-07-31T06:26:59","slug":"producto-de-una-sucesion-acotada-por-otra-convergente-a-cero","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/producto-de-una-sucesion-acotada-por-otra-convergente-a-cero\/","title":{"rendered":"Producto de una sucesi\u00f3n acotada por otra convergente a cero"},"content":{"rendered":"<p>Demostrar que el producto de una sucesi\u00f3n acotada por una convergente a 0 tambi\u00e9n converge a 0.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\nimport data.real.basic\nimport tactic\n\nvariables (u v : \u2115 \u2192 \u211d)\nvariable  (a : \u211d)\n\nnotation `|`x`|` := abs x\n\ndef limite (u : \u2115 \u2192 \u211d) (c : \u211d) :=\n\u2200 \u03b5 > 0, \u2203 N, \u2200 n \u2265 N, |u n - c| < \u03b5\n\ndef acotada (a : \u2115 \u2192 \u211d) :=\n\u2203 B, \u2200 n, |a n| \u2264 B\n\nexample\n  (hU : acotada u)\n  (hV : limite v 0)\n  : limite (u*v) 0 :=\nsorry\n<\/pre>\n<p>[expand title=\"Soluciones con Lean\"]<\/p>\n<pre lang=\"lean\">\r\nimport data.real.basic\r\nimport tactic\r\n\r\nvariables (u v : \u2115 \u2192 \u211d)\r\nvariable  (a : \u211d)\r\n\r\nnotation `|`x`|` := abs x\r\n\r\ndef limite (u : \u2115 \u2192 \u211d) (c : \u211d) :=\r\n\u2200 \u03b5 > 0, \u2203 N, \u2200 n \u2265 N, |u n - c| < \u03b5\r\n\r\ndef acotada (a : \u2115 \u2192 \u211d) :=\r\n\u2203 B, \u2200 n, |a n| \u2264 B\r\n\r\n-- 1\u00aa demostraci\u00f3n\r\nexample\r\n  (hU : acotada u)\r\n  (hV : limite v 0)\r\n  : limite (u*v) 0 :=\r\nbegin\r\n  cases hU with B hB,\r\n  have hBnoneg : 0 \u2264 B,\r\n    calc 0 \u2264 |u 0| : abs_nonneg (u 0)\r\n       ... \u2264 B     : hB 0,\r\n  by_cases hB0 : B = 0,\r\n  { subst hB0,\r\n    intros \u03b5 h\u03b5,\r\n    use 0,\r\n    intros n hn,\r\n    simp_rw [sub_zero] at *,\r\n    calc |(u * v) n|\r\n         = |u n * v n|   : congr_arg abs (pi.mul_apply u v n)\r\n     ... = |u n| * |v n| : abs_mul (u n) (v n)\r\n     ... \u2264 0 * |v n|     : mul_le_mul_of_nonneg_right (hB n) (abs_nonneg (v n))\r\n     ... = 0             : zero_mul (|v n|)\r\n     ... < \u03b5             : h\u03b5, },\r\n  { change B \u2260 0 at hB0,\r\n    have hBpos : 0 < B := (ne.le_iff_lt hB0.symm).mp hBnoneg,\r\n    intros \u03b5 h\u03b5,\r\n    cases hV (\u03b5\/B) (div_pos h\u03b5 hBpos) with N hN,\r\n    use N,\r\n    intros n hn,\r\n    simp_rw [sub_zero] at *,\r\n    calc |(u * v) n|\r\n         = |u n * v n|    : congr_arg abs (pi.mul_apply u v n)\r\n     ... = |u n| * |v n|  : abs_mul (u n) (v n)\r\n     ... \u2264 B * |v n|      : mul_le_mul_of_nonneg_right (hB n) (abs_nonneg _)\r\n     ... < B * (\u03b5\/B)      : mul_lt_mul_of_pos_left (hN n hn) hBpos\r\n     ... = \u03b5              : mul_div_cancel' \u03b5 hB0 },\r\nend\r\n\r\n-- 2\u00aa demostraci\u00f3n\r\nexample\r\n  (hU : acotada u)\r\n  (hV : limite v 0)\r\n  : limite (u*v) 0 :=\r\nbegin\r\n  cases hU with B hB,\r\n  have hBnoneg : 0 \u2264 B,\r\n    calc 0 \u2264 |u 0| : abs_nonneg (u 0)\r\n       ... \u2264 B     : hB 0,\r\n  by_cases hB0 : B = 0,\r\n  { subst hB0,\r\n    intros \u03b5 h\u03b5,\r\n    use 0,\r\n    intros n hn,\r\n    simp_rw [sub_zero] at *,\r\n    calc |(u * v) n|\r\n         = |u n| * |v n| : by finish [abs_mul]\r\n     ... \u2264 0 * |v n|     : mul_le_mul_of_nonneg_right (hB n) (abs_nonneg (v n))\r\n     ... = 0             : by ring\r\n     ... < \u03b5             : h\u03b5, },\r\n  { change B \u2260 0 at hB0,\r\n    have hBpos : 0 < B := (ne.le_iff_lt hB0.symm).mp hBnoneg,\r\n    intros \u03b5 h\u03b5,\r\n    cases hV (\u03b5\/B) (div_pos h\u03b5 hBpos) with N hN,\r\n    use N,\r\n    intros n hn,\r\n    simp_rw [sub_zero] at *,\r\n    calc |(u * v) n|\r\n         = |u n| * |v n|  : by finish [abs_mul]\r\n     ... \u2264 B * |v n|      : mul_le_mul_of_nonneg_right (hB n) (abs_nonneg _)\r\n     ... < B * (\u03b5\/B)      : by finish\r\n     ... = \u03b5              : mul_div_cancel' \u03b5 hB0 },\r\nend\r\n<\/pre>\n<p>Se puede interactuar con la prueba anterior en <a href=\"https:\/\/leanprover-community.github.io\/lean-web-editor\/#url=https:\/\/raw.githubusercontent.com\/jaalonso\/Calculemus\/main\/src\/Producto_de_una_sucesion_acotada_por_otra_convergente_a_cero.lean\" rel=\"noopener noreferrer\" target=\"_blank\">esta sesi\u00f3n con Lean<\/a>.<\/p>\n<p>En los comentarios se pueden escribir otras soluciones, escribiendo el c\u00f3digo entre una l\u00ednea con &#60;pre lang=&quot;lean&quot;&#62; y otra con &#60;\/pre&#62;<br \/>\n[\/expand]<\/p>\n<p>[expand title=\"Soluciones con Isabelle\/HOL\"]<\/p>\n<pre lang=\"isar\">\r\ntheory Producto_de_una_sucesion_acotada_por_otra_convergente_a_cero\r\nimports Main HOL.Real\r\nbegin\r\n\r\ndefinition limite :: \"(nat \u21d2 real) \u21d2 real \u21d2 bool\"\r\n  where \"limite u c \u27f7 (\u2200\u03b5>0. \u2203k::nat. \u2200n\u2265k. \u00a6u n - c\u00a6 < \u03b5)\"\r\n\r\ndefinition acotada :: \"(nat \u21d2 real) \u21d2 bool\"\r\n  where \"acotada u \u27f7 (\u2203B. \u2200n. \u00a6u n\u00a6 \u2264 B)\"\r\n\r\nlemma\r\n  assumes \"acotada u\"\r\n          \"limite v 0\"\r\n  shows   \"limite (\u03bbn. u n * v n) 0\"\r\nproof -\r\n  obtain B where hB : \"\u2200n. \u00a6u n\u00a6 \u2264 B\"\r\n    using assms(1) acotada_def by auto\r\n  then have hBnoneg : \"0 \u2264 B\" by auto\r\n  show \"limite (\u03bbn. u n * v n) 0\"\r\n  proof (cases \"B = 0\")\r\n    assume \"B = 0\"\r\n    show \"limite (\u03bbn. u n * v n) 0\"\r\n    proof (unfold limite_def; intro allI impI)\r\n      fix \u03b5 :: real\r\n      assume \"0 < \u03b5\"\r\n      have \"\u2200n\u22650. \u00a6u n * v n - 0\u00a6 < \u03b5\"\r\n      proof (intro allI impI)\r\n        fix n :: nat\r\n        assume \"n \u2265 0\"\r\n        show \"\u00a6u n * v n - 0\u00a6 < \u03b5\"\r\n          using \u20390 < \u03b5\u203a \u2039B = 0\u203a hB by auto\r\n      qed\r\n      then show \"\u2203k. \u2200n\u2265k. \u00a6u n * v n - 0\u00a6 < \u03b5\"\r\n        by (rule exI)\r\n    qed\r\n  next\r\n    assume \"B \u2260 0\"\r\n    then have hBpos : \"0 < B\"\r\n      using hBnoneg by auto\r\n    show \"limite (\u03bbn. u n * v n) 0\"\r\n    proof (unfold limite_def; intro allI impI)\r\n      fix \u03b5 :: real\r\n      assume \"0 < \u03b5\"\r\n      then have \"0 < \u03b5\/B\"\r\n        by (simp add: hBpos)\r\n      then obtain N where hN : \"\u2200n\u2265N. \u00a6v n - 0\u00a6 < \u03b5\/B\"\r\n        using assms(2) limite_def by auto\r\n      have \"\u2200n\u2265N. \u00a6u n * v n - 0\u00a6 < \u03b5\"\r\n      proof (intro allI impI)\r\n        fix n :: nat\r\n        assume \"n \u2265 N\"\r\n        have \"\u00a6v n\u00a6 < \u03b5\/B\"\r\n          using \u2039N \u2264 n\u203a hN by auto\r\n        have \"\u00a6u n * v n - 0\u00a6 = \u00a6u n\u00a6 * \u00a6v n\u00a6\"\r\n          by (simp add: abs_mult)\r\n        also have \"\u2026 \u2264 B * \u00a6v n\u00a6\"\r\n          by (simp add: hB mult_right_mono)\r\n        also have \"\u2026 < B * (\u03b5\/B)\"\r\n          using \u2039\u00a6v n\u00a6 < \u03b5\/B\u203a hBpos\r\n          by (simp only: mult_strict_left_mono)\r\n        also have \"\u2026 = \u03b5\"\r\n          using \u2039B \u2260 0\u203a by simp\r\n        finally show \"\u00a6u n * v n - 0\u00a6 < \u03b5\"\r\n          by this\r\n      qed\r\n      then show \"\u2203k. \u2200n\u2265k. \u00a6u n * v n - 0\u00a6 < \u03b5\"\r\n        by (rule exI)\r\n    qed\r\n  qed\r\nqed\r\n\r\nend\r\n<\/pre>\n<p>En los comentarios se pueden escribir otras soluciones, escribiendo el c\u00f3digo entre una l\u00ednea con &#60;pre lang=&quot;isar&quot;&#62; y otra con &#60;\/pre&#62;<br \/>\n[\/expand]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Demostrar que el producto de una sucesi\u00f3n acotada por una convergente a 0 tambi\u00e9n converge a 0. Para ello, completar la siguiente teor\u00eda de Lean: import data.real.basic import tactic variables (u v : \u2115 \u2192 \u211d) variable (a : \u211d) notation `|`x`|` := abs x def limite (u : \u2115 \u2192 \u211d) (c : \u211d) := \u2200 \u03b5 > 0, \u2203 N, \u2200 n \u2265 N, |u n &#8211; c| < \u03b5 def acotada (a : \u2115 \u2192 \u211d) := \u2203 B, \u2200 n, |a n| \u2264 B example (hU : acotada u) (hV : limite v 0) : limite (u*v) 0 := sorry [expand title=\"Soluciones con Lean\"] import data.real.basic import tactic variables (u v : \u2115 \u2192 \u211d) variable (a : \u211d) notation `|`x`|`...\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":[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\/615"}],"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=615"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/615\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/615\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}