(* Producto_de_sucesiones_convergentes_a_cero.lean -- Producto de sucesiones convergentes a cero -- José A. Alonso Jiménez -- Sevilla, 17 de febrero de 2024 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- 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 si las sucesiones u(n) y v(n) convergen a cero, -- entonces u(n)\v(n) también converge a cero. -- ------------------------------------------------------------------ *) theory Producto_de_sucesiones_convergentes_a_cero imports Main HOL.Real begin definition limite :: "(nat \ real) \ real \ bool" where "limite u c \ (\\>0. \k::nat. \n\k. \u n - c\ < \)" lemma assumes "limite u 0" "limite v 0" shows "limite (\ n. u n * v n) 0" proof (unfold limite_def; intro allI impI) fix \ :: real assume h\ : "0 < \" then obtain U where hU : "\n\U. \u n - 0\ < \" using assms(1) limite_def by auto obtain V where hV : "\n\V. \v n - 0\ < 1" using h\ assms(2) limite_def by fastforce have "\n\max U V. \u n * v n - 0\ < \" proof (intro allI impI) fix n assume hn : "max U V \ n" then have "U \ n" by simp then have "\u n - 0\ < \" using hU by blast have hnV : "V \ n" using hn by simp then have "\v n - 0\ < 1" using hV by blast have "\u n * v n - 0\ = \(u n - 0) * (v n - 0)\" by simp also have "\ = \u n - 0\ * \v n - 0\" by (simp add: abs_mult) also have "\ < \ * 1" using \\u n - 0\ < \\ \\v n - 0\ < 1\ by (rule abs_mult_less) also have "\ = \" by simp finally show "\u n * v n - 0\ < \" by this qed then show "\k. \n\k. \u n * v n - 0\ < \" by (rule exI) qed end