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

Commit 7944cc5

Browse files
committed
fix(*): fix some problems introduced with 9815239 and 9aec1d1
1 parent 2485d8e commit 7944cc5

File tree

7 files changed

+39
-28
lines changed

7 files changed

+39
-28
lines changed

analysis/metric_space.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ theorem mem_uniformity_dist {s : set (α×α)} :
206206
begin
207207
rw [uniformity_dist', infi_sets_eq],
208208
simp [subset_def],
209-
exact assume ⟨r, hr⟩ ⟨p, hp⟩, ⟨⟨min r p, lt_min hr hp⟩, by simp [lt_min_iff] {contextual := tt}⟩,
209+
exact assume ⟨r, hr⟩ ⟨p, hp⟩, ⟨⟨min r p, lt_min hr hp⟩, by simp [lt_min_iff, (≥)] {contextual := tt}⟩,
210210
exact ⟨⟨1, zero_lt_one⟩⟩
211211
end
212212

@@ -266,7 +266,7 @@ begin
266266
{ simp },
267267
{ intros y z, cases y with y hy, cases z with z hz,
268268
refine ⟨⟨min y z, lt_min hy hz⟩, _⟩,
269-
simp [ball_subset_ball, min_le_left, min_le_right] },
269+
simp [ball_subset_ball, min_le_left, min_le_right, (≥)] },
270270
{ exact ⟨⟨1, zero_lt_one⟩⟩ }
271271
end
272272

analysis/normed_space.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ instance : normed_space α (E × F) :=
273273
exact calc
274274
∥s • (x₁, x₂)∥ = ∥ (s • x₁, s• x₂)∥ : rfl
275275
... = max (∥s • x₁∥) (∥ s• x₂∥) : rfl
276-
... = max (∥s∥ * ∥x₁∥) (∥s∥ * ∥x₂∥) : by simp[norm_smul s x₁, norm_smul s x₂]
277-
... = ∥s∥ * max (∥x₁∥) (∥x₂∥) : by simp[mul_max_of_nonneg]
276+
... = max (∥s∥ * ∥x₁∥) (∥s∥ * ∥x₂∥) : by simp [norm_smul s x₁, norm_smul s x₂]
277+
... = ∥s∥ * max (∥x₁∥) (∥x₂∥) : by simp [mul_max_of_nonneg]
278278
end,
279279

280280
add_smul := by simp[add_smul],
@@ -284,8 +284,7 @@ instance : normed_space α (E × F) :=
284284
..prod.normed_group,
285285
..prod.vector_space }
286286

287-
instance fintype.normed_space
288-
{ι : Type*} {E : ι → Type*} [fintype ι] [∀i, normed_space α (E i)] :
287+
instance fintype.normed_space {ι : Type*} {E : ι → Type*} [fintype ι] [∀i, normed_space α (E i)] :
289288
normed_space α (Πi, E i) :=
290289
{ norm := λf, ((finset.univ.sup (λb, nnnorm (f b)) : nnreal) : ℝ),
291290
dist_eq :=
@@ -295,6 +294,7 @@ instance fintype.normed_space
295294
show (↑(finset.sup finset.univ (λ (b : ι), nnnorm (a • f b))) : ℝ) =
296295
nnnorm a * ↑(finset.sup finset.univ (λ (b : ι), nnnorm (f b))),
297296
by simp only [(nnreal.coe_mul _ _).symm, nnreal.mul_finset_sup, nnnorm_smul],
298-
..metric_space_pi }
297+
..metric_space_pi,
298+
..pi.vector_space α }
299299

300300
end normed_space

analysis/topology/topological_space.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Parts of the formalization is based on the books:
1010
I. M. James: Topologies and Uniformities
1111
A major difference is that this formalization is heavily based on the filter library.
1212
-/
13-
import order.filter data.set.countable tactic
13+
import order.filter data.set data.set.countable tactic
1414

1515
open set filter lattice classical
1616
local attribute [instance] prop_decidable
@@ -1095,7 +1095,7 @@ begin
10951095
{ exact assume s ⟨hs₁, hs₂⟩ t ⟨ht₁, ht₂⟩,
10961096
have a ∈ s ∩ t, from ⟨hs₁, ht₁⟩,
10971097
let ⟨u, hu₁, hu₂, hu₃⟩ := hb.1 _ hs₂ _ ht₂ _ this in
1098-
⟨u, ⟨hu₂, hu₁⟩, by simpa using hu₃⟩ },
1098+
⟨u, ⟨hu₂, hu₁⟩, by simpa [(≥)] using hu₃⟩ },
10991099
{ suffices : a ∈ (⋃₀ b), { simpa [and_comm] },
11001100
{ rw [hb.2.1], trivial } }
11011101
end
@@ -1175,7 +1175,7 @@ let ⟨f, hf⟩ := this in
11751175
have a ∈ s₁ ∩ s₂, from ⟨has₁, has₂⟩,
11761176
let ⟨s₃, hs₃, has₃, hs⟩ := hb₃ _ hs₁ _ hs₂ _ this in
11771177
⟨⟨s₃, has₃, hs₃⟩, begin
1178-
simp only [le_principal_iff, mem_principal_sets],
1178+
simp only [le_principal_iff, mem_principal_sets, (≥)],
11791179
simp at hs, split; apply inter_subset_inter_left; simp [hs]
11801180
end⟩)
11811181
(assume ⟨s, has, hs⟩,

linear_algebra/submodule.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ order_embedding.trans (order_iso.to_order_embedding $ map_subtype.order_iso α
164164

165165
def submodule_lt_equiv (X Y : submodule α s) :
166166
X < Y ↔ ((map_subtype.le_order_embedding α β s) X) < ((map_subtype.le_order_embedding α β s) Y) :=
167-
by simp [lt_iff_le_not_le, (map_subtype.order_iso α β s).ord]; refl -- why do I need refl after simp??
167+
begin
168+
rw [lt_iff_le_not_le, lt_iff_le_not_le, (map_subtype.order_iso α β s).ord, (map_subtype.order_iso α β s).ord],
169+
refl
170+
end
168171

169172
def lt_order_embedding :
170173
((<) : submodule α s → submodule α s → Prop) ≼o ((<) : submodule α β → submodule α β → Prop) :=

order/order_iso.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def to_order_embedding (f : r ≃o s) : r ≼o s :=
191191

192192
instance : has_coe (r ≃o s) (r ≼o s) := ⟨to_order_embedding⟩
193193

194-
@[simp] theorem coe_coe_fn (f : r ≃o s) : ((f : r ≼o s) : α → β) = f := rfl
194+
theorem coe_coe_fn (f : r ≃o s) : ((f : r ≼o s) : α → β) = f := rfl
195195

196196
theorem ord' : ∀ (f : r ≃o s) {a b}, r a b ↔ s (f a) (f b)
197197
| ⟨f, o⟩ := @o

set_theory/cofinality.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ begin
3030
intro S, cases S with S H, simp [(∘)],
3131
refine le_trans (min_le _ _) _,
3232
{ exact ⟨f ⁻¹' S, λ a,
33-
let ⟨b, bS, h⟩ := H (f a) in ⟨f.symm b, by simp [bS, f.ord', h]⟩⟩ },
33+
let ⟨b, bS, h⟩ := H (f a) in ⟨f.symm b, by simp [bS, f.ord', h,
34+
-coe_fn_coe_base, -coe_fn_coe_trans, principal_seg.coe_coe_fn', initial_seg.coe_coe_fn]⟩⟩ },
3435
{ exact lift_mk_le.{u v (max u v)}.2
3536
⟨⟨λ ⟨x, h⟩, ⟨f x, h⟩, λ ⟨x, h₁⟩ ⟨y, h₂⟩ h₃,
3637
by congr; injection h₃ with h'; exact f.to_equiv.bijective.1 h'⟩⟩ }

set_theory/ordinal.lean

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ instance : has_coe (r ≼i s) (r ≼o s) := ⟨initial_seg.to_order_embedding⟩
3131

3232
@[simp] theorem coe_fn_to_order_embedding (f : r ≼i s) : (f.to_order_embedding : α → β) = f := rfl
3333

34-
@[simp] theorem coe_coe_fn (f : r ≼i s) : ((f : r ≼o s) : α → β) = f := rfl
34+
theorem coe_coe_fn (f : r ≼i s) : ((f : r ≼o s) : α → β) = f := rfl
3535

3636
theorem init' (f : r ≼i s) {a : α} {b : β} : s b (f a) → ∃ a', f a' = b :=
3737
f.init _ _
@@ -100,7 +100,7 @@ by haveI := f.to_order_embedding.is_well_order; exact
100100

101101
@[simp] theorem antisymm_symm [is_well_order α r] [is_well_order β s]
102102
(f : r ≼i s) (g : s ≼i r) : (antisymm f g).symm = antisymm g f :=
103-
order_iso.eq_of_to_fun_eq $ by dunfold initial_seg.antisymm; simp
103+
order_iso.eq_of_to_fun_eq $ by dunfold initial_seg.antisymm; simp [-coe_fn_coe_base]
104104

105105
theorem eq_or_principal [is_well_order β s] (f : r ≼i s) : surjective f ∨ ∃ b, ∀ x, s x b ↔ ∃ y, f y = x :=
106106
or_iff_not_imp_right.2 $ λ h b,
@@ -141,7 +141,7 @@ instance : has_coe (r ≺i s) (r ≼o s) := ⟨principal_seg.to_order_embedding
141141

142142
@[simp] theorem coe_fn_to_order_embedding (f : r ≺i s) : (f.to_order_embedding : α → β) = f := rfl
143143

144-
@[simp] theorem coe_coe_fn (f : r ≺i s) : ((f : r ≼o s) : α → β) = f := rfl
144+
theorem coe_coe_fn (f : r ≺i s) : ((f : r ≼o s) : α → β) = f := rfl
145145

146146
theorem down' (f : r ≺i s) {b : β} : s b f.top ↔ ∃ a, f a = b :=
147147
f.down _
@@ -155,7 +155,7 @@ f.down'.1 $ trans h $ f.lt_top _
155155
instance has_coe_initial_seg [is_trans β s] : has_coe (r ≺i s) (r ≼i s) :=
156156
⟨λ f, ⟨f.to_order_embedding, λ a b, f.init⟩⟩
157157

158-
@[simp] theorem coe_coe_fn' [is_trans β s] (f : r ≺i s) : ((f : r ≼i s) : α → β) = f := rfl
158+
theorem coe_coe_fn' [is_trans β s] (f : r ≺i s) : ((f : r ≼i s) : α → β) = f := rfl
159159

160160
theorem init_iff [is_trans β s] (f : r ≺i s) {a : α} {b : β} : s b (f a) ↔ ∃ a', f a' = b ∧ r a' a :=
161161
initial_seg.init_iff f
@@ -171,7 +171,7 @@ end
171171
def lt_le [is_trans β s] (f : r ≺i s) (g : s ≼i t) : r ≺i t :=
172172
⟨@order_embedding.trans _ _ _ r s t f g, g f.top, λ a,
173173
by simp [g.init_iff, f.down', exists_and_distrib_left.symm,
174-
-exists_and_distrib_left, exists_swap]; refl⟩
174+
-exists_and_distrib_left, -coe_fn_coe_base, coe_coe_fn, exists_swap]; refl⟩
175175

176176
@[simp] theorem lt_le_apply [is_trans β s] [is_trans γ t] (f : r ≺i s) (g : s ≼i t) (a : α) : (f.lt_le g) a = g (f a) :=
177177
order_embedding.trans_apply _ _ _
@@ -189,10 +189,10 @@ lt_le_apply _ _ _
189189
def equiv_lt [is_trans β s] [is_trans γ t] (f : r ≃o s) (g : s ≺i t) : r ≺i t :=
190190
⟨@order_embedding.trans _ _ _ r s t f g, g.top, λ c,
191191
by simp [g.down']; exact
192-
⟨λ ⟨b, h⟩, ⟨f.symm b, by simp [h]⟩, λ ⟨a, h⟩, ⟨f a, h⟩⟩⟩
192+
⟨λ ⟨b, h⟩, ⟨f.symm b, by simp [h, -coe_fn_coe_base, order_iso.coe_coe_fn]⟩, λ ⟨a, h⟩, ⟨f a, h⟩⟩⟩
193193

194194
@[simp] theorem equiv_lt_apply [is_trans β s] [is_trans γ t] (f : r ≃o s) (g : s ≺i t) (a : α) : (equiv_lt f g) a = g (f a) :=
195-
by delta equiv_lt; simp
195+
by delta equiv_lt; simp [-coe_fn_coe_base, -coe_fn_coe_trans, order_iso.coe_coe_fn, coe_coe_fn]
196196

197197
@[simp] theorem equiv_lt_top [is_trans β s] [is_trans γ t] (f : r ≃o s) (g : s ≺i t) : (equiv_lt f g).top = g.top := rfl
198198

@@ -203,7 +203,7 @@ instance [is_well_order β s] : subsingleton (r ≺i s) :=
203203
rw @subsingleton.elim _ _ (f : r ≼i s) g, refl },
204204
have et : f.top = g.top,
205205
{ refine @is_extensional.ext _ s _ _ _ (λ x, _),
206-
simp [f.down, g.down, ef] },
206+
simp [f.down, g.down, ef, -coe_fn_coe_base, -coe_fn_coe_trans, order_iso.coe_coe_fn, coe_coe_fn] },
207207
cases f, cases g, simp at ef et,
208208
have := order_embedding.eq_of_to_fun_eq ef; congr'
209209
end
@@ -268,8 +268,10 @@ end
268268
(f : r ≼i s) (g : s ≺i t) (a : α) : (f.le_lt g) a = g (f a) :=
269269
begin
270270
delta initial_seg.le_lt, cases h : f.lt_or_eq with f' f',
271-
{ simp [f.lt_or_eq_apply_left h] },
272-
{ simp [f.lt_or_eq_apply_right h] }
271+
{ simp [f.lt_or_eq_apply_left h,
272+
-coe_fn_coe_base, -coe_fn_coe_trans, order_iso.coe_coe_fn, principal_seg.coe_coe_fn] },
273+
{ simp [f.lt_or_eq_apply_right h,
274+
-coe_fn_coe_base, -coe_fn_coe_trans, order_iso.coe_coe_fn, principal_seg.coe_coe_fn] }
273275
end
274276

275277
namespace order_embedding
@@ -335,7 +337,8 @@ private def partial_wo.is_refl : is_refl _ (≤) :=
335337
local attribute [instance] partial_wo.is_refl
336338

337339
private def partial_wo.trans {a b c} : a ≤ b → b ≤ c → a ≤ c
338-
| ⟨f, hf⟩ ⟨g, hg⟩ := ⟨f.trans g, λ a, by simp [hf, hg]⟩
340+
| ⟨f, hf⟩ ⟨g, hg⟩ := ⟨f.trans g, λ a, by simp [hf, hg,
341+
-coe_fn_coe_base, -coe_fn_coe_trans, order_iso.coe_coe_fn, principal_seg.coe_coe_fn]⟩
339342

340343
private def sub_of_le {s t} : s ≤ t → s.1 ⊆ t.1
341344
| ⟨f, hf⟩ x h := by have := (f ⟨x, h⟩).2; rwa [hf ⟨x, h⟩] at this
@@ -772,7 +775,8 @@ theorem add_le_add_iff_left (a) {b c : ordinal} : a + b ≤ a + c ↔ b ≤ c :=
772775
⟨induction_on a $ λ α r _, induction_on b $ λ β₁ s₁ _, induction_on c $ λ β₂ s₂ _ ⟨f⟩, ⟨
773776
by exactI
774777
have fl : ∀ a, f (sum.inl a) = sum.inl a := λ a,
775-
by simpa using initial_seg.eq ((initial_seg.le_add r s₁).trans f) (initial_seg.le_add r s₂) a,
778+
by simpa [-coe_fn_coe_base, -coe_fn_coe_trans, order_iso.coe_coe_fn, principal_seg.coe_coe_fn]
779+
using initial_seg.eq ((initial_seg.le_add r s₁).trans f) (initial_seg.le_add r s₂) a,
776780
have ∀ b, {b' // f (sum.inr b) = sum.inr b'}, begin
777781
intro b, cases e : f (sum.inr b),
778782
{ rw ← fl at e, have := f.inj e, contradiction },
@@ -782,12 +786,14 @@ theorem add_le_add_iff_left (a) {b c : ordinal} : a + b ≤ a + c ↔ b ≤ c :=
782786
have fr : ∀ b, f (sum.inr b) = sum.inr (g b), from λ b, (this b).2,
783787
⟨⟨⟨g, λ x y h, by injection f.inj
784788
(by rw [fr, fr, h] : f (sum.inr x) = f (sum.inr y))⟩,
785-
λ a b, by simpa [fr] using @order_embedding.ord _ _ _ _
789+
λ a b, by simpa [fr, -coe_fn_coe_base, -coe_fn_coe_trans, order_iso.coe_coe_fn, principal_seg.coe_coe_fn]
790+
using @order_embedding.ord _ _ _ _
786791
f.to_order_embedding (sum.inr a) (sum.inr b)⟩,
787792
λ a b, begin
788793
have nex : ¬ ∃ (a : α), f (sum.inl a) = sum.inr b :=
789794
λ ⟨a, e⟩, by rw [fl] at e; injection e,
790-
simpa [fr, nex] using f.init (sum.inr a) (sum.inr b),
795+
simpa [fr, nex, -coe_fn_coe_base, -coe_fn_coe_trans, order_iso.coe_coe_fn, principal_seg.coe_coe_fn]
796+
using f.init (sum.inr a) (sum.inr b),
791797
end⟩⟩,
792798
λ h, add_le_add_left h _⟩
793799

@@ -2708,7 +2714,8 @@ end
27082714

27092715
@[simp] theorem aleph_idx.order_iso_coe :
27102716
(aleph_idx.order_iso : cardinal → ordinal) = aleph_idx :=
2711-
by delta aleph_idx.order_iso; simp
2717+
by delta aleph_idx.order_iso;
2718+
simp [-coe_fn_coe_base, -coe_fn_coe_trans, principal_seg.coe_coe_fn', initial_seg.coe_coe_fn]
27122719

27132720
@[simp] theorem type_cardinal : @ordinal.type cardinal (<) _ = ordinal.univ.{u (u+1)} :=
27142721
by rw ordinal.univ_id; exact quotient.sound ⟨aleph_idx.order_iso⟩

0 commit comments

Comments
 (0)