l3lab/ntp-mathlib huggingface dataset:
/-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃ where
  toFun f :=
    { toFun := fun x ↦ f (x i)
      map_add' := by intros; simp [update_eq_const_of_subsingleton]
      map_smul' := by intros; simp [update_eq_const_of_subsingleton] }
  invFun f :=
    { toFun := fun x ↦ f fun _ ↦ x
      map_add' := fun 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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
inst✝ : Subsingleton ι
i : ι
f : MultilinearMap R (fun x => M₂) M₃
x y : M₂
⊢ (fun x => f fun x_1 => x) (x + y) = (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y

Next tactic:
simpa [update_eq_const_of_subsingleton] using f.map_add 0 i x y
/-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃ where
  toFun f :=
    { toFun := fun x ↦ f (x i)
      map_add' := by intros; simp [update_eq_const_of_subsingleton]
      map_smul' := by intros; simp [update_eq_const_of_subsingleton] }
  invFun f :=
    { toFun := fun x ↦ f fun _ ↦ x
      map_add' := fun x y ↦ by simpa [update_eq_const_of_subsingleton] using f.map_add 0 i x y
      map_smul' := fun 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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
inst✝ : Subsingleton ι
i : ι
f : MultilinearMap R (fun x => M₂) M₃
c : R
x : M₂
⊢ AddHom.toFun
      { toFun := fun x => f fun x_1 => x,
        map_add' :=
          (_ :
            ∀ (x y : M₂),
              (fun x => f fun x_1 => x) (x + y) = (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y) }
      (c • x) =
    (RingHom.id R) c •
      AddHom.toFun
        { toFun := fun x => f fun x_1 => x,
          map_add' :=
            (_ :
              ∀ (x y : M₂),
                (fun x => f fun x_1 => x) (x + y) = (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y) }
        x

Next tactic:
simpa [update_eq_const_of_subsingleton] using f.map_smul 0 i c x
/-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃ where
  toFun f :=
    { toFun := fun x ↦ f (x i)
      map_add' := by intros; simp [update_eq_const_of_subsingleton]
      map_smul' := by intros; simp [update_eq_const_of_subsingleton] }
  invFun f :=
    { toFun := fun x ↦ f fun _ ↦ x
      map_add' := fun x y ↦ by simpa [update_eq_const_of_subsingleton] using f.map_add 0 i x y
      map_smul' := fun c x ↦ by simpa [update_eq_const_of_subsingleton] using f.map_smul 0 i c x }
  left_inv f := rfl
  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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
inst✝ : Subsingleton ι
i : ι
f : MultilinearMap R (fun x => M₂) M₃
⊢ (fun f =>
        { toFun := fun x => f (x i),
          map_add' :=
            (_ :
              ∀ [inst : DecidableEq ι] (m : ι → M₂) (i_1 : ι) (x y : M₂),
                f (update m i_1 (x + y) i) = f (update m i_1 x i) + f (update m i_1 y i)),
          map_smul' :=
            (_ :
              ∀ [inst : DecidableEq ι] (m : ι → M₂) (i_1 : ι) (c : R) (x : M₂),
                f (update m i_1 (c • x) i) = c • f (update m i_1 x i)) })
      ((fun f =>
          {
            toAddHom :=
              { toFun := fun x => f fun x_1 => x,
                map_add' :=
                  (_ :
                    ∀ (x y : M₂),
                      (fun x => f fun x_1 => x) (x + y) = (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y) },
            map_smul' :=
              (_ :
                ∀ (c : R) (x : M₂),
                  AddHom.toFun
                      { toFun := fun x => f fun x_1 => x,
                        map_add' :=
                          (_ :
                            ∀ (x y : M₂),
                              (fun x => f fun x_1 => x) (x + y) =
                                (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y) }
                      (c • x) =
                    (RingHom.id R) c •
                      AddHom.toFun
                        { toFun := fun x => f fun x_1 => x,
                          map_add' :=
                            (_ :
                              ∀ (x y : M₂),
                                (fun x => f fun x_1 => x) (x + y) =
                                  (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y) }
                        x) })
        f) =
    f

Next tactic:
ext x
/-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃ where
  toFun f :=
    { toFun := fun x ↦ f (x i)
      map_add' := by intros; simp [update_eq_const_of_subsingleton]
      map_smul' := by intros; simp [update_eq_const_of_subsingleton] }
  invFun f :=
    { toFun := fun x ↦ f fun _ ↦ x
      map_add' := fun x y ↦ by simpa [update_eq_const_of_subsingleton] using f.map_add 0 i x y
      map_smul' := fun c x ↦ by simpa [update_eq_const_of_subsingleton] using f.map_smul 0 i c x }
  left_inv f := rfl
  right_inv f := by ext x; 

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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
inst✝ : Subsingleton ι
i : ι
f : MultilinearMap R (fun x => M₂) M₃
x : ι → M₂
⊢ ((fun f =>
          { toFun := fun x => f (x i),
            map_add' :=
              (_ :
                ∀ [inst : DecidableEq ι] (m : ι → M₂) (i_1 : ι) (x y : M₂),
                  f (update m i_1 (x + y) i) = f (update m i_1 x i) + f (update m i_1 y i)),
            map_smul' :=
              (_ :
                ∀ [inst : DecidableEq ι] (m : ι → M₂) (i_1 : ι) (c : R) (x : M₂),
                  f (update m i_1 (c • x) i) = c • f (update m i_1 x i)) })
        ((fun f =>
            {
              toAddHom :=
                { toFun := fun x => f fun x_1 => x,
                  map_add' :=
                    (_ :
                      ∀ (x y : M₂),
                        (fun x => f fun x_1 => x) (x + y) =
                          (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y) },
              map_smul' :=
                (_ :
                  ∀ (c : R) (x : M₂),
                    AddHom.toFun
                        { toFun := fun x => f fun x_1 => x,
                          map_add' :=
                            (_ :
                              ∀ (x y : M₂),
                                (fun x => f fun x_1 => x) (x + y) =
                                  (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y) }
                        (c • x) =
                      (RingHom.id R) c •
                        AddHom.toFun
                          { toFun := fun x => f fun x_1 => x,
                            map_add' :=
                              (_ :
                                ∀ (x y : M₂),
                                  (fun x => f fun x_1 => x) (x + y) =
                                    (fun x => f fun x_1 => x) x + (fun x => f fun x_1 => x) y) }
                          x) })
          f))
      x =
    f x

Next tactic:
refine congr_arg f ?_
/-- Equivalence between linear maps `M₂ →ₗ[R] M₃` and one-multilinear maps. -/
@[simps]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ MultilinearMap R (fun _ : ι ↦ M₂) M₃ where
  toFun f :=
    { toFun := fun x ↦ f (x i)
      map_add' := by intros; simp [update_eq_const_of_subsingleton]
      map_smul' := by intros; simp [update_eq_const_of_subsingleton] }
  invFun f :=
    { toFun := fun x ↦ f fun _ ↦ x
      map_add' := fun x y ↦ by simpa [update_eq_const_of_subsingleton] using f.map_add 0 i x y
      map_smul' := fun c x ↦ by simpa [update_eq_const_of_subsingleton] using f.map_smul 0 i c x }
  left_inv f := rfl
  right_inv f := by ext x; refine congr_arg f ?_; 

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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
inst✝ : Subsingleton ι
i : ι
f : MultilinearMap R (fun x => M₂) M₃
x : ι → M₂
⊢ (fun x_1 => x i) = x

Next tactic:
exact (eq_const_of_subsingleton _ _).symm
/-- 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₂ where
  toFun v := f fun j => if h : j ∈ s then v ((FunLike.coe (s.orderIsoOfFin hk).symm) ⟨j, h⟩) else z
  /- Porting note: The proofs of the following two lemmas used to only use `erw` followed by `simp`,
  but it seems `erw` no longer unfolds or unifies well enough to work without more help. -/
  map_add' 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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
k n : ℕ
f : MultilinearMap R (fun x => M') M₂
s : Finset (Fin n)
hk : Finset.card s = k
z : M'
inst✝ : DecidableEq (Fin k)
v : Fin k → M'
i : Fin k
x y : M'
⊢ (fun v =>
        f fun j => if h : j ∈ s then v ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)
      (update v i (x + y)) =
    (fun v =>
          f fun j =>
            if h : j ∈ s then v ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)
        (update v i x) +
      (fun v =>
          f fun j =>
            if h : j ∈ s then v ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)
        (update v i y)

Next tactic:
have : FunLike.coe (s.orderIsoOfFin hk).symm = (s.orderIsoOfFin hk).toEquiv.symm := rfl
/-- 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₂ where
  toFun v := f fun j => if h : j ∈ s then v ((FunLike.coe (s.orderIsoOfFin hk).symm) ⟨j, h⟩) else z
  /- Porting note: The proofs of the following two lemmas used to only use `erw` followed by `simp`,
  but it seems `erw` no longer unfolds or unifies well enough to work without more help. -/
  map_add' v i x y := by
    have : FunLike.coe (s.orderIsoOfFin hk).symm = (s.orderIsoOfFin hk).toEquiv.symm := rfl
    

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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
k n : ℕ
f : MultilinearMap R (fun x => M') M₂
s : Finset (Fin n)
hk : Finset.card s = k
z : M'
inst✝ : DecidableEq (Fin k)
v : Fin k → M'
i : Fin k
x y : M'
this : ⇑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ⇑(Finset.orderIsoOfFin s hk).symm
⊢ (fun v =>
        f fun j => if h : j ∈ s then v ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)
      (update v i (x + y)) =
    (fun v =>
          f fun j =>
            if h : j ∈ s then v ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)
        (update v i x) +
      (fun v =>
          f fun j =>
            if h : j ∈ s then v ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)
        (update v i y)

Next tactic:
simp only [this]
/-- 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₂ where
  toFun v := f fun j => if h : j ∈ s then v ((FunLike.coe (s.orderIsoOfFin hk).symm) ⟨j, h⟩) else z
  /- Porting note: The proofs of the following two lemmas used to only use `erw` followed by `simp`,
  but it seems `erw` no longer unfolds or unifies well enough to work without more help. -/
  map_add' v i x y := by
    have : FunLike.coe (s.orderIsoOfFin hk).symm = (s.orderIsoOfFin hk).toEquiv.symm := rfl
    simp only [this]
    

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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
k n : ℕ
f : MultilinearMap R (fun x => M') M₂
s : Finset (Fin n)
hk : Finset.card s = k
z : M'
inst✝ : DecidableEq (Fin k)
v : Fin k → M'
i : Fin k
x y : M'
this : ⇑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ⇑(Finset.orderIsoOfFin s hk).symm
⊢ (f fun j =>
      if h : j ∈ s then update v i (x + y) ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h })
      else z) =
    (f fun j =>
        if h : j ∈ s then update v i x ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h })
        else z) +
      f fun j =>
        if h : j ∈ s then update v i y ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z

Next tactic:
erw [dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv,
      dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv,
      dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv]
/-- 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₂ where
  toFun v := f fun j => if h : j ∈ s then v ((FunLike.coe (s.orderIsoOfFin hk).symm) ⟨j, h⟩) else z
  /- Porting note: The proofs of the following two lemmas used to only use `erw` followed by `simp`,
  but it seems `erw` no longer unfolds or unifies well enough to work without more help. -/
  map_add' v i x y := by
    have : FunLike.coe (s.orderIsoOfFin hk).symm = (s.orderIsoOfFin hk).toEquiv.symm := rfl
    simp only [this]
    erw [dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv,
      dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv,
      dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv]
    

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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
k n : ℕ
f : MultilinearMap R (fun x => M') M₂
s : Finset (Fin n)
hk : Finset.card s = k
z : M'
inst✝ : DecidableEq (Fin k)
v : Fin k → M'
i : Fin k
x y : M'
this : ⇑(OrderIso.symm (Finset.orderIsoOfFin s hk)) = ⇑(Finset.orderIsoOfFin s hk).symm
⊢ f
      (update (fun i => if h : i ∈ s then v ((Finset.orderIsoOfFin s hk).symm { val := i, property := h }) else z)
        (↑((Finset.orderIsoOfFin s hk).toEquiv i)) (x + y)) =
    f
        (update (fun i => if h : i ∈ s then v ((Finset.orderIsoOfFin s hk).symm { val := i, property := h }) else z)
          (↑((Finset.orderIsoOfFin s hk).toEquiv i)) x) +
      f
        (update (fun i => if h : i ∈ s then v ((Finset.orderIsoOfFin s hk).symm { val := i, property := h }) else z)
          (↑((Finset.orderIsoOfFin s hk).toEquiv i)) y)

Next tactic:
simp
/-- 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₂ where
  toFun v := f fun j => if h : j ∈ s then v ((FunLike.coe (s.orderIsoOfFin hk).symm) ⟨j, h⟩) else z
  /- Porting note: The proofs of the following two lemmas used to only use `erw` followed by `simp`,
  but it seems `erw` no longer unfolds or unifies well enough to work without more help. -/
  map_add' v i x y := by
    have : FunLike.coe (s.orderIsoOfFin hk).symm = (s.orderIsoOfFin hk).toEquiv.symm := rfl
    simp only [this]
    erw [dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv,
      dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv,
      dite_comp_equiv_update (s.orderIsoOfFin hk).toEquiv]
    simp
  map_smul' 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✝¹¹ : Semiring R
inst✝¹⁰ : (i : Fin (Nat.succ n✝)) → AddCommMonoid (M i)
inst✝⁹ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : (i : Fin (Nat.succ n✝)) → Module R (M i)
inst✝⁴ : (i : ι) → Module R (M₁ i)
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
f✝ f' : MultilinearMap R M₁ M₂
k n : ℕ
f : MultilinearMap R (fun x => M') M₂
s : Finset (Fin n)
hk : Finset.card s = k
z : M'
inst✝ : DecidableEq (Fin k)
v : Fin k → M'
i : Fin k
c : R
x : M'
⊢ (fun v =>
        f fun j => if h : j ∈ s then v ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)
      (update v i (c • x)) =
    c •
      (fun v =>
          f fun j =>
            if h : j ∈ s then v ((OrderIso.symm (Finset.orderIsoOfFin s hk)) { val := j, property := h }) else z)
        (update v i x)

Next tactic:
have : FunLike.coe (s.orderIsoOfFin hk).symm = (s.orderIsoOfFin hk).toEquiv.symm := rfl