Skip to content

Commit 3cfe433

Browse files
committed
chore: add missing mem lemmas (#33801)
* Add missing `simp` lemmas `mem_foo` where a `simp` lemma `coe_foo` already exists
1 parent 599c3e6 commit 3cfe433

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

Mathlib/AlgebraicGeometry/OpenImmersion.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ theorem isOpenEmbedding : IsOpenEmbedding f :=
8181
def opensRange : Y.Opens :=
8282
⟨_, f.isOpenEmbedding.isOpen_range⟩
8383

84+
@[simp]
85+
theorem mem_opensRange {X Y : Scheme} {f : X ⟶ Y} [H : IsOpenImmersion f] {y : Y} :
86+
y ∈ opensRange f ↔ ∃ x, (ConcreteCategory.hom f.base) x = y := .rfl
87+
8488
/-- The functor `opens X ⥤ opens Y` associated with an open immersion `f : X ⟶ Y`. -/
8589
def opensFunctor : X.Opens ⥤ Y.Opens :=
8690
LocallyRingedSpace.IsOpenImmersion.opensFunctor f.toLRSHom

Mathlib/AlgebraicGeometry/Scheme.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ protected lemma ext {f g : X ⟶ Y} (h_base : f.base = g.base)
216216
protected lemma ext' {f g : X ⟶ Y} (h : f.toLRSHom = g.toLRSHom) : f = g := by
217217
cases f; cases g; congr 1
218218

219-
@[simp]
220219
lemma mem_preimage {x : X} {U : Opens Y} : x ∈ f ⁻¹ᵁ U ↔ f x ∈ U := .rfl
221220

222221
lemma coe_preimage {U : Opens Y} : f ⁻¹ᵁ U = f ⁻¹' U := rfl

Mathlib/RingTheory/FractionalIdeal/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,11 @@ variable (S)
380380
theorem coeIdeal_top : ((⊤ : Ideal R) : FractionalIdeal S P) = 1 :=
381381
rfl
382382

383+
@[simp]
383384
theorem mem_one_iff {x : P} : x ∈ (1 : FractionalIdeal S P) ↔ ∃ x' : R, algebraMap R P x' = x :=
384385
Iff.intro (fun ⟨x', _, h⟩ => ⟨x', h⟩) fun ⟨x', h⟩ => ⟨x', ⟨⟩, h⟩
385386

386-
theorem coe_mem_one (x : R) : algebraMap R P x ∈ (1 : FractionalIdeal S P) :=
387-
(mem_one_iff S).mpr ⟨x, rfl⟩
387+
theorem coe_mem_one (x : R) : algebraMap R P x ∈ (1 : FractionalIdeal S P) := by simp
388388

389389
theorem one_mem_one : (1 : P) ∈ (1 : FractionalIdeal S P) :=
390390
(mem_one_iff S).mpr ⟨1, map_one _⟩

Mathlib/RingTheory/FractionalIdeal/Extended.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ theorem extended_one : extended L hf (1 : FractionalIdeal M K) = 1 := by
103103
?_ (zero_mem _) (fun y z _ _ hy hz ↦ add_mem hy hz) (fun b y _ hy ↦ smul_mem _ b hy) hx, ?_⟩
104104
· rintro ⟨b, _, rfl⟩
105105
rw [Algebra.linearMap_apply, Algebra.algebraMap_eq_smul_one]
106-
exact smul_mem _ _ <| subset_span ⟨1, by simp [one_mem_one]
106+
exact smul_mem _ _ <| subset_span ⟨1, by simpa using one_mem_one⟩
107107
· rintro _ ⟨_, ⟨a, ha, rfl⟩, rfl⟩
108108
exact ⟨f a, ha, by rw [Algebra.linearMap_apply, Algebra.linearMap_apply, map_eq]⟩
109109

Mathlib/Topology/Category/TopCat/Opens.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ def map (f : X ⟶ Y) : Opens Y ⥤ Opens X where
154154
theorem map_coe (f : X ⟶ Y) (U : Opens Y) : ((map f).obj U : Set X) = f ⁻¹' (U : Set Y) :=
155155
rfl
156156

157+
@[simp]
158+
theorem mem_map {f : X ⟶ Y} {U : Opens Y} {x : X} :
159+
x ∈ (map f).obj U ↔ f.hom x ∈ U := .rfl
160+
157161
@[simp]
158162
theorem map_obj (f : X ⟶ Y) (U) (p) : (map f).obj ⟨U, p⟩ = ⟨f ⁻¹' U, p.preimage f.hom.continuous⟩ :=
159163
rfl

Mathlib/Topology/Sets/Opens.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ lemma mem_inf {s t : Opens α} {x : α} : x ∈ s ⊓ t ↔ x ∈ s ∧ x ∈ t
171171
theorem coe_sup (s t : Opens α) : (↑(s ⊔ t) : Set α) = ↑s ∪ ↑t :=
172172
rfl
173173

174+
@[simp]
175+
theorem mem_sup {s t : Opens α} {x : α} : x ∈ (s ⊔ t) ↔ x ∈ s ∨ x ∈ t :=
176+
.rfl
177+
174178
@[simp, norm_cast]
175179
theorem coe_bot : ((⊥ : Opens α) : Set α) = ∅ :=
176180
rfl

0 commit comments

Comments
 (0)