On 2013-05-30, Richard Fateman <fateman at eecs.berkeley.edu> wrote:
> I think I pointed you to http://www.cs.berkeley.edu/~fateman/papers/sets.pdf
> for other ideas.
Yes, that's a good paper. I've gone off on my own course for the
implementation, but I'm aligned with the general ideas.
> The notion of of intersection() as a universal set is uncomfortable.
> Must all sets use elements from the same universe? If not, how to
> distinguish? Require definition of Universe??
Well, one could have a symbol 'universal_set. But it's status as a
universal set depends on its properties -- properties that
'intersection() has as well. So we can have one less symbol and maybe
avoid some special cases in the code -- I admit that's not a big win.
Whether all sets come from the same universe is an interesting question,
which we have to answer whatever the representation. As it stands the
universe is effectively the set of all Maxima expressions. But I
wouldn't mind seeing things like S = { x in U s.t. P(x) } for which we
can treat U as the universe.
> Did you have a motivating application in mind?
Generally speaking I'd like to use sets to express assumptions and
otherwise annotate other expressions. Part of it would be to replace
declarations with set notations -- e.g. instead of declare(x, integer),
say something like assume(elementp(x, integers)).
The stuff I have in mind is fairly trivial and therefore easily
achieved, I believe. E.g. in recent stuff with summations over
kron_delta, I wanted to express the notion that the result is nonzero
only if an index falls in a certain range -- that is easily expressed
with simple set operations.
best
Robert Dodier