@@ -1838,20 +1838,6 @@ mem_map.trans $ by simp only [exists_prop]; refl
1838
1838
@[simp] lemma mem_map_equiv {f : α ≃ β} {b : β} : b ∈ s.map f.to_embedding ↔ f.symm b ∈ s :=
1839
1839
by { rw mem_map, exact ⟨by { rintro ⟨a, H, rfl⟩, simpa }, λ h, ⟨_, h, by simp⟩⟩ }
1840
1840
1841
- /-- If the only elements outside `s` are those left fixed by `σ`, then mapping by `σ` has no effect.
1842
- -/
1843
- lemma map_perm {σ : equiv.perm α} (hs : {a | σ a ≠ a} ⊆ s) : s.map (σ : α ↪ α) = s :=
1844
- begin
1845
- ext i,
1846
- rw mem_map,
1847
- obtain hi | hi := eq_or_ne (σ i) i,
1848
- { refine ⟨_, λ h, ⟨i, h, hi⟩⟩,
1849
- rintro ⟨j, hj, h⟩,
1850
- rwa σ.injective (hi.trans h.symm) },
1851
- { refine iff_of_true ⟨σ.symm i, hs $ λ h, hi _, σ.apply_symm_apply _⟩ (hs hi),
1852
- convert congr_arg σ h; exact (σ.apply_symm_apply _).symm }
1853
- end
1854
-
1855
1841
lemma mem_map' (f : α ↪ β) {a} {s : finset α} : f a ∈ s.map f ↔ a ∈ s := mem_map_of_injective f.2
1856
1842
1857
1843
lemma mem_map_of_mem (f : α ↪ β) {a} {s : finset α} : a ∈ s → f a ∈ s.map f := (mem_map' _).2
@@ -1866,6 +1852,11 @@ theorem coe_map_subset_range (f : α ↪ β) (s : finset α) : (s.map f : set β
1866
1852
calc ↑(s.map f) = f '' s : coe_map f s
1867
1853
... ⊆ set.range f : set.image_subset_range f ↑s
1868
1854
1855
+ /-- If the only elements outside `s` are those left fixed by `σ`, then mapping by `σ` has no effect.
1856
+ -/
1857
+ lemma map_perm {σ : equiv.perm α} (hs : {a | σ a ≠ a} ⊆ s) : s.map (σ : α ↪ α) = s :=
1858
+ coe_injective $ (coe_map _ _).trans $ set.image_perm hs
1859
+
1869
1860
theorem map_to_finset [decidable_eq α] [decidable_eq β] {s : multiset α} :
1870
1861
s.to_finset.map f = (s.map f).to_finset :=
1871
1862
ext $ λ _, by simp only [mem_map, multiset.mem_map, exists_prop, multiset.mem_to_finset]
0 commit comments