-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCS_de_acotada_superiormente.lean
More file actions
70 lines (56 loc) · 1.7 KB
/
CS_de_acotada_superiormente.lean
File metadata and controls
70 lines (56 loc) · 1.7 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
-- CS_de_acotada_superiormente.lean
-- Si ¬(∀a)(∃x)[f(x) > a], entonces f está acotada superiormente.
-- José A. Alonso Jiménez <https://jaalonso.github.io>
-- Sevilla, 6-diciembre-2023
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Demostrar que si ¬(∀a)(∃x)[f(x) > a], entonces f está acotada
-- superiormente.
-- ----------------------------------------------------------------------
-- Demostración en lenguaje natural
-- ================================
-- Tenemos que demostrar que f es acotada superiormente; es decir, que
-- (∃a)(∀x)[f(x) ≤ a]
-- que es exactamente la fórmula obtenida interiorizando la negación en
-- la hipótesis.
-- Demostraciones con Lean4
-- ========================
import Mathlib.Data.Real.Basic
def CotaSuperior (f : ℝ → ℝ) (a : ℝ) : Prop :=
∀ x, f x ≤ a
def acotadaSup (f : ℝ → ℝ) :=
∃ a, CotaSuperior f a
variable (f : ℝ → ℝ)
-- 1ª demostración
-- ===============
example
(h : ¬∀ a, ∃ x, f x > a)
: acotadaSup f :=
by
unfold acotadaSup
-- ⊢ ∃ a, CotaSuperior f a
unfold CotaSuperior
-- ⊢ ∃ a, ∀ (x : ℝ), f x ≤ a
push Not at h
-- h : ∃ a, ∀ (x : ℝ), f x ≤ a
exact h
-- 2ª demostración
-- ===============
example
(h : ¬∀ a, ∃ x, f x > a)
: acotadaSup f :=
by
unfold acotadaSup CotaSuperior
-- ⊢ ∃ a, ∀ (x : ℝ), f x ≤ a
push Not at h
-- h : ∃ a, ∀ (x : ℝ), f x ≤ a
exact h
-- 3ª demostración
-- ===============
example
(h : ¬∀ a, ∃ x, f x > a)
: acotadaSup f :=
by
push Not at h
-- h : ∃ a, ∀ (x : ℝ), f x ≤ a
exact h