[sage-devel] Re: VOTE: move Sage development to Github

2022-10-03 Thread Simon Brandhorst
+1 GitHub On Sunday, October 2, 2022 at 6:51:39 PM UTC+2 kesha...@gmail.com wrote: > +1 for GitHub (hi folks ) > > -Keshav > > On Wednesday, September 21, 2022 at 10:23:36 AM UTC-7 David Roe wrote: > >> Dear Sage developers, >> Following extensive discussion, both recently >>

Re: [sage-devel] any([magma(True),magma(True)]) produces stack overflow

2022-02-18 Thread Simon Brandhorst
n C. Walker' via sage-devel < > sage-...@googlegroups.com> wrote: > > > > > > > On Feb 18, 2022, at 08:09 , Simon Brandhorst wrote: > > > > > > ``` > > > sage: any([magma(True),magma(True)]) > > > Fatal Python error:

[sage-devel] any([magma(True),magma(True)]) produces stack overflow

2022-02-18 Thread Simon Brandhorst
``` sage: any([magma(True),magma(True)]) Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow. Python runtime

[sage-devel] [SageTerminalApp] ERROR | Failed to create history session

2020-06-19 Thread Simon Brandhorst
When working with multiple terminals I frequently get the following Error. Usually when the other terminal is busy. [SageTerminalApp] ERROR | Failed to create history session in /home/simon/. sage/ipython-5.0.0/profile_default/history.sqlite. History will not be saved .Traceback (most recent

[sage-devel] Re: quadratic forms signature_vector() gives different results for real cyclotomics and for reals

2019-10-21 Thread Simon Brandhorst
A quadratic form is a map F^n ---> F. The signature is supposed to be independent of the choice of basis. So the number of positve/negative eigenvalues makes sense only for F = the reals. For instance in the complex numbers you can always find an orthogonal basis with gram matrix

[sage-devel] Re: quadratic forms signature_vector() gives different results for real cyclotomics and for reals

2019-10-20 Thread Simon Brandhorst
Dear Ignat Soroko, the quadratic forms code was written with quadratic forms over QQ and over ZZ in mind. So I would be very sceptic about any functionality over number fields. For instance the signature vector you mention does not make sense of the F. =CyclotomicField(8). Instead of a single

[sage-devel] Re: direct sums, products and other categorical constructions

2019-05-27 Thread Simon Brandhorst
tive basis matrix of the modules. If one calls projections/co projections it would create the objects again. That could solve the memory leak issue? (but recreating the objects feels like a weird workaround.) On Friday, May 24, 2019 at 2:14:04 PM UTC+2, Simon King wrote: > > Hi Simon, > >

Re: [sage-devel] direct sums, products and other categorical constructions

2019-05-23 Thread Simon Brandhorst
I can live with (V, projections, coprojections) but I dislike hiding everything in lists (or lists of lists, or lists of lists of lists..). Being able to type VW.projections(1) would just be so much nicer. -- You received this message because you are subscribed to the Google Groups

[sage-devel] direct sums, products and other categorical constructions

2019-05-22 Thread Simon Brandhorst
Right now I can do sage: V = ZZ^2 sage: D = V.direct_sum(V) sage: D Free module of degree 4 and rank 4 over Integer Ring Echelon basis matrix: [1 0 0 0] [0 1 0 0] [0 0 1 0] [0 0 0 1] But the result has forgotten that it is a direct sum. Of a direct sum I expect, that it has a projection and a

[sage-devel] Re: Quadratic Form is_globally_equivalent_to Bug

2019-04-29 Thread Simon Brandhorst
This is now https://trac.sagemath.org/ticket/27749 -- 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

[sage-devel] Re: Quadratic Form is_globally_equivalent_to Bug

2019-04-26 Thread Simon Brandhorst
Thanks a lot for reporting. This is certainly a bug. It seems to originate in pari (confirm with qfisom in https://pari.math.u-bordeaux.fr/dochtml/html/Vectors__matrices__linear_algebra_and_sets.html ) On Thursday, April 25, 2019 at 11:49:23 AM UTC+2, Ethan Yang wrote: > >

[sage-devel] Re: Smith Normal Form over ZZ seriously slow

2019-04-01 Thread Simon Brandhorst
Is there a ticket for this? -- 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

Re: [sage-devel] Reporting bug:the errors about method "is_trivial() in module sage.rings.ideal"

2019-03-10 Thread Simon Brandhorst
Hi Simon, I can see your reasons. They seem to be from the perspective of someone who knows about computer algebra. But a mathematician and casual user of sage will think of an ideal as a subset of a ring. He/she will be oblivious of the implementation details and expect x in J to be a

Re: [sage-devel] ValueError: filedescriptor out of range in select()

2019-03-03 Thread Simon Brandhorst
On Sunday, March 3, 2019 at 1:09:45 PM UTC+1, Jeroen Demeyer wrote: > What is it that you're *actually* trying to do? > Use the gp code by Denis Simon in /src/ext/pari/simon didnt know how to feed that to pari, so I used gp. And that is what I saw in schemes/elliptic_curves/gp_simon.py:

Re: [sage-devel] ValueError: filedescriptor out of range in select()

2019-03-03 Thread Simon Brandhorst
On Sunday, March 3, 2019 at 12:50:42 PM UTC+1, Jeroen Demeyer wrote: > But maybe it's not closed *immediately*. It would be interesting to do > the same experiment with a time.sleep(0.1) or a gc.collect() in the loop. > I tried that sage: for k in range(1): : gp = Gp() :

[sage-devel] Re: ValueError: filedescriptor out of range in select()

2019-03-03 Thread Simon Brandhorst
Ah I see and to answer my own question using grep: from sage.interfaces.gp import gp is probably what I should do. -- 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

Re: [sage-devel] ValueError: filedescriptor out of range in select()

2019-03-03 Thread Simon Brandhorst
Shouldn't the gp session be closed afterwards? After all it is not used/referenced anymore? So that the file descriptor gets freed again? If not what is the recommended way to start computations in gp (or gap/magma )? Say in some method in some class? give it some global gp instance as a

[sage-devel] Re: ValueError: filedescriptor out of range in select()

2019-03-03 Thread Simon Brandhorst
I can consistently reproduce that error. Tried again and crashed at k = 1888 and k = 1871 and k = 1842 maybe I am hitting some preset limit? -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving

Re: [sage-devel] ValueError: filedescriptor out of range in select()

2019-03-03 Thread Simon Brandhorst
Trying to provoke more errors: sage: from sage.env import SAGE_EXTCODE sage: for k in range(1): : gp = Gp() : gp.read(SAGE_EXTCODE + "/pari/simon/qfsolve.gp") : k breaks at k = 1922 with - OSError

[sage-devel] ValueError: filedescriptor out of range in select()

2019-03-03 Thread Simon Brandhorst
I am trying a medium scale computation. Unfortunately it breaks every time with error messages I do not know how to interpret. They may or may not be bugs in sage. Here is a traceback -- ValueError

[sage-devel] Re: During a libgap evaluation: SystemError: calling remove_from_pari_stack() inside sig_on()

2019-02-27 Thread Simon Brandhorst
This is now #27374 <https://trac.sagemath.org/ticket/27374> On Wednesday, February 27, 2019 at 9:53:35 AM UTC+1, Simon Brandhorst wrote: > > - > SystemError Traceback (most r

[sage-devel] Re: During a libgap evaluation: SystemError: calling remove_from_pari_stack() inside sig_on()

2019-02-27 Thread Simon Brandhorst
Okay. But I cannot reproduce the error consistently. Post anyways? -- 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

[sage-devel] During a libgap evaluation: SystemError: calling remove_from_pari_stack() inside sig_on()

2019-02-27 Thread Simon Brandhorst
- SystemError Traceback (most recent call last) in () > 1 classify_ord_pe(L,Integer(2),Integer(2),"results/order4.txt","w") /home/simon/.sage/temp/k3/8598/K3_aut_classification.sageqIg9CK.py in

[sage-devel] libgap does not free memory after hitting the memory limit

2019-02-06 Thread Simon Brandhorst
After running sage: V = libgap.GF(3)^2000 sage: libgap(V.Subspaces(1000)).List() --- ValueErrorTraceback (most recent call last) . ValueError: libGAP: Error, reached the pre-set memory

Re: [sage-devel] A naming question for an enumerator

2019-01-25 Thread Simon Brandhorst
The method may get lost among the many methods of a Quadratic Form. But I guess making it a static method of quadratic forms is a good idea. On Thursday, January 24, 2019 at 7:53:17 PM UTC+1, David Roe wrote: > > > > On Thu, Jan 24, 2019 at 1:27 PM Simon Brandhorst > wrot

[sage-devel] A naming question for an enumerator

2019-01-24 Thread Simon Brandhorst
So here is a question which came up in #24889: We have an enumerator of objects, let us call them breeds of dogs which returns all breeds with user defined properties e.g. breeds of small dogs. How would you give the user access to it in a sageish pythonic way: Let us say the way to create a

[sage-devel] Re: Some Magma help

2018-10-31 Thread Simon Brandhorst
Dear Kannappan, what is your definition of a lattice? I am working on some functionality for quadratic forms/lattices just search for QuadraticForm or IntegralLattice. However these work only over ZZ. I have some code queued up to compute spinor genera, genus representatives, maximal

[sage-devel] Re: no conversion between number fields (extensions) over base rings which have conversion

2018-10-18 Thread Simon Brandhorst
I would say because there is no canonically defined embedding as one can send i to -i as well. On Thursday, October 18, 2018 at 1:38:24 PM UTC+2, Daniel Krenn wrote: > > sage: CyclotomicField(3).extension(x^2+1, 'i')(QQ.extension(x^2+1, > 'i').gen()) > > returns > > TypeError: Cannot coerce

[sage-devel] Re: Special values of a dirichlet L-series are needed to rescue the mass formula in sage

2018-10-03 Thread Simon Brandhorst
cancel each other out. But I have not checked it. On Wednesday, October 3, 2018 at 3:21:16 PM UTC+2, Simon Brandhorst wrote: > > Apparently things are much simpler. It appears it is not a mathematical > error, but rather a computational. Frederic Chapoton added a > mass.canonica

[sage-devel] Re: Special values of a dirichlet L-series are needed to rescue the mass formula in sage

2018-10-03 Thread Simon Brandhorst
Apparently things are much simpler. It appears it is not a mathematical error, but rather a computational. Frederic Chapoton added a mass.canonicalize_radical() to deal with the symbolic part of the computation. I am now testing this against magma for a few thousand lattices of small

[sage-devel] Special values of a dirichlet L-series are needed to rescue the mass formula in sage

2018-10-03 Thread Simon Brandhorst
The mass of a positive definite quadratic form is defined as the sum over 1/#Aut(L') where L' runs over the representatives of the genus of L. It can be calculated by combining informations at the different completions of L at all primes by analytic methods. It is a particularly beautiful and

Re: [sage-devel] libgap is not using the available memory

2018-09-19 Thread Simon Brandhorst
ize() > from interfaces/gap.py > > So if you call set_gap_memory_pool_size with a big value, before > starting libgap, you might get > more (I didn't try) > > HTH, > Dima > On Tue, Sep 18, 2018 at 9:38 PM Simon Brandhorst > wrote: > > > > sage: V =

[sage-devel] libgap is not using the available memory

2018-09-18 Thread Simon Brandhorst
sage: V = libgap.GF(13)^500 sage: S = V.Subspaces(50) sage: S.List() gap: cannot extend the workspace any more! As expected the computation runs out of memory. However, there is still a lot of unused memory. Before: totalusedfree shared buff/cache

[sage-devel] Re: Buggy doctest in sage.modules.free_module.EchelonMatrixKey

2018-09-14 Thread Simon Brandhorst
On Thursday, September 13, 2018 at 2:42:44 PM UTC+2, Erik Bray wrote: > > However, reading the documentation for EchelonMatrixKey and > echelon_matrix_richcmp gives me the impression that this nonsensical > comparison isn't really the right behavior in the first place, but I'm > not sure.

Re: [sage-devel] Non-Phython Sage source code.

2018-07-04 Thread Simon Brandhorst
Thank you. That worked :-). On Wednesday, July 4, 2018 at 12:44:54 PM UTC+2, Thierry (sage-googlesucks@xxx) wrote: > > Hi, > > On Wed, Jul 04, 2018 at 02:56:23AM -0700, Simon Brandhorst wrote: > > Following > > "Non-Python Sage source code and supp

[sage-devel] Non-Phython Sage source code.

2018-07-04 Thread Simon Brandhorst
Following "Non-Python Sage source code and supporting files should be placed in appropriate subdirectories of SAGE_ROOT/src/ext/. They will then be automatically copied to the corresponding subdirectories of SAGE_ROOT/local/share/sage/ext/ during the build process and can be accessed at

[sage-devel] Re: Permutation group: faster use of stabilizer chain from gap

2018-06-08 Thread Simon Brandhorst
Use libgap: sage: def SGS_libgap(G, gap_output=True): : S = libgap(G).StabChain() : libgap.eval(gap_cosets) : cosets = S.CosetsStabChain() : if gap_output: : return cosets : sage: %time XX = SGS_libgap(A,True) CPU times: user 31.7 ms, sys: 59

Re: [sage-devel] Re: Matrix groups are not uniquely represented, why?

2018-06-01 Thread Simon Brandhorst
Suggestion: (1) Use unique representation for "ambient" objects ( GL(n,k), O(n,k,e), QQ^n). (2) Do not use unique representation for subobjects. (3) Give the .subobject(self, gens) method a (weak?) cache. (4) Modify == to test equality as subobjects/subsets. -- You received this message

[sage-devel] Re: Matrix groups are not uniquely represented, why?

2018-05-25 Thread Simon Brandhorst
Update: sage: S = SymmetricGroup(4) sage: S1 = S.subgroup(S.gens()[:1]) sage: S2 = S.subgroup(S.gens()[:1]) sage: S1 is S2 False Since the same is true for subgroups of permutation groups, I wonder if this is intended? The reason I am asking is that I implemented abelian groups and their

[sage-devel] Matrix groups are not uniquely represented, why?

2018-05-25 Thread Simon Brandhorst
sage: G = MatrixGroup([Matrix(GF(17),2,[1,1,1,0])]) Matrix group over Finite Field of size 17 with 1 generators ( [1 1] [1 0] ) sage: H = MatrixGroup([Matrix(GF(17),2,[1,1,1,0])]) sage: G is H False The reason is probably that there is no unique representation in gap. Is this intended or to be

[sage-devel] Re: trac issues

2018-02-26 Thread Simon Brandhorst
Same here. -- 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] Re: making database_gap (starting from GAP 4.9) standard - please vote

2018-02-19 Thread Simon Brandhorst
+1 -- 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.

Re: [sage-devel] Re: libgap_wrapper.is_subgroup change behaviour

2018-02-10 Thread Simon Brandhorst
That is my motivation as well. -- a baseclass for automorphism groups. Want to help me with that? :) On Friday, February 9, 2018 at 8:48:44 PM UTC+1, mathzeta2 wrote: > > On 09/02/18 15:07, Simon Brandhorst wrote: > > > > The application I have in mind is to create an a

Re: [sage-devel] Re: libgap_wrapper.is_subgroup change behaviour

2018-02-09 Thread Simon Brandhorst
+1, vdelecroix wrote: > > On 09/02/2018 09:47, Simon Brandhorst wrote: > > Return whether the group was defined as a subgroup of a bigger > > group. > > This description is very unclear anyway. See also #24535 for ambiguities > concerning group compariso

[sage-devel] Re: libgap_wrapper.is_subgroup change behaviour

2018-02-09 Thread Simon Brandhorst
I forgot to say this is in sage.groups.libgap_wrapper On Friday, February 9, 2018 at 9:45:50 AM UTC+1, Simon Brandhorst wrote: > > Currently: > >def is_subgroup(self): > """ > Return whether the group was defined as a subgroup of a bigger >

[sage-devel] libgap_wrapper.is_subgroup change behaviour

2018-02-09 Thread Simon Brandhorst
Currently: def is_subgroup(self): """ Return whether the group was defined as a subgroup of a bigger group. You can access the containing group with :meth:`ambient`. OUTPUT: Boolean. EXAMPLES:: sage: G = FreeGroup(3)

Re: [sage-devel] Re: Inverse of a p-adic matrix fails. Is this a bug?

2018-01-31 Thread Simon Brandhorst
Thank you for your replies. For the application I had in mind it seems that 'floating-point' numbers are not suitable. I was doing computations in sage: R = Zp(2,type='fixed-mod') sage: M = Matrix(R,4,[0, 0, 1, 1, 2^19, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1]) sage: M.inverse().base_ring() 2-adic

[sage-devel] Inverse of a p-adic matrix fails. Is this a bug?

2018-01-30 Thread Simon Brandhorst
The following may be a bug or me not understanding p-adic floating point computations: sage: R = Qp(2,type='floating-point',print_mode='terse') sage: M = Matrix(R,4,[0, 0, 1, 1, 2^20, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1]) sage: M.det() 1048575 sage: M.inverse()

Re: [sage-devel] Should ZZ^2 be a submodule of CC^2?

2018-01-19 Thread Simon Brandhorst
On Friday, January 19, 2018 at 9:16:16 AM UTC+1, vdelecroix wrote: > I think that it should be False in both situations. "is_submodule" > should only be used in the context where we have an ambient free > module, like ZZ^d and two ZZ-submodules U and V. > I disagree - the question makes

Re: [sage-devel] Should ZZ^2 be a submodule of CC^2?

2018-01-19 Thread Simon Brandhorst
Maybe the question then splits into two parts: 1) Is ZZ^2 a subset of CC^2 ? (Use this for __richcmp__) 2) Is ZZ^2 a submodule of CC^2 in the category of modules over ZZ? That is do we view CC^2 as a ZZ-module? (It is a ZZ-module in a natural way by the inclusion ZZ ---> CC) So basically

[sage-devel] Should ZZ^2 be a submodule of CC^2?

2018-01-18 Thread Simon Brandhorst
Dear all, I am working on ticket #23978 Rich comparison for Modules As part of it I also rewrote the is_submodule function. Currently, we have sage: (ZZ^2).is_submodule(CC^2) False sage: (ZZ^2).is_submodule(QQ^2) True Should that behavior change

[sage-devel] Re: matrix group action on elements of a subspace

2017-11-27 Thread Simon Brandhorst
is some old code floating around that > could use some cleanup and documentation. > > On Saturday, November 25, 2017 at 3:42:03 AM UTC-6, Simon Brandhorst wrote: >> >> Dear sagers, >> >> I am implementing a matrix group action on a submodule of ZZ^n. &g

[sage-devel] matrix group action on elements of a subspace

2017-11-25 Thread Simon Brandhorst
Dear sagers, I am implementing a matrix group action on a submodule of ZZ^n. element*matrix does work but the result lies in the ambient space and instead I want the elements parent to be the invariant subspace we started with. This can be done with sage.categories.action.Action However, that

Re: [sage-devel] Re: Online Sage Days

2017-11-22 Thread Simon Brandhorst
A wiki page would help for example. I kind of lost track of things. -- 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

[sage-devel] p-adic factorization/root finding bug.

2017-11-10 Thread Simon Brandhorst
{{{ sage: f=x^22 + 9*x^21 + 16*x^20 - 92*x^19 - 408*x^18 - 144*x^17 + 2080*x^16 + 4096*x^15 + 128*x^14 - 8192*x^13 - 12800*x^12 - 18432*x^11 - 51200*x^10 - 131072*x^9 + 8192*x^8 + 1048576*x^7 + 2129920*x^6 - 589824* : x^5 - 6684672*x^4 - 6029312*x^3 + 4194304*x^2 + 9437184*x + 4194304 :

[sage-devel] Re: floor division for integer matrices

2017-11-02 Thread Simon Brandhorst
Enabling // just for Euclidean rings is fine for me. Or let's say A//k is defined if // is defined on the entries of A? (which should include euclidean rings). And if it is not then one has to do the ugly conversion by hand if one really wants it. On Wednesday, November 1, 2017 at 11:30:59 PM

[sage-devel] floor division for integer matrices

2017-11-01 Thread Simon Brandhorst
sage: A = Matrix(ZZ,2,[3,3,3,3]) sage: A [3 3] [3 3] sage: A//3 --- TypeError Traceback (most recent call last) ... TypeError: unsupported operand parent(s) for //: 'Full MatrixSpace of 2 by 2

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-25 Thread Simon Brandhorst
Okay I made it work with __richcmp__ as suggested. Please review :-) . On Tuesday, October 24, 2017 at 7:53:46 AM UTC+2, Simon Brandhorst wrote: > > Ahhh > > On Monday, October 23, 2017 at 6:09:02 PM UTC+2, David Roe wrote: >> >> >> >> On Mon, Oct 23, 2017

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread Simon Brandhorst
Ahhh On Monday, October 23, 2017 at 6:09:02 PM UTC+2, David Roe wrote: > > > > On Mon, Oct 23, 2017 at 8:24 AM, Simon Brandhorst <sbran...@web.de > > wrote: > >> I am aware of this. It is just unexpected that other.__eq__(self) calls >> self._eq(other) >&

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread Simon Brandhorst
I am aware of this. It is just unexpected that other.__eq__(self) calls self._eq(other) As a user of that rich cmp method I would have expected it to call other._eq(self). Raising a not implemented error seems nice. :) Anyways I believe it should be better documented if you want people to use

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread Simon Brandhorst
Mhh okay, I can see that point. On Monday, October 23, 2017 at 6:23:50 AM UTC+2, Travis Scrimshaw wrote: > > > > On Thursday, October 19, 2017 at 8:59:17 PM UTC-5, Simon Brandhorst wrote: >> >> Well richcmp allows you to define just one method. But it does not save

Re: [sage-devel] Re: Allow quotient modules for PIDs

2017-10-22 Thread Simon Brandhorst
Before proceeding I do need some help please. #24031 Coercion between Matrices over orders and over the number field also coercion between Vectors over orders and over the quotient field/number field is not working. I am somewhat lost in the coercion

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-21 Thread Simon Brandhorst
from sage.structure.richcmp import richcmp_by_eq_and_lt,richcmp_method @richcmp_method class A(object): def __init__(self,x): self._x = x __richcmp__ = richcmp_by_eq_and_lt("_eq","_lt") def _eq(self,other): if type(other)!=type(self): #other knows how to

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-20 Thread Simon Brandhorst
ber 20, 2017 at 3:59:17 AM UTC+2, Simon Brandhorst wrote: > > Well richcmp allows you to define just one method. But it does not save > you any work at all if the order is partial. > Because then you have to distinguish the cases op = op_LE , op_GE, op_LT > ... etc. so

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-19 Thread Simon Brandhorst
: > > > > On Tuesday, October 17, 2017 at 9:55:25 AM UTC-5, Simon Brandhorst wrote: >> >> I got that now. But at the time I thought __richcmp__ was just a fancy >> new name for the old __cmp__ in python in order to make it python 3 >> compatible. >> >>

Re: [sage-devel] Cannot push to trac - some git issue

2017-10-18 Thread Simon Brandhorst
Thank you guys for your help. It worked :) What confused me was that there were two merge conflicts. One between the two branches and one between them and the latest beta version. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-17 Thread Simon Brandhorst
. And in future they will also not know about the __cmp__ method of python 2.7 On Tuesday, October 17, 2017 at 2:11:09 PM UTC+2, Jeroen Demeyer wrote: > > On 2017-10-17 12:13, Simon Brandhorst wrote: > > Because the documentation did not tell me it was possible: > > That *what* is possib

[sage-devel] Cannot push to trac - some git issue

2017-10-17 Thread Simon Brandhorst
Would you please help me with this? There seems to be some conflict but I am lost. Git suggest to pull. But that does not change anything. After all that is what I just did. [simon@Quadrator sage]$ git pull Already up-to-date. [simon@Quadrator sage]$ git status On branch

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-17 Thread Simon Brandhorst
Because the documentation did not tell me it was possible: http://doc.sagemath.org/html/en/reference/structure/sage/structure/richcmp.html Can you update it? I have interpreted it as a way to go to python3 without changing the logic of the code. On Monday, October 16, 2017 at 6:13:29 PM

Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-16 Thread Simon Brandhorst
It works. Thank you :-). On Monday, October 16, 2017 at 2:28:00 PM UTC+2, Jeroen Demeyer wrote: > > Remove the @richcmp_method decorator. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails

[sage-devel] How do I overwrite comparison for modules?

2017-10-16 Thread Simon Brandhorst
Hi all, I want to redefine comparison for modules by using python like comparisons __eq__, __lt__ etc. See #23978 https://trac.sagemath.org/ticket/23978 So I have deleted the __richcmp__ methods and added a method def __eq__(self, other): return type(self) == type(other) I get

Re: [sage-devel] Re: Allow quotient modules for PIDs

2017-10-13 Thread Simon Brandhorst
+ a] }}} On Friday, October 13, 2017 at 10:59:13 AM UTC+2, John Cremona wrote: > > On 13 October 2017 at 08:37, Simon Brandhorst <sbran...@web.de > > wrote: > > The testsuite runs now. A long list of rings would be helpful. > > > > Some Pids i care about:

Re: [sage-devel] Re: Allow quotient modules for PIDs

2017-10-13 Thread Simon Brandhorst
13, 2017 at 9:14:36 AM UTC+2, Simon Brandhorst wrote: > > https://trac.sagemath.org/ticket/24027 > > In order to do good testing. Do we have a nice list of PIDs? > > On Friday, October 13, 2017 at 9:07:00 AM UTC+2, Simon Brandhorst wrote: >> >> Yep, adding doc test

Re: [sage-devel] Re: Allow quotient modules for PIDs

2017-10-13 Thread Simon Brandhorst
https://trac.sagemath.org/ticket/24027 In order to do good testing. Do we have a nice list of PIDs? On Friday, October 13, 2017 at 9:07:00 AM UTC+2, Simon Brandhorst wrote: > > Yep, adding doc tests over other rings is the minimum requirement. I can > do that. > Yet I would pri

Re: [sage-devel] Re: Allow quotient modules for PIDs

2017-10-13 Thread Simon Brandhorst
ity available. I was pretty happy with my original > FGP implementation, which was a lot of work one summer years ago... > > -- William > > On Thu, Oct 12, 2017 at 8:48 AM Simon Brandhorst <sbran...@web.de > > wrote: > >> O.K. I will do that. Even if we

[sage-devel] Re: Allow quotient modules for PIDs

2017-10-12 Thread Simon Brandhorst
O.K. I will do that. Even if we do not have enough tests. Maybe we can allow it and print some "This code is still experimental" warning. After all it will only get really stable is people use it a lot. On Thursday, October 12, 2017 at 5:06:20 PM UTC+2, Simon Brandhorst wrote: &

[sage-devel] Re: Allow quotient modules for PIDs

2017-10-12 Thread Simon Brandhorst
If forgot to add sage: from sage.modules.fg_pid.fgp_module import FGP_Module On Thursday, October 12, 2017 at 5:06:20 PM UTC+2, Simon Brandhorst wrote: > > sage: L. = NumberField(x^2 - x + 2) > sage: OL = L.ring_of_integers() > sage: V = OL**3; W = V.span([[0,w,0], [1,0,1-w]]

[sage-devel] Allow quotient modules for PIDs

2017-10-12 Thread Simon Brandhorst
sage: L. = NumberField(x^2 - x + 2) sage: OL = L.ring_of_integers() sage: V = OL**3; W = V.span([[0,w,0], [1,0,1-w]], OL) sage: FGP_Module(V,W) This works sage: V.quotient(W) NotImplementedError: quotients of modules over rings other than fields or ZZ is not fully implemented Well FGP looks

Re: [sage-devel] Re: Please help with #23967 Coercion pushout for FGP_modules

2017-10-11 Thread Simon Brandhorst
OK I have implemented the less easy version with construction functors. That seems to be the best practice. The ticket is ready for review. On Monday, October 9, 2017 at 7:55:13 PM UTC+2, David Roe wrote: > > > > On Mon, Oct 9, 2017 at 1:38 PM, Simon Brandhorst <sbran...@we

Re: [sage-devel] Re: Please help with #23967 Coercion pushout for FGP_modules

2017-10-09 Thread Simon Brandhorst
I see. I have found an easy solution by defining a method ._pushout_ It works. I have uploaded the branch so you can take a look. On Monday, October 9, 2017 at 7:55:13 PM UTC+2, David Roe wrote: > > > > On Mon, Oct 9, 2017 at 1:38 PM, Simon Brandhorst <sbran...@web.de > >

[sage-devel] Re: Please help with #23967 Coercion pushout for FGP_modules

2017-10-09 Thread Simon Brandhorst
wrote: > > On 2017-10-09, Simon Brandhorst <sbran...@web.de > wrote: > > Would someone please guide me through this? > > I would like to learn now to implement such a thing in sage. Yet I > wouldn't > > know where to start here. > > It is mathema

[sage-devel] Re: submodules subvectorspaces violate the unique parent condition. Why? Should we change that?

2017-10-09 Thread Simon Brandhorst
A case where this may be relevant: A,B,C,D submodules of the same ambient vector space, e.g. QQ^n A/B and C/D have a good pushout (A+C)/(B+D) this is where the sum of two elements (a+B) + (c +D) lives. So I have to teach the coercion framework how to create (A + C) / (B + D). Now if this is

[sage-devel] Re: Please help with #23967 Coercion pushout for FGP_modules

2017-10-09 Thread Simon Brandhorst
Thank you Simon :). Probably, it will take me some time to read/understand though. Would you review the ticket when it is done? On Monday, October 9, 2017 at 12:45:17 PM UTC+2, Simon King wrote: > > On 2017-10-09, Simon Brandhorst <sbran...@web.de > wrote: > > Would someo

[sage-devel] Re: submodules subvectorspaces violate the unique parent condition. Why? Should we change that?

2017-10-09 Thread Simon Brandhorst
Hi Simon, thank you for your explanation. Given the concrete example. Over exact PIDs/fields one can use echelonized matrices/hermite normal form to get unique Hashes. As far as I can see they are computed anyways at the time of initalization of a submodule. So the upshot is that unless

[sage-devel] Please help with #23967 Coercion pushout for FGP_modules

2017-10-09 Thread Simon Brandhorst
Would someone please guide me through this? I would like to learn now to implement such a thing in sage. Yet I wouldn't know where to start here. It is mathematically quite simple. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe

Re: [sage-devel] submodules subvectorspaces violate the unique parent condition. Why? Should we change that?

2017-10-09 Thread Simon Brandhorst
unique? > > On 09/10/2017 09:26, Simon Brandhorst wrote: > > {{{ > > sage: V = span(QQ,[(1,1),(1,0)]) > > sage: W = span(QQ,[(0,1),(1,0)]) > > sage: V > > > > Vector space of degree 2 and dimension 2 over Rational Field > > Basis matrix: >

[sage-devel] submodules subvectorspaces violate the unique parent condition. Why? Should we change that?

2017-10-09 Thread Simon Brandhorst
{{{ sage: V = span(QQ,[(1,1),(1,0)]) sage: W = span(QQ,[(0,1),(1,0)]) sage: V Vector space of degree 2 and dimension 2 over Rational Field Basis matrix: [1 0] [0 1] sage: W Vector space of degree 2 and dimension 2 over Rational Field Basis matrix: [1 0] [0 1] sage: V is W False sage: V==W True

Re: [sage-devel] Online Sage Days

2017-10-05 Thread Simon Brandhorst
+1 Though I am a newbie. On Tuesday, September 26, 2017 at 7:50:59 AM UTC+2, David Roe wrote: > > Hi everyone, > Sorry for the delay! > > I've created scheduling polls. If you have a conflict with part of a time > slot, feel free to use the "maybe" option by clicking twice. The polls are >

[sage-devel] Re: Sort ambient spaces by inner product as well?

2017-09-22 Thread Simon Brandhorst
Just fixing the == method is probably not good enough: On Thursday, September 21, 2017 at 4:10:10 PM UTC+2, Maarten Derickx wrote: > > > Note that there is no distinction between the FreeModule with > inner_product_matrix=matrix.identity(1)*2 and FreeQuadraticModusince the > sage object

[sage-devel] Sort ambient spaces by inner product as well?

2017-09-21 Thread Simon Brandhorst
Currently, comparison of free_module_generic (and free_quadratic_modules) ignores the inner product matrix sage: FreeModule(ZZ,1)==FreeModule(ZZ,1,inner_product_matrix=matrix.identity(1)*2) True sage: FreeQuadraticModule(ZZ,1,matrix.identity(1))==FreeQuadraticModule(ZZ,1,matrix.identity(1)*2)

[sage-devel] Re: Can I clean up this copy pasted code? #23703

2017-08-25 Thread Simon Brandhorst
tps://trac.sagemath.org/ticket/23251 >> >> Do not do anything on that until this ticket is merged in the next beta >> release of sage. >> >> Frederic >> >> Le vendredi 25 août 2017 09:52:32 UTC+2, Simon Brandhorst a écrit :

[sage-devel] Can I clean up this copy pasted code? #23703

2017-08-25 Thread Simon Brandhorst
>From sage.modules.free_module.py there is some code copy pasted to sage.modules.free_quadratic_module.py. One instance is the class FreeQuadraticModule_submodule_with_basis_pid( free_module.FreeModule_submodule_with_basis_pid, FreeQuadraticModule_generic_pid) where the __cmp__ method is

[sage-devel] Sort method auto completion by relevance.

2017-08-18 Thread Simon Brandhorst
What I love about Sage is the following: I discover an interesting class of objects say a groups. Now I want to play with it, so I create an object foo and type "foo." + Tab and now I can easily explore what I can do with this object. However many classes have 50 something methods inherited

[sage-devel] sage days 91?

2017-08-16 Thread Simon Brandhorst
Dear all, Ursula, Tony, and I are organizing a weekend workshop "Open Source Computation and Algebraic Surfaces" at BIRS https://www.birs.ca/events/2017/2-day-workshops/17w2677. Our goal is to get some functionality for point counting and indefinite lattices/quadratic forms into sage. This

[sage-devel] bug in sage.quadratic_forms.genera.genus.

2017-06-18 Thread Simon Brandhorst
D4=QuadraticForm(Matrix(ZZ,4,4,[2,0,0,-1,0,2,0,-1,0,0,2,-1,-1,-1,-1,2])) G=D4.global_genus_symbol() sage.quadratic_forms.genera.genus.is_GlobalGenus(G) G==copy(G) sage.quadratic_forms.genera.genus.is_GlobalGenus(G) Another instance of the same problem:

[sage-devel] Implementing indefinite IntegerLattices a call for advice.

2017-03-24 Thread Simon Brandhorst
I would like to implement a class for (indefinite) IntegerLattices. In my implementation I would like to meet the sageMath standards so that one day it might be a part of sage. My first question is how I should fit this into the existing classes. Mathematically a (indefinite) lattice is a

[sage-devel] Re: Error building sage devel: package: singular-4.0.3p4

2016-11-11 Thread Simon Brandhorst
Seems I posted too fast. Sorry for the spam. They error is due to a work around which I forgot to delete before building. Now it seems to work. (still building) On Friday, November 11, 2016 at 2:36:15 PM UTC+1, Simon Brandhorst wrote: > > See the log file. > > Best > > Simon &

[sage-devel] Error building sage devel: package: singular-4.0.3p4

2016-11-11 Thread Simon Brandhorst
See the log file. Best Simon -- 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] Re: Project: LatticeWithIsometry

2016-09-09 Thread Simon Brandhorst
isometry at a time. Best --Simon On Tuesday, September 6, 2016 at 3:08:56 PM UTC+2, Dima Pasechnik wrote: > > > > On Tuesday, September 6, 2016 at 9:20:55 AM UTC, Simon Brandhorst wrote: >> >> Dear all, >> >> I have written some code (toy implementation) in sage. It

[sage-devel] Re: Weekend workshop BIRS: SageMath development related to K3 surfaces (March 2016)

2016-09-09 Thread Simon Brandhorst
ntly head of mathematics in > CNRS. > > http://www.math.sciences.univ-nantes.fr/~sorger/chow_en.html > > Frederic > > Le jeudi 8 septembre 2016 16:00:37 UTC+2, Simon Brandhorst a écrit : >> >> Ursula Whitcher and I are planning to apply to hold a weekend workshop &

  1   2   >