@@ -415,6 +415,7 @@ variables [has_zero M] [has_zero N] [has_zero P]
415
415
This preserves the structure on `f`, and exists in various bundled forms for when `f` is itself
416
416
bundled:
417
417
418
+ * `finsupp.map_range.equiv`
418
419
* `finsupp.map_range.zero_hom`
419
420
* `finsupp.map_range.add_monoid_hom`
420
421
* `finsupp.map_range.add_equiv`
@@ -1186,6 +1187,43 @@ lemma multiset_sum_sum [has_zero M] [add_comm_monoid N] {f : α →₀ M} {h :
1186
1187
1187
1188
section map_range
1188
1189
1190
+ section equiv
1191
+ variables [has_zero M] [has_zero N] [has_zero P]
1192
+
1193
+ /-- `finsupp.map_range` as an equiv. -/
1194
+ @[simps apply]
1195
+ def map_range.equiv (f : M ≃ N) (hf : f 0 = 0 ) (hf' : f.symm 0 = 0 ) : (α →₀ M) ≃ (α →₀ N) :=
1196
+ { to_fun := (map_range f hf : (α →₀ M) → (α →₀ N)),
1197
+ inv_fun := (map_range f.symm hf' : (α →₀ N) → (α →₀ M)),
1198
+ left_inv := λ x, begin
1199
+ rw ←map_range_comp _ _ _ _; simp_rw equiv.symm_comp_self,
1200
+ { exact map_range_id _ },
1201
+ { refl },
1202
+ end ,
1203
+ right_inv := λ x, begin
1204
+ rw ←map_range_comp _ _ _ _; simp_rw equiv.self_comp_symm,
1205
+ { exact map_range_id _ },
1206
+ { refl },
1207
+ end }
1208
+
1209
+ @[simp]
1210
+ lemma map_range.equiv_refl :
1211
+ map_range.equiv (equiv.refl M) rfl rfl = equiv.refl (α →₀ M) :=
1212
+ equiv.ext map_range_id
1213
+
1214
+ lemma map_range.equiv_trans
1215
+ (f : M ≃ N) (hf : f 0 = 0 ) (hf') (f₂ : N ≃ P) (hf₂ : f₂ 0 = 0 ) (hf₂') :
1216
+ (map_range.equiv (f.trans f₂) (by rw [equiv.trans_apply, hf, hf₂])
1217
+ (by rw [equiv.symm_trans_apply, hf₂', hf']) : (α →₀ _) ≃ _) =
1218
+ (map_range.equiv f hf hf').trans (map_range.equiv f₂ hf₂ hf₂') :=
1219
+ equiv.ext $ map_range_comp _ _ _ _ _
1220
+
1221
+ lemma map_range.equiv_symm (f : M ≃ N) (hf hf') :
1222
+ ((map_range.equiv f hf hf').symm : (α →₀ _) ≃ _) = map_range.equiv f.symm hf' hf :=
1223
+ equiv.ext $ λ x, rfl
1224
+
1225
+ end equiv
1226
+
1189
1227
section zero_hom
1190
1228
variables [has_zero M] [has_zero N] [has_zero P]
1191
1229
@@ -1229,6 +1267,12 @@ lemma map_range.add_monoid_hom_comp (f : N →+ P) (f₂ : M →+ N) :
1229
1267
(map_range.add_monoid_hom f).comp (map_range.add_monoid_hom f₂) :=
1230
1268
add_monoid_hom.ext $ map_range_comp _ _ _ _ _
1231
1269
1270
+ @[simp]
1271
+ lemma map_range.add_monoid_hom_to_zero_hom (f : M →+ N) :
1272
+ (map_range.add_monoid_hom f).to_zero_hom =
1273
+ (map_range.zero_hom f.to_zero_hom : zero_hom (α →₀ _) _) :=
1274
+ zero_hom.ext $ λ _, rfl
1275
+
1232
1276
lemma map_range_multiset_sum (f : M →+ N) (m : multiset (α →₀ M)) :
1233
1277
map_range f f.map_zero m.sum = (m.map $ λx, map_range f f.map_zero x).sum :=
1234
1278
(map_range.add_monoid_hom f : (α →₀ _) →+ _).map_multiset_sum _
@@ -1269,6 +1313,18 @@ lemma map_range.add_equiv_symm (f : M ≃+ N) :
1269
1313
((map_range.add_equiv f).symm : (α →₀ _) ≃+ _) = map_range.add_equiv f.symm :=
1270
1314
add_equiv.ext $ λ x, rfl
1271
1315
1316
+ @[simp]
1317
+ lemma map_range.add_equiv_to_add_monoid_hom (f : M ≃+ N) :
1318
+ (map_range.add_equiv f : (α →₀ _) ≃+ _).to_add_monoid_hom =
1319
+ (map_range.add_monoid_hom f.to_add_monoid_hom : (α →₀ _) →+ _) :=
1320
+ add_monoid_hom.ext $ λ _, rfl
1321
+
1322
+ @[simp]
1323
+ lemma map_range.add_equiv_to_equiv (f : M ≃+ N) :
1324
+ (map_range.add_equiv f).to_equiv =
1325
+ (map_range.equiv f.to_equiv f.map_zero f.symm.map_zero : (α →₀ _) ≃ _) :=
1326
+ equiv.ext $ λ _, rfl
1327
+
1272
1328
end add_monoid_hom
1273
1329
1274
1330
end map_range
0 commit comments