Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 15ab89d

Browse files
committedFeb 20, 2024
s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u)
1 parent 8ca4fd7 commit 15ab89d

16 files changed

+2415
-1
lines changed
 

‎README.org

+2-1
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,5 @@ usaba Lean3 en lugar de Lean4.
188188
+ V16 [[./textos/El_limite_de_u_es_a_syss_el_de_u-a_es_0.md][El límite de u es a syss el de u-a es 0]] (En [[./src/El_limite_de_u_es_a_syss_el_de_u-a_es_0.lean][Lean]] y en [[./thy/El_limite_de_u_es_a_syss_el_de_u-a_es_0.thy][Isabelle]]).
189189
+ S17 [[./textos/Producto_de_sucesiones_convergentes_a_cero.md][Si uₙ y vₙ convergen a 0, entonces uₙvₙ converge a 0]] (En [[./src/Producto_de_sucesiones_convergentes_a_cero.lean][Lean]] y en [[./thy/Producto_de_sucesiones_convergentes_a_cero.thy][Isabelle]]).
190190
+ L19 [[~/alonso/estudio/Calculemus2/textos/Teorema_del_emparedado.md][Teorema del emparedado]] (En [[~/alonso/estudio/Calculemus2/src/Teorema_del_emparedado.lean][Lean]] y en [[~/alonso/estudio/Calculemus2/thy/Teorema_del_emparedado.thy][Isabelle]]).
191-
+ M20 [[./textos/Propiedad_de_monotonia_de_la_interseccion.md][Si s ⊆ t, entonces s ∩ u ⊆ t ∩ u.]] (En [[./src/Propiedad_de_monotonia_de_la_interseccion.lean][Lean]] y en [[./thy//Propiedad_de_monotonia_de_la_interseccion.thy][Isabelle]]).
191+
+ M20 [[./textos/Propiedad_de_monotonia_de_la_interseccion.md][Si s ⊆ t, entonces s ∩ u ⊆ t ∩ u]] (En [[./src/Propiedad_de_monotonia_de_la_interseccion.lean][Lean]] y en [[./thy//Propiedad_de_monotonia_de_la_interseccion.thy][Isabelle]]).
192+
+ X21 [[./textos/Propiedad_semidistributiva_de_la_interseccion_sobre_la_union.md][s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u)]] (En [[./src/Propiedad_semidistributiva_de_la_interseccion_sobre_la_union.lean][Lean]] y en [[./thy/Propiedad_semidistributiva_de_la_interseccion_sobre_la_union.thy][Isabelle]]).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
-- Propiedad_de_monotonia_de_la_interseccion.lean
2+
-- Si s ⊆ t, entonces s ∩ u ⊆ t ∩ u.
3+
-- José A. Alonso Jiménez <https://jaalonso.github.io>
4+
-- Sevilla, 20-febrero-2024
5+
-- ---------------------------------------------------------------------
6+
7+
-- ---------------------------------------------------------------------
8+
-- Demostrar que si
9+
-- s ⊆ t
10+
-- entonces
11+
-- s ∩ u ⊆ t ∩ u
12+
-- ----------------------------------------------------------------------
13+
14+
-- Demostración en lenguaje natural
15+
-- ================================
16+
17+
-- Sea x ∈ s ∩ u. Entonces, se tiene que
18+
-- x ∈ s (1)
19+
-- x ∈ u (2)
20+
-- De (1) y s ⊆ t, se tiene que
21+
-- x ∈ t (3)
22+
-- De (3) y (2) se tiene que
23+
-- x ∈ t ∩ u
24+
-- que es lo que teníamos que demostrar.
25+
26+
-- Demostraciones con Lean4
27+
-- ========================
28+
29+
import Mathlib.Data.Set.Basic
30+
import Mathlib.Tactic
31+
32+
open Set
33+
34+
variable {α : Type}
35+
variable (s t u : Set α)
36+
37+
-- 1ª demostración
38+
-- ===============
39+
40+
example
41+
(h : s ⊆ t)
42+
: s ∩ u ⊆ t ∩ u :=
43+
by
44+
rw [subset_def]
45+
-- ⊢ ∀ (x : α), x ∈ s ∩ u → x ∈ t ∩ u
46+
intros x h1
47+
-- x : α
48+
-- h1 : x ∈ s ∩ u
49+
-- ⊢ x ∈ t ∩ u
50+
rcases h1 with ⟨xs, xu⟩
51+
-- xs : x ∈ s
52+
-- xu : x ∈ u
53+
constructor
54+
. -- ⊢ x ∈ t
55+
rw [subset_def] at h
56+
-- h : ∀ (x : α), x ∈ s → x ∈ t
57+
apply h
58+
-- ⊢ x ∈ s
59+
exact xs
60+
. -- ⊢ x ∈ u
61+
exact xu
62+
63+
-- 2ª demostración
64+
-- ===============
65+
66+
example
67+
(h : s ⊆ t)
68+
: s ∩ u ⊆ t ∩ u :=
69+
by
70+
rw [subset_def]
71+
-- ⊢ ∀ (x : α), x ∈ s ∩ u → x ∈ t ∩ u
72+
rintro x ⟨xs, xu⟩
73+
-- x : α
74+
-- xs : x ∈ s
75+
-- xu : x ∈ u
76+
rw [subset_def] at h
77+
-- h : ∀ (x : α), x ∈ s → x ∈ t
78+
exact ⟨h x xs, xu⟩
79+
80+
-- 3ª demostración
81+
-- ===============
82+
83+
example
84+
(h : s ⊆ t)
85+
: s ∩ u ⊆ t ∩ u :=
86+
by
87+
simp only [subset_def]
88+
-- ⊢ ∀ (x : α), x ∈ s ∩ u → x ∈ t ∩ u
89+
rintro x ⟨xs, xu⟩
90+
-- x : α
91+
-- xs : x ∈ s
92+
-- xu : x ∈ u
93+
rw [subset_def] at h
94+
-- h : ∀ (x : α), x ∈ s → x ∈ t
95+
exact ⟨h _ xs, xu⟩
96+
97+
-- 4ª demostración
98+
-- ===============
99+
100+
example
101+
(h : s ⊆ t)
102+
: s ∩ u ⊆ t ∩ u :=
103+
by
104+
intros x xsu
105+
-- x : α
106+
-- xsu : x ∈ s ∩ u
107+
-- ⊢ x ∈ t ∩ u
108+
exact ⟨h xsu.1, xsu.2
109+
110+
-- 5ª demostración
111+
-- ===============
112+
113+
example
114+
(h : s ⊆ t)
115+
: s ∩ u ⊆ t ∩ u :=
116+
by
117+
rintro x ⟨xs, xu⟩
118+
-- xs : x ∈ s
119+
-- xu : x ∈ u
120+
-- ⊢ x ∈ t ∩ u
121+
exact ⟨h xs, xu⟩
122+
123+
-- 6ª demostración
124+
-- ===============
125+
126+
example
127+
(h : s ⊆ t)
128+
: s ∩ u ⊆ t ∩ u :=
129+
fun _ ⟨xs, xu⟩ ↦ ⟨h xs, xu⟩
130+
131+
-- 7ª demostración
132+
-- ===============
133+
134+
example
135+
(h : s ⊆ t)
136+
: s ∩ u ⊆ t ∩ u :=
137+
inter_subset_inter_left u h
138+
139+
-- Lema usado
140+
-- ==========
141+
142+
-- #check (inter_subset_inter_left u : s ⊆ t → s ∩ u ⊆ t ∩ u)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
-- Propiedad_semidistributiva_de_la_interseccion_sobre_la_union.lean
2+
-- s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u)
3+
-- José A. Alonso Jiménez <https://jaalonso.github.io>
4+
-- Sevilla, 21-febrero-2024
5+
-- ---------------------------------------------------------------------
6+
7+
-- ---------------------------------------------------------------------
8+
-- Demostrar que
9+
-- s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u)
10+
-- ----------------------------------------------------------------------
11+
12+
-- Demostración en lenguaje natural
13+
-- ================================
14+
15+
-- Sea x ∈ s ∩ (t ∪ u). Entonces se tiene que
16+
-- x ∈ s (1)
17+
-- x ∈ t ∪ u (2)
18+
-- La relación (2) da lugar a dos casos.
19+
--
20+
-- Caso 1: Supongamos que x ∈ t. Entonces, por (1), x ∈ s ∩ t y, por
21+
-- tanto, x ∈ (s ∩ t) ∪ (s ∩ u).
22+
--
23+
-- Caso 2: Supongamos que x ∈ u. Entonces, por (1), x ∈ s ∩ u y, por
24+
-- tanto, x ∈ (s ∩ t) ∪ (s ∩ u).
25+
26+
-- Demostraciones con Lean4
27+
-- ========================
28+
29+
import Mathlib.Data.Set.Basic
30+
import Mathlib.Tactic
31+
32+
open Set
33+
34+
variable {α : Type}
35+
variable (s t u : Set α)
36+
37+
-- 1ª demostración
38+
-- ===============
39+
40+
example :
41+
s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u) :=
42+
by
43+
intros x hx
44+
-- x : α
45+
-- hx : x ∈ s ∩ (t ∪ u)
46+
-- ⊢ x ∈ s ∩ t ∪ s ∩ u
47+
rcases hx with ⟨hxs, hxtu⟩
48+
-- hxs : x ∈ s
49+
-- hxtu : x ∈ t ∪ u
50+
rcases hxtu with (hxt | hxu)
51+
. -- hxt : x ∈ t
52+
left
53+
-- ⊢ x ∈ s ∩ t
54+
constructor
55+
. -- ⊢ x ∈ s
56+
exact hxs
57+
. -- hxt : x ∈ t
58+
exact hxt
59+
. -- hxu : x ∈ u
60+
right
61+
-- ⊢ x ∈ s ∩ u
62+
constructor
63+
. -- ⊢ x ∈ s
64+
exact hxs
65+
. -- ⊢ x ∈ u
66+
exact hxu
67+
68+
-- 2ª demostración
69+
-- ===============
70+
71+
example :
72+
s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u) :=
73+
by
74+
rintro x ⟨hxs, hxt | hxu⟩
75+
-- x : α
76+
-- hxs : x ∈ s
77+
-- ⊢ x ∈ s ∩ t ∪ s ∩ u
78+
. -- hxt : x ∈ t
79+
left
80+
-- ⊢ x ∈ s ∩ t
81+
exact ⟨hxs, hxt⟩
82+
. -- hxu : x ∈ u
83+
right
84+
-- ⊢ x ∈ s ∩ u
85+
exact ⟨hxs, hxu⟩
86+
87+
-- 3ª demostración
88+
-- ===============
89+
90+
example :
91+
s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u) :=
92+
by
93+
rintro x ⟨hxs, hxt | hxu⟩
94+
-- x : α
95+
-- hxs : x ∈ s
96+
-- ⊢ x ∈ s ∩ t ∪ s ∩ u
97+
. -- hxt : x ∈ t
98+
exact Or.inl ⟨hxs, hxt⟩
99+
. -- hxu : x ∈ u
100+
exact Or.inr ⟨hxs, hxu⟩
101+
102+
-- 4ª demostración
103+
-- ===============
104+
105+
example :
106+
s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u) :=
107+
by
108+
intro x hx
109+
-- x : α
110+
-- hx : x ∈ s ∩ (t ∪ u)
111+
-- ⊢ x ∈ s ∩ t ∪ s ∩ u
112+
aesop
113+
114+
-- 5ª demostración
115+
-- ===============
116+
117+
example :
118+
s ∩ (t ∪ u) ⊆ (s ∩ t) ∪ (s ∩ u) :=
119+
by rw [inter_union_distrib_left]

0 commit comments

Comments
 (0)
Please sign in to comment.