l3lab/ntp-mathlib huggingface dataset:
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · intro x y
      simp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply,
        smul_eq_mul, mul_one]
      congr
      aesop
    · simp only
      intro x y hx hy
      rw [map_add, add_smul, hx, hy]
  right_inv t := by simp
  map_add' := LinearMap.map_add _
  map_smul' := fun r x => by
    

Proof state:
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
r : R
x : ⨂[R] (x : ι), M
⊢ AddHom.toFun
      { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
        map_add' :=
          (_ :
            ∀ (x y : ⨂[R] (x : ι), M),
              (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                (lift (constOfIsEmpty R (fun i => M) 1)) x + (lift (constOfIsEmpty R (fun i => M) 1)) y) }
      (r • x) =
    (RingHom.id R) r •
      AddHom.toFun
        { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
          map_add' :=
            (_ :
              ∀ (x y : ⨂[R] (x : ι), M),
                (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                  (lift (constOfIsEmpty R (fun i => M) 1)) x + (lift (constOfIsEmpty R (fun i => M) 1)) y) }
        x

Next tactic:
simp only
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · intro x y
      simp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply,
        smul_eq_mul, mul_one]
      congr
      aesop
    · simp only
      intro x y hx hy
      rw [map_add, add_smul, hx, hy]
  right_inv t := by simp
  map_add' := LinearMap.map_add _
  map_smul' := fun r x => by
    simp only
    

Proof state:
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
r : R
x : ⨂[R] (x : ι), M
⊢ (lift (constOfIsEmpty R (fun i => M) 1)) (r • x) = (RingHom.id R) r • (lift (constOfIsEmpty R (fun i => M) 1)) x

Next tactic:
exact LinearMap.map_smul _ r x
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    

Proof state:
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
x : ⨂[R] (x : ι), M
⊢ (fun r => r • (tprod R) isEmptyElim)
      (AddHom.toFun
        {
            toAddHom :=
              { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                map_add' :=
                  (_ :
                    ∀ (x y : ⨂[R] (x : ι), M),
                      (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                        (lift (constOfIsEmpty R (fun i => M) 1)) x + (lift (constOfIsEmpty R (fun i => M) 1)) y) },
            map_smul' :=
              (_ :
                ∀ (r : R) (x : ⨂[R] (x : ι), M),
                  AddHom.toFun
                      { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                        map_add' :=
                          (_ :
                            ∀ (x y : ⨂[R] (x : ι), M),
                              (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                                (lift (constOfIsEmpty R (fun i => M) 1)) x +
                                  (lift (constOfIsEmpty R (fun i => M) 1)) y) }
                      (r • x) =
                    (RingHom.id R) r •
                      AddHom.toFun
                        { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                          map_add' :=
                            (_ :
                              ∀ (x y : ⨂[R] (x : ι), M),
                                (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                                  (lift (constOfIsEmpty R (fun i => M) 1)) x +
                                    (lift (constOfIsEmpty R (fun i => M) 1)) y) }
                        x) }.toAddHom
        x) =
    x

Next tactic:
refine x.induction_on ?_ ?_
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · 

Proof state:
case refine_1
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
x : ⨂[R] (x : ι), M
⊢ ∀ {r : R} {f : ι → M},
    (fun r => r • (tprod R) isEmptyElim)
        (AddHom.toFun
          {
              toAddHom :=
                { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                  map_add' :=
                    (_ :
                      ∀ (x y : ⨂[R] (x : ι), M),
                        (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                          (lift (constOfIsEmpty R (fun i => M) 1)) x + (lift (constOfIsEmpty R (fun i => M) 1)) y) },
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : ⨂[R] (x : ι), M),
                    AddHom.toFun
                        { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                          map_add' :=
                            (_ :
                              ∀ (x y : ⨂[R] (x : ι), M),
                                (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                                  (lift (constOfIsEmpty R (fun i => M) 1)) x +
                                    (lift (constOfIsEmpty R (fun i => M) 1)) y) }
                        (r • x) =
                      (RingHom.id R) r •
                        AddHom.toFun
                          { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                            map_add' :=
                              (_ :
                                ∀ (x y : ⨂[R] (x : ι), M),
                                  (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                                    (lift (constOfIsEmpty R (fun i => M) 1)) x +
                                      (lift (constOfIsEmpty R (fun i => M) 1)) y) }
                          x) }.toAddHom
          (r • (tprod R) f)) =
      r • (tprod R) f

Next tactic:
intro x y
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · intro x y
      

Proof state:
case refine_1
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
x✝ : ⨂[R] (x : ι), M
x : R
y : ι → M
⊢ (fun r => r • (tprod R) isEmptyElim)
      (AddHom.toFun
        {
            toAddHom :=
              { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                map_add' :=
                  (_ :
                    ∀ (x y : ⨂[R] (x : ι), M),
                      (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                        (lift (constOfIsEmpty R (fun i => M) 1)) x + (lift (constOfIsEmpty R (fun i => M) 1)) y) },
            map_smul' :=
              (_ :
                ∀ (r : R) (x : ⨂[R] (x : ι), M),
                  AddHom.toFun
                      { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                        map_add' :=
                          (_ :
                            ∀ (x y : ⨂[R] (x : ι), M),
                              (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                                (lift (constOfIsEmpty R (fun i => M) 1)) x +
                                  (lift (constOfIsEmpty R (fun i => M) 1)) y) }
                      (r • x) =
                    (RingHom.id R) r •
                      AddHom.toFun
                        { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                          map_add' :=
                            (_ :
                              ∀ (x y : ⨂[R] (x : ι), M),
                                (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                                  (lift (constOfIsEmpty R (fun i => M) 1)) x +
                                    (lift (constOfIsEmpty R (fun i => M) 1)) y) }
                        x) }.toAddHom
        (x • (tprod R) y)) =
    x • (tprod R) y

Next tactic:
simp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply,
        smul_eq_mul, mul_one]
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · intro x y
      simp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply,
        smul_eq_mul, mul_one]
      

Proof state:
case refine_1
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
x✝ : ⨂[R] (x : ι), M
x : R
y : ι → M
⊢ x • (tprod R) isEmptyElim = x • (tprod R) y

Next tactic:
congr
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · intro x y
      simp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply,
        smul_eq_mul, mul_one]
      congr
      

Proof state:
case refine_1.e_a.h.e_6.h
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
x✝ : ⨂[R] (x : ι), M
x : R
y : ι → M
⊢ isEmptyElim = y

Next tactic:
aesop
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · intro x y
      simp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply,
        smul_eq_mul, mul_one]
      congr
      aesop
    · simp only
      

Proof state:
case refine_2
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
x : ⨂[R] (x : ι), M
⊢ ∀ {x y : ⨂[R] (i : ι), M},
    (lift (constOfIsEmpty R (fun i => M) 1)) x • (tprod R) isEmptyElim = x →
      (lift (constOfIsEmpty R (fun i => M) 1)) y • (tprod R) isEmptyElim = y →
        (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) • (tprod R) isEmptyElim = x + y

Next tactic:
intro x y hx hy
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · intro x y
      simp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply,
        smul_eq_mul, mul_one]
      congr
      aesop
    · simp only
      intro x y hx hy
      

Proof state:
case refine_2
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
x✝ x y : ⨂[R] (i : ι), M
hx : (lift (constOfIsEmpty R (fun i => M) 1)) x • (tprod R) isEmptyElim = x
hy : (lift (constOfIsEmpty R (fun i => M) 1)) y • (tprod R) isEmptyElim = y
⊢ (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) • (tprod R) isEmptyElim = x + y

Next tactic:
rw [map_add, add_smul, hx, hy]
attribute [local simp] eq_iff_true_of_subsingleton in
/-- The tensor product over an empty index type `ι` is isomorphic to the base ring. -/
@[simps symm_apply]
def isEmptyEquiv [IsEmpty ι] : (⨂[R] _ : ι, M) ≃ₗ[R] R where
  toFun := lift (constOfIsEmpty R _ 1)
  invFun r := r • tprod R (@isEmptyElim _ _ _)
  left_inv x := by
    refine x.induction_on ?_ ?_
    · intro x y
      simp only [map_smulₛₗ, RingHom.id_apply, lift.tprod, constOfIsEmpty_apply, const_apply,
        smul_eq_mul, mul_one]
      congr
      aesop
    · simp only
      intro x y hx hy
      rw [map_add, add_smul, hx, hy]
  right_inv t := by 

Proof state:
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : IsEmpty ι
t : R
⊢ AddHom.toFun
      {
          toAddHom :=
            { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
              map_add' :=
                (_ :
                  ∀ (x y : ⨂[R] (x : ι), M),
                    (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                      (lift (constOfIsEmpty R (fun i => M) 1)) x + (lift (constOfIsEmpty R (fun i => M) 1)) y) },
          map_smul' :=
            (_ :
              ∀ (r : R) (x : ⨂[R] (x : ι), M),
                AddHom.toFun
                    { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                      map_add' :=
                        (_ :
                          ∀ (x y : ⨂[R] (x : ι), M),
                            (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                              (lift (constOfIsEmpty R (fun i => M) 1)) x + (lift (constOfIsEmpty R (fun i => M) 1)) y) }
                    (r • x) =
                  (RingHom.id R) r •
                    AddHom.toFun
                      { toFun := ⇑(lift (constOfIsEmpty R (fun i => M) 1)),
                        map_add' :=
                          (_ :
                            ∀ (x y : ⨂[R] (x : ι), M),
                              (lift (constOfIsEmpty R (fun i => M) 1)) (x + y) =
                                (lift (constOfIsEmpty R (fun i => M) 1)) x +
                                  (lift (constOfIsEmpty R (fun i => M) 1)) y) }
                      x) }.toAddHom
      ((fun r => r • (tprod R) isEmptyElim) t) =
    t

Next tactic:
simp
/--
Tensor product of `M` over a singleton set is equivalent to `M`
-/
@[simps symm_apply]
def subsingletonEquiv [Subsingleton ι] (i₀ : ι) : (⨂[R] _ : ι, M) ≃ₗ[R] M where
  toFun := lift (MultilinearMap.ofSubsingleton R M M i₀ .id)
  invFun m := tprod R fun _ ↦ m
  left_inv x := by
    dsimp only
    have : ∀ (f : ι → M) (z : M), (fun _ : ι ↦ z) = update f i₀ z := fun f z ↦ by
      ext i
      rw [Subsingleton.elim i i₀, Function.update_same]
    refine x.induction_on ?_ ?_
    · intro r f
      simp only [LinearMap.map_smul, LinearMap.id_apply, lift.tprod, ofSubsingleton_apply_apply,
        this f, MultilinearMap.map_smul, update_eq_self]
    · intro x y hx hy
      rw [LinearMap.map_add, this 0 (_ + _), MultilinearMap.map_add, ← this 0 (lift _ _), hx,
        ← this 0 (lift _ _), hy]
  right_inv t := by simp only [ofSubsingleton_apply_apply, LinearMap.id_apply, lift.tprod]
  map_add' := LinearMap.map_add _
  map_smul' := fun r x => by
    

Proof state:
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : Subsingleton ι
i₀ : ι
r : R
x : ⨂[R] (x : ι), M
⊢ AddHom.toFun
      { toFun := ⇑(lift ((ofSubsingleton R M M i₀) LinearMap.id)),
        map_add' :=
          (_ :
            ∀ (x y : ⨂[R] (x : ι), M),
              (lift ((ofSubsingleton R M M i₀) LinearMap.id)) (x + y) =
                (lift ((ofSubsingleton R M M i₀) LinearMap.id)) x + (lift ((ofSubsingleton R M M i₀) LinearMap.id)) y) }
      (r • x) =
    (RingHom.id R) r •
      AddHom.toFun
        { toFun := ⇑(lift ((ofSubsingleton R M M i₀) LinearMap.id)),
          map_add' :=
            (_ :
              ∀ (x y : ⨂[R] (x : ι), M),
                (lift ((ofSubsingleton R M M i₀) LinearMap.id)) (x + y) =
                  (lift ((ofSubsingleton R M M i₀) LinearMap.id)) x +
                    (lift ((ofSubsingleton R M M i₀) LinearMap.id)) y) }
        x

Next tactic:
simp only
/--
Tensor product of `M` over a singleton set is equivalent to `M`
-/
@[simps symm_apply]
def subsingletonEquiv [Subsingleton ι] (i₀ : ι) : (⨂[R] _ : ι, M) ≃ₗ[R] M where
  toFun := lift (MultilinearMap.ofSubsingleton R M M i₀ .id)
  invFun m := tprod R fun _ ↦ m
  left_inv x := by
    dsimp only
    have : ∀ (f : ι → M) (z : M), (fun _ : ι ↦ z) = update f i₀ z := fun f z ↦ by
      ext i
      rw [Subsingleton.elim i i₀, Function.update_same]
    refine x.induction_on ?_ ?_
    · intro r f
      simp only [LinearMap.map_smul, LinearMap.id_apply, lift.tprod, ofSubsingleton_apply_apply,
        this f, MultilinearMap.map_smul, update_eq_self]
    · intro x y hx hy
      rw [LinearMap.map_add, this 0 (_ + _), MultilinearMap.map_add, ← this 0 (lift _ _), hx,
        ← this 0 (lift _ _), hy]
  right_inv t := by simp only [ofSubsingleton_apply_apply, LinearMap.id_apply, lift.tprod]
  map_add' := LinearMap.map_add _
  map_smul' := fun r x => by
    simp only
    

Proof state:
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : Subsingleton ι
i₀ : ι
r : R
x : ⨂[R] (x : ι), M
⊢ (lift ((ofSubsingleton R M M i₀) LinearMap.id)) (r • x) =
    (RingHom.id R) r • (lift ((ofSubsingleton R M M i₀) LinearMap.id)) x

Next tactic:
exact LinearMap.map_smul _ r x
/--
Tensor product of `M` over a singleton set is equivalent to `M`
-/
@[simps symm_apply]
def subsingletonEquiv [Subsingleton ι] (i₀ : ι) : (⨂[R] _ : ι, M) ≃ₗ[R] M where
  toFun := lift (MultilinearMap.ofSubsingleton R M M i₀ .id)
  invFun m := tprod R fun _ ↦ m
  left_inv x := by
    

Proof state:
ι : Type u_1
ι₂ : Type u_2
ι₃ : Type u_3
R : Type u_4
inst✝⁸ : CommSemiring R
R₁ : Type u_5
R₂ : Type u_6
s : ι → Type u_7
inst✝⁷ : (i : ι) → AddCommMonoid (s i)
inst✝⁶ : (i : ι) → Module R (s i)
M : Type u_8
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
E : Type u_9
inst✝³ : AddCommMonoid E
inst✝² : Module R E
F : Type u_10
inst✝¹ : AddCommMonoid F
φ : MultilinearMap R s E
inst✝ : Subsingleton ι
i₀ : ι
x : ⨂[R] (x : ι), M
⊢ (fun m => (tprod R) fun x => m)
      (AddHom.toFun
        {
            toAddHom :=
              { toFun := ⇑(lift ((ofSubsingleton R M M i₀) LinearMap.id)),
                map_add' :=
                  (_ :
                    ∀ (x y : ⨂[R] (x : ι), M),
                      (lift ((ofSubsingleton R M M i₀) LinearMap.id)) (x + y) =
                        (lift ((ofSubsingleton R M M i₀) LinearMap.id)) x +
                          (lift ((ofSubsingleton R M M i₀) LinearMap.id)) y) },
            map_smul' :=
              (_ :
                ∀ (r : R) (x : ⨂[R] (x : ι), M),
                  AddHom.toFun
                      { toFun := ⇑(lift ((ofSubsingleton R M M i₀) LinearMap.id)),
                        map_add' :=
                          (_ :
                            ∀ (x y : ⨂[R] (x : ι), M),
                              (lift ((ofSubsingleton R M M i₀) LinearMap.id)) (x + y) =
                                (lift ((ofSubsingleton R M M i₀) LinearMap.id)) x +
                                  (lift ((ofSubsingleton R M M i₀) LinearMap.id)) y) }
                      (r • x) =
                    (RingHom.id R) r •
                      AddHom.toFun
                        { toFun := ⇑(lift ((ofSubsingleton R M M i₀) LinearMap.id)),
                          map_add' :=
                            (_ :
                              ∀ (x y : ⨂[R] (x : ι), M),
                                (lift ((ofSubsingleton R M M i₀) LinearMap.id)) (x + y) =
                                  (lift ((ofSubsingleton R M M i₀) LinearMap.id)) x +
                                    (lift ((ofSubsingleton R M M i₀) LinearMap.id)) y) }
                        x) }.toAddHom
        x) =
    x

Next tactic:
dsimp only