l3lab/ntp-mathlib huggingface dataset:
/-- 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₂ where
  toFun := MultilinearMap.uncurryRight
  map_add' f₁ f₂ := by
    ext m
    rfl
  map_smul' c f := by
    ext m
    rw [smul_apply]
    

Proof state:
case H
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁶ : CommSemiring R
inst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁴ : AddCommMonoid M'
inst✝³ : AddCommMonoid M₂
inst✝² : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝¹ : Module R M'
inst✝ : Module R M₂
c : R
f : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)
m : (i : Fin (Nat.succ n)) → M i
⊢ (AddHom.toFun
        { toFun := uncurryRight,
          map_add' :=
            (_ :
              ∀ (f₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)),
                uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂) }
        (c • f))
      m =
    (RingHom.id R) c •
      (AddHom.toFun
          { toFun := uncurryRight,
            map_add' :=
              (_ :
                ∀ (f₁ f₂ : MultilinearMap R (fun i => M (castSucc i)) (M (last n) →ₗ[R] M₂)),
                  uncurryRight (f₁ + f₂) = uncurryRight f₁ + uncurryRight f₂) }
          f)
        m

Next tactic:
rfl
/-- 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 _ : Sum ι ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun u :=
    { toFun := fun v => f (Sum.elim u v)
      map_add' := fun v i x y => by
        

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') M₂
u : ι → M'
inst✝ : DecidableEq ι'
v : ι' → M'
i : ι'
x y : M'
⊢ (fun v => f (Sum.elim u v)) (update v i (x + y)) =
    (fun v => f (Sum.elim u v)) (update v i x) + (fun v => f (Sum.elim u v)) (update v i y)

Next tactic:
letI := Classical.decEq ι
/-- 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 _ : Sum ι ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun u :=
    { toFun := fun v => f (Sum.elim u v)
      map_add' := fun v i x y => by
        letI := Classical.decEq ι
        

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') M₂
u : ι → M'
inst✝ : DecidableEq ι'
v : ι' → M'
i : ι'
x y : M'
this : DecidableEq ι := Classical.decEq ι
⊢ (fun v => f (Sum.elim u v)) (update v i (x + y)) =
    (fun v => f (Sum.elim u v)) (update v i x) + (fun v => f (Sum.elim u v)) (update v i y)

Next tactic:
simp only [← Sum.update_elim_inr, f.map_add]
/-- 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 _ : Sum ι ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun u :=
    { toFun := fun v => f (Sum.elim u v)
      map_add' := fun v i x y => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_add]
      map_smul' := fun v i c x => by
        

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') M₂
u : ι → M'
inst✝ : DecidableEq ι'
v : ι' → M'
i : ι'
c : R
x : M'
⊢ (fun v => f (Sum.elim u v)) (update v i (c • x)) = c • (fun v => f (Sum.elim u v)) (update v i x)

Next tactic:
letI := Classical.decEq ι
/-- 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 _ : Sum ι ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun u :=
    { toFun := fun v => f (Sum.elim u v)
      map_add' := fun v i x y => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_add]
      map_smul' := fun v i c x => by
        letI := Classical.decEq ι
        

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') M₂
u : ι → M'
inst✝ : DecidableEq ι'
v : ι' → M'
i : ι'
c : R
x : M'
this : DecidableEq ι := Classical.decEq ι
⊢ (fun v => f (Sum.elim u v)) (update v i (c • x)) = c • (fun v => f (Sum.elim u v)) (update v i x)

Next tactic:
simp only [← Sum.update_elim_inr, f.map_smul]
/-- 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 _ : Sum ι ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun u :=
    { toFun := fun v => f (Sum.elim u v)
      map_add' := fun v i x y => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_add]
      map_smul' := fun v i c x => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_smul] }
  map_add' u i x y :=
    ext fun v => by
      

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') M₂
inst✝ : DecidableEq ι
u : ι → M'
i : ι
x y : M'
v : ι' → M'
⊢ ((fun u =>
          { toFun := fun v => f (Sum.elim u v),
            map_add' :=
              (_ :
                ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                  f (Sum.elim u (update v i (x + y))) = f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
            map_smul' :=
              (_ :
                ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                  f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
        (update u i (x + y)))
      v =
    ((fun u =>
            { toFun := fun v => f (Sum.elim u v),
              map_add' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                    f (Sum.elim u (update v i (x + y))) =
                      f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
              map_smul' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                    f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
          (update u i x) +
        (fun u =>
            { toFun := fun v => f (Sum.elim u v),
              map_add' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                    f (Sum.elim u (update v i (x + y))) =
                      f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
              map_smul' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                    f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
          (update u i y))
      v

Next tactic:
letI := Classical.decEq ι'
/-- 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 _ : Sum ι ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun u :=
    { toFun := fun v => f (Sum.elim u v)
      map_add' := fun v i x y => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_add]
      map_smul' := fun v i c x => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_smul] }
  map_add' u i x y :=
    ext fun v => by
      letI := Classical.decEq ι'
      

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') M₂
inst✝ : DecidableEq ι
u : ι → M'
i : ι
x y : M'
v : ι' → M'
this : DecidableEq ι' := Classical.decEq ι'
⊢ ((fun u =>
          { toFun := fun v => f (Sum.elim u v),
            map_add' :=
              (_ :
                ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                  f (Sum.elim u (update v i (x + y))) = f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
            map_smul' :=
              (_ :
                ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                  f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
        (update u i (x + y)))
      v =
    ((fun u =>
            { toFun := fun v => f (Sum.elim u v),
              map_add' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                    f (Sum.elim u (update v i (x + y))) =
                      f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
              map_smul' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                    f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
          (update u i x) +
        (fun u =>
            { toFun := fun v => f (Sum.elim u v),
              map_add' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                    f (Sum.elim u (update v i (x + y))) =
                      f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
              map_smul' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                    f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
          (update u i y))
      v

Next tactic:
simp only [MultilinearMap.coe_mk, add_apply, ← Sum.update_elim_inl, f.map_add]
/-- 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 _ : Sum ι ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun u :=
    { toFun := fun v => f (Sum.elim u v)
      map_add' := fun v i x y => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_add]
      map_smul' := fun v i c x => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_smul] }
  map_add' u i x y :=
    ext fun v => by
      letI := Classical.decEq ι'
      simp only [MultilinearMap.coe_mk, add_apply, ← Sum.update_elim_inl, f.map_add]
  map_smul' u i c x :=
    ext fun v => by
      

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') M₂
inst✝ : DecidableEq ι
u : ι → M'
i : ι
c : R
x : M'
v : ι' → M'
⊢ ((fun u =>
          { toFun := fun v => f (Sum.elim u v),
            map_add' :=
              (_ :
                ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                  f (Sum.elim u (update v i (x + y))) = f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
            map_smul' :=
              (_ :
                ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                  f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
        (update u i (c • x)))
      v =
    (c •
        (fun u =>
            { toFun := fun v => f (Sum.elim u v),
              map_add' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                    f (Sum.elim u (update v i (x + y))) =
                      f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
              map_smul' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                    f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
          (update u i x))
      v

Next tactic:
letI := Classical.decEq ι'
/-- 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 _ : Sum ι ι' => M') M₂) :
    MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun u :=
    { toFun := fun v => f (Sum.elim u v)
      map_add' := fun v i x y => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_add]
      map_smul' := fun v i c x => by
        letI := Classical.decEq ι
        simp only [← Sum.update_elim_inr, f.map_smul] }
  map_add' u i x y :=
    ext fun v => by
      letI := Classical.decEq ι'
      simp only [MultilinearMap.coe_mk, add_apply, ← Sum.update_elim_inl, f.map_add]
  map_smul' u i c x :=
    ext fun v => by
      letI := Classical.decEq ι'
      

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') M₂
inst✝ : DecidableEq ι
u : ι → M'
i : ι
c : R
x : M'
v : ι' → M'
this : DecidableEq ι' := Classical.decEq ι'
⊢ ((fun u =>
          { toFun := fun v => f (Sum.elim u v),
            map_add' :=
              (_ :
                ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                  f (Sum.elim u (update v i (x + y))) = f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
            map_smul' :=
              (_ :
                ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                  f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
        (update u i (c • x)))
      v =
    (c •
        (fun u =>
            { toFun := fun v => f (Sum.elim u v),
              map_add' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (x y : M'),
                    f (Sum.elim u (update v i (x + y))) =
                      f (Sum.elim u (update v i x)) + f (Sum.elim u (update v i y))),
              map_smul' :=
                (_ :
                  ∀ [inst : DecidableEq ι'] (v : ι' → M') (i : ι') (c : R) (x : M'),
                    f (Sum.elim u (update v i (c • x))) = c • f (Sum.elim u (update v i x))) })
          (update u i x))
      v

Next tactic:
simp only [MultilinearMap.coe_mk, smul_apply, ← Sum.update_elim_inl, f.map_smul]
/-- 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 _ : Sum ι ι' => M') M₂ where
  toFun u := f (u ∘ Sum.inl) (u ∘ Sum.inr)
  map_add' u i x y := by
    

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)
inst✝ : DecidableEq (ι ⊕ ι')
u : ι ⊕ ι' → M'
i : ι ⊕ ι'
x y : M'
⊢ (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (x + y)) =
    (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x) +
      (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i y)

Next tactic:
letI := (@Sum.inl_injective ι ι').decidableEq
/-- 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 _ : Sum ι ι' => M') M₂ where
  toFun u := f (u ∘ Sum.inl) (u ∘ Sum.inr)
  map_add' u i x y := by
    letI := (@Sum.inl_injective ι ι').decidableEq
    

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)
inst✝ : DecidableEq (ι ⊕ ι')
u : ι ⊕ ι' → M'
i : ι ⊕ ι'
x y : M'
this : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)
⊢ (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (x + y)) =
    (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x) +
      (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i y)

Next tactic:
letI := (@Sum.inr_injective ι ι').decidableEq
/-- 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 _ : Sum ι ι' => M') M₂ where
  toFun u := f (u ∘ Sum.inl) (u ∘ Sum.inr)
  map_add' u i x y := by
    letI := (@Sum.inl_injective ι ι').decidableEq
    letI := (@Sum.inr_injective ι ι').decidableEq
    

Proof state:
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)
inst✝ : DecidableEq (ι ⊕ ι')
u : ι ⊕ ι' → M'
i : ι ⊕ ι'
x y : M'
this✝ : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)
this : DecidableEq ι' := Injective.decidableEq (_ : Injective Sum.inr)
⊢ (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (x + y)) =
    (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x) +
      (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i y)

Next tactic:
cases i
/-- 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 _ : Sum ι ι' => M') M₂ where
  toFun u := f (u ∘ Sum.inl) (u ∘ Sum.inr)
  map_add' u i x y := by
    letI := (@Sum.inl_injective ι ι').decidableEq
    letI := (@Sum.inr_injective ι ι').decidableEq
    cases i <;>
      

Proof state:
case inl
R : Type uR
S : Type uS
ι : Type uι
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁵ : AddCommMonoid M'
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : Module R M'
inst✝¹ : Module R M₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)
inst✝ : DecidableEq (ι ⊕ ι')
u : ι ⊕ ι' → M'
x y : M'
this✝ : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)
this : DecidableEq ι' := Injective.decidableEq (_ : Injective Sum.inr)
val✝ : ι
⊢ (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) (x + y)) =
    (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) x) +
      (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) y)

Next tactic:
simp only [MultilinearMap.map_add, add_apply, Sum.update_inl_comp_inl,
        Sum.update_inl_comp_inr, Sum.update_inr_comp_inl, Sum.update_inr_comp_inr]