Ralf Hemmecke wrote:
> 
> (1) -> SI ==> Set Integer
>                                                                    Type:
> Void
> (2) -> SSI ==> Set SI
>                                                                    Type:
> Void
> (3) -> si:SI := set [2]
> 
>    (3)  {2}
>                               Type: Set(Integer)
> (4) -> subset?(si,si)
> 
>    (4)  true
>                               Type: Boolean
> (5) -> ssi: SSI := set [si]
> 
>    (5)  {{2}}
>                               Type: Set(Set(Integer))
> (6) -> subset?(ssi,ssi)
> 
>    (6)  false
>                               Type: Boolean
> 
> Why does (6) give false? Either that is a bug or I must be doing
> something wrong. But what?

AFAICS it is a silly bug in 'subset?'.  If we have Set(X) and
X is ordered (like Integer) then w use one algorithm.  In
unorderd case we use:

   subset?(s, t)   ==
       #s < #t and every?((x : S) : Boolean +-> member?(x, t), parts s)

from FiniteSetAggregate.  Of course we should have '#s <= #t'.


-- 
                              Waldek Hebisch
[email protected] 

-- 
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.

Reply via email to