Bill Page wrote:
> 
> The bug was apparently triggered in the application of a rule but the code
> itself does not call applyQuote directly.
> 
> simplifyHat:=rule
>   dot(P, Q)^2-dot(P,P)*dot(Q,Q) == hat(P,Q)^2
>   -dot(P,Q)^2+dot(P,P)*dot(Q,Q) == -hat(P,Q)^2
>   dot(Q,R)*dot(P,R)-dot(R,R)*dot(P,Q) == dot(hat(R,Q),hat(R,P))
> --
> 
> Triggers the bug:
> 
>    >> Error detected within library code:
>    Unknown operator
> 

Thanks.  I see, "applyQuote" is introduced by the interpreter (rule
parser):

(1) -> parse("rule dot(Q,Q) == hat(P,Q)")$InputForm

   (1)  (rule (dot 'Q 'Q) (applyQuote 'hat 'P 'Q) (construct 'hat))
                                                              Type: InputForm

The quote produced by "applyQuote" is intended to prevent evaluation
of "hat" during rewrites and is removed after each rewrite by "eval"
(the one from FunctionSpace).  Not nice, but makes sense.

BTW:  We have:

(3) -> parse("rule dot(Q) == hat(P,Q,Q,Q,Q)")$InputForm         

   (3)  (rule (dot 'Q) (applyQuote 'hat 'P 'Q 'Q 'Q 'Q) (construct 'hat))
                                                              Type: InputForm

so interpreter blindly creates 6 argument version of "applyQuote"
and

rule dot(Q) == hat(P,Q,Q,Q,Q)

produces error, since "applyQuote" accepts at most five arguments...

-- 
                              Waldek Hebisch

-- 
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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to