@@ -20,7 +20,7 @@ section
20
20
variable {α : Type u}
21
21
22
22
-- TODO: this seems crazy, but it also seems to work reasonably well
23
- @[ematch] lemma le_antisymm' [weak_order α] : ∀ {a b : α}, (: a ≤ b :) → b ≤ a → a = b :=
23
+ @[ematch] theorem le_antisymm' [weak_order α] : ∀ {a b : α}, (: a ≤ b :) → b ≤ a → a = b :=
24
24
weak_order.le_antisymm
25
25
end
26
26
@@ -47,17 +47,17 @@ class order_top (α : Type u) extends has_top α, weak_order α :=
47
47
section order_top
48
48
variables {α : Type u} [order_top α] {a : α}
49
49
50
- @[simp] lemma le_top : a ≤ ⊤ :=
50
+ @[simp] theorem le_top : a ≤ ⊤ :=
51
51
order_top.le_top a
52
52
53
- lemma top_unique (h : ⊤ ≤ a) : a = ⊤ :=
53
+ theorem top_unique (h : ⊤ ≤ a) : a = ⊤ :=
54
54
le_antisymm le_top h
55
55
56
56
-- TODO: delete in favor of the next?
57
- lemma eq_top_iff : a = ⊤ ↔ ⊤ ≤ a :=
57
+ theorem eq_top_iff : a = ⊤ ↔ ⊤ ≤ a :=
58
58
⟨assume eq, eq.symm ▸ le_refl ⊤, top_unique⟩
59
59
60
- @[simp] lemma top_le_iff : ⊤ ≤ a ↔ a = ⊤ :=
60
+ @[simp] theorem top_le_iff : ⊤ ≤ a ↔ a = ⊤ :=
61
61
⟨top_unique, λ h, h.symm ▸ le_refl ⊤⟩
62
62
63
63
end order_top
@@ -68,19 +68,19 @@ class order_bot (α : Type u) extends has_bot α, weak_order α :=
68
68
section order_bot
69
69
variables {α : Type u} [order_bot α] {a : α}
70
70
71
- @[simp] lemma bot_le : ⊥ ≤ a := order_bot.bot_le a
71
+ @[simp] theorem bot_le : ⊥ ≤ a := order_bot.bot_le a
72
72
73
- lemma bot_unique (h : a ≤ ⊥) : a = ⊥ :=
73
+ theorem bot_unique (h : a ≤ ⊥) : a = ⊥ :=
74
74
le_antisymm h bot_le
75
75
76
76
-- TODO: delete?
77
- lemma eq_bot_iff : a = ⊥ ↔ a ≤ ⊥ :=
77
+ theorem eq_bot_iff : a = ⊥ ↔ a ≤ ⊥ :=
78
78
⟨assume eq, eq.symm ▸ le_refl ⊥, bot_unique⟩
79
79
80
- @[simp] lemma le_bot_iff : a ≤ ⊥ ↔ a = ⊥ :=
80
+ @[simp] theorem le_bot_iff : a ≤ ⊥ ↔ a = ⊥ :=
81
81
⟨bot_unique, assume h, h.symm ▸ le_refl ⊥⟩
82
82
83
- lemma neq_bot_of_le_neq_bot {a b : α} (hb : b ≠ ⊥) (hab : b ≤ a) : a ≠ ⊥ :=
83
+ theorem neq_bot_of_le_neq_bot {a b : α} (hb : b ≠ ⊥) (hab : b ≤ a) : a ≠ ⊥ :=
84
84
assume ha, hb $ bot_unique $ ha ▸ hab
85
85
86
86
end order_bot
@@ -93,55 +93,55 @@ class semilattice_sup (α : Type u) extends has_sup α, weak_order α :=
93
93
section semilattice_sup
94
94
variables {α : Type u} [semilattice_sup α] {a b c d : α}
95
95
96
- lemma le_sup_left : a ≤ a ⊔ b :=
96
+ theorem le_sup_left : a ≤ a ⊔ b :=
97
97
semilattice_sup.le_sup_left a b
98
98
99
- @[ematch] lemma le_sup_left' : a ≤ (: a ⊔ b :) :=
99
+ @[ematch] theorem le_sup_left' : a ≤ (: a ⊔ b :) :=
100
100
semilattice_sup.le_sup_left a b
101
101
102
- lemma le_sup_right : b ≤ a ⊔ b :=
102
+ theorem le_sup_right : b ≤ a ⊔ b :=
103
103
semilattice_sup.le_sup_right a b
104
104
105
- @[ematch] lemma le_sup_right' : b ≤ (: a ⊔ b :) :=
105
+ @[ematch] theorem le_sup_right' : b ≤ (: a ⊔ b :) :=
106
106
semilattice_sup.le_sup_right a b
107
107
108
- lemma le_sup_left_of_le (h : c ≤ a) : c ≤ a ⊔ b :=
108
+ theorem le_sup_left_of_le (h : c ≤ a) : c ≤ a ⊔ b :=
109
109
by finish
110
110
111
- lemma le_sup_right_of_le (h : c ≤ b) : c ≤ a ⊔ b :=
111
+ theorem le_sup_right_of_le (h : c ≤ b) : c ≤ a ⊔ b :=
112
112
by finish
113
113
114
- lemma sup_le : a ≤ c → b ≤ c → a ⊔ b ≤ c :=
114
+ theorem sup_le : a ≤ c → b ≤ c → a ⊔ b ≤ c :=
115
115
semilattice_sup.sup_le a b c
116
116
117
- @[simp] lemma sup_le_iff : a ⊔ b ≤ c ↔ a ≤ c ∧ b ≤ c :=
117
+ @[simp] theorem sup_le_iff : a ⊔ b ≤ c ↔ a ≤ c ∧ b ≤ c :=
118
118
⟨assume h : a ⊔ b ≤ c, ⟨le_trans le_sup_left h, le_trans le_sup_right h⟩,
119
119
assume ⟨h₁, h₂⟩, sup_le h₁ h₂⟩
120
120
121
121
-- TODO: if we just write le_antisymm, Lean doesn't know which ≤ we want to use
122
122
-- Can we do anything about that?
123
- lemma sup_of_le_left (h : b ≤ a) : a ⊔ b = a :=
123
+ theorem sup_of_le_left (h : b ≤ a) : a ⊔ b = a :=
124
124
by apply le_antisymm; finish
125
125
126
- lemma sup_of_le_right (h : a ≤ b) : a ⊔ b = b :=
126
+ theorem sup_of_le_right (h : a ≤ b) : a ⊔ b = b :=
127
127
by apply le_antisymm; finish
128
128
129
- lemma sup_le_sup (h₁ : a ≤ b) (h₂ : c ≤ d) : a ⊔ c ≤ b ⊔ d :=
129
+ theorem sup_le_sup (h₁ : a ≤ b) (h₂ : c ≤ d) : a ⊔ c ≤ b ⊔ d :=
130
130
by finish
131
131
132
- lemma le_of_sup_eq (h : a ⊔ b = b) : a ≤ b :=
132
+ theorem le_of_sup_eq (h : a ⊔ b = b) : a ≤ b :=
133
133
by finish
134
134
135
- @[simp] lemma sup_idem : a ⊔ a = a :=
135
+ @[simp] theorem sup_idem : a ⊔ a = a :=
136
136
by apply le_antisymm; finish
137
137
138
- lemma sup_comm : a ⊔ b = b ⊔ a :=
138
+ theorem sup_comm : a ⊔ b = b ⊔ a :=
139
139
by apply le_antisymm; finish
140
140
141
141
instance semilattice_sup_to_is_commutative [semilattice_sup α] : is_commutative α (⊔) :=
142
142
⟨@sup_comm _ _⟩
143
143
144
- lemma sup_assoc : a ⊔ b ⊔ c = a ⊔ (b ⊔ c) :=
144
+ theorem sup_assoc : a ⊔ b ⊔ c = a ⊔ (b ⊔ c) :=
145
145
by apply le_antisymm; finish
146
146
147
147
instance semilattice_sup_to_is_associative [semilattice_sup α] : is_associative α (⊔) :=
@@ -157,53 +157,53 @@ class semilattice_inf (α : Type u) extends has_inf α, weak_order α :=
157
157
section semilattice_inf
158
158
variables {α : Type u} [semilattice_inf α] {a b c d : α}
159
159
160
- lemma inf_le_left : a ⊓ b ≤ a :=
160
+ theorem inf_le_left : a ⊓ b ≤ a :=
161
161
semilattice_inf.inf_le_left a b
162
162
163
- @[ematch] lemma inf_le_left' : (: a ⊓ b :) ≤ a :=
163
+ @[ematch] theorem inf_le_left' : (: a ⊓ b :) ≤ a :=
164
164
semilattice_inf.inf_le_left a b
165
165
166
- lemma inf_le_right : a ⊓ b ≤ b :=
166
+ theorem inf_le_right : a ⊓ b ≤ b :=
167
167
semilattice_inf.inf_le_right a b
168
168
169
- @[ematch] lemma inf_le_right' : (: a ⊓ b :) ≤ b :=
169
+ @[ematch] theorem inf_le_right' : (: a ⊓ b :) ≤ b :=
170
170
semilattice_inf.inf_le_right a b
171
171
172
- lemma le_inf : a ≤ b → a ≤ c → a ≤ b ⊓ c :=
172
+ theorem le_inf : a ≤ b → a ≤ c → a ≤ b ⊓ c :=
173
173
semilattice_inf.le_inf a b c
174
174
175
- lemma inf_le_left_of_le (h : a ≤ c) : a ⊓ b ≤ c :=
175
+ theorem inf_le_left_of_le (h : a ≤ c) : a ⊓ b ≤ c :=
176
176
le_trans inf_le_left h
177
177
178
- lemma inf_le_right_of_le (h : b ≤ c) : a ⊓ b ≤ c :=
178
+ theorem inf_le_right_of_le (h : b ≤ c) : a ⊓ b ≤ c :=
179
179
le_trans inf_le_right h
180
180
181
- @[simp] lemma le_inf_iff : a ≤ b ⊓ c ↔ a ≤ b ∧ a ≤ c :=
181
+ @[simp] theorem le_inf_iff : a ≤ b ⊓ c ↔ a ≤ b ∧ a ≤ c :=
182
182
⟨assume h : a ≤ b ⊓ c, ⟨le_trans h inf_le_left, le_trans h inf_le_right⟩,
183
183
assume ⟨h₁, h₂⟩, le_inf h₁ h₂⟩
184
184
185
- lemma inf_of_le_left (h : a ≤ b) : a ⊓ b = a :=
185
+ theorem inf_of_le_left (h : a ≤ b) : a ⊓ b = a :=
186
186
by apply le_antisymm; finish
187
187
188
- lemma inf_of_le_right (h : b ≤ a) : a ⊓ b = b :=
188
+ theorem inf_of_le_right (h : b ≤ a) : a ⊓ b = b :=
189
189
by apply le_antisymm; finish
190
190
191
- lemma inf_le_inf (h₁ : a ≤ b) (h₂ : c ≤ d) : a ⊓ c ≤ b ⊓ d :=
191
+ theorem inf_le_inf (h₁ : a ≤ b) (h₂ : c ≤ d) : a ⊓ c ≤ b ⊓ d :=
192
192
by finish
193
193
194
- lemma le_of_inf_eq (h : a ⊓ b = a) : a ≤ b :=
194
+ theorem le_of_inf_eq (h : a ⊓ b = a) : a ≤ b :=
195
195
by finish
196
196
197
- @[simp] lemma inf_idem : a ⊓ a = a :=
197
+ @[simp] theorem inf_idem : a ⊓ a = a :=
198
198
by apply le_antisymm; finish
199
199
200
- lemma inf_comm : a ⊓ b = b ⊓ a :=
200
+ theorem inf_comm : a ⊓ b = b ⊓ a :=
201
201
by apply le_antisymm; finish
202
202
203
203
instance semilattice_inf_to_is_commutative [semilattice_inf α] : is_commutative α (⊓) :=
204
204
⟨@inf_comm _ _⟩
205
205
206
- lemma inf_assoc : a ⊓ b ⊓ c = a ⊓ (b ⊓ c) :=
206
+ theorem inf_assoc : a ⊓ b ⊓ c = a ⊓ (b ⊓ c) :=
207
207
by apply le_antisymm; finish
208
208
209
209
instance semilattice_inf_to_is_associative [semilattice_inf α] : is_associative α (⊓) :=
@@ -216,10 +216,10 @@ class semilattice_sup_top (α : Type u) extends order_top α, semilattice_sup α
216
216
section semilattice_sup_top
217
217
variables {α : Type u} [semilattice_sup_top α] {a : α}
218
218
219
- @[simp] lemma top_sup_eq : ⊤ ⊔ a = ⊤ :=
219
+ @[simp] theorem top_sup_eq : ⊤ ⊔ a = ⊤ :=
220
220
sup_of_le_left le_top
221
221
222
- @[simp] lemma sup_top_eq : a ⊔ ⊤ = ⊤ :=
222
+ @[simp] theorem sup_top_eq : a ⊔ ⊤ = ⊤ :=
223
223
sup_of_le_right le_top
224
224
225
225
end semilattice_sup_top
@@ -229,13 +229,13 @@ class semilattice_sup_bot (α : Type u) extends order_bot α, semilattice_sup α
229
229
section semilattice_sup_bot
230
230
variables {α : Type u} [semilattice_sup_bot α] {a b : α}
231
231
232
- @[simp] lemma bot_sup_eq : ⊥ ⊔ a = a :=
232
+ @[simp] theorem bot_sup_eq : ⊥ ⊔ a = a :=
233
233
sup_of_le_right bot_le
234
234
235
- @[simp] lemma sup_bot_eq : a ⊔ ⊥ = a :=
235
+ @[simp] theorem sup_bot_eq : a ⊔ ⊥ = a :=
236
236
sup_of_le_left bot_le
237
237
238
- @[simp] lemma sup_eq_bot_iff : a ⊔ b = ⊥ ↔ (a = ⊥ ∧ b = ⊥) :=
238
+ @[simp] theorem sup_eq_bot_iff : a ⊔ b = ⊥ ↔ (a = ⊥ ∧ b = ⊥) :=
239
239
by rw [eq_bot_iff, sup_le_iff]; simp
240
240
241
241
end semilattice_sup_bot
@@ -245,13 +245,13 @@ class semilattice_inf_top (α : Type u) extends order_top α, semilattice_inf α
245
245
section semilattice_inf_top
246
246
variables {α : Type u} [semilattice_inf_top α] {a b : α}
247
247
248
- @[simp] lemma top_inf_eq : ⊤ ⊓ a = a :=
248
+ @[simp] theorem top_inf_eq : ⊤ ⊓ a = a :=
249
249
inf_of_le_right le_top
250
250
251
- @[simp] lemma inf_top_eq : a ⊓ ⊤ = a :=
251
+ @[simp] theorem inf_top_eq : a ⊓ ⊤ = a :=
252
252
inf_of_le_left le_top
253
253
254
- @[simp] lemma inf_eq_top_iff : a ⊓ b = ⊤ ↔ (a = ⊤ ∧ b = ⊤) :=
254
+ @[simp] theorem inf_eq_top_iff : a ⊓ b = ⊤ ↔ (a = ⊤ ∧ b = ⊤) :=
255
255
by rw [eq_top_iff, le_inf_iff]; simp
256
256
257
257
end semilattice_inf_top
@@ -261,10 +261,10 @@ class semilattice_inf_bot (α : Type u) extends order_bot α, semilattice_inf α
261
261
section semilattice_inf_bot
262
262
variables {α : Type u} [semilattice_inf_bot α] {a : α}
263
263
264
- @[simp] lemma bot_inf_eq : ⊥ ⊓ a = ⊥ :=
264
+ @[simp] theorem bot_inf_eq : ⊥ ⊓ a = ⊥ :=
265
265
inf_of_le_left bot_le
266
266
267
- @[simp] lemma inf_bot_eq : a ⊓ ⊥ = ⊥ :=
267
+ @[simp] theorem inf_bot_eq : a ⊓ ⊥ = ⊥ :=
268
268
inf_of_le_right bot_le
269
269
270
270
end semilattice_inf_bot
@@ -278,16 +278,16 @@ variables {α : Type u} [lattice α] {a b c d : α}
278
278
279
279
/- Distributivity laws -/
280
280
/- TODO: better names? -/
281
- lemma sup_inf_le : a ⊔ (b ⊓ c) ≤ (a ⊔ b) ⊓ (a ⊔ c) :=
281
+ theorem sup_inf_le : a ⊔ (b ⊓ c) ≤ (a ⊔ b) ⊓ (a ⊔ c) :=
282
282
by finish
283
283
284
- lemma le_inf_sup : (a ⊓ b) ⊔ (a ⊓ c) ≤ a ⊓ (b ⊔ c) :=
284
+ theorem le_inf_sup : (a ⊓ b) ⊔ (a ⊓ c) ≤ a ⊓ (b ⊔ c) :=
285
285
by finish
286
286
287
- lemma inf_sup_self : a ⊓ (a ⊔ b) = a :=
287
+ theorem inf_sup_self : a ⊓ (a ⊔ b) = a :=
288
288
le_antisymm (by finish) (by finish)
289
289
290
- lemma sup_inf_self : a ⊔ (a ⊓ b) = a :=
290
+ theorem sup_inf_self : a ⊔ (a ⊓ b) = a :=
291
291
le_antisymm (by finish) (by finish)
292
292
293
293
end lattice
0 commit comments