l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem ofModule_asAlgebraHom_apply_apply (r : MonoidAlgebra k G)
    (m : RestrictScalars k (MonoidAlgebra k G) M) :
    ((ofModule M).asAlgebraHom r) m =
      (RestrictScalars.addEquiv _ _ _).symm (r • RestrictScalars.addEquiv _ _ _ m) := by
  apply MonoidAlgebra.induction_on r
  · intro g
    simp only [one_smul, MonoidAlgebra.lift_symm_apply, MonoidAlgebra.of_apply,
      Representation.asAlgebraHom_single, Representation.ofModule, AddEquiv.apply_eq_iff_eq,
      RestrictScalars.lsmul_apply_apply]
  · intro f g fw gw
    

Proof state:
case hadd
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type u_4
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
r : MonoidAlgebra k G
m : RestrictScalars k (MonoidAlgebra k G) M
f g : MonoidAlgebra k G
fw :
  ((asAlgebraHom (ofModule M)) f) m =
    (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) M))
      (f • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) m)
gw :
  ((asAlgebraHom (ofModule M)) g) m =
    (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) M))
      (g • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) m)
⊢ ((asAlgebraHom (ofModule M)) (f + g)) m =
    (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) M))
      ((f + g) • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) m)

Next tactic:
simp only [fw, gw, map_add, add_smul, LinearMap.add_apply]
@[simp]
theorem ofModule_asAlgebraHom_apply_apply (r : MonoidAlgebra k G)
    (m : RestrictScalars k (MonoidAlgebra k G) M) :
    ((ofModule M).asAlgebraHom r) m =
      (RestrictScalars.addEquiv _ _ _).symm (r • RestrictScalars.addEquiv _ _ _ m) := by
  apply MonoidAlgebra.induction_on r
  · intro g
    simp only [one_smul, MonoidAlgebra.lift_symm_apply, MonoidAlgebra.of_apply,
      Representation.asAlgebraHom_single, Representation.ofModule, AddEquiv.apply_eq_iff_eq,
      RestrictScalars.lsmul_apply_apply]
  · intro f g fw gw
    simp only [fw, gw, map_add, add_smul, LinearMap.add_apply]
  · 

Proof state:
case hsmul
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type u_4
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
r : MonoidAlgebra k G
m : RestrictScalars k (MonoidAlgebra k G) M
⊢ ∀ (r : k) (f : MonoidAlgebra k G),
    ((asAlgebraHom (ofModule M)) f) m =
        (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) M))
          (f • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) m) →
      ((asAlgebraHom (ofModule M)) (r • f)) m =
        (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) M))
          ((r • f) • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) m)

Next tactic:
intro r f w
@[simp]
theorem ofModule_asAlgebraHom_apply_apply (r : MonoidAlgebra k G)
    (m : RestrictScalars k (MonoidAlgebra k G) M) :
    ((ofModule M).asAlgebraHom r) m =
      (RestrictScalars.addEquiv _ _ _).symm (r • RestrictScalars.addEquiv _ _ _ m) := by
  apply MonoidAlgebra.induction_on r
  · intro g
    simp only [one_smul, MonoidAlgebra.lift_symm_apply, MonoidAlgebra.of_apply,
      Representation.asAlgebraHom_single, Representation.ofModule, AddEquiv.apply_eq_iff_eq,
      RestrictScalars.lsmul_apply_apply]
  · intro f g fw gw
    simp only [fw, gw, map_add, add_smul, LinearMap.add_apply]
  · intro r f w
    

Proof state:
case hsmul
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type u_4
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
r✝ : MonoidAlgebra k G
m : RestrictScalars k (MonoidAlgebra k G) M
r : k
f : MonoidAlgebra k G
w :
  ((asAlgebraHom (ofModule M)) f) m =
    (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) M))
      (f • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) m)
⊢ ((asAlgebraHom (ofModule M)) (r • f)) m =
    (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) M))
      ((r • f) • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) m)

Next tactic:
simp only [w, AlgHom.map_smul, LinearMap.smul_apply,
      RestrictScalars.addEquiv_symm_map_smul_smul]
@[simp]
theorem ofModule_asModule_act (g : G) (x : RestrictScalars k (MonoidAlgebra k G) ρ.asModule) :
    ofModule (k := k) (G := G) ρ.asModule g x = -- Porting note: more help with implicit
      (RestrictScalars.addEquiv _ _ _).symm
        (ρ.asModuleEquiv.symm (ρ g (ρ.asModuleEquiv (RestrictScalars.addEquiv _ _ _ x)))) := by
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type u_4
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
g : G
x : RestrictScalars k (MonoidAlgebra k G) (asModule ρ)
⊢ ((ofModule (asModule ρ)) g) x =
    (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)))
      ((AddEquiv.symm (asModuleEquiv ρ))
        ((ρ g) ((asModuleEquiv ρ) ((RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x))))

Next tactic:
apply_fun RestrictScalars.addEquiv _ _ ρ.asModule using
    (RestrictScalars.addEquiv _ _ ρ.asModule).injective
@[simp]
theorem ofModule_asModule_act (g : G) (x : RestrictScalars k (MonoidAlgebra k G) ρ.asModule) :
    ofModule (k := k) (G := G) ρ.asModule g x = -- Porting note: more help with implicit
      (RestrictScalars.addEquiv _ _ _).symm
        (ρ.asModuleEquiv.symm (ρ g (ρ.asModuleEquiv (RestrictScalars.addEquiv _ _ _ x)))) := by
  apply_fun RestrictScalars.addEquiv _ _ ρ.asModule using
    (RestrictScalars.addEquiv _ _ ρ.asModule).injective
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type u_4
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
g : G
x : RestrictScalars k (MonoidAlgebra k G) (asModule ρ)
⊢ (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) (((ofModule (asModule ρ)) g) x) =
    (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ))
      ((AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)))
        ((AddEquiv.symm (asModuleEquiv ρ))
          ((ρ g) ((asModuleEquiv ρ) ((RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x)))))

Next tactic:
dsimp [ofModule, RestrictScalars.lsmul_apply_apply]
@[simp]
theorem ofModule_asModule_act (g : G) (x : RestrictScalars k (MonoidAlgebra k G) ρ.asModule) :
    ofModule (k := k) (G := G) ρ.asModule g x = -- Porting note: more help with implicit
      (RestrictScalars.addEquiv _ _ _).symm
        (ρ.asModuleEquiv.symm (ρ g (ρ.asModuleEquiv (RestrictScalars.addEquiv _ _ _ x)))) := by
  apply_fun RestrictScalars.addEquiv _ _ ρ.asModule using
    (RestrictScalars.addEquiv _ _ ρ.asModule).injective
  dsimp [ofModule, RestrictScalars.lsmul_apply_apply]
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type u_4
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
g : G
x : RestrictScalars k (MonoidAlgebra k G) (asModule ρ)
⊢ (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ))
      ((AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)))
        (MonoidAlgebra.single g 1 • (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x)) =
    (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ))
      ((AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)))
        ((AddEquiv.symm (asModuleEquiv ρ))
          ((ρ g) ((asModuleEquiv ρ) ((RestrictScalars.addEquiv k (MonoidAlgebra k G) (asModule ρ)) x)))))

Next tactic:
simp
theorem smul_ofModule_asModule (r : MonoidAlgebra k G) (m : (ofModule M).asModule) :
    (RestrictScalars.addEquiv k _ _) ((ofModule M).asModuleEquiv (r • m)) =
      r • (RestrictScalars.addEquiv k _ _) ((ofModule M).asModuleEquiv (G := G) m) := by
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type u_4
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
r : MonoidAlgebra k G
m : asModule (ofModule M)
⊢ (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) ((asModuleEquiv (ofModule M)) (r • m)) =
    r • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) ((asModuleEquiv (ofModule M)) m)

Next tactic:
dsimp
theorem smul_ofModule_asModule (r : MonoidAlgebra k G) (m : (ofModule M).asModule) :
    (RestrictScalars.addEquiv k _ _) ((ofModule M).asModuleEquiv (r • m)) =
      r • (RestrictScalars.addEquiv k _ _) ((ofModule M).asModuleEquiv (G := G) m) := by
  dsimp
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
ρ : Representation k G V
M : Type u_4
inst✝¹ : AddCommMonoid M
inst✝ : Module (MonoidAlgebra k G) M
r : MonoidAlgebra k G
m : asModule (ofModule M)
⊢ (RestrictScalars.addEquiv k (MonoidAlgebra k G) M)
      (((asAlgebraHom (ofModule M)) r) ((asModuleEquiv (ofModule M)) m)) =
    r • (RestrictScalars.addEquiv k (MonoidAlgebra k G) M) ((asModuleEquiv (ofModule M)) m)

Next tactic:
simp only [AddEquiv.apply_symm_apply, ofModule_asAlgebraHom_apply_apply]
/-- A `G`-action on `H` induces a representation `G →* End(k[H])` in the natural way. -/
noncomputable def ofMulAction : Representation k G (H →₀ k) where
  toFun g := Finsupp.lmapDomain k k (g • ·)
  map_one' := by
    

Proof state:
k : Type u_1
inst✝² : CommSemiring k
G : Type u_2
inst✝¹ : Monoid G
H : Type u_3
inst✝ : MulAction G H
⊢ (fun g => Finsupp.lmapDomain k k fun x => g • x) 1 = 1

Next tactic:
ext x y
/-- A `G`-action on `H` induces a representation `G →* End(k[H])` in the natural way. -/
noncomputable def ofMulAction : Representation k G (H →₀ k) where
  toFun g := Finsupp.lmapDomain k k (g • ·)
  map_one' := by
    ext x y
    

Proof state:
case h.h.h
k : Type u_1
inst✝² : CommSemiring k
G : Type u_2
inst✝¹ : Monoid G
H : Type u_3
inst✝ : MulAction G H
x y : H
⊢ (((fun g => Finsupp.lmapDomain k k fun x => g • x) 1 ∘ₗ Finsupp.lsingle x) 1) y = ((1 ∘ₗ Finsupp.lsingle x) 1) y

Next tactic:
dsimp
/-- A `G`-action on `H` induces a representation `G →* End(k[H])` in the natural way. -/
noncomputable def ofMulAction : Representation k G (H →₀ k) where
  toFun g := Finsupp.lmapDomain k k (g • ·)
  map_one' := by
    ext x y
    dsimp
    

Proof state:
case h.h.h
k : Type u_1
inst✝² : CommSemiring k
G : Type u_2
inst✝¹ : Monoid G
H : Type u_3
inst✝ : MulAction G H
x y : H
⊢ (Finsupp.mapDomain (fun x => 1 • x) fun₀ | x => 1) y = (fun₀ | x => 1) y

Next tactic:
simp
/-- A `G`-action on `H` induces a representation `G →* End(k[H])` in the natural way. -/
noncomputable def ofMulAction : Representation k G (H →₀ k) where
  toFun g := Finsupp.lmapDomain k k (g • ·)
  map_one' := by
    ext x y
    dsimp
    simp
  map_mul' x y := by
    

Proof state:
k : Type u_1
inst✝² : CommSemiring k
G : Type u_2
inst✝¹ : Monoid G
H : Type u_3
inst✝ : MulAction G H
x y : G
⊢ OneHom.toFun
      { toFun := fun g => Finsupp.lmapDomain k k fun x => g • x,
        map_one' := (_ : (fun g => Finsupp.lmapDomain k k fun x => g • x) 1 = 1) }
      (x * y) =
    OneHom.toFun
        { toFun := fun g => Finsupp.lmapDomain k k fun x => g • x,
          map_one' := (_ : (fun g => Finsupp.lmapDomain k k fun x => g • x) 1 = 1) }
        x *
      OneHom.toFun
        { toFun := fun g => Finsupp.lmapDomain k k fun x => g • x,
          map_one' := (_ : (fun g => Finsupp.lmapDomain k k fun x => g • x) 1 = 1) }
        y

Next tactic:
ext z w
/-- A `G`-action on `H` induces a representation `G →* End(k[H])` in the natural way. -/
noncomputable def ofMulAction : Representation k G (H →₀ k) where
  toFun g := Finsupp.lmapDomain k k (g • ·)
  map_one' := by
    ext x y
    dsimp
    simp
  map_mul' x y := by
    ext z w
    

Proof state:
case h.h.h
k : Type u_1
inst✝² : CommSemiring k
G : Type u_2
inst✝¹ : Monoid G
H : Type u_3
inst✝ : MulAction G H
x y : G
z w : H
⊢ ((OneHom.toFun
            { toFun := fun g => Finsupp.lmapDomain k k fun x => g • x,
              map_one' := (_ : (fun g => Finsupp.lmapDomain k k fun x => g • x) 1 = 1) }
            (x * y) ∘ₗ
          Finsupp.lsingle z)
        1)
      w =
    (((OneHom.toFun
              { toFun := fun g => Finsupp.lmapDomain k k fun x => g • x,
                map_one' := (_ : (fun g => Finsupp.lmapDomain k k fun x => g • x) 1 = 1) }
              x *
            OneHom.toFun
              { toFun := fun g => Finsupp.lmapDomain k k fun x => g • x,
                map_one' := (_ : (fun g => Finsupp.lmapDomain k k fun x => g • x) 1 = 1) }
              y) ∘ₗ
          Finsupp.lsingle z)
        1)
      w

Next tactic:
simp [mul_smul]
/-- Turns a `k`-module `A` with a compatible `DistribMulAction` of a monoid `G` into a
`k`-linear `G`-representation on `A`. -/
def ofDistribMulAction : Representation k G A where
  toFun := fun m =>
    { DistribMulAction.toAddMonoidEnd G A m with
      map_smul' := smul_comm _ }
  map_one' := by 

Proof state:
k : Type u_1
G : Type u_2
A : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommGroup A
inst✝² : Module k A
inst✝¹ : DistribMulAction G A
inst✝ : SMulCommClass G k A
⊢ (fun m =>
        let src := (DistribMulAction.toAddMonoidEnd G A) m;
        {
          toAddHom :=
            { toFun := src.toFun,
              map_add' :=
                (_ : ∀ (x y : A), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },
          map_smul' := (_ : ∀ (n : k) (a : A), m • n • a = n • m • a) })
      1 =
    1

Next tactic:
ext
/-- Turns a `k`-module `A` with a compatible `DistribMulAction` of a monoid `G` into a
`k`-linear `G`-representation on `A`. -/
def ofDistribMulAction : Representation k G A where
  toFun := fun m =>
    { DistribMulAction.toAddMonoidEnd G A m with
      map_smul' := smul_comm _ }
  map_one' := by ext; 

Proof state:
case h
k : Type u_1
G : Type u_2
A : Type u_3
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommGroup A
inst✝² : Module k A
inst✝¹ : DistribMulAction G A
inst✝ : SMulCommClass G k A
x✝ : A
⊢ ((fun m =>
          let src := (DistribMulAction.toAddMonoidEnd G A) m;
          {
            toAddHom :=
              { toFun := src.toFun,
                map_add' :=
                  (_ : ∀ (x y : A), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) },
            map_smul' := (_ : ∀ (n : k) (a : A), m • n • a = n • m • a) })
        1)
      x✝ =
    1 x✝

Next tactic:
exact one_smul _ _
@[simp]
theorem ofMulAction_apply {H : Type*} [MulAction G H] (g : G) (f : H →₀ k) (h : H) :
    ofMulAction k G H g f h = f (g⁻¹ • h) := by
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_4
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
⊢ (((ofMulAction k G H) g) f) h = f (g⁻¹ • h)

Next tactic:
conv_lhs => rw [← smul_inv_smul g h]
@[simp]
theorem ofMulAction_apply {H : Type*} [MulAction G H] (g : G) (f : H →₀ k) (h : H) :
    ofMulAction k G H g f h = f (g⁻¹ • h) := by
  conv_lhs => 

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_4
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
| (((ofMulAction k G H) g) f) h

Next tactic:
rw [← smul_inv_smul g h]
@[simp]
theorem ofMulAction_apply {H : Type*} [MulAction G H] (g : G) (f : H →₀ k) (h : H) :
    ofMulAction k G H g f h = f (g⁻¹ • h) := by
  conv_lhs => rw [← smul_inv_smul g h]
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_4
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
⊢ (((ofMulAction k G H) g) f) (g • g⁻¹ • h) = f (g⁻¹ • h)

Next tactic:
let h' := g⁻¹ • h
@[simp]
theorem ofMulAction_apply {H : Type*} [MulAction G H] (g : G) (f : H →₀ k) (h : H) :
    ofMulAction k G H g f h = f (g⁻¹ • h) := by
  conv_lhs => rw [← smul_inv_smul g h]
  let h' := g⁻¹ • h
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_4
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
⊢ (((ofMulAction k G H) g) f) (g • g⁻¹ • h) = f (g⁻¹ • h)

Next tactic:
change ofMulAction k G H g f (g • h') = f h'
@[simp]
theorem ofMulAction_apply {H : Type*} [MulAction G H] (g : G) (f : H →₀ k) (h : H) :
    ofMulAction k G H g f h = f (g⁻¹ • h) := by
  conv_lhs => rw [← smul_inv_smul g h]
  let h' := g⁻¹ • h
  change ofMulAction k G H g f (g • h') = f h'
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_4
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
⊢ (((ofMulAction k G H) g) f) (g • h') = f h'

Next tactic:
have hg : Function.Injective (g • · : H → H) := by
    intro h₁ h₂
    simp
@[simp]
theorem ofMulAction_apply {H : Type*} [MulAction G H] (g : G) (f : H →₀ k) (h : H) :
    ofMulAction k G H g f h = f (g⁻¹ • h) := by
  conv_lhs => rw [← smul_inv_smul g h]
  let h' := g⁻¹ • h
  change ofMulAction k G H g f (g • h') = f h'
  have hg : Function.Injective (g • · : H → H) := by
    

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_4
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
⊢ Function.Injective fun x => g • x

Next tactic:
intro h₁ h₂
@[simp]
theorem ofMulAction_apply {H : Type*} [MulAction G H] (g : G) (f : H →₀ k) (h : H) :
    ofMulAction k G H g f h = f (g⁻¹ • h) := by
  conv_lhs => rw [← smul_inv_smul g h]
  let h' := g⁻¹ • h
  change ofMulAction k G H g f (g • h') = f h'
  have hg : Function.Injective (g • · : H → H) := by
    intro h₁ h₂
    

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_4
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
h₁ h₂ : H
⊢ (fun x => g • x) h₁ = (fun x => g • x) h₂ → h₁ = h₂

Next tactic:
simp
@[simp]
theorem ofMulAction_apply {H : Type*} [MulAction G H] (g : G) (f : H →₀ k) (h : H) :
    ofMulAction k G H g f h = f (g⁻¹ • h) := by
  conv_lhs => rw [← smul_inv_smul g h]
  let h' := g⁻¹ • h
  change ofMulAction k G H g f (g • h') = f h'
  have hg : Function.Injective (g • · : H → H) := by
    intro h₁ h₂
    simp
  

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝⁴ : CommSemiring k
inst✝³ : Group G
inst✝² : AddCommMonoid V
inst✝¹ : Module k V
ρ : Representation k G V
H : Type u_4
inst✝ : MulAction G H
g : G
f : H →₀ k
h : H
h' : H := g⁻¹ • h
hg : Function.Injective fun x => g • x
⊢ (((ofMulAction k G H) g) f) (g • h') = f h'

Next tactic:
simp only [ofMulAction_def, Finsupp.lmapDomain_apply, Finsupp.mapDomain_apply, hg]
theorem ofMulAction_self_smul_eq_mul (x : MonoidAlgebra k G) (y : (ofMulAction k G G).asModule) :
    x • y = (x * y : MonoidAlgebra k G) := -- by
  -- Porting note: trouble figuring out the motive
  x.induction_on (p := fun z => z • y = z * y)
    (fun g => by
      

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝³ : CommSemiring k
inst✝² : Group G
inst✝¹ : AddCommMonoid V
inst✝ : Module k V
ρ : Representation k G V
x : MonoidAlgebra k G
y : asModule (ofMulAction k G G)
g : G
⊢ (fun z => z • y = z * y) ((of k G) g)

Next tactic:
show asAlgebraHom (ofMulAction k G G) _ _ = _
theorem ofMulAction_self_smul_eq_mul (x : MonoidAlgebra k G) (y : (ofMulAction k G G).asModule) :
    x • y = (x * y : MonoidAlgebra k G) := -- by
  -- Porting note: trouble figuring out the motive
  x.induction_on (p := fun z => z • y = z * y)
    (fun g => by
      show asAlgebraHom (ofMulAction k G G) _ _ = _; 

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝³ : CommSemiring k
inst✝² : Group G
inst✝¹ : AddCommMonoid V
inst✝ : Module k V
ρ : Representation k G V
x : MonoidAlgebra k G
y : asModule (ofMulAction k G G)
g : G
⊢ ((asAlgebraHom (ofMulAction k G G)) ((of k G) g)) y = (of k G) g * y

Next tactic:
ext
theorem ofMulAction_self_smul_eq_mul (x : MonoidAlgebra k G) (y : (ofMulAction k G G).asModule) :
    x • y = (x * y : MonoidAlgebra k G) := -- by
  -- Porting note: trouble figuring out the motive
  x.induction_on (p := fun z => z • y = z * y)
    (fun g => by
      show asAlgebraHom (ofMulAction k G G) _ _ = _; ext;
      

Proof state:
case h
k : Type u_1
G : Type u_2
V : Type u_3
inst✝³ : CommSemiring k
inst✝² : Group G
inst✝¹ : AddCommMonoid V
inst✝ : Module k V
ρ : Representation k G V
x : MonoidAlgebra k G
y : asModule (ofMulAction k G G)
g a✝ : G
⊢ (((asAlgebraHom (ofMulAction k G G)) ((of k G) g)) y) a✝ = ((of k G) g * y) a✝

Next tactic:
simp only [MonoidAlgebra.of_apply, asAlgebraHom_single, one_smul,
        ofMulAction_apply, smul_eq_mul]
theorem ofMulAction_self_smul_eq_mul (x : MonoidAlgebra k G) (y : (ofMulAction k G G).asModule) :
    x • y = (x * y : MonoidAlgebra k G) := -- by
  -- Porting note: trouble figuring out the motive
  x.induction_on (p := fun z => z • y = z * y)
    (fun g => by
      show asAlgebraHom (ofMulAction k G G) _ _ = _; ext;
      simp only [MonoidAlgebra.of_apply, asAlgebraHom_single, one_smul,
        ofMulAction_apply, smul_eq_mul]
      -- Porting note : single_mul_apply not firing in simp
      

Proof state:
case h
k : Type u_1
G : Type u_2
V : Type u_3
inst✝³ : CommSemiring k
inst✝² : Group G
inst✝¹ : AddCommMonoid V
inst✝ : Module k V
ρ : Representation k G V
x : MonoidAlgebra k G
y : asModule (ofMulAction k G G)
g a✝ : G
⊢ y (g⁻¹ * a✝) = (MonoidAlgebra.single g 1 * y) a✝

Next tactic:
rw [MonoidAlgebra.single_mul_apply, one_mul]
theorem ofMulAction_self_smul_eq_mul (x : MonoidAlgebra k G) (y : (ofMulAction k G G).asModule) :
    x • y = (x * y : MonoidAlgebra k G) := -- by
  -- Porting note: trouble figuring out the motive
  x.induction_on (p := fun z => z • y = z * y)
    (fun g => by
      show asAlgebraHom (ofMulAction k G G) _ _ = _; ext;
      simp only [MonoidAlgebra.of_apply, asAlgebraHom_single, one_smul,
        ofMulAction_apply, smul_eq_mul]
      -- Porting note : single_mul_apply not firing in simp
      rw [MonoidAlgebra.single_mul_apply, one_mul]
    )
    (fun x y hx hy => by 

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝³ : CommSemiring k
inst✝² : Group G
inst✝¹ : AddCommMonoid V
inst✝ : Module k V
ρ : Representation k G V
x✝ : MonoidAlgebra k G
y✝ : asModule (ofMulAction k G G)
x y : MonoidAlgebra k G
hx : (fun z => z • y✝ = z * y✝) x
hy : (fun z => z • y✝ = z * y✝) y
⊢ (fun z => z • y✝ = z * y✝) (x + y)

Next tactic:
simp only [hx, hy, add_mul, add_smul]
theorem ofMulAction_self_smul_eq_mul (x : MonoidAlgebra k G) (y : (ofMulAction k G G).asModule) :
    x • y = (x * y : MonoidAlgebra k G) := -- by
  -- Porting note: trouble figuring out the motive
  x.induction_on (p := fun z => z • y = z * y)
    (fun g => by
      show asAlgebraHom (ofMulAction k G G) _ _ = _; ext;
      simp only [MonoidAlgebra.of_apply, asAlgebraHom_single, one_smul,
        ofMulAction_apply, smul_eq_mul]
      -- Porting note : single_mul_apply not firing in simp
      rw [MonoidAlgebra.single_mul_apply, one_mul]
    )
    (fun x y hx hy => by simp only [hx, hy, add_mul, add_smul]) fun r x hx => by
    

Proof state:
k : Type u_1
G : Type u_2
V : Type u_3
inst✝³ : CommSemiring k
inst✝² : Group G
inst✝¹ : AddCommMonoid V
inst✝ : Module k V
ρ : Representation k G V
x✝ : MonoidAlgebra k G
y : asModule (ofMulAction k G G)
r : k
x : MonoidAlgebra k G
hx : (fun z => z • y = z * y) x
⊢ (fun z => z • y = z * y) (r • x)

Next tactic:
show asAlgebraHom (ofMulAction k G G) _ _ = _