[GOAL]
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
⊢ ↑(coevaluation K V) 1 =
    let bV := Basis.ofVectorSpace K V;
    ∑ i : ↑(Basis.ofVectorSpaceIndex K V), ↑bV i ⊗ₜ[K] Basis.coord bV i
[PROOFSTEP]
simp only [coevaluation, id]
[GOAL]
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
⊢ ↑(↑(Basis.constr (Basis.singleton Unit K) K) fun x =>
          ∑ x : ↑(Basis.ofVectorSpaceIndex K V),
            ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) x)
      1 =
    ∑ x : ↑(Basis.ofVectorSpaceIndex K V), ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) x
[PROOFSTEP]
rw [(Basis.singleton Unit K).constr_apply_fintype K]
[GOAL]
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
⊢ ∑ i : Unit,
      ↑(Basis.equivFun (Basis.singleton Unit K)) 1 i •
        ∑ x : ↑(Basis.ofVectorSpaceIndex K V),
          ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) x =
    ∑ x : ↑(Basis.ofVectorSpaceIndex K V), ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) x
[PROOFSTEP]
simp only [Fintype.univ_punit, Finset.sum_const, one_smul, Basis.singleton_repr, Basis.equivFun_apply,
  Basis.coe_ofVectorSpace, one_nsmul, Finset.card_singleton]
[GOAL]
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
⊢ LinearMap.comp (LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
      (LinearMap.comp (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V))))
        (LinearMap.lTensor (Module.Dual K V) (coevaluation K V))) =
    LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.lid K (Module.Dual K V))) ↑(TensorProduct.rid K (Module.Dual K V))
[PROOFSTEP]
letI := Classical.decEq (Basis.ofVectorSpaceIndex K V)
[GOAL]
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
⊢ LinearMap.comp (LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
      (LinearMap.comp (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V))))
        (LinearMap.lTensor (Module.Dual K V) (coevaluation K V))) =
    LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.lid K (Module.Dual K V))) ↑(TensorProduct.rid K (Module.Dual K V))
[PROOFSTEP]
apply TensorProduct.ext
[GOAL]
case H
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
⊢ LinearMap.compr₂ (mk K (Module.Dual K V) K)
      (LinearMap.comp (LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
        (LinearMap.comp (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V))))
          (LinearMap.lTensor (Module.Dual K V) (coevaluation K V)))) =
    LinearMap.compr₂ (mk K (Module.Dual K V) K)
      (LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.lid K (Module.Dual K V)))
        ↑(TensorProduct.rid K (Module.Dual K V)))
[PROOFSTEP]
apply (Basis.ofVectorSpace K V).dualBasis.ext
[GOAL]
case H
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
⊢ ∀ (i : ↑(Basis.ofVectorSpaceIndex K V)),
    ↑(LinearMap.compr₂ (mk K (Module.Dual K V) K)
            (LinearMap.comp (LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
              (LinearMap.comp (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V))))
                (LinearMap.lTensor (Module.Dual K V) (coevaluation K V)))))
        (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) i) =
      ↑(LinearMap.compr₂ (mk K (Module.Dual K V) K)
            (LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.lid K (Module.Dual K V)))
              ↑(TensorProduct.rid K (Module.Dual K V))))
        (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) i)
[PROOFSTEP]
intro j
[GOAL]
case H
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.compr₂ (mk K (Module.Dual K V) K)
          (LinearMap.comp (LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
            (LinearMap.comp (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V))))
              (LinearMap.lTensor (Module.Dual K V) (coevaluation K V)))))
      (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j) =
    ↑(LinearMap.compr₂ (mk K (Module.Dual K V) K)
          (LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.lid K (Module.Dual K V)))
            ↑(TensorProduct.rid K (Module.Dual K V))))
      (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j)
[PROOFSTEP]
apply LinearMap.ext_ring
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(↑(LinearMap.compr₂ (mk K (Module.Dual K V) K)
              (LinearMap.comp (LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
                (LinearMap.comp (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V))))
                  (LinearMap.lTensor (Module.Dual K V) (coevaluation K V)))))
          (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j))
      1 =
    ↑(↑(LinearMap.compr₂ (mk K (Module.Dual K V) K)
              (LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.lid K (Module.Dual K V)))
                ↑(TensorProduct.rid K (Module.Dual K V))))
          (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j))
      1
[PROOFSTEP]
rw [LinearMap.compr₂_apply, LinearMap.compr₂_apply, TensorProduct.mk_apply]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.comp (LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
          (LinearMap.comp (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V))))
            (LinearMap.lTensor (Module.Dual K V) (coevaluation K V))))
      (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K] 1) =
    ↑(LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.lid K (Module.Dual K V)))
          ↑(TensorProduct.rid K (Module.Dual K V)))
      (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K] 1)
[PROOFSTEP]
simp only [LinearMap.coe_comp, Function.comp_apply, LinearEquiv.coe_toLinearMap]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
      (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V)))
        (↑(LinearMap.lTensor (Module.Dual K V) (coevaluation K V))
          (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K] 1))) =
    ↑(LinearEquiv.symm (TensorProduct.lid K (Module.Dual K V)))
      (↑(TensorProduct.rid K (Module.Dual K V)) (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K] 1))
[PROOFSTEP]
rw [rid_tmul, one_smul, lid_symm_apply]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
      (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V)))
        (↑(LinearMap.lTensor (Module.Dual K V) (coevaluation K V))
          (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K] 1))) =
    1 ⊗ₜ[K] ↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j
[PROOFSTEP]
simp only [LinearEquiv.coe_toLinearMap, LinearMap.lTensor_tmul, coevaluation_apply_one]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
      (↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V)))
        (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K]
          ∑ x : ↑(Basis.ofVectorSpaceIndex K V),
            ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) x)) =
    1 ⊗ₜ[K] ↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j
[PROOFSTEP]
rw [TensorProduct.tmul_sum, LinearEquiv.map_sum]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
      (∑ i : ↑(Basis.ofVectorSpaceIndex K V),
        ↑(LinearEquiv.symm (TensorProduct.assoc K (Module.Dual K V) V (Module.Dual K V)))
          (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K]
            ↑(Basis.ofVectorSpace K V) i ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) i)) =
    1 ⊗ₜ[K] ↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j
[PROOFSTEP]
simp only [assoc_symm_tmul]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
      (∑ x : ↑(Basis.ofVectorSpaceIndex K V),
        (↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) x) ⊗ₜ[K]
          Basis.coord (Basis.ofVectorSpace K V) x) =
    1 ⊗ₜ[K] ↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j
[PROOFSTEP]
rw [LinearMap.map_sum]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ∑ i : ↑(Basis.ofVectorSpaceIndex K V),
      ↑(LinearMap.rTensor (Module.Dual K V) (contractLeft K V))
        ((↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) i) ⊗ₜ[K]
          Basis.coord (Basis.ofVectorSpace K V) i) =
    1 ⊗ₜ[K] ↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j
[PROOFSTEP]
simp only [LinearMap.rTensor_tmul, contractLeft_apply]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ∑ x : ↑(Basis.ofVectorSpaceIndex K V),
      ↑(↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j) (↑(Basis.ofVectorSpace K V) x) ⊗ₜ[K]
        Basis.coord (Basis.ofVectorSpace K V) x =
    1 ⊗ₜ[K] ↑(Basis.dualBasis (Basis.ofVectorSpace K V)) j
[PROOFSTEP]
simp only [Basis.coe_dualBasis, Basis.coord_apply, Basis.repr_self_apply, TensorProduct.ite_tmul]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ (∑ x : ↑(Basis.ofVectorSpaceIndex K V), if x = j then 1 ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) x else 0) =
    1 ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) j
[PROOFSTEP]
rw [Finset.sum_ite_eq']
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ (if j ∈ Finset.univ then 1 ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) j else 0) =
    1 ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) j
[PROOFSTEP]
simp only [Finset.mem_univ, if_true]
[GOAL]
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
⊢ LinearMap.comp (LinearMap.lTensor V (contractLeft K V))
      (LinearMap.comp (↑(TensorProduct.assoc K V (Module.Dual K V) V)) (LinearMap.rTensor V (coevaluation K V))) =
    LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.rid K V)) ↑(TensorProduct.lid K V)
[PROOFSTEP]
letI := Classical.decEq (Basis.ofVectorSpaceIndex K V)
[GOAL]
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
⊢ LinearMap.comp (LinearMap.lTensor V (contractLeft K V))
      (LinearMap.comp (↑(TensorProduct.assoc K V (Module.Dual K V) V)) (LinearMap.rTensor V (coevaluation K V))) =
    LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.rid K V)) ↑(TensorProduct.lid K V)
[PROOFSTEP]
apply TensorProduct.ext
[GOAL]
case H
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
⊢ LinearMap.compr₂ (mk K K V)
      (LinearMap.comp (LinearMap.lTensor V (contractLeft K V))
        (LinearMap.comp (↑(TensorProduct.assoc K V (Module.Dual K V) V)) (LinearMap.rTensor V (coevaluation K V)))) =
    LinearMap.compr₂ (mk K K V) (LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.rid K V)) ↑(TensorProduct.lid K V))
[PROOFSTEP]
apply LinearMap.ext_ring
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.compr₂ (mk K K V)
          (LinearMap.comp (LinearMap.lTensor V (contractLeft K V))
            (LinearMap.comp (↑(TensorProduct.assoc K V (Module.Dual K V) V)) (LinearMap.rTensor V (coevaluation K V)))))
      1 =
    ↑(LinearMap.compr₂ (mk K K V) (LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.rid K V)) ↑(TensorProduct.lid K V)))
      1
[PROOFSTEP]
apply (Basis.ofVectorSpace K V).ext
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
⊢ ∀ (i : ↑(Basis.ofVectorSpaceIndex K V)),
    ↑(↑(LinearMap.compr₂ (mk K K V)
                (LinearMap.comp (LinearMap.lTensor V (contractLeft K V))
                  (LinearMap.comp (↑(TensorProduct.assoc K V (Module.Dual K V) V))
                    (LinearMap.rTensor V (coevaluation K V)))))
            1)
        (↑(Basis.ofVectorSpace K V) i) =
      ↑(↑(LinearMap.compr₂ (mk K K V)
                (LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.rid K V)) ↑(TensorProduct.lid K V)))
            1)
        (↑(Basis.ofVectorSpace K V) i)
[PROOFSTEP]
intro j
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(↑(LinearMap.compr₂ (mk K K V)
              (LinearMap.comp (LinearMap.lTensor V (contractLeft K V))
                (LinearMap.comp (↑(TensorProduct.assoc K V (Module.Dual K V) V))
                  (LinearMap.rTensor V (coevaluation K V)))))
          1)
      (↑(Basis.ofVectorSpace K V) j) =
    ↑(↑(LinearMap.compr₂ (mk K K V)
              (LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.rid K V)) ↑(TensorProduct.lid K V)))
          1)
      (↑(Basis.ofVectorSpace K V) j)
[PROOFSTEP]
rw [LinearMap.compr₂_apply, LinearMap.compr₂_apply, TensorProduct.mk_apply]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.comp (LinearMap.lTensor V (contractLeft K V))
          (LinearMap.comp (↑(TensorProduct.assoc K V (Module.Dual K V) V)) (LinearMap.rTensor V (coevaluation K V))))
      (1 ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) j) =
    ↑(LinearMap.comp ↑(LinearEquiv.symm (TensorProduct.rid K V)) ↑(TensorProduct.lid K V))
      (1 ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) j)
[PROOFSTEP]
simp only [LinearMap.coe_comp, Function.comp_apply, LinearEquiv.coe_toLinearMap]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.lTensor V (contractLeft K V))
      (↑(TensorProduct.assoc K V (Module.Dual K V) V)
        (↑(LinearMap.rTensor V (coevaluation K V)) (1 ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) j))) =
    ↑(LinearEquiv.symm (TensorProduct.rid K V)) (↑(TensorProduct.lid K V) (1 ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) j))
[PROOFSTEP]
rw [lid_tmul, one_smul, rid_symm_apply]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.lTensor V (contractLeft K V))
      (↑(TensorProduct.assoc K V (Module.Dual K V) V)
        (↑(LinearMap.rTensor V (coevaluation K V)) (1 ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) j))) =
    ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1
[PROOFSTEP]
simp only [LinearEquiv.coe_toLinearMap, LinearMap.rTensor_tmul, coevaluation_apply_one]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.lTensor V (contractLeft K V))
      (↑(TensorProduct.assoc K V (Module.Dual K V) V)
        ((∑ x : ↑(Basis.ofVectorSpaceIndex K V),
            ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) x) ⊗ₜ[K]
          ↑(Basis.ofVectorSpace K V) j)) =
    ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1
[PROOFSTEP]
rw [TensorProduct.sum_tmul, LinearEquiv.map_sum]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.lTensor V (contractLeft K V))
      (∑ i : ↑(Basis.ofVectorSpaceIndex K V),
        ↑(TensorProduct.assoc K V (Module.Dual K V) V)
          ((↑(Basis.ofVectorSpace K V) i ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) i) ⊗ₜ[K]
            ↑(Basis.ofVectorSpace K V) j)) =
    ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1
[PROOFSTEP]
simp only [assoc_tmul]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ↑(LinearMap.lTensor V (contractLeft K V))
      (∑ x : ↑(Basis.ofVectorSpaceIndex K V),
        ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] Basis.coord (Basis.ofVectorSpace K V) x ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) j) =
    ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1
[PROOFSTEP]
rw [LinearMap.map_sum]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ∑ i : ↑(Basis.ofVectorSpaceIndex K V),
      ↑(LinearMap.lTensor V (contractLeft K V))
        (↑(Basis.ofVectorSpace K V) i ⊗ₜ[K]
          Basis.coord (Basis.ofVectorSpace K V) i ⊗ₜ[K] ↑(Basis.ofVectorSpace K V) j) =
    ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1
[PROOFSTEP]
simp only [LinearMap.lTensor_tmul, contractLeft_apply]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ ∑ x : ↑(Basis.ofVectorSpaceIndex K V),
      ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] ↑(Basis.coord (Basis.ofVectorSpace K V) x) (↑(Basis.ofVectorSpace K V) j) =
    ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1
[PROOFSTEP]
simp only [Basis.coord_apply, Basis.repr_self_apply, TensorProduct.tmul_ite]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ (∑ x : ↑(Basis.ofVectorSpaceIndex K V), if j = x then ↑(Basis.ofVectorSpace K V) x ⊗ₜ[K] 1 else 0) =
    ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1
[PROOFSTEP]
rw [Finset.sum_ite_eq]
[GOAL]
case H.h
K : Type u
inst✝³ : Field K
V : Type v
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
this : DecidableEq ↑(Basis.ofVectorSpaceIndex K V) := Classical.decEq ↑(Basis.ofVectorSpaceIndex K V)
j : ↑(Basis.ofVectorSpaceIndex K V)
⊢ (if j ∈ Finset.univ then ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1 else 0) = ↑(Basis.ofVectorSpace K V) j ⊗ₜ[K] 1
[PROOFSTEP]
simp only [Finset.mem_univ, if_true]