The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V08. Multilinear algebra and forms

Mathlib.LinearAlgebra.Multilinear.Curry

48 declarations. Mathlib docs · Source

Currying of multilinear maps

We register isomorphisms corresponding to currying or uncurrying variables, transforming a multilinear function f on n+1 variables into a linear function taking values in multilinear functions in n variables, and into a multilinear function in n variables taking values in linear functions. These operations are called f.curryLeft and f.curryRight respectively (with inverses f.uncurryLeft and f.uncurryRight). These operations induce linear equivalences between spaces of multilinear functions in n+1 variables and spaces of linear functions into multilinear functions in n variables (resp. multilinear functions in n variables taking values in linear functions), called respectively multilinearCurryLeftEquiv and multilinearCurryRightEquiv.

Currying

We associate to a multilinear map in n+1 variables (i.e., based on Fin n.succ) two curried functions, named f.curryLeft (which is a linear map on E 0 taking values in multilinear maps in n variables) and f.curryRight (which is a multilinear map in n variables taking values in linear maps on E 0). In both constructions, the variable that is singled out is 0, to take advantage of the operations cons and tail on Fin n. The inverse operations are called uncurryLeft and uncurryRight.

We also register linear equiv versions of these correspondences, in multilinearCurryLeftEquiv and multilinearCurryRightEquiv.

Left currying

Right currying

theorem MultilinearMap.mk'.congr_simp E1 #

∀ {R : Type u_1} {S : Type u_2} [inst : Semiring R] [inst_1 : Semiring S] {σ : R →+* S} {ι : Type u_4}
  {M : ι → Type u_5} {N : Type u_6} [inst_2 : (i : ι) → AddCommMonoid (M i)] [inst_3 : (i : ι) → Module R (M i)]
  [inst_4 : AddCommMonoid N] [inst_5 : Module S N] [inst_6 : DecidableEq ι] (f f_1 : ((i : ι) → M i) → N)
  (e_f : f = f_1)
  (h₁ :
    ∀ (m : (i : ι) → M i) (i : ι) (x y : M i),
      f (Function.update m i (x + y)) = f (Function.update m i x) + f (Function.update m i y))
  (h₂ :
    ∀ (m : (i : ι) → M i) (i : ι) (c : R) (x : M i), f (Function.update m i (c • x)) = σ c • f (Function.update m i x)),
  MultilinearMap.mk' f h₁ h₂ = MultilinearMap.mk' f_1 ⋯ ⋯

def LinearMap.uncurryLeft E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {n : ℕ} →
            {M : Fin n.succ → Type v} →
              {M₂ : Type v₂} →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        (M 0 →ₛₗ[σ] (Π (i : Fin n), M i.succ) →ₘₛₗ[σ] M₂) → (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂

Given a linear map f from M 0 to multilinear maps on n variables, construct the corresponding multilinear map on n+1 variables obtained by concatenating the variables, given by m ↦ f (m 0) (tail m)

theorem LinearMap.uncurryLeft_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂]
  (f : M 0 →ₛₗ[σ] (Π (i : Fin n), M i.succ) →ₘₛₗ[σ] M₂) (m : (i : Fin n.succ) → M i),
  f.uncurryLeft m = (f (m 0)) (Fin.tail m)

def MultilinearMap.curryLeft E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {n : ℕ} →
            {M : Fin n.succ → Type v} →
              {M₂ : Type v₂} →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        ((Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂) → M 0 →ₛₗ[σ] (Π (i : Fin n), M i.succ) →ₘₛₗ[σ] M₂

Given a multilinear map f in n+1 variables, split the first variable to obtain a linear map into multilinear maps in n variables, given by x ↦ (m ↦ f (cons x m)).

theorem MultilinearMap.curryLeft_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (f : (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂)
  (x : M 0) (m : (i : Fin n) → M i.succ), (f.curryLeft x) m = f (Fin.cons x m)

theorem LinearMap.curry_uncurryLeft E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂]
  (f : M 0 →ₛₗ[σ] (Π (i : Fin n), M i.succ) →ₘₛₗ[σ] M₂), f.uncurryLeft.curryLeft = f

theorem MultilinearMap.uncurry_curryLeft E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (f : (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂),
  f.curryLeft.uncurryLeft = f

def multilinearCurryLeftEquiv E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        (σ : R →+* S) →
          {n : ℕ} →
            (M : Fin n.succ → Type v) →
              (M₂ : Type v₂) →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        ((Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂) ≃ₗ[S] M 0 →ₛₗ[σ] (Π (i : Fin n), M i.succ) →ₘₛₗ[σ] M₂

The space of multilinear maps on Π (i : Fin (n+1)), M i is canonically isomorphic to the space of linear maps from M 0 to the space of multilinear maps on Π (i : Fin n), M i.succ, by separating the first variable. We register this isomorphism as a linear isomorphism in multilinearCurryLeftEquiv R M M₂.

The direct and inverse maps are given by f.curryLeft and f.uncurryLeft. Use these unless you need the full framework of linear equivs.

theorem multilinearCurryLeftEquiv_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] (σ : R →+* S) {n : ℕ}
  (M : Fin n.succ → Type v) (M₂ : Type v₂) [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (f : (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂),
  (multilinearCurryLeftEquiv σ M M₂) f = f.curryLeft

theorem multilinearCurryLeftEquiv_symm_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] (σ : R →+* S) {n : ℕ}
  (M : Fin n.succ → Type v) (M₂ : Type v₂) [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂]
  (f : M 0 →ₛₗ[σ] (Π (i : Fin n), M i.succ) →ₘₛₗ[σ] M₂), (multilinearCurryLeftEquiv σ M M₂).symm f = f.uncurryLeft

def MultilinearMap.uncurryRight E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {n : ℕ} →
            {M : Fin n.succ → Type v} →
              {M₂ : Type v₂} →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        ((Π (i : Fin n), M i.castSucc) →ₘₛₗ[σ] M (Fin.last n) →ₛₗ[σ] M₂) →
                          (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂

Given a multilinear map f in n variables to the space of linear maps from M (last n) to M₂, construct the corresponding multilinear map on n+1 variables obtained by concatenating the variables, given by m ↦ f (init m) (m (last n))

theorem MultilinearMap.uncurryRight_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂]
  (f : (Π (i : Fin n), M i.castSucc) →ₘₛₗ[σ] M (Fin.last n) →ₛₗ[σ] M₂) (m : (i : Fin n.succ) → M i),
  f.uncurryRight m = (f (Fin.init m)) (m (Fin.last n))

def MultilinearMap.curryRight E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {n : ℕ} →
            {M : Fin n.succ → Type v} →
              {M₂ : Type v₂} →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        ((Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂) →
                          (Π (i : Fin n), M i.castSucc) →ₘₛₗ[σ] M (Fin.last n) →ₛₗ[σ] M₂

Given a multilinear map f in n+1 variables, split the last variable to obtain a multilinear map in n variables taking values in linear maps from M (last n) to M₂, given by m ↦ (x ↦ f (snoc m x)).

theorem MultilinearMap.curryRight_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (f : (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂)
  (m : (i : Fin n) → M i.castSucc) (x : M (Fin.last n)), (f.curryRight m) x = f (Fin.snoc m x)

theorem MultilinearMap.curry_uncurryRight E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂]
  (f : (Π (i : Fin n), M i.castSucc) →ₘₛₗ[σ] M (Fin.last n) →ₛₗ[σ] M₂), f.uncurryRight.curryRight = f

theorem MultilinearMap.uncurry_curryRight E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (f : (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂),
  f.curryRight.uncurryRight = f

def multilinearCurryRightEquiv E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        (σ : R →+* S) →
          {n : ℕ} →
            (M : Fin n.succ → Type v) →
              (M₂ : Type v₂) →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        ((Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂) ≃ₗ[S]
                          (Π (i : Fin n), M i.castSucc) →ₘₛₗ[σ] M (Fin.last n) →ₛₗ[σ] M₂

The space of multilinear maps on Π (i : Fin (n+1)), M i is canonically isomorphic to the space of linear maps from the space of multilinear maps on Π (i : Fin n), M (castSucc i) to the space of linear maps on M (last n), by separating the last variable. We register this isomorphism as a linear isomorphism in multilinearCurryRightEquiv R M M₂.

The direct and inverse maps are given by f.curryRight and f.uncurryRight. Use these unless you need the full framework of linear equivs.

def LinearMap.uncurryMid E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {n : ℕ} →
            {M : Fin n.succ → Type v} →
              {M₂ : Type v₂} →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        (p : Fin (n + 1)) →
                          (M p →ₛₗ[σ] (Π (i : Fin n), M (p.succAbove i)) →ₘₛₗ[σ] M₂) →
                            (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂

Given a linear map from M p to the space of multilinear maps in n variables M 0, ..., M n with M p removed, returns a multilinear map in all n + 1 variables.

theorem LinearMap.uncurryMid_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (p : Fin (n + 1))
  (f : M p →ₛₗ[σ] (Π (i : Fin n), M (p.succAbove i)) →ₘₛₗ[σ] M₂) (m : (i : Fin n.succ) → M i),
  (LinearMap.uncurryMid p f) m = (f (m p)) (p.removeNth m)

def MultilinearMap.curryMid E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {n : ℕ} →
            {M : Fin n.succ → Type v} →
              {M₂ : Type v₂} →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        (p : Fin (n + 1)) →
                          ((Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂) →
                            M p →ₛₗ[σ] (Π (i : Fin n), M (p.succAbove i)) →ₘₛₗ[σ] M₂

Interpret a multilinear map in n + 1 variables as a linear map in pth variable with values in the multilinear maps in the other variables.

theorem MultilinearMap.curryMid_apply_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (p : Fin (n + 1))
  (f : (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂) (x : M p) (m : (i : Fin n) → M (p.succAbove i)),
  ((MultilinearMap.curryMid p f) x) m = f (p.insertNth x m)

theorem LinearMap.curryMid_uncurryMid E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (i : Fin (n + 1))
  (f : M i →ₛₗ[σ] (Π (j : Fin n), M (i.succAbove j)) →ₘₛₗ[σ] M₂),
  MultilinearMap.curryMid i (LinearMap.uncurryMid i f) = f

theorem MultilinearMap.uncurryMid_curryMid E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {n : ℕ}
  {M : Fin n.succ → Type v} {M₂ : Type v₂} [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (i : Fin (n + 1))
  (f : (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂), LinearMap.uncurryMid i (MultilinearMap.curryMid i f) = f

def MultilinearMap.curryMidLinearEquiv E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        (σ : R →+* S) →
          {n : ℕ} →
            (M : Fin n.succ → Type v) →
              (M₂ : Type v₂) →
                [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] →
                  [inst_3 : AddCommMonoid M₂] →
                    [inst_4 : (i : Fin n.succ) → Module R (M i)] →
                      [inst_5 : Module S M₂] →
                        (p : Fin (n + 1)) →
                          ((Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂) ≃ₗ[S]
                            M p →ₛₗ[σ] (Π (i : Fin n), M (p.succAbove i)) →ₘₛₗ[σ] M₂

MultilinearMap.curryMid as a linear equivalence.

theorem MultilinearMap.curryMidLinearEquiv_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] (σ : R →+* S) {n : ℕ}
  (M : Fin n.succ → Type v) (M₂ : Type v₂) [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (p : Fin (n + 1))
  (f : (Π (i : Fin n.succ), M i) →ₘₛₗ[σ] M₂),
  (MultilinearMap.curryMidLinearEquiv σ M M₂ p) f = MultilinearMap.curryMid p f

theorem MultilinearMap.curryMidLinearEquiv_symm_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] (σ : R →+* S) {n : ℕ}
  (M : Fin n.succ → Type v) (M₂ : Type v₂) [inst_2 : (i : Fin n.succ) → AddCommMonoid (M i)] [inst_3 : AddCommMonoid M₂]
  [inst_4 : (i : Fin n.succ) → Module R (M i)] [inst_5 : Module S M₂] (p : Fin (n + 1))
  (f : M p →ₛₗ[σ] (Π (i : Fin n), M (p.succAbove i)) →ₘₛₗ[σ] M₂),
  (MultilinearMap.curryMidLinearEquiv σ M M₂ p).symm f = LinearMap.uncurryMid p f

def MultilinearMap.currySum E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {ι : Type uι} →
            {ι' : Type uι'} →
              {M₂ : Type v₂} →
                [inst_2 : AddCommMonoid M₂] →
                  [inst_3 : Module S M₂] →
                    {N : ι ⊕ ι' → Type u_1} →
                      [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] →
                        [inst_5 : (i : ι ⊕ ι') → Module R (N i)] →
                          ((Π (i : ι ⊕ ι'), N i) →ₘₛₗ[σ] M₂) →
                            (Π (i : ι), N (Sum.inl i)) →ₘₛₗ[σ] (Π (i : ι'), N (Sum.inr i)) →ₘₛₗ[σ] M₂

Given a family of modules N : (ι ⊕ ι') → Type*, a multilinear map on (fun _ : ι ⊕ ι' => M') induces a multilinear map on (fun (i : ι) ↦ N (.inl i)) taking values in the space of linear maps on (fun (i : ι') ↦ N (.inr i)).

theorem MultilinearMap.currySum_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)]
  (f : (Π (i : ι ⊕ ι'), N i) →ₘₛₗ[σ] M₂) (u : (i : ι) → N (Sum.inl i)) (v : (i : ι') → N (Sum.inr i)),
  (f.currySum u) v = f fun t ↦ Sum.rec u v t

theorem MultilinearMap.currySum_apply' E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : Type u_2} [inst_4 : AddCommMonoid N]
  [inst_5 : Module R N] (f : (ι ⊕ ι' → N) →ₘₛₗ[σ] M₂) (u : ι → N) (v : ι' → N), (f.currySum u) v = f (Sum.elim u v)

theorem MultilinearMap.currySum_add E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)]
  (f₁ f₂ : (Π (i : ι ⊕ ι'), N i) →ₘₛₗ[σ] M₂), (f₁ + f₂).currySum = f₁.currySum + f₂.currySum

theorem MultilinearMap.currySum_smul E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)] (r : S)
  (f : (Π (i : ι ⊕ ι'), N i) →ₘₛₗ[σ] M₂), (r • f).currySum = r • f.currySum

def MultilinearMap.uncurrySum E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {ι : Type uι} →
            {ι' : Type uι'} →
              {M₂ : Type v₂} →
                [inst_2 : AddCommMonoid M₂] →
                  [inst_3 : Module S M₂] →
                    {N : ι ⊕ ι' → Type u_1} →
                      [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] →
                        [inst_5 : (i : ι ⊕ ι') → Module R (N i)] →
                          ((Π (i : ι), N (Sum.inl i)) →ₘₛₗ[σ] (Π (i : ι'), N (Sum.inr i)) →ₘₛₗ[σ] M₂) →
                            (Π (i : ι ⊕ ι'), N i) →ₘₛₗ[σ] M₂

Given a family of modules N : (ι ⊕ ι') → Type*, a multilinear map on (fun (i : ι) ↦ N (.inl i)) taking values in the space of linear maps on (fun (i : ι') ↦ N (.inr i)) induces a multilinear map on (fun _ : ι ⊕ ι' => M') induces.

theorem MultilinearMap.uncurrySum_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)]
  (g : (Π (i : ι), N (Sum.inl i)) →ₘₛₗ[σ] (Π (i : ι'), N (Sum.inr i)) →ₘₛₗ[σ] M₂) (u : (i : ι ⊕ ι') → N i),
  g.uncurrySum u = (g fun i ↦ u (Sum.inl i)) fun i' ↦ u (Sum.inr i')

theorem MultilinearMap.uncurrySum_add E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)]
  (g₁ g₂ : (Π (i : ι), N (Sum.inl i)) →ₘₛₗ[σ] (Π (i : ι'), N (Sum.inr i)) →ₘₛₗ[σ] M₂),
  (g₁ + g₂).uncurrySum = g₁.uncurrySum + g₂.uncurrySum

theorem MultilinearMap.uncurrySum_smul E1 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)] (r : S)
  (g : (Π (i : ι), N (Sum.inl i)) →ₘₛₗ[σ] (Π (i : ι'), N (Sum.inr i)) →ₘₛₗ[σ] M₂), (r • g).uncurrySum = r • g.uncurrySum

theorem MultilinearMap.uncurrySum_currySum E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)]
  (f : (Π (i : ι ⊕ ι'), N i) →ₘₛₗ[σ] M₂), f.currySum.uncurrySum = f

theorem MultilinearMap.currySum_uncurrySum E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)]
  (g : (Π (i : ι), N (Sum.inl i)) →ₘₛₗ[σ] (Π (i : ι'), N (Sum.inr i)) →ₘₛₗ[σ] M₂), g.uncurrySum.currySum = g

def MultilinearMap.currySumEquiv E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        {σ : R →+* S} →
          {ι : Type uι} →
            {ι' : Type uι'} →
              {M₂ : Type v₂} →
                [inst_2 : AddCommMonoid M₂] →
                  [inst_3 : Module S M₂] →
                    {N : ι ⊕ ι' → Type u_1} →
                      [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] →
                        [inst_5 : (i : ι ⊕ ι') → Module R (N i)] →
                          ((Π (i : ι ⊕ ι'), N i) →ₘₛₗ[σ] M₂) ≃ₗ[S]
                            (Π (i : ι), N (Sum.inl i)) →ₘₛₗ[σ] (Π (i : ι'), N (Sum.inr i)) →ₘₛₗ[σ] M₂

Multilinear maps on N : (ι ⊕ ι') → Type* identify to multilinear maps from (fun (i : ι) ↦ N (.inl i)) taking values in the space of linear maps on (fun (i : ι') ↦ N (.inr i)).

theorem MultilinearMap.currySumEquiv_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)]
  (f : (Π (i : ι ⊕ ι'), N i) →ₘₛₗ[σ] M₂), MultilinearMap.currySumEquiv f = f.currySum

theorem MultilinearMap.currySumEquiv_symm_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)]
  (g : (Π (i : ι), N (Sum.inl i)) →ₘₛₗ[σ] (Π (i : ι'), N (Sum.inr i)) →ₘₛₗ[σ] M₂),
  MultilinearMap.currySumEquiv.symm g = g.uncurrySum

theorem MultilinearMap.coe_currySumEquiv E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)],
  ⇑MultilinearMap.currySumEquiv = MultilinearMap.currySum

theorem MultilinearMap.coe_currySumEquiv_symm E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {ι : Type uι} {ι' : Type uι'}
  {M₂ : Type v₂} [inst_2 : AddCommMonoid M₂] [inst_3 : Module S M₂] {N : ι ⊕ ι' → Type u_1}
  [inst_4 : (i : ι ⊕ ι') → AddCommMonoid (N i)] [inst_5 : (i : ι ⊕ ι') → Module R (N i)],
  ⇑MultilinearMap.currySumEquiv.symm = MultilinearMap.uncurrySum

def MultilinearMap.curryFinFinset E1 #

{R : Type uR} →
  {S : Type uS} →
    [inst : Semiring R] →
      [inst_1 : CommSemiring S] →
        (σ : R →+* S) →
          (M₂ : Type v₂) →
            (M' : Type v') →
              [inst_2 : AddCommMonoid M'] →
                [inst_3 : AddCommMonoid M₂] →
                  [inst_4 : Module R M'] →
                    [inst_5 : Module S M₂] →
                      {k l n : ℕ} →
                        {s : Finset (Fin n)} →
                          s.card = k →
                            sᶜ.card = l → ((Fin n → M') →ₘₛₗ[σ] M₂) ≃ₗ[S] (Fin k → M') →ₘₛₗ[σ] (Fin l → M') →ₘₛₗ[σ] M₂

If s : Finset (Fin n) is a finite set of cardinality k and its complement has cardinality l, then the space of multilinear maps on fun i : Fin n => M' is isomorphic to the space of multilinear maps on fun i : Fin k => M' taking values in the space of multilinear maps on fun i : Fin l => M'.

theorem MultilinearMap.curryFinFinset_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {M₂ : Type v₂} {M' : Type v'}
  [inst_2 : AddCommMonoid M'] [inst_3 : AddCommMonoid M₂] [inst_4 : Module R M'] [inst_5 : Module S M₂] {k l n : ℕ}
  {s : Finset (Fin n)} (hk : s.card = k) (hl : sᶜ.card = l) (f : (Fin n → M') →ₘₛₗ[σ] M₂) (mk : Fin k → M')
  (ml : Fin l → M'),
  (((MultilinearMap.curryFinFinset σ M₂ M' hk hl) f) mk) ml =
    f fun i ↦ Sum.elim mk ml ((finSumEquivOfFinset hk hl).symm i)

theorem MultilinearMap.curryFinFinset_symm_apply E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {M₂ : Type v₂} {M' : Type v'}
  [inst_2 : AddCommMonoid M'] [inst_3 : AddCommMonoid M₂] [inst_4 : Module R M'] [inst_5 : Module S M₂] {k l n : ℕ}
  {s : Finset (Fin n)} (hk : s.card = k) (hl : sᶜ.card = l) (f : (Fin k → M') →ₘₛₗ[σ] (Fin l → M') →ₘₛₗ[σ] M₂)
  (m : Fin n → M'),
  ((MultilinearMap.curryFinFinset σ M₂ M' hk hl).symm f) m =
    (f fun i ↦ m ((finSumEquivOfFinset hk hl) (Sum.inl i))) fun i ↦ m ((finSumEquivOfFinset hk hl) (Sum.inr i))

theorem MultilinearMap.curryFinFinset_symm_apply_piecewise_const E1 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {M₂ : Type v₂} {M' : Type v'}
  [inst_2 : AddCommMonoid M'] [inst_3 : AddCommMonoid M₂] [inst_4 : Module R M'] [inst_5 : Module S M₂] {k l n : ℕ}
  {s : Finset (Fin n)} (hk : s.card = k) (hl : sᶜ.card = l) (f : (Fin k → M') →ₘₛₗ[σ] (Fin l → M') →ₘₛₗ[σ] M₂)
  (x y : M'),
  ((MultilinearMap.curryFinFinset σ M₂ M' hk hl).symm f) (s.piecewise (fun x_1 ↦ x) fun x ↦ y) =
    (f fun x_1 ↦ x) fun x ↦ y

theorem MultilinearMap.curryFinFinset_symm_apply_const E0 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {M₂ : Type v₂} {M' : Type v'}
  [inst_2 : AddCommMonoid M'] [inst_3 : AddCommMonoid M₂] [inst_4 : Module R M'] [inst_5 : Module S M₂] {k l n : ℕ}
  {s : Finset (Fin n)} (hk : s.card = k) (hl : sᶜ.card = l) (f : (Fin k → M') →ₘₛₗ[σ] (Fin l → M') →ₘₛₗ[σ] M₂) (x : M'),
  (((MultilinearMap.curryFinFinset σ M₂ M' hk hl).symm f) fun x_1 ↦ x) = (f fun x_1 ↦ x) fun x_1 ↦ x

theorem MultilinearMap.curryFinFinset_apply_const E1 #

∀ {R : Type uR} {S : Type uS} [inst : Semiring R] [inst_1 : CommSemiring S] {σ : R →+* S} {M₂ : Type v₂} {M' : Type v'}
  [inst_2 : AddCommMonoid M'] [inst_3 : AddCommMonoid M₂] [inst_4 : Module R M'] [inst_5 : Module S M₂] {k l n : ℕ}
  {s : Finset (Fin n)} (hk : s.card = k) (hl : sᶜ.card = l) (f : (Fin n → M') →ₘₛₗ[σ] M₂) (x y : M'),
  ((((MultilinearMap.curryFinFinset σ M₂ M' hk hl) f) fun x_1 ↦ x) fun x ↦ y) = f (s.piecewise (fun x_1 ↦ x) fun x ↦ y)