Skip to content

Commit 29d59de

Browse files
committed
Merge branch 'master' into dagur/RefactorLightProfiniteLimits
2 parents 8f464bc + c62c3b3 commit 29d59de

File tree

29 files changed

+107
-41
lines changed

29 files changed

+107
-41
lines changed

.github/workflows/lean4checker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
run: |
7070
git clone https://github.com/leanprover/lean4checker
7171
cd lean4checker
72-
git checkout v4.9.0
72+
git checkout v4.10.0
7373
# Now that the git hash is embedded in each olean,
7474
# we need to compile lean4checker on the same toolchain
7575
cp ../lean-toolchain .

Mathlib/Algebra/Group/Units.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ theorem eq_iff {a b : αˣ} : (a : α) = b ↔ a = b :=
134134
ext.eq_iff
135135
136136
@[to_additive]
137-
theorem ext_iff {a b : αˣ} : a = b ↔ (a : α) = b :=
137+
protected theorem ext_iff {a b : αˣ} : a = b ↔ (a : α) = b :=
138138
eq_iff.symm
139139
140140
/-- Units have decidable equality if the base `Monoid` has decidable equality. -/

Mathlib/Algebra/Homology/DerivedCategory/Ext.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ lemma comp_hom {a b : ℕ} (α : Ext X Y a) (β : Ext Y Z b) {c : ℕ} (h : a +
129129
lemma ext {n : ℕ} {α β : Ext X Y n} (h : α.hom = β.hom) : α = β :=
130130
homEquiv.injective h
131131

132-
lemma ext_iff {n : ℕ} {α β : Ext X Y n} : α = β ↔ α.hom = β.hom :=
132+
protected lemma ext_iff {n : ℕ} {α β : Ext X Y n} : α = β ↔ α.hom = β.hom :=
133133
fun h ↦ by rw [h], ext⟩
134134

135135
end

Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ instance : Coe (Cocycle F G n) (Cochain F G n) where
604604
lemma ext (z₁ z₂ : Cocycle F G n) (h : (z₁ : Cochain F G n) = z₂) : z₁ = z₂ :=
605605
Subtype.ext h
606606

607-
lemma ext_iff (z₁ z₂ : Cocycle F G n) : z₁ = z₂ ↔ (z₁ : Cochain F G n) = z₂ :=
607+
protected lemma ext_iff (z₁ z₂ : Cocycle F G n) : z₁ = z₂ ↔ (z₁ : Cochain F G n) = z₂ :=
608608
Subtype.ext_iff
609609

610610
instance : SMul R (Cocycle F G n) where

Mathlib/Algebra/Lie/Weights/Basic.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ variable {M}
208208
@[ext] lemma ext {χ₁ χ₂ : Weight R L M} (h : ∀ x, χ₁ x = χ₂ x) : χ₁ = χ₂ := by
209209
cases' χ₁ with f₁ _; cases' χ₂ with f₂ _; aesop
210210

211-
lemma ext_iff {χ₁ χ₂ : Weight R L M} : (χ₁ : L → R) = χ₂ ↔ χ₁ = χ₂ := by aesop
211+
protected lemma ext_iff {χ₁ χ₂ : Weight R L M} : χ₁ = χ₂ ↔ (χ₁ : L → R) = χ₂ := by aesop
212212

213213
lemma exists_ne_zero (χ : Weight R L M) :
214214
∃ x ∈ weightSpace M χ, x ≠ 0 := by
@@ -236,7 +236,7 @@ def IsZero (χ : Weight R L M) := (χ : L → R) = 0
236236
@[simp] lemma coe_eq_zero_iff (χ : Weight R L M) : (χ : L → R) = 0 ↔ χ.IsZero := Iff.rfl
237237

238238
lemma isZero_iff_eq_zero [Nontrivial (weightSpace M (0 : L → R))] {χ : Weight R L M} :
239-
χ.IsZero ↔ χ = 0 := ext_iff (χ₂ := 0)
239+
χ.IsZero ↔ χ = 0 := Weight.ext_iff (χ₂ := 0).symm
240240

241241
lemma isZero_zero [Nontrivial (weightSpace M (0 : L → R))] : IsZero (0 : Weight R L M) := rfl
242242

Mathlib/Algebra/Module/LinearMap/Defs.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ protected theorem congr_arg {x x' : M} : x = x' → f x = f x' :=
322322
protected theorem congr_fun (h : f = g) (x : M) : f x = g x :=
323323
DFunLike.congr_fun h x
324324

325-
theorem ext_iff : f = g ↔ ∀ x, f x = g x :=
325+
protected theorem ext_iff : f = g ↔ ∀ x, f x = g x :=
326326
DFunLike.ext_iff
327327

328328
@[simp]

Mathlib/Algebra/MvPolynomial/Basic.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ theorem support_mul [DecidableEq σ] (p q : MvPolynomial σ R) :
529529
theorem ext (p q : MvPolynomial σ R) : (∀ m, coeff m p = coeff m q) → p = q :=
530530
Finsupp.ext
531531

532-
theorem ext_iff (p q : MvPolynomial σ R) : p = q ↔ ∀ m, coeff m p = coeff m q :=
532+
protected theorem ext_iff (p q : MvPolynomial σ R) : p = q ↔ ∀ m, coeff m p = coeff m q :=
533533
fun h m => by rw [h], ext p q⟩
534534

535535
@[simp]

Mathlib/Algebra/Ring/Hom/Defs.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ variable (f : α →ₙ+* β) {x y : α}
155155
theorem ext ⦃f g : α →ₙ+* β⦄ : (∀ x, f x = g x) → f = g :=
156156
DFunLike.ext _ _
157157

158-
theorem ext_iff {f g : α →ₙ+* β} : f = g ↔ ∀ x, f x = g x :=
158+
protected theorem ext_iff {f g : α →ₙ+* β} : f = g ↔ ∀ x, f x = g x :=
159159
DFunLike.ext_iff
160160

161161
@[simp]
@@ -455,7 +455,7 @@ theorem coe_inj ⦃f g : α →+* β⦄ (h : (f : α → β) = g) : f = g :=
455455
theorem ext ⦃f g : α →+* β⦄ : (∀ x, f x = g x) → f = g :=
456456
DFunLike.ext _ _
457457

458-
theorem ext_iff {f g : α →+* β} : f = g ↔ ∀ x, f x = g x :=
458+
protected theorem ext_iff {f g : α →+* β} : f = g ↔ ∀ x, f x = g x :=
459459
DFunLike.ext_iff
460460

461461
@[simp]

Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def metricSpaceAux : MetricSpace ℍ where
112112
dist_comm := UpperHalfPlane.dist_comm
113113
dist_triangle := UpperHalfPlane.dist_triangle
114114
eq_of_dist_eq_zero {z w} h := by
115-
simpa [dist_eq, Real.sqrt_eq_zero', (mul_pos z.im_pos w.im_pos).not_le, ext_iff] using h
115+
simpa [dist_eq, Real.sqrt_eq_zero', (mul_pos z.im_pos w.im_pos).not_le, Set.ext_iff] using h
116116

117117
open Complex
118118

Mathlib/Analysis/Normed/Group/Hom.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ theorem coe_inj_iff : f = g ↔ (f : V₁ → V₂) = g :=
104104
theorem ext (H : ∀ x, f x = g x) : f = g :=
105105
coe_inj <| funext H
106106

107-
theorem ext_iff : f = g ↔ ∀ x, f x = g x :=
107+
protected theorem ext_iff : f = g ↔ ∀ x, f x = g x :=
108108
by rintro rfl x; rfl, ext⟩
109109

110110
variable (f g)

Mathlib/Data/Complex/Basic.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ theorem ext : ∀ {z w : ℂ}, z.re = w.re → z.im = w.im → z = w
5757

5858
attribute [local ext] Complex.ext
5959

60-
theorem ext_iff {z w : ℂ} : z = w ↔ z.re = w.re ∧ z.im = w.im :=
60+
protected theorem ext_iff {z w : ℂ} : z = w ↔ z.re = w.re ∧ z.im = w.im :=
6161
fun H => by simp [H], fun h => ext h.1 h.2
6262

6363
theorem re_surjective : Surjective re := fun x => ⟨⟨x, 0⟩, rfl⟩

Mathlib/Data/Finsupp/Defs.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ noncomputable def _root_.Equiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →
212212
theorem unique_ext [Unique α] {f g : α →₀ M} (h : f default = g default) : f = g :=
213213
ext fun a => by rwa [Unique.eq_default a]
214214

215-
theorem unique_ext_iff [Unique α] {f g : α →₀ M} : f = g ↔ f default = g default :=
215+
protected theorem unique_ext_iff [Unique α] {f g : α →₀ M} : f = g ↔ f default = g default :=
216216
fun h => h ▸ rfl, unique_ext⟩
217217

218218
end Basic

Mathlib/Data/List/AList.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace AList
6060
theorem ext : ∀ {s t : AList β}, s.entries = t.entries → s = t
6161
| ⟨l₁, h₁⟩, ⟨l₂, _⟩, H => by congr
6262

63-
theorem ext_iff {s t : AList β} : s = t ↔ s.entries = t.entries :=
63+
protected theorem ext_iff {s t : AList β} : s = t ↔ s.entries = t.entries :=
6464
⟨congr_arg _, ext⟩
6565

6666
instance [DecidableEq α] [∀ a, DecidableEq (β a)] : DecidableEq (AList β) := fun xs ys => by

Mathlib/Data/Prod/Basic.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ lemma mk_inj_left {a : α} {b₁ b₂ : β} : (a, b₁) = (a, b₂) ↔ b₁ = b
9898

9999
lemma mk_inj_right {a₁ a₂ : α} {b : β} : (a₁, b) = (a₂, b) ↔ a₁ = a₂ := (mk.inj_right _).eq_iff
100100

101-
theorem ext_iff {p q : α × β} : p = q ↔ p.1 = q.1 ∧ p.2 = q.2 := by
101+
protected theorem ext_iff {p q : α × β} : p = q ↔ p.1 = q.1 ∧ p.2 = q.2 := by
102102
rw [mk.inj_iff]
103103

104104
theorem map_def {f : α → γ} {g : β → δ} : Prod.map f g = fun p : α × β ↦ (f p.1, g p.2) :=

Mathlib/Data/Set/Basic.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ variable {α : Type u} {β : Type v} {γ : Type w} {ι : Sort x} {a b : α} {s s
187187
instance : Inhabited (Set α) :=
188188
⟨∅⟩
189189

190-
theorem ext_iff {s t : Set α} : s = t ↔ ∀ x, x ∈ s ↔ x ∈ t :=
190+
protected theorem ext_iff {s t : Set α} : s = t ↔ ∀ x, x ∈ s ↔ x ∈ t :=
191191
fun h x => by rw [h], ext⟩
192192

193193
@[trans]

Mathlib/Data/Sigma/Basic.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ theorem mk.inj_iff {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂} :
6161
theorem eta : ∀ x : Σa, β a, Sigma.mk x.1 x.2 = x
6262
| ⟨_, _⟩ => rfl
6363

64-
theorem ext_iff {x₀ x₁ : Sigma β} : x₀ = x₁ ↔ x₀.1 = x₁.1 ∧ HEq x₀.2 x₁.2 := by
64+
protected theorem ext_iff {x₀ x₁ : Sigma β} : x₀ = x₁ ↔ x₀.1 = x₁.1 ∧ HEq x₀.2 x₁.2 := by
6565
cases x₀; cases x₁; exact Sigma.mk.inj_iff
6666

6767
/-- A version of `Iff.mp Sigma.ext_iff` for functions from a nonempty type to a sigma type. -/

Mathlib/Data/Subtype.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ protected theorem exists' {q : ∀ x, p x → Prop} : (∃ x h, q x h) ↔ ∃ x
5959
protected theorem ext : ∀ {a1 a2 : { x // p x }}, (a1 : α) = (a2 : α) → a1 = a2
6060
| ⟨_, _⟩, ⟨_, _⟩, rfl => rfl
6161

62-
theorem ext_iff {a1 a2 : { x // p x }} : a1 = a2 ↔ (a1 : α) = (a2 : α) :=
62+
protected theorem ext_iff {a1 a2 : { x // p x }} : a1 = a2 ↔ (a1 : α) = (a2 : α) :=
6363
⟨congr_arg _, Subtype.ext⟩
6464

6565
theorem heq_iff_coe_eq (h : ∀ x, p x ↔ q x) {a1 : { x // p x }} {a2 : { x // q x }} :
6666
HEq a1 a2 ↔ (a1 : α) = (a2 : α) :=
6767
Eq.rec (motive := fun (pp : (α → Prop)) _ ↦ ∀ a2' : {x // pp x}, HEq a1 a2' ↔ (a1 : α) = (a2' : α))
68-
(fun _ ↦ heq_iff_eq.trans ext_iff) (funext <| fun x ↦ propext (h x)) a2
68+
(fun _ ↦ heq_iff_eq.trans Subtype.ext_iff) (funext <| fun x ↦ propext (h x)) a2
6969

7070
lemma heq_iff_coe_heq {α β : Sort _} {p : α → Prop} {q : β → Prop} {a : {x // p x}}
7171
{b : {y // q y}} (h : α = β) (h' : HEq p q) : HEq a b ↔ HEq (a : α) (b : β) := by

Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ theorem map_one_add (x : ℝ) : f (1 + x) = 1 + f x := by rw [add_comm, map_add_
161161
theorem ext ⦃f g : CircleDeg1Lift⦄ (h : ∀ x, f x = g x) : f = g :=
162162
DFunLike.ext f g h
163163

164-
theorem ext_iff {f g : CircleDeg1Lift} : f = g ↔ ∀ x, f x = g x :=
164+
protected theorem ext_iff {f g : CircleDeg1Lift} : f = g ↔ ∀ x, f x = g x :=
165165
DFunLike.ext_iff
166166

167167
instance : Monoid CircleDeg1Lift where

Mathlib/FieldTheory/IntermediateField.lean

+67-2
Original file line numberDiff line numberDiff line change
@@ -603,13 +603,68 @@ end RestrictScalars
603603
/-- This was formerly an instance called `lift2_alg`, but an instance above already provides it. -/
604604
example {F : IntermediateField K L} {E : IntermediateField F L} : Algebra K E := by infer_instance
605605

606+
end Tower
607+
608+
end IntermediateField
609+
606610
section ExtendScalars
607611

612+
namespace Subfield
613+
614+
variable {F E E' : Subfield L} (h : F ≤ E) (h' : F ≤ E') {x : L}
615+
616+
/-- If `F ≤ E` are two subfields of `L`, then `E` is also an intermediate field of
617+
`L / F`. It can be viewed as an inverse to `IntermediateField.toSubfield`. -/
618+
def extendScalars : IntermediateField F L := E.toIntermediateField fun ⟨_, hf⟩ ↦ h hf
619+
620+
@[simp]
621+
theorem coe_extendScalars : (extendScalars h : Set L) = (E : Set L) := rfl
622+
623+
@[simp]
624+
theorem extendScalars_toSubfield : (extendScalars h).toSubfield = E := SetLike.coe_injective rfl
625+
626+
@[simp]
627+
theorem mem_extendScalars : x ∈ extendScalars h ↔ x ∈ E := Iff.rfl
628+
629+
theorem extendScalars_le_extendScalars_iff : extendScalars h ≤ extendScalars h' ↔ E ≤ E' := Iff.rfl
630+
631+
theorem extendScalars_le_iff (E' : IntermediateField F L) :
632+
extendScalars h ≤ E' ↔ E ≤ E'.toSubfield := Iff.rfl
633+
634+
theorem le_extendScalars_iff (E' : IntermediateField F L) :
635+
E' ≤ extendScalars h ↔ E'.toSubfield ≤ E := Iff.rfl
636+
637+
variable (F)
638+
639+
/-- `Subfield.extendScalars.orderIso` bundles `Subfield.extendScalars`
640+
into an order isomorphism from
641+
`{ E : Subfield L // F ≤ E }` to `IntermediateField F L`. Its inverse is
642+
`IntermediateField.toSubfield`. -/
643+
@[simps]
644+
def extendScalars.orderIso :
645+
{ E : Subfield L // F ≤ E } ≃o IntermediateField F L where
646+
toFun E := extendScalars E.2
647+
invFun E := ⟨E.toSubfield, fun x hx ↦ E.algebraMap_mem ⟨x, hx⟩⟩
648+
left_inv E := rfl
649+
right_inv E := rfl
650+
map_rel_iff' {E E'} := by
651+
simp only [Equiv.coe_fn_mk]
652+
exact extendScalars_le_extendScalars_iff _ _
653+
654+
theorem extendScalars_injective :
655+
Function.Injective fun E : { E : Subfield L // F ≤ E } ↦ extendScalars E.2 :=
656+
(extendScalars.orderIso F).injective
657+
658+
end Subfield
659+
660+
namespace IntermediateField
661+
608662
variable {F E E' : IntermediateField K L} (h : F ≤ E) (h' : F ≤ E') {x : L}
609663

610664
/-- If `F ≤ E` are two intermediate fields of `L / K`, then `E` is also an intermediate field of
611665
`L / F`. It can be viewed as an inverse to `IntermediateField.restrictScalars`. -/
612-
def extendScalars : IntermediateField F L := E.toSubfield.toIntermediateField fun ⟨_, hf⟩ ↦ h hf
666+
def extendScalars : IntermediateField F L :=
667+
Subfield.extendScalars (show F.toSubfield ≤ E.toSubfield from h)
613668

614669
@[simp]
615670
theorem coe_extendScalars : (extendScalars h : Set L) = (E : Set L) := rfl
@@ -634,9 +689,11 @@ theorem le_extendScalars_iff (E' : IntermediateField F L) :
634689

635690
variable (F)
636691

637-
/-- `IntermediateField.extendScalars` is an order isomorphism from
692+
/-- `IntermediateField.extendScalars.orderIso` bundles `IntermediateField.extendScalars`
693+
into an order isomorphism from
638694
`{ E : IntermediateField K L // F ≤ E }` to `IntermediateField F L`. Its inverse is
639695
`IntermediateField.restrictScalars`. -/
696+
@[simps]
640697
def extendScalars.orderIso : { E : IntermediateField K L // F ≤ E } ≃o IntermediateField F L where
641698
toFun E := extendScalars E.2
642699
invFun E := ⟨E.restrictScalars K, fun x hx ↦ E.algebraMap_mem ⟨x, hx⟩⟩
@@ -650,8 +707,16 @@ theorem extendScalars_injective :
650707
Function.Injective fun E : { E : IntermediateField K L // F ≤ E } ↦ extendScalars E.2 :=
651708
(extendScalars.orderIso F).injective
652709

710+
end IntermediateField
711+
653712
end ExtendScalars
654713

714+
namespace IntermediateField
715+
716+
variable {S}
717+
718+
section Tower
719+
655720
section Restrict
656721

657722
variable {F E : IntermediateField K L} (h : F ≤ E)

Mathlib/GroupTheory/GroupAction/Hom.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ theorem ext {f g : X →ₑ[φ] Y} :
156156
(∀ x, f x = g x) → f = g :=
157157
DFunLike.ext f g
158158

159-
theorem ext_iff {f g : X →ₑ[φ] Y} :
159+
protected theorem ext_iff {f g : X →ₑ[φ] Y} :
160160
f = g ↔ ∀ x, f x = g x :=
161161
DFunLike.ext_iff
162162

Mathlib/GroupTheory/MonoidLocalization/Basic.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ theorem ext {f g : LocalizationMap S N} (h : ∀ x, f.toMap x = g.toMap x) : f =
387387
exact OneHom.ext h
388388

389389
@[to_additive]
390-
theorem ext_iff {f g : LocalizationMap S N} : f = g ↔ ∀ x, f.toMap x = g.toMap x :=
390+
protected theorem ext_iff {f g : LocalizationMap S N} : f = g ↔ ∀ x, f.toMap x = g.toMap x :=
391391
fun h _ ↦ h ▸ rfl, ext⟩
392392

393393
@[to_additive]

Mathlib/LinearAlgebra/Alternating/Basic.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ theorem coe_inj {f g : M [⋀^ι]→ₗ[R] N} : (f : (ι → M) → N) = g ↔ f
125125
theorem ext {f f' : M [⋀^ι]→ₗ[R] N} (H : ∀ x, f x = f' x) : f = f' :=
126126
DFunLike.ext _ _ H
127127

128-
theorem ext_iff {f g : M [⋀^ι]→ₗ[R] N} : f = g ↔ ∀ x, f x = g x :=
128+
protected theorem ext_iff {f g : M [⋀^ι]→ₗ[R] N} : f = g ↔ ∀ x, f x = g x :=
129129
fun h _ => h ▸ rfl, fun h => ext h⟩
130130

131131
attribute [coe] AlternatingMap.toMultilinearMap

Mathlib/LinearAlgebra/Multilinear/Basic.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ theorem coe_inj {f g : MultilinearMap R M₁ M₂} : (f : (∀ i, M₁ i) → M
138138
theorem ext {f f' : MultilinearMap R M₁ M₂} (H : ∀ x, f x = f' x) : f = f' :=
139139
DFunLike.ext _ _ H
140140

141-
theorem ext_iff {f g : MultilinearMap R M₁ M₂} : f = g ↔ ∀ x, f x = g x :=
141+
protected theorem ext_iff {f g : MultilinearMap R M₁ M₂} : f = g ↔ ∀ x, f x = g x :=
142142
DFunLike.ext_iff
143143

144144
@[simp]

Mathlib/Logic/Equiv/Defs.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected theorem Perm.congr_arg {f : Equiv.Perm α} {x x' : α} : x = x' → f
134134
protected theorem Perm.congr_fun {f g : Equiv.Perm α} (h : f = g) (x : α) : f x = g x :=
135135
Equiv.congr_fun h x
136136

137-
theorem Perm.ext_iff {σ τ : Equiv.Perm α} : σ = τ ↔ ∀ x, σ x = τ x := Equiv.ext_iff
137+
protected theorem Perm.ext_iff {σ τ : Equiv.Perm α} : σ = τ ↔ ∀ x, σ x = τ x := Equiv.ext_iff
138138

139139
/-- Any type is equivalent to itself. -/
140140
@[refl] protected def refl (α : Sort*) : α ≃ α := ⟨id, id, fun _ => rfl, fun _ => rfl⟩

Mathlib/Order/Filter/Basic.lean

+5-5
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ theorem filter_eq : ∀ {f g : Filter α}, f.sets = g.sets → f = g
120120
theorem filter_eq_iff : f = g ↔ f.sets = g.sets :=
121121
⟨congr_arg _, filter_eq⟩
122122

123-
protected theorem ext_iff : f = g ↔ ∀ s, s ∈ f ↔ s ∈ g := by
124-
simp only [filter_eq_iff, ext_iff, Filter.mem_sets]
125-
126123
@[ext]
127-
protected theorem ext : (∀ s, s ∈ f ↔ s ∈ g) → f = g :=
128-
Filter.ext_iff.2
124+
protected theorem ext (h : ∀ s, s ∈ f ↔ s ∈ g) : f = g := by
125+
simpa [filter_eq_iff, Set.ext_iff, Filter.mem_sets]
126+
127+
protected theorem ext_iff : f = g ↔ ∀ s, s ∈ f ↔ s ∈ g :=
128+
by rintro rfl s; rfl, Filter.ext⟩
129129

130130
/-- An extensionality lemma that is useful for filters with good lemmas about `sᶜ ∈ f` (e.g.,
131131
`Filter.comap`, `Filter.coprod`, `Filter.Coprod`, `Filter.cofinite`). -/

Mathlib/Topology/Algebra/Module/Basic.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ initialize_simps_projections ContinuousLinearMap (toLinearMap_toFun → apply, t
425425
theorem ext {f g : M₁ →SL[σ₁₂] M₂} (h : ∀ x, f x = g x) : f = g :=
426426
DFunLike.ext f g h
427427

428-
theorem ext_iff {f g : M₁ →SL[σ₁₂] M₂} : f = g ↔ ∀ x, f x = g x :=
428+
protected theorem ext_iff {f g : M₁ →SL[σ₁₂] M₂} : f = g ↔ ∀ x, f x = g x :=
429429
DFunLike.ext_iff
430430

431431
/-- Copy of a `ContinuousLinearMap` with a new `toFun` equal to the old one. Useful to fix
@@ -475,7 +475,7 @@ theorem coe_coe (f : M₁ →SL[σ₁₂] M₂) : ⇑(f : M₁ →ₛₗ[σ₁
475475
theorem ext_ring [TopologicalSpace R₁] {f g : R₁ →L[R₁] M₁} (h : f 1 = g 1) : f = g :=
476476
coe_inj.1 <| LinearMap.ext_ring h
477477

478-
theorem ext_ring_iff [TopologicalSpace R₁] {f g : R₁ →L[R₁] M₁} : f = g ↔ f 1 = g 1 :=
478+
protected theorem ext_ring_iff [TopologicalSpace R₁] {f g : R₁ →L[R₁] M₁} : f = g ↔ f 1 = g 1 :=
479479
fun h => h ▸ rfl, ext_ring⟩
480480

481481
/-- If two continuous linear maps are equal on a set `s`, then they are equal on the closure

0 commit comments

Comments
 (0)