[sage-support] Re: View does not work

2024-08-04 Thread Kwankyu
Does anyone on linux platform experience sporadic "no pdf file" symptom? 

If so, please report to  https://github.com/sagemath/sage/pull/38339.

On Monday, July 8, 2024 at 4:45:16 PM UTC+9 Kwankyu wrote:

> Try
>
> https://github.com/sagemath/sage/pull/38339
>
> On Sunday, June 23, 2024 at 12:37:52 PM UTC+9 Trey Davis wrote:
>
>> I use wsl with Ubuntu 22.04.3 LTS installed. I installed sage from source 
>> code (SageMath version 10.4.beta9.)  View does not work. When I try to use 
>> it, it returns the error, "!  ==> Fatal error occurred, no output PDF file 
>> produced!." Latex does work though.
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/613f9545-b988-4e0f-8c51-7570aac9aa46n%40googlegroups.com.


[sage-support] Re: View does not work

2024-07-08 Thread Kwankyu
Try

https://github.com/sagemath/sage/pull/38339

On Sunday, June 23, 2024 at 12:37:52 PM UTC+9 Trey Davis wrote:

> I use wsl with Ubuntu 22.04.3 LTS installed. I installed sage from source 
> code (SageMath version 10.4.beta9.)  View does not work. When I try to use 
> it, it returns the error, "!  ==> Fatal error occurred, no output PDF file 
> produced!." Latex does work though.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/f76e618b-62c1-450d-ad86-311aaae0499fn%40googlegroups.com.


Re: [sage-support] Re: Canonical divisor help

2023-10-30 Thread Kwankyu
Now with (draft) PR

https://github.com/sagemath/sage/pull/36592

the ask.sagemath problem is solved by

P2. = ProjectiveSpace(QQ, 2)
f = 2*x^5 - 4*x^3*y*z + x^2*y*z^2 + 2*x*y^3*z + 2*x*y^2*z^2+ y^5
C = Curve(f)
kC = C.function_field()
K = kC.gen().differential().divisor()  # canonical divisor
basis = (-K).basis_function_space()
Basis = [C._pull_from_function_field(f) for f in basis]
phi = C.hom(Basis, P2)
D = phi.image()  # conic
assert D.degree() == 2
D

On Monday, October 30, 2023 at 8:11:05 AM UTC+9 Kwankyu wrote:

> This is simpler
>
> sage: psi = C.hom(liftedbasis, P2)
> sage: psi.image()
> Closed subscheme of Projective Space of dimension 2 over Rational Field 
> defined by:
>   x^2 + x*y + 2*y*z
>
>
> On Monday, October 30, 2023 at 5:45:27 AM UTC+9 Nils Bruin wrote:
>
>
>
> On Monday, 30 October 2023 at 00:19:47 UTC+13 Kwankyu wrote:
>
> What is your code? 
>
> P2. = ProjectiveSpace(QQ, 2)
> f = 2*x^5 - 4*x^3*y*z + x^2*y*z^2 + 2*x*y^3*z + 2*x*y^2*z^2+ y^5
> C = Curve(f)
> kC = C.function_field()
> D = kC(kC.base_field().gen(0)).differential().divisor()
> L,m,s = (-D).function_space()
> #the routine below is a bit of a shortcut based on how the affine patch 
> for kC
> #is chosen. In more general code this would need to be a little more 
> sophisticated
> def liftkC(u):
> return sum([(m.numerator()(y/x))/(m.denominator()(y/x))*(z/x)^i for 
> i,m in enumerate(u.list())])
> liftedbasis = [liftkC(m(b)) for b in L.basis()]
> den = lcm([b.denominator() for b in liftedbasis])
> liftedbasis = [parent(x)(b*den) for b in liftedbasis]
> phi = P2.hom(liftedbasis,P2)
> phi(C) # this fails
> C._forward_image(phi,check=False) #this seems to work!
>  
> Of course, one could also do some linear algebra with 
> (-D).function_space() and (-2*D).function_space() to figure out this image.
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/79431f03-f623-4654-a4c6-cbfe8425c49bn%40googlegroups.com.


Re: [sage-support] Computing the kernel of a map between polynomial algebras

2023-10-30 Thread Kwankyu
Isn't this what you want?

sage: R. = QQ[]
sage: phi = R.hom([x,x])
sage: phi
Ring endomorphism of Multivariate Polynomial Ring in x, y over Rational 
Field
  Defn: x |--> x
y |--> x
sage: phi.kernel()
Ideal (x - y) of Multivariate Polynomial Ring in x, y over Rational Field

On Monday, October 30, 2023 at 6:08:16 PM UTC+9 Dima Pasechnik wrote:

>
>
> On Mon, 30 Oct 2023, 05:57 John H Palmieri,  wrote:
>
>> Does anyone have any tips for how to compute the kernel of a map between 
>> polynomial algebras, or for checking whether the map is injective? I have 
>> families of such maps involving algebras with many generators. I'm working 
>> over GF(2), if that matters. In one example I defined the map phi: R -> S 
>> where R has 12 generators, S has 19 generators, and did
>>
>> sage: phi.is_injective()
>>
>> After about 30 hours, Sage quit on me, perhaps running out of memory 
>> ("Killed: 9"). An example of the sort of map I'm interested in:
>>
>> sage: phi
>> Ring morphism:
>>   From: Multivariate Polynomial Ring in h20, h21, h30, h31, h40, h41, h50 
>> over Finite Field of size 2
>>   To:   Multivariate Polynomial Ring in h20, h21, h30, h31, h40, h41, 
>> h50, xi1, xi2, xi3, xi4, xi5 over Finite Field of size 2
>>   Defn: h20 |--> h20
>> h21 |--> h21
>> h30 |--> h20*xi1^4 + h21*xi1 + h30
>> h31 |--> h21*xi1^8 + h31
>> h40 |--> h21*xi1^9 + h30*xi1^8 + h20*xi2^4 + h31*xi1
>> h41 |--> h31*xi1^16 + h21*xi2^8
>> h50 |--> h31*xi1^17 + h21*xi1*xi2^8 + h30*xi2^8 + h20*xi3^4
>>
>> Any suggestions?
>>
>
> The standard way to find the kernel of a map 
> phi: A->B is to take the
> ring R generated by the gens of A and B and compute the Gröbner basis of 
> the ideal I generated by {a-phi(a)|a in gens(A)}, and then
> take the intersection of I with A.
> (for the latter you have to take R with an appropriate order)
>
> The Gröbner basis would be done by Singular.
> Better Gröbner basis routines are available in the msolve spkg.
>
> I'd try using msolve. There are also options such as computing I w.r.t. to 
> an "easier" order and then chaniging the order (so-called Gröbner walk), 
> they might work better here (it's all more of art than science here)
>
>
>
> HTH
> Dima
>
>
>> -- 
>> John
>>
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/97318b8e-f4c9-4af3-a8ff-b901a4f2c971n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/487bf189-fce6-4b6b-9752-178602ff9808n%40googlegroups.com.


Re: [sage-support] Re: Canonical divisor help

2023-10-29 Thread Kwankyu
This is simpler

sage: psi = C.hom(liftedbasis, P2)
sage: psi.image()
Closed subscheme of Projective Space of dimension 2 over Rational Field 
defined by:
  x^2 + x*y + 2*y*z

On Monday, October 30, 2023 at 5:45:27 AM UTC+9 Nils Bruin wrote:



On Monday, 30 October 2023 at 00:19:47 UTC+13 Kwankyu wrote:

What is your code? 

P2. = ProjectiveSpace(QQ, 2)
f = 2*x^5 - 4*x^3*y*z + x^2*y*z^2 + 2*x*y^3*z + 2*x*y^2*z^2+ y^5
C = Curve(f)
kC = C.function_field()
D = kC(kC.base_field().gen(0)).differential().divisor()
L,m,s = (-D).function_space()
#the routine below is a bit of a shortcut based on how the affine patch for 
kC
#is chosen. In more general code this would need to be a little more 
sophisticated
def liftkC(u):
return sum([(m.numerator()(y/x))/(m.denominator()(y/x))*(z/x)^i for i,m 
in enumerate(u.list())])
liftedbasis = [liftkC(m(b)) for b in L.basis()]
den = lcm([b.denominator() for b in liftedbasis])
liftedbasis = [parent(x)(b*den) for b in liftedbasis]
phi = P2.hom(liftedbasis,P2)
phi(C) # this fails
C._forward_image(phi,check=False) #this seems to work!
 
Of course, one could also do some linear algebra with (-D).function_space() 
and (-2*D).function_space() to figure out this image.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/94963a52-9eb1-4931-938d-cb47eb0434c8n%40googlegroups.com.


Re: [sage-support] Re: Canonical divisor help

2023-10-29 Thread Kwankyu


The most pressing problem in sage at the moment seems to be that presently 
there only seem to be morphisms between schemes. You need rational maps for 
this (especially from a singular model, the map to a canonical model might 
only be a rational map).


"SchemeMorphism" in Sage is a map defined by rational functions between 
schemes. It does not check the domain of definition. Hence it represent 
mathematically rational maps rather than morphisms. I guess that the 
"morphism" in "SchemeMorphism" was intended to mean morphism in category 
theory rather than morphisms in scheme theory.
 

I might be overlooking something ... currently sage allows for the 
construction of a rational map P2 -> P2, but then asking for the image of a 
curve C in P2 leads to

TypeError: map must be a morphism

(which should probably be a ValueError). Perhaps the code is just 
unnecessarily picky?


What is your code? 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/4f4a4f2b-1b51-4650-85e4-4ef2444247e5n%40googlegroups.com.


Re: [sage-support] Re: Canonical divisor help

2023-10-28 Thread Kwankyu


That's actually trivially simple: if [f1,f2,f3] is the basis of your 
Riemann-Roch space, you just consider the map defined by [f1:f2:f3]. So you 
lift f1,f2,f3 to rational functions on the affine space that contains your 
curve: you just take the rational function representation and forget the 
algebraic relations between the variables. 


f1, f2, f3 are univariate polynomials (say in y) over rational function 
field (say in x). Then x and y are not always the variables X and Y of the 
coordinate ring of the affine plane. Things are more complicated if the 
curve is in space (of dim > 2).

 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e86f87d9-8448-4f4e-af0e-1c749b193291n%40googlegroups.com.


Re: [sage-support] Re: Canonical divisor help

2023-10-28 Thread Kwankyu
To answer John's question:

sage: P2. = ProjectiveSpace(QQ, 2)
sage: f = 2*x^5 - 4*x^3*y*z + x^2*y*z^2 + 2*x*y^3*z + 2*x*y^2*z^2+ y^5
sage: C = P2.curve(f)
sage: F = C.function_field()
sage: z, = F.gens()
sage: K = z.differential().divisor()  # canonical divisor
sage: (-K).dimension()
3
sage: f1, f2, f3 = (-K).basis_function_space()
sage: phi = C.hom(P2, [f1,f2,f3]). <--- does not work
sage: phi.image()  # will work

On Saturday, October 28, 2023 at 9:59:58 PM UTC+9 Kwankyu wrote:

> Let me mention also the related PR 
>
> https://github.com/sagemath/sage/pull/35467
>
> which implements Jacobian groups of curves (again via function field), 
> referencing Nils' old code. The PR is long sleeping in draft state. If 
> anyone finds it useful, I may wake it up. 
>
> On Saturday, October 28, 2023 at 9:39:26 PM UTC+9 Kwankyu wrote:
>
>> Hi,
>>
>> I replied to Dima's comment in 
>> https://github.com/sagemath/sage/commit/977ace651af9b99689f7b6507f91f8b4e2588ae9#r131138149
>> . 
>>
>> Note that the "divisor" method of a curve had existed long before I added 
>> function field machinery and attached function fields to curves. Hence 
>> actually there are two systems of "divisors" of curves in Sage. 
>>
>> The old system was implemented by William Stein, David Kohel, and Volker 
>> Braun. In the old system, a divisor is a formal sum of rational points with 
>> multiplicities. It is mainly implemented in 
>> `src/sage/schemes/generic/divisor.py`. Overall it is very rudimentary. Dima 
>> and John is attempting to use this system.
>>
>> The new system was implemented by me. Here a divisor is a formal sum of 
>> places of a function field with multiplicities. This system is available 
>> via the function field attached to a curve. This is much more powerful than 
>> the old system. You can compute the Riemann-Roch space of a divisor. Nils 
>> is using this system.
>>
>> I never attempted to combine the two systems, being afraid of breaking 
>> the old system (or just being lazy :-) There are similarly two systems in 
>> Magma too. But in Magma, the two systems are integrated tightly and 
>> seamlessly. I did some integration in Sage too but far from complete 
>> compared with Magma.
>>
>> I looked the Magma code in ask.sagemath. There's no problem in computing 
>> a canonical divisor for the curve (through the attached function field). 
>> Computing a basis of the Riemann-Roch space is no problem as well. Actually 
>> the hard part is to construct the morphism from C to P2 from the basis. 
>> Magma does this seamlessly. But Sage lacks this functionality (perhaps 
>> because I did not implement it). I think, the gist of the matter is to 
>> convert an element of the function field to a rational function of the 
>> coordinate ring of P2. I have no idea how to do this now... Once you 
>> construct the morphism, Sage can also compute the image of the morphism 
>> (perhaps I implemented this). Hence unfortunately the Magma code cannot be 
>> line by line converted to Sage code at present.
>>
>> On Saturday, October 28, 2023 at 8:27:07 AM UTC+9 Dima Pasechnik wrote:
>>
>>> On Sat, Oct 28, 2023 at 1:02 AM John H Palmieri  
>>> wrote: 
>>>
>>> > Yes, I noticed that, too. It also fails to provide any information 
>>> about what ``v`` should be (beyond saying that it should be a "valid 
>>> object"): there is no INPUT block. 
>>>
>>> I've left a comment here: 
>>>
>>> https://github.com/sagemath/sage/commit/977ace651af9b99689f7b6507f91f8b4e2588ae9#r131117132
>>>  
>>>
>>> fortunately, the author, @kwankyu is active 
>>>
>>> I can't locate the ticket, but it was merged in 9.0.beta9 
>>>
>>>
>>> > 
>>> > 
>>> > On Friday, October 27, 2023 at 3:51:10 PM UTC-7 Dima Pasechnik wrote: 
>>> >> 
>>> >> By the way, the docstring of divisor() misses an example, it's 
>>> >> 
>>> >> def divisor(self, v, base_ring=None, check=True, reduce=True): 
>>> >> r""" 
>>> >> Return the divisor specified by ``v``. 
>>> >> 
>>> >> .. WARNING:: 
>>> >> 
>>> >> The coefficients of the divisor must be in the base ring 
>>> >> and the terms must be reduced. If you set ``check=False`` 
>>> >> and/or ``reduce=False`` it is your responsibility to pass 
>>> >> a valid object ``v``. 
>>> >> 
>

Re: [sage-support] Re: Canonical divisor help

2023-10-28 Thread Kwankyu
Let me mention also the related PR 

https://github.com/sagemath/sage/pull/35467

which implements Jacobian groups of curves (again via function field), 
referencing Nils' old code. The PR is long sleeping in draft state. If 
anyone finds it useful, I may wake it up. 

On Saturday, October 28, 2023 at 9:39:26 PM UTC+9 Kwankyu wrote:

> Hi,
>
> I replied to Dima's comment in 
> https://github.com/sagemath/sage/commit/977ace651af9b99689f7b6507f91f8b4e2588ae9#r131138149
> . 
>
> Note that the "divisor" method of a curve had existed long before I added 
> function field machinery and attached function fields to curves. Hence 
> actually there are two systems of "divisors" of curves in Sage. 
>
> The old system was implemented by William Stein, David Kohel, and Volker 
> Braun. In the old system, a divisor is a formal sum of rational points with 
> multiplicities. It is mainly implemented in 
> `src/sage/schemes/generic/divisor.py`. Overall it is very rudimentary. Dima 
> and John is attempting to use this system.
>
> The new system was implemented by me. Here a divisor is a formal sum of 
> places of a function field with multiplicities. This system is available 
> via the function field attached to a curve. This is much more powerful than 
> the old system. You can compute the Riemann-Roch space of a divisor. Nils 
> is using this system.
>
> I never attempted to combine the two systems, being afraid of breaking the 
> old system (or just being lazy :-) There are similarly two systems in Magma 
> too. But in Magma, the two systems are integrated tightly and seamlessly. I 
> did some integration in Sage too but far from complete compared with Magma.
>
> I looked the Magma code in ask.sagemath. There's no problem in computing a 
> canonical divisor for the curve (through the attached function field). 
> Computing a basis of the Riemann-Roch space is no problem as well. Actually 
> the hard part is to construct the morphism from C to P2 from the basis. 
> Magma does this seamlessly. But Sage lacks this functionality (perhaps 
> because I did not implement it). I think, the gist of the matter is to 
> convert an element of the function field to a rational function of the 
> coordinate ring of P2. I have no idea how to do this now... Once you 
> construct the morphism, Sage can also compute the image of the morphism 
> (perhaps I implemented this). Hence unfortunately the Magma code cannot be 
> line by line converted to Sage code at present.
>
> On Saturday, October 28, 2023 at 8:27:07 AM UTC+9 Dima Pasechnik wrote:
>
>> On Sat, Oct 28, 2023 at 1:02 AM John H Palmieri  
>> wrote: 
>>
>> > Yes, I noticed that, too. It also fails to provide any information 
>> about what ``v`` should be (beyond saying that it should be a "valid 
>> object"): there is no INPUT block. 
>>
>> I've left a comment here: 
>>
>> https://github.com/sagemath/sage/commit/977ace651af9b99689f7b6507f91f8b4e2588ae9#r131117132
>>  
>>
>> fortunately, the author, @kwankyu is active 
>>
>> I can't locate the ticket, but it was merged in 9.0.beta9 
>>
>>
>> > 
>> > 
>> > On Friday, October 27, 2023 at 3:51:10 PM UTC-7 Dima Pasechnik wrote: 
>> >> 
>> >> By the way, the docstring of divisor() misses an example, it's 
>> >> 
>> >> def divisor(self, v, base_ring=None, check=True, reduce=True): 
>> >> r""" 
>> >> Return the divisor specified by ``v``. 
>> >> 
>> >> .. WARNING:: 
>> >> 
>> >> The coefficients of the divisor must be in the base ring 
>> >> and the terms must be reduced. If you set ``check=False`` 
>> >> and/or ``reduce=False`` it is your responsibility to pass 
>> >> a valid object ``v``. 
>> >> 
>> >> EXAMPLES:: 
>> >> 
>> >> sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens() 
>> >> sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2) 
>> >> 
>> >> """ 
>> >> 
>> >> Is there an issue for this? 
>> >> 
>> >> On Sat, Oct 28, 2023 at 12:42 AM Nils Bruin  wrote: 
>> >> > 
>> >> > A canonical divisor is the divisor of any differential on C so the 
>> following does the trick: 
>> >> > 
>> >> > sage: kC=C.function_field() 
>> >> > sage: kC(kC.base_field().gen(0)).differential().divisor() 
>> >> > 
>> >> > It doesn't look like we quite have computation of Riemann-Roch 
>> spaces natively in

Re: [sage-support] Re: Canonical divisor help

2023-10-28 Thread Kwankyu
Hi,

I replied to Dima's comment in 
https://github.com/sagemath/sage/commit/977ace651af9b99689f7b6507f91f8b4e2588ae9#r131138149.
 

Note that the "divisor" method of a curve had existed long before I added 
function field machinery and attached function fields to curves. Hence 
actually there are two systems of "divisors" of curves in Sage. 

The old system was implemented by William Stein, David Kohel, and Volker 
Braun. In the old system, a divisor is a formal sum of rational points with 
multiplicities. It is mainly implemented in 
`src/sage/schemes/generic/divisor.py`. Overall it is very rudimentary. Dima 
and John is attempting to use this system.

The new system was implemented by me. Here a divisor is a formal sum of 
places of a function field with multiplicities. This system is available 
via the function field attached to a curve. This is much more powerful than 
the old system. You can compute the Riemann-Roch space of a divisor. Nils 
is using this system.

I never attempted to combine the two systems, being afraid of breaking the 
old system (or just being lazy :-) There are similarly two systems in Magma 
too. But in Magma, the two systems are integrated tightly and seamlessly. I 
did some integration in Sage too but far from complete compared with Magma.

I looked the Magma code in ask.sagemath. There's no problem in computing a 
canonical divisor for the curve (through the attached function field). 
Computing a basis of the Riemann-Roch space is no problem as well. Actually 
the hard part is to construct the morphism from C to P2 from the basis. 
Magma does this seamlessly. But Sage lacks this functionality (perhaps 
because I did not implement it). I think, the gist of the matter is to 
convert an element of the function field to a rational function of the 
coordinate ring of P2. I have no idea how to do this now... Once you 
construct the morphism, Sage can also compute the image of the morphism 
(perhaps I implemented this). Hence unfortunately the Magma code cannot be 
line by line converted to Sage code at present.

On Saturday, October 28, 2023 at 8:27:07 AM UTC+9 Dima Pasechnik wrote:

> On Sat, Oct 28, 2023 at 1:02 AM John H Palmieri  
> wrote:
>
> > Yes, I noticed that, too. It also fails to provide any information about 
> what ``v`` should be (beyond saying that it should be a "valid object"): 
> there is no INPUT block.
>
> I've left a comment here:
>
> https://github.com/sagemath/sage/commit/977ace651af9b99689f7b6507f91f8b4e2588ae9#r131117132
>
> fortunately, the author, @kwankyu is active
>
> I can't locate the ticket, but it was merged in 9.0.beta9
>
>
> >
> >
> > On Friday, October 27, 2023 at 3:51:10 PM UTC-7 Dima Pasechnik wrote:
> >>
> >> By the way, the docstring of divisor() misses an example, it's
> >>
> >> def divisor(self, v, base_ring=None, check=True, reduce=True):
> >> r"""
> >> Return the divisor specified by ``v``.
> >>
> >> .. WARNING::
> >>
> >> The coefficients of the divisor must be in the base ring
> >> and the terms must be reduced. If you set ``check=False``
> >> and/or ``reduce=False`` it is your responsibility to pass
> >> a valid object ``v``.
> >>
> >> EXAMPLES::
> >>
> >> sage: x,y,z = PolynomialRing(QQ, 3, names='x,y,z').gens()
> >> sage: C = Curve(y^2*z - x^3 - 17*x*z^2 + y*z^2)
> >>
> >> """
> >>
> >> Is there an issue for this?
> >>
> >> On Sat, Oct 28, 2023 at 12:42 AM Nils Bruin  wrote:
> >> >
> >> > A canonical divisor is the divisor of any differential on C so the 
> following does the trick:
> >> >
> >> > sage: kC=C.function_field()
> >> > sage: kC(kC.base_field().gen(0)).differential().divisor()
> >> >
> >> > It doesn't look like we quite have computation of Riemann-Roch spaces 
> natively in sage yet, so finding effective representatives requires a 
> little more work. In the RiemannSurface code this is done using singular's 
> adjoint ideal code (or by Baker's theorem in cases where it applies). For 
> this curve the canonical class is of degree -2, so there are no effective 
> representatives in this case.
> >> >
> >> > On Friday, 27 October 2023 at 15:14:00 UTC-7 John H Palmieri wrote:
> >> >>
> >> >> If anyone here knows anything about canonical divisors and their 
> implementation in Sage, please see 
> https://ask.sagemath.org/question/74034/converting-algebraic-geometry-magmas-code-to-sage/.
>  
> The setup:
> >> >>
> >> >> sage: P2. = Projec

[sage-support] Re: How to define module multiplication?

2023-09-20 Thread Kwankyu
sage.rings.function_field.differential defines the space of differentials 
of a function field, which is a left module over the function field. You 
may consult the code there.

On Wednesday, September 20, 2023 at 6:08:15 PM UTC+9 Kwankyu wrote:

> Is you element in the cohomology ring an instance of ModuleElement?
>
> On Wednesday, September 20, 2023 at 8:34:05 AM UTC+9 John H Palmieri wrote:
>
>> The mod 2 cohomology of a simplicial complex has the structure of a 
>> module over the mod 2 Steenrod algebra. I would like to be able to do this 
>> in Sage:
>>
>> sage: x  = (some element in a cohomology ring)
>> sage: a = (some element of SteenrodAlgebra(2))
>> sage: a * x
>>
>> I have tried telling Sage that instances of CohomologyRing should be left 
>> modules over the Steenrod algebra (using the category framework) and then 
>> defining _mul_, _rmul_, _lmul_. I have had no luck: I just get
>>
>> TypeError: unsupported operand parent(s) for *: 'mod 2 Steenrod 
>> algebra, milnor basis' and 'Cohomology ring of RP^6 over Finite Field of 
>> size 2'
>>
>> What should I be doing instead?
>>
>> -- 
>> John
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/7f60cf19-cd8e-4de6-bfa8-2d98d29e17b0n%40googlegroups.com.


[sage-support] Re: How to define module multiplication?

2023-09-20 Thread Kwankyu
Is you element in the cohomology ring an instance of ModuleElement?

On Wednesday, September 20, 2023 at 8:34:05 AM UTC+9 John H Palmieri wrote:

> The mod 2 cohomology of a simplicial complex has the structure of a module 
> over the mod 2 Steenrod algebra. I would like to be able to do this in Sage:
>
> sage: x  = (some element in a cohomology ring)
> sage: a = (some element of SteenrodAlgebra(2))
> sage: a * x
>
> I have tried telling Sage that instances of CohomologyRing should be left 
> modules over the Steenrod algebra (using the category framework) and then 
> defining _mul_, _rmul_, _lmul_. I have had no luck: I just get
>
> TypeError: unsupported operand parent(s) for *: 'mod 2 Steenrod 
> algebra, milnor basis' and 'Cohomology ring of RP^6 over Finite Field of 
> size 2'
>
> What should I be doing instead?
>
> -- 
> John
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/0c6b3d60-44bc-43da-b89d-081abf57e472n%40googlegroups.com.


Re: [sage-support] evaluation of polynomials mod 8

2022-09-27 Thread Kwankyu
This bug is tracked now in 

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

On Tuesday, September 27, 2022 at 6:31:39 PM UTC+9 wdjo...@gmail.com wrote:

> On Tue, Sep 27, 2022 at 4:46 AM John Cremona  wrote:
> >
> > Am I doing something stupid here, or is this a bug?
> >
> > sage: R = Integers(8)
> > sage: RXY. = R[]
> > sage: F = X^3-X^2*Y+X*Y^2+Y^3
> > sage: F([4,2])
> > 6
> > sage: 4^3-4^2*2+4*2^2+2^3
> > 56
> > sage: (4^3-4^2*2+4*2^2+2^3) % 8
> > 0
> >
>
> Even after coercion it doesn't evaluate in ZZ/8ZZ:
>
> sage: ZZ8 = IntegerModRing(8)
> sage: R. = PolynomialRing(ZZ8, "x,y")
> sage: f = x^3-x^2*y+x*y^2+y^3
> sage: x0 = ZZ8(4)
> sage: y0 = ZZ8(2)
> sage: x0^3-x0^2*y0+x0*y0^2+y0^3
> 0
> sage: f(x0,y0)
> 6
> sage: f(4,2)
> 6
>
> >
> > Why does F not evaluate to 0 mod 8 at X=4, Y=2? Rather obviously, each
> > of the terms in F(4,2) is 0 mod 8.
> >
> > John
> >
> > --
> > 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/CAD0p0K5hXexw5J20gstKUOXxzWdP2a2OTRbKmUtAyG41ySSR-A%40mail.gmail.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/ae69a416-cdb3-4eab-8639-8728152ae3b9n%40googlegroups.com.


[sage-support] Re: evaluation of polynomials mod 8

2022-09-27 Thread Kwankyu
There is a serious problem here.

sage: type(RXY)


The base ring of a Singular polynomial should a field. As 8 is not a prime 
number,  RXY should not be a libsingular polynomial ring!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/9334305b-5099-4b38-8aa3-f8c66d3441bdn%40googlegroups.com.


[sage-support] Re: Pause and Play button in interactive sage demos

2022-08-23 Thread Kwankyu
Animated plots may help you:

https://doc.sagemath.org/html/en/reference/plotting/sage/plot/animate.html

For play button, you may use interactive(). For example,

x = SR.var("x")
sines = [plot(c*sin(x), (-2*pi,2*pi), color=Color(c,0,0), ymin=-1, ymax=1) 
for c in range(0,1,.2)]
a = animate(sines)
a.interactive()

It is unfortunate this interactive animated plot is rendered in 3d, though.



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/00ccfdbb-a8c7-4b2d-a388-495ed9c8d485n%40googlegroups.com.


[sage-support] Re: ascii_art fail in jupyter notebook

2022-06-14 Thread Kwankyu
Thanks for the report.

This is now fixed in 

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

On Wednesday, June 15, 2022 at 4:58:46 AM UTC+9 usapan...@gmail.com wrote:

> The above error can be fixed by setting
>
> sage: sage.typeset.ascii_art.AsciiArt._terminal_width = lambda x: 80
>
> (80 or any other width you want)
> On Monday, June 13, 2022 at 6:13:23 PM UTC-4 Jianping Pan wrote:
>
>> SageMath version 9.7.beta1, Release Date: 2022-05-26
>> Operating system: macOS Monterey 12.4
>>
>> When running sage in Jupyter notebook, I get the following problem.
>>
>> *sage: ascii_art(list(Partitions(5)))*
>> *) failed: 
>> OSError: [Errno 25] Inappropriate ioctl for device>*
>>
>> The exact same code works when I run my sage in the terminal. My guess is 
>> the "_terminal_width()" private method does not work with Jupiter. In 
>> the terminal, the following command gives
>>
>> sage: ascii_art(list(Partitions(*5*)))._terminal_width()
>> 80
>>
>> While in Jupiter notebook I get 
>> OSError: [Errno 25] Inappropriate ioctl for device 
>>
>> This was not an issue before I recently upgraded my sage.
>>
>> Thanks!
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/4212afde-80bc-480e-b81b-79bbab134c35n%40googlegroups.com.


[sage-support] Re: Where do I report that 1-1=2 :)

2022-06-06 Thread Kwankyu
It seems the bug is in jupyter. Try putting the following

$\verb|-_-|$

in a markdown cell.

On Monday, June 6, 2022 at 12:51:00 AM UTC+9 egourg...@gmail.com wrote:

> Indeed, in Jupyter or Jupyterlab, the underscore is rendered as a minus 
> sign in %display latex mode.
> For instance, 
>
> %display latex
> type(ZZ)
>
> returns
>
> <𝚌𝚕𝚊𝚜𝚜 
> '𝚜𝚊𝚐𝚎.𝚛𝚒𝚗𝚐𝚜.𝚒𝚗𝚝𝚎𝚐𝚎𝚛⎯𝚛𝚒𝚗𝚐.𝙸𝚗𝚝𝚎𝚐𝚎𝚛𝚁𝚒𝚗𝚐⎯𝚌𝚕𝚊𝚜𝚜'>
>
> while 
>
> print(type(ZZ))
>
> gives
>
> 
>
> I don't know where the replacement of underscores by minus signs comes 
> from...
> Le dimanche 5 juin 2022 à 15:50:41 UTC+2, raymond@gmail.com a écrit :
>
>> show('1_1=',2) 
>> Works fine in console mode. 
>> In jupyter and jupyterlab: 
>>
>> 1-1=2 
>>
>> It seems to be auto-corrected; I see the correct output momentarily then 
>> it gets "corrected". 
>> Where should I report it? 
>>
>> Sagemath 9.6 
>> Linux Mate 
>> Google chrome and Firefox 
>>
>> rrogers 
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e9f5d0d1-7097-46dd-83a0-64d0af35c699n%40googlegroups.com.


[sage-support] Re: Have seen that ?

2022-03-06 Thread Kwankyu
Absolutely great!

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/6913e533-ac5e-4801-8ce7-0783a7da9163n%40googlegroups.com.


Re: [sage-support] Re: Basic Stats deprecated?

2022-02-28 Thread Kwankyu
Here is the ticket for this:

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

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/9d5e6b77-40b3-4a20-94bb-fe4bc9e5d4f9n%40googlegroups.com.


[sage-support] Re: Basic Stats deprecated?

2022-02-25 Thread Kwankyu

>
> But shouldn't these basic functions have some default functionality? 
>

+1 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/60db54b5-8646-4377-a921-5b5b30bc287cn%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-20 Thread Kwankyu


On Thursday, January 20, 2022 at 4:57:34 PM UTC+9 slelievre wrote:

> Fine with me. You should add your snow person too! 
> Then they can keep each other company:


It is fun to look at them being together. But their destiny is not 
eternity. Thanks anyway.  

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3d90f3b8-19fb-4ea9-ae8a-7e568922f5a9n%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-19 Thread Kwankyu
As I wish that the artwork by Samuel Lelièvre 
 is not lost, I posted it here:

https://wiki.sagemath.org/art#Snowman

if the author permits. If not, let me know.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/f5176289-37da-45e0-a698-078c7bb8bc2fn%40googlegroups.com.


Re: [sage-support] Re: Snowman

2022-01-16 Thread Kwankyu
After blizzard is gone,

from sage.plot.plot3d.shapes import *
P = Graphics()
P += Sphere(.5, color='white')
P += Sphere(1, color='white').translate(0,0,-1.2)
P += Sphere(1.5, color='white').translate(0,0,-2.5)
P += Sphere(.1, color='white').translate(.45,-.1,.15) + Sphere(.05, 
color='black').translate(.51,-.1,.17)
P += Sphere(.1, color='white').translate(.45, .1,.15) + Sphere(.05, 
color='black').translate(.51, .1,.17)
P += Cone(.1,.5, color='orange').rotateX(0).rotateY(-pi/2).translate(.3, 0, 
0)
P.show()

Exercise: add arms to the snowman.

On Saturday, January 15, 2022 at 5:44:08 PM UTC+9 Emmanuel Charpentier 
wrote:

> Homework ?
>
> Le vendredi 14 janvier 2022 à 19:41:05 UTC+1, iva.po...@gmail.com a 
> écrit :
>
>> Sorry, here is the picture how snowman has to look like..I started 
>> drawing with a Sphere, but I can't get it like in the picture. 
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/8204afd1-f99e-4a69-9ddc-19f148cefe61n%40googlegroups.com.


[sage-support] Re: Function-call syntax deprecation

2021-09-09 Thread Kwankyu
gamma(t) = vector([t,t^2,t^3])

is a bit simpler.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/b27c5800-9f94-4721-94b2-5f5a74bcf893n%40googlegroups.com.


[sage-support] Re: Arithmetic in Jacobians of Hyperelliptic Curves

2021-06-20 Thread Kwankyu
Hi,

On Sunday, June 20, 2021 at 10:18:50 AM UTC+9 zsc...@gmail.com wrote:

> I have reason to believe that the point P is not torsion and so Magma is 
> correct and Sage is incorrect.  I don't know enough about the algorithms 
> used to work with points on hyperelliptic Jacobians and so I'm not 
> confident in my ability to track down what's going on.
>

By my own computation, I confirm that Sage is incorrect. Looking at the 
Sage source code, I see that Sage uses Cantor's reduction algorithm based 
on Mumford representation of divisors by ideals. Sage wrongly computes 5*P 
to (1) unit ideal. So I guess there seems a bug in the implementation of 
Cantor's algorithm...  

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/041e7893-9ff3-45cd-9535-39e9bea54ee8n%40googlegroups.com.


[sage-support] Re: Question about a deprecation warning

2020-07-12 Thread Kwankyu


On Saturday, July 11, 2020 at 3:31:15 AM UTC+9 John H Palmieri wrote:

> Does IPython have a preparser?
>

I suspected Sage's preparser. I was wrong. You are right: (even out of Sage)

Hera:~$ PYTHONWARNINGS=always ipython
Python 3.8.3 (default, May 27 2020, 20:54:22) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.15.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: '\i'

:1: DeprecationWarning: invalid escape sequence \i
:1: DeprecationWarning: invalid escape sequence \i
:1: DeprecationWarning: invalid escape sequence \i
<>:1: DeprecationWarning: invalid escape sequence \i
:1: DeprecationWarning: invalid escape 
sequence \i
  '\i'
Out[1]: '\\i' 
 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/001feb4e-8c7c-4c77-88ee-d727bd1bf2d9n%40googlegroups.com.


[sage-support] Re: Question about a deprecation warning

2020-07-09 Thread Kwankyu
Because of the preparser?

On Thursday, July 2, 2020 at 9:19:58 AM UTC+9 John H Palmieri wrote:

>
>
> On Wednesday, July 1, 2020 at 4:39:12 PM UTC-7, John H Palmieri wrote:
>>
>>
>>
>> On Wednesday, July 1, 2020 at 2:22:49 PM UTC-7, Antonio Rojas wrote:
>>>
>>>
>>>
>>> El miércoles, 1 de julio de 2020, 21:06:43 (UTC+2), John H Palmieri 
>>> escribió:


 Why so many deprecation warnings? I think they're coming from plain 
 Python; why doesn't Python print the warnings?



>>> Because python ignores deprecation warnings, 
>>> https://docs.python.org/3/library/warnings.html#default-warning-filter 
>>>
>>
>> Thanks, that's helpful. But why does Sage print the warning so many 
>> times? If I turn on Python's deprecation warnings, I just see one warning 
>> message, not six of them.
>>
>>
> I guess this is in turn an IPython thing, although I don't know why 
> IPython prints the warning 6 times, and also repeats my original command. 
> With warnings enabled, I evaluated '\i' once:
>
> % PYTHONWARNINGS=always sage --ipython
> ...
> IPython 5.8.0 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help  -> Python's own help system.
> object?   -> Details about 'object', use 'object??' for extra details.
>
> In [1]: '\i':1: DeprecationWarning: invalid escape sequence \i
> :1: DeprecationWarning: invalid escape sequence \i
> :1: DeprecationWarning: invalid escape sequence \i
> In [1]: '\i'
>
> :1: DeprecationWarning: invalid escape sequence \i
> :1: DeprecationWarning: invalid escape sequence \i
> :1: DeprecationWarning: invalid escape sequence \i
> :1: DeprecationWarning: invalid escape 
> sequence \i
>   '\i'
> Out[1]: '\\i'
>
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/0534d604-38c6-4c47-8294-b07fa9835d42n%40googlegroups.com.


Re: [sage-support] Unexpected error for asking diagonalizability

2019-11-11 Thread Kwankyu
Thanks for the input. This is now 

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

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/6d5bc553-cfaa-4fa4-8c52-3d01b3f630ca%40googlegroups.com.


[sage-support] Unexpected error for asking diagonalizability

2019-11-07 Thread Kwankyu
Hi,

This

m = matrix(QQ, 3, [1, 1, 1, 0, 3, 3, -2, 1, 2])
m.is_diagonalizable()

raises an error rather than giving False. The error message gives an 
explanation why the matrix is not diagonalizable. But I think the expected 
result for asking diagonalizability should be either True or False, for 
legitimate inputs. What do you think?


 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/4c3a3e63-14d7-4e49-aadb-480b6ff46a64%40googlegroups.com.


[sage-support] Re: Solve equation efficiently

2019-07-29 Thread Kwankyu


On Thursday, July 25, 2019 at 12:08:20 AM UTC+9, chandra chowdhury wrote:
>
> I have matrices B and C of size (m,n) over integer with m>n. 
> I know there is matrix A of size (m,m) such that 
> AB=C. How to find A efficiently in Sage?
>

I guess there is no special way in Sage to solve your kind of problem. Just 
solve for each row of A. 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/021a81f6-9ba9-4066-bf30-9dd0796f97e7%40googlegroups.com.


[sage-support] Re: Counting Points of Multivariate Polynomials Over Finite Fields

2019-07-08 Thread Kwankyu


On Tuesday, July 9, 2019 at 1:47:50 AM UTC+2, Caleb Robelle wrote:
>
> I am using sage version 7.3 on Linux mint 18. I was wondering if there are 
> algorithms to count points of multivariate polynomials over finite fields 
> implemented in sage that were faster than a simple brute force search. I 
> haven't been able to find any on my own. Any advice would be appreciated. 
> Thanks!
>

Define the ideal I generated by the polynomials and the field equations (of 
the form x^q-x with variable x and q order of the finite field). Then 
I.variety() computes the points using Groebner basis theory. 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/c8e5d0ae-5171-40ac-8446-b4007ec2d6e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Updating Sage documentation presentation

2019-06-21 Thread Kwankyu


On Friday, June 21, 2019 at 11:29:06 AM UTC+9, saad khalid wrote:
>
> I definitely see your point, it doesn't look fancy to me. But, I would 
> argue that Mathematica *does* have very "fancy" and accessible looking 
> documentation, and I think accessibility and polish are what new users may 
> base their choice on when deciding which CAS to use.
>

To me, the Python documentation looks better than the Mathematica 
documentation, in terms of readability. But I think this is just personal 
preference.

Anyway, definitely the Sage documentation needs to be improved, and I guess 
no one does not want to stick to the present state. You are welcome to try 
other options. There is no reason not to. 




-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/dd4996fa-28ed-4408-896d-ead57da630bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Updating Sage documentation presentation

2019-06-20 Thread Kwankyu


On Wednesday, June 19, 2019 at 9:31:05 PM UTC+9, saad khalid wrote:
>
> Hi all:
>
> The sage documentation hosted online (eg. 
> http://doc.sagemath.org/html/en/reference/index.html ) looks very old. To 
> me at least, it makes the software seem ancient, and I believe it puts off 
> younger new users. The Cocalc interface for Sage maintains a modern looking 
> aesthetic which makes it easy to show my peers (because it doesn't look 
> that intimidating). I wish the documentation was the same way. Has there 
> been any thought towards updating the look of the documentation? For 
> example, we could use readthedocs (I believe this is the simplest option). 
> Alternatively, we could use something like slate (
> https://github.com/lord/slate) or a variety of other options. My question 
> is, has this been considered and is there any obvious reasons to *not *do 
> this? 
>

I am curious if the Python documentation looks fancy to you?

https://docs.python.org/3.6/ 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/89fffd32-87e0-4ba9-ac69-91caac666bbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: How to find one element of residue field as a vector over base field

2019-05-15 Thread Kwankyu


On Wednesday, May 15, 2019 at 10:08:05 PM UTC+9, Santanu wrote:
>
>
> What is the value of $\frac{xy}{(x^2 + x + 1) } + 
>>>
>>> \frac{1}{x^2 + x + 1}+$ Place $(x^2 + x + 1, x y + 1)$? 
>>>
>>>
>> You cannot add an element of the function field with a place.
>>
> Actually by this we meant the element modulo the place ( a maximum ideal).
>

Use R.residue_field() for the valuation ring R.  

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5a8d7371-59f2-4b5f-be51-fe08cbb05818%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Re: How to find one element of residue field as a vector over base field

2019-05-15 Thread Kwankyu


On Wednesday, May 15, 2019 at 10:08:05 PM UTC+9, Santanu wrote:
>
>
>
> On Wed, 15 May 2019 at 17:03, Kwankyu > 
> wrote:
>
>> Hi Chandra,
>>
>> What is Place (x^2 + x + 1, x*y + 1)? Is it ideal generated by
>>>
>>> (x^2 + x + 1, x*y + 1). 
>>>
>>>
>> No. Place (x^2 + x + 1, x*y + 1) is the unique place of the function field 
>>
>> at which both functions x^2 + x +1, x*y + 1 vanish.
>>
>> Thank you for your response. We know that a place is the unique maximal 
> ideal of a local (valuation) ring obtained from the valuation map, which is 
> well known to be a principle ideal. So, there will be a single generator 
> for a place. But here it is represented by two polynomials. We didn't get 
> what it means. 
>

A place generally cannot be represented by a single polynomial. The 
generator of the principal ideal does not specify the local ring itself. 

Can we find the corresponding valuation ring, valuation map
>
ant the generator for the place?
>

Use p.valuation_ring() for the valuation ring, which is only a facade for 
the ring. Use p.local_uniformizer() for the generator. 

Look at this example:

sage: p1,p2 = L(x^2+x+1).zeros()
sage: p1.local_uniformizer()
x^2 + x + 1
sage: p2.local_uniformizer()
x^2 + x + 1

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/dae3358f-0854-41d3-8c3b-f14048c57049%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: How to find one element of residue field as a vector over base field

2019-05-15 Thread Kwankyu
Hi Chandra,

What is Place (x^2 + x + 1, x*y + 1)? Is it ideal generated by
>
> (x^2 + x + 1, x*y + 1). 
>
>
No. Place (x^2 + x + 1, x*y + 1) is the unique place of the function field 

at which both functions x^2 + x +1, x*y + 1 vanish.

 

> What is the value of $\frac{xy}{(x^2 + x + 1) } + 
>
> \frac{1}{x^2 + x + 1}+$ Place $(x^2 + x + 1, x y + 1)$? 
>
>
You cannot add an element of the function field with a place.
 

> It is an element of residue field which is isomorphic to 
>
> $\mathbb{F}_{2^2}$. Since $\mathbb{F}_{2^2}$ is isomorphic 
> to $\mathbb{F}^2_{2}$ as a vector space, 
>
> I want value in $\mathbb{F}^2_{2}$.
>
>
vector(a)

or you can use the maps returned by

k.vector_space(map=True)

if k is the residue field.

 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/813396b6-b7ae-452d-9b30-c73003262155%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Function Field

2019-05-14 Thread Kwankyu
Hi,

It is because f is not separable. If you see the documentation, places() 
method is supported only for global function fields, and global function 
fields in sage are separable extensions of rational function fields (over 
finite fields). You may use a separable model of L instead.

sage: Ls, from_Ls, to_Ls = L.separable_model()
sage: Ls.places()
[Place (1/x_, 1/x_*y_ + 1), Place (x_, y_), Place (x_, y_ + 1)]


Kwankyu

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/eae5bced-636b-43e9-9e02-6372cb0612f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: @interact

2019-04-27 Thread Kwankyu
This gets a grid input in Jupyter. Is this close to what you want?

@interact
def _(A=input_grid(2,2, default=[[1,2],[3,4]])):
A = matrix(A)
print(A)

-- 
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: Weird behavior in sagecell

2018-12-01 Thread Kwankyu

>
> See a similar report on the sage-cell mailing list: 
> https://groups.google.com/d/topic/sage-cell/BL9h7xLiwG4/discussion 
>
> In the discussion there, Andrey Novoseltsev points out 
> that SageMathCell uses only one jsmol instance, and 
> if there are several plots using it, they might conflict in 
> hard to predict ways. 
>

Actually there is an easy fix for this issue. Follow the discussion linked 
above. 

-- 
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: Where is (the) kash?

2018-07-10 Thread Kwankyu


On Wednesday, July 11, 2018 at 10:35:28 AM UTC+9, Nils Bruin wrote:
 

> Note that most parts of the function field infrastructure doesn't make use 
> of the fact that residue fields as finite (if you do it right, basically 
> only the part that computes divisor class groups), so with a bit of care 
> the same code should work in characteristic 0 for most computations.
>

I agree.
 

> It would be great if you could include that case in your code as well. 
>

That would not happen. See below.
 

> I think this is also how the function field code in magma was developed 
> (start with global function fields, retool the code to also work for 
> characteristic 0 (or non-finite positive characteristic base field) where 
> it makes sense). 
>

So we should follow the same path: focus on global function fields first, 
and then extend to over other fields.

The ticket #22982 is only for global function fields. This already seems to 
take a long time to be merged to Sage. I do not have a reviewer for its 
subticket #25435 yet. Perhaps the subticket should be further split to 
subsubtickets, as no one seems to want to review the lengthy code. 

After this ticket, I expect someone else (perhaps not me) would come up to 
extend my code to function fields to over other fields. Some algorithms 
that I implemented assume essentially finite base field. A prominent one is 
the Leonard-Pellikaan-Singh-Swanson algorithm computing the maximal order.  

-- 
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: Where is (the) kash?

2018-07-10 Thread Kwankyu

>
> https://trac.sagemath.org/ticket/22982 (a meta-ticket where kash is a 
> part of)
>

Not at all! This is a native implementation of global function fields in 
Sage.

-- 
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: Problem in new Sage version

2018-07-06 Thread Kwankyu
What is your point? Remove GF(2) as this is over GF(2) by default.

On Saturday, July 7, 2018 at 2:00:34 PM UTC+9, chandra chowdhury wrote:
>
> Initial version of Sage this worked perfectly
>
> *V=BooleanPolynomialRing(GF(2),49,['x%d'%(i) for i in range(1,49)]+['Z'])*
>
> But now I am getting error. My version is 7.4
>
> Error is as follows:
>
> Traceback (click to the left of this block for traceback)
> ...
> TypeError: 'FiniteField_prime_modn_with_category' object cannot be
> interpreted as an index
>
>

-- 
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: Computing basis of Riemann Roch space

2018-05-14 Thread Kwankyu
Hi,

You may want to look into

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


Cheers.

-- 
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: Setting up a sage notebook server for multiple accounts

2018-02-11 Thread Kwankyu


On Monday, February 12, 2018 at 10:13:36 AM UTC+9, William wrote:
>
>
> You hypothesis is right, but your conclusion is not.  What one 
> typically blocks is creation of new outgoing tcp connection.  The 
> jupyter notebook  server doesn't need to create new outgoing 
> connections; it just handles incoming connections. 


Right. There was a confusion in my understanding of tcp connection. I have 
now confirmed that blocking creation of new outgoing tcp connection works 
well for Jupyter notebook users.

Thank you!

-- 
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: Setting up a sage notebook server for multiple accounts

2018-02-11 Thread Kwankyu


On Monday, February 12, 2018 at 3:55:35 AM UTC+9, William wrote:
>
>
> In CoCalc.com we use Calico to program the Linux routing table, which 
> makes it easy to restrict connections between parts of the system, not 
> allow outgoing connections by default, etc. 
>

Not to allow outgoing connections from a user's Jupyter notebook is the 
most desirable for me. But this seems impossible with Jupyter notebook 
because the account under which the Jupyter notebook runs and the account 
under which the sage kernel runs are the same. In the old sage nb, the two 
accounts are separate.

Am I wrong? I hope so...

-- 
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: Setting up a sage notebook server for multiple accounts

2018-02-10 Thread Kwankyu


On Sunday, February 11, 2018 at 8:00:46 AM UTC+9, kcrisman wrote:
>
> That is a great question.  Sagenb (what you have found) does not serve up 
> Jupyter.  It would be really interesting to hear from someone who knows 
> about Jupyterhub and whether that is a stable solution at this point.
>

I don't have an experience of deploying Jupyterhub, but for experiments 
have installed a Jupyterhub server on a ubuntu machine. 

Jupyterhub is really just a hub for Jupyter notebooks. A user, after login 
in the login webpage, have a Jupyter notebook runnng with his(her) own 
account of the machine. So it is like the user login to a machine and run a 
Jupyter notebook in the shell and use the notebook on a web browser.  

For me, a big concern of running Jupyterhub on my machine is security. If 
you give an id and passwd to a user (say a student), then (s)he can 
whatever you can do on a linux machine with internet connection. There is 
not much you can do for this issue as, I think, an objective of Jupyter 
notebook design is to give the legitimate user the full computing power and 
resources available. In other words, Jupyter notebook is designed for a 
scientist. That is not for a student who can misuse the power.

A possible solution would be to isolate the machine as much as possible. 
Obviously you cannot cut the internet connection from the machine. All I 
could do is to put the machine to a vm.

I gave up running Jupyterhub for my class, for the above and other reasons. 
For the security concern, it seems the old sage notebook is better suited 
for classes with students.

-- 
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: How to prevent a browser from opening after starting a Sage notebook server

2017-12-14 Thread Kwankyu
That's it! Thank you.

-- 
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: How to prevent a browser from opening after starting a Sage notebook server

2017-12-14 Thread Kwankyu


On Thursday, December 14, 2017 at 4:15:33 PM UTC+9, Simon King wrote:
>
> Hi, 
>
> On 2017-12-14, Kwankyu > wrote: 
> > "sage -n" automatically opens a new browser window after starting the 
> > notebook server. I checked this on Mac and Ubuntu. I think this is an 
> > "over" service, and annoyance if I do not want a new browser window, 
> unless 
> > there is a command line option to prevent this. Is there such an option? 
>
> I cannot reproduce this. When I do "sage -n" or "sage -n jupyter" and 
> already have a browser window open, then a new tab in the existing 
> window is created. 
>

Sorry that I was careless. I meant the new tab in the existing window. If 
there was no existing window, then a new window would be opened (I did not 
experiment this yet though).

Meanwhile, I found that jupyter itself has an option "--no-browser", which 
serves my purpose, but Sage does not seem to have a corresponding option...
 

-- 
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] How to prevent a browser from opening after starting a Sage notebook server

2017-12-13 Thread Kwankyu
Hi,

"sage -n" automatically opens a new browser window after starting the 
notebook server. I checked this on Mac and Ubuntu. I think this is an 
"over" service, and annoyance if I do not want a new browser window, unless 
there is a command line option to prevent this. Is there such an option?

-- 
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: No is_irreducible() method for multi-variate polynomials...

2017-09-29 Thread Kwankyu
Hi Maarten,

I would not call this an embarrassing defect. Sage is an open source 
> project written by volunteers that do not have an unlimited amount of time. 
> If something is not implemented this just means no one had the time yet to 
> do this.


I did not intend to insult the Sage developer community by that. If it did, 
I am sorry. 

I think is_irreducible() method should be one of basic repertoire for 
multi-variate polynomial arithmetic just as much as in univariate case, and 
I was surprised that Sage lacks it. Sage is now a mature system and has a 
long history. Collectively there was time, but perhaps no one was so 
interested in it to implement it by himself or herself

If no one would work on the ticket, perhaps I would do it. That was usually 
the case for most of the tickets I created :-) 


-- 
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: No is_irreducible() method for multi-variate polynomials...

2017-09-28 Thread Kwankyu
Ok. Here is the ticket:

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

Please contribute code to fix the embarrassing defect!

-- 
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] No is_irreducible() method for multi-variate polynomials...

2017-09-27 Thread Kwankyu
Hi,

I was surprised to find that there is no is_irreducible() method for 
multi-variate polynomials in Sage. There is an alternative is_prime() 
method for this purpose. But this is very slow:

sage: f.parent()
Multivariate Polynomial Ring in x, y over Finite Field of size 2
sage: f=(x^10+y^10)^2
sage: time f.is_prime()
CPU times: user 33.6 ms, sys: 497 µs, total: 34.1 ms
Wall time: 33.9 ms
False
sage: time sum([e for _,e in f.factor()]) == 1
CPU times: user 307 µs, sys: 34 µs, total: 341 µs
Wall time: 324 µs
False

sage: f=x^9+y^9+1
sage: time sum([e for _,e in f.factor()]) == 1
CPU times: user 832 µs, sys: 118 µs, total: 950 µs
Wall time: 1.64 ms
True
sage: time f.is_prime()
CPU times: user 19.4 ms, sys: 521 µs, total: 19.9 ms
Wall time: 19.8 ms
True

Am I missing something? 



-- 
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: numerical semigroup in sagemath

2017-07-26 Thread Kwankyu
There is a nice GAP package for numerical semigroups. You can use that via 
sage interface once you install it into the GAP under Sage (which could be 
tricky). Check

https://www.gap-system.org/Packages/numericalsgps.html 

-- 
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: [sage-devel] An issue with the .coefficient() function

2017-06-25 Thread Kwankyu

>
> On 25/06/2017 16:51, baliza Eyo wrote: 
> > Dear Sage developers, 
> > 
> > Here is a quick question about the output of the .coefficient() for an 
> SR 
> > object. 
> > having set up the variables as follows 
> > 
> > sage: var('x,y') 
> > (x, y) 
> > 
> > Shouldn't the output of the following commands be the same: 
> > 
> > sage: ((x^2 - 2)^2 - y^2).coefficient(x^4) 
> > 0 
> > sage: expand(((x^2 - 2)^2 - y^2)).coefficient(x^4) 
> > 1 
> > sage: ((x^2 - 2)^2 - y^2).diff(x,4).subs(x==0)/factorial(4) 
> > 1 
> > 
> > The last two outputs are correct but why is 0 the intended output for 
> >   ((x^2 - 2)^2 - y^2).coefficient(x^4)   ? 
>

I agree that this is unintuitive, but this is a well-documented behavior. 
Check this out.

sage: f=((x^2 - 2)^2 - y^2)
sage: f.coefficient? 

-- 
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: Matrix of operations after gaussian elimination

2017-06-09 Thread Kwankyu
 Is this what you want?

sage: m = matrix(2,[1,2,3,4]) 
sage: H,U = m.echelon_form(transformation=True) 
sage: H 
[1 0] 
[0 2] 
sage: U 
[-2 1] 
[ 3 -1] 
sage: U * m == H 
True

>

-- 
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] Giving Back to the Community

2016-11-28 Thread Kwankyu


On Monday, November 28, 2016 at 2:44:32 AM UTC+1, William wrote:
>
> Hi, 
>
> It would be great if somebody could create some sort of index of such 
> packages, which we could link to (or include) on sagemath.org. 
>
> This might eventually involve using some sort of tagging (or 
> searching) of https://pypi.python.org/pypi and/or github.For now, 
> this could just be a Github wiki page, which gets updated as we become 
> aware of packages, and which we link to from sagemath.org. 
>

Many packages listed in 

https://wiki.sagemath.org/SageMathExternalPackages  
 
are on GIthub. Would it improve visibility to move the Sage wiki page to a 
Github wiki under SageMath umbrella?

-- 
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] Giving Back to the Community

2016-11-27 Thread Kwankyu

>
>
> and the list at 
>
> https://wiki.sagemath.org/SageMathExternalPackages 
>

It is extremely slow to load this page, for me.

-- 
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] Redundant blank line appears in the output

2016-10-31 Thread Kwankyu
Hi,

>From some Sage versions onward, I see a blank line before the output.

sage: m=matrix(2,[1,2,3,4])
sage: m

[1 2]
[3 4]
sage:

This blank line seems redundant. Why do we have that? Or is it just me?

-- 
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] Linear algebra over a valuation ring in Sage

2016-10-03 Thread Kwankyu


On Monday, October 3, 2016 at 1:15:09 PM UTC+2, John Cremona wrote:
>
>
> I don't quite understand the problem, since Frac(R)=k(x) anyway.  Do 
> you only have a  problem when x is not in R, since otherwise k[x] is a 
> subring of R anyway and the numerator / denominator are then correct 
> (though perhaps not in the parent you prefer)?  If so then the only 
> problematic R is k[1/x] and it should work to make a change of 
> variable. 
>

Right.. The problematic case is when x is not in R. My complaint is that 
Sage's free modules machinery over R does not work as it is (without a 
change of variable), though (I thought) it is supposed to work.
If the only reason why it does not work is simply the wrong behavior of 
numerator / denominator methods, then a small fix would make it work 
generically over any PID (or perhaps euclidean domain)...

Thank you for attention!

-- 
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] Linear algebra over a valuation ring in Sage

2016-10-03 Thread Kwankyu
Hi,

I want to do linear algebra over a valuation ring (infinite) R of rational 
function field. As R is a PID, I expected the Sage machinery over general 
PID works fine for it. But it does not. The problem is, as I understand it, 
that internally Sage assumes an ambient vector space over Frac(R)=k(x) for 
its algorithms. Thus for example, f=1/x in Frac(R) has numerator and 
denominator in k[x], rather than R. This kind of things break the machinery 
for R.

I think for general PIDs at least, Sage should not assume the ambient 
vector space over the fraction field, as this effectively limits possible 
PIDs to ZZ for QQ, to k[x] for k(x)...

Do I just misunderstand something? Or is this a genuine limitation of Sage?

Thank you for reading.



-- 
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: backwards compatibility

2016-04-26 Thread Kwankyu
This is also strange:

sage: (zeta1092^13) == zeta84

True

sage: zeta84^7 == zeta12

True

sage: (zeta1092^13)^7 == zeta12

False

-- 
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: backwards compatibility

2016-04-26 Thread Kwankyu
 

sage: zeta84 in Q1092

True

sage: zeta12 in Q84

True

sage: zeta12 in Q1092

False

sage: Q12.embeddings(Q1092)

[

Ring morphism:

  From: Cyclotomic Field of order 12 and degree 4

  To:   Cyclotomic Field of order 1092 and degree 288

  Defn: zeta12 |--> zeta1092^91,

Ring morphism:

  From: Cyclotomic Field of order 12 and degree 4

  To:   Cyclotomic Field of order 1092 and degree 288

  Defn: zeta12 |--> -zeta1092^91,

Ring morphism:

  From: Cyclotomic Field of order 12 and degree 4

  To:   Cyclotomic Field of order 1092 and degree 288

  Defn: zeta12 |--> zeta1092^273 - zeta1092^91,

Ring morphism:

  From: Cyclotomic Field of order 12 and degree 4

  To:   Cyclotomic Field of order 1092 and degree 288

  Defn: zeta12 |--> -zeta1092^273 + zeta1092^91

]


Perhaps Sage now wants you to choose an embedding.

-- 
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: backwards compatibility

2016-04-26 Thread Kwankyu
 

sage: zeta84 in Q1092

True

sage: zeta12 in Q84

True

sage: zeta12 in Q1092

False

sage: Q12.embeddings(Q1092)

[

Ring morphism:

  From: Cyclotomic Field of order 12 and degree 4

  To:   Cyclotomic Field of order 1092 and degree 288

  Defn: zeta12 |--> zeta1092^91,

Ring morphism:

  From: Cyclotomic Field of order 12 and degree 4

  To:   Cyclotomic Field of order 1092 and degree 288

  Defn: zeta12 |--> -zeta1092^91,

Ring morphism:

  From: Cyclotomic Field of order 12 and degree 4

  To:   Cyclotomic Field of order 1092 and degree 288

  Defn: zeta12 |--> zeta1092^273 - zeta1092^91,

Ring morphism:

  From: Cyclotomic Field of order 12 and degree 4

  To:   Cyclotomic Field of order 1092 and degree 288

  Defn: zeta12 |--> -zeta1092^273 + zeta1092^91

]

Perhaps Sage now wants you to choose an embedding.

-- 
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: Coming SageMathCell upgrade - please test!

2016-04-17 Thread Kwankyu Lee
The webpage from the Madrid server opens but contains no Sage cell. My web 
browser is Chrome on Mac. Accessing from Asia might be a cause.

-- 
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] libSingular multiple return values are lost.

2015-08-05 Thread Kwankyu
Hi,

I am learning to use the libSingular interface to use Singular functions in 
Sage. I have two questions.

(1) My Singular procedures return multiple values, but my Sage function 
wrapping the procedure (via "singular_function")  seems to lose the values 
except the first one. Is this a bug or a limitation? 

(2) My Singular procedures do not need a ring (they internally construct 
rings) as input, but my Sage function wrapping the procedure raises an 
error if I do not specify a ring (via ring=...). I can use a dummy for 
this, but this does not look elegant. Is there a way to avoid constructing 
a dummy ring in this situation?

Thank you in advance. Anyway, this libSingular interface is brilliant!

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


[sage-support] Re: Is "profile_sage" still the right place to put user configurations for IPython?

2015-06-26 Thread Kwankyu
I did some experiments and looked into Sage source codes. It seems Sage 
loads only "profile_default" even though I can create "profile_sage". 
Moreover there is no mechanism to set which IPython profile to load when 
Sage starts.

Now I wonder what is official IPython profile for Sage. Is it 
"profile_default" or "profile_sage"?

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


[sage-support] Is "profile_sage" still the right place to put user configurations for IPython?

2015-06-25 Thread Kwankyu
 

To enable extra readline commands for Sage 6.7, I put some codes into


.sage/ipython-3.1.0/profile_sage/ipython_config.py


But it does not work. If I move the file "ipython_config.py" into 
".../profile_default/", then it works fine. 


It seems Sage does not recognize "profile_sage". Is it the same with you or 
is it just me?

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


[sage-support] Re: Sagecell not loading in webpage

2015-06-03 Thread Kwankyu


On Thursday, June 4, 2015 at 3:20:37 AM UTC+9, Andrey Novoseltsev wrote:
>
> On Wednesday, 3 June 2015 02:08:54 UTC-6, Kwankyu wrote:
>>
>> Hi Andrey,
>>
>> I have been using the sagecell in a class in this semester. But from some 
>> weeks ago, the server seems not available. The address I use is
>>
>> https://sagecell.sagemath.org/ 
>> <https://www.google.com/url?q=https%3A%2F%2Fsagecell.sagemath.org%2F&sa=D&sntz=1&usg=AFQjCNGv5xVG0pQTOHa2QVU9-qMMwChKRw>
>>
>> The browser now just says "This webpage is not available". I am located 
>> in Korea. I wonder if this is only happening from here...
>>
>
> What is the IP of sagecell.sagemath.org for you? We have different 
> servers for Europe now, but it is quite a stretch to put Korea there...
>

Hera:~$ host www.google.com
www.google.com has address 216.58.221.4 
www.google.com has IPv6 address 2404:6800:4004:812::2004 
Hera:~$ host sagecell.sagemath.org 
Hera:~$ host sagecell.sagemath.org 
Hera:~$ 

As you see, no result. So I don't know. 

Jason no longer has correct IPython branch in his repository, so I am using 
> mine:
>
> https://github.com/sagemath/sagecell/blob/master/contrib/vm/container_manager.py#L48
> and in general this script is more likely to be up-to-date. I'll add 
> updating the simple instructions to my todo
>

Thank you for the info!

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


[sage-support] Re: Sagecell not loading in webpage

2015-06-03 Thread Kwankyu
Hi Andrey,

I have been using the sagecell in a class in this semester. But from some 
weeks ago, the server seems not available. The address I use is

https://sagecell.sagemath.org/

The browser now just says "This webpage is not available". I am located in 
Korea. I wonder if this is only happening from here...

On the other hand, meanwhile I tried to build my own sagecell server 
following the simple instructions in the sagecell github homepage. But it 
fails with the following message in the final step:

make: *** No rule to make target 
`/home/kwankyu/sagecell/sage/ipython/IPython/html/static//services/kernels/js/kernel.js',
 
needed by `static/wrap.js'. Stop.

Could you indicate possible causes of this failure? Thank you in advance. I 
attached below the instructions I followed.


Kwankyu


mkdir --mode=0700 github
cd github

git clone https://github.com/novoselt/sage.git
pushd sage
git checkout sagecell
git submodule update --init --recursive

./sage -sh <<"EOF"
standard=`sage -standard`
for pkg in build/pkgs/*
do
if [ -d $pkg ]; then
pkg=`basename $pkg`
if echo $standard | grep -q $pkg
then
sage-spkg -f -d $pkg
fi
fi
done
EOF
popd

git clone https://github.com/jasongrout/ipython.git
pushd ipython
git checkout sagecell
git submodule update --init --recursive
popd

git clone https://github.com/jasongrout/matplotlib
pushd matplotlib
git checkout sagecell
git submodule update --init --recursive
popd

git clone https://github.com/sagemath/sagecell.git
pushd sagecell
git submodule update --init --recursive
popd

cd ..
BASEMAP=basemap-1.0.7
wget --progress=dot:mega 
http://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/$BASEMAP/$BASEMAP.tar.gz

### Build Sage. See contrib/vm/install-sagecell-functions. 
### 
### See in particular the functions install_sage and install_sagecell.

MAKE="make -j4"

rm -rf sage
mv github/sage .
echo 'Compiling Sage'
cd sage
export SAGE_KEEP_BUILT_SPKGS=yes
export MAKE="$MAKE"
make start

echo 'Installing sagecell'
./sage -sh -c "easy_install pip"
./sage -i http://boxen.math.washington.edu/home/jason/zeromq-4.0.3.spkg
./sage -i pyzmq
# we need a more recent pyzmq than Sage provides
./sage -sh -c "pip install -U pyzmq"
# We need IPython stuff not present in spkg.
pushd local/lib/python/site-packages
rm -rf IPython*
rm -rf ipython*
popd
mv ../github/ipython .
pushd ipython
../sage setup.py develop
popd
# we need a cutting-edge matplotlib as well for the new interactive features
mv ../github/matplotlib .
pushd matplotlib
../sage setup.py install
popd
./sage -sh -c "easy_install ecdsa"
./sage -sh -c "easy_install paramiko"
./sage -sh -c "easy_install sockjs-tornado"
./sage -sh -c "easy_install lockfile"

mv ../github/sagecell .
cd sagecell/static
ln -s ../../local/share/jmol .
cd ..
../sage -sh -c "make -B"   





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


Re: [sage-support] Is Sage help system available in sage-cell?

2014-07-23 Thread Kwankyu
Thanks.

sage-cell is great, but lack of ready access to help feels sore...

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


[sage-support] Is Sage help system available in sage-cell?

2014-07-23 Thread Kwankyu
Hi,

It seems that no sage help is available in sage-cell. For example

?floor
 
does not work. Is this intended or a missing feature?


Kwankyu

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


[sage-support] Re: A socket problem

2013-11-25 Thread Kwankyu
Fixed. It was really a firewall problem. The university security software 
recognised the connection as an attack. The  IT staff fixed it.

Thanks for all attention!

-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


[sage-support] A socket problem

2013-11-17 Thread Kwankyu
Hi all,

I am experiencing the following problem

--
kwankyu@hades:~$ sage -upgrade
Downloading packages from 'http://www.sagemath.org//spkg'.
Reading package lists...
Traceback (most recent call last):
File "/home/kwankyu/sage/sage-5.12/local/bin/sage-update", line 457, in 

do_update()
...
line = self.fp.readline(_MAXLINE + 1)
File "/home/kwankyu/sage/sage-5.12/local/lib/python/socket.py", line 478, 
in readline
data = self._sock.recv(self._rbufsize)
IOError: [Errno socket error] timed out
Error getting new packages!
--

It seems that the problem is not with Sage, but with my network 
configurations. But I have no idea about what to do to fix this, even where 
to look. The system is Ubuntu server in vmware fusion virtual machine on 
Mac OS X Mavericks. I have exactly the same problem with another Sage 
install on the Mac itself. So I guess the problem is related with the 
network connection configurations of my office, like firewall?

I welcome any help. Thank you in advance.




-- 
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 http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


[sage-support] Re: Unwrapping Magma in Sage notebook

2013-02-12 Thread Kwankyu
By the way, "SetAutoColumns(true)" does not work unfortunately.

-- 
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 http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Unwrapping Magma in Sage notebook

2013-02-12 Thread Kwankyu
I am using magma in the Sage notebook using the magma mode. All outputs are 
wrapped around certain column, I think, unnecessarily. How can I set the 
outputs unwrapped in the output box?

Thanks for your attention.

-- 
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 http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Invalid expiration date of Sage's self-signed certificate

2012-11-30 Thread Kwankyu
It is Ubuntu server.

Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-33-generic-pae i686)


Kwankyu

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Invalid expiration date of Sage's self-signed certificate

2012-11-29 Thread Kwankyu
Thanks Dima.

There is also a related issue. The Sage notebook generates 512 bits rsa 
private key by default, at least on my system. This key is considered weak 
by the latest Chrome, and it does not accept the certificate containing the 
weak key. Using 1024 bits rsa key, I succeeded to make Chrom to accept the 
self-signed certificate.


Kwankyu

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Re: Invalid expiration date of Sage's self-signed certificate

2012-11-29 Thread Kwankyu
In the meantime, I investigated this issue a bit more. The root of the 
problem is the too large value of expiration_days ="1" in 
".sage/notebook/cert.cfg", which is automatically generated in the 
notebook.setup() command. I tried to change the value like 8999. Then the 
generated certificate has valid expiration date like 2037, but the cert.cfg 
file is overwritten by notebook.setup()

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




[sage-support] Invalid expiration date of Sage's self-signed certificate

2012-11-29 Thread Kwankyu
Hi all,

I noticed there is a problem with the Sage's self-signed certificate for my 
own server. See the validity date. Why is it 2004? Thanks for an answer in 
advance. My system is Sage 5.4.1 on Ubuntu Server.

X.509 Certificate Information:
Version: 3
Serial Number (hex): 1f36ede1
Validity:
Not Before: Fri Nov 30 01:43:29 UTC 2012
Not After: Thu Mar 11 19:15:13 UTC 2004
...

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.




Re: [sage-support] Comparison of approximate real numbers

2012-06-12 Thread Kwankyu
Thank you all for the solutions!

Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Comparison of approximate real numbers

2012-06-11 Thread Kwankyu
Hi all,

I am puzzled.

sage: 10.44-10.30==0.14
False

How should I compare them to get True? Suddenly Sage feels very alien to 
me. :-)


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Lexicographic ordering in Sage

2011-07-01 Thread Kwankyu
Hi,

Is this what you want?

sage: P.=PolynomialRing(QQ,order='lex')
sage: S=[x3*x4,x2*x3,x1*x4,x4,x3,x1*x2,x1,x2,1]
sage: S.sort()
sage: S
[1, x4, x3, x3*x4, x2, x2*x3, x1, x1*x4, x1*x2]

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Do we have multiset?

2011-06-25 Thread Kwankyu
Hi,

Dicts do not have methods for multisets. I will wait for Python 2.7 in Sage.


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Do we have multiset?

2011-06-25 Thread Kwankyu
Hi,

Do we have multiset in Sage or Python? I learned that Python 2.7 has Counter 
collection which implements multiset.

If not, is there a simple construct to mimic multiset?


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Need arbitrary Singular term orders

2011-05-20 Thread Kwankyu
Hi Jeff,

There was a bug in the matrix order of Sage. It did not allow negative 
integers in the string representation of a matrix order. That bug is fixed 
in the patch for trac #11316, which I just uploaded.

Sorry for late reply.


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Embedded modules

2011-03-23 Thread Kwankyu
Hi all,

It seems that one of glaring missing features of Sage is "embedded
modules" (this is Magma term, and it refers to submodules of free
modules over affine algebras with Groebner basis machinery). Am I
right? or Is there any ongoing personal or community project to
implement them in Sage?

Without this, I am again forced to get back to Magma for my work.

Thank you for any answer.


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] PyDev with Sage

2010-12-15 Thread Kwankyu
Hi,

I wonder this is well known to Sage users. If you want to use PyDev
(Eclipse) with Sage,
you can simply run Eclipse within the shell provided by "sage -sh"
and, in Eclipse, configure to use "sage-python" as python interpreter.
Then other configurations are automatic.

I just wanted to share this happy news. ^^

Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Confused about rmul and lmul

2010-12-13 Thread Kwankyu
I wrote a patch according to your suggestion in

http://trac.sagemath.org/sage_trac/ticket/10473

Thank you.

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Confused about rmul and lmul

2010-12-10 Thread Kwankyu
Hi,

Below is a passage in the Reference manual on the coercion model:

If R is the base of S (as in the first example), simply implement
_rmul_ and/or _lmul_ on the Elements of S. In this case r * s gets
handled as s._rmul_(r) and s * r as s._lmul_(r). The argument to
_rmul_ and _lmul_ are guaranteed to be Elements of the base of S (with
coercion happening beforehand if necessary).

The second sentence seems wrong. "rmul" and "lmul" seems reversed. Am
I right? or am I confused? At least, the following docs are
inconsistent with the sentence.

sage: r=1/2; parent(r)
Rational Field
sage: P.=QQ[x]
sage: s=1/2*x;parent(s)
Univariate Polynomial Ring in x over Rational Field
sage: s._rmul_?
...
Definition: s._rmul_(self, right)
Docstring:
File: sage/rings/polynomial/polynomial_rational_flint.pyx
(starting at
line 933)

   Returns self * right, where right is a rational number.

...
sage: s._lmul_?
...
Definition: s._lmul_(self, right)
Docstring:
File: sage/rings/polynomial/polynomial_rational_flint.pyx
(starting at
line 913)

   Returns right times self, where right is a rational number.


-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: On .inputrc

2010-11-18 Thread Kwankyu
Thank you!!!

Perhaps Sage should advertise this somewhere...


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] On .inputrc

2010-11-17 Thread Kwankyu
Hi,

If I put the following line

"\C-k": kill-whole-line

into "~/.inputrc", Sage does not recognize it, that is, ctrl-k always
does "kill-line" On the other hand, in IPython invoked by "sage -
ipython", ctril-k does "kill-whole-line" as expected.

Why is it so? Does Sage set keys in its own way?


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Getting a mirror image of a matrix

2010-07-07 Thread Kwankyu
Hi Nathann and Johan,

Thank you for the tips.

Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: why does constructing this ring take forever?

2010-07-07 Thread Kwankyu
It's worse. Ctrl-C does not work if you try when you got sick of
waiting.

Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Getting a mirror image of a matrix

2010-07-07 Thread Kwankyu
Hi,

Does Sage have a command to get the mirror image matrix

[3,2,1]
[6,5,4]

from the matrix

[1,2,3]
[4,5,6]

?  It seems not... Then is there a simple trick to do that? Of course,
I can do it in a long way...but... Thank you in advance.


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] n(...) bug

2010-04-05 Thread Kwankyu
Hi All,

The following is a bug. Isn't it?

sage: f=sqrt(pi)^-1*exp(-x^2/2); f
e^(-1/2*x^2)/sqrt(pi)
sage: g=integral(f,(x,0,2)); g
1/2*sqrt(2)*erf(sqrt(2))
sage: n(g)
Traceback (most recent call last):
...
TypeError: cannot evaluate symbolic expression numerically
sage: h=1/2*sqrt(2)*erf(sqrt(2))
sage: n(h)
0.674933236039321

Apparently, there is no difference between g and h. Perhaps internal
representations are different...

Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

To unsubscribe, reply using "remove me" as the subject.


[sage-support] Re: Xelatex and Sage notebook

2010-03-09 Thread Kwankyu
Hi Dan,

I worked on this. Would you review Trac 8486?

http://trac.sagemath.org/sage_trac/ticket/8486

Thank you in advance.


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Xelatex and Sage notebook

2010-03-07 Thread Kwankyu
Hi,

On Mar 8, 1:01 am, Andrzej Giniewicz  wrote:
> > And what about LuaTeX? I think that it is better to keep "normal"
> > latex (which is usually pdflatex in dvi mode), pdflatex and add other
> > TeX's as option.
>
> I'd vote for LuaTeX instead of XeTeX, it's lot more compatible, iirc
> only 2 options from microtype package do not work with it and it's
> soft failure that really don't stop compilation (package is aware of
> luatex and can check for it). It too support utf8 formatted documents
> and OpenType fonts I think and is "next pdfTeX", so probably better of
> two.

I don't have experience in LuaTeX. Anyway my suggestion is to let a
user to select the latex engine used in Sage.

> I would use %latex if there was way to hide it without
> using %hide that's visible in cell, for example when it would work
> like TinyMCE edited text cells with double-click to edit or similar.
> Then it would be sweet to embed TeX in notebook, making it look nice
> especially in published worksheets.
>
> Andrzej.

This is a good idea.


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Xelatex and Sage notebook

2010-03-07 Thread Kwankyu
Hi Dan,

Thank you for your positive opinion.

Xelatex is THE solution for documents with math and Hangul (or any non-
English scripts).

Perhaps we need to retain only %latex, and add a way to change the
`active' latex engine from latex or pdflatex to xelatex. Currently it
seems Sage automatically choose either latex or pdflatex (with
friends) whichever is installed in the user's system. As xelatex
contains pdflatex in functionality (as far as I know), I think Sage
may default to xelatex if both are installed.

I also think there is not much to modify in the Sage code to implement
the above.

This is just another step toward Sage's internationalization.


Kwankyu
Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Xelatex and Sage notebook

2010-03-06 Thread Kwankyu
I think I want, e.g., the following works in Sage notebook.

%xelatex
실수 $x$에 대해서 다음이 성립한다.
\[
\sqrt{x^2}=|x|
\]


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Xelatex and Sage notebook

2010-03-06 Thread Kwankyu
Hi,

Sage notebook provides a useful remote latex system. For international
users, how about providing xelatex as one of the options of latex
engine. Perhaps Sage may opt for xelatex if present rather than
pdflatex.

I want some expert who knows internals to tell if this suggestion is
reasonable and an implementation might not be difficult currently.


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


  1   2   >