Hi Kurt,

You do not need to create a new domain. It also fails to work with XDP in the latest master.

Actually, if I am not wrong than "A has C" only tells you that C is explicitly mentioned in the exports of A, but not whether there is an actual implementation for C.

(1) -> Expression Integer has SemiRing

   (1)  true
(2) -> R   ==> Expression Integer
(3) -> SYM ==> Symbol
(4) -> XDP  ==> XDistributedPolynomial(SYM,R)
(5) -> [x::XDP for x in [X,Y,Z]]

   (5)  [X, Y, Z]
   Type: List(XDistributedPolynomial(Symbol,Expression(Integer)))

(6) -> [a,b,c] := [x::XDP for x in [X,Y,Z]]

   (6)  [X, Y, Z]
   Type: List(XDistributedPolynomial(Symbol,Expression(Integer)))
(7) -> a

   (7)  X
   Type: XDistributedPolynomial(Symbol,Expression(Integer))
(8) -> r := a*b^2*c^4

           2 4
   (8)  X Y Z
   Type: XDistributedPolynomial(Symbol,Expression(Integer))
(9) -> retract r
Function: retractIfCan : % -> Union(FreeMonoid(Symbol),"failed") is missing from domain: XDistributedPolynomial(Symbol,Expression(Integer))
   Internal Error
   The function retractIfCan with signature
      (Union (FreeMonoid (Symbol)) failed)$ is missing from domain
      XDistributedPolynomial(Symbol)(Expression (Integer))

(9) -> R

   (9)  Expression(Integer)

(10) -> R has SemiRing

   (10)  true

(11) -> XDP has RetractableTo(FreeMonoid SYM)

   (11)  true

However, looking down the implementation chain tells me that retract should be implemented through FreeModule(R,FreeMonoid SYM). But we have

(12) -> F := FreeModule(R,FreeMonoid SYM)

   (12)  FreeModule(Expression(Integer),FreeMonoid(Symbol))
(13) -> F has RetractableTo(FreeMonoid SYM)

   (13)  true

(16) -> s := 'x::Symbol

   (16)  x
   Type: Symbol
(17) -> sf := s :: F

   (17)  x
   Type: FreeModule(Expression(Integer),FreeMonoid(Symbol))
(18) -> retract sf

   (18)  x
   Type: FreeMonoid(Symbol)

So indeed, your detected error is weird.
In fact, when you enter XDistributedPolynomial into HyperDoc browse, add the parameters vl=Symbol and R=Expression Integer, click on Operations and then on Implementation, it also tell you that retractIfCan is nowhere implemented.

My suspicion is that it has something to do with the conditional implementation of retract in FreeModule. I faintly remember that I once had a similar issue.

Looks like someone must use "git bisect run" to find out which commit causes the issue.

Ralf

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/9d8a33d8-2282-66bb-513f-e2e3fdf8794f%40hemmecke.org.

Reply via email to