(* CS_de_continuidad.thy Si f es continua en a y el límite de u(n) es a, entonces el límite de f(u(n)) es f(a) -- José A. Alonso Jiménez -- Sevilla, 4-septiembre-2024 -- ------------------------------------------------------------------ *) (* --------------------------------------------------------------------- -- En Isabelle/HOL, se puede definir que a es el límite de la sucesión u -- por -- definition limite :: "(nat \ real) \ real \ bool" where -- "limite u c \ (\\>0. \k. \n\k. \u n - c\ \ \)" -- y que f es continua en a por -- definition continua_en :: "(real \ real) \ real \ bool" where -- "continua_en f a \ -- (\\>0. \\>0. \x. \x - a\ \ \ \ \f x - f a\ \ \)" -- -- Demostrar que si f es continua en a y el límite de u(n) es a, -- entonces el límite de f(u(n)) es f(a). -- ------------------------------------------------------------------ *) theory CS_de_continuidad imports Main HOL.Real begin definition limite :: "(nat \ real) \ real \ bool" where "limite u c \ (\\>0. \k. \n\k. \u n - c\ \ \)" definition continua_en :: "(real \ real) \ real \ bool" where "continua_en f a \ (\\>0. \\>0. \x. \x - a\ \ \ \ \f x - f a\ \ \)" (* 1\ demostración *) lemma assumes "continua_en f a" "limite u a" shows "limite (f \ u) (f a)" proof (unfold limite_def; intro allI impI) fix \ :: real assume "0 < \" then obtain \ where h\1 : "\ > 0" and h\2 :" (\x. \x - a\ \ \ \ \f x - f a\ \ \)" using assms(1) continua_en_def by auto obtain k where hk : "\n\k. \u n - a\ \ \" using assms(2) limite_def h\1 by auto have "\n\k. \(f \ u) n - f a\ \ \" proof (intro allI impI) fix n assume "n \ k" then have "\u n - a\ \ \" using hk by auto then show "\(f \ u) n - f a\ \ \" using h\2 by simp qed then show "\k. \n\k. \(f \ u) n - f a\ \ \" by auto qed (* 2\ demostración *) lemma assumes "continua_en f a" "limite u a" shows "limite (f \ u) (f a)" proof (unfold limite_def; intro allI impI) fix \ :: real assume "0 < \" then obtain \ where h\1 : "\ > 0" and h\2 :" (\x. \x - a\ \ \ \ \f x - f a\ \ \)" using assms(1) continua_en_def by auto obtain k where hk : "\n\k. \u n - a\ \ \" using assms(2) limite_def h\1 by auto have "\n\k. \(f \ u) n - f a\ \ \" using hk h\2 by simp then show "\k. \n\k. \(f \ u) n - f a\ \ \" by auto qed (* 3\ demostración *) lemma assumes "continua_en f a" "limite u a" shows "limite (f \ u) (f a)" proof (unfold limite_def; intro allI impI) fix \ :: real assume "0 < \" then obtain \ where h\1 : "\ > 0" and h\2 :" (\x. \x - a\ \ \ \ \f x - f a\ \ \)" using assms(1) continua_en_def by auto obtain k where hk : "\n\k. \u n - a\ \ \" using assms(2) limite_def h\1 by auto then show "\k. \n\k. \(f \ u) n - f a\ \ \" using hk h\2 by auto qed (* 4\ demostración *) lemma assumes "continua_en f a" "limite u a" shows "limite (f \ u) (f a)" proof (unfold limite_def; intro allI impI) fix \ :: real assume "0 < \" then obtain \ where h\ : "\ > 0 \ (\x. \x - a\ \ \ \ \f x - f a\ \ \)" using assms(1) continua_en_def by auto then obtain k where "\n\k. \u n - a\ \ \" using assms(2) limite_def by auto then show "\k. \n\k. \(f \ u) n - f a\ \ \" using h\ by auto qed (* 5\ demostración *) lemma assumes "continua_en f a" "limite u a" shows "limite (f \ u) (f a)" using assms continua_en_def limite_def by force end