commit 087e6a198cfcdb68d1d44fc058b65816c016090d
parent 4442fcad3fba0446222e91d9d2052531f48d5f51
Author: Robert Russell <robert@rr3.xyz>
Date: Thu, 15 Oct 2026 01:16:39 -0700
Algebra.Magma: rename
Diffstat:
1 file changed, 87 insertions(+), 87 deletions(-)
diff --git a/src/Lude/Algebra/Magma.hs b/src/Lude/Algebra/Magma.hs
@@ -22,44 +22,44 @@ module Lude.Algebra.Magma (
(*),
-- * Partial cancellation
- PartiallyLeftCancellable_ (..),
- PartiallyRightCancellable_ (..),
+ PartiallyCancellableL_ (..),
+ PartiallyCancellableR_ (..),
PartiallyCancellable_,
- PartiallyLeftCancellable,
+ PartiallyCancellableL,
cancelL',
(\\!),
- PartiallyRightCancellable,
+ PartiallyCancellableR,
cancelR',
(//!),
PartiallyCancellable,
cancel',
- PartiallyLeftSubtractable,
+ PartiallySubtractableL,
subtractL',
- PartiallyRightSubtractable,
+ PartiallySubtractableR,
subtractR',
PartiallySubtractable,
subtract',
sub',
(-!),
- PartiallyLeftDividable,
+ PartiallyDividableL,
divideByL',
(\!),
- PartiallyRightDividable,
+ PartiallyDividableR,
divideByR',
(/!),
PartiallyDividable,
divideBy',
-- * Decidable cancellation
- DecidablyLeftCancellable_ (..),
- DecidablyRightCancellable_ (..),
+ DecidablyCancellableL_ (..),
+ DecidablyCancellableR_ (..),
DecidablyCancellable_,
- DecidablyLeftCancellable,
+ DecidablyCancellableL,
tryCancelL#,
(\\?#),
tryCancelL,
(\\?),
- DecidablyRightCancellable,
+ DecidablyCancellableR,
tryCancelR#,
(//?#),
tryCancelR,
@@ -67,21 +67,21 @@ module Lude.Algebra.Magma (
DecidablyCancellable,
tryCancel#,
tryCancel,
- DecidablyLeftSubtractable,
+ DecidablySubtractableL,
trySubtractL#,
trySubtractL,
- DecidablyRightSubtractable,
+ DecidablySubtractableR,
trySubtractR#,
trySubtractR,
DecidablySubtractable,
trySubtract#,
trySubtract,
- DecidablyLeftDividable,
+ DecidablyDividableL,
tryDivideByL#,
(\?#),
tryDivideByL,
(\?),
- DecidablyRightDividable,
+ DecidablyDividableR,
tryDivideByR#,
(/?#),
tryDivideByR,
@@ -302,8 +302,8 @@ infixl 7 *
-- We don't specify @(x \\!)@ on elements outside the image of @(x ⋄)@.
--
-- Typically, monoids should also implement `PartiallyHasInverses_`
-type PartiallyLeftCancellable_ :: MagmaClass_
-class (IsSemigroup_ this a) => PartiallyLeftCancellable_ this (a :: Type# r) where
+type PartiallyCancellableL_ :: MagmaClass_
+class (IsSemigroup_ this a) => PartiallyCancellableL_ this (a :: Type# r) where
cancelL'_ :: For this (Biendo a)
-- | Semigroup with computable right cancellation for right-cancellable elements
@@ -314,24 +314,24 @@ class (IsSemigroup_ this a) => PartiallyLeftCancellable_ this (a :: Type# r) whe
-- We don't specify @(//! x)@ on elements outside the image of @(⋄ x)@.
--
-- Typically, monoids should also implement `PartiallyHasInverses_`
-type PartiallyRightCancellable_ :: MagmaClass_
-class (IsSemigroup_ this a) => PartiallyRightCancellable_ this (a :: Type# r) where
+type PartiallyCancellableR_ :: MagmaClass_
+class (IsSemigroup_ this a) => PartiallyCancellableR_ this (a :: Type# r) where
cancelR'_ :: For this (Biendo a)
-- | Commutative semigroup with computable cancellation for cancellable elements
type PartiallyCancellable_ :: MagmaClass_
-class (Commutative_ this a, PartiallyLeftCancellable_ this a, PartiallyRightCancellable_ this a) => PartiallyCancellable_ this (a :: Type# r)
+class (Commutative_ this a, PartiallyCancellableL_ this a, PartiallyCancellableR_ this a) => PartiallyCancellable_ this (a :: Type# r)
-instance (Commutative_ this a, PartiallyLeftCancellable_ this a, PartiallyRightCancellable_ this a) => PartiallyCancellable_ this (a :: Type# r)
+instance (Commutative_ this a, PartiallyCancellableL_ this a, PartiallyCancellableR_ this a) => PartiallyCancellable_ this (a :: Type# r)
-type PartiallyLeftCancellable = PartiallyLeftCancellable_ Combinative :: MagmaClass
-cancelL', (\\!) :: BinaryOp PartiallyLeftCancellable
+type PartiallyCancellableL = PartiallyCancellableL_ Combinative :: MagmaClass
+cancelL', (\\!) :: BinaryOp PartiallyCancellableL
cancelL' = cancelL'_ Combinative
(\\!) = cancelL'
infixr 5 \\!
-type PartiallyRightCancellable = PartiallyRightCancellable_ Combinative :: MagmaClass
-cancelR', (//!) :: BinaryOp PartiallyRightCancellable
+type PartiallyCancellableR = PartiallyCancellableR_ Combinative :: MagmaClass
+cancelR', (//!) :: BinaryOp PartiallyCancellableR
cancelR' = cancelR'_ Combinative
(//!) = flip cancelR'
infixl 5 //!
@@ -340,12 +340,12 @@ type PartiallyCancellable = PartiallyCancellable_ Combinative :: MagmaClass
cancel' :: BinaryOp PartiallyCancellable
cancel' = cancelR'
-type PartiallyLeftSubtractable = PartiallyLeftCancellable_ Additive :: MagmaClass
-subtractL' :: BinaryOp PartiallyLeftSubtractable
+type PartiallySubtractableL = PartiallyCancellableL_ Additive :: MagmaClass
+subtractL' :: BinaryOp PartiallySubtractableL
subtractL' = cancelL'_ Additive
-type PartiallyRightSubtractable = PartiallyRightCancellable_ Additive :: MagmaClass
-subtractR' :: BinaryOp PartiallyRightSubtractable
+type PartiallySubtractableR = PartiallyCancellableR_ Additive :: MagmaClass
+subtractR' :: BinaryOp PartiallySubtractableR
subtractR' = cancelR'_ Additive
-- NOTE: There're no standard symbols for left/right-subtraction, because
@@ -359,14 +359,14 @@ sub' = flip subtract'
(-!) = sub'
infixl 6 -!
-type PartiallyLeftDividable = PartiallyLeftCancellable_ Multiplicative :: MagmaClass
-divideByL', (\!) :: BinaryOp PartiallyLeftDividable
+type PartiallyDividableL = PartiallyCancellableL_ Multiplicative :: MagmaClass
+divideByL', (\!) :: BinaryOp PartiallyDividableL
divideByL' = cancelL'_ Multiplicative
(\!) = divideByL'
infixr 7 \!
-type PartiallyRightDividable = PartiallyRightCancellable_ Multiplicative :: MagmaClass
-divideByR', (/!) :: BinaryOp PartiallyRightDividable
+type PartiallyDividableR = PartiallyCancellableR_ Multiplicative :: MagmaClass
+divideByR', (/!) :: BinaryOp PartiallyDividableR
divideByR' = cancelR'_ Multiplicative
(/!) = flip divideByR'
infixl 7 /!
@@ -387,8 +387,8 @@ divideBy' = divideByR'
-- @Just z@; otherwise, @x \\? y@ = @Nothing@
--
-- Typically, monoids should also implement `DecidablyHasInverses_`
-type DecidablyLeftCancellable_ :: MagmaClass_
-class (PartiallyLeftCancellable_ this a) => DecidablyLeftCancellable_ this (a :: Type# r) where
+type DecidablyCancellableL_ :: MagmaClass_
+class (PartiallyCancellableL_ this a) => DecidablyCancellableL_ this (a :: Type# r) where
tryCancelL_# :: For this (a -> a -> Maybe# a)
-- | Semigroup with "decidable right cancellation" (i.e., decidable
@@ -401,29 +401,29 @@ class (PartiallyLeftCancellable_ this a) => DecidablyLeftCancellable_ this (a ::
-- @Just z@; otherwise, @y //? x@ = @Nothing@
--
-- Typically, monoids should also implement `DecidablyHasInverses_`
-type DecidablyRightCancellable_ :: MagmaClass_
-class (PartiallyRightCancellable_ this a) => DecidablyRightCancellable_ this (a :: Type# r) where
+type DecidablyCancellableR_ :: MagmaClass_
+class (PartiallyCancellableR_ this a) => DecidablyCancellableR_ this (a :: Type# r) where
tryCancelR_# :: For this (a -> a -> Maybe# a)
-- | Commutative semigroup with "decidable cancellation" (i.e., decidable
-- cancellability and decidable images of combination with cancellable elements)
type DecidablyCancellable_ :: MagmaClass_
-class (Commutative_ this a, DecidablyLeftCancellable_ this a, DecidablyRightCancellable_ this a) => DecidablyCancellable_ this (a :: Type# r)
+class (Commutative_ this a, DecidablyCancellableL_ this a, DecidablyCancellableR_ this a) => DecidablyCancellable_ this (a :: Type# r)
-instance (Commutative_ this a, DecidablyLeftCancellable_ this a, DecidablyRightCancellable_ this a) => DecidablyCancellable_ this (a :: Type# r)
+instance (Commutative_ this a, DecidablyCancellableL_ this a, DecidablyCancellableR_ this a) => DecidablyCancellable_ this (a :: Type# r)
-type DecidablyLeftCancellable = DecidablyLeftCancellable_ Combinative :: MagmaClass
-tryCancelL#, (\\?#) :: BinaryOpMaybe# DecidablyLeftCancellable
-tryCancelL, (\\?) :: BinaryOpMaybe DecidablyLeftCancellable
+type DecidablyCancellableL = DecidablyCancellableL_ Combinative :: MagmaClass
+tryCancelL#, (\\?#) :: BinaryOpMaybe# DecidablyCancellableL
+tryCancelL, (\\?) :: BinaryOpMaybe DecidablyCancellableL
tryCancelL# = tryCancelL_# Combinative
(\\?#) = tryCancelL#
tryCancelL = coerce tryCancelL#
(\\?) = tryCancelL
infix 5 \\?#, \\?
-type DecidablyRightCancellable = DecidablyRightCancellable_ Combinative :: MagmaClass
-tryCancelR#, (//?#) :: BinaryOpMaybe# DecidablyRightCancellable
-tryCancelR, (//?) :: BinaryOpMaybe DecidablyRightCancellable
+type DecidablyCancellableR = DecidablyCancellableR_ Combinative :: MagmaClass
+tryCancelR#, (//?#) :: BinaryOpMaybe# DecidablyCancellableR
+tryCancelR, (//?) :: BinaryOpMaybe DecidablyCancellableR
tryCancelR# = tryCancelR_# Combinative
(//?#) = flip tryCancelR#
tryCancelR = coerce tryCancelR#
@@ -436,15 +436,15 @@ tryCancel :: BinaryOpMaybe DecidablyCancellable
tryCancel# = tryCancelR#
tryCancel = tryCancelR
-type DecidablyLeftSubtractable = DecidablyLeftCancellable_ Additive :: MagmaClass
-trySubtractL# :: BinaryOpMaybe# DecidablyLeftSubtractable
-trySubtractL :: BinaryOpMaybe DecidablyLeftSubtractable
+type DecidablySubtractableL = DecidablyCancellableL_ Additive :: MagmaClass
+trySubtractL# :: BinaryOpMaybe# DecidablySubtractableL
+trySubtractL :: BinaryOpMaybe DecidablySubtractableL
trySubtractL# = tryCancelL_# Additive
trySubtractL = coerce trySubtractL#
-type DecidablyRightSubtractable = DecidablyRightCancellable_ Additive :: MagmaClass
-trySubtractR# :: BinaryOpMaybe# DecidablyRightSubtractable
-trySubtractR :: BinaryOpMaybe DecidablyRightSubtractable
+type DecidablySubtractableR = DecidablyCancellableR_ Additive :: MagmaClass
+trySubtractR# :: BinaryOpMaybe# DecidablySubtractableR
+trySubtractR :: BinaryOpMaybe DecidablySubtractableR
trySubtractR# = tryCancelR_# Additive
trySubtractR = coerce trySubtractR#
@@ -454,18 +454,18 @@ trySubtract :: BinaryOpMaybe DecidablySubtractable
trySubtract# = trySubtractR#
trySubtract = trySubtractR
-type DecidablyLeftDividable = DecidablyLeftCancellable_ Multiplicative :: MagmaClass
-tryDivideByL#, (\?#) :: BinaryOpMaybe# DecidablyLeftDividable
-tryDivideByL, (\?) :: BinaryOpMaybe DecidablyLeftDividable
+type DecidablyDividableL = DecidablyCancellableL_ Multiplicative :: MagmaClass
+tryDivideByL#, (\?#) :: BinaryOpMaybe# DecidablyDividableL
+tryDivideByL, (\?) :: BinaryOpMaybe DecidablyDividableL
tryDivideByL# = tryCancelL_# Multiplicative
(\?#) = tryDivideByL#
tryDivideByL = coerce tryDivideByL#
(\?) = tryDivideByL
infix 7 \?#, \?
-type DecidablyRightDividable = DecidablyRightCancellable_ Multiplicative :: MagmaClass
-tryDivideByR#, (/?#) :: BinaryOpMaybe# DecidablyRightDividable
-tryDivideByR, (/?) :: BinaryOpMaybe DecidablyRightDividable
+type DecidablyDividableR = DecidablyCancellableR_ Multiplicative :: MagmaClass
+tryDivideByR#, (/?#) :: BinaryOpMaybe# DecidablyDividableR
+tryDivideByR, (/?) :: BinaryOpMaybe DecidablyDividableR
tryDivideByR# = tryCancelR_# Multiplicative
(/?#) = flip tryDivideByR#
tryDivideByR = coerce tryDivideByR#
@@ -564,7 +564,7 @@ tryRecip = coerce tryRecip#
-- __Laws:__
-- - /Every element is invertible:/ @isJust (tryInvert x)@ = @True@
type IsGroup_ :: MagmaClass_
-class (DecidablyHasInverses_ this a, DecidablyLeftCancellable_ this a, DecidablyRightCancellable_ this a) => IsGroup_ this (a :: Type# r)
+class (DecidablyHasInverses_ this a, DecidablyCancellableL_ this a, DecidablyCancellableR_ this a) => IsGroup_ this (a :: Type# r)
type IsGroup = IsGroup_ Combinative :: MagmaClass
cancelL, (\\), cancelR, (//) :: BinaryOp IsGroup
@@ -648,7 +648,7 @@ class (IsRing a, MulCommutative a) => IsCommRing (a :: Type# r)
instance (IsRing a, MulCommutative a) => IsCommRing (a :: Type# r)
type IsDivisionRing :: MagmaClass
-class (IsRing a, PartiallyLeftDividable a, PartiallyRightDividable a, PartiallyHasReciprocals a) => IsDivisionRing a
+class (IsRing a, PartiallyDividableL a, PartiallyDividableR a, PartiallyHasReciprocals a) => IsDivisionRing a
type IsField :: MagmaClass
class (IsDivisionRing a, MulCommutative a) => IsField a
@@ -663,21 +663,21 @@ baseOne :: (Base.Num a) => a
baseOne = 1 where fromInteger = Base.fromInteger
instance (Base.Num a) => IsSemigroup_ Additive (BaseInterop a) where combine_ _ = coerce (Base.+)
-instance (Base.Num a) => PartiallyLeftCancellable_ Additive (BaseInterop a) where cancelL'_ _ = coerce Base.subtract
-instance (Base.Num a) => DecidablyLeftCancellable_ Additive (BaseInterop a) where tryCancelL_# _ = coerce $ Just .* Base.subtract
-instance (Base.Num a) => PartiallyRightCancellable_ Additive (BaseInterop a) where cancelR'_ _ = coerce Base.subtract
-instance (Base.Num a) => DecidablyRightCancellable_ Additive (BaseInterop a) where tryCancelR_# _ = coerce $ Just .* Base.subtract
+instance (Base.Num a) => PartiallyCancellableL_ Additive (BaseInterop a) where cancelL'_ _ = coerce Base.subtract
+instance (Base.Num a) => DecidablyCancellableL_ Additive (BaseInterop a) where tryCancelL_# _ = coerce $ Just .* Base.subtract
+instance (Base.Num a) => PartiallyCancellableR_ Additive (BaseInterop a) where cancelR'_ _ = coerce Base.subtract
+instance (Base.Num a) => DecidablyCancellableR_ Additive (BaseInterop a) where tryCancelR_# _ = coerce $ Just .* Base.subtract
+instance (Base.Num a) => IsMonoid_ Additive (BaseInterop a) where neutral_ _ = coerce baseZero
instance (Base.Num a) => PartiallyHasInverses_ Additive (BaseInterop a) where invert'_ _ = coerce Base.negate
instance (Base.Num a) => DecidablyHasInverses_ Additive (BaseInterop a) where tryInvert_# _ = coerce $ Just . Base.negate
-instance (Base.Num a) => IsMonoid_ Additive (BaseInterop a) where neutral_ _ = coerce baseZero
instance (Base.Num a) => IsGroup_ Additive (BaseInterop a)
instance (Base.Num a) => Commutative_ Additive (BaseInterop a)
instance (Base.Num a) => IsSemigroup_ Multiplicative (BaseInterop a) where combine_ _ = coerce (Base.*)
instance (Base.Num a) => IsMonoid_ Multiplicative (BaseInterop a) where neutral_ _ = coerce baseOne
instance (Base.Num a) => IsSemiring (BaseInterop a)
instance (Base.Num a) => IsRing (BaseInterop a)
-instance (Base.Fractional a) => PartiallyLeftCancellable_ Multiplicative (BaseInterop a) where cancelL'_ _ = coerce \x y -> Base.recip x Base.* y
-instance (Base.Fractional a) => PartiallyRightCancellable_ Multiplicative (BaseInterop a) where cancelR'_ _ = coerce $ flip (Base./)
+instance (Base.Fractional a) => PartiallyCancellableL_ Multiplicative (BaseInterop a) where cancelL'_ _ = coerce \x y -> Base.recip x Base.* y
+instance (Base.Fractional a) => PartiallyCancellableR_ Multiplicative (BaseInterop a) where cancelR'_ _ = coerce $ flip (Base./)
instance (Base.Fractional a) => PartiallyHasInverses_ Multiplicative (BaseInterop a) where invert'_ _ = coerce Base.recip
instance (Base.Fractional a) => IsDivisionRing (BaseInterop a)
@@ -690,10 +690,10 @@ baseRecipNonZero :: forall (a :: Type). (Base.Eq a, Base.Fractional a) => a -> M
baseRecipNonZero x = if x Base.== baseZero then Nothing else Just (Base.recip x)
deriving via BaseInterop Natural instance IsSemigroup_ Additive Natural
-deriving via BaseInterop Natural instance PartiallyLeftCancellable_ Additive Natural
-instance DecidablyLeftCancellable_ Additive Natural where tryCancelL_# _ = coerce $ flip Base.minusNaturalMaybe
-deriving via BaseInterop Natural instance PartiallyRightCancellable_ Additive Natural
-instance DecidablyRightCancellable_ Additive Natural where tryCancelR_# _ = coerce $ flip Base.minusNaturalMaybe
+deriving via BaseInterop Natural instance PartiallyCancellableL_ Additive Natural
+instance DecidablyCancellableL_ Additive Natural where tryCancelL_# _ = coerce $ flip Base.minusNaturalMaybe
+deriving via BaseInterop Natural instance PartiallyCancellableR_ Additive Natural
+instance DecidablyCancellableR_ Additive Natural where tryCancelR_# _ = coerce $ flip Base.minusNaturalMaybe
deriving via BaseInterop Natural instance IsMonoid_ Additive Natural
deriving via BaseInterop Natural instance Commutative_ Additive Natural
deriving via BaseInterop Natural instance IsSemigroup_ Multiplicative Natural
@@ -702,10 +702,10 @@ instance Commutative_ Multiplicative Natural
deriving via BaseInterop Natural instance IsSemiring Natural
deriving via BaseInterop Integer instance IsSemigroup_ Additive Integer
-deriving via BaseInterop Integer instance PartiallyLeftCancellable_ Additive Integer
-deriving via BaseInterop Integer instance DecidablyLeftCancellable_ Additive Integer
-deriving via BaseInterop Integer instance PartiallyRightCancellable_ Additive Integer
-deriving via BaseInterop Integer instance DecidablyRightCancellable_ Additive Integer
+deriving via BaseInterop Integer instance PartiallyCancellableL_ Additive Integer
+deriving via BaseInterop Integer instance DecidablyCancellableL_ Additive Integer
+deriving via BaseInterop Integer instance PartiallyCancellableR_ Additive Integer
+deriving via BaseInterop Integer instance DecidablyCancellableR_ Additive Integer
deriving via BaseInterop Integer instance IsMonoid_ Additive Integer
deriving via BaseInterop Integer instance PartiallyHasInverses_ Additive Integer
deriving via BaseInterop Integer instance DecidablyHasInverses_ Additive Integer
@@ -718,10 +718,10 @@ deriving via BaseInterop Integer instance IsSemiring Integer
deriving via BaseInterop Integer instance IsRing Integer
deriving via BaseInterop Rational instance IsSemigroup_ Additive Rational
-deriving via BaseInterop Rational instance PartiallyLeftCancellable_ Additive Rational
-deriving via BaseInterop Rational instance DecidablyLeftCancellable_ Additive Rational
-deriving via BaseInterop Rational instance PartiallyRightCancellable_ Additive Rational
-deriving via BaseInterop Rational instance DecidablyRightCancellable_ Additive Rational
+deriving via BaseInterop Rational instance PartiallyCancellableL_ Additive Rational
+deriving via BaseInterop Rational instance DecidablyCancellableL_ Additive Rational
+deriving via BaseInterop Rational instance PartiallyCancellableR_ Additive Rational
+deriving via BaseInterop Rational instance DecidablyCancellableR_ Additive Rational
deriving via BaseInterop Rational instance IsMonoid_ Additive Rational
deriving via BaseInterop Rational instance PartiallyHasInverses_ Additive Rational
deriving via BaseInterop Rational instance DecidablyHasInverses_ Additive Rational
@@ -732,22 +732,22 @@ deriving via BaseInterop Rational instance IsMonoid_ Multiplicative Rational
instance Commutative_ Multiplicative Rational
deriving via BaseInterop Rational instance IsSemiring Rational
deriving via BaseInterop Rational instance IsRing Rational
-deriving via BaseInterop Rational instance PartiallyLeftCancellable_ Multiplicative Rational
-instance DecidablyLeftCancellable_ Multiplicative Rational where tryCancelL_# _ = coerce $ flip baseDivNonZero
-deriving via BaseInterop Rational instance PartiallyRightCancellable_ Multiplicative Rational
-instance DecidablyRightCancellable_ Multiplicative Rational where tryCancelR_# _ = coerce $ flip baseDivNonZero
+deriving via BaseInterop Rational instance PartiallyCancellableL_ Multiplicative Rational
+instance DecidablyCancellableL_ Multiplicative Rational where tryCancelL_# _ = coerce $ flip baseDivNonZero
+deriving via BaseInterop Rational instance PartiallyCancellableR_ Multiplicative Rational
+instance DecidablyCancellableR_ Multiplicative Rational where tryCancelR_# _ = coerce $ flip baseDivNonZero
deriving via BaseInterop Rational instance PartiallyHasInverses_ Multiplicative Rational
instance DecidablyHasInverses_ Multiplicative Rational where tryInvert_# _ = coerce baseRecipNonZero
deriving via BaseInterop Rational instance IsDivisionRing Rational
-- TODO: Switch-out base combinators for Lude's
instance (IsSemigroup_ this a) => IsSemigroup_ this (r -> a) where combine_ _ = Base.liftA2 (combine_ this)
-instance (PartiallyLeftCancellable_ this a) => PartiallyLeftCancellable_ this (r -> a) where cancelL'_ _ = Base.liftA2 (cancelL'_ this)
-instance (PartiallyRightCancellable_ this a) => PartiallyRightCancellable_ this (r -> a) where cancelR'_ _ = Base.liftA2 (cancelR'_ this)
+instance (PartiallyCancellableL_ this a) => PartiallyCancellableL_ this (r -> a) where cancelL'_ _ = Base.liftA2 (cancelL'_ this)
+instance (PartiallyCancellableR_ this a) => PartiallyCancellableR_ this (r -> a) where cancelR'_ _ = Base.liftA2 (cancelR'_ this)
instance (IsMonoid_ this a) => IsMonoid_ this (r -> a) where neutral_ _ = Base.const (neutral_ this)
instance (PartiallyHasInverses_ this a) => PartiallyHasInverses_ this (r -> a) where invert'_ _ = Base.fmap (invert'_ this)
-instance (IsGroup_ this a) => DecidablyLeftCancellable_ this (r -> a) where tryCancelL_# _ = just# .* cancelL'_ this
-instance (IsGroup_ this a) => DecidablyRightCancellable_ this (r -> a) where tryCancelR_# _ = just# .* cancelR'_ this
+instance (IsGroup_ this a) => DecidablyCancellableL_ this (r -> a) where tryCancelL_# _ = just# .* cancelL'_ this
+instance (IsGroup_ this a) => DecidablyCancellableR_ this (r -> a) where tryCancelR_# _ = just# .* cancelR'_ this
instance (IsGroup_ this a) => DecidablyHasInverses_ this (r -> a) where tryInvert_# _ = just# . invert'_ this
instance (IsGroup_ this a) => IsGroup_ this (r -> a)
instance (Commutative_ this a) => Commutative_ this (r -> a)