Hi Travis, On 2015-11-05, Travis Scrimshaw <tsc...@ucdavis.edu> wrote: > I would then be advocating for using UniqueRepresentation if that was > the only issue.
It really depends whether in comparing manifolds you would prefer to do *some* heuristics to detect homeomorphic manifolds, or prefer to consider manifolds unequal if they were created with different input data. > However the problem I see is this (even for using > CachedRepresentation). Suppose you created a 2-sphere called 'S', and then > you created a manifold called 'M' and worked with that for a while, took a > lunch break, came back and did some more work. Then you wanted to create a > genus 3 surface called 'S' in the same session. All of a sudden, to your > surprise, you have charts that tell you 'S' is a sphere (because you forgot > you had one previously defined). This also means we have to have > `_clear_cache_()` calls all throughout the doctests. Pardon? The variable name of a manifold will certainly not be part of the input data. What I rather mean is this: The three-dimensional sphere can be constructed, for example, - as the boundary of the four-dimensional unit ball, - by gluing two 3-balls together, - by a Heegaard diagram (infinitely many possibilities) 1. Do you want that all possible ways to construct a 3-sphere yield the same object? Not feasible. 2. Do you want that distinct constructions yield distinct (but potentially homeomorphic) objects, whereas two equal Heegaard diagrams will result in the same object? Feasible. Then, do you want that comparison of manifolds does some heuristic of solving the homeomorphism problem? a) If you do, then use CachedRepresentation b) If you don't, use UniqueRepresentation 3. Assume that you construct a three-manifold out of a Heegaard diagram, and then do the same construction again. Would you accept that the result of the two constructions are two distinct objects? Then don't use CachedRepresentation. Do you, in addition, accept that the two distinct objects evaluate unequal, even though they obviously are equal? Then you can use EqualityById. Best regards, Simon > So I'm somewhat inclined to use EqualityById and let the pickling be > broken (and redefining _test_pickling to do nothing (i.e., passes) with a > docstring warning that it is intentionally broken). I'm starting to become > really convinced that this is the way to go. > > Best, > Travis > -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.