Hi Waldek,

I just found another instance of an overlapping default implementations.

In AbelianGroup
https://github.com/fricas/fricas/blob/master/src/algebra/catdef.spad#L34
opposite?(x,y) == x = -y

In AbelianMonoid
https://github.com/fricas/fricas/blob/master/src/algebra/catdef.spad#L75
opposite?(x,y) == zero?(x + y)

While this looks computationally equally expansive, the problem certainly is for functions that can be implemented more efficiently, in richer structures.

A few lines above
https://github.com/fricas/fricas/blob/master/src/algebra/catdef.spad#L29
I find

  if not (% has Ring) then ...

which does not really look attractive to me since it makes AbelianMonoid depending on Ring and thus creating an actually needless circular dependency.

Anyhow, the common understanding is still that it is **undefined** which of the overlapping default implementations is actually used when a domain does not explicitly implements that function, right?

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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/48a9e7f4-b1e3-4cf0-9516-03f6e4129340%40hemmecke.org.
  • [fricas-devel] defaul... 'Ralf Hemmecke' via FriCAS - computer algebra system

Reply via email to