Zulip Chat Archive
Stream: Is there code for X?
Topic: to_module and map_range
Winston Yin (Jun 11 2021 at 16:05):
I'm composing direct_sum.to_module
with dfinsupp.map_range
. Is there any way to simplify that? Here's what I'm doing. I have:
- a collection of spaces
V : ι → Type _
, each of which is amodule k (V i)
, - a target space
W : Type _
as amodule k W
, - a collection of linear maps
ρ : Π i : ι, V i →ₗ[k] V i
, and - a collection of linear maps
φ : Π i : ι, V i →ₗ[k] W
.
What I need is that∀ (v : direct_sum ι V), (direct_sum.to_module k ι W φ) (dfinsupp.map_range.linear_map ρ v) = direct_sum.to_module k ι W (λ i : ι, (φ i).comp (ρ i)) v
.
Winston Yin (Jun 11 2021 at 16:08):
Is there something similar to dfinsupp.map_range_comp
but for composing to_module
and map_range
?
Kevin Buzzard (Jun 11 2021 at 17:34):
Can you just make a #mwe ? It would be much easier for me to digest!
Eric Wieser (Jun 11 2021 at 21:00):
Your best bet is to unfold to_module
Eric Wieser (Jun 11 2021 at 21:01):
There are lots of lemmas about dfinsupp, and it's a lot of effort for little gain to copy all the lemmas between the two
Winston Yin (Jun 12 2021 at 02:32):
variables
{k : Type _} [comm_semiring k]
{A : Type _} [semiring A] [algebra k A]
(ι : Type _) [decidable_eq ι] {V : ι → Type _}
[Π (i : ι), add_comm_monoid (V i)] [Π (i : ι), module k (V i)]
{W : Type _} [add_comm_monoid W] [module k W]
(ρ : Π i : ι, V i →ₗ[k] V i)
(φ : Π i : ι, V i →ₗ[k] W)
example : ∀ (v : direct_sum ι V), (direct_sum.to_module k ι W φ) (dfinsupp.map_range.linear_map ρ v) = direct_sum.to_module k ι W (λ i : ι, (φ i).comp (ρ i)) v := sorry
Winston Yin (Jun 12 2021 at 04:12):
After a bit a struggle, I was able to prove the above statement as follows:
example : ∀ (v : direct_sum ι V), (direct_sum.to_module k ι W φ) (dfinsupp.map_range.linear_map ρ v) = direct_sum.to_module k ι W (λ i : ι, (φ i).comp (ρ i)) v :=
begin
intro vv,
rw ←linear_map.comp_apply,
apply direct_sum.to_module.ext,
intro i,
change λ (i : ι), V i with V,
apply linear_map.ext,
intro v,
rw linear_map.comp_apply,
rw linear_map.comp_apply,
rw linear_map.comp_apply,
rw direct_sum.to_module_lof,
simp,
rw ←direct_sum.single_eq_lof,
unfold direct_sum.to_module dfinsupp.lsum,
simp
end
It seems to me that it would be useful to include (some more general form of) this lemma in data.dfinsupp
, as it is probably common to build a map by composing lsum
(direct sum to module) with map_range
(direct sum to direct sum).
Eric Wieser (Jun 12 2021 at 08:33):
Is there no lemma that says docs#dfinsupp.map_range is lsum combined with single
?
Winston Yin (Jun 12 2021 at 09:51):
Perhaps I could have used dfinsupp.map_range_single
, but I've now moved on
Last updated: Dec 20 2023 at 11:08 UTC