Skip to content

Commit

Permalink
chore: rename Equiv.subset_image (#9800)
Browse files Browse the repository at this point in the history
`Finset` versions of the renamed lemmas are also added.
  • Loading branch information
Parcly-Taxel committed Jan 20, 2024
1 parent 9d89f49 commit 052d8d5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
12 changes: 12 additions & 0 deletions Mathlib/Data/Finset/Image.lean
Expand Up @@ -162,6 +162,18 @@ theorem map_subset_map {s₁ s₂ : Finset α} : s₁.map f ⊆ s₂.map f ↔ s
fun h => by simp [subset_def, Multiset.map_subset_map h]⟩
#align finset.map_subset_map Finset.map_subset_map

/-- The `Finset` version of `Equiv.subset_symm_image`. -/
theorem subset_map_symm {t : Finset β} {f : α ≃ β} : s ⊆ t.map f.symm ↔ s.map f ⊆ t := by
constructor <;> intro h x hx
· simp only [mem_map_equiv, Equiv.symm_symm] at hx
simpa using h hx
· simp only [mem_map_equiv]
exact h (by simp [hx])

/-- The `Finset` version of `Equiv.symm_image_subset`. -/
theorem map_symm_subset {t : Finset β} {f : α ≃ β} : t.map f.symm ⊆ s ↔ t ⊆ s.map f := by
simp only [← subset_map_symm, Equiv.symm_symm]

/-- Associate to an embedding `f` from `α` to `β` the order embedding that maps a finset to its
image under `f`. -/
def mapEmbedding (f : α ↪ β) : Finset α ↪o Finset β :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/LinearAlgebra/AffineSpace/Independent.lean
Expand Up @@ -614,7 +614,7 @@ theorem exists_affineIndependent (s : Set P) :
rw [linearIndependent_set_iff_affineIndependent_vadd_union_singleton k hb₀ p] at hb₃
refine' ⟨{p} ∪ Equiv.vaddConst p '' b, _, _, hb₃⟩
· apply Set.union_subset (Set.singleton_subset_iff.mpr hp)
rwa [← (Equiv.vaddConst p).subset_image' b s]
rwa [← (Equiv.vaddConst p).subset_symm_image b s]
· rw [Equiv.coe_vaddConst_symm, ← vectorSpan_eq_span_vsub_set_right k hp] at hb₂
apply AffineSubspace.ext_of_direction_eq
· have : Submodule.span k b = Submodule.span k (insert 0 b) := by simp
Expand Down
14 changes: 9 additions & 5 deletions Mathlib/Logic/Equiv/Set.lean
Expand Up @@ -62,18 +62,22 @@ theorem _root_.Set.preimage_equiv_eq_image_symm {α β} (S : Set α) (f : β ≃

-- Porting note: increased priority so this fires before `image_subset_iff`
@[simp high]
protected theorem subset_image {α β} (e : α ≃ β) (s : Set α) (t : Set β) :
protected theorem symm_image_subset {α β} (e : α ≃ β) (s : Set α) (t : Set β) :
e.symm '' t ⊆ s ↔ t ⊆ e '' s := by rw [image_subset_iff, e.image_eq_preimage]
#align equiv.subset_image Equiv.subset_image
#align equiv.subset_image Equiv.symm_image_subset

@[deprecated] alias subset_image := Equiv.symm_image_subset -- deprecated since 2024-01-19

-- Porting note: increased priority so this fires before `image_subset_iff`
@[simp high]
protected theorem subset_image' {α β} (e : α ≃ β) (s : Set α) (t : Set β) :
protected theorem subset_symm_image {α β} (e : α ≃ β) (s : Set α) (t : Set β) :
s ⊆ e.symm '' t ↔ e '' s ⊆ t :=
calc
s ⊆ e.symm '' t ↔ e.symm.symm '' s ⊆ t := by rw [e.symm.subset_image]
s ⊆ e.symm '' t ↔ e.symm.symm '' s ⊆ t := by rw [e.symm.symm_image_subset]
_ ↔ e '' s ⊆ t := by rw [e.symm_symm]
#align equiv.subset_image' Equiv.subset_image'
#align equiv.subset_image' Equiv.subset_symm_image

@[deprecated] alias subset_image' := Equiv.subset_symm_image -- deprecated since 2024-01-19

@[simp]
theorem symm_image_image {α β} (e : α ≃ β) (s : Set α) : e.symm '' (e '' s) = s :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Order/CountableDenseLinearOrder.lean
Expand Up @@ -170,7 +170,7 @@ def definedAtRight [DenselyOrdered α] [NoMinOrder α] [NoMaxOrder α] [Nonempty
· change (a, b) ∈ f'.val.image _
rwa [← Finset.mem_coe, Finset.coe_image, Equiv.image_eq_preimage]
· change _ ⊆ f'.val.image _
rwa [← Finset.coe_subset, Finset.coe_image, ← Equiv.subset_image, ← Finset.coe_image,
rwa [← Finset.coe_subset, Finset.coe_image, ← Equiv.symm_image_subset, ← Finset.coe_image,
Finset.coe_subset]
#align order.partial_iso.defined_at_right Order.PartialIso.definedAtRight

Expand Down

0 comments on commit 052d8d5

Please sign in to comment.