On 02/02/2018 08:34 AM, oldk1331 wrote:
> On Fri, Feb 2, 2018 at 2:42 PM, Ralf Hemmecke <[email protected]> wrote:
>> On 02/01/2018 02:46 AM, oldk1331 wrote:
>>> We can add default implementation of 'leftRecip', 'rightRecip'
>>> to be 'recip' in Group.
>>
>> The patch
>>
>> https://github.com/hemmecke/fricas/commit/a9a7c7d72cdc2a7e3527a505c675ee3b09fcbb05
>>
>> https://github.com/hemmecke/fricas/commit/a9a7c7d72cdc2a7e3527a505c675ee3b09fcbb05.patch
>>
>> looks fine to me, but I think, it should be extended, because it doesn't
>> solve my original problem with Fraction Integer.
>>
>> In fact, we should at least implement left/rightRecip in each place
>> where recip or inv is implemented. DivisionRing is, for example, such a
>> candidate. I have, however, not yet done a complete search for all such
>> candidates.
>>
>> Ralf
>
> I suppose CommutativeRing is the right place.
Ah, yes. Mistakingly, I thought that recip must be implemented. But you
are right.
Waldek, would you have anything against the above patch together with
diff --git a/src/algebra/catdef.spad b/src/algebra/catdef.spad
index 5f22027..7909a38 100644
--- a/src/algebra/catdef.spad
+++ b/src/algebra/catdef.spad
@@ -225,6 +225,9 @@ CharacteristicZero() : Category == Ring
++ \spadop{*} is commutative, and which have a multiplicative identity.
++ element.
CommutativeRing() : Category == Join(Ring, Algebra(%), CommutativeStar)
+ add
+ leftRecip(x : %) == recip(x)
+ rightRecip(x : %) == recip(x)
?
I will of course first check whether it works find, before I commit to
SVN. No time at the moment.
Ralf
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.