        {"id":726,"date":"2021-09-02T06:00:45","date_gmt":"2021-09-02T04:00:45","guid":{"rendered":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/?p=726"},"modified":"2021-08-28T17:23:13","modified_gmt":"2021-08-28T15:23:13","slug":"el-punto-de-acumulacion-de-las-sucesiones-convergente-es-su-limite","status":"publish","type":"post","link":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/el-punto-de-acumulacion-de-las-sucesiones-convergente-es-su-limite\/","title":{"rendered":"El punto de acumulaci\u00f3n de las sucesiones convergente es su l\u00edmite"},"content":{"rendered":"<p>Para extraer una subsucesi\u00f3n se aplica una funci\u00f3n de extracci\u00f3n que conserva el orden; por ejemplo, la subsucesi\u00f3n<\/p>\n<pre lang=\"text\">\r\n   u\u2092, u\u2082, u\u2084, u\u2086, ...\r\n<\/pre>\n<p>se ha obtenido con la funci\u00f3n de extracci\u00f3n \u03c6 tal que \u03c6(n) = 2*n.<\/p>\n<p>En Lean, se puede definir que \u03c6 es una funci\u00f3n de extracci\u00f3n por<\/p>\n<pre lang=\"text\">\r\n   def extraccion (\u03c6 : \u2115 \u2192 \u2115) :=\r\n     \u2200 n m, n < m \u2192 \u03c6 n < \u03c6 m\r\n<\/pre>\n<p>que a es un l\u00edmite de u por<\/p>\n<pre lang=\"text\">\r\n   def limite (u : \u2115 \u2192 \u211d) (a : \u211d) :=\r\n     \u2200 \u03b5 > 0, \u2203 N, \u2200 k \u2265 N, |u k - a| < \u03b5\r\n<\/pre>\n<p>que u es convergente por<\/p>\n<pre lang=\"text\">\r\n   def convergente (u : \u2115 \u2192 \u211d) :=\r\n     \u2203 a, limite u a\r\n<\/pre>\n<p>que a es un punto de acumulaci\u00f3n de u por<\/p>\n<pre lang=\"text\">\r\n   def punto_acumulacion (u : \u2115 \u2192 \u211d) (a : \u211d) :=\r\n     \u2203 \u03c6, extraccion \u03c6 \u2227 limite (u \u2218 \u03c6) a\r\n<\/pre>\n<p>Demostrar que si u es una sucesi\u00f3n convergente y a es un punto de acumulaci\u00f3n de u, entonces a es un l\u00edmite de u.<\/p>\n<p>Para ello, completar la siguiente teor\u00eda de Lean:<\/p>\n<pre lang=\"lean\">\r\nimport data.real.basic\r\nopen nat\r\n\r\nvariable  {u : \u2115 \u2192 \u211d}\r\nvariables {a : \u211d}\r\n\r\ndef extraccion (\u03c6 : \u2115 \u2192 \u2115) :=\r\n  \u2200 n m, n < m \u2192 \u03c6 n < \u03c6 m\r\n\r\nnotation `|`x`|` := abs x\r\n\r\ndef limite (u : \u2115 \u2192 \u211d) (a : \u211d) :=\r\n  \u2200 \u03b5 > 0, \u2203 N, \u2200 k \u2265 N, |u k - a| < \u03b5\r\n\r\ndef convergente (u : \u2115 \u2192 \u211d) :=\r\n  \u2203 a, limite u a\r\n\r\ndef punto_acumulacion (u : \u2115 \u2192 \u211d) (a : \u211d) :=\r\n  \u2203 \u03c6, extraccion \u03c6 \u2227 limite (u \u2218 \u03c6) a\r\n\r\nexample\r\n  (hu : convergente u)\r\n  (ha : punto_acumulacion u a)\r\n  : limite u a :=\r\nsorry\r\n<\/pre>\n<p>[expand title=\"Soluciones con Lean\"]<\/p>\n<pre lang=\"lean\">\r\nimport data.real.basic\r\nopen nat\r\n\r\nvariable  {u : \u2115 \u2192 \u211d}\r\nvariables {a : \u211d}\r\n\r\ndef extraccion (\u03c6 : \u2115 \u2192 \u2115) :=\r\n  \u2200 n m, n < m \u2192 \u03c6 n < \u03c6 m\r\n\r\nnotation `|`x`|` := abs x\r\n\r\ndef limite (u : \u2115 \u2192 \u211d) (a : \u211d) :=\r\n  \u2200 \u03b5 > 0, \u2203 N, \u2200 k \u2265 N, |u k - a| < \u03b5\r\n\r\ndef convergente (u : \u2115 \u2192 \u211d) :=\r\n  \u2203 a, limite u a\r\n\r\ndef punto_acumulacion (u : \u2115 \u2192 \u211d) (a : \u211d) :=\r\n  \u2203 \u03c6, extraccion \u03c6 \u2227 limite (u \u2218 \u03c6) a\r\n\r\n-- Lemas auxiliares\r\n-- ================\r\n\r\nlemma unicidad_limite_aux\r\n  {a b: \u211d}\r\n  (ha : limite u a)\r\n  (hb : limite u b)\r\n  : b \u2264 a :=\r\nbegin\r\n  by_contra h,\r\n  set \u03b5 := b - a with h\u03b5,\r\n  cases ha (\u03b5\/2) (by linarith) with A hA,\r\n  cases hb (\u03b5\/2) (by linarith) with B hB,\r\n  set N := max A B with hN,\r\n  have hAN : A \u2264 N := le_max_left A B,\r\n  have hBN : B \u2264 N := le_max_right A B,\r\n  specialize hA N hAN,\r\n  specialize hB N hBN,\r\n  rw abs_lt at hA hB,\r\n  linarith,\r\nend\r\n\r\nlemma unicidad_limite\r\n  {a b: \u211d}\r\n  (ha : limite u a)\r\n  (hb : limite u b)\r\n  : a = b :=\r\nle_antisymm (unicidad_limite_aux hb ha)\r\n            (unicidad_limite_aux ha hb)\r\n\r\nlemma limite_subsucesion_aux\r\n  {\u03c6 : \u2115 \u2192 \u2115}\r\n  (h : extraccion \u03c6)\r\n  : \u2200 n, n \u2264 \u03c6 n :=\r\nbegin\r\n  intro n,\r\n  induction n with m HI,\r\n  { exact nat.zero_le (\u03c6 0), },\r\n  { apply nat.succ_le_of_lt,\r\n    calc m \u2264 \u03c6 m        : HI\r\n       ... < \u03c6 (succ m) : h m (m+1) (lt_add_one m), },\r\nend\r\n\r\nlemma limite_subsucesion\r\n  {\u03c6 : \u2115 \u2192 \u2115}\r\n  {a : \u211d}\r\n  (h : limite u a)\r\n  (h\u03c6 : extraccion \u03c6)\r\n  : limite (u \u2218 \u03c6) a :=\r\nbegin\r\n  intros \u03b5 h\u03b5,\r\n  cases h \u03b5 h\u03b5 with N hN,\r\n  use N,\r\n  intros k hk,\r\n  calc |(u \u2218 \u03c6) k - a|\r\n       = |u (\u03c6 k) - a| : rfl\r\n   ... < \u03b5             : hN (\u03c6 k) _,\r\n  calc \u03c6 k\r\n       \u2265 k : limite_subsucesion_aux h\u03c6 k\r\n   ... \u2265 N : hk,\r\nend\r\n\r\n-- 1\u00aa demostraci\u00f3n\r\nexample\r\n  (hu : convergente u)\r\n  (ha : punto_acumulacion u a)\r\n  : limite u a :=\r\nbegin\r\n  unfold convergente at hu,\r\n  cases hu with b hb,\r\n  convert hb,\r\n  unfold punto_acumulacion at ha,\r\n  rcases ha with \u27e8\u03c6, h\u03c6\u2081, h\u03c6\u2082\u27e9,\r\n  have h\u03c6\u2083 : limite (u \u2218 \u03c6) b,\r\n    from limite_subsucesion hb h\u03c6\u2081,\r\n  exact unicidad_limite h\u03c6\u2082 h\u03c6\u2083,\r\nend\r\n\r\n-- 1\u00aa demostraci\u00f3n\r\nexample\r\n  (hu : convergente u)\r\n  (ha : punto_acumulacion u a)\r\n  : limite u a :=\r\nbegin\r\n  cases hu with b hb,\r\n  convert hb,\r\n  rcases ha with \u27e8\u03c6, h\u03c6\u2081, h\u03c6\u2082\u27e9,\r\n  apply unicidad_limite h\u03c6\u2082 _,\r\n  exact limite_subsucesion hb h\u03c6\u2081,\r\nend\r\n\r\n-- 2\u00aa demostraci\u00f3n\r\nexample\r\n  (hu : convergente u)\r\n  (ha : punto_acumulacion u a)\r\n  : limite u a :=\r\nbegin\r\n  cases hu with b hb,\r\n  convert hb,\r\n  rcases ha with \u27e8\u03c6, h\u03c6\u2081, h\u03c6\u2082\u27e9,\r\n  exact unicidad_limite h\u03c6\u2082 (limite_subsucesion hb h\u03c6\u2081),\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\/El_punto_de_acumulacion_de_las_sucesiones_convergente_es_su_limite.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 El_punto_de_acumulacion_de_las_sucesiones_convergente_es_su_limite\r\nimports Main HOL.Real\r\nbegin\r\n\r\ndefinition extraccion :: \"(nat \u21d2 nat) \u21d2 bool\" where\r\n  \"extraccion \u03c6 \u27f7 (\u2200 n m. n < m \u27f6 \u03c6 n < \u03c6 m)\"\r\n\r\ndefinition subsucesion :: \"(nat \u21d2 real) \u21d2 (nat \u21d2 real) \u21d2 bool\"\r\n  where \"subsucesion v u \u27f7 (\u2203 \u03c6. extraccion \u03c6 \u2227 v = u \u2218 \u03c6)\"\r\n\r\ndefinition limite :: \"(nat \u21d2 real) \u21d2 real \u21d2 bool\" where\r\n  \"limite u c \u27f7 (\u2200\u03b5>0. \u2203k. \u2200n\u2265k. \u00a6u n - c\u00a6 < \u03b5)\"\r\n\r\ndefinition convergente :: \"(nat \u21d2 real) \u21d2 bool\" where\r\n  \"convergente u \u27f7 (\u2203 a. limite u a)\"\r\n\r\ndefinition punto_acumulacion :: \"(nat \u21d2 real) \u21d2 real \u21d2 bool\"\r\n  where \"punto_acumulacion u a \u27f7 (\u2203\u03c6. extraccion \u03c6 \u2227 limite (u \u2218 \u03c6) a)\"\r\n\r\n(* Lemas auxiliares *)\r\n\r\nlemma unicidad_limite_aux :\r\n  assumes \"limite u a\"\r\n          \"limite u b\"\r\n  shows   \"b \u2264 a\"\r\nproof (rule ccontr)\r\n  assume \"\u00ac b \u2264 a\"\r\n  let ?\u03b5 = \"b - a\"\r\n  have \"0 < ?\u03b5\/2\"\r\n    using \u2039\u00ac b \u2264 a\u203a by auto\r\n  obtain A where hA : \"\u2200n\u2265A. \u00a6u n - a\u00a6 < ?\u03b5\/2\"\r\n    using assms(1) limite_def \u20390 < ?\u03b5\/2\u203a by blast\r\n  obtain B where hB : \"\u2200n\u2265B. \u00a6u n - b\u00a6 < ?\u03b5\/2\"\r\n    using assms(2) limite_def \u20390 < ?\u03b5\/2\u203a by blast\r\n  let ?C = \"max A B\"\r\n  have hCa : \"\u2200n\u2265?C. \u00a6u n - a\u00a6 < ?\u03b5\/2\"\r\n    using hA by simp\r\n  have hCb : \"\u2200n\u2265?C. \u00a6u n - b\u00a6 < ?\u03b5\/2\"\r\n    using hB by simp\r\n  have \"\u2200n\u2265?C. \u00a6a - b\u00a6 < ?\u03b5\"\r\n  proof (intro allI impI)\r\n    fix n assume \"n \u2265 ?C\"\r\n    have \"\u00a6a - b\u00a6 = \u00a6(a - u n) + (u n - b)\u00a6\" by simp\r\n    also have \"\u2026 \u2264 \u00a6u n - a\u00a6 + \u00a6u n - b\u00a6\" by simp\r\n    finally show \"\u00a6a - b\u00a6 < b - a\"\r\n      using hCa hCb \u2039n \u2265 ?C\u203a by fastforce\r\n  qed\r\n  then show False by fastforce\r\nqed\r\n\r\nlemma unicidad_limite :\r\n  assumes \"limite u a\"\r\n          \"limite u b\"\r\n  shows   \"a = b\"\r\nproof (rule antisym)\r\n  show \"a \u2264 b\" using assms(2) assms(1)\r\n    by (rule unicidad_limite_aux)\r\nnext\r\n  show \"b \u2264 a\" using assms(1) assms(2)\r\n    by (rule unicidad_limite_aux)\r\nqed\r\n\r\nlemma limite_subsucesion_aux :\r\n  assumes \"extraccion \u03c6\"\r\n  shows   \"n \u2264 \u03c6 n\"\r\nproof (induct n)\r\n  show \"0 \u2264 \u03c6 0\" by simp\r\nnext\r\n  fix n assume HI : \"n \u2264 \u03c6 n\"\r\n  then show \"Suc n \u2264 \u03c6 (Suc n)\"\r\n    using assms extraccion_def\r\n    by (metis Suc_leI lessI order_le_less_subst1)\r\nqed\r\n\r\nlemma limite_subsucesion :\r\n  assumes \"subsucesion v u\"\r\n          \"limite u a\"\r\n  shows   \"limite v a\"\r\nproof (unfold limite_def; intro allI impI)\r\n  fix \u03b5 :: real\r\n  assume \"\u03b5 > 0\"\r\n  then obtain N where hN : \"\u2200k\u2265N. \u00a6u k - a\u00a6 < \u03b5\"\r\n    using assms(2) limite_def by auto\r\n  obtain \u03c6 where h\u03c61 : \"extraccion \u03c6\" and h\u03c62 : \"v = u \u2218 \u03c6\"\r\n    using assms(1) subsucesion_def by auto\r\n  have \"\u2200k\u2265N. \u00a6v k - a\u00a6 < \u03b5\"\r\n  proof (intro allI impI)\r\n    fix k\r\n    assume \"N \u2264 k\"\r\n    also have \"... \u2264 \u03c6 k\"\r\n      by (simp add: limite_subsucesion_aux h\u03c61)\r\n    finally have \"N \u2264 \u03c6 k\" .\r\n    have \"\u00a6v k - a\u00a6 = \u00a6u (\u03c6 k) - a\u00a6\"\r\n      using h\u03c62 by simp\r\n    also have \"\u2026 < \u03b5\"\r\n      using hN \u2039N \u2264 \u03c6 k\u203a by simp\r\n    finally show \"\u00a6v k - a\u00a6 < \u03b5\" .\r\n  qed\r\n  then show \"\u2203N. \u2200k\u2265N. \u00a6v k - a\u00a6 < \u03b5\"\r\n    by auto\r\nqed\r\n\r\n(* Demostraci\u00f3n *)\r\nlemma\r\n  assumes \"convergente u\"\r\n          \"punto_acumulacion u a\"\r\n  shows   \"limite u a\"\r\nproof -\r\n  obtain b where hb : \"limite u b\"\r\n    using assms(1) convergente_def by auto\r\n  obtain \u03c6 where h\u03c61 : \"extraccion \u03c6\" and\r\n                 h\u03c62 : \"limite (u \u2218 \u03c6) a\"\r\n    using assms(2) punto_acumulacion_def  by auto\r\n  have \"limite (u \u2218 \u03c6) b\"\r\n    using h\u03c61 hb limite_subsucesion subsucesion_def by blast\r\n  with h\u03c62 have \"a = b\"\r\n    by (rule unicidad_limite)\r\n  then show \"limite u a\"\r\n    using hb by simp\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>Para extraer una subsucesi\u00f3n se aplica una funci\u00f3n de extracci\u00f3n que conserva el orden; por ejemplo, la subsucesi\u00f3n u\u2092, u\u2082, u\u2084, u\u2086, &#8230; se ha obtenido con la funci\u00f3n de extracci\u00f3n \u03c6 tal que \u03c6(n) = 2*n. En Lean, se puede definir que \u03c6 es una funci\u00f3n de extracci\u00f3n por def extraccion (\u03c6 : \u2115 \u2192 \u2115) := \u2200 n m, n < m \u2192 \u03c6 n < \u03c6 m que a es un l\u00edmite de u por def limite (u : \u2115 \u2192 \u211d) (a : \u211d) := \u2200 \u03b5 > 0, \u2203 N, \u2200 k \u2265 N, |u k &#8211; a| < \u03b5 que u es convergente por def convergente (u : \u2115 \u2192 \u211d) := \u2203 a, limite u a que a...\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":[90,200,77,92,199,133,91,177,115,179,60,190,51,100,180,114,197,109,119,198,80,69,49,169,43,63,110,183,182,89,173,171,170,45,147,111,196,187,46],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/726"}],"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=726"}],"version-history":[{"count":1,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/726\/revisions"}],"predecessor-version":[{"id":727,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/posts\/726\/revisions\/727"}],"wp:attachment":[{"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/media?parent=726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/categories?post=726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.glc.us.es\/~jalonso\/calculemus\/wp-json\/wp\/v2\/tags?post=726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}