I actually don't see how to do this, because ParkingFunction inherits the 
implementation of _hash_ from ClonableArray, just the same as, for example 
DecoratedPermutation, where the problem does not occur.

Any ideas?

On Saturday, 3 December 2022 at 18:15:35 UTC+1 Nils Bruin wrote:

> On Saturday, 3 December 2022 at 06:41:30 UTC-8 axio...@yahoo.de wrote:
>
>> 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?
>>
>> This is really the usual thing about hashes and equality: for sets to 
> behave consistently, one needs that elements that test equal have identical 
> hashes. If you allow equality through coercion, this quickly becomes 
> impossible. In fact, transitivity of equality is already difficult: 
> GF(3)(4) == ZZ(4) and ZZ(4) == GF(5)(4).
>
> For this particular one, where parking functions of specific length are 
> completely described as subsets of parking functions, it seems like 
> equality should not be a problem, so the hash should probably not taking 
> into account the "length" in the parent. 
>

-- 
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/b1526e51-3bed-4025-b3e5-4a205a8209a9n%40googlegroups.com.

Reply via email to