fundamental principles of counting - 2nd try



On Fri, Aug 6, 2010 at 2:09 PM, Wolfgang Lindner <LindnerW at t-online.de> wrote:

> the pairs [1,2] ~ [2,1] are the same set([1,2])=set([2,1])={1,2},
> so only one exemplar should survive the filtering.
> The solution is very roughly:
>
> (%i57) Events_nOwR (n,k) ?:= fullsetify( Events_wOwR(n,k) )$
> ? ? ? Events_nOwR(4,2);
> (%o58) {{1},{1,2},{1,3},{1,4},{2},{2,3},{2,4},{3},{3,4},{4}}
>
> .. but [1,1] --> {1}, which is not ok.
>
> Q: how to do the right 'filtering'?

How about this, instead of constructing a list [1, 1], [1, 2], ...
construct expressions p(1, 1), p(1, 2), ...
and declare p commutative so that p(2, 1) simplifies to p(1, 2).
Then {p(1, 2), p(2, 1), p(1, 1)} => {p(1, 1), p(1, 2)}.

If I';m not mistaken, set elements are always compared by "="
(actually ALIKE1 in Lisp). It would be interesting to be able to
specify a different kind of sameness. I guess this is essentially
a quotient set construction. It would be easy to recognize a
notation like S / "~" or S / lambda([x, y], ...) where the right hand
side of "/" is the equivalence operator of interest.

HTH

Robert Dodier