l3lab/ntp-mathlib huggingface dataset:
instance (V : Rep k G) : Module k V := by
  change Module k ((forget₂ (Rep k G) (ModuleCat k)).obj V)
  

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
V : Rep k G
⊢ Module k ↑((forget₂ (Rep k G) (ModuleCat k)).obj V)

Next tactic:
infer_instance
@[simp]
theorem ρ_inv_self_apply {G : Type u} [Group G] (A : Rep k G) (g : G) (x : A) :
    A.ρ g⁻¹ (A.ρ g x) = x :=
  show (A.ρ g⁻¹ * A.ρ g) x = x by 

Proof state:
k G✝ : Type u
inst✝² : CommRing k
inst✝¹ : Monoid G✝
G : Type u
inst✝ : Group G
A : Rep k G
g : G
x : CoeSort.coe A
⊢ ((ρ A) g⁻¹ * (ρ A) g) x = x

Next tactic:
rw [← map_mul, inv_mul_self, map_one, LinearMap.one_apply]
@[simp]
theorem ρ_self_inv_apply {G : Type u} [Group G] {A : Rep k G} (g : G) (x : A) :
    A.ρ g (A.ρ g⁻¹ x) = x :=
  show (A.ρ g * A.ρ g⁻¹) x = x by 

Proof state:
k G✝ : Type u
inst✝² : CommRing k
inst✝¹ : Monoid G✝
G : Type u
inst✝ : Group G
A : Rep k G
g : G
x : CoeSort.coe A
⊢ ((ρ A) g * (ρ A) g⁻¹) x = x

Next tactic:
rw [← map_mul, mul_inv_self, map_one, LinearMap.one_apply]
theorem linearization_of (X : Action (Type u) (MonCat.of G)) (g : G) (x : X.V) :
    ((linearization k G).obj X).ρ g (Finsupp.single x (1 : k))
      = Finsupp.single (X.ρ g x) (1 : k) := by
  

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X : Action (Type u) (MonCat.of G)
g : G
x : X.V
⊢ (((ρ ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj X)) g) fun₀ | x => 1) = fun₀ | X.ρ g x => 1

Next tactic:
rw [linearization_obj_ρ, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single]
theorem linearization_single (X : Action (Type u) (MonCat.of G)) (g : G) (x : X.V) (r : k) :
    ((linearization k G).obj X).ρ g (Finsupp.single x r) = Finsupp.single (X.ρ g x) r :=
  by 

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X : Action (Type u) (MonCat.of G)
g : G
x : X.V
r : k
⊢ (((ρ ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj X)) g) fun₀ | x => r) = fun₀ | X.ρ g x => r

Next tactic:
rw [linearization_obj_ρ, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single]
@[simp]
theorem linearization_μ_inv_hom (X Y : Action (Type u) (MonCat.of G)) :
    (inv ((linearization k G).μ X Y)).hom = (finsuppTensorFinsupp' k X.V Y.V).symm.toLinearMap := by
-- Porting note: broken proof was
/-simp_rw [← Action.forget_map, Functor.map_inv, Action.forget_map, linearization_μ_hom]
  apply IsIso.inv_eq_of_hom_inv_id _
  exact LinearMap.ext fun x => LinearEquiv.symm_apply_apply _ _-/
  

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X✝ Y✝ : Action (Type u) (MonCat.of G)
f : X✝ ⟶ Y✝
X Y : Action (Type u) (MonCat.of G)
⊢ (inv (LaxMonoidalFunctor.μ (linearization k G).toLaxMonoidalFunctor X Y)).hom =
    ↑(LinearEquiv.symm (finsuppTensorFinsupp' k X.V Y.V))

Next tactic:
rw [← Action.forget_map, Functor.map_inv]
@[simp]
theorem linearization_μ_inv_hom (X Y : Action (Type u) (MonCat.of G)) :
    (inv ((linearization k G).μ X Y)).hom = (finsuppTensorFinsupp' k X.V Y.V).symm.toLinearMap := by
-- Porting note: broken proof was
/-simp_rw [← Action.forget_map, Functor.map_inv, Action.forget_map, linearization_μ_hom]
  apply IsIso.inv_eq_of_hom_inv_id _
  exact LinearMap.ext fun x => LinearEquiv.symm_apply_apply _ _-/
  rw [← Action.forget_map, Functor.map_inv]
  

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X✝ Y✝ : Action (Type u) (MonCat.of G)
f : X✝ ⟶ Y✝
X Y : Action (Type u) (MonCat.of G)
⊢ inv
      ((Action.forget (ModuleCat k) (MonCat.of G)).map
        (LaxMonoidalFunctor.μ (linearization k G).toLaxMonoidalFunctor X Y)) =
    ↑(LinearEquiv.symm (finsuppTensorFinsupp' k X.V Y.V))

Next tactic:
apply IsIso.inv_eq_of_hom_inv_id
@[simp]
theorem linearization_μ_inv_hom (X Y : Action (Type u) (MonCat.of G)) :
    (inv ((linearization k G).μ X Y)).hom = (finsuppTensorFinsupp' k X.V Y.V).symm.toLinearMap := by
-- Porting note: broken proof was
/-simp_rw [← Action.forget_map, Functor.map_inv, Action.forget_map, linearization_μ_hom]
  apply IsIso.inv_eq_of_hom_inv_id _
  exact LinearMap.ext fun x => LinearEquiv.symm_apply_apply _ _-/
  rw [← Action.forget_map, Functor.map_inv]
  apply IsIso.inv_eq_of_hom_inv_id
  

Proof state:
case hom_inv_id
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X✝ Y✝ : Action (Type u) (MonCat.of G)
f : X✝ ⟶ Y✝
X Y : Action (Type u) (MonCat.of G)
⊢ (Action.forget (ModuleCat k) (MonCat.of G)).map (LaxMonoidalFunctor.μ (linearization k G).toLaxMonoidalFunctor X Y) ≫
      ↑(LinearEquiv.symm (finsuppTensorFinsupp' k X.V Y.V)) =
    𝟙
      ((Action.forget (ModuleCat k) (MonCat.of G)).obj
        (MonoidalCategory.tensorObj ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj X)
          ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj Y)))

Next tactic:
exact LinearMap.ext fun x => LinearEquiv.symm_apply_apply (finsuppTensorFinsupp' k X.V Y.V) x
/-- Given an element `x : A`, there is a natural morphism of representations `k[G] ⟶ A` sending
`g ↦ A.ρ(g)(x).` -/
@[simps]
noncomputable def leftRegularHom (A : Rep k G) (x : A) : Rep.ofMulAction k G G ⟶ A where
  hom := Finsupp.lift _ _ _ fun g => A.ρ g x
  comm g := by
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f : X ⟶ Y
A : Rep k G
x : CoeSort.coe A
g : ↑(MonCat.of G)
⊢ ((ofMulAction k G G).ρ g ≫ (Finsupp.lift (↑A.V) k G) fun g => ((ρ A) g) x) =
    ((Finsupp.lift (↑A.V) k G) fun g => ((ρ A) g) x) ≫ A.ρ g

Next tactic:
refine' Finsupp.lhom_ext' fun y => LinearMap.ext_ring _
/-- Given an element `x : A`, there is a natural morphism of representations `k[G] ⟶ A` sending
`g ↦ A.ρ(g)(x).` -/
@[simps]
noncomputable def leftRegularHom (A : Rep k G) (x : A) : Rep.ofMulAction k G G ⟶ A where
  hom := Finsupp.lift _ _ _ fun g => A.ρ g x
  comm g := by
    refine' Finsupp.lhom_ext' fun y => LinearMap.ext_ring _
/- Porting note: rest of broken proof was
    simpa only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply, Finsupp.lift_apply,
      Action_ρ_eq_ρ, of_ρ_apply, Representation.ofMulAction_single, Finsupp.sum_single_index,
      zero_smul, one_smul, smul_eq_mul, A.ρ.map_mul] -/
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f : X ⟶ Y
A : Rep k G
x : CoeSort.coe A
g : ↑(MonCat.of G)
y : G
⊢ (((ofMulAction k G G).ρ g ≫ (Finsupp.lift (↑A.V) k G) fun g => ((ρ A) g) x) ∘ₗ Finsupp.lsingle y) 1 =
    ((((Finsupp.lift (↑A.V) k G) fun g => ((ρ A) g) x) ≫ A.ρ g) ∘ₗ Finsupp.lsingle y) 1

Next tactic:
simp only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply]
/-- Given an element `x : A`, there is a natural morphism of representations `k[G] ⟶ A` sending
`g ↦ A.ρ(g)(x).` -/
@[simps]
noncomputable def leftRegularHom (A : Rep k G) (x : A) : Rep.ofMulAction k G G ⟶ A where
  hom := Finsupp.lift _ _ _ fun g => A.ρ g x
  comm g := by
    refine' Finsupp.lhom_ext' fun y => LinearMap.ext_ring _
/- Porting note: rest of broken proof was
    simpa only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply, Finsupp.lift_apply,
      Action_ρ_eq_ρ, of_ρ_apply, Representation.ofMulAction_single, Finsupp.sum_single_index,
      zero_smul, one_smul, smul_eq_mul, A.ρ.map_mul] -/
    simp only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply]
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f : X ⟶ Y
A : Rep k G
x : CoeSort.coe A
g : ↑(MonCat.of G)
y : G
⊢ ((Finsupp.lift (↑A.V) k G) fun g => ((ρ A) g) x) (((ofMulAction k G G).ρ g) fun₀ | y => 1) =
    (A.ρ g) (((Finsupp.lift (↑A.V) k G) fun g => ((ρ A) g) x) fun₀ | y => 1)

Next tactic:
erw [Finsupp.lift_apply, Finsupp.lift_apply, Representation.ofMulAction_single (G := G)]
/-- Given an element `x : A`, there is a natural morphism of representations `k[G] ⟶ A` sending
`g ↦ A.ρ(g)(x).` -/
@[simps]
noncomputable def leftRegularHom (A : Rep k G) (x : A) : Rep.ofMulAction k G G ⟶ A where
  hom := Finsupp.lift _ _ _ fun g => A.ρ g x
  comm g := by
    refine' Finsupp.lhom_ext' fun y => LinearMap.ext_ring _
/- Porting note: rest of broken proof was
    simpa only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply, Finsupp.lift_apply,
      Action_ρ_eq_ρ, of_ρ_apply, Representation.ofMulAction_single, Finsupp.sum_single_index,
      zero_smul, one_smul, smul_eq_mul, A.ρ.map_mul] -/
    simp only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply]
    erw [Finsupp.lift_apply, Finsupp.lift_apply, Representation.ofMulAction_single (G := G)]
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f : X ⟶ Y
A : Rep k G
x : CoeSort.coe A
g : ↑(MonCat.of G)
y : G
⊢ (Finsupp.sum (fun₀ | g • y => 1) fun x_1 r => r • ((ρ A) x_1) x) =
    (A.ρ g) (Finsupp.sum (fun₀ | y => 1) fun x_1 r => r • ((ρ A) x_1) x)

Next tactic:
simp only [Finsupp.sum_single_index, zero_smul, one_smul, smul_eq_mul, A.ρ.map_mul, of_ρ]
/-- Given an element `x : A`, there is a natural morphism of representations `k[G] ⟶ A` sending
`g ↦ A.ρ(g)(x).` -/
@[simps]
noncomputable def leftRegularHom (A : Rep k G) (x : A) : Rep.ofMulAction k G G ⟶ A where
  hom := Finsupp.lift _ _ _ fun g => A.ρ g x
  comm g := by
    refine' Finsupp.lhom_ext' fun y => LinearMap.ext_ring _
/- Porting note: rest of broken proof was
    simpa only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply, Finsupp.lift_apply,
      Action_ρ_eq_ρ, of_ρ_apply, Representation.ofMulAction_single, Finsupp.sum_single_index,
      zero_smul, one_smul, smul_eq_mul, A.ρ.map_mul] -/
    simp only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply]
    erw [Finsupp.lift_apply, Finsupp.lift_apply, Representation.ofMulAction_single (G := G)]
    simp only [Finsupp.sum_single_index, zero_smul, one_smul, smul_eq_mul, A.ρ.map_mul, of_ρ]
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f : X ⟶ Y
A : Rep k G
x : CoeSort.coe A
g : ↑(MonCat.of G)
y : G
⊢ ((ρ A) g * (ρ A) y) x = (A.ρ g) (((ρ A) y) x)

Next tactic:
rfl
theorem leftRegularHom_apply {A : Rep k G} (x : A) :
    (leftRegularHom A x).hom (Finsupp.single 1 1) = x := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f : X ⟶ Y
A : Rep k G
x : CoeSort.coe A
⊢ ((leftRegularHom A x).hom fun₀ | 1 => 1) = x

Next tactic:
erw [leftRegularHom_hom, Finsupp.lift_apply, Finsupp.sum_single_index, one_smul,
    A.ρ.map_one, LinearMap.one_apply]
theorem leftRegularHom_apply {A : Rep k G} (x : A) :
    (leftRegularHom A x).hom (Finsupp.single 1 1) = x := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [leftRegularHom_hom, Finsupp.lift_apply, Finsupp.sum_single_index, one_smul,
    A.ρ.map_one, LinearMap.one_apply]
  · 

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f : X ⟶ Y
A : Rep k G
x : CoeSort.coe A
⊢ 0 • ((ρ A) 1) x = 0

Next tactic:
rw [zero_smul]
/-- Given a `k`-linear `G`-representation `A`, there is a `k`-linear isomorphism between
representation morphisms `Hom(k[G], A)` and `A`. -/
@[simps]
noncomputable def leftRegularHomEquiv (A : Rep k G) : (Rep.ofMulAction k G G ⟶ A) ≃ₗ[k] A where
  toFun f := f.hom (Finsupp.single 1 1)
  map_add' x y := rfl
  map_smul' r x := rfl
  invFun x := leftRegularHom A x
  left_inv f := by
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f✝ : X ⟶ Y
A : Rep k G
f : ofMulAction k G G ⟶ A
⊢ (fun x => leftRegularHom A x)
      (AddHom.toFun
        {
            toAddHom :=
              { toFun := fun f => f.hom fun₀ | 1 => 1,
                map_add' :=
                  (_ :
                    ∀ (x y : ofMulAction k G G ⟶ A),
                      (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) },
            map_smul' :=
              (_ :
                ∀ (r : k) (x : ofMulAction k G G ⟶ A),
                  AddHom.toFun
                      { toFun := fun f => f.hom fun₀ | 1 => 1,
                        map_add' :=
                          (_ :
                            ∀ (x y : ofMulAction k G G ⟶ A),
                              (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) }
                      (r • x) =
                    AddHom.toFun
                      { toFun := fun f => f.hom fun₀ | 1 => 1,
                        map_add' :=
                          (_ :
                            ∀ (x y : ofMulAction k G G ⟶ A),
                              (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) }
                      (r • x)) }.toAddHom
        f) =
    f

Next tactic:
refine' Action.Hom.ext _ _ (Finsupp.lhom_ext' fun x : G => LinearMap.ext_ring _)
/-- Given a `k`-linear `G`-representation `A`, there is a `k`-linear isomorphism between
representation morphisms `Hom(k[G], A)` and `A`. -/
@[simps]
noncomputable def leftRegularHomEquiv (A : Rep k G) : (Rep.ofMulAction k G G ⟶ A) ≃ₗ[k] A where
  toFun f := f.hom (Finsupp.single 1 1)
  map_add' x y := rfl
  map_smul' r x := rfl
  invFun x := leftRegularHom A x
  left_inv f := by
    refine' Action.Hom.ext _ _ (Finsupp.lhom_ext' fun x : G => LinearMap.ext_ring _)
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f✝ : X ⟶ Y
A : Rep k G
f : ofMulAction k G G ⟶ A
x : G
⊢ (((fun x => leftRegularHom A x)
            (AddHom.toFun
              {
                  toAddHom :=
                    { toFun := fun f => f.hom fun₀ | 1 => 1,
                      map_add' :=
                        (_ :
                          ∀ (x y : ofMulAction k G G ⟶ A),
                            (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) },
                  map_smul' :=
                    (_ :
                      ∀ (r : k) (x : ofMulAction k G G ⟶ A),
                        AddHom.toFun
                            { toFun := fun f => f.hom fun₀ | 1 => 1,
                              map_add' :=
                                (_ :
                                  ∀ (x y : ofMulAction k G G ⟶ A),
                                    (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) }
                            (r • x) =
                          AddHom.toFun
                            { toFun := fun f => f.hom fun₀ | 1 => 1,
                              map_add' :=
                                (_ :
                                  ∀ (x y : ofMulAction k G G ⟶ A),
                                    (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) }
                            (r • x)) }.toAddHom
              f)).hom ∘ₗ
        Finsupp.lsingle x)
      1 =
    (f.hom ∘ₗ Finsupp.lsingle x) 1

Next tactic:
have :
      f.hom ((ofMulAction k G G).ρ x (Finsupp.single (1 : G) (1 : k))) =
        A.ρ x (f.hom (Finsupp.single (1 : G) (1 : k))) :=
      LinearMap.ext_iff.1 (f.comm x) (Finsupp.single 1 1)
/-- Given a `k`-linear `G`-representation `A`, there is a `k`-linear isomorphism between
representation morphisms `Hom(k[G], A)` and `A`. -/
@[simps]
noncomputable def leftRegularHomEquiv (A : Rep k G) : (Rep.ofMulAction k G G ⟶ A) ≃ₗ[k] A where
  toFun f := f.hom (Finsupp.single 1 1)
  map_add' x y := rfl
  map_smul' r x := rfl
  invFun x := leftRegularHom A x
  left_inv f := by
    refine' Action.Hom.ext _ _ (Finsupp.lhom_ext' fun x : G => LinearMap.ext_ring _)
    have :
      f.hom ((ofMulAction k G G).ρ x (Finsupp.single (1 : G) (1 : k))) =
        A.ρ x (f.hom (Finsupp.single (1 : G) (1 : k))) :=
      LinearMap.ext_iff.1 (f.comm x) (Finsupp.single 1 1)
/- Porting note: rest of broken proof was
    simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, left_regular_hom_hom,
      Finsupp.lift_apply, Finsupp.sum_single_index, one_smul, ← this, zero_smul, of_ρ_apply,
      Representation.ofMulAction_single x (1 : G) (1 : k), smul_eq_mul, mul_one] -/
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f✝ : X ⟶ Y
A : Rep k G
f : ofMulAction k G G ⟶ A
x : G
this : f.hom (((ρ (ofMulAction k G G)) x) fun₀ | 1 => 1) = ((ρ A) x) (f.hom fun₀ | 1 => 1)
⊢ (((fun x => leftRegularHom A x)
            (AddHom.toFun
              {
                  toAddHom :=
                    { toFun := fun f => f.hom fun₀ | 1 => 1,
                      map_add' :=
                        (_ :
                          ∀ (x y : ofMulAction k G G ⟶ A),
                            (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) },
                  map_smul' :=
                    (_ :
                      ∀ (r : k) (x : ofMulAction k G G ⟶ A),
                        AddHom.toFun
                            { toFun := fun f => f.hom fun₀ | 1 => 1,
                              map_add' :=
                                (_ :
                                  ∀ (x y : ofMulAction k G G ⟶ A),
                                    (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) }
                            (r • x) =
                          AddHom.toFun
                            { toFun := fun f => f.hom fun₀ | 1 => 1,
                              map_add' :=
                                (_ :
                                  ∀ (x y : ofMulAction k G G ⟶ A),
                                    (fun f => f.hom fun₀ | 1 => 1) (x + y) = (fun f => f.hom fun₀ | 1 => 1) (x + y)) }
                            (r • x)) }.toAddHom
              f)).hom ∘ₗ
        Finsupp.lsingle x)
      1 =
    (f.hom ∘ₗ Finsupp.lsingle x) 1

Next tactic:
simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, leftRegularHom_hom]
/-- Given a `k`-linear `G`-representation `A`, there is a `k`-linear isomorphism between
representation morphisms `Hom(k[G], A)` and `A`. -/
@[simps]
noncomputable def leftRegularHomEquiv (A : Rep k G) : (Rep.ofMulAction k G G ⟶ A) ≃ₗ[k] A where
  toFun f := f.hom (Finsupp.single 1 1)
  map_add' x y := rfl
  map_smul' r x := rfl
  invFun x := leftRegularHom A x
  left_inv f := by
    refine' Action.Hom.ext _ _ (Finsupp.lhom_ext' fun x : G => LinearMap.ext_ring _)
    have :
      f.hom ((ofMulAction k G G).ρ x (Finsupp.single (1 : G) (1 : k))) =
        A.ρ x (f.hom (Finsupp.single (1 : G) (1 : k))) :=
      LinearMap.ext_iff.1 (f.comm x) (Finsupp.single 1 1)
/- Porting note: rest of broken proof was
    simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, left_regular_hom_hom,
      Finsupp.lift_apply, Finsupp.sum_single_index, one_smul, ← this, zero_smul, of_ρ_apply,
      Representation.ofMulAction_single x (1 : G) (1 : k), smul_eq_mul, mul_one] -/
    simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, leftRegularHom_hom]
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f✝ : X ⟶ Y
A : Rep k G
f : ofMulAction k G G ⟶ A
x : G
this : f.hom (((ρ (ofMulAction k G G)) x) fun₀ | 1 => 1) = ((ρ A) x) (f.hom fun₀ | 1 => 1)
⊢ (((Finsupp.lift (↑A.V) k G) fun g => ((ρ A) g) (f.hom fun₀ | 1 => 1)) fun₀ | x => 1) = f.hom fun₀ | x => 1

Next tactic:
erw [Finsupp.lift_apply]
/-- Given a `k`-linear `G`-representation `A`, there is a `k`-linear isomorphism between
representation morphisms `Hom(k[G], A)` and `A`. -/
@[simps]
noncomputable def leftRegularHomEquiv (A : Rep k G) : (Rep.ofMulAction k G G ⟶ A) ≃ₗ[k] A where
  toFun f := f.hom (Finsupp.single 1 1)
  map_add' x y := rfl
  map_smul' r x := rfl
  invFun x := leftRegularHom A x
  left_inv f := by
    refine' Action.Hom.ext _ _ (Finsupp.lhom_ext' fun x : G => LinearMap.ext_ring _)
    have :
      f.hom ((ofMulAction k G G).ρ x (Finsupp.single (1 : G) (1 : k))) =
        A.ρ x (f.hom (Finsupp.single (1 : G) (1 : k))) :=
      LinearMap.ext_iff.1 (f.comm x) (Finsupp.single 1 1)
/- Porting note: rest of broken proof was
    simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, left_regular_hom_hom,
      Finsupp.lift_apply, Finsupp.sum_single_index, one_smul, ← this, zero_smul, of_ρ_apply,
      Representation.ofMulAction_single x (1 : G) (1 : k), smul_eq_mul, mul_one] -/
    simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, leftRegularHom_hom]
    erw [Finsupp.lift_apply]
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f✝ : X ⟶ Y
A : Rep k G
f : ofMulAction k G G ⟶ A
x : G
this : f.hom (((ρ (ofMulAction k G G)) x) fun₀ | 1 => 1) = ((ρ A) x) (f.hom fun₀ | 1 => 1)
⊢ (Finsupp.sum (fun₀ | x => 1) fun x r => r • ((ρ A) x) (f.hom fun₀ | 1 => 1)) = f.hom fun₀ | x => 1

Next tactic:
rw [Finsupp.sum_single_index, ← this, of_ρ_apply]
/-- Given a `k`-linear `G`-representation `A`, there is a `k`-linear isomorphism between
representation morphisms `Hom(k[G], A)` and `A`. -/
@[simps]
noncomputable def leftRegularHomEquiv (A : Rep k G) : (Rep.ofMulAction k G G ⟶ A) ≃ₗ[k] A where
  toFun f := f.hom (Finsupp.single 1 1)
  map_add' x y := rfl
  map_smul' r x := rfl
  invFun x := leftRegularHom A x
  left_inv f := by
    refine' Action.Hom.ext _ _ (Finsupp.lhom_ext' fun x : G => LinearMap.ext_ring _)
    have :
      f.hom ((ofMulAction k G G).ρ x (Finsupp.single (1 : G) (1 : k))) =
        A.ρ x (f.hom (Finsupp.single (1 : G) (1 : k))) :=
      LinearMap.ext_iff.1 (f.comm x) (Finsupp.single 1 1)
/- Porting note: rest of broken proof was
    simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, left_regular_hom_hom,
      Finsupp.lift_apply, Finsupp.sum_single_index, one_smul, ← this, zero_smul, of_ρ_apply,
      Representation.ofMulAction_single x (1 : G) (1 : k), smul_eq_mul, mul_one] -/
    simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, leftRegularHom_hom]
    erw [Finsupp.lift_apply]
    rw [Finsupp.sum_single_index, ← this, of_ρ_apply]
    

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f✝ : X ⟶ Y
A : Rep k G
f : ofMulAction k G G ⟶ A
x : G
this : f.hom (((ρ (ofMulAction k G G)) x) fun₀ | 1 => 1) = ((ρ A) x) (f.hom fun₀ | 1 => 1)
⊢ 1 • f.hom (((Representation.ofMulAction k G G) x) fun₀ | 1 => 1) = f.hom fun₀ | x => 1
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
X Y : Action (Type u) (MonCat.of G)
f✝ : X ⟶ Y
A : Rep k G
f : ofMulAction k G G ⟶ A
x : G
this : f.hom (((ρ (ofMulAction k G G)) x) fun₀ | 1 => 1) = ((ρ A) x) (f.hom fun₀ | 1 => 1)
⊢ 0 • ((ρ A) x) (f.hom fun₀ | 1 => 1) = 0

Next tactic:
erw [Representation.ofMulAction_single x (1 : G) (1 : k)]