l3lab/ntp-mathlib huggingface dataset:
/-- 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 inr
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.inr val✝) (x + y)) =
    (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inr val✝) x) +
      (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inr 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]
/-- 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 <;>
      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]
  map_smul' u 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') (MultilinearMap R (fun x => M') M₂)
inst✝ : DecidableEq (ι ⊕ ι')
u : ι ⊕ ι' → M'
i : ι ⊕ ι'
c : R
x : M'
⊢ (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (c • x)) =
    c • (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x)

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
    letI := (@Sum.inr_injective ι ι').decidableEq
    cases i <;>
      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]
  map_smul' u i c x := 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 : ι ⊕ ι'
c : R
x : M'
this : DecidableEq ι := Injective.decidableEq (_ : Injective Sum.inl)
⊢ (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i (c • x)) =
    c • (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x)

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
    cases i <;>
      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]
  map_smul' u i c x := 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 : ι ⊕ ι'
c : R
x : 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 (c • x)) =
    c • (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u i x)

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 <;>
      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]
  map_smul' u i c x := 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'
c : R
x : 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✝) (c • x)) =
    c • (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inl val✝) x)

Next tactic:
simp only [MultilinearMap.map_smul, smul_apply, Sum.update_inl_comp_inl,
        Sum.update_inl_comp_inr, Sum.update_inr_comp_inl, Sum.update_inr_comp_inr]
/-- 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 <;>
      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]
  map_smul' u i c x := by
    letI := (@Sum.inl_injective ι ι').decidableEq
    letI := (@Sum.inr_injective ι ι').decidableEq
    cases i <;>
      

Proof state:
case inr
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'
c : R
x : 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.inr val✝) (c • x)) =
    c • (fun u => (f (u ∘ Sum.inl)) (u ∘ Sum.inr)) (update u (Sum.inr val✝) x)

Next tactic:
simp only [MultilinearMap.map_smul, smul_apply, Sum.update_inl_comp_inl,
        Sum.update_inl_comp_inr, Sum.update_inr_comp_inl, Sum.update_inr_comp_inr]
/-- 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 _ : Sum ι ι' => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun := currySum
  invFun := uncurrySum
  left_inv f := ext fun u => by simp
  right_inv f := by
    ext
    simp
  map_add' f g := 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 g : MultilinearMap R (fun x => M') M₂
⊢ currySum (f + g) = currySum f + currySum g

Next tactic:
ext
/-- 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 _ : Sum ι ι' => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun := currySum
  invFun := uncurrySum
  left_inv f := ext fun u => by simp
  right_inv f := by
    ext
    simp
  map_add' f g := by
    ext
    

Proof state:
case H.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₂
ι' : Type u_1
f g : MultilinearMap R (fun x => M') M₂
x✝¹ : ι → M'
x✝ : ι' → M'
⊢ ((currySum (f + g)) x✝¹) x✝ = ((currySum f + currySum g) x✝¹) x✝

Next tactic:
rfl
/-- 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 _ : Sum ι ι' => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun := currySum
  invFun := uncurrySum
  left_inv f := ext fun u => by simp
  right_inv f := by
    ext
    simp
  map_add' f g := by
    ext
    rfl
  map_smul' c f := 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
c : R
f : MultilinearMap R (fun x => M') M₂
⊢ AddHom.toFun
      { toFun := currySum,
        map_add' := (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }
      (c • f) =
    (RingHom.id R) c •
      AddHom.toFun
        { toFun := currySum,
          map_add' := (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }
        f

Next tactic:
ext
/-- 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 _ : Sum ι ι' => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun := currySum
  invFun := uncurrySum
  left_inv f := ext fun u => by simp
  right_inv f := by
    ext
    simp
  map_add' f g := by
    ext
    rfl
  map_smul' c f := by
    ext
    

Proof state:
case H.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₂
ι' : Type u_1
c : R
f : MultilinearMap R (fun x => M') M₂
x✝¹ : ι → M'
x✝ : ι' → M'
⊢ ((AddHom.toFun
          { toFun := currySum,
            map_add' := (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }
          (c • f))
        x✝¹)
      x✝ =
    (((RingHom.id R) c •
          AddHom.toFun
            { toFun := currySum,
              map_add' :=
                (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }
            f)
        x✝¹)
      x✝

Next tactic:
rfl
/-- 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 _ : Sum ι ι' => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun := currySum
  invFun := uncurrySum
  left_inv f := ext fun u => 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'
⊢ (uncurrySum
        (AddHom.toFun
          {
              toAddHom :=
                { toFun := currySum,
                  map_add' :=
                    (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) },
              map_smul' :=
                (_ :
                  ∀ (c : R) (f : MultilinearMap R (fun x => M') M₂),
                    AddHom.toFun
                        { toFun := currySum,
                          map_add' :=
                            (_ :
                              ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }
                        (c • f) =
                      (RingHom.id R) c •
                        AddHom.toFun
                          { toFun := currySum,
                            map_add' :=
                              (_ :
                                ∀ (f g : MultilinearMap R (fun x => M') M₂),
                                  currySum (f + g) = currySum f + currySum g) }
                          f) }.toAddHom
          f))
      u =
    f u

Next tactic:
simp
/-- 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 _ : Sum ι ι' => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun := currySum
  invFun := uncurrySum
  left_inv f := ext fun u => by simp
  right_inv f := 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₂)
⊢ AddHom.toFun
      {
          toAddHom :=
            { toFun := currySum,
              map_add' :=
                (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) },
          map_smul' :=
            (_ :
              ∀ (c : R) (f : MultilinearMap R (fun x => M') M₂),
                AddHom.toFun
                    { toFun := currySum,
                      map_add' :=
                        (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }
                    (c • f) =
                  (RingHom.id R) c •
                    AddHom.toFun
                      { toFun := currySum,
                        map_add' :=
                          (_ :
                            ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }
                      f) }.toAddHom
      (uncurrySum f) =
    f

Next tactic:
ext
/-- 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 _ : Sum ι ι' => M') M₂ ≃ₗ[R]
      MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂) where
  toFun := currySum
  invFun := uncurrySum
  left_inv f := ext fun u => by simp
  right_inv f := by
    ext
    

Proof state:
case H.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₂
ι' : Type u_1
f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)
x✝¹ : ι → M'
x✝ : ι' → M'
⊢ ((AddHom.toFun
          {
              toAddHom :=
                { toFun := currySum,
                  map_add' :=
                    (_ : ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) },
              map_smul' :=
                (_ :
                  ∀ (c : R) (f : MultilinearMap R (fun x => M') M₂),
                    AddHom.toFun
                        { toFun := currySum,
                          map_add' :=
                            (_ :
                              ∀ (f g : MultilinearMap R (fun x => M') M₂), currySum (f + g) = currySum f + currySum g) }
                        (c • f) =
                      (RingHom.id R) c •
                        AddHom.toFun
                          { toFun := currySum,
                            map_add' :=
                              (_ :
                                ∀ (f g : MultilinearMap R (fun x => M') M₂),
                                  currySum (f + g) = currySum f + currySum g) }
                          f) }.toAddHom
          (uncurrySum f))
        x✝¹)
      x✝ =
    (f x✝¹) x✝

Next tactic:
simp
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 := 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
k l n : ℕ
s : Finset (Fin n)
hk : Finset.card s = k
hl : Finset.card sᶜ = l
f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)
x y : M'
⊢ ((LinearEquiv.symm (curryFinFinset R M₂ M' hk hl)) f) (Finset.piecewise s (fun x_1 => x) fun x => y) =
    (f fun x_1 => x) fun x => y

Next tactic:
rw [curryFinFinset_symm_apply]
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 := by
  rw [curryFinFinset_symm_apply]; 

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
k l n : ℕ
s : Finset (Fin n)
hk : Finset.card s = k
hl : Finset.card sᶜ = l
f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)
x y : M'
⊢ ((f fun i => Finset.piecewise s (fun x_1 => x) (fun x => y) ((finSumEquivOfFinset hk hl) (Sum.inl i))) fun i =>
      Finset.piecewise s (fun x_1 => x) (fun x => y) ((finSumEquivOfFinset hk hl) (Sum.inr i))) =
    (f fun x_1 => x) fun x => y

Next tactic:
congr
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 := by
  rw [curryFinFinset_symm_apply]; congr
  · 

Proof state:
case h.e_5.h.h.e_6.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₂
ι' : Type u_1
k l n : ℕ
s : Finset (Fin n)
hk : Finset.card s = k
hl : Finset.card sᶜ = l
f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂)
x y : M'
⊢ (fun i => Finset.piecewise s (fun x_1 => x) (fun x => y) ((finSumEquivOfFinset hk hl) (Sum.inl i))) = fun x_1 => x

Next tactic:
ext