On 31 October 2016 at 09:21, Bill Page <[email protected]> wrote:
> ...
> Yes, saying that 'Category' has no type, i.e. that 'typeOf(typeOf
> Type)' should return 'Failed' seems more sensible to me. In that case
> what FriCAS actually does is worse than what it appeared to be when
> typing 'typeOf(Category)' in the interpreter.
>
> But I also wonder why 'typeOf(Integer)' is 'Type', i.e. that specific
> category 'Type'. Why not 'Ring' or some other category that 'Integer'
> satisfies?

Actually, thinking about this again, if 'typeOf' can return a category
as the type of some domain why doesn't 'typeOf(Integer)' return
exactly the category that appears to the right of the : when 'Integer'
is defined?

Integer : Join(IntegerNumberSystem, LinearlyExplicitOver Integer,
               PolynomialFactorizationExplicit, ConvertibleTo String,
               OpenMath, Canonical, canonicalsClosed) with
    random   : % -> %
      ++ random(n) returns a random integer from 0 to \spad{n-1}.

Yes, this might be a bit awkward except perhaps when used programmaticaly as in

(1) -> Float has typeOf(Integer)

   (1)  true

where the current result seems of little value.

-- 
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.

Reply via email to