Theorem: ModuleCat.Free.left_unitality
File: Mathlib/Algebra/Category/ModuleCat/Adjunctions.lean

tactic: intros
state_before: R : Type u
inst✝ : CommRing R
X : Type u
⊢ (λ_ ((free R).obj X)).hom =
    (ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom

tactic: apply TensorProduct.ext
state_before: R : Type u
inst✝ : CommRing R
X : Type u
⊢ (λ_ ((free R).obj X)).hom =
    (ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom

tactic: apply LinearMap.ext_ring
state_before: case H
R : Type u
inst✝ : CommRing R
X : Type u
⊢ LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom =
    LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))
      ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom)

tactic: apply Finsupp.lhom_ext'
state_before: case H.h
R : Type u
inst✝ : CommRing R
X : Type u
⊢ ↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1 =
    ↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))
          ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))
      1

tactic: intro x
state_before: case H.h.h
R : Type u
inst✝ : CommRing R
X : Type u
⊢ ∀ (a : X),
    LinearMap.comp (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)
        (Finsupp.lsingle a) =
      LinearMap.comp
        (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))
              ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))
          1)
        (Finsupp.lsingle a)

tactic: apply LinearMap.ext_ring
state_before: case H.h.h
R : Type u
inst✝ : CommRing R
X : Type u
x : X
⊢ LinearMap.comp (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)
      (Finsupp.lsingle x) =
    LinearMap.comp
      (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))
            ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))
        1)
      (Finsupp.lsingle x)

tactic: apply Finsupp.ext
state_before: case H.h.h.h
R : Type u
inst✝ : CommRing R
X : Type u
x : X
⊢ ↑(LinearMap.comp (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)
          (Finsupp.lsingle x))
      1 =
    ↑(LinearMap.comp
          (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))
                ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))
            1)
          (Finsupp.lsingle x))
      1

tactic: intro x'
state_before: case H.h.h.h.h
R : Type u
inst✝ : CommRing R
X : Type u
x : X
⊢ ∀ (a : X),
    ↑(↑(LinearMap.comp
                (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)
                (Finsupp.lsingle x))
            1)
        a =
      ↑(↑(LinearMap.comp
                (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))
                      ((ε R ⊗ 𝟙 ((free R).obj X)) ≫
                        (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))
                  1)
                (Finsupp.lsingle x))
            1)
        a

tactic: let q : X →₀ R := ((λ_ (of R (X →₀ R))).hom) (1 ⊗ₜ[R] Finsupp.single x 1)
state_before: case H.h.h.h.h
R : Type u
inst✝ : CommRing R
X : Type u
x x' : X
⊢ ↑(↑(LinearMap.comp
              (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)
              (Finsupp.lsingle x))
          1)
      x' =
    ↑(↑(LinearMap.comp
              (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))
                    ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))
                1)
              (Finsupp.lsingle x))
          1)
      x'

tactic: change q x' = Finsupp.mapDomain (λ_ X).hom (finsuppTensorFinsupp' R (𝟙_ (Type u)) X
  (Finsupp.single PUnit.unit 1 ⊗ₜ[R] Finsupp.single x 1)) x'
state_before: case H.h.h.h.h
R : Type u
inst✝ : CommRing R
X : Type u
x x' : X
q : X →₀ R := ↑(λ_ (of R (X →₀ R))).hom (1 ⊗ₜ[R] Finsupp.single x 1)
⊢ ↑(↑(LinearMap.comp
              (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X)) (λ_ ((free R).obj X)).hom) 1)
              (Finsupp.lsingle x))
          1)
      x' =
    ↑(↑(LinearMap.comp
              (↑(LinearMap.compr₂ (TensorProduct.mk R ↑tensorUnit' ↑((free R).obj X))
                    ((ε R ⊗ 𝟙 ((free R).obj X)) ≫ (μ R (𝟙_ (Type u)) X).hom ≫ map (free R).toPrefunctor.obj (λ_ X).hom))
                1)
              (Finsupp.lsingle x))
          1)
      x'

tactic: simp_rw [finsuppTensorFinsupp'_single_tmul_single,
  ModuleCat.MonoidalCategory.leftUnitor_hom_apply, Finsupp.smul_single', mul_one,
  Finsupp.mapDomain_single, CategoryTheory.leftUnitor_hom_apply, one_smul]
state_before: case H.h.h.h.h
R : Type u
inst✝ : CommRing R
X : Type u
x x' : X
q : X →₀ R := ↑(λ_ (of R (X →₀ R))).hom (1 ⊗ₜ[R] Finsupp.single x 1)
⊢ ↑q x' =
    ↑(Finsupp.mapDomain (λ_ X).hom
          (↑(finsuppTensorFinsupp' R (𝟙_ (Type u)) X) (Finsupp.single PUnit.unit 1 ⊗ₜ[R] Finsupp.single x 1)))
      x'