-
Notifications
You must be signed in to change notification settings - Fork 1
/
Leyes_de_absorcion.lean
151 lines (127 loc) · 3.41 KB
/
Leyes_de_absorcion.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
-- ---------------------------------------------------------------------
-- Ejercicio 1. Realizar las siguientes acciones
-- 1. Importar la teoría de retículos.
-- 2. Declarar α como un tipo sobre retículos
-- 3. Declarar x e y como variabkes sobre α
-- ----------------------------------------------------------------------
import order.lattice -- 1
variables {α : Type*} [lattice α] -- 2
variables x y : α -- 3
-- ---------------------------------------------------------------------
-- Ejercicio 2. Demostrar que
-- x ⊓ (x ⊔ y) = x
-- ---------------------------------------------------------------------
-- 1ª demostración
-- ===============
example : x ⊓ (x ⊔ y) = x :=
begin
have h1 : x ⊓ (x ⊔ y) ≤ x, finish,
have h2 : x ≤ x ⊓ (x ⊔ y), finish,
show x ⊓ (x ⊔ y) = x,
by exact le_antisymm h1 h2,
end
-- 2ª demostración
-- ===============
example : x ⊓ (x ⊔ y) = x :=
begin
have h1 : x ⊓ (x ⊔ y) ≤ x := inf_le_left,
have h2 : x ≤ x ⊓ (x ⊔ y),
{ have h2a : x ≤ x := rfl.ge,
have h2b : x ≤ x ⊔ y := le_sup_left,
show x ≤ x ⊓ (x ⊔ y),
by exact le_inf h2a h2b, },
show x ⊓ (x ⊔ y) = x,
by exact le_antisymm h1 h2,
end
-- 3ª demostración
-- ===============
example : x ⊓ (x ⊔ y) = x :=
begin
apply le_antisymm,
{ apply inf_le_left },
{ apply le_inf,
{ apply le_refl },
{ apply le_sup_left }},
end
-- Su desarrollo es
--
-- ⊢ x ⊓ (x ⊔ y) = x
-- apply le_antisymm,
-- | ⊢ x ⊓ (x ⊔ y) ≤ x
-- | | { apply inf_le_left },
-- | ⊢ x ≤ x ⊓ (x ⊔ y)
-- | { apply le_inf,
-- | | ⊢ x ≤ x
-- | | { apply le_refl },
-- | | ⊢ x ≤ x ⊔ y
-- | | { apply le_sup_left }},
-- no goals
-- 4ª demostración
example : x ⊓ (x ⊔ y) = x :=
-- by library_search
inf_sup_self
-- 5ª demostración
-- ===============
example : x ⊓ (x ⊔ y) = x :=
-- by hint
by simp
-- ---------------------------------------------------------------------
-- Ejercicio 3. Demostrar que
-- x ⊔ (x ⊓ y) = x
-- ---------------------------------------------------------------------
-- 1ª demostración
-- ===============
example : x ⊔ (x ⊓ y) = x :=
begin
have h1 : x ⊔ (x ⊓ y) ≤ x, finish,
have h2 : x ≤ x ⊔ (x ⊓ y), finish,
show x ⊔ (x ⊓ y) = x,
by exact le_antisymm h1 h2,
end
-- 2ª demostración
-- ===============
example : x ⊔ (x ⊓ y) = x :=
begin
have h1 : x ⊔ (x ⊓ y) ≤ x,
{ have h1a : x ≤ x := le_rfl,
have h1b : x ⊓ y ≤ x := inf_le_left,
show x ⊔ (x ⊓ y) ≤ x,
by exact sup_le h1a h1b,
},
have h2 : x ≤ x ⊔ (x ⊓ y) := le_sup_left,
show x ⊔ (x ⊓ y) = x,
by exact le_antisymm h1 h2,
end
-- 3ª demostración
-- ===============
example : x ⊔ (x ⊓ y) = x :=
begin
apply le_antisymm,
{ apply sup_le,
{ apply le_refl },
{ apply inf_le_left }},
{ apply le_sup_left },
end
-- Su desarrollo es
--
-- ⊢ x ⊔ x ⊓ y = x
-- apply le_antisymm,
-- | ⊢ x ⊔ x ⊓ y ≤ x
-- | { apply sup_le,
-- | | ⊢ x ≤ x
-- | | { apply le_refl },
-- | | ⊢ x ⊓ y ≤ x
-- | | { apply inf_le_left }},
-- | ⊢ x ≤ x ⊔ x ⊓ y
-- | | { apply le_sup_left },
-- no goals
-- 4ª demostración
-- ===============
example : x ⊔ (x ⊓ y) = x :=
-- by library_search
sup_inf_self
-- 4ª demostración
-- ===============
example : x ⊔ (x ⊓ y) = x :=
-- by hint
by simp