-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPropiedades_distributivas.lean
42 lines (37 loc) · 1.78 KB
/
Propiedades_distributivas.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
-- ---------------------------------------------------------------------
-- Ejercicio 1. Realizar las siguientes acciones
-- 1. Importar la teoría de retículos.
-- 2. Declarar α como un tipo sobre retículos
-- 3. Declarar a, b y c como variabkes sobre α
-- ----------------------------------------------------------------------
import order.lattice -- 1
variables {α : Type*} [lattice α] -- 2
variables a b c : α -- 3
-- ---------------------------------------------------------------------
-- Ejercicio 2. Demostrar que si
-- ∀ x y z : α, x ⊓ (y ⊔ z) = (x ⊓ y) ⊔ (x ⊓ z))
-- entonces
-- (a ⊔ b) ⊓ c = (a ⊓ c) ⊔ (b ⊓ c)
-- ----------------------------------------------------------------------
example
(h : ∀ x y z : α, x ⊓ (y ⊔ z) = (x ⊓ y) ⊔ (x ⊓ z))
: (a ⊔ b) ⊓ c = (a ⊓ c) ⊔ (b ⊓ c) :=
calc
(a ⊔ b) ⊓ c = c ⊓ (a ⊔ b) : by rw inf_comm
... = (c ⊓ a) ⊔ (c ⊓ b) : by rw h
... = (a ⊓ c) ⊔ (c ⊓ b) : by rw [@inf_comm _ _ c a]
... = (a ⊓ c) ⊔ (b ⊓ c) : by rw [@inf_comm _ _ c b]
-- ---------------------------------------------------------------------
-- Ejercicio 3. Demostrar que si
-- ∀ x y z : α, x ⊔ (y ⊓ z) = (x ⊔ y) ⊓ (x ⊔ z)
-- entonces
-- (a ⊓ b) ⊔ c = (a ⊔ c) ⊓ (b ⊔ c)
-- ----------------------------------------------------------------------
example
(h : ∀ x y z : α, x ⊔ (y ⊓ z) = (x ⊔ y) ⊓ (x ⊔ z))
: (a ⊓ b) ⊔ c = (a ⊔ c) ⊓ (b ⊔ c) :=
calc
(a ⊓ b) ⊔ c = c ⊔ (a ⊓ b) : by rw sup_comm
... = (c ⊔ a) ⊓ (c ⊔ b) : by rw h
... = (a ⊔ c) ⊓ (c ⊔ b) : by rw [@sup_comm _ _ c a]
... = (a ⊔ c) ⊓ (b ⊔ c) : by rw [@sup_comm _ _ c b]