Gabriel Dos Reis wrote:
> 
> Waldek Hebisch <[email protected]> writes:
> 
> | Gabriel Dos Reis wrote:
> | > 
> | > Waldek Hebisch <[email protected]> writes:
> | > 
> | > | Note2: I have no idea if/how the construct:
> | > | 
> | > |     false == per constantKernel FALSE
> | > |     true == per constantKernel TRUE
> | > | 
> | > | works in OpenAxiom. 
> | > 
> | > Yes, it does.
> | 
> | In FriCAS it would not typecheck.  constantKernel is of type %,
> | while '%false is of type Symbol.
> 
> In OpenAxiom, we have
> 
>    (1) -> )di op constantKernel
> 
>    There is one exposed function called constantKernel :
>       [1] D2 -> Kernel D3 from KernelFunctions2(D2,D3)
>                if D2 has SETCAT and D3 has SETCAT
> 
> 
> In the context where it is used, constantKernel is taken from
> `KernelFunctions2(Identifier,%)' because of the import line
> 
>     import KernelFunctions2(Identifier,%)
> 
> Consequently, the expression `constantKernel FALSE' has type `Kernel %'
> which is the second branch of the representation domain.  Finally the
> operator `per' blesses that object of type 'Kernel %' into `%'.
> 
> It would have worked the same if I used Symbol instead of Identifier,
> but in OpenAxiom we tend to use Identifier when we do not expect
> subscripted names (like obviously the case here.)
> 
> Any reason why that chain of events isn't happening in FriCAS?
> 
> |  Even if OpenAxiom compiler
> | performs some magic coercions I wonder if result really
> | has correct representation.
> 
> There is no magic coercions (except that a simple identifier in
> a context where Identifier is expected is of type Identifier; otherwise
> it is Symbol.)  What are the reasons for your wondering?
> 

OK, you are right.  The code did not compile due to Identifier,
and I jumped too quickly to (wrong) conclusions.

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to