-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConmutatividad_de_la_interseccion.thy
153 lines (142 loc) · 3.65 KB
/
Conmutatividad_de_la_interseccion.thy
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
152
153
(* Conmutatividad_de_la_interseccion.thy
Conmutatividad de la intersección.
José A. Alonso Jiménez
Sevilla, 27 de febrero de 2024
---------------------------------------------------------------------
*)
(* ---------------------------------------------------------------------
-- Demostrar que
-- s \<inter> t = t \<inter> s
-- ------------------------------------------------------------------ *)
theory Conmutatividad_de_la_interseccion
imports Main
begin
(* 1\<ordfeminine> demostración *)
lemma "s \<inter> t = t \<inter> s"
proof (rule set_eqI)
fix x
show "x \<in> s \<inter> t \<longleftrightarrow> x \<in> t \<inter> s"
proof (rule iffI)
assume h : "x \<in> s \<inter> t"
then have xs : "x \<in> s"
by (simp only: IntD1)
have xt : "x \<in> t"
using h by (simp only: IntD2)
then show "x \<in> t \<inter> s"
using xs by (rule IntI)
next
assume h : "x \<in> t \<inter> s"
then have xt : "x \<in> t"
by (simp only: IntD1)
have xs : "x \<in> s"
using h by (simp only: IntD2)
then show "x \<in> s \<inter> t"
using xt by (rule IntI)
qed
qed
(* 2\<ordfeminine> demostración *)
lemma "s \<inter> t = t \<inter> s"
proof (rule set_eqI)
fix x
show "x \<in> s \<inter> t \<longleftrightarrow> x \<in> t \<inter> s"
proof
assume h : "x \<in> s \<inter> t"
then have xs : "x \<in> s"
by simp
have xt : "x \<in> t"
using h by simp
then show "x \<in> t \<inter> s"
using xs by simp
next
assume h : "x \<in> t \<inter> s"
then have xt : "x \<in> t"
by simp
have xs : "x \<in> s"
using h by simp
then show "x \<in> s \<inter> t"
using xt by simp
qed
qed
(* 3\<ordfeminine> demostración *)
lemma "s \<inter> t = t \<inter> s"
proof (rule equalityI)
show "s \<inter> t \<subseteq> t \<inter> s"
proof (rule subsetI)
fix x
assume h : "x \<in> s \<inter> t"
then have xs : "x \<in> s"
by (simp only: IntD1)
have xt : "x \<in> t"
using h by (simp only: IntD2)
then show "x \<in> t \<inter> s"
using xs by (rule IntI)
qed
next
show "t \<inter> s \<subseteq> s \<inter> t"
proof (rule subsetI)
fix x
assume h : "x \<in> t \<inter> s"
then have xt : "x \<in> t"
by (simp only: IntD1)
have xs : "x \<in> s"
using h by (simp only: IntD2)
then show "x \<in> s \<inter> t"
using xt by (rule IntI)
qed
qed
(* 4\<ordfeminine> demostración *)
lemma "s \<inter> t = t \<inter> s"
proof
show "s \<inter> t \<subseteq> t \<inter> s"
proof
fix x
assume h : "x \<in> s \<inter> t"
then have xs : "x \<in> s"
by simp
have xt : "x \<in> t"
using h by simp
then show "x \<in> t \<inter> s"
using xs by simp
qed
next
show "t \<inter> s \<subseteq> s \<inter> t"
proof
fix x
assume h : "x \<in> t \<inter> s"
then have xt : "x \<in> t"
by simp
have xs : "x \<in> s"
using h by simp
then show "x \<in> s \<inter> t"
using xt by simp
qed
qed
(* 5\<ordfeminine> demostración *)
lemma "s \<inter> t = t \<inter> s"
proof
show "s \<inter> t \<subseteq> t \<inter> s"
proof
fix x
assume "x \<in> s \<inter> t"
then show "x \<in> t \<inter> s"
by simp
qed
next
show "t \<inter> s \<subseteq> s \<inter> t"
proof
fix x
assume "x \<in> t \<inter> s"
then show "x \<in> s \<inter> t"
by simp
qed
qed
(* 6\<ordfeminine> demostración *)
lemma "s \<inter> t = t \<inter> s"
by (fact Int_commute)
(* 7\<ordfeminine> demostración *)
lemma "s \<inter> t = t \<inter> s"
by (fact inf_commute)
(* 8\<ordfeminine> demostración *)
lemma "s \<inter> t = t \<inter> s"
by auto
end