-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntre_2_y_3.lean
57 lines (44 loc) · 1.2 KB
/
Entre_2_y_3.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
-- Entre_2_y_3.lean
-- (∃x ∈ ℝ)[2 < x < 3]
-- José A. Alonso Jiménez <https://jaalonso.github.io>
-- Sevilla, 14-diciembre-2023
-- ---------------------------------------------------------------------
-- ---------------------------------------------------------------------
-- Demostrar que (∃x ∈ ℝ)[2 < x < 3]
-- ---------------------------------------------------------------------
-- Demostración en lenguaje natural
-- ================================
-- Podemos usar el número 5/2 y comprobar que 2 < 5/2 < 3.
-- Demostraciones con Lean4
-- ========================
import Mathlib.Data.Real.Basic
import Mathlib.Tactic
-- 1ª demostración
-- ===============
example : ∃ x : ℝ, 2 < x ∧ x < 3 :=
by
use 5 / 2
show 2 < 5 / 2 ∧ 5 / 2 < 3
constructor
. show 2 < 5 / 2
norm_num
. show 5 / 2 < 3
norm_num
-- 2ª demostración
-- ===============
example : ∃ x : ℝ, 2 < x ∧ x < 3 :=
by
use 5 / 2
constructor
. norm_num
. norm_num
-- 3ª demostración
-- ===============
example : ∃ x : ℝ, 2 < x ∧ x < 3 :=
by
use 5 / 2
constructor <;> norm_num
-- 4ª demostración
-- ===============
example : ∃ x : ℝ, 2 < x ∧ x < 3 :=
⟨5/2, by norm_num⟩