-
Notifications
You must be signed in to change notification settings - Fork 0
/
Introduccion_de_la_disyuncion_1.lean
80 lines (64 loc) · 1.56 KB
/
Introduccion_de_la_disyuncion_1.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
-- Introduccion_de_la_disyuncion_1.lean
-- En ℝ, y > x^2 ⊢ y > 0 ∨ y < -1
-- José A. Alonso Jiménez <https://jaalonso.github.io>
-- Sevilla, 8-enero-2024
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Demostrar que si
-- y > x^2
-- entonces
-- y > 0 ∨ y < -1
-- ----------------------------------------------------------------------
-- Demostración en lenguaje natural
-- ================================
-- Puesto que
-- (∀ x ∈ ℝ)[x² ≥ 0]
-- se tiene que
-- y > x²
-- ≥ 0
-- Por tanto, y > 0 y, al verificar la primera 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)
: y > 0 ∨ y < -1 :=
by
have h1 : y > 0 := by
calc y > x^2 := h
_ ≥ 0 := pow_two_nonneg x
show y > 0 ∨ y < -1
exact Or.inl h1
-- 2ª demostración
-- ===============
example
(h : y > x^2)
: y > 0 ∨ y < -1 :=
by
left
-- ⊢ y > 0
calc y > x^2 := h
_ ≥ 0 := pow_two_nonneg x
-- 3ª demostración
-- ===============
example
(h : y > x^2)
: y > 0 ∨ y < -1 :=
by
left
-- ⊢ y > 0
linarith [pow_two_nonneg x]
-- 4ª demostración
-- ===============
example
(h : y > x^2)
: y > 0 ∨ y < -1 :=
by { left ; linarith [pow_two_nonneg x] }
-- Lema usado
-- ==========
-- #check (pow_two_nonneg x : 0 ≤ x ^ 2)