On 03/24/2015 02:35 PM, Waldek Hebisch wrote: > I admit that current situation where at category level we claim > there here is hash function, but a lot of domains lack implementaion > is unsatisfactry. But it is not clear what to do. We could > introduce new category, say 'Hashable' and make sure that > domains which export 'Hashable' also implement 'hash'.
My first reaction to this is, yes. There should be Hashable. That would be much better than putting it into SetCategory. And... it sounds like a pretty easy modification. And it would remove some unusable "unimplemented" functions like claiming a hashfunction for Expression (i.e. some unsoundness). Hashable then basically says that the domain has a canonical representation. And Hashable would have to have equality. So there would also be no need for modifying XHashTable. > However, weaker requirement on 'hash' would seriously limit > its usefulness, basicaly to cases when one works with > representaion. Since we want to hide representation, this > is serious limitation. That goes into the same direction that I was proposing with ExpressionRep (which was called LexicalExpression by Bill). LexicalExpression could export Hashable while Expression would not. Maybe LexicalExpression could be made useful for caching... I'm not sure and actually not really interested in this code at the moment. > Similarely, power series and streams are problematic (they are > supposed to be lazy but hash function has to access elements). I don't think it makes sense to hash infinite structures. > The point is that I would like to eventiually remove > unsoundness. If we allow new unsoundness to get in then > there is almost no chance of removing unsoundness ... Good!!! I hope, some day Float no longer claims to be a Field. 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 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.
