@@ -921,6 +921,45 @@ section CommSemiring
921921variable [CommSemiring R] [∀ i, AddCommMonoid (M₁ i)] [∀ i, AddCommMonoid (M i)] [AddCommMonoid M₂]
922922 [∀ i, Module R (M i)] [∀ i, Module R (M₁ i)] [Module R M₂] (f f' : MultilinearMap R M₁ M₂)
923923
924+ section
925+ variable {M₁' : ι → Type *} [Π i, AddCommMonoid (M₁' i)] [Π i, Module R (M₁' i)]
926+
927+ /-- If `f` is a collection of linear maps, then the construction `MultilinearMap.compLinearMap`
928+ sending a multilinear map `g` to `g (f₁ ⬝ , ..., fₙ ⬝ )` is linear in `g`. -/
929+ @[simps] def compLinearMapₗ (f : Π (i : ι), M₁ i →ₗ[R] M₁' i) :
930+ (MultilinearMap R M₁' M₂) →ₗ[R] MultilinearMap R M₁ M₂ where
931+ toFun := fun g ↦ g.compLinearMap f
932+ map_add' := fun _ _ ↦ rfl
933+ map_smul' := fun _ _ ↦ rfl
934+
935+ /-- If `f` is a collection of linear maps, then the construction `MultilinearMap.compLinearMap`
936+ sending a multilinear map `g` to `g (f₁ ⬝ , ..., fₙ ⬝ )` is linear in `g` and multilinear in
937+ `f₁, ..., fₙ`. -/
938+ @[simps] def compLinearMapMultilinear :
939+ @MultilinearMap R ι (λ i ↦ M₁ i →ₗ[R] M₁' i)
940+ ((MultilinearMap R M₁' M₂) →ₗ[R] MultilinearMap R M₁ M₂) _ _ _ (λ i ↦ LinearMap.module) _ where
941+ toFun := MultilinearMap.compLinearMapₗ
942+ map_add' := by
943+ intro _ f i f₁ f₂
944+ ext g x
945+ change (g fun j ↦ update f i (f₁ + f₂) j <| x j) =
946+ (g fun j ↦ update f i f₁ j <|x j) + g fun j ↦ update f i f₂ j (x j)
947+ let c : Π (i : ι), (M₁ i →ₗ[R] M₁' i) → M₁' i := λ i f ↦ f (x i)
948+ convert g.map_add (λ j ↦ f j (x j)) i (f₁ (x i)) (f₂ (x i)) with j j j
949+ · exact Function.apply_update c f i (f₁ + f₂) j
950+ · exact Function.apply_update c f i f₁ j
951+ · exact Function.apply_update c f i f₂ j
952+ map_smul' := by
953+ intro _ f i a f₀
954+ ext g x
955+ change (g fun j ↦ update f i (a • f₀) j <| x j) = a • g fun j ↦ update f i f₀ j (x j)
956+ let c : Π (i : ι), (M₁ i →ₗ[R] M₁' i) → M₁' i := λ i f ↦ f (x i)
957+ convert g.map_smul (λ j ↦ f j (x j)) i a (f₀ (x i)) with j j j
958+ · exact Function.apply_update c f i (a • f₀) j
959+ · exact Function.apply_update c f i f₀ j
960+
961+ end
962+
924963/-- If one multiplies by `c i` the coordinates in a finset `s`, then the image under a multilinear
925964map is multiplied by `∏ i in s, c i`. This is mainly an auxiliary statement to prove the result when
926965`s = univ`, given in `map_smul_univ`, although it can be useful in its own right as it does not
0 commit comments