[sage-devel] Re: Element.__hash__ stopgap

2015-10-02 Thread Nathann Cohen
> Sounds reasonable to me. Always returning 0 may slow things down, but it > will certainly not violate Python's "axiom" that elements evaluating > equal must have equal hashes. And we talk here about the default, i.e., > all specialised (fast) hash implementations will still be available. >

[sage-devel] Re: Element.__hash__ stopgap

2015-10-02 Thread Nils Bruin
On Friday, October 2, 2015 at 2:18:47 AM UTC-7, Simon King wrote: > > And on second thought: Always returning 0 may actually speed things > *up*! There will be more hash collisions. But determining the string > representation to determine the hash can be very slow. > I think you are underestima

[sage-devel] Re: Element.__hash__ stopgap

2015-10-02 Thread mmarco
If the problem is the computation of the Cayley graph on finitely presented groups, fixing the hash is not the solution. Computing the Cayley graph means being able to solve the word problem in the group, which is, in general, hopeless. There are some techniques that can be used in big families

[sage-devel] Re: Element.__hash__ stopgap

2015-10-02 Thread Simon King
Hi Vincent, On 2015-10-02, Vincent Delecroix <20100.delecr...@gmail.com> wrote: > #19331: return 0 as a default hash for Element Sounds reasonable to me. Always returning 0 may slow things down, but it will certainly not violate Python's "axiom" that elements evaluating equal must have equal ha