(* Unicidad_del_limite_de_las_sucesiones_convergentes.thy -- Unicidad del límite de las sucesiones convergentes -- José A. Alonso Jiménez -- Sevilla, 12 de julio de 2021 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- En Isabelle/HOL, una sucesión u₀, u₁, u₂, ... se puede representar -- mediante una función (u : \ \ \) de forma que u(n) es uₙ. -- -- Se define que a es el límite de la sucesión u, por -- definition limite :: "(nat \ real) \ real \ bool" -- where "limite u c \ (\\>0. \k::nat. \n\k. \u n - c\ < \)" -- -- Demostrar que cada sucesión tiene como máximoun límite. -- ------------------------------------------------------------------ *) theory Unicidad_del_limite_de_las_sucesiones_convergentes imports Main HOL.Real begin definition limite :: "(nat \ real) \ real \ bool" where "limite u c \ (\\>0. \k::nat. \n\k. \u n - c\ < \)" lemma aux : assumes "limite u a" "limite u b" shows "b \ a" proof (rule ccontr) assume "\ b \ a" let ?\ = "b - a" have "0 < ?\/2" using \\ b \ a\ by auto obtain A where hA : "\n\A. \u n - a\ < ?\/2" using assms(1) limite_def \0 < ?\/2\ by blast obtain B where hB : "\n\B. \u n - b\ < ?\/2" using assms(2) limite_def \0 < ?\/2\ by blast let ?C = "max A B" have hCa : "\n\?C. \u n - a\ < ?\/2" using hA by simp have hCb : "\n\?C. \u n - b\ < ?\/2" using hB by simp have "\n\?C. \a - b\ < ?\" proof (intro allI impI) fix n assume "n \ ?C" have "\a - b\ = \(a - u n) + (u n - b)\" by simp also have "\ \ \u n - a\ + \u n - b\" by simp finally show "\a - b\ < b - a" using hCa hCb \n \ ?C\ by fastforce qed then show False by fastforce qed theorem assumes "limite u a" "limite u b" shows "a = b" proof (rule antisym) show "a \ b" using assms(2) assms(1) by (rule aux) next show "b \ a" using assms(1) assms(2) by (rule aux) qed end