[sage-devel] Re: pari groups

2018-04-13 Thread Sanketh
For the specific case you mentioned, wouldn't it be easier to make 
.automorphisms() return a group? This way you can also work with relative 
fields.

On Sunday, October 15, 2017 at 12:25:11 PM UTC-4, John Cremona wrote:
>
> Extracting information about a Galois group is more painful than it 
> should be.  After 
>
> sage: K. = CyclotomicField(5) 
> sage: G = K.galois_group(type='pari') 
> sage: G 
> Galois group PARI group [4, -1, 1, "C(4) = 4"] of degree 4 of the 
> Cyclotomic Field of order 5 and degree 4 
>
> we have 
>
> sage: type(G) 
>  
>
> (other types are returned if other options for the galois_group() 
> method are chosen).  There is not a lot you can do with this G except 
> get its order (G.order()) without going deeper: 
>
> sage: GG=G.group() 
> sage: type(GG) 
>  
> sage: GG 
> PARI group [4, -1, 1, "C(4) = 4"] of degree 4 
>
> This type has "forgotten" that it is a Galois group but has many more 
> methods; sadly most not implemented.  At least one might want to 
> extract the 4 elements of the underlying list which are the order (4) 
> which in this example happens to also be the degree (4), meaning that 
> GG is a subgroup of S_4 (degree=4) of order 4.  The second entry -1 is 
> the sign (-1 means odd, i.e. not a subgroup of A_4), the third is the 
> "T-number" which identifies this group in some classification of 
> transitive groups. 
>
> As far as I know the only way to get the sign and T-number is to 
> retrieve the underlying PARI list via GG.__pari__() (which until 
> recently was GG._pari_() with single underscores).  I would like to 
> implement 
>
> GG.sign() # returns GG.__pari__()[1] 
> GG.t_number() # returns GG.__pari__()[2] 
>
> and perhaps more.  I have been looking in the PARI/gp documentation on 
> Galois groups and what it says about this 4-tuple is 
>
> "The output is a 4-component vector [n,s,k,name] with the following 
> meaning: n is the cardinality of the group, s is its signature (s = 1 
> if the group is a subgroup of the alternating group A_d, s = -1 
> otherwise) and name is a character string containing name of the 
> transitive group according to the GAP 4 transitive groups library by 
> Alexander Hulpke. 
>
> k is more arbitrary and the choice made up to version 2.2.3 of PARI is 
> rather unfortunate: for d > 7, k is the numbering of the group among 
> all transitive subgroups of S_d, as given in "The transitive groups of 
> degree up to eleven", G. Butler and J. McKay, Communications in 
> Algebra, vol. 11, 1983, pp. 863--911 (group k is denoted T_k there). 
> And for d ≤ 7, it was ad hoc, so as to ensure that a given triple 
> would denote a unique group. Specifically, for polynomials of degree d 
> ≤ 7, the groups are coded as follows, using standard notations (etc)" 
>
> Despite the ad hoc nature of this parameter k I still think we should 
> allow users to get at it more easily. 
>
> John 
>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: pari groups

2018-04-13 Thread John Cremona
The pari option essentially just identifies which group it is from a list,
and gives back some very basic data about the group.  This is not always
easy to extract (see https://trac.sagemath.org/ticket/24469).   If you want
to do more, for example use group elements as automorphisms of the field,
you need more.

John

On 13 April 2018 at 13:57, Simon King  wrote:

> Hi David,
>
> On 2018-04-13, David Loeffler  wrote:
> > On 13 April 2018 at 12:25, Sanketh  wrote:
> >
> >> This is probably obvious but why is type='gap' not standard for Galois
> >> groups?
> >>
> >
> > Because Pari is *vastly* faster. E.g. see this example, where Pari beats
> > Gap by a factor of 100:
> >
> > sage: K. = NumberField(x^5 - x - 1)
> > sage: time _=K.galois_group(type='pari')
> > CPU times: user 8.26 ms, sys: 3.65 ms, total: 11.9 ms
> > Wall time: 53.5 ms
> > sage: time _=K.galois_group(type='gap')
> > CPU times: user 212 ms, sys: 149 ms, total: 361 ms
> > Wall time: 5.38 s
>
> Might be interesting to offer libgap as one option. After all, it avoids
> the time to start Gap.
>
> Best regards,
> 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@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Integrating SageMath into existing Python install / Python compiling error

2018-04-13 Thread Erik Bray
On Thu, Apr 12, 2018 at 7:41 PM, Jordan Argyle  wrote:
> That makes sense--thank you! I think the Intel Compiler flag comes from the
> fact that I have a customized compiler through a program called MOOSE, and
> they all dev on macs, so the compiler may be trying to use their settings.
>
> I was introduced to Sage through the VirtualBox appliance available online
> (http://www.cecm.sfu.ca/sage/ova/index.html). I wanted to recreate that, but
> fix the problems with LaTeX (so that I can export a PDF, for example). I
> have been hacking in the terminal of that VirtualBox for a while to try to
> adjust LaTeX installs, add additional kernels, etc, but have found it too
> messy and difficult. So, I have been following the more "standard" install
> procedures for Jupyter installed through Conda, and hoped I could attach
> Sage that way.

I mean, there are also binary builds of Sage for Linux, OSX, and
Windows (via Cygwin), so you may be able to install any one of them
depending on your platform; e.g.
http://doc.sagemath.org/html/en/installation/binary.html
(incidentally the section on there for Windows is outdated--I need to
fix that).

There was an official Debian package for Sage that was mostly working,
but there hasn't been regular-enough maintenance on it to keep it
working, something some of us are hoping to fix sometime...

There's no reason necessarily to install Jupyter in a conda
environment either--that's not necessarily any more "standard" than
using your system's package installer--that said it's probably the
best way to install the most recent Jupyter in a way that's consistent
across platforms.  If you wanted to install Sage in conda the best way
would be to use the existing conda package for Sage and, if there are
problems with that, to report those problems and keep things focused
on maintaining the existing conda porting effort.

> With that in mind, what would you recommend for me to try first? Is the best
> way to do this the conda package? Would that be connected to my global LaTeX
> install? Or should I just install the binaries, and connect it to my Jupyter
> install al la this link...I'm not sure how to replicate the install in the
> OVA, and I'm not sure of the best way to approach this, which is why I asked
> here. Any additional thoughts would be appreciated!

I'm not exactly sure what blocker is--you seem to be talking about two
issues: Using the Sage kernel in Jupyter, and using an existing LaTeX
distribution with Sage.  Both are certainly possible. For the LaTeX
installation it should work so long as the relevant executables such
as pdflatex and maybe dvi2png and such can be located on the $PATH.  I
feel like somewhere there must be better existing documentation on
exactly what the requirements are. Somebody else might know better.

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: pari groups

2018-04-13 Thread Simon King
Hi David,

On 2018-04-13, David Loeffler  wrote:
> On 13 April 2018 at 12:25, Sanketh  wrote:
>
>> This is probably obvious but why is type='gap' not standard for Galois
>> groups?
>>
>
> Because Pari is *vastly* faster. E.g. see this example, where Pari beats
> Gap by a factor of 100:
>
> sage: K. = NumberField(x^5 - x - 1)
> sage: time _=K.galois_group(type='pari')
> CPU times: user 8.26 ms, sys: 3.65 ms, total: 11.9 ms
> Wall time: 53.5 ms
> sage: time _=K.galois_group(type='gap')
> CPU times: user 212 ms, sys: 149 ms, total: 361 ms
> Wall time: 5.38 s

Might be interesting to offer libgap as one option. After all, it avoids
the time to start Gap.

Best regards,
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@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: pari groups

2018-04-13 Thread Sanketh
Yup. Also, sage seems to have better support for gap groups. For instance,

sage: L. = NumberField(x^5 - x + 1)
> sage: L.galois_group(type='gap').group().is_abelian()
> False
> sage: L.galois_group(type='pari').group().is_abelian()
> ---
> NotImplementedError   Traceback (most recent call last)
>  in ()
> > 1 L.galois_group(type='pari').group().is_abelian()
>
> NotImplementedError: 
>


On Friday, April 13, 2018 at 8:49:30 AM UTC-4, Samuel Lelievre wrote:
>
> The difference is the time to fire up GAP.
>
> Once GAP is started, there is not much difference
> in time between computing with type='pari' or type='gap'.
>
> $ sage -q
> sage: K. = NumberField(x^5 - x - 1)
> sage: %time K.galois_group(type='pari')
> CPU times: user 3.5 ms, sys: 831 µs, total: 4.33 ms
> Wall time: 4.72 ms
> Galois group PARI group [120, -1, 5, "S5"] of degree 5 of the Number Field 
> in a with defining polynomial x^5 - x - 1
> sage: %time K.galois_group(type='gap')
> CPU times: user 113 ms, sys: 61.5 ms, total: 175 ms
> Wall time: 8.15 s
> Galois group Transitive group number 5 of degree 5 of the Number Field in 
> a with defining polynomial x^5 - x - 1
>
> sage: L. = NumberField(x^5 - x + 1)
> sage: %time L.galois_group(type='pari')
> CPU times: user 1.58 ms, sys: 566 µs, total: 2.15 ms
> Wall time: 2.16 ms
> Galois group PARI group [120, -1, 5, "S5"] of degree 5 of the Number Field 
> in a with defining polynomial x^5 - x + 1
> sage: %time L.galois_group(type='gap')
> CPU times: user 1.56 ms, sys: 418 µs, total: 1.98 ms
> Wall time: 1.98 ms
> Galois group Transitive group number 5 of degree 5 of the Number Field in 
> a with defining polynomial x^5 - x + 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.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: pari groups

2018-04-13 Thread Samuel Lelièvre
The difference is the time to fire up GAP.

Once GAP is started, there is not much difference
in time between computing with type='pari' or type='gap'.

$ sage -q
sage: K. = NumberField(x^5 - x - 1)
sage: %time K.galois_group(type='pari')
CPU times: user 3.5 ms, sys: 831 µs, total: 4.33 ms
Wall time: 4.72 ms
Galois group PARI group [120, -1, 5, "S5"] of degree 5 of the Number Field
in a with defining polynomial x^5 - x - 1
sage: %time K.galois_group(type='gap')
CPU times: user 113 ms, sys: 61.5 ms, total: 175 ms
Wall time: 8.15 s
Galois group Transitive group number 5 of degree 5 of the Number Field in a
with defining polynomial x^5 - x - 1

sage: L. = NumberField(x^5 - x + 1)
sage: %time L.galois_group(type='pari')
CPU times: user 1.58 ms, sys: 566 µs, total: 2.15 ms
Wall time: 2.16 ms
Galois group PARI group [120, -1, 5, "S5"] of degree 5 of the Number Field
in a with defining polynomial x^5 - x + 1
sage: %time L.galois_group(type='gap')
CPU times: user 1.56 ms, sys: 418 µs, total: 1.98 ms
Wall time: 1.98 ms
Galois group Transitive group number 5 of degree 5 of the Number Field in a
with defining polynomial x^5 - x + 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.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: pari groups

2018-04-13 Thread David Loeffler
On 13 April 2018 at 12:25, Sanketh  wrote:

> This is probably obvious but why is type='gap' not standard for Galois
> groups?
>

Because Pari is *vastly* faster. E.g. see this example, where Pari beats
Gap by a factor of 100:

sage: K. = NumberField(x^5 - x - 1)
sage: time _=K.galois_group(type='pari')
CPU times: user 8.26 ms, sys: 3.65 ms, total: 11.9 ms
Wall time: 53.5 ms
sage: time _=K.galois_group(type='gap')
CPU times: user 212 ms, sys: 149 ms, total: 361 ms
Wall time: 5.38 s

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: pari groups

2018-04-13 Thread Sanketh
This is probably obvious but why is type='gap' not standard for Galois 
groups? 

On Sunday, October 15, 2017 at 12:25:11 PM UTC-4, John Cremona wrote:
>
> Extracting information about a Galois group is more painful than it 
> should be.  After 
>
> sage: K. = CyclotomicField(5) 
> sage: G = K.galois_group(type='pari') 
> sage: G 
> Galois group PARI group [4, -1, 1, "C(4) = 4"] of degree 4 of the 
> Cyclotomic Field of order 5 and degree 4 
>
> we have 
>
> sage: type(G) 
>  
>
> (other types are returned if other options for the galois_group() 
> method are chosen).  There is not a lot you can do with this G except 
> get its order (G.order()) without going deeper: 
>
> sage: GG=G.group() 
> sage: type(GG) 
>  
> sage: GG 
> PARI group [4, -1, 1, "C(4) = 4"] of degree 4 
>
> This type has "forgotten" that it is a Galois group but has many more 
> methods; sadly most not implemented.  At least one might want to 
> extract the 4 elements of the underlying list which are the order (4) 
> which in this example happens to also be the degree (4), meaning that 
> GG is a subgroup of S_4 (degree=4) of order 4.  The second entry -1 is 
> the sign (-1 means odd, i.e. not a subgroup of A_4), the third is the 
> "T-number" which identifies this group in some classification of 
> transitive groups. 
>
> As far as I know the only way to get the sign and T-number is to 
> retrieve the underlying PARI list via GG.__pari__() (which until 
> recently was GG._pari_() with single underscores).  I would like to 
> implement 
>
> GG.sign() # returns GG.__pari__()[1] 
> GG.t_number() # returns GG.__pari__()[2] 
>
> and perhaps more.  I have been looking in the PARI/gp documentation on 
> Galois groups and what it says about this 4-tuple is 
>
> "The output is a 4-component vector [n,s,k,name] with the following 
> meaning: n is the cardinality of the group, s is its signature (s = 1 
> if the group is a subgroup of the alternating group A_d, s = -1 
> otherwise) and name is a character string containing name of the 
> transitive group according to the GAP 4 transitive groups library by 
> Alexander Hulpke. 
>
> k is more arbitrary and the choice made up to version 2.2.3 of PARI is 
> rather unfortunate: for d > 7, k is the numbering of the group among 
> all transitive subgroups of S_d, as given in "The transitive groups of 
> degree up to eleven", G. Butler and J. McKay, Communications in 
> Algebra, vol. 11, 1983, pp. 863--911 (group k is denoted T_k there). 
> And for d ≤ 7, it was ad hoc, so as to ensure that a given triple 
> would denote a unique group. Specifically, for polynomials of degree d 
> ≤ 7, the groups are coded as follows, using standard notations (etc)" 
>
> Despite the ad hoc nature of this parameter k I still think we should 
> allow users to get at it more easily. 
>
> John 
>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] SCIP integration into sage

2018-04-13 Thread Dima Pasechnik
We had this discussion about SCIP licensing before...

Academy is f*ed up by the citation chase and the grant system...

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] SCIP integration into sage

2018-04-13 Thread Francesco Biscani
On 13 April 2018 at 11:25, Vincent Delecroix <20100.delecr...@gmail.com>
wrote:

> On 13/04/2018 11:20, Francesco Biscani wrote:
>
>> http://scip.zib.de/academic.txt
>>
>> """
>> 1. This license applies to you only if you are a member of a noncommercial
>> and academic institution, e.g., a university. The license expires as
>> soon as you are no longer a member of this institution.
>> """
>>
>> So basically these acedemics, I imagine funded with taxpayers' money, are
>> preventing the general public to use software they paid for?
>>
>> Talk about ivory tower...
>>
>
> This is indeed a problem with PySCIPOpt. I don't think this is a bad
> intention. My point of view is that they wanted to have a form of dual
> licensing for making happy (paying) customers that in many situations do
> not like open source. Not to prevent users to use it. Moritz might
> infirm or confirm.
>
> If the package appears to be useful (I think it is) we could ask
> kindly to package PySCIPOpt under GPL or LGPL.
>
> I know of at least the CGAL project where the distinction is made
> cleaner [1]: they offer a GPL and a commercial version... and they *do*
> have customers (enough for 8 salaries).
>
> Best
> Vincent
>
>   [1] https://www.cgal.org/license.html


I can sort-of sympathise with the intention. But I cannot understand why
they decided to roll their own license instead of going with the usual dual
licensing everyone is doing. Perhaps because they wanted to enforce the
"thou shalt cite me" clause?

As an academic myself, I also cannot understand how they could possibly
think that putting artificial barriers for the use of the software by
non-academic "non-commercial" individuals could possibly be a good idea
ethically.

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] SCIP integration into sage

2018-04-13 Thread Vincent Delecroix

On 13/04/2018 11:20, Francesco Biscani wrote:

http://scip.zib.de/academic.txt

"""
1. This license applies to you only if you are a member of a noncommercial
and academic institution, e.g., a university. The license expires as
soon as you are no longer a member of this institution.
"""

So basically these acedemics, I imagine funded with taxpayers' money, are
preventing the general public to use software they paid for?

Talk about ivory tower...


This is indeed a problem with PySCIPOpt. I don't think this is a bad
intention. My point of view is that they wanted to have a form of dual
licensing for making happy (paying) customers that in many situations do
not like open source. Not to prevent users to use it. Moritz might
infirm or confirm.

If the package appears to be useful (I think it is) we could ask
kindly to package PySCIPOpt under GPL or LGPL.

I know of at least the CGAL project where the distinction is made
cleaner [1]: they offer a GPL and a commercial version... and they *do*
have customers (enough for 8 salaries).

Best
Vincent

  [1] https://www.cgal.org/license.html

--
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] SCIP integration into sage

2018-04-13 Thread Francesco Biscani
http://scip.zib.de/academic.txt

"""
1. This license applies to you only if you are a member of a noncommercial
   and academic institution, e.g., a university. The license expires as
   soon as you are no longer a member of this institution.
"""

So basically these acedemics, I imagine funded with taxpayers' money, are
preventing the general public to use software they paid for?

Talk about ivory tower...

On 11 April 2018 at 18:27, moritz  wrote:

> SCIP is an optimization software, that can solve mixed interger
> (non)linear programs: http://scip.zib.de/
> It has a python interface: PySCIPOpt https://github.com/SCIP-
> Interfaces/PySCIPOpt
> #24662 
> We have now added this as a sage package and written a backend, see
> #21003,  which is based on #24662.
> 
>
> It would be great if some people could test it  and possibly review it!
>
> Cheers
>  Moritz
> 
>
> --
> 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 https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: 8.2.rc2 on OSX: compile gcc 7.2 after git pull

2018-04-13 Thread David . Coudert
I will then try to get back to rc1.
Thank you all.
David.

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.