[sage-support] Re: About inclusion of sage commands and output on word file/Latex file

2016-12-24 Thread Emmanuel Charpentier
The best solution for "serious" documents is probably to write in \LaTeX 
and convert to LO/Word. And there exists an excellent way to include Sage 
results in \LaTeX documents :search for "Sagetex" in the online help and 
manual.

This interface is infuriatingly excellent ("infuriatingly" because some 
quirks, quite logical as seen from a \LaTeX development point of view, are 
quite strange from a word processor user point of view).

In fact, this interface is a strong argument to prefer Sage to other CAS 
for producing anything serious (on paper) : the use of a programmatic 
interface to Sage guarantees the consistency between the various parts o 
the document. A recompilation will recompile all the "maths" parts of the 
document.

You can then convert from \LaTeX to OpenOffice via pandoc. This is probably 
the swiftest way to produce a "serious" LO/Word document. You may have to 
fiddle with the document template used by Pandoc to obtain results 
conformant to your university's (or publisher's) desiderata.

Another possibility is to create your document as a Jupyter worksheet, 
export it to markdown and pandoc it to LO/Word. But the possibilities of 
Markdown are rather more limited than those of \LaTeX. However, it is a 
superior way to create HTML documents...

Otherwise, you can also cut'n-paste from the Jupyter notebook (I dn't know 
for the ols Sage notebook) to LibreOffice (and possibly Word) ; ISTR that 
LO somehow accepts MathML. But then, you lose the consistency offered by 
Sagetex. And that's, IMHO, a huge drawback.

HTH,

--
Emmanuel Charpentier


Le samedi 24 décembre 2016 08:52:53 UTC+1, NITIN DARKUNDE a écrit :
>
> Dear group members,
>I have been using sage since last 01 month. 
> I just done some easy commands in it . I want to ask you, how to take these 
> commands and their output on word/latex file?(So that I can include, this 
> stuff in my research paper). Thanks.
>
> -- 
> --
> Yours faithfully,
> ---
>
>
>
>
>
>
>
>
> *Mr. Nitin Shridhar Darkunde.Assistant Professor,Department of 
> Mathematics,School of Mathematical Sciences,Swami Ramanand Teerth 
> Marathwada University,Vishnupuri, Nanded-431 606 (M.S.), India.Mob. 
> No:08275268895Or   
>  09273500312*
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] unsub

2016-12-24 Thread Alice Ryhl

unsub

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: About inclusion of sage commands and output on word file/Latex file

2016-12-24 Thread Henri Girard


A bit different answer, you can use sage session in texmacs (last 
working in ubuntu is 1.9.92), in sagenb (former version of notebook but 
still active, sometimes I prefer it for fine tuning text/latex) and 
jupyter notebook, really excellent too... They are developing an 
interesting tool still alpha but usable, jupyterlab.
 If you do a research in google with this command you will get a lot of 
sites which uses it :)

sagemath /pub/ sws

Regards

Le 24/12/2016 à 09:36, Emmanuel Charpentier a écrit :
The best solution for "serious" documents is probably to write in 
\LaTeX and convert to LO/Word. And there exists an excellent way to 
include Sage results in \LaTeX documents :search for "Sagetex" in the 
online help and manual.


This interface is infuriatingly excellent ("infuriatingly" because 
some quirks, quite logical as seen from a \LaTeX development point of 
view, are quite strange from a word processor user point of view).


In fact, this interface is a strong argument to prefer Sage to other 
CAS for producing anything serious (on paper) : the use of a 
programmatic interface to Sage guarantees the consistency between the 
various parts o the document. A recompilation will recompile all the 
"maths" parts of the document.


You can then convert from \LaTeX to OpenOffice via pandoc. This is 
probably the swiftest way to produce a "serious" LO/Word document. You 
may have to fiddle with the document template used by Pandoc to obtain 
results conformant to your university's (or publisher's) desiderata.


Another possibility is to create your document as a Jupyter worksheet, 
export it to markdown and pandoc it to LO/Word. But the possibilities 
of Markdown are rather more limited than those of \LaTeX. However, it 
is a superior way to create HTML documents...


Otherwise, you can also cut'n-paste from the Jupyter notebook (I dn't 
know for the ols Sage notebook) to LibreOffice (and possibly Word) ; 
ISTR that LO somehow accepts MathML. But then, you lose the 
consistency offered by Sagetex. And that's, IMHO, a huge drawback.


HTH,

--
Emmanuel Charpentier


Le samedi 24 décembre 2016 08:52:53 UTC+1, NITIN DARKUNDE a écrit :

Dear group members,
   I have been using sage since last 01 month. I just
done some easy commands in it . I want to ask you, how to take
these commands and their output on word/latex file?(So that I can
include, this stuff in my research paper). Thanks.

-- 
--

Yours faithfully,
---
*Mr. Nitin Shridhar Darkunde.
Assistant Professor,
Department of Mathematics,
School of Mathematical Sciences,
Swami Ramanand Teerth Marathwada University,
Vishnupuri, Nanded-431 606 (M.S.), India.
Mob. No:08275268895Or09273500312

*

--
You received this message because you are subscribed to the Google 
Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to sage-support+unsubscr...@googlegroups.com 
.
To post to this group, send email to sage-support@googlegroups.com 
.

Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: unsub

2016-12-24 Thread Dima Pasechnik
to leave this list, you should use the google groups interface to 
unsubscribe.

On Saturday, December 24, 2016 at 9:16:48 AM UTC, Alice Ryhl wrote:
>
> unsub 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: About inclusion of sage commands and output on word file/Latex file

2016-12-24 Thread Dima Pasechnik
This is a bit off-topic, but writing maths in word is not really a good 
idea. Every worthwhile
publication venue in mathematics or CS supports (La)TeX.


On Saturday, December 24, 2016 at 7:52:53 AM UTC, NITIN DARKUNDE wrote:
>
> Dear group members,
>I have been using sage since last 01 month. 
> I just done some easy commands in it . I want to ask you, how to take these 
> commands and their output on word/latex file?(So that I can include, this 
> stuff in my research paper). Thanks.
>
> -- 
> --
> Yours faithfully,
> ---
>
>
>
>
>
>
>
>
> *Mr. Nitin Shridhar Darkunde.Assistant Professor,Department of 
> Mathematics,School of Mathematical Sciences,Swami Ramanand Teerth 
> Marathwada University,Vishnupuri, Nanded-431 606 (M.S.), India.Mob. 
> No:08275268895Or   
>  09273500312*
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: About inclusion of sage commands and output on word file/Latex file

2016-12-24 Thread NITIN DARKUNDE
I mean that, if there is any way via which one can get the output on word
and then on latex, in order to include in research paper. I am strongly of
opinion that maths writing must be in latex.

On Dec 24, 2016 4:43 PM, "Dima Pasechnik"  wrote:

> This is a bit off-topic, but writing maths in word is not really a good
> idea. Every worthwhile
> publication venue in mathematics or CS supports (La)TeX.
>
>
> On Saturday, December 24, 2016 at 7:52:53 AM UTC, NITIN DARKUNDE wrote:
>>
>> Dear group members,
>>I have been using sage since last 01
>> month. I just done some easy commands in it . I want to ask you, how to
>> take these commands and their output on word/latex file?(So that I can
>> include, this stuff in my research paper). Thanks.
>>
>> --
>> --
>> Yours faithfully,
>> ---
>>
>>
>>
>>
>>
>>
>>
>>
>> *Mr. Nitin Shridhar Darkunde.Assistant Professor,Department of
>> Mathematics,School of Mathematical Sciences,Swami Ramanand Teerth
>> Marathwada University,Vishnupuri, Nanded-431 606 (M.S.), India.Mob.
>> No:08275268895Or
>>  09273500312*
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: About inclusion of sage commands and output on word file/Latex file

2016-12-24 Thread David Joyner
On Sat, Dec 24, 2016 at 6:16 AM, NITIN DARKUNDE  wrote:
> I mean that, if there is any way via which one can get the output on word
> and then on latex, in order to include in research paper. I am strongly of
> opinion that maths writing must be in latex.
>


I like the fancyvrb package. Add

\usepackage{fancyvrb}

and

\newcommand{\sage}{{\sf Sagemath}\,}

to the preamble. Then add



\begin{Verbatim}[fontsize=\scriptsize,fontfamily=courier,fontshape=tt,frame=single,label=\sage]

sage: A = matrix(QQ, [[1 , -1 , 2 , 3 , 0], [ -1, 0, -4, 3, -1],
  [2, -1, 6, 0, 1], [-1, 2, 0, 1, 1]])
sage: A.right_kernel()
Vector space of degree 5 and dimension 2 over Rational Field
Basis matrix:
[   10 -1/201]
[   01  1/20   -2]

\end{Verbatim}



for the sagemath commands in the body of your document. It looks
really nice, IMHO.


> On Dec 24, 2016 4:43 PM, "Dima Pasechnik"  wrote:
>>
>> This is a bit off-topic, but writing maths in word is not really a good
>> idea. Every worthwhile
>> publication venue in mathematics or CS supports (La)TeX.
>>
>>
>> On Saturday, December 24, 2016 at 7:52:53 AM UTC, NITIN DARKUNDE wrote:
>>>
>>> Dear group members,
>>>I have been using sage since last 01
>>> month. I just done some easy commands in it . I want to ask you, how to take
>>> these commands and their output on word/latex file?(So that I can include,
>>> this stuff in my research paper). Thanks.
>>>
>>> --
>>> --
>>> Yours faithfully,
>>> ---
>>> Mr. Nitin Shridhar Darkunde.
>>> Assistant Professor,
>>> Department of Mathematics,
>>> School of Mathematical Sciences,
>>> Swami Ramanand Teerth Marathwada University,
>>> Vishnupuri, Nanded-431 606 (M.S.), India.
>>> Mob. No:08275268895Or09273500312
>>> 
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-support+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-support@googlegroups.com.
>> Visit this group at https://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: About inclusion of sage commands and output on word file/Latex file

2016-12-24 Thread Dima Pasechnik


On Saturday, December 24, 2016 at 11:17:00 AM UTC, NITIN DARKUNDE wrote:
>
> I mean that, if there is any way via which one can get the output on word 
> and then on latex, in order to include in research paper. I am strongly of 
> opinion that maths writing must be in latex. 
>

Do you mean to say that you want to get a Word document (.doc/.docx -?) 
output? No, certainly not.
But you can get LaTeX output directly, in several ways.
   

>
> On Dec 24, 2016 4:43 PM, "Dima Pasechnik" > 
> wrote:
>
>> This is a bit off-topic, but writing maths in word is not really a good 
>> idea. Every worthwhile
>> publication venue in mathematics or CS supports (La)TeX.
>>
>>
>> On Saturday, December 24, 2016 at 7:52:53 AM UTC, NITIN DARKUNDE wrote:
>>>
>>> Dear group members,
>>>I have been using sage since last 01 
>>> month. I just done some easy commands in it . I want to ask you, how to 
>>> take these commands and their output on word/latex file?(So that I can 
>>> include, this stuff in my research paper). Thanks.
>>>
>>> -- 
>>> --
>>> Yours faithfully,
>>> ---
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *Mr. Nitin Shridhar Darkunde.Assistant Professor,Department of 
>>> Mathematics,School of Mathematical Sciences,Swami Ramanand Teerth 
>>> Marathwada University,Vishnupuri, Nanded-431 606 (M.S.), India.Mob. 
>>> No:08275268895Or   
>>>  09273500312*
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support...@googlegroups.com .
>> To post to this group, send email to sage-s...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/sage-support.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Universal grobner basis and graver basis of an ideal associated to linear code using sage

2016-12-24 Thread NITIN DARKUNDE
Dear group members,
   I have found out a grobner basis of an ideal associated to some
binary linear code using sage. Output contains 2127  polynomials
(binomials) in 19 variables( I used degrevlex order). Is there any command
in sage via which one can compute Universal Grobner basis and Graver basis
of an ideal with which we started?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Using extra gap packages

2016-12-24 Thread Enrique Artal
I need to use a gap package which is not installed by sage, namely nq. I 
have been able to install it using wiki instructions and I can use it in a 
gap session inside sage: e.g., 

LowerCentralFactors(FreeGroup(1),1);

after the package has been loaded. In a sage session the following code 
works 

gap_reset_workspace()
gap.LoadPackage('"nq"')
F0=gap.FreeGroup(1)
gap.LowerCentralFactors(F0,1)

but not the following one

gap.LowerCentralFactors(FreeGroup(1).gap(),1)

Thanks, Enrique

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Using extra gap packages

2016-12-24 Thread Dima Pasechnik


On Saturday, December 24, 2016 at 3:38:43 PM UTC, Enrique Artal wrote:
>
> I need to use a gap package which is not installed by sage, namely nq. I 
> have been able to install it using wiki instructions and I can use it in a 
> gap session inside sage: e.g., 
>
> LowerCentralFactors(FreeGroup(1),1);
>
> after the package has been loaded. In a sage session the following code 
> works 
>
> gap_reset_workspace()
> gap.LoadPackage('"nq"')
> F0=gap.FreeGroup(1)
> gap.LowerCentralFactors(F0,1)
>
> but not the following one
>
> gap.LowerCentralFactors(FreeGroup(1).gap(),1)
>

I'd suggest using libgap. rather than gap., in particular as Sage's 
FreeGroup is implemented using libgap
interface. So the last command needs to cross from GAP to libGAP interface, 
and this might be flaky.


 

>
> Thanks, Enrique
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Using extra gap packages

2016-12-24 Thread Dima Pasechnik


On Saturday, December 24, 2016 at 11:20:32 PM UTC, Dima Pasechnik wrote:
>
>
>
> On Saturday, December 24, 2016 at 3:38:43 PM UTC, Enrique Artal wrote:
>>
>> I need to use a gap package which is not installed by sage, namely nq. I 
>> have been able to install it using wiki instructions and I can use it in a 
>> gap session inside sage: e.g., 
>>
>> LowerCentralFactors(FreeGroup(1),1);
>>
>> after the package has been loaded. In a sage session the following code 
>> works 
>>
>> gap_reset_workspace()
>> gap.LoadPackage('"nq"')
>> F0=gap.FreeGroup(1)
>> gap.LowerCentralFactors(F0,1)
>>
>> but not the following one
>>
>> gap.LowerCentralFactors(FreeGroup(1).gap(),1)
>>
>
> I'd suggest using libgap. rather than gap., in particular as Sage's 
> FreeGroup is implemented using libgap
> interface. So the last command needs to cross from GAP to libGAP 
> interface, and this might be flaky.
>

indeed, the following works (afer installing nq):

sage: libgap.LowerCentralFactors(FreeGroup(1),1)
[ [ 0 ] ]
sage: libgap.LoadPackage('nq') # single ' here!
true
sage: F0=libgap.FreeGroup(1)
sage: libgap. (F0,1)
[ [ 0 ] ]
sage: libgap.LowerCentralFactors(FreeGroup(1),1)
[ [ 0 ] ]
  
To make this work you will need to edit the file
SAGE_ROOT/src/sage/libs/gap/gap_functions.py
and add the line

  'LowerCentralFactors',

into the long list of GAP functions there. 
(And probably more functions from the package
need to be added to be callable this way)

we will need to automate this at some point...

Don't forget to run 'sage -b' for this change to take effect.

HTH
Dima


>
>  
>
>>
>> Thanks, Enrique
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Universal grobner basis and graver basis of an ideal associated to linear code using sage

2016-12-24 Thread Dima Pasechnik
Sage has a package called 4ti2 ("sage -i 4ti2" will install it, at least if 
your Sage installation is 
compiled from source, other, which gives you a tool to compute with 
groebner bases of binomial ideals 
(more precisely, toric ideals, but this is more or less the same)
see http://www.4ti2.de/groebner.html
In particular the universal GB of toric ideals are known as Graver bases, 
see e.g. p.60 of
https://homepages.warwick.ac.uk/staff/D.Maclagan/papers/indialectures.pdf.gz
and they can be computed by 4ti2, see http://www.4ti2.de/graver.html

HTH
Dima

On Saturday, December 24, 2016 at 1:03:20 PM UTC, NITIN DARKUNDE wrote:
>
> Dear group members, 
>I have found out a grobner basis of an ideal associated to some 
> binary linear code using sage. Output contains 2127  polynomials 
> (binomials) in 19 variables( I used degrevlex order). Is there any command 
> in sage via which one can compute Universal Grobner basis and Graver basis 
> of an ideal with which we started? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Grobner bases of ideals

2016-12-24 Thread Dima Pasechnik


On Thursday, December 22, 2016 at 12:17:37 PM UTC, Simon King wrote:
>
> On 2016-12-21, jack > wrote: 
> >> Try removing the semi-colon;;; 
>
> No. I tried the example, using different term orders (the OP uses lex, 
> I also tried degrevlex), but it didn't finish within 15 minutes. So, I'd 
> say that simply the problem is very difficult. On the other hand, the 
> given polynomials have an easy form, in particular they are all 
> binomials. So, it might work to use a special machinery for binomial 
> ideals - I don't think that Singular has an optimisation for it. 
>
> as I posted in another thread, 4ti2 (also the Sage package)
supports binomial (aka toric) ideals,
so this seems to be the right tool for the job here.

 

> Best regards, 
> Simon 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Using extra gap packages

2016-12-24 Thread Enrique Artal
Thanks!

El domingo, 25 de diciembre de 2016, 0:40:43 (UTC+1), Dima Pasechnik 
escribió:
>
>
>
> On Saturday, December 24, 2016 at 11:20:32 PM UTC, Dima Pasechnik wrote:
>>
>>
>>
>> On Saturday, December 24, 2016 at 3:38:43 PM UTC, Enrique Artal wrote:
>>>
>>> I need to use a gap package which is not installed by sage, namely nq. I 
>>> have been able to install it using wiki instructions and I can use it in a 
>>> gap session inside sage: e.g., 
>>>
>>> LowerCentralFactors(FreeGroup(1),1);
>>>
>>> after the package has been loaded. In a sage session the following code 
>>> works 
>>>
>>> gap_reset_workspace()
>>> gap.LoadPackage('"nq"')
>>> F0=gap.FreeGroup(1)
>>> gap.LowerCentralFactors(F0,1)
>>>
>>> but not the following one
>>>
>>> gap.LowerCentralFactors(FreeGroup(1).gap(),1)
>>>
>>
>> I'd suggest using libgap. rather than gap., in particular as Sage's 
>> FreeGroup is implemented using libgap
>> interface. So the last command needs to cross from GAP to libGAP 
>> interface, and this might be flaky.
>>
>
> indeed, the following works (afer installing nq):
>
> sage: libgap.LowerCentralFactors(FreeGroup(1),1)
> [ [ 0 ] ]
> sage: libgap.LoadPackage('nq') # single ' here!
> true
> sage: F0=libgap.FreeGroup(1)
> sage: libgap. (F0,1)
> [ [ 0 ] ]
> sage: libgap.LowerCentralFactors(FreeGroup(1),1)
> [ [ 0 ] ]
>   
> To make this work you will need to edit the file
> SAGE_ROOT/src/sage/libs/gap/gap_functions.py
> and add the line
>
>   'LowerCentralFactors',
>
> into the long list of GAP functions there. 
> (And probably more functions from the package
> need to be added to be callable this way)
>
> we will need to automate this at some point...
>
> Don't forget to run 'sage -b' for this change to take effect.
>
> HTH
> Dima
>
>
>>
>>  
>>
>>>
>>> Thanks, Enrique
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.