[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Nils Bruin
On Thursday, November 5, 2015 at 2:30:08 AM UTC-8, Simon King wrote: > Certainly, if "A is B" then "A==B" will be True. Actually I am not sure > if A.__eq__ would be invoked at all if you compare to identical objects > (i.e., I don't know what Python does). > This is famous in Python: sage:

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Nils Bruin
On Thursday, November 5, 2015 at 2:35:57 PM UTC-8, Eric Gourgoulhon wrote: > > Yes charts are immutable: a chart is defined by two parameters, which are > passed to the constructor: its domain (a manifold) and its coordinates (a > list of symbolic variables). These two parameters do not change du

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Eric Gourgoulhon
Thanks for your suggestions. Le jeudi 5 novembre 2015 18:54:40 UTC+1, Nils Bruin a écrit : > > On Thursday, November 5, 2015 at 7:22:10 AM UTC-8, Travis Scrimshaw wrote: >> >>So I'm somewhat inclined to use EqualityById and let the pickling be >> broken (and redefining _test_pickling to do no

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Nils Bruin
On Thursday, November 5, 2015 at 10:42:47 AM UTC-8, Eric Gourgoulhon wrote: > > > So we see that the objects used as keys are charts, vector frames and > manifolds. > I think that's a very strong reason to go with equality-by-id and *not* unique representation: You really don't want to risk tha

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Eric Gourgoulhon
For the benefit of the discussion, here is the list of dictionaries involved in the manifold tickets colllected at #18528 . Each dictionary is presented in the form - values | key: the key - chart restrictions | key: open subset (i.e. manifold) - transit

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Nils Bruin
On Thursday, November 5, 2015 at 7:22:10 AM UTC-8, Travis Scrimshaw wrote: > >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

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Jeroen Demeyer
On 2015-11-05 16:27, Travis Scrimshaw wrote: I'm guessing a random large number is better because it won't stop working in 2038? Mostly, it's better because there is a much smaller chance of collisions: there is a hidden assumption that there will not be 2 manifolds created with the same time

Re: [sage-devel] Installation of bliss-package

2015-11-05 Thread Jeroen Demeyer
On 2015-11-05 16:18, Jori Mäntysalo wrote: So I suspect that somehow the package installation does not trigger something it should. Yes, this is a known issue. I wouldn't really call it a "bug" since it's documented by the following message after installing a package: Warning: it might be ne

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Travis Scrimshaw
On Thursday, November 5, 2015 at 5:08:15 AM UTC-6, Jeroen Demeyer wrote: > > On 2015-11-05 01:26, Travis Scrimshaw wrote: > > So we > > add an additional unique identifier to the cache key, the time from the > > epoch the object was created. > > That's an extremely ugly hack. If you absolutely

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Travis Scrimshaw
Hey Simon, > > What about a mixed approach: It seems that you have, on the one hand, > nice manifolds that you know by name (S^n, T^n, RR^n, L(p,q), ...). You > want that manifolds that you know by name are identical if and only if > they have the same name. But you also want to be able to buil

[sage-devel] Installation of bliss-package

2015-11-05 Thread Jori Mäntysalo
Shortly: Can someone WITHOUT bliss installed try sage -c 'from sage.graphs.bliss import canonical_form' sage -i bliss sage -c 'from sage.graphs.bliss import canonical_form' make sage -c 'from sage.graphs.bliss import canonical_form' * * * Long version: I got strange error, and hope that someo

Re: [sage-devel] source code comments: doctesting instructions

2015-11-05 Thread Samuel Lelievre
We could also have something like # test yearly and just make sure to test those at least yearly. -- 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+

Re: [sage-devel] Re: ipython-notebook: show picture in notebook (e.g. latex-tikz)

2015-11-05 Thread Daniel Krenn
On 2015-11-03 12:50, Jean-Baptiste Priez wrote: > Hello tikz lovers!! > > I create a(nother) ticket to use tikz picture with jupiter > (http://trac.sagemath.org/ticket/19515 > ). +1 for making this work in jupiter > (I don't understand the reason of the tic

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Jeroen Demeyer
On 2015-11-05 01:26, Travis Scrimshaw wrote: So we add an additional unique identifier to the cache key, the time from the epoch the object was created. That's an extremely ugly hack. If you absolutely must use a unique identifier, generate a sufficiently large random number. -- You received

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Simon King
Hi Eric, On 2015-11-05, Eric Gourgoulhon wrote: > Le jeudi 5 novembre 2015 10:32:29 UTC+1, Simon King a =C3=A9crit : > Yes this is precisely what we had in mind: to delegate the mathematical > comparison of manifolds to a specific method is_homeomorphic, which > in most case will answer "I cannot

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Eric Gourgoulhon
Le jeudi 5 novembre 2015 01:57:27 UTC+1, Nils Bruin a écrit : > > On Wednesday, November 4, 2015 at 2:10:51 PM UTC-8, Eric Gourgoulhon wrote: >> >> Hi sage-dev, >> >> There is an ongoing discussion at #18529 >> about defining __eq__ for >> manifolds and w

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Simon King
Hi Eric, On 2015-11-05, Eric Gourgoulhon wrote: > This is precisely why in the current setting the string representing the > manifold's name is part of the manifold's identity, thanks to the=20 > UniqueRepresentation mechanism. No, this is thanks to the CachedRepresentation mechanism only! Uniqu

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Eric Gourgoulhon
Le jeudi 5 novembre 2015 10:32:29 UTC+1, Simon King a écrit : > > > - Or IF you really want to use them as dictionary keys, then just let > manifolds compare by identity (so, you allow that two homeomorphic > manifolds evaluate as non-equal), and have a separate method > M.is_homeomor

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Eric Gourgoulhon
Hi Simon, Thanks for your feedback! Le jeudi 5 novembre 2015 10:17:35 UTC+1, Simon King a écrit : > > Hi Eric, > > > Are you serious? Certainly you are aware that there is no algorithm that > would be able to test whether two arbitrary compact 4-manifolds are > homeomorphic. And if I am not m

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Simon King
Hi Nils, On 2015-11-05, Nils Bruin wrote: > In general, I don't think there is a real problem if > > A = manifold( B = manifold( > has (A is B) equal to False. I would think it's not really a problem if it > has A == B equal to False. +1 > Indeed, this would mean that manifolds stored in separ

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Simon King
Hi Travis, On 2015-11-05, Travis Scrimshaw wrote: > - We need the manifold to be defined in order for check the charts (as it > is the domain of said map). > - We can't just use EqualityById without UniqueRepresentation because this > breaks pickling. > - We can only define manifolds by (latex)

[sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Simon King
Hi Eric, On 2015-11-04, Eric Gourgoulhon wrote: > The context is as follows: > > - Manifolds are parents, whose elements are points. > - Manifolds are characterized by a user-defined atlas, which is a list of > coordinate charts defined on the > fly by the user, along with transition maps. "De