Hi Dima!

Thank you for your replies!  I understand the technicalities, but my main 
question is: do we really want that?

I should add that it took me a long while to figure out what's happening, 
because in my application I computed orbits under an action, and I observed 
that the orbit sizes were wrong.  Through tracing, I figured that 
`orbit_decomposition` is using sets (which is OK, of course), and that 
containment in sets is different than containment in lists.

Note that this does not happen for DyckWords or Permutations.

I think - should we decide that we do not want this - we could try to add a 
test to the category framework.  Is there already some structure in place 
to get from the class in infinite enumerated sets to the subclass in finite 
enumerated sets?

Martin
On Friday, 2 December 2022 at 18:15:32 UTC+1 dim...@gmail.com wrote:

> but you can use Set() (a Sage's class for sets), which is much more sane 
> here:
>
> sage: f in Set(P)
> True
> sage: g in Set(P)
> True
>
>
> On Fri, Dec 2, 2022 at 5:13 PM Dima Pasechnik <dim...@gmail.com> wrote:
> >
> > in fact, you can see that
> >
> > sP=set(P)
> > sP.add(g)
> > len([t for t in sP])==len(P)+1
> >
> > gets you True...
> >
> >
> > On Fri, Dec 2, 2022 at 5:08 PM Dima Pasechnik <dim...@gmail.com> wrote:
> > >
> > > On Fri, Dec 2, 2022 at 5:05 PM 'Martin R' via sage-devel
> > > <sage-...@googlegroups.com> wrote:
> > > >
> > > > OK, thank you, but is this really intentional? I would have thought 
> that x in P and x in set(P) should give the same result.
> > > I guess that hashing is done using a .parent()...
> > >
> > > >
> > > > On Friday, 2 December 2022 at 16:57:50 UTC+1 dim...@gmail.com wrote:
> > > >>
> > > >> On Fri, Dec 2, 2022 at 2:44 PM 'Martin R' via sage-devel
> > > >> <sage-...@googlegroups.com> wrote:
> > > >> >
> > > >> > a hashing problem, maybe?
> > > >>
> > > >> to me, is't a problem of different "types" (.parent(), to be 
> precise.
> > > >> See my reply on the ticket)
> > > >>
> > > >> >
> > > >> > On Friday, 2 December 2022 at 15:43:33 UTC+1 Martin R wrote:
> > > >> >>
> > > >> >> I need help with https://trac.sagemath.org/ticket/34817
> > > >> >>
> > > >> >> Essentially, I have a list P and an object g such that g in P 
> but g not in set(P).
> > > >> >>
> > > >> >> How could this happen?
> > > >> >
> > > >> > --
> > > >> > You received this message because you are subscribed to the 
> Google Groups "sage-devel" group.
> > > >> > To unsubscribe from this group and stop receiving emails from it, 
> send an email to sage-devel+...@googlegroups.com.
> > > >> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/3740834b-7ff2-478c-9ce5-0b33b439b157n%40googlegroups.com
> .
> > > >
> > > > --
> > > > You received this message because you are subscribed to the Google 
> Groups "sage-devel" group.
> > > > To unsubscribe from this group and stop receiving emails from it, 
> send an email to sage-devel+...@googlegroups.com.
> > > > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/566e74d7-638e-4baa-8f25-919bb20bb7e7n%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/a4e40113-2098-419f-a528-bf39ebdc3d33n%40googlegroups.com.

Reply via email to