Re: [sage-devel] Re: Simple integral raises AttributeError

2019-12-09 Thread Emmanuel Charpentier


Le lundi 9 décembre 2019 03:16:10 UTC+1, rjf a écrit :

FYI: 
> In Maxima,  integrate_use_rootsof: true
> changes the result from an unevaluated integral to
> lsum(log(x-%r1)/(4*%r1^3+2*%r1),%r1,rootsof(a+%r1^4+%r1^2,%r1))
>
> which is fairly compact, and to the point, but
> which may or may not be what you want.  The inside of  rootsof
> can be picked out and the 4 roots solved in terms of radicals
> by Maxima's solve().  *
>
Aciddentally ! For example, [image: x^5+x^3+1] doesn’t have a solution in 
terms of radicals. Trying to solve it in Maxima fails ; and %solve gives a 
list of *numerical* roots.

If the expression rootsof() is replaced by a list of the roots
> returns by solve,  { something like   substpart( map(rhs, solve( 
> Z,3,1,x)), Z 3), lsum   }
> you get a large explicit mess of nested radicals and logs.
>
Indeed. And one may add that this solution has some drawbacks problems: 
computing only one value of the resultt primitive takes several seconds, 
trying to plot it is pointless…

That Mathematical result with arctan is nicer that the explicit
> radical stuff.
>
“Nicer” depends of what you want to do with the result. In some cases, the 
approximate answer obtained via %solve is preferable (e. g. plotting). In 
other cases, the explicit log/roots mess is preferable (e. g. trying to 
prove that the value of the primitive is real for all real values of the 
aurument).

The “exact” answers given by Sage via (x^5+x^3+1).roots(ring=QQbar) may be 
preferable: a radical expression, if it exists, may be obtained via the 
radical_expression() method, and the precision is not limited to any 
specific floating-point approximation ; some equalities may be provable 
using them.

OTOH, such values won’t pass to Maxima, and the resulting answers cannot be 
further simplified…

The more general way to do this is :

   - remark that the polynoimial [image: x^5+x^3+1] has five (possibly 
   confounded) roots, and name them [image: r_1,\dots,r_5] ; 
   - rewrite it as [image: \displaystyle\prod_{r\in r_1,\dots,\r_5}(x-r)], 
   - integrate using this rewriting, 
   - substitute [image: r_1\dots,r_5] as needed by your various uses of the 
   result. 

HTH,


> RJF
>
>
> On Friday, December 6, 2019 at 7:28:40 PM UTC-8, Emmanuel Charpentier 
> wrote:
>>
>> Okay. That means that we need
>>
>>- a wrapper for RootSum, AND
>>- a wrapper for Lambda.
>>
>> ISTR that Mathematica has a similar setup.A rare occasion to kill two 
>> birds wit the same (two) stones. However, Mathematica's "pure functions" 
>> are, as far as I can tell, totally unknown to Sage...
>>
>> Thank you, Dima !
>>
>> Le mercredi 4 décembre 2019 23:21:39 UTC+1, Dima Pasechnik a écrit :
>>>
>>> On Wed, Dec 4, 2019 at 7:14 PM Emmanuel Charpentier 
>>>  wrote: 
>>> > 
>>> > The old (> 5 years...) Trac#16816 ticket is germane... 
>>> > 
>>> > BTW, I'm not sure that this would be very helpful: 
>>> > 
>>> > sage: foo=sympy.integrate(*[sympy.sympify(u) for u in (1/(x^4+x^2+a), 
>>> x)]); foo 
>>> > RootSum(_t**4*(256*a**3 - 128*a**2 + 16*a) + _t**2*(4 - 16*a) + 1, 
>>> Lambda(_t, _t*log(32*_t**3*a**2 - 8*_t**3*a + 4*_t*a - 2*_t + x))) 
>>> > sage: foo.doit()._sage_().factor().simplify_full() 
>>> > 1/4*sqrt(2)*(sqrt((4*a + sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 
>>> 1)/(16*a^3 - 8*a^2 + a))*log(1/4*sqrt(2)*((4*a^2 - a)*((4*a + sqrt(-64*a^3 
>>> + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 8*a^2 + a))^(3/2) + 2*sqrt(2)*x + 
>>> 2*(2*a - 1)*sqrt((4*a + sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 
>>> 8*a^2 + a - sqrt((4*a + sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 
>>> - 8*a^2 + a))*log(-1/4*sqrt(2)*((4*a^2 - a)*((4*a + sqrt(-64*a^3 + 48*a^2 - 
>>> 12*a + 1) - 1)/(16*a^3 - 8*a^2 + a))^(3/2) - 2*sqrt(2)*x + 2*(2*a - 
>>> 1)*sqrt((4*a + sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 8*a^2 + 
>>> a + sqrt((4*a - sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 8*a^2 
>>> + a))*log(1/4*sqrt(2)*((4*a^2 - a)*((4*a - sqrt(-64*a^3 + 48*a^2 - 12*a + 
>>> 1) - 1)/(16*a^3 - 8*a^2 + a))^(3/2) + 2*sqrt(2)*x + 2*(2*a - 1)*sqrt((4*a - 
>>> sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 8*a^2 + a - sqrt((4*a 
>>> - sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 8*a^2 + 
>>> a))*log(-1/4*sqrt(2)*((4*a^2 - a)*((4*a - sqrt(-64*a^3 + 48*a^2 - 12*a + 1) 
>>> - 1)/(16*a^3 - 8*a^2 + a))^(3/2) - 2*sqrt(2)*x + 2*(2*a - 1)*sqrt((4*a - 
>>> sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 8*a^2 + a) 
>>> > 
>>> > Cheers ! ... 
>>> > 
>>> > However, Sage can come to the rescue. We can compute the root sum *in 
>>> Sage*, thus getting a "more interesting" result: 
>>> > 
>>> > sage: S1=sum([u[0]^u[1] for u in 
>>> foo.args[0]._sage_().roots()]).expand().simplify(); S1 
>>> > 1/2 
>>> > 
>>> > And (manually) use this result in the second expression. Here, I'm 
>>> stuck, because I do not (yet) understand how the lambda expression, second 
>>> argument of RooSum, is supposed to be used. 
>>>
>>> RootSum(f(t), Lambda(y,g(y)) means 
>>>
>>> sum_{y: f(y)=0} g(y)

Re: [sage-devel] We are missing Cygwin patchbots

2019-12-09 Thread E. Madison Bray
Hi Samuel,

Coincidentally I just commented on this problem in another ticket, and
then I saw this post.  I'm going to see if I can get my Cygwin
patchbot up and running again.  But it would be helpful to have
another.

Thanks for putting out the call.  If anyone wants to try there are
instructions for building Sage on Cygwin at
https://trac.sagemath.org/wiki/Cygwin64Port (which I've recently
updated with a simplified checklist of instructions; if you try it out
please let me know if you run into any trouble with the instructions).

On Mon, Dec 9, 2019 at 4:46 AM Samuel Lelievre
 wrote:
>
> Dear Sage-devel,
>
> To try and help with Erik Bray's Sage-Windows project,
> for the past year or so I have tried to build Sage
> on Cygwin64 on Windows 7, and got to the point where
> it was reliably building successfully for a while.
>
> The tests were never passing completely, but a number
> of issues were found and fixed and I was getting close
> to getting the "All tests pass!" signal from testlong,
> at which point I could have started running a patchbot.
>
> The past few months for various reasons I have not been
> able to have Sage build on Cygwin64 on Windows 7 -- and
> in any case Microsoft is dropping support for Windows 7
> on 20 Jan 2020, so I won't be able to pursue my efforts
> in the same setting.
>
> If any of you have access to a Windows machine on which
> you could install Cygwin and run a patchbot, that would
> be very appreciated. Or if someone can donate a machine
> with Windows 8 or Windows 10, or give me remote access
> to one, I could renew my efforts.
>
> (I am in the USA till 30 Dec 2019 and back in France
> after that.)
>
> Kind regards,
> Samuel
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/2dba325a-19ca-4996-85a3-b04576ee5b4d%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAOTD34ZFUOihx%2BNAL6RjEhzMsNTD1mBFtqmLfsXe22iiuuR4bA%40mail.gmail.com.


Re: [sage-devel] We are missing Cygwin patchbots

2019-12-09 Thread Dima Pasechnik
On Mon, Dec 9, 2019 at 11:37 AM E. Madison Bray  wrote:
>
> Hi Samuel,
>
> Coincidentally I just commented on this problem in another ticket, and
> then I saw this post.  I'm going to see if I can get my Cygwin
> patchbot up and running again.  But it would be helpful to have
> another.
>
> Thanks for putting out the call.  If anyone wants to try there are
> instructions for building Sage on Cygwin at
> https://trac.sagemath.org/wiki/Cygwin64Port (which I've recently
> updated with a simplified checklist of instructions; if you try it out
> please let me know if you run into any trouble with the instructions).

do you know a cloud provider that makes it possible to run a Cygwin bot
in a Unixy style, with access via ssh, etc.?

(if this is at all possible - 20 years ago I could set up a ssh
connection to a Windows 2000
machine without much trouble, and VNC worked too; nowadays not sure at all)

Few months ago I tried setting a Cygwin host on Azure, and it didn't go well.
Amusingly I was only able to connect to it from a Mac or from Windows,
not from Linux...

Perhaps one should try to set up a Cygwin bot on Google Compute (using
Samuel's credits).
If this can work then one can clone the resulting image and re-use.
(or perhaps use another cloud provider, e.g. AWS EC2).

Dima


>
> On Mon, Dec 9, 2019 at 4:46 AM Samuel Lelievre
>  wrote:
> >
> > Dear Sage-devel,
> >
> > To try and help with Erik Bray's Sage-Windows project,
> > for the past year or so I have tried to build Sage
> > on Cygwin64 on Windows 7, and got to the point where
> > it was reliably building successfully for a while.
> >
> > The tests were never passing completely, but a number
> > of issues were found and fixed and I was getting close
> > to getting the "All tests pass!" signal from testlong,
> > at which point I could have started running a patchbot.
> >
> > The past few months for various reasons I have not been
> > able to have Sage build on Cygwin64 on Windows 7 -- and
> > in any case Microsoft is dropping support for Windows 7
> > on 20 Jan 2020, so I won't be able to pursue my efforts
> > in the same setting.
> >
> > If any of you have access to a Windows machine on which
> > you could install Cygwin and run a patchbot, that would
> > be very appreciated. Or if someone can donate a machine
> > with Windows 8 or Windows 10, or give me remote access
> > to one, I could renew my efforts.
> >
> > (I am in the USA till 30 Dec 2019 and back in France
> > after that.)
> >
> > Kind regards,
> > Samuel
> >
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/2dba325a-19ca-4996-85a3-b04576ee5b4d%40googlegroups.com.
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/CAOTD34ZFUOihx%2BNAL6RjEhzMsNTD1mBFtqmLfsXe22iiuuR4bA%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq0Mf_VO8LM9%2Bne3L_%3DAXkdbCgOcQ6Mj7OY1W0xpRynG8w%40mail.gmail.com.


Re: [sage-devel] Simple integral raises AttributeError

2019-12-09 Thread Thierry
Hi,

On Wed, Dec 04, 2019 at 07:38:34AM -0800, Eric Gourgoulhon wrote:
> Hi,
> 
> In Sage 9.0.beta8 we have
> 
> sage: a = var('a')
> sage: integrate(1/(x^4 + x^2 + a), x)
> ...
> AttributeError: 'RootSum' object has no attribute '_sage_'
> 
> The same error occurs in Sage 8.9, but not in Sage 8.8 (and below). In Sage 
> 8.8, we have instead:
> 
> sage: a = var('a')
> sage: integrate(1/(x^4 + x^2 + a), x)
> integrate(1/(x^4 + x^2 + a), x)
> 
> Note that RootSum is a SymPy object. Actually, in Sage 9.0.beta8, forcing 
> the algorithm to 'maxima' yields the same result as in Sage 8.8:
> 
> sage: integrate(1/(x^4 + x^2 + a), x, algorithm='maxima')
> integrate(1/(x^4 + x^2 + a), x)
> 
> So it seems that since Sage 8.9, when integrate() is not capable to find an 
> answer via Maxima, it tries SymPy but is not capable to translate the 
> result back to Sage. I could not find a ticket about this. Shall I open one?

For what it worth, the change was done at
https://trac.sagemath.org/ticket/27958

Ciao,
Thierry


> Eric. 
> 
> PS: for the record, a primitive of 1/(x^4 + x^2 + a) is
> 
> sage: b = sqrt(1 - 4*a)
> sage: f = sqrt(2)/b*(arctan(sqrt(2)*x/sqrt(1 - b))/sqrt(1 - b)  - 
> arctan(sqrt(2)*x/sqrt(1 + b))/sqrt(1 + b))
> 
> as we can check:
> 
> sage: diff(f, x).simplify_full()
> 1/(x^4 + x^2 + a)
> 
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/5e7fbd5a-f422-4268-b2fb-f77d58c4a2e2%40googlegroups.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/20191209135522.n7ymn5yfpcurdppq%40metelu.net.


Re: [sage-devel] The space character in "Program Files" in Cygwin on Windows

2019-12-09 Thread E. Madison Bray
On Mon, Dec 9, 2019 at 8:42 AM Dima Pasechnik  wrote:
>
> I don't think Cygwin supports paths with spaces in them.

Of course it does. However, it looks like Samuel ran `make configure`
which is trying to run the `bootstrap` script, which since
https://trac.sagemath.org/ticket/27823 calls gettextize, but some of
the uses of gettextize are not properly quoted.

However, it looks like the gettext-devel package is not installed on
his Cygwin, and it happens to be finding a gettextize that was
including in Git for Windows which was also on his path.  This is
clearly no good.

gettextize-devel should be added to the list of packages to install I
guess (the default instructions assume you don't have autotools and
all and will just download the configure tarball...)

> On Mon, 9 Dec 2019, 03:53 Samuel Lelievre,  wrote:
>>
>> Dear Sage-devel,
>>
>> Recently I have a problem with Sage on Cygwin where
>> running `make configure` runs into a problem with the
>> space in the "Program Files" directory in Windows.
>>
>> Apparently there is an attempt to read
>>
>> /cygdrive/c/Program Files/Git/mingw64/bin/gettextize
>>
>> but the path gets split at the space into two parts,
>> as if
>>
>> /cygdrive/c/Program
>>
>> and
>>
>> Files/Git/mingw64/bin/gettextize
>>
>> were two different paths, and this protest is issued:
>>
>> sed: unable to read
>> /cygdrive/c/Program:
>> No such file or directory
>>
>> sed: unable to read
>> Files/Git/mingw64/bin/gettextize:
>> No such file or directory
>>
>> See below with a French locale.
>>
>> Any advice on what to do?
>>
>> Samuel
>>
>> - output of make configure -
>> ```
>> $ make configure
>> ./bootstrap -d
>> make[1] : on entre dans le répertoire « /home/lelievre/s/sage2 »
>> rm -rf config configure build/make/Makefile-auto.in
>> make[1] : on quitte le répertoire « /home/lelievre/s/sage2 »
>> sed: impossible de lire /cygdrive/c/Program: No such file or directory
>> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or 
>> directory
>> sed: impossible de lire /cygdrive/c/Program: No such file or directory
>> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or 
>> directory
>> sed: impossible de lire /cygdrive/c/Program: No such file or directory
>> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or 
>> directory
>> sed: impossible de lire /cygdrive/c/Program: No such file or directory
>> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or 
>> directory
>> Failed to read the gettext_datadir directory from /cygdrive/c/Program 
>> Files/Git/mingw64/bin/gettextize
>> The config.rpath file must manually be copied into config/
>> This file is installed with gettext typically in /usr/share/gettext
>> Bootstrap failed, downloading required files instead.
>> Attempting to download package 
>> configure-b4df16c19ab9b47303b7f3eaf78bb6c1b1c89679.tar.gz from mirrors
>> Downloading the Sage mirror list
>> ```
>>
>> --
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-devel/9fcf423f-ff7a-47ed-ac55-7f66bd1e90cb%40googlegroups.com.
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/CAAWYfq3qGbu9eo4eM1-sv-D%3Dx-UBb_C_t%3D-JgvdViOTe9xzkPQ%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAOTD34Z-GPFJVHGnprqFn-%3DbN5-jX9BOK4HNTumzAiZ8b6sPOA%40mail.gmail.com.


Re: [sage-devel] The space character in "Program Files" in Cygwin on Windows

2019-12-09 Thread E. Madison Bray
On Mon, Dec 9, 2019 at 4:34 PM E. Madison Bray  wrote:
>
> On Mon, Dec 9, 2019 at 8:42 AM Dima Pasechnik  wrote:
> >
> > I don't think Cygwin supports paths with spaces in them.
>
> Of course it does. However, it looks like Samuel ran `make configure`
> which is trying to run the `bootstrap` script, which since
> https://trac.sagemath.org/ticket/27823 calls gettextize, but some of
> the uses of gettextize are not properly quoted.
>
> However, it looks like the gettext-devel package is not installed on
> his Cygwin, and it happens to be finding a gettextize that was
> including in Git for Windows which was also on his path.  This is
> clearly no good.
>
> gettextize-devel should be added to the list of packages to install I
> guess (the default instructions assume you don't have autotools and
> all and will just download the configure tarball...)

* Sorry, that should say "gettext-devel"

> > On Mon, 9 Dec 2019, 03:53 Samuel Lelievre,  
> > wrote:
> >>
> >> Dear Sage-devel,
> >>
> >> Recently I have a problem with Sage on Cygwin where
> >> running `make configure` runs into a problem with the
> >> space in the "Program Files" directory in Windows.
> >>
> >> Apparently there is an attempt to read
> >>
> >> /cygdrive/c/Program Files/Git/mingw64/bin/gettextize
> >>
> >> but the path gets split at the space into two parts,
> >> as if
> >>
> >> /cygdrive/c/Program
> >>
> >> and
> >>
> >> Files/Git/mingw64/bin/gettextize
> >>
> >> were two different paths, and this protest is issued:
> >>
> >> sed: unable to read
> >> /cygdrive/c/Program:
> >> No such file or directory
> >>
> >> sed: unable to read
> >> Files/Git/mingw64/bin/gettextize:
> >> No such file or directory
> >>
> >> See below with a French locale.
> >>
> >> Any advice on what to do?
> >>
> >> Samuel
> >>
> >> - output of make configure -
> >> ```
> >> $ make configure
> >> ./bootstrap -d
> >> make[1] : on entre dans le répertoire « /home/lelievre/s/sage2 »
> >> rm -rf config configure build/make/Makefile-auto.in
> >> make[1] : on quitte le répertoire « /home/lelievre/s/sage2 »
> >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
> >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or 
> >> directory
> >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
> >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or 
> >> directory
> >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
> >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or 
> >> directory
> >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
> >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file or 
> >> directory
> >> Failed to read the gettext_datadir directory from /cygdrive/c/Program 
> >> Files/Git/mingw64/bin/gettextize
> >> The config.rpath file must manually be copied into config/
> >> This file is installed with gettext typically in /usr/share/gettext
> >> Bootstrap failed, downloading required files instead.
> >> Attempting to download package 
> >> configure-b4df16c19ab9b47303b7f3eaf78bb6c1b1c89679.tar.gz from mirrors
> >> Downloading the Sage mirror list
> >> ```
> >>
> >> --
> >> 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 view this discussion on the web visit 
> >> https://groups.google.com/d/msgid/sage-devel/9fcf423f-ff7a-47ed-ac55-7f66bd1e90cb%40googlegroups.com.
> >
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/CAAWYfq3qGbu9eo4eM1-sv-D%3Dx-UBb_C_t%3D-JgvdViOTe9xzkPQ%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAOTD34ZLu086Br22RS0cKZuxPbLxviZ%3D3D4VVjh5CtwYnpDtvA%40mail.gmail.com.


Re: [sage-devel] We are missing Cygwin patchbots

2019-12-09 Thread E. Madison Bray
On Mon, Dec 9, 2019 at 12:56 PM Dima Pasechnik  wrote:
>
> On Mon, Dec 9, 2019 at 11:37 AM E. Madison Bray  wrote:
> >
> > Hi Samuel,
> >
> > Coincidentally I just commented on this problem in another ticket, and
> > then I saw this post.  I'm going to see if I can get my Cygwin
> > patchbot up and running again.  But it would be helpful to have
> > another.
> >
> > Thanks for putting out the call.  If anyone wants to try there are
> > instructions for building Sage on Cygwin at
> > https://trac.sagemath.org/wiki/Cygwin64Port (which I've recently
> > updated with a simplified checklist of instructions; if you try it out
> > please let me know if you run into any trouble with the instructions).
>
> do you know a cloud provider that makes it possible to run a Cygwin bot
> in a Unixy style, with access via ssh, etc.?

Yes, I already have it.  It's what it's always been on (when it was
working).  But running Windows in a Linux KVM tends to be slow.
However, I tried it with Azure a while back and it was also slow.


> > On Mon, Dec 9, 2019 at 4:46 AM Samuel Lelievre
> >  wrote:
> > >
> > > Dear Sage-devel,
> > >
> > > To try and help with Erik Bray's Sage-Windows project,
> > > for the past year or so I have tried to build Sage
> > > on Cygwin64 on Windows 7, and got to the point where
> > > it was reliably building successfully for a while.
> > >
> > > The tests were never passing completely, but a number
> > > of issues were found and fixed and I was getting close
> > > to getting the "All tests pass!" signal from testlong,
> > > at which point I could have started running a patchbot.
> > >
> > > The past few months for various reasons I have not been
> > > able to have Sage build on Cygwin64 on Windows 7 -- and
> > > in any case Microsoft is dropping support for Windows 7
> > > on 20 Jan 2020, so I won't be able to pursue my efforts
> > > in the same setting.
> > >
> > > If any of you have access to a Windows machine on which
> > > you could install Cygwin and run a patchbot, that would
> > > be very appreciated. Or if someone can donate a machine
> > > with Windows 8 or Windows 10, or give me remote access
> > > to one, I could renew my efforts.
> > >
> > > (I am in the USA till 30 Dec 2019 and back in France
> > > after that.)
> > >
> > > Kind regards,
> > > Samuel
> > >
> > > --
> > > 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 view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/sage-devel/2dba325a-19ca-4996-85a3-b04576ee5b4d%40googlegroups.com.
> >
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/CAOTD34ZFUOihx%2BNAL6RjEhzMsNTD1mBFtqmLfsXe22iiuuR4bA%40mail.gmail.com.
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/CAAWYfq0Mf_VO8LM9%2Bne3L_%3DAXkdbCgOcQ6Mj7OY1W0xpRynG8w%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAOTD34YDfXSEzqF_EnQZUk0ikvEB7jXoC72BO9ucJ48364554w%40mail.gmail.com.


Re: [sage-devel] The space character in "Program Files" in Cygwin on Windows

2019-12-09 Thread Dima Pasechnik
well, I recall replacing "Program\ Files" with PROGRA~1 all over the place,
in 1999  :-)

anyway it is a hassle, for e.g. GNU make is not too happy with paths with
spaces, either.

On Mon, 9 Dec 2019, 15:35 E. Madison Bray,  wrote:

> On Mon, Dec 9, 2019 at 4:34 PM E. Madison Bray 
> wrote:
> >
> > On Mon, Dec 9, 2019 at 8:42 AM Dima Pasechnik  wrote:
> > >
> > > I don't think Cygwin supports paths with spaces in them.
> >
> > Of course it does. However, it looks like Samuel ran `make configure`
> > which is trying to run the `bootstrap` script, which since
> > https://trac.sagemath.org/ticket/27823 calls gettextize, but some of
> > the uses of gettextize are not properly quoted.
> >
> > However, it looks like the gettext-devel package is not installed on
> > his Cygwin, and it happens to be finding a gettextize that was
> > including in Git for Windows which was also on his path.  This is
> > clearly no good.
> >
> > gettextize-devel should be added to the list of packages to install I
> > guess (the default instructions assume you don't have autotools and
> > all and will just download the configure tarball...)
>
> * Sorry, that should say "gettext-devel"
>
> > > On Mon, 9 Dec 2019, 03:53 Samuel Lelievre, 
> wrote:
> > >>
> > >> Dear Sage-devel,
> > >>
> > >> Recently I have a problem with Sage on Cygwin where
> > >> running `make configure` runs into a problem with the
> > >> space in the "Program Files" directory in Windows.
> > >>
> > >> Apparently there is an attempt to read
> > >>
> > >> /cygdrive/c/Program Files/Git/mingw64/bin/gettextize
> > >>
> > >> but the path gets split at the space into two parts,
> > >> as if
> > >>
> > >> /cygdrive/c/Program
> > >>
> > >> and
> > >>
> > >> Files/Git/mingw64/bin/gettextize
> > >>
> > >> were two different paths, and this protest is issued:
> > >>
> > >> sed: unable to read
> > >> /cygdrive/c/Program:
> > >> No such file or directory
> > >>
> > >> sed: unable to read
> > >> Files/Git/mingw64/bin/gettextize:
> > >> No such file or directory
> > >>
> > >> See below with a French locale.
> > >>
> > >> Any advice on what to do?
> > >>
> > >> Samuel
> > >>
> > >> - output of make configure -
> > >> ```
> > >> $ make configure
> > >> ./bootstrap -d
> > >> make[1] : on entre dans le répertoire « /home/lelievre/s/sage2 »
> > >> rm -rf config configure build/make/Makefile-auto.in
> > >> make[1] : on quitte le répertoire « /home/lelievre/s/sage2 »
> > >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such
> file or directory
> > >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such
> file or directory
> > >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such
> file or directory
> > >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such
> file or directory
> > >> Failed to read the gettext_datadir directory from /cygdrive/c/Program
> Files/Git/mingw64/bin/gettextize
> > >> The config.rpath file must manually be copied into config/
> > >> This file is installed with gettext typically in /usr/share/gettext
> > >> Bootstrap failed, downloading required files instead.
> > >> Attempting to download package
> configure-b4df16c19ab9b47303b7f3eaf78bb6c1b1c89679.tar.gz from mirrors
> > >> Downloading the Sage mirror list
> > >> ```
> > >>
> > >> --
> > >> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/9fcf423f-ff7a-47ed-ac55-7f66bd1e90cb%40googlegroups.com
> .
> > >
> > > --
> > > 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/CAAWYfq3qGbu9eo4eM1-sv-D%3Dx-UBb_C_t%3D-JgvdViOTe9xzkPQ%40mail.gmail.com
> .
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/CAOTD34ZLu086Br22RS0cKZuxPbLxviZ%3D3D4VVjh5CtwYnpDtvA%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and sto

Re: [sage-devel] The space character in "Program Files" in Cygwin on Windows

2019-12-09 Thread Dima Pasechnik
On Mon, 9 Dec 2019, 15:52 Dima Pasechnik,  wrote:

> well, I recall replacing "Program\ Files" with PROGRA~1 all over the
> place, in 1999  :-)
>
> anyway it is a hassle, for e.g. GNU make is not too happy with paths with
> spaces, either.
>

http://savannah.gnu.org/bugs/?712


> On Mon, 9 Dec 2019, 15:35 E. Madison Bray,  wrote:
>
>> On Mon, Dec 9, 2019 at 4:34 PM E. Madison Bray 
>> wrote:
>> >
>> > On Mon, Dec 9, 2019 at 8:42 AM Dima Pasechnik 
>> wrote:
>> > >
>> > > I don't think Cygwin supports paths with spaces in them.
>> >
>> > Of course it does. However, it looks like Samuel ran `make configure`
>> > which is trying to run the `bootstrap` script, which since
>> > https://trac.sagemath.org/ticket/27823 calls gettextize, but some of
>> > the uses of gettextize are not properly quoted.
>> >
>> > However, it looks like the gettext-devel package is not installed on
>> > his Cygwin, and it happens to be finding a gettextize that was
>> > including in Git for Windows which was also on his path.  This is
>> > clearly no good.
>> >
>> > gettextize-devel should be added to the list of packages to install I
>> > guess (the default instructions assume you don't have autotools and
>> > all and will just download the configure tarball...)
>>
>> * Sorry, that should say "gettext-devel"
>>
>> > > On Mon, 9 Dec 2019, 03:53 Samuel Lelievre, 
>> wrote:
>> > >>
>> > >> Dear Sage-devel,
>> > >>
>> > >> Recently I have a problem with Sage on Cygwin where
>> > >> running `make configure` runs into a problem with the
>> > >> space in the "Program Files" directory in Windows.
>> > >>
>> > >> Apparently there is an attempt to read
>> > >>
>> > >> /cygdrive/c/Program Files/Git/mingw64/bin/gettextize
>> > >>
>> > >> but the path gets split at the space into two parts,
>> > >> as if
>> > >>
>> > >> /cygdrive/c/Program
>> > >>
>> > >> and
>> > >>
>> > >> Files/Git/mingw64/bin/gettextize
>> > >>
>> > >> were two different paths, and this protest is issued:
>> > >>
>> > >> sed: unable to read
>> > >> /cygdrive/c/Program:
>> > >> No such file or directory
>> > >>
>> > >> sed: unable to read
>> > >> Files/Git/mingw64/bin/gettextize:
>> > >> No such file or directory
>> > >>
>> > >> See below with a French locale.
>> > >>
>> > >> Any advice on what to do?
>> > >>
>> > >> Samuel
>> > >>
>> > >> - output of make configure -
>> > >> ```
>> > >> $ make configure
>> > >> ./bootstrap -d
>> > >> make[1] : on entre dans le répertoire « /home/lelievre/s/sage2 »
>> > >> rm -rf config configure build/make/Makefile-auto.in
>> > >> make[1] : on quitte le répertoire « /home/lelievre/s/sage2 »
>> > >> sed: impossible de lire /cygdrive/c/Program: No such file or
>> directory
>> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such
>> file or directory
>> > >> sed: impossible de lire /cygdrive/c/Program: No such file or
>> directory
>> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such
>> file or directory
>> > >> sed: impossible de lire /cygdrive/c/Program: No such file or
>> directory
>> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such
>> file or directory
>> > >> sed: impossible de lire /cygdrive/c/Program: No such file or
>> directory
>> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such
>> file or directory
>> > >> Failed to read the gettext_datadir directory from
>> /cygdrive/c/Program Files/Git/mingw64/bin/gettextize
>> > >> The config.rpath file must manually be copied into config/
>> > >> This file is installed with gettext typically in /usr/share/gettext
>> > >> Bootstrap failed, downloading required files instead.
>> > >> Attempting to download package
>> configure-b4df16c19ab9b47303b7f3eaf78bb6c1b1c89679.tar.gz from mirrors
>> > >> Downloading the Sage mirror list
>> > >> ```
>> > >>
>> > >> --
>> > >> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-devel/9fcf423f-ff7a-47ed-ac55-7f66bd1e90cb%40googlegroups.com
>> .
>> > >
>> > > --
>> > > 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-devel/CAAWYfq3qGbu9eo4eM1-sv-D%3Dx-UBb_C_t%3D-JgvdViOTe9xzkPQ%40mail.gmail.com
>> .
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/m

Re: [sage-devel] The space character in "Program Files" in Cygwin on Windows

2019-12-09 Thread E. Madison Bray
On Mon, Dec 9, 2019 at 4:54 PM Dima Pasechnik  wrote:
>
>
>
> On Mon, 9 Dec 2019, 15:52 Dima Pasechnik,  wrote:
>>
>> well, I recall replacing "Program\ Files" with PROGRA~1 all over the place, 
>> in 1999  :-)
>>
>> anyway it is a hassle, for e.g. GNU make is not too happy with paths with 
>> spaces, either.
>
>
> http://savannah.gnu.org/bugs/?712

Indeed, spaces in filenames are a problem for a number of UNIX
programs, but it's not a problem for Cygwin itself by any means.

The only problem here is that by default your PATH includes the
default PATH for Windows as well, and if you don't have a program in
one of /bin:/usr/bin:/usr/local/bin or any other Cygwin paths on your
PATH, and there *happens* to be some random program (in this case the
same program but an incompatible build thereof) on your Windows PATH
you'll still end up using that one.

This should obviously be avoided.  When working with Cygwin you should
generally avoid using anything outside the Cygwin root filesystem
except by explicit intent (e.g. I do use a few programs outside of
Cygwin such as the Microsoft compilers and related tools).

>> On Mon, 9 Dec 2019, 15:35 E. Madison Bray,  wrote:
>>>
>>> On Mon, Dec 9, 2019 at 4:34 PM E. Madison Bray  
>>> wrote:
>>> >
>>> > On Mon, Dec 9, 2019 at 8:42 AM Dima Pasechnik  wrote:
>>> > >
>>> > > I don't think Cygwin supports paths with spaces in them.
>>> >
>>> > Of course it does. However, it looks like Samuel ran `make configure`
>>> > which is trying to run the `bootstrap` script, which since
>>> > https://trac.sagemath.org/ticket/27823 calls gettextize, but some of
>>> > the uses of gettextize are not properly quoted.
>>> >
>>> > However, it looks like the gettext-devel package is not installed on
>>> > his Cygwin, and it happens to be finding a gettextize that was
>>> > including in Git for Windows which was also on his path.  This is
>>> > clearly no good.
>>> >
>>> > gettextize-devel should be added to the list of packages to install I
>>> > guess (the default instructions assume you don't have autotools and
>>> > all and will just download the configure tarball...)
>>>
>>> * Sorry, that should say "gettext-devel"
>>>
>>> > > On Mon, 9 Dec 2019, 03:53 Samuel Lelievre,  
>>> > > wrote:
>>> > >>
>>> > >> Dear Sage-devel,
>>> > >>
>>> > >> Recently I have a problem with Sage on Cygwin where
>>> > >> running `make configure` runs into a problem with the
>>> > >> space in the "Program Files" directory in Windows.
>>> > >>
>>> > >> Apparently there is an attempt to read
>>> > >>
>>> > >> /cygdrive/c/Program Files/Git/mingw64/bin/gettextize
>>> > >>
>>> > >> but the path gets split at the space into two parts,
>>> > >> as if
>>> > >>
>>> > >> /cygdrive/c/Program
>>> > >>
>>> > >> and
>>> > >>
>>> > >> Files/Git/mingw64/bin/gettextize
>>> > >>
>>> > >> were two different paths, and this protest is issued:
>>> > >>
>>> > >> sed: unable to read
>>> > >> /cygdrive/c/Program:
>>> > >> No such file or directory
>>> > >>
>>> > >> sed: unable to read
>>> > >> Files/Git/mingw64/bin/gettextize:
>>> > >> No such file or directory
>>> > >>
>>> > >> See below with a French locale.
>>> > >>
>>> > >> Any advice on what to do?
>>> > >>
>>> > >> Samuel
>>> > >>
>>> > >> - output of make configure -
>>> > >> ```
>>> > >> $ make configure
>>> > >> ./bootstrap -d
>>> > >> make[1] : on entre dans le répertoire « /home/lelievre/s/sage2 »
>>> > >> rm -rf config configure build/make/Makefile-auto.in
>>> > >> make[1] : on quitte le répertoire « /home/lelievre/s/sage2 »
>>> > >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
>>> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file 
>>> > >> or directory
>>> > >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
>>> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file 
>>> > >> or directory
>>> > >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
>>> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file 
>>> > >> or directory
>>> > >> sed: impossible de lire /cygdrive/c/Program: No such file or directory
>>> > >> sed: impossible de lire Files/Git/mingw64/bin/gettextize: No such file 
>>> > >> or directory
>>> > >> Failed to read the gettext_datadir directory from /cygdrive/c/Program 
>>> > >> Files/Git/mingw64/bin/gettextize
>>> > >> The config.rpath file must manually be copied into config/
>>> > >> This file is installed with gettext typically in /usr/share/gettext
>>> > >> Bootstrap failed, downloading required files instead.
>>> > >> Attempting to download package 
>>> > >> configure-b4df16c19ab9b47303b7f3eaf78bb6c1b1c89679.tar.gz from mirrors
>>> > >> Downloading the Sage mirror list
>>> > >> ```
>>> > >>
>>> > >> --
>>> > >> You received this message because you are subscribed to the Google 
>>> > >> Groups "sage-devel" group.
>>> > >> To unsubscribe from this group and stop receiving emai

Re: [sage-devel] Simple integral raises AttributeError

2019-12-09 Thread Dima Pasechnik
On Mon, Dec 9, 2019 at 1:55 PM Thierry  wrote:
>
> Hi,
>
> On Wed, Dec 04, 2019 at 07:38:34AM -0800, Eric Gourgoulhon wrote:
> > Hi,
> >
> > In Sage 9.0.beta8 we have
> >
> > sage: a = var('a')
> > sage: integrate(1/(x^4 + x^2 + a), x)
> > ...
> > AttributeError: 'RootSum' object has no attribute '_sage_'
> >
> > The same error occurs in Sage 8.9, but not in Sage 8.8 (and below). In Sage
> > 8.8, we have instead:
> >
> > sage: a = var('a')
> > sage: integrate(1/(x^4 + x^2 + a), x)
> > integrate(1/(x^4 + x^2 + a), x)

Fricas just returns the answer in radicals, if you call
sage:  integrate(1/(x^4 + x^2 + a), x, algorithm='fricas')

with
sage:  integrate(1/(x^5 + x^3 + a), x, algorithm='fricas')
one gets an error, for a reason similar to the RootSum thing for sympy
(i.e. it can express the integral as a sum over roots of a polynomial, it's
just Sage doesn't know how to parse it)

> >
> > Note that RootSum is a SymPy object. Actually, in Sage 9.0.beta8, forcing
> > the algorithm to 'maxima' yields the same result as in Sage 8.8:
> >
> > sage: integrate(1/(x^4 + x^2 + a), x, algorithm='maxima')
> > integrate(1/(x^4 + x^2 + a), x)
> >
> > So it seems that since Sage 8.9, when integrate() is not capable to find an
> > answer via Maxima, it tries SymPy but is not capable to translate the
> > result back to Sage. I could not find a ticket about this. Shall I open one?
>
> For what it worth, the change was done at
> https://trac.sagemath.org/ticket/27958
>
> Ciao,
> Thierry
>
>
> > Eric.
> >
> > PS: for the record, a primitive of 1/(x^4 + x^2 + a) is
> >
> > sage: b = sqrt(1 - 4*a)
> > sage: f = sqrt(2)/b*(arctan(sqrt(2)*x/sqrt(1 - b))/sqrt(1 - b)  -
> > arctan(sqrt(2)*x/sqrt(1 + b))/sqrt(1 + b))
> >
> > as we can check:
> >
> > sage: diff(f, x).simplify_full()
> > 1/(x^4 + x^2 + a)
> >
> >
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/5e7fbd5a-f422-4268-b2fb-f77d58c4a2e2%40googlegroups.com.
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/20191209135522.n7ymn5yfpcurdppq%40metelu.net.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq1MyN0pUea%2Bbg1F0fFRKwzbo2F-fNuchURGHJq8FEpD0A%40mail.gmail.com.


Re: [sage-devel] We are missing Cygwin patchbots

2019-12-09 Thread E. Madison Bray
On Mon, Dec 9, 2019 at 4:40 PM E. Madison Bray  wrote:
>
> On Mon, Dec 9, 2019 at 12:56 PM Dima Pasechnik  wrote:
> >
> > On Mon, Dec 9, 2019 at 11:37 AM E. Madison Bray  
> > wrote:
> > >
> > > Hi Samuel,
> > >
> > > Coincidentally I just commented on this problem in another ticket, and
> > > then I saw this post.  I'm going to see if I can get my Cygwin
> > > patchbot up and running again.  But it would be helpful to have
> > > another.
> > >
> > > Thanks for putting out the call.  If anyone wants to try there are
> > > instructions for building Sage on Cygwin at
> > > https://trac.sagemath.org/wiki/Cygwin64Port (which I've recently
> > > updated with a simplified checklist of instructions; if you try it out
> > > please let me know if you run into any trouble with the instructions).
> >
> > do you know a cloud provider that makes it possible to run a Cygwin bot
> > in a Unixy style, with access via ssh, etc.?
>
> Yes, I already have it.  It's what it's always been on (when it was
> working).  But running Windows in a Linux KVM tends to be slow.
> However, I tried it with Azure a while back and it was also slow.

I got my old Cygwin Patchbot VM working again (actually rebuilt it
mostly from scratch), though the Sage build was on an external volume
so it didn't need to be rebuilt from scratch).  I'm just making sure
the latest beta can finish building, and then I'll start the patchbot
server.

I also spent some time applying some optimizations that Julian had
suggested to me a long time ago and it does seem to run a little bit
faster maybe.  Also it has 8 CPU cores but was only utilizing two of
them (!) so I fixed that as well.  It has 16 GB of RAM.

I have private documentation for how this VM is set up, but I need to
put it on a wiki page somewhere.


> > > On Mon, Dec 9, 2019 at 4:46 AM Samuel Lelievre
> > >  wrote:
> > > >
> > > > Dear Sage-devel,
> > > >
> > > > To try and help with Erik Bray's Sage-Windows project,
> > > > for the past year or so I have tried to build Sage
> > > > on Cygwin64 on Windows 7, and got to the point where
> > > > it was reliably building successfully for a while.
> > > >
> > > > The tests were never passing completely, but a number
> > > > of issues were found and fixed and I was getting close
> > > > to getting the "All tests pass!" signal from testlong,
> > > > at which point I could have started running a patchbot.
> > > >
> > > > The past few months for various reasons I have not been
> > > > able to have Sage build on Cygwin64 on Windows 7 -- and
> > > > in any case Microsoft is dropping support for Windows 7
> > > > on 20 Jan 2020, so I won't be able to pursue my efforts
> > > > in the same setting.
> > > >
> > > > If any of you have access to a Windows machine on which
> > > > you could install Cygwin and run a patchbot, that would
> > > > be very appreciated. Or if someone can donate a machine
> > > > with Windows 8 or Windows 10, or give me remote access
> > > > to one, I could renew my efforts.
> > > >
> > > > (I am in the USA till 30 Dec 2019 and back in France
> > > > after that.)
> > > >
> > > > Kind regards,
> > > > Samuel
> > > >
> > > > --
> > > > 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 view this discussion on the web visit 
> > > > https://groups.google.com/d/msgid/sage-devel/2dba325a-19ca-4996-85a3-b04576ee5b4d%40googlegroups.com.
> > >
> > > --
> > > 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 view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/sage-devel/CAOTD34ZFUOihx%2BNAL6RjEhzMsNTD1mBFtqmLfsXe22iiuuR4bA%40mail.gmail.com.
> >
> > --
> > 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 view this discussion on the web visit 
> > https://groups.google.com/d/msgid/sage-devel/CAAWYfq0Mf_VO8LM9%2Bne3L_%3DAXkdbCgOcQ6Mj7OY1W0xpRynG8w%40mail.gmail.com.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAOTD34byLFbLzX-Qb_LK5Sw%3Dvr-Kn0H996Gym47duUwWYK0kOw%40mail.gmail.com.


[sage-devel] Localization of integral domains

2019-12-09 Thread Sebastian Oehms
Since there isn't any Sage-class for localization of integral domains at a 
set of its elements so far, I've opened ticket #28862 
 for its realization. Furthermore, 
I made an initial attempt based on the following example given in the 
reference pages on coercion: coercion example 


Suggestions, criticism and corrections are welcome!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/a7c0e5b7-9af5-4541-a991-6abf2a8e414e%40googlegroups.com.


Re: [sage-devel] Re: Simple integral raises AttributeError

2019-12-09 Thread Emmanuel Charpentier

>
> Well... My solution has problems,at list with 8.9.beta9 and also on 
> Sagecell 
> ,
>  
> which is currently at 9.0) . Consider :

 
L=flatten([[u[0]]*u[1] for u in (x^5+x^3+1).roots(ring=QQbar)]); print("L = 
",L)
P=prod([x-u for u in L]);print("P = ",P)
Rac=[var("r_{}".format(u)) for u in range(len(L))];print("R&c = ",Rac)
D=dict(zip(Rac,L));print("D = ",D)
Pr=prod([x-u for u in Rac]).expand();print("Pr = ",Pr)
%time print(Pr.coefficient(x,2).subs(D)==0)

But %time print(bool(Pr.coefficient(x,2).subs(D)==0)) never returns. Other 
trials show that trying to use SR methods on expressions including QQbar 
coeficients fails.

Is this known ? It seems to me that it's either a bug or a design flaw.

Advice ?

Le lundi 9 décembre 2019 12:32:42 UTC+1, Emmanuel Charpentier a écrit :
>
> Le lundi 9 décembre 2019 03:16:10 UTC+1, rjf a écrit :
>
> FYI: 
>> In Maxima,  integrate_use_rootsof: true
>> changes the result from an unevaluated integral to
>> lsum(log(x-%r1)/(4*%r1^3+2*%r1),%r1,rootsof(a+%r1^4+%r1^2,%r1))
>>
>> which is fairly compact, and to the point, but
>> which may or may not be what you want.  The inside of  rootsof
>> can be picked out and the 4 roots solved in terms of radicals
>> by Maxima's solve().  *
>>
> Aciddentally ! For example, [image: x^5+x^3+1] doesn’t have a solution in 
> terms of radicals. Trying to solve it in Maxima fails ; and %solve gives 
> a list of *numerical* roots.
>
> If the expression rootsof() is replaced by a list of the roots
>> returns by solve,  { something like   substpart( map(rhs, solve( 
>> Z,3,1,x)), Z 3), lsum   }
>> you get a large explicit mess of nested radicals and logs.
>>
> Indeed. And one may add that this solution has some drawbacks problems: 
> computing only one value of the resultt primitive takes several seconds, 
> trying to plot it is pointless…
>
> That Mathematical result with arctan is nicer that the explicit
>> radical stuff.
>>
> “Nicer” depends of what you want to do with the result. In some cases, the 
> approximate answer obtained via %solve is preferable (e. g. plotting). In 
> other cases, the explicit log/roots mess is preferable (e. g. trying to 
> prove that the value of the primitive is real for all real values of the 
> aurument).
>
> The “exact” answers given by Sage via (x^5+x^3+1).roots(ring=QQbar) may 
> be preferable: a radical expression, if it exists, may be obtained via the 
> radical_expression() method, and the precision is not limited to any 
> specific floating-point approximation ; some equalities may be provable 
> using them.
>
> OTOH, such values won’t pass to Maxima, and the resulting answers cannot 
> be further simplified…
>
> The more general way to do this is :
>
>- remark that the polynoimial [image: x^5+x^3+1] has five (possibly 
>confounded) roots, and name them [image: r_1,\dots,r_5] ; 
>- rewrite it as [image: \displaystyle\prod_{r\in r_1,\dots,\r_5}(x-r)], 
>- integrate using this rewriting, 
>- substitute [image: r_1\dots,r_5] as needed by your various uses of 
>the result. 
>
> HTH,
>
>
>> RJF
>>
>>
>> On Friday, December 6, 2019 at 7:28:40 PM UTC-8, Emmanuel Charpentier 
>> wrote:
>>>
>>> Okay. That means that we need
>>>
>>>- a wrapper for RootSum, AND
>>>- a wrapper for Lambda.
>>>
>>> ISTR that Mathematica has a similar setup.A rare occasion to kill two 
>>> birds wit the same (two) stones. However, Mathematica's "pure functions" 
>>> are, as far as I can tell, totally unknown to Sage...
>>>
>>> Thank you, Dima !
>>>
>>> Le mercredi 4 décembre 2019 23:21:39 UTC+1, Dima Pasechnik a écrit :

 On Wed, Dec 4, 2019 at 7:14 PM Emmanuel Charpentier 
  wrote: 
 > 
 > The old (> 5 years...) Trac#16816 ticket is germane... 
 > 
 > BTW, I'm not sure that this would be very helpful: 
 > 
 > sage: foo=sympy.integrate(*[sympy.sympify(u) for u in (1/(x^4+x^2+a), 
 x)]); foo 
 > RootSum(_t**4*(256*a**3 - 128*a**2 + 16*a) + _t**2*(4 - 16*a) + 1, 
 Lambda(_t, _t*log(32*_t**3*a**2 - 8*_t**3*a + 4*_t*a - 2*_t + x))) 
 > sage: foo.doit()._sage_().factor().simplify_full() 
 > 1/4*sqrt(2)*(sqrt((4*a + sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 
 1)/(16*a^3 - 8*a^2 + a))*log(1/4*sqrt(2)*((4*a^2 - a)*((4*a + sqrt(-64*a^3 
 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 8*a^2 + a))^(3/2) + 2*sqrt(2)*x + 
 2*(2*a - 1)*sqrt((4*a + sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 - 
 8*a^2 + a - sqrt((4*a + sqrt(-64*a^3 + 48*a^2 - 12*a + 1) - 1)/(16*a^3 
 - 8*a^2 + a))*log(-1/4*sqrt(2)*((4*a^2 - a)*((4*a + sqrt(-64*a^3 + 48*a^2 
 - 
 12*a + 1) - 1

Re: [sage-devel] The space character in "Program Files" in Cygwin on Windows

2019-12-09 Thread Samuel Lelièvre
Thanks both for your answers. I'm away for a week
without my Cygwin machine, but I'll try next week.

When I open a Cygwin terminal to build SageMath,
should I start by changing the PATH to remove any
occurrence of "Program Files" or its subdirectories?
Also, should the list of optional apt-cyg packages to
install be expanded to use more system things such
as those worked on in #27330 and its subtickets?

Not sure which things from this this list I cooked
somewhat at random (starting from the existing
list and fishing for things based on the names at
#27330) can be useful, and which are useless:

apt-cyg install \
wget curl libcurl-devel lynx \
bc bzip2 libbz2-devel \
ccache cmake libcrypt-devel diffutils \
libffi-devel flex libflint libflint-devel libfreetype-devel \
gcc-core gcc-g++ gcc-fortran libgd3 libgd-devel
gettext-devel git glpk libglpk-devel gmp libgmp-devel \
libiconv-devel isl libisl-devel \
liblapack0 liblapack-devel liblzma-devel \
make m4 mpc libmpc-devel mpfr libmpfr-devel \
ncurses ninja libntl-devel openssl-devel \
patch pcre libpcre-devel pkgconf libpkgconf-devel \
libpng-devel python2 python3 libreadline-devel xz yasm \
zlib zlib-devel python2-zmq python3-zmq libzmq-devel

The following don't seem to be packaged for Cygwin yet:

- arb
- eclib
- ecm
- gf2x
- givaro
- gp2c
- lcalc
- lrcalc
- m4ri
- m4rie
- mpfi
- mpir
- pari
- libpari-gmp
- perl_term_readline_gnu
- rw
- symmetrica

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAEcArF1jLy3vmusdFUWGJ_-859HNTOraExVQGRMhZEfp2XhjGg%40mail.gmail.com.