Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: port Algebra.Ring.AddAut #1284

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ import Mathlib.Algebra.Quotient
import Mathlib.Algebra.Regular.Basic
import Mathlib.Algebra.Regular.Pow
import Mathlib.Algebra.Regular.SMul
import Mathlib.Algebra.Ring.AddAut
import Mathlib.Algebra.Ring.Aut
import Mathlib.Algebra.Ring.Basic
import Mathlib.Algebra.Ring.Commute
Expand Down
50 changes: 50 additions & 0 deletions Mathlib/Algebra/Ring/AddAut.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/-
Copyright (c) 2022 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov

! This file was ported from Lean 3 source module algebra.ring.add_aut
! leanprover-community/mathlib commit a437a2499163d85d670479f69f625f461cc5fef9
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.GroupTheory.GroupAction.Group
import Mathlib.Algebra.Module.Basic

/-!
# Multiplication on the left/right as additive automorphisms

In this file we define `AddAut.mulLeft` and `AddAut.mulRight`.

See also `AddMonoidHom.mulLeft`, `AddMonoidHom.mulRight`, `AddMonoid.End.mulLeft`, and
`AddMonoid.End.mulRight` for multiplication by `R` as an endomorphism instead of multiplication by
`Rˣ` as an automorphism.
-/


namespace AddAut

variable {R : Type _} [Semiring R]

/-- Left multiplication by a unit of a semiring as an additive automorphism. -/
@[simps (config := { simpRhs := true })]
def mulLeft : Rˣ →* AddAut R :=
DistribMulAction.toAddAut _ _
#align add_aut.mul_left AddAut.mulLeft

/-- Right multiplication by a unit of a semiring as an additive automorphism. -/
def mulRight (u : Rˣ) : AddAut R :=
DistribMulAction.toAddAut Rᵐᵒᵖˣ R (Units.opEquiv.symm <| MulOpposite.op u)
#align add_aut.mul_right AddAut.mulRight

@[simp]
theorem mul_right_apply (u : Rˣ) (x : R) : mulRight u x = x * u :=
winston-h-zhang marked this conversation as resolved.
Show resolved Hide resolved
rfl
#align add_aut.mul_right_apply AddAut.mul_right_apply

@[simp]
theorem mul_right_symm_apply (u : Rˣ) (x : R) : (mulRight u).symm x = x * u⁻¹ :=
winston-h-zhang marked this conversation as resolved.
Show resolved Hide resolved
rfl
#align add_aut.mul_right_symm_apply AddAut.mul_right_symm_apply

end AddAut