-
Notifications
You must be signed in to change notification settings - Fork 0
/
Introduccion_de_la_disyuncion_2.lean
106 lines (87 loc) · 2.56 KB
/
Introduccion_de_la_disyuncion_2.lean
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
-- Introduccion_de_la_disyuncion_2.lean
-- En ℝ, -y > x² + 1 ⊢ y > 0 ∨ y < -1.
-- José A. Alonso Jiménez <https://jaalonso.github.io>
-- Sevilla, 9-enero-2024
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Demostrar que si
-- -y > x^2 + 1
-- entonces
-- y > 0 ∨ y < -1
-- ----------------------------------------------------------------------
-- Demostración en lenguaje natural
-- ================================
-- Usaremos los siguientes lemas
-- (∀ b, c ∈ ℝ)[b ≤ c → ∀ (a : ℝ), b + a ≤ c + a)] (L1)
-- (∀ a ∈ ℝ)[0 ≤ a^2] (L2)
-- (∀ a ∈ ℝ)[0 + a = a] (L3)
-- (∀ a, b ∈ ℝ)[a < -b ↔ b < -a] (L4)
-- Se tiene
-- -y > x^2 + 1 [por la hipótesis]
-- ≥ 0 + 1 [por L1 y L2]
-- = 1 [por L3]
-- Por tanto,
-- -y > 1
-- y, aplicando el lema L4, se tiene
-- y < -1
-- Como se verifica la segunda parte de la diyunción, se verifica la
-- disyunción.
-- Demostraciones con Lean4
-- ========================
import Mathlib.Data.Real.Basic
import Mathlib.Tactic
variable {x y : ℝ}
-- 1ª demostración
-- ===============
example
(h : -y > x^2 + 1)
: y > 0 ∨ y < -1 :=
by
have h1 : -y > 1 := by
calc -y > x^2 + 1 := by exact h
_ ≥ 0 + 1 := add_le_add_right (pow_two_nonneg x) 1
_ = 1 := zero_add 1
have h2: y < -1 := lt_neg.mp h1
show y > 0 ∨ y < -1
exact Or.inr h2
-- 2ª demostración
-- ===============
example
(h : -y > x^2 + 1)
: y > 0 ∨ y < -1 :=
by
have h1 : -y > 1 := by linarith [pow_two_nonneg x]
have h2: y < -1 := lt_neg.mp h1
show y > 0 ∨ y < -1
exact Or.inr h2
-- 3ª demostración
-- ===============
example
(h : -y > x^2 + 1)
: y > 0 ∨ y < -1 :=
by
have h1: y < -1 := by linarith [pow_two_nonneg x]
show y > 0 ∨ y < -1
exact Or.inr h1
-- 4ª demostración
-- ===============
example
(h : -y > x^2 + 1)
: y > 0 ∨ y < -1 :=
by
right
-- ⊢ y < -1
linarith [pow_two_nonneg x]
-- 5ª demostración
-- ===============
example
(h : -y > x^2 + 1)
: y > 0 ∨ y < -1 :=
by { right ; linarith [pow_two_nonneg x] }
-- Lemas usados
-- ============
-- variable (a b c : ℝ)
-- #check (add_le_add_right : b ≤ c → ∀ (a : ℝ), b + a ≤ c + a)
-- #check (lt_neg : a < -b ↔ b < -a)
-- #check (pow_two_nonneg a : 0 ≤ a ^ 2)
-- #check (zero_add a : 0 + a = a)