Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 8f4327a

Browse files
committed
feat(*): working on list/basic, robusting simp proofs
1 parent e7b2a0f commit 8f4327a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2853
-3169
lines changed

algebra/big_operators.lean

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ Authors: Johannes Hölzl
55
66
Some big operators for lists and finite sets.
77
-/
8-
import data.list data.list.comb data.list.perm data.set.finite data.finset
8+
import data.list data.list.perm data.set.finite data.finset
99
algebra.group algebra.ordered_monoid algebra.group_power
1010

1111
universes u v w
1212
variables {α : Type u} {β : Type v} {γ : Type w}
1313

1414
namespace list
15-
-- move to list.sum, needs to match exactly, otherwise transport fails
16-
definition prod [has_mul α] [has_one α] : list α → α := list.foldl (*) 1
1715

1816
section monoid
1917
variables [monoid α] {l l₁ l₂ : list α} {a : α}
@@ -31,12 +29,9 @@ calc (l₁ ++ l₂).prod = foldl (*) (foldl (*) 1 l₁ * 1) l₂ : by simp [list
3129
@[simp] theorem prod_join {l : list (list α)} : l.join.prod = (l.map list.prod).prod :=
3230
by induction l; simp [list.join, *] at *
3331

34-
@[simp] theorem prod_replicate {n : ℕ} : (list.replicate n a).prod = a ^ n :=
35-
begin
36-
induction n with n ih,
37-
{ show [].prod = (1:α), refl },
38-
{ show (a :: list.replicate n a).prod = a ^ (n+1), simp [pow_succ, ih] }
39-
end
32+
@[simp] theorem prod_repeat : ∀ (n : ℕ), (list.repeat a n).prod = a ^ n
33+
| 0 := rfl
34+
| (n+1) := by simp [pow_succ, prod_repeat n]
4035

4136
end monoid
4237

@@ -45,10 +40,10 @@ open list
4540
variable [comm_monoid α]
4641

4742
lemma prod_eq_of_perm {l₁ l₂ : list α} (h : perm l₁ l₂) : l₁.prod = l₂.prod :=
48-
by induction h; repeat { simp [*] }
43+
by induction h; simp *
4944

5045
lemma prod_reverse {l : list α} : l.reverse.prod = l.prod :=
51-
prod_eq_of_perm $ perm.perm_rev_simp l
46+
prod_eq_of_perm $ reverse_perm l
5247

5348
end comm_monoid
5449

@@ -57,7 +52,7 @@ end list
5752
namespace finset
5853
variables {s s₁ s₂ : finset α} {a : α} {f g : α → β}
5954

60-
protected definition prod [comm_monoid β] (s : finset α) (f : α → β) : β := s.fold (*) 1 f
55+
protected def prod [comm_monoid β] (s : finset α) (f : α → β) : β := s.fold (*) 1 f
6156

6257
variables [decidable_eq α]
6358

@@ -106,7 +101,7 @@ s.induction_on (by simp) $
106101
from assume h₁ y hys hy₂,
107102
have ha : a ∈ t x ∩ t y, by simp [*],
108103
have t x ∩ t y = ∅,
109-
from hd _ mem_insert _ (mem_insert_of_mem hys) $ assume h, hxs $ h.symm ▸ hys,
104+
from hd _ mem_insert_self _ (mem_insert_of_mem hys) $ assume h, hxs $ h.symm ▸ hys,
110105
by rwa [this] at ha,
111106
by simp [hxs, prod_union this, ih hd'] {contextual := tt}
112107

@@ -250,9 +245,9 @@ section ordered_cancel_comm_monoid
250245
variables [ordered_cancel_comm_monoid β]
251246

252247
lemma sum_le_sum : (∀x∈s, f x ≤ g x) → s.sum f ≤ s.sum g :=
253-
s.induction_on (by simp; refl) $ assume a s ha ih h,
248+
s.induction_on (by simp) $ assume a s ha ih h,
254249
have f a + s.sum f ≤ g a + s.sum g,
255-
from add_le_add (h _ mem_insert) (ih $ assume x hx, h _ $ mem_insert_of_mem hx),
250+
from add_le_add (h _ mem_insert_self) (ih $ assume x hx, h _ $ mem_insert_of_mem hx),
256251
by simp [*]
257252

258253
lemma zero_le_sum (h : ∀x∈s, 0 ≤ f x) : 0 ≤ s.sum f := le_trans (by simp) (sum_le_sum h)
@@ -286,7 +281,7 @@ lemma prod_eq_zero_iff : s.prod f = 0 ↔ (∃a∈s, f a = 0) :=
286281
s.induction_on (by simp)
287282
begin
288283
intros a s,
289-
rw [bex_def, bex_def, exists_mem_insert_iff],
284+
rw [bex_def, bex_def, exists_mem_insert],
290285
simp [mul_eq_zero_iff_eq_zero_or_eq_zero] {contextual := tt}
291286
end
292287

@@ -298,7 +293,7 @@ variables [ordered_comm_monoid β] [∀a b : β, decidable (a ≤ b)]
298293
lemma sum_le_sum' : (∀x∈s, f x ≤ g x) → s.sum f ≤ s.sum g :=
299294
s.induction_on (by simp; refl) $ assume a s ha ih h,
300295
have f a + s.sum f ≤ g a + s.sum g,
301-
from add_le_add' (h _ mem_insert) (ih $ assume x hx, h _ $ mem_insert_of_mem hx),
296+
from add_le_add' (h _ mem_insert_self) (ih $ assume x hx, h _ $ mem_insert_of_mem hx),
302297
by simp [*]
303298

304299
lemma zero_le_sum' (h : ∀x∈s, 0 ≤ f x) : 0 ≤ s.sum f := le_trans (by simp) (sum_le_sum' h)

algebra/field.lean

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ open set
99
universe u
1010
variables {α : Type u}
1111

12+
section division_ring
13+
variables [division_ring α] {a b : α}
14+
15+
lemma division_ring.neg_inv (h : a ≠ 0) : - a⁻¹ = (- a)⁻¹ :=
16+
by rwa [inv_eq_one_div, inv_eq_one_div, div_neg_eq_neg_div]
17+
18+
end division_ring
19+
1220
section
1321
variables [discrete_field α] {a b c : α}
1422

@@ -38,14 +46,14 @@ lemma lt_div_iff (h : 0 < c) : a < b / c ↔ a * c < b :=
3846

3947
lemma ivl_translate : (λx, x + c) '' {r:α | a ≤ r ∧ r ≤ b } = {r:α | a + c ≤ r ∧ r ≤ b + c} :=
4048
calc (λx, x + c) '' {r | a ≤ r ∧ r ≤ b } = (λx, x - c) ⁻¹' {r | a ≤ r ∧ r ≤ b } :
41-
congr_fun (image_eq_preimage_of_inverse _ _
49+
congr_fun (image_eq_preimage_of_inverse
4250
(assume a, add_sub_cancel a c) (assume b, sub_add_cancel b c)) _
4351
... = {r | a + c ≤ r ∧ r ≤ b + c} :
4452
set.ext $ by simp [-sub_eq_add_neg, le_sub_iff_add_le, sub_le_iff_le_add]
4553

4654
lemma ivl_stretch (hc : 0 < c) : (λx, x * c) '' {r | a ≤ r ∧ r ≤ b } = {r | a * c ≤ r ∧ r ≤ b * c} :=
4755
calc (λx, x * c) '' {r | a ≤ r ∧ r ≤ b } = (λx, x / c) ⁻¹' {r | a ≤ r ∧ r ≤ b } :
48-
congr_fun (image_eq_preimage_of_inverse _ _
56+
congr_fun (image_eq_preimage_of_inverse
4957
(assume a, mul_div_cancel _ $ ne_of_gt hc) (assume b, div_mul_cancel _ $ ne_of_gt hc)) _
5058
... = {r | a * c ≤ r ∧ r ≤ b * c} :
5159
set.ext $ by simp [le_div_iff_mul_le_of_pos, div_le_iff_le_mul_of_pos, hc]

algebra/functions.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ lemma lt_min_iff : a < min b c ↔ (a < b ∧ a < c) :=
2626
⟨assume h, ⟨lt_of_lt_of_le h (min_le_left _ _), lt_of_lt_of_le h (min_le_right _ _)⟩,
2727
assume ⟨h₁, h₂⟩, lt_min h₁ h₂⟩
2828

29+
lemma lt_max_iff : a < max b c ↔ a < b ∨ a < c :=
30+
⟨assume h, (le_total c b).imp
31+
(assume hcb, lt_of_lt_of_le h $ max_le (le_refl _) hcb)
32+
(assume hbc, lt_of_lt_of_le h $ max_le hbc (le_refl _)),
33+
(assume h, match h with
34+
| or.inl h := lt_of_lt_of_le h (le_max_left _ _)
35+
| or.inr h := lt_of_lt_of_le h (le_max_right _ _)
36+
end)⟩
37+
2938
end
3039

3140
section decidable_linear_ordered_comm_group

analysis/ennreal.lean

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ suffices ∀r, 0 ≤ r → of_real r > b → a ≤ of_real r,
403403
assume r hr hrb,
404404
let ⟨p, hp, b_eq, hpr⟩ := lt_iff_exists_of_real.mp hrb in
405405
have p < r, by simp [hp, hr] at hpr; assumption,
406-
have pos : 0 < r - p, from lt_sub_iff.mpr $ begin simp [this] end,
406+
have pos : 0 < r - p, from lt_sub_iff.mpr $ by simp [this],
407407
calc a ≤ b + of_real (r - p) : h _ pos (by simp [b_eq])
408408
... = of_real r :
409409
by simp [-sub_eq_add_neg, le_of_lt pos, hp, hr, b_eq]; simp [sub_eq_add_neg]
@@ -414,7 +414,7 @@ have ∀r, 0 ≤ r → (∃ (i : ℚ), 0 ≤ i ∧ of_real r < of_real (of_rat i
414414
from assume r hr,
415415
let ⟨q, hq⟩ := exists_lt_of_rat r in
416416
have 0 < of_rat q, from lt_of_le_of_lt hr hq,
417-
⟨q, le_of_lt $ of_rat_lt_of_rat.mp this, of_real_lt_of_real_iff_cases.mpr ⟨this, hq⟩⟩,
417+
⟨q, le_of_lt $ of_rat_lt.mp this, of_real_lt_of_real_iff_cases.mpr ⟨this, hq⟩⟩,
418418
have h₁ : ∀a, a < ∞ ↔ ∃ (i : ℚ), 0 ≤ i ∧ a < of_real (of_rat i),
419419
from forall_ennreal.mpr $ by simp [this] {contextual := tt},
420420
have ∀r p, 0 ≤ r → 0 ≤ p →
@@ -424,7 +424,7 @@ have ∀r p, 0 ≤ r → 0 ≤ p →
424424
let ⟨q, hrq, hqp⟩ := exists_lt_of_rat_of_rat_gt hrp in
425425
have 0 < of_rat q, from lt_of_le_of_lt hr hrq,
426426
have hp' : 0 < p, from lt_of_le_of_lt hr hrp,
427-
⟨q, le_of_lt $ of_rat_lt_of_rat.mp this,
427+
⟨q, le_of_lt $ of_rat_lt.mp this,
428428
by simp [of_real_lt_of_real_iff_cases, this, hrq, hqp, hp']⟩)
429429
(assume ⟨q, hq, hrq, hqp⟩, (of_real_lt_of_real_iff hr hp).mp $ lt_trans hrq hqp),
430430
have h₂ : ∀a r, 0 ≤ r →
@@ -443,7 +443,7 @@ assume x hx, le_infty
443443

444444
lemma of_real_mem_upper_bounds {s : set real} (hs : ∀x∈s, (0:real) ≤ x) (hr : 0 ≤ r) :
445445
of_real r ∈ upper_bounds (of_real '' s) ↔ r ∈ upper_bounds s :=
446-
by simp [upper_bounds, ball_image_iff, *] {contextual := tt}
446+
by simp [upper_bounds, ball_image_iff, -mem_image, *] {contextual := tt}
447447

448448
lemma is_lub_of_real {s : set real} (hs : ∀x∈s, (0:real) ≤ x) (hr : 0 ≤ r) (h : s ≠ ∅) :
449449
is_lub (of_real '' s) (of_real r) ↔ is_lub s r :=
@@ -801,7 +801,7 @@ s.induction_on (by simp) $ assume a s ha ih,
801801
have ∀ (i j : ι), ∃ (k : ι), f k a + s.sum (f k) ≤ f i a + s.sum (f j),
802802
from assume i j,
803803
let ⟨k, hk⟩ := h (insert a s) i j in
804-
⟨k, add_le_add' (hk a finset.mem_insert).left $ finset.sum_le_sum' $
804+
⟨k, add_le_add' (hk a finset.mem_insert_self).left $ finset.sum_le_sum' $
805805
assume a ha, (hk _ $ finset.mem_insert_of_mem ha).right⟩,
806806
by simp [ha, ih.symm, infi_add_infi this]
807807

@@ -1000,14 +1000,14 @@ protected lemma tsum_le_tsum (h : ∀a, f a ≤ g a) : (∑a, f a) ≤ (∑a, g
10001000
tsum_le_tsum h ennreal.has_sum ennreal.has_sum
10011001

10021002
protected lemma tsum_eq_supr_nat {f : ℕ → ennreal} :
1003-
(∑i:ℕ, f i) = (⨆i:ℕ, (finset.upto i).sum f) :=
1003+
(∑i:ℕ, f i) = (⨆i:ℕ, (finset.range i).sum f) :=
10041004
calc _ = (⨆s:finset ℕ, s.sum f) : ennreal.tsum_eq_supr_sum
1005-
... = (⨆i:ℕ, (finset.upto i).sum f) : le_antisymm
1005+
... = (⨆i:ℕ, (finset.range i).sum f) : le_antisymm
10061006
(supr_le_supr2 $ assume s,
1007-
have ∃n, s ⊆ finset.upto n, from finset.exists_nat_subset_upto,
1007+
have ∃n, s ⊆ finset.range n, from finset.exists_nat_subset_range,
10081008
let ⟨n, hn⟩ := this in
10091009
⟨n, finset.sum_le_sum_of_subset hn⟩)
1010-
(supr_le_supr2 $ assume i, ⟨finset.upto i, le_refl _⟩)
1010+
(supr_le_supr2 $ assume i, ⟨finset.range i, le_refl _⟩)
10111011

10121012
protected lemma le_tsum {a : α} : f a ≤ (∑a, f a) :=
10131013
calc f a = ({a} : finset α).sum f : by simp

analysis/limits.lean

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ infix ` ^ ` := pow_nat
1616
section real
1717

1818
lemma has_sum_of_absolute_convergence {f : ℕ → ℝ}
19-
(hf : ∃r, tendsto (λn, (upto n).sum (λi, abs (f i))) at_top (nhds r)) : has_sum f :=
19+
(hf : ∃r, tendsto (λn, (range n).sum (λi, abs (f i))) at_top (nhds r)) : has_sum f :=
2020
let f' := λs:finset ℕ, s.sum (λi, abs (f i)) in
2121
suffices cauchy (map (λs:finset ℕ, s.sum f) at_top),
2222
from complete_space.complete this,
@@ -25,46 +25,46 @@ assume s hs,
2525
let ⟨ε, hε, hsε⟩ := mem_uniformity_dist.mp hs, ⟨r, hr⟩ := hf in
2626
have hε' : {p : ℝ × ℝ | dist p.1 p.2 < ε / 2} ∈ (@uniformity ℝ _).sets,
2727
from mem_uniformity_dist.mpr ⟨ε / 2, div_pos_of_pos_of_pos hε two_pos, assume a b h, h⟩,
28-
have cauchy (at_top.map $ λn, f' (upto n)),
28+
have cauchy (at_top.map $ λn, f' (range n)),
2929
from cauchy_downwards cauchy_nhds (map_ne_bot at_top_ne_bot) hr,
30-
have ∃n, ∀{n'}, n ≤ n' → dist (f' (upto n)) (f' (upto n')) < ε / 2,
30+
have ∃n, ∀{n'}, n ≤ n' → dist (f' (range n)) (f' (range n')) < ε / 2,
3131
by simp [cauchy_iff, mem_at_top_iff] at this;
3232
from let ⟨t, ht, u, hu⟩ := this _ hε' in
3333
⟨u, assume n' hn, ht $ prod_mk_mem_set_prod_eq.mpr ⟨hu _ (le_refl _), hu _ hn⟩⟩,
3434
let ⟨n, hn⟩ := this in
35-
have ∀{s}, upto n ⊆ s → abs ((s \ upto n).sum f) < ε / 2,
35+
have ∀{s}, range n ⊆ s → abs ((s \ range n).sum f) < ε / 2,
3636
from assume s hs,
37-
let ⟨n', hn'⟩ := @exists_nat_subset_upto s in
38-
have upto n ⊆ upto n', from subset.trans hs hn',
39-
have f'_nn : 0 ≤ f' (upto n' \ upto n), from zero_le_sum $ assume _ _, abs_nonneg _,
40-
calc abs ((s \ upto n).sum f) ≤ f' (s \ upto n) : abs_sum_le_sum_abs
41-
... ≤ f' (upto n' \ upto n) : sum_le_sum_of_subset_of_nonneg
37+
let ⟨n', hn'⟩ := @exists_nat_subset_range s in
38+
have range n ⊆ range n', from subset.trans hs hn',
39+
have f'_nn : 0 ≤ f' (range n' \ range n), from zero_le_sum $ assume _ _, abs_nonneg _,
40+
calc abs ((s \ range n).sum f) ≤ f' (s \ range n) : abs_sum_le_sum_abs
41+
... ≤ f' (range n' \ range n) : sum_le_sum_of_subset_of_nonneg
4242
(finset.sdiff_subset_sdiff hn' (finset.subset.refl _))
4343
(assume _ _ _, abs_nonneg _)
44-
... = abs (f' (upto n' \ upto n)) : (abs_of_nonneg f'_nn).symm
45-
... = abs (f' (upto n') - f' (upto n)) :
46-
by simp [f', (sum_sdiff ‹upto n ⊆ upto n'›).symm]
47-
... = abs (f' (upto n) - f' (upto n')) : abs_sub _ _
48-
... < ε / 2 : hn $ upto_subset_upto_iff.mp this,
49-
have ∀{s t}, upto n ⊆ s → upto n ⊆ t → dist (s.sum f) (t.sum f) < ε,
44+
... = abs (f' (range n' \ range n)) : (abs_of_nonneg f'_nn).symm
45+
... = abs (f' (range n') - f' (range n)) :
46+
by simp [f', (sum_sdiff ‹range n ⊆ range n'›).symm]
47+
... = abs (f' (range n) - f' (range n')) : abs_sub _ _
48+
... < ε / 2 : hn $ range_subset.mp this,
49+
have ∀{s t}, range n ⊆ s → range n ⊆ t → dist (s.sum f) (t.sum f) < ε,
5050
from assume s t hs ht,
51-
calc abs (s.sum f - t.sum f) = abs ((s \ upto n).sum f + - (t \ upto n).sum f) :
51+
calc abs (s.sum f - t.sum f) = abs ((s \ range n).sum f + - (t \ range n).sum f) :
5252
by rw [←sum_sdiff hs, ←sum_sdiff ht]; simp
53-
... ≤ abs ((s \ upto n).sum f) + abs ((t \ upto n).sum f) :
53+
... ≤ abs ((s \ range n).sum f) + abs ((t \ range n).sum f) :
5454
le_trans (abs_add_le_abs_add_abs _ _) $ by rw [abs_neg]; exact le_refl _
5555
... < ε / 2 + ε / 2 : add_lt_add (this hs) (this ht)
5656
... = ε : by rw [←add_div, add_self_div_two],
57-
⟨(λs:finset ℕ, s.sum f) '' {s | upto n ⊆ s}, image_mem_map $ mem_at_top (upto n),
57+
⟨(λs:finset ℕ, s.sum f) '' {s | range n ⊆ s}, image_mem_map $ mem_at_top (range n),
5858
assume ⟨a, b⟩ ⟨⟨t, ht, ha⟩, ⟨s, hs, hb⟩⟩, by simp at ha hb; exact ha ▸ hb ▸ hsε _ _ (this ht hs)⟩
5959

6060
lemma is_sum_iff_tendsto_nat_of_nonneg {f : ℕ → ℝ} {r : ℝ} (hf : ∀n, 0 ≤ f n) :
61-
is_sum f r ↔ tendsto (λn, (upto n).sum f) at_top (nhds r) :=
61+
is_sum f r ↔ tendsto (λn, (range n).sum f) at_top (nhds r) :=
6262
⟨tendsto_sum_nat_of_is_sum,
6363
assume hr,
64-
have tendsto (λn, (upto n).sum (λn, abs (f n))) at_top (nhds r),
64+
have tendsto (λn, (range n).sum (λn, abs (f n))) at_top (nhds r),
6565
by simp [(λi, abs_of_nonneg (hf i)), hr],
6666
let ⟨p, h⟩ := has_sum_of_absolute_convergence ⟨r, thisin
67-
have hp : tendsto (λn, (upto n).sum f) at_top (nhds p), from tendsto_sum_nat_of_is_sum h,
67+
have hp : tendsto (λn, (range n).sum f) at_top (nhds p), from tendsto_sum_nat_of_is_sum h,
6868
have p = r, from tendsto_nhds_unique at_top_ne_bot hp hr,
6969
this ▸ h⟩
7070

@@ -138,13 +138,13 @@ by_cases
138138
tendsto_cong this $ univ_mem_sets' $ assume a, by simp [*, pow_inv])
139139

140140
lemma sum_geometric' {r : ℝ} (h : r ≠ 0) :
141-
∀{n}, (upto n).sum (λi, (r + 1) ^ i) = ((r + 1) ^ n - 1) / r
141+
∀{n}, (finset.range n).sum (λi, (r + 1) ^ i) = ((r + 1) ^ n - 1) / r
142142
| 0 := by simp [zero_div]
143143
| (n+1) := by simp [@sum_geometric' n, h, pow_succ, add_div_eq_mul_add_div, add_mul]
144144

145145
lemma sum_geometric {r : ℝ} {n : ℕ} (h : r ≠ 1) :
146-
(upto n).sum (λi, r ^ i) = (r ^ n - 1) / (r - 1) :=
147-
calc (upto n).sum (λi, r ^ i) = (upto n).sum (λi, ((r - 1) + 1) ^ i) :
146+
(range n).sum (λi, r ^ i) = (r ^ n - 1) / (r - 1) :=
147+
calc (range n).sum (λi, r ^ i) = (range n).sum (λi, ((r - 1) + 1) ^ i) :
148148
by simp
149149
... = (((r - 1) + 1) ^ n - 1) / (r - 1) :
150150
sum_geometric' $ by simp [sub_eq_iff_eq_add, -sub_eq_add_neg, h]

analysis/measure_theory/borel_space.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ le_antisymm
5757
have u ∈ (nhds a).sets, from mem_nhds_sets (ht' _ hu) hau,
5858
let ⟨u', hu', hau', hu'u⟩ := mem_nhds_of_is_topological_basis hb₃ this in
5959
have u' ∈ b', from ⟨hu', subset.trans hu'u (subset_sUnion_of_mem hu), u, hu, hu'u⟩,
60-
by simp; exact ⟨u', this, (hv u' this).right hau'⟩)
60+
by simp; exact ⟨u', this, (hv u' this).right hau'⟩)
6161
(Union_subset $ assume ⟨u', hu'⟩, subset_sUnion_of_mem $ (hv u' hu').left),
6262
have h_encode : encodable {u // u ∈ b'},
6363
from (countable.to_encodable $ countable_subset (by simp [subset_def] {contextual := tt}) hb₁),
@@ -181,13 +181,13 @@ is_topological_basis_of_open_of_nhds
181181
from ne_empty_iff_exists_mem.mp $ by simp [t₁₂.symm, h],
182182
let ⟨c, hc₁, hc₂⟩ := this in
183183
have of_rat (max a₁ a₂) < of_rat (min b₁ b₂), from lt_trans hc₁ hc₂,
184-
of_rat_lt_of_rat.mp this,
184+
of_rat_lt.mp this,
185185
by simp [t₁₂]; exact ⟨max a₁ a₂, min b₁ b₂, this, rfl⟩)
186186
(suffices ∀r, ∃(t : set ℝ), r ∈ t ∧ ∃a b, t = Ioo (of_rat a) (of_rat b) ∧ a < b,
187187
by simpa,
188188
assume r,
189189
let ⟨a, ha⟩ := exists_gt_of_rat r, ⟨b, hb⟩ := exists_lt_of_rat r in
190-
⟨Ioo (of_rat a) (of_rat b), ⟨ha, hb⟩, a, b, rfl, of_rat_lt_of_rat.mp $ lt_trans ha hb⟩)
190+
⟨Ioo (of_rat a) (of_rat b), ⟨ha, hb⟩, a, b, rfl, of_rat_lt.mp $ lt_trans ha hb⟩)
191191
begin simp [is_open_Ioo] {contextual:=tt} end
192192
(assume a v hav hv,
193193
let
@@ -196,7 +196,7 @@ is_topological_basis_of_open_of_nhds
196196
⟨p, hap, hpu⟩ := exists_lt_of_rat_of_rat_gt hu
197197
in
198198
⟨Ioo (of_rat q) (of_rat p),
199-
begin simp; exact ⟨q, p, of_rat_lt_of_rat.mp $ lt_trans hqa hap, rfl⟩ end,
199+
begin simp; exact ⟨q, p, of_rat_lt.mp $ lt_trans hqa hap, rfl⟩ end,
200200
⟨hqa, hap⟩, assume a' ⟨hqa', ha'p⟩, h _ (lt_trans hlq hqa') (lt_trans ha'p hpu)⟩)
201201

202202
instance : second_countable_topology ℝ :=
@@ -222,11 +222,11 @@ have ∀a b, a < b → g.is_measurable (Ioo (of_rat a) (of_rat b)),
222222
have (⋃c>a, - Iio (of_rat c)) ∩ Iio (of_rat b) = Ioo (of_rat a) (of_rat b),
223223
from set.ext $ assume x,
224224
have h₁ : x < of_rat b → ∀p, of_rat p ≤ x → p > a → of_rat a < x,
225-
from assume hxb p hpx hpa, lt_of_lt_of_le (of_rat_lt_of_rat.mpr hpa) hpx,
225+
from assume hxb p hpx hpa, lt_of_lt_of_le (of_rat_lt.mpr hpa) hpx,
226226
have h₂ : x < of_rat b → of_rat a < x → (∃ (i : ℚ), of_rat i ≤ x ∧ i > a),
227227
from assume hxb hax,
228228
let ⟨c, hac, hcx⟩ := exists_lt_of_rat_of_rat_gt hax in
229-
⟨c, le_of_lt hcx, of_rat_lt_of_rat.mp hac⟩,
229+
⟨c, le_of_lt hcx, of_rat_lt.mp hac⟩,
230230
by simp [iff_def, Iio, Ioo] {contextual := tt}; exact ⟨h₁, h₂⟩,
231231
this ▸ @is_measurable_inter _ g _ _
232232
(@is_measurable_bUnion _ _ g _ _ countable_encodable $ assume b hb, hgc b)

0 commit comments

Comments
 (0)