Module docstring
{"# Multilinear maps
We define multilinear maps as maps from ∀ (i : ι), M₁ i to M₂ which are linear in each
coordinate. Here, M₁ i and M₂ are modules over a ring R, and ι is an arbitrary type
(although some statements will require it to be a fintype). This space, denoted by
MultilinearMap R M₁ M₂, inherits a module structure by pointwise addition and multiplication.
Main definitions
MultilinearMap R M₁ M₂is the space of multilinear maps from∀ (i : ι), M₁ itoM₂.f.map_update_smulis the multiplicativity of the multilinear mapfalong each coordinate.f.map_update_addis the additivity of the multilinear mapfalong each coordinate.f.map_smul_univexpresses the multiplicativity offover all coordinates at the same time, writingf (fun i => c i • m i)as(∏ i, c i) • f m.f.map_add_univexpresses the additivity offover all coordinates at the same time, writingf (m + m')as the sum over all subsetssofιoff (s.piecewise m m').f.map_sumexpressesf (Σ_{j₁} g₁ j₁, ..., Σ_{jₙ} gₙ jₙ)as the sum off (g₁ (r 1), ..., gₙ (r n))whererranges over all possible functions.
See Mathlib.LinearAlgebra.Multilinear.Curry for the currying of multilinear maps.
Implementation notes
Expressing that a map is linear along the i-th coordinate when all other coordinates are fixed
can be done in two (equivalent) different ways:
- fixing a vector
m : ∀ (j : ι - i), M₁ j.val, and then choosing separately thei-th coordinate - fixing a vector
m : ∀j, M₁ j, and then modifying itsi-th coordinate
The second way is more artificial as the value of m at i is not relevant, but it has the
advantage of avoiding subtype inclusion issues. This is the definition we use, based on
Function.update that allows to change the value of m at i.
Note that the use of Function.update requires a DecidableEq ι term to appear somewhere in the
statement of MultilinearMap.map_update_add' and MultilinearMap.map_update_smul'.
Three possible choices are:
- Requiring
DecidableEq ιas an argument toMultilinearMap(as we did originally). - Using
Classical.decEq ιin the statement ofmap_add'andmap_smul'. - Quantifying over all possible
DecidableEq ιinstances in the statement ofmap_add'andmap_smul'.
Option 1 works fine, but puts unnecessary constraints on the user
(the zero map certainly does not need decidability).
Option 2 looks great at first, but in the common case when ι = Fin n
it introduces non-defeq decidability instance diamonds
within the context of proving map_update_add' and map_update_smul',
of the form Fin.decidableEq n = Classical.decEq (Fin n).
Option 3 of course does something similar, but of the form Fin.decidableEq n = _inst,
which is much easier to clean up since _inst is a free variable
and so the equality can just be substituted.
","If {a // P a} is a subtype of ι and if we fix an element z of (i : {a // ¬ P a}) → M₁ i,
then a multilinear map on M₁ defines a multilinear map on the restriction of M₁ to
{a // P a}, by fixing the arguments out of {a // P a} equal to the values of z. "}