Re: [sage-devel] Introduction to differentiable manifolds in SageMath

2022-07-02 Thread William Stein
Hi,

Proxying of URL's from github, etc., is now live in cocalc share
server. See the comment here about how it works:
https://github.com/sagemathinc/cocalc/issues/6015#issuecomment-1172967091

For example

https://cocalc.com/github/sagemanifolds/IntroToManifolds

is now actually proxying exactly what is on github directly.  Also,
you can easily click "Edit" and in about 25 seconds you're running a
notebook with Sage!

William


On Sun, Jun 26, 2022 at 11:42 AM William Stein  wrote:
>
> On Sun, Jun 26, 2022 at 1:42 AM Eric Gourgoulhon  
> wrote:
> >
> > Le samedi 25 juin 2022 à 17:31:10 UTC+2, wst...@gmail.com a écrit :
> >>
> >> > There is some issue in the latex display of manifold maps:
> >> > ParseError: KaTeX parse error: Undefined control sequence: \mbox at 
> >> > position 96: …thbb{E}^{2} \\ \̲m̲b̲o̲x̲{on}\ A : & \ph…
> >>
> >> Thanks -- I've created this issue in case you're curious about the 
> >> situation:
> >>
> >> https://github.com/sagemathinc/cocalc/issues/6019
> >>
> >> In particular, I think it would be better if the latex representation
> >> output by sage manifolds used "\text{on}" instead of "\mbox{on}";
> >> however, I'll add a workaround in CoCalc so that isn't necessary.
> >
> >
> > IIRC, I used \mbox instead of \text because \mbox is plain LaTeX, while 
> > \text requires the package amstext, so I naively thought that \mbox was 
> > more robust. The katex example shows that it is rather the converse. So 
> > yes, we may change \mbox to \text. Note that \mbox is quite heavily used in 
> > all Sage: running
>
> I think what happened is that the problem \mbox tries to solve is
> solved in a slightly better way by other commands like \text.   As a
> result katex only implemented the better solution.   Your reasoning to
> use \mbox instead \of text might be a reasonable argument for keeping
> the current behavior in Sage, despite this annoying katex situation.
> Regarding CoCalc, yesterday I added an alias so that now our katex
> rendering works with \mbox (it just sets \mbox to \text), so these
> sage manifolds notebooks all look fine now.
>
> William
>
> > grep -r '\\mbox'
> > from src/sage returns 206 lines, among which 34 in src/sage/manifolds.
>
> >
> > Eric.
> >
> > --
> > 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/c103e430-0e8f-4780-a5de-47c5398d7446n%40googlegroups.com.
>
>
>
> --
> William (http://wstein.org)



-- 
William (http://wstein.org)

-- 
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/CACLE5GD5r%2BWre42M7QN2TT9cy8DMAQiEGfU33tXvHVVem6f7nw%40mail.gmail.com.


[sage-devel] Re: Request for advice : extend exponentialize ?

2022-07-02 Thread Emmanuel Charpentier


BTW, (too ?) simple check :

sage: all(map(lambda 
u,v:bool(u(v(x)._sympy_().rewrite("log")._sage_()).exponentialize().simplify_full()==x),
: (sin, cos, tan, csc, sec, cot, sinh, cosh, tanh, csch, sech, 
coth),
: (arcsin, arccos, arctan, arccsc, arcsec, arccot, arcsinh, 
arccosh, arctanh, arccsch, arcsech, arccoth)))
True

​
Le samedi 2 juillet 2022 à 10:32:30 UTC+2, Emmanuel Charpentier a écrit :

> The SR.exponentialize method implements :
>
> sage: [u(x)==u(x)._sympy_().rewrite("exp")._sage_()
> :  for u in (sin, cos, tan, csc, sec, cot, sinh, cosh, tanh, csch, sech, 
> coth)]
> [sin(x) == -1/2*I*e^(I*x) + 1/2*I*e^(-I*x),
>  cos(x) == 1/2*e^(I*x) + 1/2*e^(-I*x),
>  tan(x) == -I*(e^(I*x) - e^(-I*x))/(e^(I*x) + e^(-I*x)),
>  csc(x) == 2*I/(e^(I*x) - e^(-I*x)),
>  sec(x) == 2/(e^(I*x) + e^(-I*x)),
>  cot(x) == I*(e^(I*x) + e^(-I*x))/(e^(I*x) - e^(-I*x)),
>  sinh(x) == -1/2*e^(-x) + 1/2*e^x,
>  cosh(x) == 1/2*e^(-x) + 1/2*e^x,
>  tanh(x) == -(e^(-x) - e^x)/(e^(-x) + e^x),
>  csch(x) == -2/(e^(-x) - e^x),
>  sech(x) == 2/(e^(-x) + e^x),
>  coth(x) == -(e^(-x) + e^x)/(e^(-x) - e^x)]
>
> However, we also have :
>
> sage: [u(x)==u(x)._sympy_().rewrite("log")._sage_()
> :  for u in (arcsin, arccos, arctan, arccsc, arcsec, arccot, arcsinh, 
> arccosh, arctanh, arccsch, arcsech, arccoth)]
> [arcsin(x) == -I*log(I*x + sqrt(-x^2 + 1)),
>  arccos(x) == 1/2*pi + I*log(I*x + sqrt(-x^2 + 1)),
>  arctan(x) == -1/2*I*log(I*x + 1) + 1/2*I*log(-I*x + 1),
>  arccsc(x) == -I*log(sqrt(-1/x^2 + 1) + I/x),
>  arcsec(x) == 1/2*pi + I*log(sqrt(-1/x^2 + 1) + I/x),
>  arccot(x) == -1/2*I*log(I/x + 1) + 1/2*I*log(-I/x + 1),
>  arcsinh(x) == log(x + sqrt(x^2 + 1)),
>  arccosh(x) == log(sqrt(x + 1)*sqrt(x - 1) + x),
>  arctanh(x) == 1/2*log(x + 1) - 1/2*log(-x + 1),
>  arccsch(x) == log(sqrt(1/x^2 + 1) + 1/x),
>  arcsech(x) == log(sqrt(1/x + 1)*sqrt(1/x - 1) + 1/x),
>  arccoth(x) == 1/2*log(1/x + 1) - 1/2*log(-1/x + 1)]
>
> Hence two questions :
>
>- 
>
>Is it worth implementing it (for the benefit of 
>high-school/undergrads/engineering math) ?
>- 
>
>Should it be implemented by SR.exponentialize or by a distinct method 
>? (My preference is for the former, notwithstanding the apparent 
>discrepancy in names…).
>
> Your advice is 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/13cd0960-ab8d-4753-b056-6afeb5bde11en%40googlegroups.com.


[sage-devel] Request for advice : extend exponentialize ?

2022-07-02 Thread Emmanuel Charpentier


The SR.exponentialize method implements :

sage: [u(x)==u(x)._sympy_().rewrite("exp")._sage_()
:  for u in (sin, cos, tan, csc, sec, cot, sinh, cosh, tanh, csch, sech, 
coth)]
[sin(x) == -1/2*I*e^(I*x) + 1/2*I*e^(-I*x),
 cos(x) == 1/2*e^(I*x) + 1/2*e^(-I*x),
 tan(x) == -I*(e^(I*x) - e^(-I*x))/(e^(I*x) + e^(-I*x)),
 csc(x) == 2*I/(e^(I*x) - e^(-I*x)),
 sec(x) == 2/(e^(I*x) + e^(-I*x)),
 cot(x) == I*(e^(I*x) + e^(-I*x))/(e^(I*x) - e^(-I*x)),
 sinh(x) == -1/2*e^(-x) + 1/2*e^x,
 cosh(x) == 1/2*e^(-x) + 1/2*e^x,
 tanh(x) == -(e^(-x) - e^x)/(e^(-x) + e^x),
 csch(x) == -2/(e^(-x) - e^x),
 sech(x) == 2/(e^(-x) + e^x),
 coth(x) == -(e^(-x) + e^x)/(e^(-x) - e^x)]

However, we also have :

sage: [u(x)==u(x)._sympy_().rewrite("log")._sage_()
:  for u in (arcsin, arccos, arctan, arccsc, arcsec, arccot, arcsinh, 
arccosh, arctanh, arccsch, arcsech, arccoth)]
[arcsin(x) == -I*log(I*x + sqrt(-x^2 + 1)),
 arccos(x) == 1/2*pi + I*log(I*x + sqrt(-x^2 + 1)),
 arctan(x) == -1/2*I*log(I*x + 1) + 1/2*I*log(-I*x + 1),
 arccsc(x) == -I*log(sqrt(-1/x^2 + 1) + I/x),
 arcsec(x) == 1/2*pi + I*log(sqrt(-1/x^2 + 1) + I/x),
 arccot(x) == -1/2*I*log(I/x + 1) + 1/2*I*log(-I/x + 1),
 arcsinh(x) == log(x + sqrt(x^2 + 1)),
 arccosh(x) == log(sqrt(x + 1)*sqrt(x - 1) + x),
 arctanh(x) == 1/2*log(x + 1) - 1/2*log(-x + 1),
 arccsch(x) == log(sqrt(1/x^2 + 1) + 1/x),
 arcsech(x) == log(sqrt(1/x + 1)*sqrt(1/x - 1) + 1/x),
 arccoth(x) == 1/2*log(1/x + 1) - 1/2*log(-1/x + 1)]

Hence two questions :

   - 
   
   Is it worth implementing it (for the benefit of 
   high-school/undergrads/engineering math) ?
   - 
   
   Should it be implemented by SR.exponentialize or by a distinct method ? 
   (My preference is for the former, notwithstanding the apparent discrepancy 
   in names…).
   
Your advice is 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/353e1f57-31dc-4b8e-a495-0b8e67bc5e10n%40googlegroups.com.


Re: [sage-devel] closed tickets

2022-07-02 Thread Kwankyu Lee


On Saturday, July 2, 2022 at 12:33:38 PM UTC+9 Kwankyu Lee wrote:

> ... I think this should be explained somewhere, perhaps in the  notice 
> itself.
>

Added to 

https://trac.sagemath.org/ticket/33849

which needs review.
 

-- 
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/24363201-699d-4301-a80e-7a16a91afd43n%40googlegroups.com.