File: Mathlib/Algebra/Star/StarRingHom.lean

full_name: NonUnitalStarRingHom
code: /-- A *non-unital ⋆-ring homomorphism* is a non-unital ring homomorphism between non-unital
non-associative semirings `A` and `B` equipped with a `star` operation, and this homomorphism is
also `star`-preserving. -/
structure NonUnitalStarRingHom (A B : Type*) [NonUnitalNonAssocSemiring A]
    [Star A] [NonUnitalNonAssocSemiring B] [Star B] extends A →ₙ+* B where
  /-- By definition, a non-unital ⋆-ring homomorphism preserves the `star` operation. -/
  map_star' : ∀ a : A, toFun (star a) = star (toFun a)
goal: Type (max u_1 u_2)

full_name: NonUnitalStarRingHom.map_star'
code: /-- A *non-unital ⋆-ring homomorphism* is a non-unital ring homomorphism between non-unital
non-associative semirings `A` and `B` equipped with a `star` operation, and this homomorphism is
also `star`-preserving. -/
structure NonUnitalStarRingHom (A B : Type*) [NonUnitalNonAssocSemiring A]
    [Star A] [NonUnitalNonAssocSemiring B] [Star B] extends A →ₙ+* B where
  /-- By definition, a non-unital ⋆-ring homomorphism preserves the `star` operation. -/
  map_star' : ∀ a : A, toFun (star a) = star (toFun a)
goal: self.toFun (star a) = star (self.toFun a)

full_name: _aux_Mathlib_Algebra_Star_StarRingHom___unexpand_NonUnitalStarRingHom_1
code: /-- `α →⋆ₙ+* β` denotes the type of non-unital ring homomorphisms from `α` to `β`. -/
infixr:25 " →⋆ₙ+* " => NonUnitalStarRingHom
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_Algebra_Star_StarRingHom___macroRules_term_→⋆ₙ+*__1»
code: /-- `α →⋆ₙ+* β` denotes the type of non-unital ring homomorphisms from `α` to `β`. -/
infixr:25 " →⋆ₙ+* " => NonUnitalStarRingHom
goal: Lean.Macro

full_name: NonUnitalStarRingHomClass
code: /-- `NonUnitalStarRingHomClass F A B` states that `F` is a type of non-unital ⋆-ring homomorphisms.
You should also extend this typeclass when you extend `NonUnitalStarRingHom`. -/
class NonUnitalStarRingHomClass (F : Type*) (A B : outParam Type*)
    [NonUnitalNonAssocSemiring A] [Star A] [NonUnitalNonAssocSemiring B] [Star B]
    [FunLike F A B] [NonUnitalRingHomClass F A B] extends StarHomClass F A B : Prop
goal: Prop

full_name: NonUnitalStarRingHomClass.toNonUnitalStarRingHom
code: /-- Turn an element of a type `F` satisfying `NonUnitalStarRingHomClass F A B` into an actual
`NonUnitalStarRingHom`. This is declared as the default coercion from `F` to `A →⋆ₙ+ B`. -/
@[coe]
def toNonUnitalStarRingHom [NonUnitalStarRingHomClass F A B] (f : F) : A →⋆ₙ+* B 
goal: A →⋆ₙ+* B

full_name: NonUnitalStarRingHomClass.instCoeHeadNonUnitalStarRingHom
code: instance [NonUnitalStarRingHomClass F A B] : CoeHead F (A →⋆ₙ+* B) 
goal: CoeHead F (A →⋆ₙ+* B)

full_name: NonUnitalStarRingHom.instFunLike
code: instance : FunLike (A →⋆ₙ+* B) A B 
goal: FunLike (A →⋆ₙ+* B) A B

full_name: NonUnitalStarRingHom.instNonUnitalRingHomClass
code: instance : NonUnitalRingHomClass (A →⋆ₙ+* B) A B 
goal: NonUnitalRingHomClass (A →⋆ₙ+* B) A B

full_name: NonUnitalStarRingHom.instNonUnitalStarRingHomClass
code: instance : NonUnitalStarRingHomClass (A →⋆ₙ+* B) A B 
goal: NonUnitalStarRingHomClass (A →⋆ₙ+* B) A B

full_name: NonUnitalStarRingHom.Simps.apply
code: /-- See Note [custom simps projection] -/
def Simps.apply (f : A →⋆ₙ+* B) : A → B 
goal: A → B

full_name: NonUnitalStarRingHom.coe_coe
code: @[simp]
protected theorem coe_coe {F : Type*} [FunLike F A B] [NonUnitalRingHomClass F A B]
    [NonUnitalStarRingHomClass F A B] (f : F) : ⇑(f : A →⋆ₙ+* B) = f 
goal: ⇑↑f = ⇑f

full_name: NonUnitalStarRingHom.coe_toNonUnitalRingHom
code: @[simp]
theorem coe_toNonUnitalRingHom (f : A →⋆ₙ+* B) : ⇑f.toNonUnitalRingHom = f 
goal: ⇑f.toNonUnitalRingHom = ⇑f

full_name: NonUnitalStarRingHom.ext
code: @[ext]
theorem ext {f g : A →⋆ₙ+* B} (h : ∀ x, f x = g x) : f = g 
goal: f = g

full_name: NonUnitalStarRingHom.copy
code: /-- Copy of a `NonUnitalStarRingHom` with a new `toFun` equal to the old one. Useful
to fix definitional equalities. -/
protected def copy (f : A →⋆ₙ+* B) (f' : A → B) (h : f' = f) : A →⋆ₙ+* B 
goal: A →⋆ₙ+* B

full_name: NonUnitalStarRingHom.coe_copy
code: @[simp]
theorem coe_copy (f : A →⋆ₙ+* B) (f' : A → B) (h : f' = f) : ⇑(f.copy f' h) = f' 
goal: ⇑(f.copy f' h) = f'

full_name: NonUnitalStarRingHom.copy_eq
code: theorem copy_eq (f : A →⋆ₙ+* B) (f' : A → B) (h : f' = f) : f.copy f' h = f 
goal: f.copy f' h = f

full_name: NonUnitalStarRingHom.coe_mk
code: @[simp]
theorem coe_mk (f : A →ₙ+* B) (h) :
    ((⟨f, h⟩ : A  →⋆ₙ+* B) : A → B) = f 
goal: ⇑{ toNonUnitalRingHom := f, map_star' := h } = ⇑f

full_name: NonUnitalStarRingHom.mk_coe
code: @[simp]
theorem mk_coe (f : A →⋆ₙ+* B) (h₁ h₂ h₃ h₄) :
    (⟨⟨⟨f, h₁⟩, h₂, h₃⟩, h₄⟩ : A →⋆ₙ+* B) = f 
goal: { toFun := ⇑f, map_mul' := h₁, map_zero' := h₂, map_add' := h₃, map_star' := h₄ } = f

full_name: NonUnitalStarRingHom.id
code: /-- The identity as a non-unital ⋆-ring homomorphism. -/
protected def id : A →⋆ₙ+* A 
goal: A →⋆ₙ+* A

full_name: NonUnitalStarRingHom.coe_id
code: @[simp]
theorem coe_id : ⇑(NonUnitalStarRingHom.id A) = id 
goal: ⇑(NonUnitalStarRingHom.id A) = id

full_name: NonUnitalStarRingHom.comp
code: /-- The composition of non-unital ⋆-ring homomorphisms, as a non-unital ⋆-ring homomorphism. -/
def comp (f : B →⋆ₙ+* C) (g : A →⋆ₙ+* B) : A →⋆ₙ+* C 
goal: A →⋆ₙ+* C

full_name: NonUnitalStarRingHom.coe_comp
code: @[simp]
theorem coe_comp (f : B →⋆ₙ+* C) (g : A →⋆ₙ+* B) : ⇑(comp f g) = f ∘ g 
goal: ⇑(f.comp g) = ⇑f ∘ ⇑g

full_name: NonUnitalStarRingHom.comp_apply
code: @[simp]
theorem comp_apply (f : B →⋆ₙ+* C) (g : A →⋆ₙ+* B) (a : A) : comp f g a = f (g a) 
goal: (f.comp g) a = f (g a)

full_name: NonUnitalStarRingHom.comp_assoc
code: @[simp]
theorem comp_assoc (f : C →⋆ₙ+* D) (g : B →⋆ₙ+* C) (h : A →⋆ₙ+* B) :
    (f.comp g).comp h = f.comp (g.comp h) 
goal: (f.comp g).comp h = f.comp (g.comp h)

full_name: NonUnitalStarRingHom.id_comp
code: @[simp]
theorem id_comp (f : A →⋆ₙ+* B) : (NonUnitalStarRingHom.id _).comp f = f 
goal: (NonUnitalStarRingHom.id B).comp f = f

full_name: NonUnitalStarRingHom.comp_id
code: @[simp]
theorem comp_id (f : A →⋆ₙ+* B) : f.comp (NonUnitalStarRingHom.id _) = f 
goal: f.comp (NonUnitalStarRingHom.id A) = f

full_name: NonUnitalStarRingHom.instMonoid
code: instance : Monoid (A →⋆ₙ+* A) 
goal: Monoid (A →⋆ₙ+* A)

full_name: NonUnitalStarRingHom.coe_one
code: @[simp]
theorem coe_one : ((1 : A →⋆ₙ+* A) : A → A) = id 
goal: ⇑1 = id

full_name: NonUnitalStarRingHom.one_apply
code: theorem one_apply (a : A) : (1 : A →⋆ₙ+* A) a = a 
goal: 1 a = a

full_name: NonUnitalStarRingHom.instZero
code: instance : Zero (A →⋆ₙ+* B) 
goal: Zero (A →⋆ₙ+* B)

full_name: NonUnitalStarRingHom.instInhabited
code: instance : Inhabited (A →⋆ₙ+* B) 
goal: Inhabited (A →⋆ₙ+* B)

full_name: NonUnitalStarRingHom.instMonoidWithZero
code: instance : MonoidWithZero (A →⋆ₙ+* A) 
goal: MonoidWithZero (A →⋆ₙ+* A)

full_name: NonUnitalStarRingHom.coe_zero
code: @[simp]
theorem coe_zero : ((0 : A →⋆ₙ+* B) : A → B) = 0 
goal: ⇑0 = 0

full_name: NonUnitalStarRingHom.zero_apply
code: theorem zero_apply (a : A) : (0 : A →⋆ₙ+* B) a = 0 
goal: 0 a = 0

full_name: StarRingEquiv.map_star'
code: /-- A *⋆-ring* equivalence is an equivalence preserving addition, multiplication, and the star
operation, which allows for considering both unital and non-unital equivalences with a single
structure. -/
structure StarRingEquiv (A B : Type*) [Add A] [Add B] [Mul A] [Mul B] [Star A] [Star B]
    extends A ≃+* B where
  /-- By definition, a ⋆-ring equivalence preserves the `star` operation. -/
  map_star' : ∀ a : A, toFun (star a) = star (toFun a)
goal: self.toFun (star a) = star (self.toFun a)

full_name: StarRingEquiv
code: /-- A *⋆-ring* equivalence is an equivalence preserving addition, multiplication, and the star
operation, which allows for considering both unital and non-unital equivalences with a single
structure. -/
structure StarRingEquiv (A B : Type*) [Add A] [Add B] [Mul A] [Mul B] [Star A] [Star B]
    extends A ≃+* B where
  /-- By definition, a ⋆-ring equivalence preserves the `star` operation. -/
  map_star' : ∀ a : A, toFun (star a) = star (toFun a)
goal: Type (max u_1 u_2)

full_name: _aux_Mathlib_Algebra_Star_StarRingHom___unexpand_StarRingEquiv_1
code: @[inherit_doc] notation:25 A " ≃⋆+* " B => StarRingEquiv A B
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_Algebra_Star_StarRingHom___macroRules_term_≃⋆+*__1»
code: @[inherit_doc] notation:25 A " ≃⋆+* " B => StarRingEquiv A B
goal: Lean.Macro

full_name: StarRingEquivClass
code: /-- `StarRingEquivClass F A B` asserts `F` is a type of bundled ⋆-ring equivalences between `A` and
`B`.
You should also extend this typeclass when you extend `StarRingEquiv`. -/
class StarRingEquivClass (F : Type*) (A B : outParam Type*)
    [Add A] [Mul A] [Star A] [Add B] [Mul B] [Star B] [EquivLike F A B]
    extends RingEquivClass F A B : Prop where
  /-- By definition, a ⋆-ring equivalence preserves the `star` operation. -/
  map_star : ∀ (f : F) (a : A), f (star a) = star (f a)
goal: Prop

full_name: StarRingEquivClass.map_star
code: /-- `StarRingEquivClass F A B` asserts `F` is a type of bundled ⋆-ring equivalences between `A` and
`B`.
You should also extend this typeclass when you extend `StarRingEquiv`. -/
class StarRingEquivClass (F : Type*) (A B : outParam Type*)
    [Add A] [Mul A] [Star A] [Add B] [Mul B] [Star B] [EquivLike F A B]
    extends RingEquivClass F A B : Prop where
  /-- By definition, a ⋆-ring equivalence preserves the `star` operation. -/
  map_star : ∀ (f : F) (a : A), f (star a) = star (f a)
goal: f (star a) = star (f a)

full_name: StarRingEquivClass.instStarHomClass
code: instance (priority := 50) {F A B : Type*} [Add A] [Mul A] [Star A] [Add B] [Mul B] [Star B]
    [EquivLike F A B] [hF : StarRingEquivClass F A B] :
    StarHomClass F A B 
goal: StarHomClass F A B

full_name: StarRingEquivClass.instNonUnitalStarRingHomClass
code: instance (priority := 100) {F A B : Type*} [NonUnitalNonAssocSemiring A] [Star A]
    [NonUnitalNonAssocSemiring B] [Star B] [EquivLike F A B] [RingEquivClass F A B]
    [StarRingEquivClass F A B] : NonUnitalStarRingHomClass F A B 
goal: NonUnitalStarRingHomClass F A B

full_name: StarRingEquivClass.toStarRingEquiv
code: /-- Turn an element of a type `F` satisfying `StarRingEquivClass F A B` into an actual
`StarRingEquiv`. This is declared as the default coercion from `F` to `A ≃⋆+* B`. -/
@[coe]
def toStarRingEquiv {F A B : Type*} [Add A] [Mul A] [Star A] [Add B] [Mul B] [Star B]
    [EquivLike F A B] [RingEquivClass F A B] [StarRingEquivClass F A B] (f : F) : A ≃⋆+* B 
goal: A ≃⋆+* B

full_name: StarRingEquivClass.instCoeHead
code: /-- Any type satisfying `StarRingEquivClass` can be cast into `StarRingEquiv` via
`StarRingEquivClass.toStarRingEquiv`. -/
instance instCoeHead {F A B : Type*} [Add A] [Mul A] [Star A] [Add B] [Mul B] [Star B]
    [EquivLike F A B] [RingEquivClass F A B] [StarRingEquivClass F A B] : CoeHead F (A ≃⋆+* B) 
goal: CoeHead F (A ≃⋆+* B)

full_name: StarRingEquiv.instEquivLike
code: instance : EquivLike (A ≃⋆+* B) A B 
goal: EquivLike (A ≃⋆+* B) A B

full_name: StarRingEquiv.instRingEquivClass
code: instance : RingEquivClass (A ≃⋆+* B) A B 
goal: RingEquivClass (A ≃⋆+* B) A B

full_name: StarRingEquiv.instStarRingEquivClass
code: instance : StarRingEquivClass (A ≃⋆+* B) A B 
goal: StarRingEquivClass (A ≃⋆+* B) A B

full_name: StarRingEquiv.instFunLike
code: /-- Helper instance for cases where the inference via `EquivLike` is too hard. -/
instance : FunLike (A ≃⋆+* B) A B 
goal: FunLike (A ≃⋆+* B) A B

full_name: StarRingEquiv.toRingEquiv_eq_coe
code: @[simp]
theorem toRingEquiv_eq_coe (e : A ≃⋆+* B) : e.toRingEquiv = e 
goal: e.toRingEquiv = ↑e

full_name: StarRingEquiv.ext
code: @[ext]
theorem ext {f g : A ≃⋆+* B} (h : ∀ a, f a = g a) : f = g 
goal: f = g

full_name: StarRingEquiv.ext_iff
code: theorem ext_iff {f g : A ≃⋆+* B} : f = g ↔ ∀ a, f a = g a 
goal: f = g ↔ ∀ (a : A), f a = g a

full_name: StarRingEquiv.refl
code: /-- The identity map as a star ring isomorphism. -/
@[refl]
def refl : A ≃⋆+* A 
goal: A ≃⋆+* A

full_name: StarRingEquiv.instInhabited
code: instance : Inhabited (A ≃⋆+* A) 
goal: Inhabited (A ≃⋆+* A)

full_name: StarRingEquiv.coe_refl
code: @[simp]
theorem coe_refl : ⇑(refl : A ≃⋆+* A) = id 
goal: ⇑StarRingEquiv.refl = id

full_name: StarRingEquiv.symm
code: /-- The inverse of a star ring isomorphism is a star ring isomorphism. -/
@[symm]
nonrec def symm (e : A ≃⋆+* B) : B ≃⋆+* A 
goal: B ≃⋆+* A

full_name: StarRingEquiv.Simps.apply
code: /-- See Note [custom simps projection] -/
def Simps.apply (e : A ≃⋆+* B) : A → B 
goal: A → B

full_name: StarRingEquiv.Simps.symm_apply
code: /-- See Note [custom simps projection] -/
def Simps.symm_apply (e : A ≃⋆+* B) : B → A 
goal: B → A

full_name: StarRingEquiv.invFun_eq_symm
code: @[simp]
theorem invFun_eq_symm {e : A ≃⋆+* B} : EquivLike.inv e = e.symm 
goal: EquivLike.inv e = ⇑e.symm

full_name: StarRingEquiv.symm_symm
code: @[simp]
theorem symm_symm (e : A ≃⋆+* B) : e.symm.symm = e 
goal: e.symm.symm = e

full_name: StarRingEquiv.symm_bijective
code: theorem symm_bijective : Function.Bijective (symm : (A ≃⋆+* B) → B ≃⋆+* A) 
goal: Function.Bijective StarRingEquiv.symm

full_name: StarRingEquiv.coe_mk
code: theorem coe_mk (e h₁) : ⇑(⟨e, h₁⟩ : A ≃⋆+* B) = e 
goal: ⇑{ toRingEquiv := e, map_star' := h₁ } = ⇑e

full_name: StarRingEquiv.mk_coe
code: @[simp]
theorem mk_coe (e : A ≃⋆+* B) (e' h₁ h₂ h₃ h₄ h₅) :
    (⟨⟨⟨e, e', h₁, h₂⟩, h₃, h₄⟩, h₅⟩ : A ≃⋆+* B) = e 
goal: { toFun := ⇑e, invFun := e', left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄, map_star' := h₅ } = e

full_name: StarRingEquiv.symm_mk.aux
code: /-- Auxilliary definition to avoid looping in `dsimp` with `StarRingEquiv.symm_mk`. -/
protected def symm_mk.aux (f f') (h₁ h₂ h₃ h₄ h₅) 
goal: B ≃⋆+* A

full_name: StarRingEquiv.symm_mk
code: @[simp]
theorem symm_mk (f f') (h₁ h₂ h₃ h₄ h₅) :
    (⟨⟨⟨f, f', h₁, h₂⟩, h₃, h₄⟩, h₅⟩ : A ≃⋆+* B).symm =
      { symm_mk.aux f f' h₁ h₂ h₃ h₄ h₅ with
        toFun := f'
        invFun := f } 
goal: { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄, map_star' := h₅ }.symm =
  let __src := StarRingEquiv.symm_mk.aux f f' h₁ h₂ h₃ h₄ h₅;
  { toFun := f', invFun := f, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯, map_star' := ⋯ }

full_name: StarRingEquiv.refl_symm
code: @[simp]
theorem refl_symm : (StarRingEquiv.refl : A ≃⋆+* A).symm = StarRingEquiv.refl 
goal: StarRingEquiv.refl.symm = StarRingEquiv.refl

full_name: StarRingEquiv.trans
code: /-- Transitivity of `StarRingEquiv`. -/
@[trans]
def trans (e₁ : A≃⋆+* B) (e₂ : B ≃⋆+* C) : A ≃⋆+* C 
goal: A ≃⋆+* C

full_name: StarRingEquiv.apply_symm_apply
code: @[simp]
theorem apply_symm_apply (e : A ≃⋆+* B) : ∀ x, e (e.symm x) = x 
goal: e (e.symm x) = x

full_name: StarRingEquiv.symm_apply_apply
code: @[simp]
theorem symm_apply_apply (e : A ≃⋆+* B) : ∀ x, e.symm (e x) = x 
goal: e.symm (e x) = x

full_name: StarRingEquiv.symm_trans_apply
code: @[simp]
theorem symm_trans_apply (e₁ : A ≃⋆+* B) (e₂ : B≃⋆+* C) (x : C) :
    (e₁.trans e₂).symm x = e₁.symm (e₂.symm x) 
goal: (e₁.trans e₂).symm x = e₁.symm (e₂.symm x)

full_name: StarRingEquiv.coe_trans
code: @[simp]
theorem coe_trans (e₁ : A ≃⋆+* B) (e₂ : B ≃⋆+* C) : ⇑(e₁.trans e₂) = e₂ ∘ e₁ 
goal: ⇑(e₁.trans e₂) = ⇑e₂ ∘ ⇑e₁

full_name: StarRingEquiv.trans_apply
code: @[simp]
theorem trans_apply (e₁ : A ≃⋆+* B) (e₂ : B ≃⋆+* C) (x : A) : (e₁.trans e₂) x = e₂ (e₁ x) 
goal: (e₁.trans e₂) x = e₂ (e₁ x)

full_name: StarRingEquiv.leftInverse_symm
code: theorem leftInverse_symm (e : A ≃⋆+* B) : Function.LeftInverse e.symm e 
goal: Function.LeftInverse ⇑e.symm ⇑e

full_name: StarRingEquiv.rightInverse_symm
code: theorem rightInverse_symm (e : A ≃⋆+* B) : Function.RightInverse e.symm e 
goal: Function.RightInverse ⇑e.symm ⇑e

full_name: StarRingEquiv.ofStarRingHom
code: /-- If a (unital or non-unital) star ring morphism has an inverse, it is an isomorphism of
star rings. -/
@[simps]
def ofStarRingHom (f : F) (g : G) (h₁ : ∀ x, g (f x) = x) (h₂ : ∀ x, f (g x) = x) : A ≃⋆+* B 
goal: A ≃⋆+* B

full_name: StarRingEquiv.ofStarRingHom_symm_apply
code: /-- If a (unital or non-unital) star ring morphism has an inverse, it is an isomorphism of
star rings. -/
@[simps]
def ofStarRingHom (f : F) (g : G) (h₁ : ∀ x, g (f x) = x) (h₂ : ∀ x, f (g x) = x) : A ≃⋆+* B 
goal: (StarRingEquiv.ofStarRingHom f g h₁ h₂).symm a = g a

full_name: StarRingEquiv.ofStarRingHom_apply
code: /-- If a (unital or non-unital) star ring morphism has an inverse, it is an isomorphism of
star rings. -/
@[simps]
def ofStarRingHom (f : F) (g : G) (h₁ : ∀ x, g (f x) = x) (h₂ : ∀ x, f (g x) = x) : A ≃⋆+* B 
goal: (StarRingEquiv.ofStarRingHom f g h₁ h₂) a = f a

full_name: StarRingEquiv.ofBijective
code: /-- Promote a bijective star ring homomorphism to a star ring equivalence. -/
noncomputable def ofBijective (f : F) (hf : Function.Bijective f) : A ≃⋆+* B 
goal: A ≃⋆+* B

full_name: StarRingEquiv.coe_ofBijective
code: @[simp]
theorem coe_ofBijective {f : F} (hf : Function.Bijective f) :
    (StarRingEquiv.ofBijective f hf : A → B) = f 
goal: ⇑(StarRingEquiv.ofBijective f hf) = ⇑f

full_name: StarRingEquiv.ofBijective_apply
code: theorem ofBijective_apply {f : F} (hf : Function.Bijective f) (a : A) :
    (StarRingEquiv.ofBijective f hf) a = f a 
goal: (StarRingEquiv.ofBijective f hf) a = f a