@@ -93,7 +93,7 @@ theorem star_inj [InvolutiveStar R] {x y : R} : star x = star y ↔ x = y :=
9393 star_injective.eq_iff
9494
9595/-- `star` as an equivalence when it is involutive. -/
96- protected def Equiv.star [InvolutiveStar R] : Equiv.Perm R :=
96+ protected def Equiv.Perm. star [InvolutiveStar R] : Equiv.Perm R :=
9797 star_involutive.toPerm _
9898
9999theorem eq_star_of_eq_star [InvolutiveStar R] {r s : R} (h : r = star s) : s = star r := by
@@ -522,6 +522,41 @@ theorem isRegular_star_iff [Mul R] [StarMul R] {x : R} :
522522
523523end Regular
524524
525+ namespace Function.Injective
526+
527+ variable {S : Type v} (f : R → S)
528+
529+ /-- Given a type endowed with `star`, that `star` is involutive if it admits an injective map that
530+ preserves `star` to a type with whose `star` is involutive. See note [reducible non-instances]. -/
531+ protected abbrev involutiveStar [Star R] [InvolutiveStar S] (hf : Injective f)
532+ (star : ∀ x, f (star x) = star (f x)) : InvolutiveStar R where
533+ star_involutive r := hf <| by rw [star, star, star_star]
534+
535+ /-- A type endowed with `star` and `*` is a star magma if it admits an injective map that
536+ preserves `star` and `*` to star magma. See note [reducible non-instances]. -/
537+ protected abbrev starMul [Star R] [Mul R] [Mul S] [StarMul S] (hf : Injective f)
538+ (star : ∀ x, f (star x) = star (f x)) (mul : ∀ x y, f (x * y) = f x * f y) :
539+ StarMul R where
540+ toInvolutiveStar := hf.involutiveStar _ star
541+ star_mul x y := hf <| by rw [star, mul, star_mul, mul, star, star]
542+
543+ /-- A additive monoid endowed with `star` is an additive star monoid if it admits an injective map
544+ that preserves `star` and `+` to an additive star monoid. See note [reducible non-instances]. -/
545+ protected abbrev starAddMonoid [Star R] [AddMonoid R] [AddMonoid S] [StarAddMonoid S]
546+ (hf : Injective f) (star : ∀ x, f (star x) = star (f x)) (add : ∀ x y, f (x + y) = f x + f y) :
547+ StarAddMonoid R where
548+ toInvolutiveStar := hf.involutiveStar f star
549+ star_add x y := hf <| by rw [star, add, star_add, add, star, star]
550+
551+ /-- A non-unital non-associative ring endowed with `star` is a star ring if it admits an injective
552+ map that preserves `star`, `*` and `+` to a star ring. See note [reducible non-instances]. -/
553+ protected abbrev starRing [Star R] [NonUnitalNonAssocSemiring R] [NonUnitalNonAssocSemiring S]
554+ [StarRing S] (star : ∀ x, f (star x) = star (f x)) (add : ∀ x y, f (x + y) = f x + f y)
555+ (mul : ∀ x y, f (x * y) = f x * f y) (hf : Injective f) :
556+ StarRing R :=
557+ { hf.starMul f star mul, hf.starAddMonoid f star add with }
558+
559+ end Function.Injective
525560
526561namespace MulOpposite
527562
0 commit comments