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

Commit bcfaabf

Browse files
committed
feat(data/set_like): remove repeated boilerplate from subobjects (#6768)
This just scratches the surface, and removes all of the boilerplate that is just a consequence of the injective map to a `set`. Already this trims more than 150 lines. For every lemma of the form `set_like.*` added in this PR, the corresponding `submonoid.*`, `add_submonoid.*`, `sub_mul_action.*`, `submodule.*`, `subsemiring.*`, `subring.*`, `subfield.*`, `subalgebra.*`, and `intermediate_field.*` lemmas have been removed. Often these lemmas only existed for one or two of these subtypes, so this means that we have lemmas for more things not fewer. Note that while the `ext_iff`, `ext'`, and `ext'_iff` lemmas have been removed, we still need the `ext` lemma as `set_like.ext` cannot directly be tagged `@[ext]`.
1 parent b0ece6f commit bcfaabf

Some content is hidden

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

62 files changed

+389
-560
lines changed

src/algebra/algebra/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ variables (R S M)
14801480

14811481
lemma restrict_scalars_injective :
14821482
function.injective (restrict_scalars R : submodule S M → submodule R M) :=
1483-
λ V₁ V₂ h, ext $ by convert set.ext_iff.1 (ext'_iff.1 h); refl
1483+
λ V₁ V₂ h, ext $ by convert set.ext_iff.1 (set_like.ext'_iff.1 h); refl
14841484

14851485
@[simp] lemma restrict_scalars_inj {V₁ V₂ : submodule S M} :
14861486
restrict_scalars R V₁ = restrict_scalars R V₂ ↔ V₁ = V₂ :=

src/algebra/algebra/operations.lean

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ variables (M)
207207
lemma pow_subset_pow {n : ℕ} : (↑M : set A)^n ⊆ ↑(M^n : submodule R A) :=
208208
begin
209209
induction n with n ih,
210-
{ erw [pow_zero, pow_zero, set.singleton_subset_iff], rw [mem_coe, ← one_le], exact le_refl _ },
210+
{ erw [pow_zero, pow_zero, set.singleton_subset_iff],
211+
rw [set_like.mem_coe, ← one_le],
212+
exact le_refl _ },
211213
{ rw [pow_succ, pow_succ],
212214
refine set.subset.trans (set.mul_subset_mul (subset.refl _) ih) _,
213215
apply mul_subset_mul }
@@ -275,7 +277,7 @@ begin
275277
apply le_antisymm,
276278
{ rw span_le,
277279
rintros _ ⟨b, m, hb, hm, rfl⟩,
278-
rw [mem_coe, mem_map, set.mem_singleton_iff.mp hb],
280+
rw [set_like.mem_coe, mem_map, set.mem_singleton_iff.mp hb],
279281
exact ⟨m, hm, rfl⟩ },
280282
{ rintros _ ⟨m, hm, rfl⟩, exact subset_span ⟨a, m, set.mem_singleton a, hm, rfl⟩ }
281283
end

src/algebra/algebra/subalgebra.lean

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,13 @@ variables {R : Type u} {A : Type v} {B : Type w}
3434
variables [comm_semiring R] [semiring A] [algebra R A] [semiring B] [algebra R B]
3535
include R
3636

37-
/- While we could add coercion aliases for `to_subsemiring` and `to_submodule`, they're not needed
38-
very often, harder to use than the projections themselves, and none of the other subobjects define
39-
that type of coercion. -/
40-
instance : has_coe_t (subalgebra R A) (set A) := ⟨λ s, s.carrier⟩
41-
instance : has_mem A (subalgebra R A) := ⟨λ x p, x ∈ (p : set A)⟩
42-
instance : has_coe_to_sort (subalgebra R A) := ⟨_, λ p, {x : A // x ∈ p}⟩
43-
44-
lemma coe_injective : function.injective (coe : subalgebra R A → set A) :=
45-
λ S T h, by cases S; cases T; congr'
37+
instance : set_like (subalgebra R A) A :=
38+
⟨subalgebra.carrier, λ p q h, by cases p; cases q; congr'⟩
4639

4740
@[simp]
4841
lemma mem_carrier {s : subalgebra R A} {x : A} : x ∈ s.carrier ↔ x ∈ s := iff.rfl
4942

50-
@[simp] theorem mem_coe {s : subalgebra R A} {x : A} : x ∈ (s : set A) ↔ x ∈ s := iff.rfl
51-
52-
@[ext] theorem ext {S T : subalgebra R A} (h : ∀ x : A, x ∈ S ↔ x ∈ T) : S = T :=
53-
coe_injective $ set.ext h
54-
55-
theorem ext_iff {S T : subalgebra R A} : S = T ↔ (∀ x : A, x ∈ S ↔ x ∈ T) :=
56-
coe_injective.eq_iff.symm.trans set.ext_iff
43+
@[ext] theorem ext {S T : subalgebra R A} (h : ∀ x : A, x ∈ S ↔ x ∈ T) : S = T := set_like.ext h
5744

5845
variables (S : subalgebra R A)
5946

@@ -287,12 +274,6 @@ we define it as a `linear_equiv` to avoid type equalities. -/
287274
def to_submodule_equiv (S : subalgebra R A) : S.to_submodule ≃ₗ[R] S :=
288275
linear_equiv.of_eq _ _ rfl
289276

290-
instance : partial_order (subalgebra R A) :=
291-
{ le := λ p q, ∀ ⦃x⦄, x ∈ p → x ∈ q,
292-
..partial_order.lift (coe : subalgebra R A → set A) coe_injective }
293-
294-
lemma le_def {p q : subalgebra R A} : p ≤ q ↔ (p : set A) ⊆ q := iff.rfl
295-
296277
/-- Reinterpret an `S`-subalgebra as an `R`-subalgebra in `comap R S A`. -/
297278
def comap {R : Type u} {S : Type v} {A : Type w}
298279
[comm_semiring R] [comm_semiring S] [semiring A] [algebra R S] [algebra S A]
@@ -329,7 +310,7 @@ set.image_subset_iff
329310

330311
lemma map_injective {S₁ S₂ : subalgebra R A} (f : A →ₐ[R] B)
331312
(hf : function.injective f) (ih : S₁.map f = S₂.map f) : S₁ = S₂ :=
332-
ext $ set.ext_iff.1 $ set.image_injective.2 hf $ set.ext $ ext_iff.mp ih
313+
ext $ set.ext_iff.1 $ set.image_injective.2 hf $ set.ext $ set_like.ext_iff.mp ih
333314

334315
lemma mem_map {S : subalgebra R A} {f : A →ₐ[R] B} {y : B} :
335316
y ∈ map S f ↔ ∃ x ∈ S, f x = y :=
@@ -369,7 +350,7 @@ protected def range (φ : A →ₐ[R] B) : subalgebra R B :=
369350
theorem mem_range_self (φ : A →ₐ[R] B) (x : A) : φ x ∈ φ.range := φ.mem_range.2 ⟨x, rfl⟩
370351

371352
@[simp] lemma coe_range (φ : A →ₐ[R] B) : (φ.range : set B) = set.range φ :=
372-
by { ext, rw [subalgebra.mem_coe, mem_range], refl }
353+
by { ext, rw [set_like.mem_coe, mem_range], refl }
373354

374355
/-- Restrict the codomain of an algebra homomorphism. -/
375356
def cod_restrict (f : A →ₐ[R] B) (S : subalgebra R B) (hf : ∀ x, f x ∈ S) : A →ₐ[R] S :=
@@ -487,7 +468,7 @@ instance : inhabited (subalgebra R A) := ⟨⊥⟩
487468

488469
theorem mem_bot {x : A} : x ∈ (⊥ : subalgebra R A) ↔ x ∈ set.range (algebra_map R A) :=
489470
suffices (of_id R A).range = (⊥ : subalgebra R A),
490-
by { rw [← this, ←subalgebra.mem_coe, alg_hom.coe_range], refl },
471+
by { rw [← this, ←set_like.mem_coe, alg_hom.coe_range], refl },
491472
le_bot_iff.mp (λ x hx, subalgebra.range_le _ ((of_id R A).coe_range ▸ hx))
492473

493474
theorem to_submodule_bot : (⊥ : subalgebra R A).to_submodule = R ∙ 1 :=

src/algebra/direct_limit.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ that respect the directed system structure (i.e. make some diagram commute) give
9696
to a unique map out of the direct limit. -/
9797
def lift : direct_limit G f →ₗ[R] P :=
9898
liftq _ (direct_sum.to_module R ι P g)
99-
(span_le.2 $ λ a ⟨i, j, hij, x, hx⟩, by rw [← hx, mem_coe, linear_map.sub_mem_ker_iff,
99+
(span_le.2 $ λ a ⟨i, j, hij, x, hx⟩, by rw [← hx, set_like.mem_coe, linear_map.sub_mem_ker_iff,
100100
direct_sum.to_module_lof, direct_sum.to_module_lof, Hg])
101101
variables {R ι G f}
102102

@@ -503,7 +503,7 @@ ideal.quotient.lift _ (free_comm_ring.lift $ λ (x : Σ i, G i), g x.1 x.2) begi
503503
ideal.comap (free_comm_ring.lift (λ (x : Σ (i : ι), G i), g (x.fst) (x.snd))) ⊥,
504504
{ intros x hx, exact (mem_bot P).1 (this hx) },
505505
rw ideal.span_le, intros x hx,
506-
rw [mem_coe, ideal.mem_comap, mem_bot],
506+
rw [set_like.mem_coe, ideal.mem_comap, mem_bot],
507507
rcases hx with ⟨i, j, hij, x, rfl⟩ | ⟨i, rfl⟩ | ⟨i, x, y, rfl⟩ | ⟨i, x, y, rfl⟩;
508508
simp only [ring_hom.map_sub, lift_of, Hg, ring_hom.map_one, ring_hom.map_add, ring_hom.map_mul,
509509
(g i).map_one, (g i).map_add, (g i).map_mul, sub_self]

src/algebra/lie/cartan_subalgebra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ lemma mem_normalizer_iff (x : L) : x ∈ H.normalizer ↔ ∀ (y : L), (y ∈ H)
4545
lemma le_normalizer : H ≤ H.normalizer :=
4646
begin
4747
rw le_def, intros x hx,
48-
simp only [submodule.mem_coe, mem_coe_submodule, coe_coe, mem_normalizer_iff] at ⊢ hx,
48+
simp only [set_like.mem_coe, mem_coe_submodule, coe_coe, mem_normalizer_iff] at ⊢ hx,
4949
intros y, exact H.lie_mem hx,
5050
end
5151

src/algebra/lie/subalgebra.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ lemma coe_injective : function.injective (coe : lie_subalgebra R L → set L) :=
114114

115115
lemma to_submodule_injective :
116116
function.injective (coe : lie_subalgebra R L → submodule R L) :=
117-
λ L₁' L₂' h, by { rw submodule.ext'_iff at h, rw ← coe_set_eq, exact h, }
117+
λ L₁' L₂' h, by { rw set_like.ext'_iff at h, rw ← coe_set_eq, exact h, }
118118

119119
@[simp] lemma coe_to_submodule_eq_iff (L₁' L₂' : lie_subalgebra R L) :
120120
(L₁' : submodule R L) = (L₂' : submodule R L) ↔ L₁' = L₂' :=
@@ -338,7 +338,7 @@ def hom_of_le : K →ₗ⁅R⁆ K' :=
338338
lemma hom_of_le_apply (x : K) : hom_of_le h x = ⟨x.1, h x.2⟩ := rfl
339339

340340
lemma hom_of_le_injective : function.injective (hom_of_le h) :=
341-
λ x y, by simp only [hom_of_le_apply, imp_self, subtype.mk_eq_mk, submodule.coe_eq_coe,
341+
λ x y, by simp only [hom_of_le_apply, imp_self, subtype.mk_eq_mk, set_like.coe_eq_coe,
342342
subtype.val_eq_coe]
343343

344344
/-- Given two nested Lie subalgebras `K ⊆ K'`, we can view `K` as a Lie subalgebra of `K'`,

src/algebra/lie/submodule.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def hom_of_le : N →ₗ⁅R,L⁆ N' :=
337337
lemma hom_of_le_apply (m : N) : hom_of_le h m = ⟨m.1, h m.2⟩ := rfl
338338

339339
lemma hom_of_le_injective : function.injective (hom_of_le h) :=
340-
λ x y, by simp only [hom_of_le_apply, imp_self, subtype.mk_eq_mk, submodule.coe_eq_coe,
340+
λ x y, by simp only [hom_of_le_apply, imp_self, subtype.mk_eq_mk, set_like.coe_eq_coe,
341341
subtype.val_eq_coe]
342342

343343
end inclusion_maps
@@ -441,7 +441,7 @@ def comap : lie_ideal R L :=
441441

442442
@[simp] lemma map_coe_submodule (h : ↑(map f I) = f '' I) :
443443
(map f I : submodule R L') = (I : submodule R L).map f :=
444-
by { rw [submodule.ext'_iff, lie_submodule.coe_to_submodule, h, submodule.map_coe], refl, }
444+
by { rw [set_like.ext'_iff, lie_submodule.coe_to_submodule, h, submodule.map_coe], refl, }
445445

446446
@[simp] lemma comap_coe_submodule : (comap f J : submodule R L) = (J : submodule R L').comap f :=
447447
rfl
@@ -603,7 +603,7 @@ begin
603603
have hy' : ∃ (x : L), x ∈ I ∧ f x = y, { simpa [hy], },
604604
obtain ⟨z₂, hz₂, rfl⟩ := hy',
605605
obtain ⟨z₁, rfl⟩ := h x,
606-
simp only [lie_hom.coe_to_linear_map, submodule.mem_coe, set.mem_image,
606+
simp only [lie_hom.coe_to_linear_map, set_like.mem_coe, set.mem_image,
607607
lie_submodule.mem_coe_submodule, submodule.mem_carrier, submodule.map_coe],
608608
use ⁅z₁, z₂⁆,
609609
exact ⟨I.lie_mem hz₂, f.map_lie z₁ z₂⟩,
@@ -644,7 +644,7 @@ lemma hom_of_le_apply {I₁ I₂ : lie_ideal R L} (h : I₁ ≤ I₂) (x : I₁)
644644

645645
lemma hom_of_le_injective {I₁ I₂ : lie_ideal R L} (h : I₁ ≤ I₂) :
646646
function.injective (hom_of_le h) :=
647-
λ x y, by simp only [hom_of_le_apply, imp_self, subtype.mk_eq_mk, submodule.coe_eq_coe,
647+
λ x y, by simp only [hom_of_le_apply, imp_self, subtype.mk_eq_mk, set_like.coe_eq_coe,
648648
subtype.val_eq_coe]
649649

650650
@[simp] lemma map_sup_ker_eq_map : lie_ideal.map f (I ⊔ f.ker) = lie_ideal.map f I :=

src/algebra/module/submodule.lean

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -45,42 +45,26 @@ namespace submodule
4545

4646
variables [semiring R] [add_comm_monoid M] [semimodule R M]
4747

48-
instance : has_coe_t (submodule R M) (set M) := ⟨λ s, s.carrier⟩
49-
instance : has_mem M (submodule R M) := ⟨λ x p, x ∈ (p : set M)⟩
50-
instance : has_coe_to_sort (submodule R M) := ⟨_, λ p, {x : M // x ∈ p}⟩
48+
instance : set_like (submodule R M) M :=
49+
⟨submodule.carrier, λ p q h, by cases p; cases q; congr'⟩
5150

52-
variables (p q : submodule R M)
53-
54-
@[simp, norm_cast] theorem coe_sort_coe : ↥(p : set M) = p := rfl
55-
56-
variables {p q}
57-
58-
protected theorem «exists» {q : p → Prop} : (∃ x, q x) ↔ (∃ x ∈ p, q ⟨x, ‹_›⟩) := set_coe.exists
59-
60-
protected theorem «forall» {q : p → Prop} : (∀ x, q x) ↔ (∀ x ∈ p, q ⟨x, ‹_›⟩) := set_coe.forall
61-
62-
theorem coe_injective : injective (coe : submodule R M → set M) :=
63-
λ p q h, by cases p; cases q; congr'
64-
65-
@[simp, norm_cast] theorem coe_set_eq : (p : set M) = q ↔ p = q := coe_injective.eq_iff
51+
variables {p q : submodule R M}
6652

6753
@[simp] lemma mk_coe (S : set M) (h₁ h₂ h₃) :
6854
((⟨S, h₁, h₂, h₃⟩ : submodule R M) : set M) = S := rfl
6955

70-
theorem ext'_iff : p = q ↔ (p : set M) = q := coe_set_eq.symm
71-
72-
@[ext] theorem ext (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q := coe_injective $ set.ext h
56+
@[ext] theorem ext (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q := set_like.ext h
7357

7458
theorem to_add_submonoid_injective :
7559
injective (to_add_submonoid : submodule R M → add_submonoid M) :=
76-
λ p q h, ext'_iff.2 $ add_submonoid.ext'_iff.1 h
60+
λ p q h, set_like.ext'_iff.2 (show _, from set_like.ext'_iff.1 h)
7761

7862
@[simp] theorem to_add_submonoid_eq : p.to_add_submonoid = q.to_add_submonoid ↔ p = q :=
7963
to_add_submonoid_injective.eq_iff
8064

8165
theorem to_sub_mul_action_injective :
8266
injective (to_sub_mul_action : submodule R M → sub_mul_action R M) :=
83-
λ p q h, ext'_iff.2 $ sub_mul_action.ext'_iff.1 h
67+
λ p q h, set_like.ext'_iff.2 (show _, from set_like.ext'_iff.1 h)
8468

8569
@[simp] theorem to_sub_mul_action_eq : p.to_sub_mul_action = q.to_sub_mul_action ↔ p = q :=
8670
to_sub_mul_action_injective.eq_iff
@@ -104,8 +88,6 @@ variables [has_scalar S R] [semimodule S M] [is_scalar_tower S R M]
10488
variables (p)
10589
@[simp] lemma mem_carrier : x ∈ p.carrier ↔ x ∈ (p : set M) := iff.rfl
10690

107-
@[simp] theorem mem_coe : x ∈ (p : set M) ↔ x ∈ p := iff.rfl
108-
10991
@[simp] lemma zero_mem : (0 : M) ∈ p := p.zero_mem'
11092

11193
lemma add_mem (h₁ : x ∈ p) (h₂ : y ∈ p) : x + y ∈ p := p.add_mem' h₁ h₂
@@ -134,17 +116,15 @@ protected lemma nonempty : (p : set M).nonempty := ⟨0, p.zero_mem⟩
134116
@[simp] lemma mk_eq_zero {x} (h : x ∈ p) : (⟨x, h⟩ : p) = 0 ↔ x = 0 := subtype.ext_iff_val
135117

136118
variables {p}
137-
@[simp, norm_cast] lemma coe_eq_coe {x y : p} : (x : M) = y ↔ x = y := subtype.ext_iff_val.symm
138-
@[simp, norm_cast] lemma coe_eq_zero {x : p} : (x : M) = 0 ↔ x = 0 := @coe_eq_coe _ _ _ _ _ _ x 0
119+
@[simp, norm_cast] lemma coe_eq_zero {x : p} : (x : M) = 0 ↔ x = 0 :=
120+
(set_like.coe_eq_coe : (x : M) = (0 : p) ↔ x = 0)
139121
@[simp, norm_cast] lemma coe_add (x y : p) : (↑(x + y) : M) = ↑x + ↑y := rfl
140122
@[simp, norm_cast] lemma coe_zero : ((0 : p) : M) = 0 := rfl
141123
@[norm_cast] lemma coe_smul (r : R) (x : p) : ((r • x : p) : M) = r • ↑x := rfl
142124
@[simp, norm_cast] lemma coe_smul_of_tower (r : S) (x : p) : ((r • x : p) : M) = r • ↑x := rfl
143125
@[simp, norm_cast] lemma coe_mk (x : M) (hx : x ∈ p) : ((⟨x, hx⟩ : p) : M) = x := rfl
144126
@[simp] lemma coe_mem (x : p) : (x : M) ∈ p := x.2
145127

146-
@[simp] protected lemma eta (x : p) (hx : (x : M) ∈ p) : (⟨x, hx⟩ : p) = x := subtype.eta x hx
147-
148128
variables (p)
149129

150130
instance : add_comm_monoid p :=

src/algebra/module/submodule_lattice.lean

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,6 @@ variables {p q : submodule R M}
3030

3131
namespace submodule
3232

33-
instance : partial_order (submodule R M) :=
34-
{ le := λ p q, ∀ ⦃x⦄, x ∈ p → x ∈ q,
35-
..partial_order.lift (coe : submodule R M → set M) coe_injective }
36-
37-
lemma le_def : p ≤ q ↔ (p : set M) ⊆ q := iff.rfl
38-
39-
@[simp, norm_cast] lemma coe_subset_coe : (p : set M) ⊆ q ↔ p ≤ q := iff.rfl
40-
41-
lemma le_def' : p ≤ q ↔ ∀ x ∈ p, x ∈ q := iff.rfl
42-
43-
lemma lt_def : p < q ↔ (p : set M) ⊂ q := iff.rfl
44-
45-
lemma not_le_iff_exists : ¬ (p ≤ q) ↔ ∃ x ∈ p, x ∉ q := set.not_subset
46-
47-
lemma exists_of_lt {p q : submodule R M} : p < q → ∃ x ∈ q, x ∉ p := set.exists_of_ssubset
48-
49-
lemma lt_iff_le_and_exists : p < q ↔ p ≤ q ∧ ∃ x ∈ q, x ∉ p :=
50-
by rw [lt_iff_le_not_le, not_le_iff_exists]
51-
5233
/-- The set `{0}` is the bottom element of the lattice of submodules. -/
5334
instance : has_bot (submodule R M) :=
5435
⟨{ carrier := {0}, smul_mem' := by simp { contextual := tt }, .. (⊥ : add_submonoid M)}⟩
@@ -68,14 +49,14 @@ instance unique_bot : unique (⊥ : submodule R M) :=
6849

6950
lemma nonzero_mem_of_bot_lt {I : submodule R M} (bot_lt : ⊥ < I) : ∃ a : I, a ≠ 0 :=
7051
begin
71-
have h := (submodule.lt_iff_le_and_exists.1 bot_lt).2,
52+
have h := (set_like.lt_iff_le_and_exists.1 bot_lt).2,
7253
tidy,
7354
end
7455

7556
instance : order_bot (submodule R M) :=
7657
{ bot := ⊥,
7758
bot_le := λ p x, by simp {contextual := tt},
78-
..submodule.partial_order }
59+
..set_like.partial_order }
7960

8061
protected lemma eq_bot_iff (p : submodule R M) : p = ⊥ ↔ ∀ x ∈ p, x = (0 : M) :=
8162
⟨ λ h, h.symm ▸ λ x hx, (mem_bot R).mp hx,
@@ -97,7 +78,7 @@ instance : has_top (submodule R M) :=
9778
instance : order_top (submodule R M) :=
9879
{ top := ⊤,
9980
le_top := λ p x _, trivial,
100-
..submodule.partial_order }
81+
..set_like.partial_order }
10182

10283
lemma eq_top_iff' {p : submodule R M} : p = ⊤ ↔ ∀ x, x ∈ p :=
10384
eq_top_iff.trans ⟨λ h x, h trivial, λ h x _, h x⟩
@@ -157,7 +138,7 @@ set.mem_bInter_iff
157138

158139
@[simp] theorem mem_infi {ι} (p : ι → submodule R M) {x} :
159140
x ∈ (⨅ i, p i) ↔ ∀ i, x ∈ p i :=
160-
by rw [← mem_coe, infi_coe, set.mem_Inter]; refl
141+
by rw [← set_like.mem_coe, infi_coe, set.mem_Inter]; refl
161142

162143
lemma mem_sup_left {S T : submodule R M} : ∀ {x : M}, x ∈ S → x ∈ S ⊔ T :=
163144
show S ≤ S ⊔ T, from le_sup_left

src/algebra/pointwise.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ end
476476
@[to_additive]
477477
lemma closure_mul_le (S T : set M) : closure (S * T) ≤ closure S ⊔ closure T :=
478478
Inf_le $ λ x ⟨s, t, hs, ht, hx⟩, hx ▸ (closure S ⊔ closure T).mul_mem
479-
(le_def.mp le_sup_left $ subset_closure hs)
480-
(le_def.mp le_sup_right $ subset_closure ht)
479+
(set_like.le_def.mp le_sup_left $ subset_closure hs)
480+
(set_like.le_def.mp le_sup_right $ subset_closure ht)
481481

482482
@[to_additive]
483483
lemma sup_eq_closure (H K : submonoid M) : H ⊔ K = closure (H * K) :=

0 commit comments

Comments
 (0)