
Zippers for non-inductive types - matt_d
http://danghica.blogspot.com/2018/11/zippers-for-non-inductive-types.html
======
wz1000
> Set(A) = ∑n A^n/n! = e^A since there are n! permutations to quotient by.

But this is wrong. The number of sets over A={0,1,2} is 2^3 = 8 /= e^3

The actual series should be

    
    
        Set(A) = ∑n (A*(A-1)*(A-2)..(A-n+1))/n! = 2^A
    

This is also consistent with the fact that Set(A) ~ A -> Bool

~~~
danharaj
Right, that is the formula for multisets, or bags as they are also called.

~~~
wz1000
No, I believe the formula for multisets would be

    
    
        M(x) = ∑n (A*(A+1)*(A+2)..(A+n-1))/n!
    

since there are (n+k+1)c(k+1) possible unordered n-tuples over a set with
cardinality k.

------
Cobord
[https://en.wikipedia.org/wiki/Combinatorial_species](https://en.wikipedia.org/wiki/Combinatorial_species)

