Waldek Hebisch
unread,Feb 2, 2017, 3:13:49 PM2/2/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to aldor...@googlegroups.com
Peter Broadbery wrote:
>
> Not sure about the last two; the second argument of "has" should
> really be a category, as having any type on the right would allow
> things like "X has Float", which ought to be an error.
> Effectively in aldor, "has" is of type "(Type, Category) -> Boolean".
>
> This still allows things like "Ring has SetCategory", at least in theory.
>
> > So it seems that has should be defined for categories and
> > return appropiate values (corresponding to operations that
> > one can do on types), like
> >
> > Group has Group ---> false
> > Group has Category ---> true
> > Group has Type ---> true
IIUC both Category and Type are categories, so in principle are
OK for second argument to 'has'. Float definitely is not a
category...
BTW, hypoterical code:
my_has(A : Type, B : Type) : Boolean ==
B has Category => A has B
A is B
BTW2: If one wants to compute with categories than probably
beside 'has' one need another predicate, say
extends : (Category, Category) -> Boolean
which return true when first argument is an extention of
the second one. At first glance one may confuse it with
'has' but it works at different level.
--
Waldek Hebisch