-
Notifications
You must be signed in to change notification settings - Fork 0
/
Limite_cuando_se_suma_una_constante.thy
55 lines (47 loc) · 2.1 KB
/
Limite_cuando_se_suma_una_constante.thy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
(* Limite_cuando_se_suma_una_constante.thy
-- Límite con suma de constante
-- José A. Alonso Jiménez
-- Sevilla, 13 de julio de 2021
-- ------------------------------------------------------------------ *)
(* ---------------------------------------------------------------------
-- En Isabelle/HOL, una sucesión u₀, u₁, u₂, ... se puede representar
-- mediante una función (u : \<nat> \<rightarrow> \<real>) de forma que u(n) es uₙ.
--
-- Se define que a es el límite de la sucesión u, por
-- definition limite :: "(nat \<Rightarrow> real) \<Rightarrow> real \<Rightarrow> bool"
-- where "limite u c \<longleftrightarrow> (\<forall>\<epsilon>>0. \<exists>k::nat. \<forall>n\<ge>k. \<bar>u n - c\<bar> < \<epsilon>)"
--
-- Demostrar que si el límite de la sucesión u(i) es a y c \<in> \<real>,
-- entonces el límite de u(i)+c es a+c.
-- ------------------------------------------------------------------ *)
theory Limite_cuando_se_suma_una_constante
imports Main HOL.Real
begin
definition limite :: "(nat \<Rightarrow> real) \<Rightarrow> real \<Rightarrow> bool"
where "limite u c \<longleftrightarrow> (\<forall>\<epsilon>>0. \<exists>k::nat. \<forall>n\<ge>k. \<bar>u n - c\<bar> < \<epsilon>)"
(* 1\<ordfeminine> demostración *)
lemma
assumes "limite u a"
shows "limite (\<lambda> i. u i + c) (a + c)"
proof (unfold limite_def)
show "\<forall>\<epsilon>>0. \<exists>k. \<forall>n\<ge>k. \<bar>(u n + c) - (a + c)\<bar> < \<epsilon>"
proof (intro allI impI)
fix \<epsilon> :: real
assume "0 < \<epsilon>"
then have "\<exists>k. \<forall>n\<ge>k. \<bar>u n - a\<bar> < \<epsilon>"
using assms limite_def by simp
then obtain k where "\<forall>n\<ge>k. \<bar>u n - a\<bar> < \<epsilon>"
by (rule exE)
then have "\<forall>n\<ge>k. \<bar>(u n + c) - (a + c)\<bar> < \<epsilon>"
by simp
then show "\<exists>k. \<forall>n\<ge>k. \<bar>(u n + c) - (a + c)\<bar> < \<epsilon>"
by (rule exI)
qed
qed
(* 2\<ordfeminine> demostración *)
lemma
assumes "limite u a"
shows "limite (\<lambda> i. u i + c) (a + c)"
using assms limite_def
by simp
end