File: Mathlib/LinearAlgebra/Multilinear/Basic.lean

full_name: MultilinearMap.toFun
code: /-- Multilinear maps over the ring `R`, from `∀ i, M₁ i` to `M₂` where `M₁ i` and `M₂` are modules
over `R`. -/
structure MultilinearMap (R : Type uR) {ι : Type uι} (M₁ : ι → Type v₁) (M₂ : Type v₂) [Semiring R]
  [∀ i, AddCommMonoid (M₁ i)] [AddCommMonoid M₂] [∀ i, Module R (M₁ i)] [Module R M₂] where
  /-- The underlying multivariate function of a multilinear map. -/
  toFun : (∀ i, M₁ i) → M₂
  /-- A multilinear map is additive in every argument. -/
  map_add' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i),
      toFun (update m i (x + y)) = toFun (update m i x) + toFun (update m i y)
  /-- A multilinear map is compatible with scalar multiplication in every argument. -/
  map_smul' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (c : R) (x : M₁ i),
      toFun (update m i (c • x)) = c • toFun (update m i x)
goal: ((i : ι) → M₁ i) → M₂

full_name: MultilinearMap
code: /-- Multilinear maps over the ring `R`, from `∀ i, M₁ i` to `M₂` where `M₁ i` and `M₂` are modules
over `R`. -/
structure MultilinearMap (R : Type uR) {ι : Type uι} (M₁ : ι → Type v₁) (M₂ : Type v₂) [Semiring R]
  [∀ i, AddCommMonoid (M₁ i)] [AddCommMonoid M₂] [∀ i, Module R (M₁ i)] [Module R M₂] where
  /-- The underlying multivariate function of a multilinear map. -/
  toFun : (∀ i, M₁ i) → M₂
  /-- A multilinear map is additive in every argument. -/
  map_add' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i),
      toFun (update m i (x + y)) = toFun (update m i x) + toFun (update m i y)
  /-- A multilinear map is compatible with scalar multiplication in every argument. -/
  map_smul' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (c : R) (x : M₁ i),
      toFun (update m i (c • x)) = c • toFun (update m i x)
goal: Type (max (max uι v₁) v₂)

full_name: MultilinearMap.map_add'
code: /-- Multilinear maps over the ring `R`, from `∀ i, M₁ i` to `M₂` where `M₁ i` and `M₂` are modules
over `R`. -/
structure MultilinearMap (R : Type uR) {ι : Type uι} (M₁ : ι → Type v₁) (M₂ : Type v₂) [Semiring R]
  [∀ i, AddCommMonoid (M₁ i)] [AddCommMonoid M₂] [∀ i, Module R (M₁ i)] [Module R M₂] where
  /-- The underlying multivariate function of a multilinear map. -/
  toFun : (∀ i, M₁ i) → M₂
  /-- A multilinear map is additive in every argument. -/
  map_add' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i),
      toFun (update m i (x + y)) = toFun (update m i x) + toFun (update m i y)
  /-- A multilinear map is compatible with scalar multiplication in every argument. -/
  map_smul' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (c : R) (x : M₁ i),
      toFun (update m i (c • x)) = c • toFun (update m i x)
goal: self.toFun (Function.update m i (x + y)) = self.toFun (Function.update m i x) + self.toFun (Function.update m i y)

full_name: MultilinearMap.map_smul'
code: /-- Multilinear maps over the ring `R`, from `∀ i, M₁ i` to `M₂` where `M₁ i` and `M₂` are modules
over `R`. -/
structure MultilinearMap (R : Type uR) {ι : Type uι} (M₁ : ι → Type v₁) (M₂ : Type v₂) [Semiring R]
  [∀ i, AddCommMonoid (M₁ i)] [AddCommMonoid M₂] [∀ i, Module R (M₁ i)] [Module R M₂] where
  /-- The underlying multivariate function of a multilinear map. -/
  toFun : (∀ i, M₁ i) → M₂
  /-- A multilinear map is additive in every argument. -/
  map_add' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i),
      toFun (update m i (x + y)) = toFun (update m i x) + toFun (update m i y)
  /-- A multilinear map is compatible with scalar multiplication in every argument. -/
  map_smul' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (c : R) (x : M₁ i),
      toFun (update m i (c • x)) = c • toFun (update m i x)
goal: self.toFun (Function.update m i (c • x)) = c • self.toFun (Function.update m i x)

full_name: MultilinearMap.instFunLikeForall
code: instance : FunLike (MultilinearMap R M₁ M₂) (∀ i, M₁ i) M₂ 
goal: FunLike (MultilinearMap R M₁ M₂) ((i : ι) → M₁ i) M₂

full_name: MultilinearMap.toFun_eq_coe
code: @[simp]
theorem toFun_eq_coe : f.toFun = ⇑f 
goal: f.toFun = ⇑f

full_name: MultilinearMap.coe_mk
code: @[simp]
theorem coe_mk (f : (∀ i, M₁ i) → M₂) (h₁ h₂) : ⇑(⟨f, h₁, h₂⟩ : MultilinearMap R M₁ M₂) = f 
goal: ⇑{ toFun := f, map_add' := h₁, map_smul' := h₂ } = f

full_name: MultilinearMap.congr_fun
code: theorem congr_fun {f g : MultilinearMap R M₁ M₂} (h : f = g) (x : ∀ i, M₁ i) : f x = g x 
goal: f x = g x

full_name: MultilinearMap.congr_arg
code: nonrec theorem congr_arg (f : MultilinearMap R M₁ M₂) {x y : ∀ i, M₁ i} (h : x = y) : f x = f y 
goal: f x = f y

full_name: MultilinearMap.coe_injective
code: theorem coe_injective : Injective ((↑) : MultilinearMap R M₁ M₂ → (∀ i, M₁ i) → M₂) 
goal: Function.Injective DFunLike.coe

full_name: MultilinearMap.coe_inj
code: @[norm_cast] -- Porting note (#10618): Removed simp attribute, simp can prove this
theorem coe_inj {f g : MultilinearMap R M₁ M₂} : (f : (∀ i, M₁ i) → M₂) = g ↔ f = g 
goal: ⇑f = ⇑g ↔ f = g

full_name: MultilinearMap.ext
code: @[ext]
theorem ext {f f' : MultilinearMap R M₁ M₂} (H : ∀ x, f x = f' x) : f = f' 
goal: f = f'

full_name: MultilinearMap.ext_iff
code: protected theorem ext_iff {f g : MultilinearMap R M₁ M₂} : f = g ↔ ∀ x, f x = g x 
goal: f = g ↔ ∀ (x : (i : ι) → M₁ i), f x = g x

full_name: MultilinearMap.mk_coe
code: @[simp]
theorem mk_coe (f : MultilinearMap R M₁ M₂) (h₁ h₂) :
    (⟨f, h₁, h₂⟩ : MultilinearMap R M₁ M₂) = f 
goal: { toFun := ⇑f, map_add' := h₁, map_smul' := h₂ } = f

full_name: MultilinearMap.map_add
code: @[simp]
protected theorem map_add [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i) :
    f (update m i (x + y)) = f (update m i x) + f (update m i y) 
goal: f (Function.update m i (x + y)) = f (Function.update m i x) + f (Function.update m i y)

full_name: MultilinearMap.map_smul
code: @[simp]
protected theorem map_smul [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (c : R) (x : M₁ i) :
    f (update m i (c • x)) = c • f (update m i x) 
goal: f (Function.update m i (c • x)) = c • f (Function.update m i x)

full_name: MultilinearMap.map_coord_zero
code: theorem map_coord_zero {m : ∀ i, M₁ i} (i : ι) (h : m i = 0) : f m = 0 
goal: f m = 0

full_name: MultilinearMap.map_update_zero
code: @[simp]
theorem map_update_zero [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) : f (update m i 0) = 0 
goal: f (Function.update m i 0) = 0

full_name: MultilinearMap.map_zero
code: @[simp]
theorem map_zero [Nonempty ι] : f 0 = 0 
goal: f 0 = 0

full_name: MultilinearMap.instAdd
code: instance : Add (MultilinearMap R M₁ M₂) 
goal: Add (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.add_apply
code: @[simp]
theorem add_apply (m : ∀ i, M₁ i) : (f + f') m = f m + f' m 
goal: (f + f') m = f m + f' m

full_name: MultilinearMap.instZero
code: instance : Zero (MultilinearMap R M₁ M₂) 
goal: Zero (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.instInhabited
code: instance : Inhabited (MultilinearMap R M₁ M₂) 
goal: Inhabited (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.zero_apply
code: @[simp]
theorem zero_apply (m : ∀ i, M₁ i) : (0 : MultilinearMap R M₁ M₂) m = 0 
goal: 0 m = 0

full_name: MultilinearMap.instSMul
code: instance : SMul R' (MultilinearMap A M₁ M₂) 
goal: SMul R' (MultilinearMap A M₁ M₂)

full_name: MultilinearMap.smul_apply
code: @[simp]
theorem smul_apply (f : MultilinearMap A M₁ M₂) (c : R') (m : ∀ i, M₁ i) : (c • f) m = c • f m 
goal: (c • f) m = c • f m

full_name: MultilinearMap.coe_smul
code: theorem coe_smul (c : R') (f : MultilinearMap A M₁ M₂) : ⇑(c • f) = c • (⇑ f) 
goal: ⇑(c • f) = c • ⇑f

full_name: MultilinearMap.addCommMonoid
code: instance addCommMonoid : AddCommMonoid (MultilinearMap R M₁ M₂) 
goal: AddCommMonoid (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.coeAddMonoidHom
code: /-- Coercion of a multilinear map to a function as an additive monoid homomorphism. -/
@[simps] def coeAddMonoidHom : MultilinearMap R M₁ M₂ →+ (((i : ι) → M₁ i) → M₂) 
goal: MultilinearMap R M₁ M₂ →+ ((i : ι) → M₁ i) → M₂

full_name: MultilinearMap.coeAddMonoidHom_apply
code: /-- Coercion of a multilinear map to a function as an additive monoid homomorphism. -/
@[simps] def coeAddMonoidHom : MultilinearMap R M₁ M₂ →+ (((i : ι) → M₁ i) → M₂) 
goal: ∀ (a : MultilinearMap R M₁ M₂) (a_1 : (i : ι) → M₁ i), MultilinearMap.coeAddMonoidHom a a_1 = a a_1

full_name: MultilinearMap.coe_sum
code: @[simp]
theorem coe_sum {α : Type*} (f : α → MultilinearMap R M₁ M₂) (s : Finset α) :
    ⇑(∑ a ∈ s, f a) = ∑ a ∈ s, ⇑(f a) 
goal: ⇑(∑ a ∈ s, f a) = ∑ a ∈ s, ⇑(f a)

full_name: MultilinearMap.sum_apply
code: theorem sum_apply {α : Type*} (f : α → MultilinearMap R M₁ M₂) (m : ∀ i, M₁ i) {s : Finset α} :
    (∑ a ∈ s, f a) m = ∑ a ∈ s, f a m 
goal: (∑ a ∈ s, f a) m = ∑ a ∈ s, (f a) m

full_name: MultilinearMap.toLinearMap_apply
code: /-- If `f` is a multilinear map, then `f.toLinearMap m i` is the linear map obtained by fixing all
coordinates but `i` equal to those of `m`, and varying the `i`-th coordinate. -/
@[simps]
def toLinearMap [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) : M₁ i →ₗ[R] M₂ 
goal: (f.toLinearMap m i) x = f (Function.update m i x)

full_name: MultilinearMap.toLinearMap
code: /-- If `f` is a multilinear map, then `f.toLinearMap m i` is the linear map obtained by fixing all
coordinates but `i` equal to those of `m`, and varying the `i`-th coordinate. -/
@[simps]
def toLinearMap [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) : M₁ i →ₗ[R] M₂ 
goal: M₁ i →ₗ[R] M₂

full_name: MultilinearMap.prod_apply
code: /-- The cartesian product of two multilinear maps, as a multilinear map. -/
@[simps]
def prod (f : MultilinearMap R M₁ M₂) (g : MultilinearMap R M₁ M₃) :
    MultilinearMap R M₁ (M₂ × M₃) 
goal: (f.prod g) m = (f m, g m)

full_name: MultilinearMap.prod
code: /-- The cartesian product of two multilinear maps, as a multilinear map. -/
@[simps]
def prod (f : MultilinearMap R M₁ M₂) (g : MultilinearMap R M₁ M₃) :
    MultilinearMap R M₁ (M₂ × M₃) 
goal: MultilinearMap R M₁ (M₂ × M₃)

full_name: MultilinearMap.pi
code: /-- Combine a family of multilinear maps with the same domain and codomains `M' i` into a
multilinear map taking values in the space of functions `∀ i, M' i`. -/
@[simps]
def pi {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)] [∀ i, Module R (M' i)]
    (f : ∀ i, MultilinearMap R M₁ (M' i)) : MultilinearMap R M₁ (∀ i, M' i) 
goal: MultilinearMap R M₁ ((i : ι') → M' i)

full_name: MultilinearMap.pi_apply
code: /-- Combine a family of multilinear maps with the same domain and codomains `M' i` into a
multilinear map taking values in the space of functions `∀ i, M' i`. -/
@[simps]
def pi {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)] [∀ i, Module R (M' i)]
    (f : ∀ i, MultilinearMap R M₁ (M' i)) : MultilinearMap R M₁ (∀ i, M' i) 
goal: (MultilinearMap.pi f) m i = (f i) m

full_name: MultilinearMap.ofSubsingleton_apply_apply
code: /-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃ 
goal: ((MultilinearMap.ofSubsingleton R M₂ M₃ i) f) x = f (x i)

full_name: MultilinearMap.ofSubsingleton_symm_apply_apply
code: /-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃ 
goal: ((MultilinearMap.ofSubsingleton R M₂ M₃ i).symm f) x = f fun x_1 => x

full_name: MultilinearMap.ofSubsingleton
code: /-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃ 
goal: (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun x => M₂) M₃

full_name: MultilinearMap.constOfIsEmpty
code: /-- The constant map is multilinear when `ι` is empty. -/
-- Porting note: Removed [simps] & added simpNF-approved version of the generated lemma manually.
@[simps (config := .asFn)]
def constOfIsEmpty [IsEmpty ι] (m : M₂) : MultilinearMap R M₁ M₂ 
goal: MultilinearMap R M₁ M₂

full_name: MultilinearMap.constOfIsEmpty_apply
code: /-- The constant map is multilinear when `ι` is empty. -/
-- Porting note: Removed [simps] & added simpNF-approved version of the generated lemma manually.
@[simps (config := .asFn)]
def constOfIsEmpty [IsEmpty ι] (m : M₂) : MultilinearMap R M₁ M₂ 
goal: ⇑(MultilinearMap.constOfIsEmpty R M₁ m) = Function.const ((i : ι) → M₁ i) m

full_name: MultilinearMap.restr
code: /-- Given a multilinear map `f` on `n` variables (parameterized by `Fin n`) and a subset `s` of `k`
of these variables, one gets a new multilinear map on `Fin k` by varying these variables, and fixing
the other ones equal to a given value `z`. It is denoted by `f.restr s hk z`, where `hk` is a
proof that the cardinality of `s` is `k`. The implicit identification between `Fin k` and `s` that
we use is the canonical (increasing) bijection. -/
def restr {k n : ℕ} (f : MultilinearMap R (fun _ : Fin n => M') M₂) (s : Finset (Fin n))
    (hk : s.card = k) (z : M') : MultilinearMap R (fun _ : Fin k => M') M₂ 
goal: MultilinearMap R (fun x => M') M₂

full_name: MultilinearMap.cons_add
code: /-- In the specific case of multilinear maps on spaces indexed by `Fin (n+1)`, where one can build
an element of `∀ (i : Fin (n+1)), M i` using `cons`, one can express directly the additivity of a
multilinear map along the first variable. -/
theorem cons_add (f : MultilinearMap R M M₂) (m : ∀ i : Fin n, M i.succ) (x y : M 0) :
    f (cons (x + y) m) = f (cons x m) + f (cons y m) 
goal: f (Fin.cons (x + y) m) = f (Fin.cons x m) + f (Fin.cons y m)

full_name: MultilinearMap.cons_smul
code: /-- In the specific case of multilinear maps on spaces indexed by `Fin (n+1)`, where one can build
an element of `∀ (i : Fin (n+1)), M i` using `cons`, one can express directly the multiplicativity
of a multilinear map along the first variable. -/
theorem cons_smul (f : MultilinearMap R M M₂) (m : ∀ i : Fin n, M i.succ) (c : R) (x : M 0) :
    f (cons (c • x) m) = c • f (cons x m) 
goal: f (Fin.cons (c • x) m) = c • f (Fin.cons x m)

full_name: MultilinearMap.snoc_add
code: /-- In the specific case of multilinear maps on spaces indexed by `Fin (n+1)`, where one can build
an element of `∀ (i : Fin (n+1)), M i` using `snoc`, one can express directly the additivity of a
multilinear map along the first variable. -/
theorem snoc_add (f : MultilinearMap R M M₂)
    (m : ∀ i : Fin n, M (castSucc i)) (x y : M (last n)) :
    f (snoc m (x + y)) = f (snoc m x) + f (snoc m y) 
goal: f (Fin.snoc m (x + y)) = f (Fin.snoc m x) + f (Fin.snoc m y)

full_name: MultilinearMap.snoc_smul
code: /-- In the specific case of multilinear maps on spaces indexed by `Fin (n+1)`, where one can build
an element of `∀ (i : Fin (n+1)), M i` using `cons`, one can express directly the multiplicativity
of a multilinear map along the first variable. -/
theorem snoc_smul (f : MultilinearMap R M M₂) (m : ∀ i : Fin n, M (castSucc i)) (c : R)
    (x : M (last n)) : f (snoc m (c • x)) = c • f (snoc m x) 
goal: f (Fin.snoc m (c • x)) = c • f (Fin.snoc m x)

full_name: MultilinearMap.compLinearMap
code: /-- If `g` is a multilinear map and `f` is a collection of linear maps,
then `g (f₁ m₁, ..., fₙ mₙ)` is again a multilinear map, that we call
`g.compLinearMap f`. -/
def compLinearMap (g : MultilinearMap R M₁' M₂) (f : ∀ i, M₁ i →ₗ[R] M₁' i) :
    MultilinearMap R M₁ M₂ 
goal: MultilinearMap R M₁ M₂

full_name: MultilinearMap.compLinearMap_apply
code: @[simp]
theorem compLinearMap_apply (g : MultilinearMap R M₁' M₂) (f : ∀ i, M₁ i →ₗ[R] M₁' i)
    (m : ∀ i, M₁ i) : g.compLinearMap f m = g fun i => f i (m i) 
goal: (g.compLinearMap f) m = g fun i => (f i) (m i)

full_name: MultilinearMap.compLinearMap_assoc
code: /-- Composing a multilinear map twice with a linear map in each argument is
the same as composing with their composition. -/
theorem compLinearMap_assoc (g : MultilinearMap R M₁'' M₂) (f₁ : ∀ i, M₁' i →ₗ[R] M₁'' i)
    (f₂ : ∀ i, M₁ i →ₗ[R] M₁' i) :
    (g.compLinearMap f₁).compLinearMap f₂ = g.compLinearMap fun i => f₁ i ∘ₗ f₂ i 
goal: (g.compLinearMap f₁).compLinearMap f₂ = g.compLinearMap fun i => f₁ i ∘ₗ f₂ i

full_name: MultilinearMap.zero_compLinearMap
code: /-- Composing the zero multilinear map with a linear map in each argument. -/
@[simp]
theorem zero_compLinearMap (f : ∀ i, M₁ i →ₗ[R] M₁' i) :
    (0 : MultilinearMap R M₁' M₂).compLinearMap f = 0 
goal: MultilinearMap.compLinearMap 0 f = 0

full_name: MultilinearMap.compLinearMap_id
code: /-- Composing a multilinear map with the identity linear map in each argument. -/
@[simp]
theorem compLinearMap_id (g : MultilinearMap R M₁' M₂) :
    (g.compLinearMap fun _ => LinearMap.id) = g 
goal: (g.compLinearMap fun x => LinearMap.id) = g

full_name: MultilinearMap.compLinearMap_injective
code: /-- Composing with a family of surjective linear maps is injective. -/
theorem compLinearMap_injective (f : ∀ i, M₁ i →ₗ[R] M₁' i) (hf : ∀ i, Surjective (f i)) :
    Injective fun g : MultilinearMap R M₁' M₂ => g.compLinearMap f 
goal: Function.Injective fun g => g.compLinearMap f

full_name: MultilinearMap.compLinearMap_inj
code: theorem compLinearMap_inj (f : ∀ i, M₁ i →ₗ[R] M₁' i) (hf : ∀ i, Surjective (f i))
    (g₁ g₂ : MultilinearMap R M₁' M₂) : g₁.compLinearMap f = g₂.compLinearMap f ↔ g₁ = g₂ 
goal: g₁.compLinearMap f = g₂.compLinearMap f ↔ g₁ = g₂

full_name: MultilinearMap.comp_linearEquiv_eq_zero_iff
code: /-- Composing a multilinear map with a linear equiv on each argument gives the zero map
if and only if the multilinear map is the zero map. -/
@[simp]
theorem comp_linearEquiv_eq_zero_iff (g : MultilinearMap R M₁' M₂) (f : ∀ i, M₁ i ≃ₗ[R] M₁' i) :
    (g.compLinearMap fun i => (f i : M₁ i →ₗ[R] M₁' i)) = 0 ↔ g = 0 
goal: (g.compLinearMap fun i => ↑(f i)) = 0 ↔ g = 0

full_name: MultilinearMap.map_piecewise_add
code: /-- If one adds to a vector `m'` another vector `m`, but only for coordinates in a finset `t`, then
the image under a multilinear map `f` is the sum of `f (s.piecewise m m')` along all subsets `s` of
`t`. This is mainly an auxiliary statement to prove the result when `t = univ`, given in
`map_add_univ`, although it can be useful in its own right as it does not require the index set `ι`
to be finite. -/
theorem map_piecewise_add [DecidableEq ι] (m m' : ∀ i, M₁ i) (t : Finset ι) :
    f (t.piecewise (m + m') m') = ∑ s ∈ t.powerset, f (s.piecewise m m') 
goal: f (t.piecewise (m + m') m') = ∑ s ∈ t.powerset, f (s.piecewise m m')

full_name: MultilinearMap.map_add_univ
code: /-- Additivity of a multilinear map along all coordinates at the same time,
writing `f (m + m')` as the sum of `f (s.piecewise m m')` over all sets `s`. -/
theorem map_add_univ [DecidableEq ι] [Fintype ι] (m m' : ∀ i, M₁ i) :
    f (m + m') = ∑ s : Finset ι, f (s.piecewise m m') 
goal: f (m + m') = ∑ s : Finset ι, f (s.piecewise m m')

full_name: MultilinearMap.map_sum_finset_aux
code: /-- If `f` is multilinear, then `f (Σ_{j₁ ∈ A₁} g₁ j₁, ..., Σ_{jₙ ∈ Aₙ} gₙ jₙ)` is the sum of
`f (g₁ (r 1), ..., gₙ (r n))` where `r` ranges over all functions with `r 1 ∈ A₁`, ...,
`r n ∈ Aₙ`. This follows from multilinearity by expanding successively with respect to each
coordinate. Here, we give an auxiliary statement tailored for an inductive proof. Use instead
`map_sum_finset`. -/
theorem map_sum_finset_aux [DecidableEq ι] [Fintype ι] {n : ℕ} (h : (∑ i, (A i).card) = n) :
    (f fun i => ∑ j ∈ A i, g i j) = ∑ r ∈ piFinset A, f fun i => g i (r i) 
goal: (f fun i => ∑ j ∈ A i, g i j) = ∑ r ∈ Fintype.piFinset A, f fun i => g i (r i)

full_name: MultilinearMap.map_sum_finset
code: /-- If `f` is multilinear, then `f (Σ_{j₁ ∈ A₁} g₁ j₁, ..., Σ_{jₙ ∈ Aₙ} gₙ jₙ)` is the sum of
`f (g₁ (r 1), ..., gₙ (r n))` where `r` ranges over all functions with `r 1 ∈ A₁`, ...,
`r n ∈ Aₙ`. This follows from multilinearity by expanding successively with respect to each
coordinate. -/
theorem map_sum_finset [DecidableEq ι] [Fintype ι] :
    (f fun i => ∑ j ∈ A i, g i j) = ∑ r ∈ piFinset A, f fun i => g i (r i) 
goal: (f fun i => ∑ j ∈ A i, g i j) = ∑ r ∈ Fintype.piFinset A, f fun i => g i (r i)

full_name: MultilinearMap.map_sum
code: /-- If `f` is multilinear, then `f (Σ_{j₁} g₁ j₁, ..., Σ_{jₙ} gₙ jₙ)` is the sum of
`f (g₁ (r 1), ..., gₙ (r n))` where `r` ranges over all functions `r`. This follows from
multilinearity by expanding successively with respect to each coordinate. -/
theorem map_sum [DecidableEq ι] [Fintype ι] [∀ i, Fintype (α i)] :
    (f fun i => ∑ j, g i j) = ∑ r : ∀ i, α i, f fun i => g i (r i) 
goal: (f fun i => ∑ j : α i, g i j) = ∑ r : (i : ι) → α i, f fun i => g i (r i)

full_name: MultilinearMap.map_update_sum
code: theorem map_update_sum {α : Type*} [DecidableEq ι] (t : Finset α) (i : ι) (g : α → M₁ i)
    (m : ∀ i, M₁ i) : f (update m i (∑ a ∈ t, g a)) = ∑ a ∈ t, f (update m i (g a)) 
goal: f (Function.update m i (∑ a ∈ t, g a)) = ∑ a ∈ t, f (Function.update m i (g a))

full_name: MultilinearMap.codRestrict
code: /-- Restrict the codomain of a multilinear map to a submodule.

This is the multilinear version of `LinearMap.codRestrict`. -/
@[simps]
def codRestrict (f : MultilinearMap R M₁ M₂) (p : Submodule R M₂) (h : ∀ v, f v ∈ p) :
    MultilinearMap R M₁ p 
goal: MultilinearMap R M₁ ↥p

full_name: MultilinearMap.codRestrict_apply_coe
code: /-- Restrict the codomain of a multilinear map to a submodule.

This is the multilinear version of `LinearMap.codRestrict`. -/
@[simps]
def codRestrict (f : MultilinearMap R M₁ M₂) (p : Submodule R M₂) (h : ∀ v, f v ∈ p) :
    MultilinearMap R M₁ p 
goal: ↑((f.codRestrict p h) v) = f v

full_name: MultilinearMap.restrictScalars
code: /-- Reinterpret an `A`-multilinear map as an `R`-multilinear map, if `A` is an algebra over `R`
and their actions on all involved modules agree with the action of `R` on `A`. -/
def restrictScalars (f : MultilinearMap A M₁ M₂) : MultilinearMap R M₁ M₂ 
goal: MultilinearMap R M₁ M₂

full_name: MultilinearMap.coe_restrictScalars
code: @[simp]
theorem coe_restrictScalars (f : MultilinearMap A M₁ M₂) : ⇑(f.restrictScalars R) = f 
goal: ⇑(MultilinearMap.restrictScalars R f) = ⇑f

full_name: MultilinearMap.domDomCongr_apply
code: /-- Transfer the arguments to a map along an equivalence between argument indices.

The naming is derived from `Finsupp.domCongr`, noting that here the permutation applies to the
domain of the domain. -/
@[simps apply]
def domDomCongr (σ : ι₁ ≃ ι₂) (m : MultilinearMap R (fun _ : ι₁ => M₂) M₃) :
    MultilinearMap R (fun _ : ι₂ => M₂) M₃ 
goal: (MultilinearMap.domDomCongr σ m) v = m fun i => v (σ i)

full_name: MultilinearMap.domDomCongr
code: /-- Transfer the arguments to a map along an equivalence between argument indices.

The naming is derived from `Finsupp.domCongr`, noting that here the permutation applies to the
domain of the domain. -/
@[simps apply]
def domDomCongr (σ : ι₁ ≃ ι₂) (m : MultilinearMap R (fun _ : ι₁ => M₂) M₃) :
    MultilinearMap R (fun _ : ι₂ => M₂) M₃ 
goal: MultilinearMap R (fun x => M₂) M₃

full_name: MultilinearMap.domDomCongr_trans
code: theorem domDomCongr_trans (σ₁ : ι₁ ≃ ι₂) (σ₂ : ι₂ ≃ ι₃)
    (m : MultilinearMap R (fun _ : ι₁ => M₂) M₃) :
    m.domDomCongr (σ₁.trans σ₂) = (m.domDomCongr σ₁).domDomCongr σ₂ 
goal: MultilinearMap.domDomCongr (σ₁.trans σ₂) m = MultilinearMap.domDomCongr σ₂ (MultilinearMap.domDomCongr σ₁ m)

full_name: MultilinearMap.domDomCongr_mul
code: theorem domDomCongr_mul (σ₁ : Equiv.Perm ι₁) (σ₂ : Equiv.Perm ι₁)
    (m : MultilinearMap R (fun _ : ι₁ => M₂) M₃) :
    m.domDomCongr (σ₂ * σ₁) = (m.domDomCongr σ₁).domDomCongr σ₂ 
goal: MultilinearMap.domDomCongr (σ₂ * σ₁) m = MultilinearMap.domDomCongr σ₂ (MultilinearMap.domDomCongr σ₁ m)

full_name: MultilinearMap.domDomCongrEquiv_apply
code: /-- `MultilinearMap.domDomCongr` as an equivalence.

This is declared separately because it does not work with dot notation. -/
@[simps apply symm_apply]
def domDomCongrEquiv (σ : ι₁ ≃ ι₂) :
    MultilinearMap R (fun _ : ι₁ => M₂) M₃ ≃+ MultilinearMap R (fun _ : ι₂ => M₂) M₃ 
goal: (MultilinearMap.domDomCongrEquiv σ) m = MultilinearMap.domDomCongr σ m

full_name: MultilinearMap.domDomCongrEquiv
code: /-- `MultilinearMap.domDomCongr` as an equivalence.

This is declared separately because it does not work with dot notation. -/
@[simps apply symm_apply]
def domDomCongrEquiv (σ : ι₁ ≃ ι₂) :
    MultilinearMap R (fun _ : ι₁ => M₂) M₃ ≃+ MultilinearMap R (fun _ : ι₂ => M₂) M₃ 
goal: MultilinearMap R (fun x => M₂) M₃ ≃+ MultilinearMap R (fun x => M₂) M₃

full_name: MultilinearMap.domDomCongrEquiv_symm_apply
code: /-- `MultilinearMap.domDomCongr` as an equivalence.

This is declared separately because it does not work with dot notation. -/
@[simps apply symm_apply]
def domDomCongrEquiv (σ : ι₁ ≃ ι₂) :
    MultilinearMap R (fun _ : ι₁ => M₂) M₃ ≃+ MultilinearMap R (fun _ : ι₂ => M₂) M₃ 
goal: (MultilinearMap.domDomCongrEquiv σ).symm m = MultilinearMap.domDomCongr σ.symm m

full_name: MultilinearMap.domDomCongr_eq_iff
code: /-- The results of applying `domDomCongr` to two maps are equal if
and only if those maps are. -/
@[simp]
theorem domDomCongr_eq_iff (σ : ι₁ ≃ ι₂) (f g : MultilinearMap R (fun _ : ι₁ => M₂) M₃) :
    f.domDomCongr σ = g.domDomCongr σ ↔ f = g 
goal: MultilinearMap.domDomCongr σ f = MultilinearMap.domDomCongr σ g ↔ f = g

full_name: MultilinearMap.domDomRestrict_aux
code: lemma domDomRestrict_aux [DecidableEq ι] (P : ι → Prop) [DecidablePred P]
    [DecidableEq {a // P a}]
    (x : (i : {a // P a}) → M₁ i) (z : (i : {a // ¬ P a}) → M₁ i) (i : {a : ι // P a})
    (c : M₁ i) : (fun j ↦ if h : P j then Function.update x i c ⟨j, h⟩ else z ⟨j, h⟩) =
    Function.update (fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩) i c 
goal: (fun j => if h : P j then Function.update x i c ⟨j, h⟩ else z ⟨j, h⟩) =
  Function.update (fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩) (↑i) c

full_name: MultilinearMap.domDomRestrict_aux_right
code: lemma domDomRestrict_aux_right [DecidableEq ι] (P : ι → Prop) [DecidablePred P]
    [DecidableEq {a // ¬ P a}]
    (x : (i : {a // P a}) → M₁ i) (z : (i : {a // ¬ P a}) → M₁ i) (i : {a : ι // ¬ P a})
    (c : M₁ i) : (fun j ↦ if h : P j then x ⟨j, h⟩ else Function.update z i c ⟨j, h⟩) =
    Function.update (fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩) i c 
goal: (fun j => if h : P j then x ⟨j, h⟩ else Function.update z i c ⟨j, h⟩) =
  Function.update (fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩) (↑i) c

full_name: MultilinearMap.domDomRestrict
code: /-- Given a multilinear map `f` on `(i : ι) → M i`, a (decidable) predicate `P` on `ι` and
an element `z` of `(i : {a // ¬ P a}) → M₁ i`, construct a multilinear map on
`(i : {a // P a}) → M₁ i)` whose value at `x` is `f` evaluated at the vector with `i`th coordinate
`x i` if `P i` and `z i` otherwise.

The naming is similar to `MultilinearMap.domDomCongr`: here we are applying the restriction to the
domain of the domain.

For a linear map version, see `MultilinearMap.domDomRestrictₗ`.
-/
def domDomRestrict (f : MultilinearMap R M₁ M₂) (P : ι → Prop) [DecidablePred P]
    (z : (i : {a : ι // ¬ P a}) → M₁ i) :
    MultilinearMap R (fun (i : {a : ι // P a}) => M₁ i) M₂ 
goal: MultilinearMap R (fun i => M₁ ↑i) M₂

full_name: MultilinearMap.domDomRestrict_apply
code: @[simp]
lemma domDomRestrict_apply (f : MultilinearMap R M₁ M₂) (P : ι → Prop)
    [DecidablePred P] (x : (i : {a // P a}) → M₁ i) (z : (i : {a // ¬ P a}) → M₁ i) :
    f.domDomRestrict P z x = f (fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩) 
goal: (f.domDomRestrict P z) x = f fun j => if h : P j then x ⟨j, h⟩ else z ⟨j, h⟩

full_name: MultilinearMap.linearDeriv
code: /-- The "derivative" of a multilinear map, as a linear map from `(i : ι) → M₁ i` to `M₂`.
For continuous multilinear maps, this will indeed be the derivative. -/
def linearDeriv [DecidableEq ι] [Fintype ι] (f : MultilinearMap R M₁ M₂)
    (x : (i : ι) → M₁ i) : ((i : ι) → M₁ i) →ₗ[R] M₂ 
goal: ((i : ι) → M₁ i) →ₗ[R] M₂

full_name: MultilinearMap.linearDeriv_apply
code: @[simp]
lemma linearDeriv_apply [DecidableEq ι] [Fintype ι] (f : MultilinearMap R M₁ M₂)
    (x y : (i : ι) → M₁ i) :
    f.linearDeriv x y = ∑ i, f (update x i (y i)) 
goal: (f.linearDeriv x) y = ∑ i : ι, f (Function.update x i (y i))

full_name: LinearMap.compMultilinearMap
code: /-- Composing a multilinear map with a linear map gives again a multilinear map. -/
def compMultilinearMap (g : M₂ →ₗ[R] M₃) (f : MultilinearMap R M₁ M₂) : MultilinearMap R M₁ M₃ 
goal: MultilinearMap R M₁ M₃

full_name: LinearMap.coe_compMultilinearMap
code: @[simp]
theorem coe_compMultilinearMap (g : M₂ →ₗ[R] M₃) (f : MultilinearMap R M₁ M₂) :
    ⇑(g.compMultilinearMap f) = g ∘ f 
goal: ⇑(g.compMultilinearMap f) = ⇑g ∘ ⇑f

full_name: LinearMap.compMultilinearMap_apply
code: @[simp]
theorem compMultilinearMap_apply (g : M₂ →ₗ[R] M₃) (f : MultilinearMap R M₁ M₂) (m : ∀ i, M₁ i) :
    g.compMultilinearMap f m = g (f m) 
goal: (g.compMultilinearMap f) m = g (f m)

full_name: LinearMap.subtype_compMultilinearMap_codRestrict
code: /-- The multilinear version of `LinearMap.subtype_comp_codRestrict` -/
@[simp]
theorem subtype_compMultilinearMap_codRestrict (f : MultilinearMap R M₁ M₂) (p : Submodule R M₂)
    (h) : p.subtype.compMultilinearMap (f.codRestrict p h) = f 
goal: p.subtype.compMultilinearMap (f.codRestrict p h) = f

full_name: LinearMap.compMultilinearMap_codRestrict
code: /-- The multilinear version of `LinearMap.comp_codRestrict` -/
@[simp]
theorem compMultilinearMap_codRestrict (g : M₂ →ₗ[R] M₃) (f : MultilinearMap R M₁ M₂)
    (p : Submodule R M₃) (h) :
    (g.codRestrict p h).compMultilinearMap f =
      (g.compMultilinearMap f).codRestrict p fun v => h (f v) 
goal: (LinearMap.codRestrict p g h).compMultilinearMap f = (g.compMultilinearMap f).codRestrict p ⋯

full_name: LinearMap.compMultilinearMap_domDomCongr
code: @[simp]
theorem compMultilinearMap_domDomCongr (σ : ι₁ ≃ ι₂) (g : M₂ →ₗ[R] M₃)
    (f : MultilinearMap R (fun _ : ι₁ => M') M₂) :
    (g.compMultilinearMap f).domDomCongr σ = g.compMultilinearMap (f.domDomCongr σ) 
goal: MultilinearMap.domDomCongr σ (g.compMultilinearMap f) = g.compMultilinearMap (MultilinearMap.domDomCongr σ f)

full_name: MultilinearMap.instDistribMulActionOfSMulCommClass
code: instance [Monoid S] [DistribMulAction S M₂] [Module R M₂] [SMulCommClass R S M₂] :
    DistribMulAction S (MultilinearMap R M₁ M₂) 
goal: DistribMulAction S (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.instModule
code: /-- The space of multilinear maps over an algebra over `R` is a module over `R`, for the pointwise
addition and scalar multiplication. -/
instance : Module S (MultilinearMap R M₁ M₂) 
goal: Module S (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.instNoZeroSMulDivisors
code: instance [NoZeroSMulDivisors S M₂] : NoZeroSMulDivisors S (MultilinearMap R M₁ M₂) 
goal: NoZeroSMulDivisors S (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.ofSubsingletonₗ_symm_apply
code: /-- Linear equivalence between linear maps `M₂ →ₗ[R] M₃`
and one-multilinear maps `MultilinearMap R (fun _ : ι ↦ M₂) M₃`. -/
@[simps (config := { simpRhs := true })]
def ofSubsingletonₗ [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ₗ[S] MultilinearMap R (fun _ : ι ↦ M₂) M₃ 
goal: ∀ (a : MultilinearMap R (fun x => M₂) M₃),
  (MultilinearMap.ofSubsingletonₗ R S M₂ M₃ i).symm a = (MultilinearMap.ofSubsingleton R M₂ M₃ i).symm a

full_name: MultilinearMap.ofSubsingletonₗ
code: /-- Linear equivalence between linear maps `M₂ →ₗ[R] M₃`
and one-multilinear maps `MultilinearMap R (fun _ : ι ↦ M₂) M₃`. -/
@[simps (config := { simpRhs := true })]
def ofSubsingletonₗ [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ₗ[S] MultilinearMap R (fun _ : ι ↦ M₂) M₃ 
goal: (M₂ →ₗ[R] M₃) ≃ₗ[S] MultilinearMap R (fun x => M₂) M₃

full_name: MultilinearMap.ofSubsingletonₗ_apply
code: /-- Linear equivalence between linear maps `M₂ →ₗ[R] M₃`
and one-multilinear maps `MultilinearMap R (fun _ : ι ↦ M₂) M₃`. -/
@[simps (config := { simpRhs := true })]
def ofSubsingletonₗ [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ₗ[S] MultilinearMap R (fun _ : ι ↦ M₂) M₃ 
goal: ∀ (a : M₂ →ₗ[R] M₃), (MultilinearMap.ofSubsingletonₗ R S M₂ M₃ i) a = (MultilinearMap.ofSubsingleton R M₂ M₃ i) a

full_name: MultilinearMap.domDomCongrLinearEquiv'_apply
code: /-- The dependent version of `MultilinearMap.domDomCongrLinearEquiv`. -/
@[simps apply symm_apply]
def domDomCongrLinearEquiv' {ι' : Type*} (σ : ι ≃ ι') :
    MultilinearMap R M₁ M₂ ≃ₗ[S] MultilinearMap R (fun i => M₁ (σ.symm i)) M₂ 
goal: (MultilinearMap.domDomCongrLinearEquiv' R S M₁ M₂ σ) f =
  { toFun := ⇑f ∘ ⇑(Equiv.piCongrLeft' M₁ σ).symm, map_add' := ⋯, map_smul' := ⋯ }

full_name: MultilinearMap.domDomCongrLinearEquiv'
code: /-- The dependent version of `MultilinearMap.domDomCongrLinearEquiv`. -/
@[simps apply symm_apply]
def domDomCongrLinearEquiv' {ι' : Type*} (σ : ι ≃ ι') :
    MultilinearMap R M₁ M₂ ≃ₗ[S] MultilinearMap R (fun i => M₁ (σ.symm i)) M₂ 
goal: MultilinearMap R M₁ M₂ ≃ₗ[S] MultilinearMap R (fun i => M₁ (σ.symm i)) M₂

full_name: MultilinearMap.domDomCongrLinearEquiv'_symm_apply
code: /-- The dependent version of `MultilinearMap.domDomCongrLinearEquiv`. -/
@[simps apply symm_apply]
def domDomCongrLinearEquiv' {ι' : Type*} (σ : ι ≃ ι') :
    MultilinearMap R M₁ M₂ ≃ₗ[S] MultilinearMap R (fun i => M₁ (σ.symm i)) M₂ 
goal: (MultilinearMap.domDomCongrLinearEquiv' R S M₁ M₂ σ).symm f =
  { toFun := ⇑f ∘ ⇑(Equiv.piCongrLeft' M₁ σ), map_add' := ⋯, map_smul' := ⋯ }

full_name: MultilinearMap.constLinearEquivOfIsEmpty
code: /-- The space of constant maps is equivalent to the space of maps that are multilinear with respect
to an empty family. -/
@[simps]
def constLinearEquivOfIsEmpty [IsEmpty ι] : M₂ ≃ₗ[S] MultilinearMap R M₁ M₂ 
goal: M₂ ≃ₗ[S] MultilinearMap R M₁ M₂

full_name: MultilinearMap.constLinearEquivOfIsEmpty_apply
code: /-- The space of constant maps is equivalent to the space of maps that are multilinear with respect
to an empty family. -/
@[simps]
def constLinearEquivOfIsEmpty [IsEmpty ι] : M₂ ≃ₗ[S] MultilinearMap R M₁ M₂ 
goal: (MultilinearMap.constLinearEquivOfIsEmpty R S M₁ M₂) m = MultilinearMap.constOfIsEmpty R M₁ m

full_name: MultilinearMap.constLinearEquivOfIsEmpty_symm_apply
code: /-- The space of constant maps is equivalent to the space of maps that are multilinear with respect
to an empty family. -/
@[simps]
def constLinearEquivOfIsEmpty [IsEmpty ι] : M₂ ≃ₗ[S] MultilinearMap R M₁ M₂ 
goal: (MultilinearMap.constLinearEquivOfIsEmpty R S M₁ M₂).symm f = f 0

full_name: MultilinearMap.domDomCongrLinearEquiv_apply
code: /-- `MultilinearMap.domDomCongr` as a `LinearEquiv`. -/
@[simps apply symm_apply]
def domDomCongrLinearEquiv {ι₁ ι₂} (σ : ι₁ ≃ ι₂) :
    MultilinearMap R (fun _ : ι₁ => M₂) M₃ ≃ₗ[S] MultilinearMap R (fun _ : ι₂ => M₂) M₃ 
goal: ∀ (a : MultilinearMap R (fun x => M₂) M₃),
  (MultilinearMap.domDomCongrLinearEquiv R S M₂ M₃ σ) a = (MultilinearMap.domDomCongrEquiv σ).toFun a

full_name: MultilinearMap.domDomCongrLinearEquiv
code: /-- `MultilinearMap.domDomCongr` as a `LinearEquiv`. -/
@[simps apply symm_apply]
def domDomCongrLinearEquiv {ι₁ ι₂} (σ : ι₁ ≃ ι₂) :
    MultilinearMap R (fun _ : ι₁ => M₂) M₃ ≃ₗ[S] MultilinearMap R (fun _ : ι₂ => M₂) M₃ 
goal: MultilinearMap R (fun x => M₂) M₃ ≃ₗ[S] MultilinearMap R (fun x => M₂) M₃

full_name: MultilinearMap.domDomCongrLinearEquiv_symm_apply
code: /-- `MultilinearMap.domDomCongr` as a `LinearEquiv`. -/
@[simps apply symm_apply]
def domDomCongrLinearEquiv {ι₁ ι₂} (σ : ι₁ ≃ ι₂) :
    MultilinearMap R (fun _ : ι₁ => M₂) M₃ ≃ₗ[S] MultilinearMap R (fun _ : ι₂ => M₂) M₃ 
goal: ∀ (a : MultilinearMap R (fun x => M₂) M₃),
  (MultilinearMap.domDomCongrLinearEquiv R S M₂ M₃ σ).symm a = (MultilinearMap.domDomCongrEquiv σ).invFun a

full_name: MultilinearMap.domDomRestrictₗ
code: /-- Given a predicate `P`, one may associate to a multilinear map `f` a multilinear map
from the elements satisfying `P` to the multilinear maps on elements not satisfying `P`.
In other words, splitting the variables into two subsets one gets a multilinear map into
multilinear maps.
This is a linear map version of the function `MultilinearMap.domDomRestrict`. -/
def domDomRestrictₗ (f : MultilinearMap R M₁ M₂) (P : ι → Prop) [DecidablePred P] :
    MultilinearMap R (fun (i : {a : ι // ¬ P a}) => M₁ i)
      (MultilinearMap R (fun (i : {a : ι // P a}) => M₁ i) M₂) 
goal: MultilinearMap R (fun i => M₁ ↑i) (MultilinearMap R (fun i => M₁ ↑i) M₂)

full_name: MultilinearMap.iteratedFDeriv_aux
code: lemma iteratedFDeriv_aux {α : Type*} [DecidableEq α]
    (s : Set ι) [DecidableEq { x // x ∈ s }] (e : α ≃ s)
    (m : α → ((i : ι) → M₁ i)) (a : α) (z : (i : ι) → M₁ i) :
    (fun i ↦ update m a z (e.symm i) i) =
      (fun i ↦ update (fun j ↦ m (e.symm j) j) (e a) (z (e a)) i) 
goal: (fun i => Function.update m a z (e.symm i) ↑i) = fun i => Function.update (fun j => m (e.symm j) ↑j) (e a) (z ↑(e a)) i

full_name: MultilinearMap.iteratedFDerivComponent
code: /-- One of the components of the iterated derivative of a multilinear map. Given a bijection `e`
between a type `α` (typically `Fin k`) and a subset `s` of `ι`, this component is a multilinear map
of `k` vectors `v₁, ..., vₖ`, mapping them to `f (x₁, (v_{e.symm 2})₂, x₃, ...)`, where at
indices `i` in `s` one uses the `i`-th coordinate of the vector `v_{e.symm i}` and otherwise one
uses the `i`-th coordinate of a reference vector `x`.
This is multilinear in the components of `x` outside of `s`, and in the `v_j`. -/
noncomputable def iteratedFDerivComponent {α : Type*}
    (f : MultilinearMap R M₁ M₂) {s : Set ι} (e : α ≃ s) [DecidablePred (· ∈ s)] :
    MultilinearMap R (fun (i : {a : ι // a ∉ s}) ↦ M₁ i)
      (MultilinearMap R (fun (_ : α) ↦ (∀ i, M₁ i)) M₂) 
goal: MultilinearMap R (fun i => M₁ ↑i) (MultilinearMap R (fun x => (i : ι) → M₁ i) M₂)

full_name: MultilinearMap.iteratedFDeriv
code: /-- The `k`-th iterated derivative of a multilinear map `f` at the point `x`. It is a multilinear
map of `k` vectors `v₁, ..., vₖ` (with the same type as `x`), mapping them
to `∑ f (x₁, (v_{i₁})₂, x₃, ...)`, where at each index `j` one uses either `xⱼ` or one
of the `(vᵢ)ⱼ`, and each `vᵢ` has to be used exactly once.
The sum is parameterized by the embeddings of `Fin k` in the index type `ι` (or, equivalently,
by the subsets `s` of `ι` of cardinality `k` and then the bijections between `Fin k` and `s`).

For the continuous version, see `ContinuousMultilinearMap.iteratedFDeriv`. -/
protected noncomputable def iteratedFDeriv [Fintype ι]
    (f : MultilinearMap R M₁ M₂) (k : ℕ) (x : (i : ι) → M₁ i) :
    MultilinearMap R (fun (_ : Fin k) ↦ (∀ i, M₁ i)) M₂ 
goal: MultilinearMap R (fun x => (i : ι) → M₁ i) M₂

full_name: MultilinearMap.compLinearMapₗ
code: /-- If `f` is a collection of linear maps, then the construction `MultilinearMap.compLinearMap`
sending a multilinear map `g` to `g (f₁ ⬝ , ..., fₙ ⬝ )` is linear in `g`. -/
@[simps] def compLinearMapₗ (f : Π (i : ι), M₁ i →ₗ[R] M₁' i) :
    (MultilinearMap R M₁' M₂) →ₗ[R] MultilinearMap R M₁ M₂ 
goal: MultilinearMap R M₁' M₂ →ₗ[R] MultilinearMap R M₁ M₂

full_name: MultilinearMap.compLinearMapₗ_apply
code: /-- If `f` is a collection of linear maps, then the construction `MultilinearMap.compLinearMap`
sending a multilinear map `g` to `g (f₁ ⬝ , ..., fₙ ⬝ )` is linear in `g`. -/
@[simps] def compLinearMapₗ (f : Π (i : ι), M₁ i →ₗ[R] M₁' i) :
    (MultilinearMap R M₁' M₂) →ₗ[R] MultilinearMap R M₁ M₂ 
goal: (MultilinearMap.compLinearMapₗ f) g = g.compLinearMap f

full_name: MultilinearMap.compLinearMapMultilinear
code: /-- If `f` is a collection of linear maps, then the construction `MultilinearMap.compLinearMap`
sending a multilinear map `g` to `g (f₁ ⬝ , ..., fₙ ⬝ )` is linear in `g` and multilinear in
`f₁, ..., fₙ`. -/
@[simps] def compLinearMapMultilinear :
  @MultilinearMap R ι (fun i ↦ M₁ i →ₗ[R] M₁' i)
    ((MultilinearMap R M₁' M₂) →ₗ[R] MultilinearMap R M₁ M₂) _ _ _
      (fun i ↦ LinearMap.module) _ 
goal: MultilinearMap R (fun i => M₁ i →ₗ[R] M₁' i) (MultilinearMap R M₁' M₂ →ₗ[R] MultilinearMap R M₁ M₂)

full_name: MultilinearMap.compLinearMapMultilinear_apply
code: /-- If `f` is a collection of linear maps, then the construction `MultilinearMap.compLinearMap`
sending a multilinear map `g` to `g (f₁ ⬝ , ..., fₙ ⬝ )` is linear in `g` and multilinear in
`f₁, ..., fₙ`. -/
@[simps] def compLinearMapMultilinear :
  @MultilinearMap R ι (fun i ↦ M₁ i →ₗ[R] M₁' i)
    ((MultilinearMap R M₁' M₂) →ₗ[R] MultilinearMap R M₁ M₂) _ _ _
      (fun i ↦ LinearMap.module) _ 
goal: MultilinearMap.compLinearMapMultilinear f = MultilinearMap.compLinearMapₗ f

full_name: MultilinearMap.piLinearMap
code: /--
Let `M₁ᵢ` and `M₁ᵢ'` be two families of `R`-modules and `M₂` an `R`-module.
Let us denote `Π i, M₁ᵢ` and `Π i, M₁ᵢ'` by `M` and `M'` respectively.
If `g` is a multilinear map `M' → M₂`, then `g` can be reinterpreted as a multilinear
map from `Π i, M₁ᵢ ⟶ M₁ᵢ'` to `M ⟶ M₂` via `(fᵢ) ↦ v ↦ g(fᵢ vᵢ)`.
-/
@[simps!] def piLinearMap :
    MultilinearMap R M₁' M₂ →ₗ[R]
    MultilinearMap R (fun i ↦ M₁ i →ₗ[R] M₁' i) (MultilinearMap R M₁ M₂) 
goal: MultilinearMap R M₁' M₂ →ₗ[R] MultilinearMap R (fun i => M₁ i →ₗ[R] M₁' i) (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.piLinearMap_apply_apply_apply
code: /--
Let `M₁ᵢ` and `M₁ᵢ'` be two families of `R`-modules and `M₂` an `R`-module.
Let us denote `Π i, M₁ᵢ` and `Π i, M₁ᵢ'` by `M` and `M'` respectively.
If `g` is a multilinear map `M' → M₂`, then `g` can be reinterpreted as a multilinear
map from `Π i, M₁ᵢ ⟶ M₁ᵢ'` to `M ⟶ M₂` via `(fᵢ) ↦ v ↦ g(fᵢ vᵢ)`.
-/
@[simps!] def piLinearMap :
    MultilinearMap R M₁' M₂ →ₗ[R]
    MultilinearMap R (fun i ↦ M₁ i →ₗ[R] M₁' i) (MultilinearMap R M₁ M₂) 
goal: ∀ (a : (i : ι) → (fun i => M₁ i →ₗ[R] M₁' i) i) (m : (i : ι) → M₁ i),
  ((MultilinearMap.piLinearMap g) a) m = g fun i => (a i) (m i)

full_name: MultilinearMap.map_piecewise_smul
code: /-- If one multiplies by `c i` the coordinates in a finset `s`, then the image under a multilinear
map is multiplied by `∏ i ∈ s, c i`. This is mainly an auxiliary statement to prove the result when
`s = univ`, given in `map_smul_univ`, although it can be useful in its own right as it does not
require the index set `ι` to be finite. -/
theorem map_piecewise_smul [DecidableEq ι] (c : ι → R) (m : ∀ i, M₁ i) (s : Finset ι) :
    f (s.piecewise (fun i => c i • m i) m) = (∏ i ∈ s, c i) • f m 
goal: f (s.piecewise (fun i => c i • m i) m) = (∏ i ∈ s, c i) • f m

full_name: MultilinearMap.map_smul_univ
code: /-- Multiplicativity of a multilinear map along all coordinates at the same time,
writing `f (fun i => c i • m i)` as `(∏ i, c i) • f m`. -/
theorem map_smul_univ [Fintype ι] (c : ι → R) (m : ∀ i, M₁ i) :
    (f fun i => c i • m i) = (∏ i, c i) • f m 
goal: (f fun i => c i • m i) = (∏ i : ι, c i) • f m

full_name: MultilinearMap.map_update_smul
code: @[simp]
theorem map_update_smul [DecidableEq ι] [Fintype ι] (m : ∀ i, M₁ i) (i : ι) (c : R) (x : M₁ i) :
    f (update (c • m) i x) = c ^ (Fintype.card ι - 1) • f (update m i x) 
goal: f (Function.update (c • m) i x) = c ^ (Fintype.card ι - 1) • f (Function.update m i x)

full_name: MultilinearMap.mkPiAlgebra
code: /-- Given an `R`-algebra `A`, `mkPiAlgebra` is the multilinear map on `A^ι` associating
to `m` the product of all the `m i`.

See also `MultilinearMap.mkPiAlgebraFin` for a version that works with a non-commutative
algebra `A` but requires `ι = Fin n`. -/
protected def mkPiAlgebra : MultilinearMap R (fun _ : ι => A) A 
goal: MultilinearMap R (fun x => A) A

full_name: MultilinearMap.mkPiAlgebra_apply
code: @[simp]
theorem mkPiAlgebra_apply (m : ι → A) : MultilinearMap.mkPiAlgebra R ι A m = ∏ i, m i 
goal: (MultilinearMap.mkPiAlgebra R ι A) m = ∏ i : ι, m i

full_name: MultilinearMap.mkPiAlgebraFin
code: /-- Given an `R`-algebra `A`, `mkPiAlgebraFin` is the multilinear map on `A^n` associating
to `m` the product of all the `m i`.

See also `MultilinearMap.mkPiAlgebra` for a version that assumes `[CommSemiring A]` but works
for `A^ι` with any finite type `ι`. -/
protected def mkPiAlgebraFin : MultilinearMap R (fun _ : Fin n => A) A 
goal: MultilinearMap R (fun x => A) A

full_name: MultilinearMap.mkPiAlgebraFin_apply
code: @[simp]
theorem mkPiAlgebraFin_apply (m : Fin n → A) :
    MultilinearMap.mkPiAlgebraFin R n A m = (List.ofFn m).prod 
goal: (MultilinearMap.mkPiAlgebraFin R n A) m = (List.ofFn m).prod

full_name: MultilinearMap.mkPiAlgebraFin_apply_const
code: theorem mkPiAlgebraFin_apply_const (a : A) :
    (MultilinearMap.mkPiAlgebraFin R n A fun _ => a) = a ^ n 
goal: ((MultilinearMap.mkPiAlgebraFin R n A) fun x => a) = a ^ n

full_name: MultilinearMap.smulRight
code: /-- Given an `R`-multilinear map `f` taking values in `R`, `f.smulRight z` is the map
sending `m` to `f m • z`. -/
def smulRight (f : MultilinearMap R M₁ R) (z : M₂) : MultilinearMap R M₁ M₂ 
goal: MultilinearMap R M₁ M₂

full_name: MultilinearMap.smulRight_apply
code: @[simp]
theorem smulRight_apply (f : MultilinearMap R M₁ R) (z : M₂) (m : ∀ i, M₁ i) :
    f.smulRight z m = f m • z 
goal: (f.smulRight z) m = f m • z

full_name: MultilinearMap.mkPiRing
code: /-- The canonical multilinear map on `R^ι` when `ι` is finite, associating to `m` the product of
all the `m i` (multiplied by a fixed reference element `z` in the target module). See also
`mkPiAlgebra` for a more general version. -/
protected def mkPiRing [Fintype ι] (z : M₂) : MultilinearMap R (fun _ : ι => R) M₂ 
goal: MultilinearMap R (fun x => R) M₂

full_name: MultilinearMap.mkPiRing_apply
code: @[simp]
theorem mkPiRing_apply [Fintype ι] (z : M₂) (m : ι → R) :
    (MultilinearMap.mkPiRing R ι z : (ι → R) → M₂) m = (∏ i, m i) • z 
goal: (MultilinearMap.mkPiRing R ι z) m = (∏ i : ι, m i) • z

full_name: MultilinearMap.mkPiRing_apply_one_eq_self
code: theorem mkPiRing_apply_one_eq_self [Fintype ι] (f : MultilinearMap R (fun _ : ι => R) M₂) :
    MultilinearMap.mkPiRing R ι (f fun _ => 1) = f 
goal: MultilinearMap.mkPiRing R ι (f fun x => 1) = f

full_name: MultilinearMap.mkPiRing_eq_iff
code: theorem mkPiRing_eq_iff [Fintype ι] {z₁ z₂ : M₂} :
    MultilinearMap.mkPiRing R ι z₁ = MultilinearMap.mkPiRing R ι z₂ ↔ z₁ = z₂ 
goal: MultilinearMap.mkPiRing R ι z₁ = MultilinearMap.mkPiRing R ι z₂ ↔ z₁ = z₂

full_name: MultilinearMap.mkPiRing_zero
code: theorem mkPiRing_zero [Fintype ι] : MultilinearMap.mkPiRing R ι (0 : M₂) = 0 
goal: MultilinearMap.mkPiRing R ι 0 = 0

full_name: MultilinearMap.mkPiRing_eq_zero_iff
code: theorem mkPiRing_eq_zero_iff [Fintype ι] (z : M₂) : MultilinearMap.mkPiRing R ι z = 0 ↔ z = 0 
goal: MultilinearMap.mkPiRing R ι z = 0 ↔ z = 0

full_name: MultilinearMap.instNeg
code: instance : Neg (MultilinearMap R M₁ M₂) 
goal: Neg (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.neg_apply
code: @[simp]
theorem neg_apply (m : ∀ i, M₁ i) : (-f) m = -f m 
goal: (-f) m = -f m

full_name: MultilinearMap.instSub
code: instance : Sub (MultilinearMap R M₁ M₂) 
goal: Sub (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.sub_apply
code: @[simp]
theorem sub_apply (m : ∀ i, M₁ i) : (f - g) m = f m - g m 
goal: (f - g) m = f m - g m

full_name: MultilinearMap.instAddCommGroup
code: instance : AddCommGroup (MultilinearMap R M₁ M₂) 
goal: AddCommGroup (MultilinearMap R M₁ M₂)

full_name: MultilinearMap.map_neg
code: @[simp]
theorem map_neg [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x : M₁ i) :
    f (update m i (-x)) = -f (update m i x) 
goal: f (Function.update m i (-x)) = -f (Function.update m i x)

full_name: MultilinearMap.map_sub
code: @[simp]
theorem map_sub [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i) :
    f (update m i (x - y)) = f (update m i x) - f (update m i y) 
goal: f (Function.update m i (x - y)) = f (Function.update m i x) - f (Function.update m i y)

full_name: MultilinearMap.map_update
code: lemma map_update [DecidableEq ι] (x : (i : ι) → M₁ i) (i : ι) (v : M₁ i)  :
    f (update x i v) = f x - f (update x i (x i - v)) 
goal: f (Function.update x i v) = f x - f (Function.update x i (x i - v))

full_name: MultilinearMap.map_sub_map_piecewise
code: lemma map_sub_map_piecewise [LinearOrder ι] (a b : (i : ι) → M₁ i) (s : Finset ι) :
    f a - f (s.piecewise b a) =
    ∑ i ∈ s, f (fun j ↦ if j ∈ s → j < i then a j else if i = j then a j - b j else b j) 
goal: f a - f (s.piecewise b a) = ∑ i ∈ s, f fun j => if j ∈ s → j < i then a j else if i = j then a j - b j else b j

full_name: MultilinearMap.map_piecewise_sub_map_piecewise
code: /-- This calculates the differences between the values of a multilinear map at
two arguments that differ on a finset `s` of `ι`. It requires a
linear order on `ι` in order to express the result. -/
lemma map_piecewise_sub_map_piecewise [LinearOrder ι] (a b v : (i : ι) → M₁ i) (s : Finset ι) :
    f (s.piecewise a v) - f (s.piecewise b v) = ∑ i ∈ s, f
      fun j ↦ if j ∈ s then if j < i then a j else if j = i then a j - b j else b j else v j 
goal: f (s.piecewise a v) - f (s.piecewise b v) =
  ∑ i ∈ s, f fun j => if j ∈ s then if j < i then a j else if j = i then a j - b j else b j else v j

full_name: MultilinearMap.map_add_eq_map_add_linearDeriv_add
code: lemma map_add_eq_map_add_linearDeriv_add [DecidableEq ι] [Fintype ι] (x h : (i : ι) → M₁ i) :
    f (x + h) = f x + f.linearDeriv x h +
      ∑ s ∈ univ.powerset.filter (2 ≤ ·.card), f (s.piecewise h x) 
goal: f (x + h) =
  f x + (f.linearDeriv x) h + ∑ s ∈ Finset.filter (fun x => 2 ≤ x.card) Finset.univ.powerset, f (s.piecewise h x)

full_name: MultilinearMap.map_add_sub_map_add_sub_linearDeriv
code: /-- This expresses the difference between the values of a multilinear map
at two points "close to `x`" in terms of the "derivative" of the multilinear map at `x`
and of "second-order" terms. -/
lemma map_add_sub_map_add_sub_linearDeriv [DecidableEq ι] [Fintype ι] (x h h' : (i : ι) → M₁ i) :
    f (x + h) - f (x + h') - f.linearDeriv x (h - h') =
    ∑ s ∈ univ.powerset.filter (2 ≤ ·.card), (f (s.piecewise h x) - f (s.piecewise h' x)) 
goal: f (x + h) - f (x + h') - (f.linearDeriv x) (h - h') =
  ∑ s ∈ Finset.filter (fun x => 2 ≤ x.card) Finset.univ.powerset, (f (s.piecewise h x) - f (s.piecewise h' x))

full_name: MultilinearMap.piRingEquiv
code: /-- When `ι` is finite, multilinear maps on `R^ι` with values in `M₂` are in bijection with `M₂`,
as such a multilinear map is completely determined by its value on the constant vector made of ones.
We register this bijection as a linear equivalence in `MultilinearMap.piRingEquiv`. -/
protected def piRingEquiv [Fintype ι] : M₂ ≃ₗ[R] MultilinearMap R (fun _ : ι => R) M₂ 
goal: M₂ ≃ₗ[R] MultilinearMap R (fun x => R) M₂

full_name: LinearMap.uncurryLeft
code: /-- 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)`-/
def LinearMap.uncurryLeft (f : M 0 →ₗ[R] MultilinearMap R (fun i : Fin n => M i.succ) M₂) :
    MultilinearMap R M M₂ 
goal: MultilinearMap R M M₂

full_name: LinearMap.uncurryLeft_apply
code: @[simp]
theorem LinearMap.uncurryLeft_apply (f : M 0 →ₗ[R] MultilinearMap R (fun i : Fin n => M i.succ) M₂)
    (m : ∀ i, M i) : f.uncurryLeft m = f (m 0) (tail m) 
goal: f.uncurryLeft m = (f (m 0)) (Fin.tail m)

full_name: MultilinearMap.curryLeft
code: /-- 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))`. -/
def MultilinearMap.curryLeft (f : MultilinearMap R M M₂) :
    M 0 →ₗ[R] MultilinearMap R (fun i : Fin n => M i.succ) M₂ 
goal: M 0 →ₗ[R] MultilinearMap R (fun i => M i.succ) M₂

full_name: MultilinearMap.curryLeft_apply
code: @[simp]
theorem MultilinearMap.curryLeft_apply (f : MultilinearMap R M M₂) (x : M 0)
    (m : ∀ i : Fin n, M i.succ) : f.curryLeft x m = f (cons x m) 
goal: (f.curryLeft x) m = f (Fin.cons x m)

full_name: LinearMap.curry_uncurryLeft
code: @[simp]
theorem LinearMap.curry_uncurryLeft (f : M 0 →ₗ[R] MultilinearMap R (fun i :
    Fin n => M i.succ) M₂) : f.uncurryLeft.curryLeft = f 
goal: f.uncurryLeft.curryLeft = f

full_name: MultilinearMap.uncurry_curryLeft
code: @[simp]
theorem MultilinearMap.uncurry_curryLeft (f : MultilinearMap R M M₂) :
    f.curryLeft.uncurryLeft = f 
goal: f.curryLeft.uncurryLeft = f

full_name: multilinearCurryLeftEquiv
code: /-- 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.uncurryLeft` and `f.curryLeft`. Use these
unless you need the full framework of linear equivs. -/
def multilinearCurryLeftEquiv :
    (M 0 →ₗ[R] MultilinearMap R (fun i : Fin n => M i.succ) M₂) ≃ₗ[R] MultilinearMap R M M₂ 
goal: (M 0 →ₗ[R] MultilinearMap R (fun i => M i.succ) M₂) ≃ₗ[R] MultilinearMap R M M₂

full_name: MultilinearMap.uncurryRight
code: /-- 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))`-/
def MultilinearMap.uncurryRight
    (f : MultilinearMap R (fun i : Fin n => M (castSucc i)) (M (last n) →ₗ[R] M₂)) :
    MultilinearMap R M M₂ 
goal: MultilinearMap R M M₂

full_name: MultilinearMap.uncurryRight_apply
code: @[simp]
theorem MultilinearMap.uncurryRight_apply
    (f : MultilinearMap R (fun i : Fin n => M (castSucc i)) (M (last n) →ₗ[R] M₂))
    (m : ∀ i, M i) : f.uncurryRight m = f (init m) (m (last n)) 
goal: f.uncurryRight m = (f (Fin.init m)) (m (Fin.last n))

full_name: MultilinearMap.curryRight
code: /-- 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))`. -/
def MultilinearMap.curryRight (f : MultilinearMap R M M₂) :
    MultilinearMap R (fun i : Fin n => M (Fin.castSucc i)) (M (last n) →ₗ[R] M₂) 
goal: MultilinearMap R (fun i => M i.castSucc) (M (Fin.last n) →ₗ[R] M₂)

full_name: MultilinearMap.curryRight_apply
code: @[simp]
theorem MultilinearMap.curryRight_apply (f : MultilinearMap R M M₂)
    (m : ∀ i : Fin n, M (castSucc i)) (x : M (last n)) : f.curryRight m x = f (snoc m x) 
goal: (f.curryRight m) x = f (Fin.snoc m x)

full_name: MultilinearMap.curry_uncurryRight
code: @[simp]
theorem MultilinearMap.curry_uncurryRight
    (f : MultilinearMap R (fun i : Fin n => M (castSucc i)) (M (last n) →ₗ[R] M₂)) :
    f.uncurryRight.curryRight = f 
goal: f.uncurryRight.curryRight = f

full_name: MultilinearMap.uncurry_curryRight
code: @[simp]
theorem MultilinearMap.uncurry_curryRight (f : MultilinearMap R M M₂) :
    f.curryRight.uncurryRight = f 
goal: f.curryRight.uncurryRight = f

full_name: multilinearCurryRightEquiv
code: /-- 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.uncurryRight` and `f.curryRight`. Use these
unless you need the full framework of linear equivs. -/
def multilinearCurryRightEquiv :
    MultilinearMap R (fun i : Fin n => M (castSucc i)) (M (last n) →ₗ[R] M₂) ≃ₗ[R]
      MultilinearMap R M M₂ 
goal: MultilinearMap R (fun i => M i.castSucc) (M (Fin.last n) →ₗ[R] M₂) ≃ₗ[R] MultilinearMap R M M₂

full_name: MultilinearMap.currySum
code: /-- A multilinear map on `∀ i : ι ⊕ ι', M'` defines a multilinear map on `∀ i : ι, M'`
taking values in the space of multilinear maps on `∀ i : ι', M'`. -/
def currySum (f : MultilinearMap R (fun _ : ι ⊕ ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) 
goal: MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)

full_name: MultilinearMap.currySum_apply
code: @[simp]
theorem currySum_apply (f : MultilinearMap R (fun _ : ι ⊕ ι' => M') M₂) (u : ι → M')
    (v : ι' → M') : f.currySum u v = f (Sum.elim u v) 
goal: (f.currySum u) v = f (Sum.elim u v)

full_name: MultilinearMap.uncurrySum
code: /-- A multilinear map on `∀ i : ι, M'` taking values in the space of multilinear maps
on `∀ i : ι', M'` defines a multilinear map on `∀ i : ι ⊕ ι', M'`. -/
def uncurrySum (f : MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂)) :
    MultilinearMap R (fun _ : ι ⊕ ι' => M') M₂ 
goal: MultilinearMap R (fun x => M') M₂

full_name: MultilinearMap.uncurrySum_aux_apply
code: @[simp]
theorem uncurrySum_aux_apply
    (f : MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂))
    (u : ι ⊕ ι' → M') : f.uncurrySum u = f (u ∘ Sum.inl) (u ∘ Sum.inr) 
goal: f.uncurrySum u = (f (u ∘ Sum.inl)) (u ∘ Sum.inr)

full_name: MultilinearMap.currySumEquiv
code: /-- Linear equivalence between the space of multilinear maps on `∀ i : ι ⊕ ι', M'` and the space
of multilinear maps on `∀ i : ι, M'` taking values in the space of multilinear maps
on `∀ i : ι', M'`. -/
def currySumEquiv :
    MultilinearMap R (fun _ : ι ⊕ ι' => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) 
goal: MultilinearMap R (fun x => M') M₂ ≃ₗ[R] MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)

full_name: MultilinearMap.coe_currySumEquiv
code: @[simp]
theorem coe_currySumEquiv : ⇑(currySumEquiv R ι M₂ M' ι') = currySum 
goal: ⇑(MultilinearMap.currySumEquiv R ι M₂ M' ι') = MultilinearMap.currySum

full_name: MultilinearMap.coe_currySumEquiv_symm
code: @[simp]
theorem coe_currySumEquiv_symm : ⇑(currySumEquiv R ι M₂ M' ι').symm = uncurrySum 
goal: ⇑(MultilinearMap.currySumEquiv R ι M₂ M' ι').symm = MultilinearMap.uncurrySum

full_name: MultilinearMap.curryFinFinset
code: /-- 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'`. -/
def curryFinFinset {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k) (hl : sᶜ.card = l) :
    MultilinearMap R (fun _ : Fin n => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂) 
goal: MultilinearMap R (fun x => M') M₂ ≃ₗ[R] MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)

full_name: MultilinearMap.curryFinFinset_apply
code: @[simp]
theorem curryFinFinset_apply {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k) (hl : sᶜ.card = l)
    (f : MultilinearMap R (fun _ : Fin n => M') M₂) (mk : Fin k → M') (ml : Fin l → M') :
    curryFinFinset R M₂ M' hk hl f mk ml =
      f fun i => Sum.elim mk ml ((finSumEquivOfFinset hk hl).symm i) 
goal: (((MultilinearMap.curryFinFinset R M₂ M' hk hl) f) mk) ml =
  f fun i => Sum.elim mk ml ((finSumEquivOfFinset hk hl).symm i)

full_name: MultilinearMap.curryFinFinset_symm_apply
code: @[simp]
theorem curryFinFinset_symm_apply {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k)
    (hl : sᶜ.card = l)
    (f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
    (m : Fin n → M') :
    (curryFinFinset R 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) 
goal: ((MultilinearMap.curryFinFinset R 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))

full_name: MultilinearMap.curryFinFinset_symm_apply_piecewise_const
code: theorem curryFinFinset_symm_apply_piecewise_const {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k)
    (hl : sᶜ.card = l)
    (f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
    (x y : M') :
    (curryFinFinset R M₂ M' hk hl).symm f (s.piecewise (fun _ => x) fun _ => y) =
      f (fun _ => x) fun _ => y 
goal: ((MultilinearMap.curryFinFinset R M₂ M' hk hl).symm f) (s.piecewise (fun x_1 => x) fun x => y) =
  (f fun x_1 => x) fun x => y

full_name: MultilinearMap.curryFinFinset_symm_apply_piecewise_const_aux
code: @[simp]
theorem curryFinFinset_symm_apply_piecewise_const_aux {k l n : ℕ} {s : Finset (Fin n)}
    (hk : s.card = k) (hl : sᶜ.card = l)
    (f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
    (x y : M') :
      ((⇑f fun _ => x) (fun i => (Finset.piecewise s (fun _ => x) (fun _ => y)
          ((sᶜ.orderEmbOfFin hl) i))) = f (fun _ => x) fun _ => y) 
goal: ((f fun x_1 => x) fun i => s.piecewise (fun x_1 => x) (fun x => y) ((sᶜ.orderEmbOfFin hl) i)) =
  (f fun x_1 => x) fun x => y

full_name: MultilinearMap.curryFinFinset_symm_apply_const
code: @[simp]
theorem curryFinFinset_symm_apply_const {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k)
    (hl : sᶜ.card = l)
    (f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
    (x : M') : ((curryFinFinset R M₂ M' hk hl).symm f fun _ => x) = f (fun _ => x) fun _ => x 
goal: (((MultilinearMap.curryFinFinset R M₂ M' hk hl).symm f) fun x_1 => x) = (f fun x_1 => x) fun x_1 => x

full_name: MultilinearMap.curryFinFinset_apply_const
code: theorem curryFinFinset_apply_const {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k)
    (hl : sᶜ.card = l) (f : MultilinearMap R (fun _ : Fin n => M') M₂) (x y : M') :
    (curryFinFinset R M₂ M' hk hl f (fun _ => x) fun _ => y) =
      f (s.piecewise (fun _ => x) fun _ => y) 
goal: ((((MultilinearMap.curryFinFinset R M₂ M' hk hl) f) fun x_1 => x) fun x => y) =
  f (s.piecewise (fun x_1 => x) fun x => y)

full_name: MultilinearMap.curryFinFinset_apply_const_aux
code: @[simp]
theorem curryFinFinset_apply_const_aux {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k)
    (hl : sᶜ.card = l) (f : MultilinearMap R (fun _ : Fin n => M') M₂) (x y : M') :
    (f fun i => Sum.elim (fun _ => x) (fun _ => y) ((⇑ (Equiv.symm (finSumEquivOfFinset hk hl))) i))
      = f (s.piecewise (fun _ => x) fun _ => y) 
goal: (f fun i => Sum.elim (fun x_1 => x) (fun x => y) ((finSumEquivOfFinset hk hl).symm i)) =
  f (s.piecewise (fun x_1 => x) fun x => y)

full_name: MultilinearMap.map
code: /-- The pushforward of an indexed collection of submodule `p i ⊆ M₁ i` by `f : M₁ → M₂`.

Note that this is not a submodule - it is not closed under addition. -/
def map [Nonempty ι] (f : MultilinearMap R M₁ M₂) (p : ∀ i, Submodule R (M₁ i)) :
    SubMulAction R M₂ 
goal: SubMulAction R M₂

full_name: MultilinearMap.map_nonempty
code: /-- The map is always nonempty. This lemma is needed to apply `SubMulAction.zero_mem`. -/
theorem map_nonempty [Nonempty ι] (f : MultilinearMap R M₁ M₂) (p : ∀ i, Submodule R (M₁ i)) :
    (map f p : Set M₂).Nonempty 
goal: (↑(f.map p)).Nonempty

full_name: MultilinearMap.range
code: /-- The range of a multilinear map, closed under scalar multiplication. -/
def range [Nonempty ι] (f : MultilinearMap R M₁ M₂) : SubMulAction R M₂ 
goal: SubMulAction R M₂