Re: [sage-devel] Re: stopping cypari2, pari-jupyter and pplpy maintenance

2024-03-12 Thread Vincent Delecroix
Thanks Matthias. You are now an owner on PyPI.

On Tue, 12 Mar 2024 at 22:59, Matthias Koeppe  wrote:
>
> Thanks, Vincent, for all your work on these projects in the past, and for 
> letting us know about your decision.
> As https://github.com/sagemath/cypari2/issues/131 indicates (and previously 
> raised in 
> https://groups.google.com/g/sage-devel/c/JBFbtUNhqNU/m/2PvzZbS8AQAJ), we will 
> need to document development workflow, governance, release management process 
> for these projects (and others in the sagemath org).
>
> You can add me on PyPI for these projects, then I'll use the same deployment 
> key that the other sagemath projects use for pushing releases to PyPI.
> https://github.com/sagemath/cypari2/pull/141 is already prepared for this, 
> and I can add the same for the other projects.
>
> Matthias
>
> On Tuesday, March 12, 2024 at 10:44:08 AM UTC-7 Vincent Delecroix wrote:
>>
>> Dear all,
>>
>> I used to be the maintainer of cypari2, pari-jupyter and pplpy. I will
>> not work anymore on any of them from now on. The three projects are
>> under the sagemath organization on github so that any administrator
>> can take over. Concerning the access to PyPI to push releases I can
>> promote anybody who wants access (do we have a policy for this?).
>>
>> Best
>> Vincent
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/f174964b-692c-498a-be21-45a0b192e2f4n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAA%3Dd3ZL4-gStcg7%3DmHSpPxY%2BhABBtaXDFB4SZXORuT0F_Q%40mail.gmail.com.


Re: [sage-devel] Re: Help and Advice | Arithmetic of Jacobians in the Split/Real Model is Broken

2024-03-12 Thread David Roe
There is also this old trac ticket
 about implementing fast
arithmetic in genus 2 Jacobians, which never made it into Sage.  I've CCed
Mike Jabobson, who worked on it.
David


On Tue, Mar 12, 2024 at 12:10 PM Giacomo Pope  wrote:

> Thank you for linking this and I agree this is a great way to
> cross-compare the work we have been doing. I am not an expert in this area
> so I am not sure I should do a full review but I'm happy to look over it if
> this helps.
>
> As a small update on this work, I now have
>
> class HyperellipticCurveSmoothModel(AlgebraicScheme_subscheme_toric)
>
> So this new class builds on top of AlgebraicScheme_subscheme_toric and the
> smooth projective model is built using a toric variety. The points on the
> curve are currently SchemeMorphism_point_toric_field, potentially I will
> need to make a child class of these if methods on the points themselves are
> required.
>
> With the working arithmetic and this new inheritance my work is now going
> to be the rather slow and painful rewrite of all hyperelliptic methods from
> the current implementation to ensure everything works on the smooth degree
> model.
>
> On Monday, March 11, 2024 at 6:23:38 AM UTC Kwankyu Lee wrote:
>
>> On Friday, March 8, 2024 at 7:37:04 PM UTC+9 Giacomo Pope wrote:
>>
>> As a small update, the repository now contains code to
>>
>> - perform arithmetic for
>>   - the imaginary model (ramified, one point at infinity) for all cases
>>   - the real model (split, two points at infinity) for all cases
>>   - the real model (inert, zero points at infinity) for even genus
>>   Which allows us to do "as much" as Magma does for Jacobians of
>> hyperellipticc curves from the perspective of arithmetic.
>>
>> My current "test" for the arithmetic is that D - D = 0 for all cases,
>> that jacobian_order * D = zero and that order_from_multiple(D) works. If
>> people have other ideas for tests, please let me know. Of course at the
>> moment these tests are over finite fields but you can reasonable use other
>> fields (as Sabrina's message shows) but I am less sure about how to do
>> randomised testing here.
>>
>>
>> I just set https://github.com/sagemath/sage/pull/35467 to "needs review"
>> status. The PR implements Jacobian arithmetic for general projective curves.
>>
>> It is slow compared with Jacobian arithmetic using Mumford
>> representation, but could be used to crosscheck the computations.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/7f646c6d-bd0b-452d-a730-30144415f590n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAChs6_njyXKS4797cJxVpFsBdVdGt%2B7XFPNXyDEEfK%3DAPks%2BFA%40mail.gmail.com.


[sage-devel] Re: stopping cypari2, pari-jupyter and pplpy maintenance

2024-03-12 Thread Matthias Koeppe
Thanks, Vincent, for all your work on these projects in the past, and for 
letting us know about your decision.
As https://github.com/sagemath/cypari2/issues/131 indicates (and previously 
raised in 
https://groups.google.com/g/sage-devel/c/JBFbtUNhqNU/m/2PvzZbS8AQAJ), we 
will need to document development workflow, governance, release management 
process for these projects (and others in the sagemath org).

You can add me on PyPI for these projects, then I'll use the same 
deployment key that the other sagemath projects use for pushing releases to 
PyPI.
https://github.com/sagemath/cypari2/pull/141 is already prepared for this, 
and I can add the same for the other projects.

Matthias

On Tuesday, March 12, 2024 at 10:44:08 AM UTC-7 Vincent Delecroix wrote:

> Dear all,
>
> I used to be the maintainer of cypari2, pari-jupyter and pplpy. I will
> not work anymore on any of them from now on. The three projects are
> under the sagemath organization on github so that any administrator
> can take over. Concerning the access to PyPI to push releases I can
> promote anybody who wants access (do we have a policy for this?).
>
> Best
> Vincent
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/f174964b-692c-498a-be21-45a0b192e2f4n%40googlegroups.com.


Re: [sage-devel] stopping cypari2, pari-jupyter and pplpy maintenance

2024-03-12 Thread Vincent Delecroix
Hi William,

Mostly time. Some choices had to be made on where to concentrate my
energy. I do not find it particularly rewarding to work on these
projects. The lack of support, good atmosphere and appreciation did
not help me trying to find more time working on them.

Best
Vincent

On Tue, 12 Mar 2024 at 18:51, William Stein  wrote:
>
> Hi Vincent,
>
> To help whoever takes over, do you have any comments about *why* you
> will not work on any of these projects?  Is it just lack of time and you need
> to focus on something else, or is there something fundamentally annoying
> about the direction of these projects?  Thanks for any insight to help guide
> whoever takes over.
>
>  -- William
>
> On Tue, Mar 12, 2024 at 10:44 AM Vincent Delecroix 
> <20100.delecr...@gmail.com> wrote:
>>
>> Dear all,
>>
>> I used to be the maintainer of cypari2, pari-jupyter and pplpy. I will
>> not work anymore on any of them from now on. The three projects are
>> under the sagemath organization on github so that any administrator
>> can take over. Concerning the access to PyPI to push releases I can
>> promote anybody who wants access (do we have a policy for this?).
>>
>> Best
>> Vincent
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-devel+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-devel/CAGEwAA%3DBxVFYEore941XQfF%3DLVV3cf7d-nJ1YUAADC3sYsKjFw%40mail.gmail.com.
>
>
>
> --
> William (http://wstein.org)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/CACLE5GAHLRU0e3cTQBx1WVxs_KrsbpMVzv0zyX_pOog1_JiOpw%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAA%3DQwt_Q%3D0coaCPcmwwCwsdk5eUm%3DPvbNWbkAAFiXAzQsw%40mail.gmail.com.


Re: [sage-devel] stopping cypari2, pari-jupyter and pplpy maintenance

2024-03-12 Thread William Stein
Hi Vincent,

To help whoever takes over, do you have any comments about *why* you
will not work on any of these projects?  Is it just lack of time and you
need
to focus on something else, or is there something fundamentally annoying
about the direction of these projects?  Thanks for any insight to help guide
whoever takes over.

 -- William

On Tue, Mar 12, 2024 at 10:44 AM Vincent Delecroix <
20100.delecr...@gmail.com> wrote:

> Dear all,
>
> I used to be the maintainer of cypari2, pari-jupyter and pplpy. I will
> not work anymore on any of them from now on. The three projects are
> under the sagemath organization on github so that any administrator
> can take over. Concerning the access to PyPI to push releases I can
> promote anybody who wants access (do we have a policy for this?).
>
> Best
> Vincent
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/CAGEwAA%3DBxVFYEore941XQfF%3DLVV3cf7d-nJ1YUAADC3sYsKjFw%40mail.gmail.com
> .
>


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

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CACLE5GAHLRU0e3cTQBx1WVxs_KrsbpMVzv0zyX_pOog1_JiOpw%40mail.gmail.com.


[sage-devel] stopping cypari2, pari-jupyter and pplpy maintenance

2024-03-12 Thread Vincent Delecroix
Dear all,

I used to be the maintainer of cypari2, pari-jupyter and pplpy. I will
not work anymore on any of them from now on. The three projects are
under the sagemath organization on github so that any administrator
can take over. Concerning the access to PyPI to push releases I can
promote anybody who wants access (do we have a policy for this?).

Best
Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAA%3DBxVFYEore941XQfF%3DLVV3cf7d-nJ1YUAADC3sYsKjFw%40mail.gmail.com.


Re: [sage-devel] Re: Help and Advice | Arithmetic of Jacobians in the Split/Real Model is Broken

2024-03-12 Thread Giacomo Pope
Thank you for linking this and I agree this is a great way to cross-compare 
the work we have been doing. I am not an expert in this area so I am not 
sure I should do a full review but I'm happy to look over it if this helps.

As a small update on this work, I now have 

class HyperellipticCurveSmoothModel(AlgebraicScheme_subscheme_toric)

So this new class builds on top of AlgebraicScheme_subscheme_toric and the 
smooth projective model is built using a toric variety. The points on the 
curve are currently SchemeMorphism_point_toric_field, potentially I will 
need to make a child class of these if methods on the points themselves are 
required.

With the working arithmetic and this new inheritance my work is now going 
to be the rather slow and painful rewrite of all hyperelliptic methods from 
the current implementation to ensure everything works on the smooth degree 
model.

On Monday, March 11, 2024 at 6:23:38 AM UTC Kwankyu Lee wrote:

> On Friday, March 8, 2024 at 7:37:04 PM UTC+9 Giacomo Pope wrote:
>
> As a small update, the repository now contains code to
>
> - perform arithmetic for
>   - the imaginary model (ramified, one point at infinity) for all cases
>   - the real model (split, two points at infinity) for all cases
>   - the real model (inert, zero points at infinity) for even genus
>   Which allows us to do "as much" as Magma does for Jacobians of 
> hyperellipticc curves from the perspective of arithmetic. 
>
> My current "test" for the arithmetic is that D - D = 0 for all cases, that 
> jacobian_order * D = zero and that order_from_multiple(D) works. If people 
> have other ideas for tests, please let me know. Of course at the moment 
> these tests are over finite fields but you can reasonable use other fields 
> (as Sabrina's message shows) but I am less sure about how to do randomised 
> testing here.
>
>
> I just set https://github.com/sagemath/sage/pull/35467 to "needs review" 
> status. The PR implements Jacobian arithmetic for general projective curves.
>
> It is slow compared with Jacobian arithmetic using Mumford representation, 
> but could be used to crosscheck the computations.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/7f646c6d-bd0b-452d-a730-30144415f590n%40googlegroups.com.


Re: [sage-devel] VOTE: use the smooth model instead of the plane projective model for hyperelliptic curves

2024-03-12 Thread Giacomo Pope
I'm (somewhat) aware of bugs which come from poor treatment of weighted 
polynomial rings. In my mind this has two solutions.

1) Someone who is an expert in toric varieties has another look through the 
current code, adds more extensive testing and methods for computations in 
the area
2) We work with what we currently have for the hyperelliptic curve case and 
when something appears to be broken we attempt to fix it.

I am in no position to do 1) as I do not know enough. As a result I will 
start one 2) but I am happy for more work to be done in parallel?

My current experimentation I believe we want to define the curve in the 
following way

```
sage: def projective_model(f, h, g):
: """
: Compute the weighted projective model (1 : g + 1 : 1)
: """
: k = f.base_ring()
: T = toric_varieties.WP([1, g + 1, 1], base_ring=k, names="X, Y, 
Z")
: (X, Y, Z) = T.gens()
:
: if h.is_zero():
: d = f.degree()
: F = sum(f[i] * X**i * Z**(d - i) for i in range(d + 1))
: G = Y**2 - F
: else:
: d = max(h.degree(), (f.degree() / 2).ceil())
: H = sum(h[i] * X**i * Z**(d - i) for i in range(d + 1))
: F = sum(f[i] * X**i * Z**(2*d - i) for i in range(2*d + 1))
: G = Y**2 + H*Y - F
:
: return T.subscheme([G])
:
sage: f = x^7 + 1
sage: h = x
sage: g = HyperellipticCurve(f, h).genus() # simply make sure this is a 
"good" choice of f, h for this field
sage: g
3
sage: projective_model(f, h, g)
Closed subscheme of 2-d toric variety covered by 3 affine patches defined 
by:
  -X^7*Z - Z^8 + X*Y*Z^3 + Y^2
```

Which suggests to me that the generic class for hyperelliptic curves is a 
child class HyperellipticCurve_generic(AlgebraicScheme_subscheme_toric) and 
we start building this from here.
On Monday, March 11, 2024 at 11:17:02 PM UTC Dima Pasechnik wrote:

> Sage's treatment of weighted polynomial rings is  buggy, cf. e.g.
> https://github.com/sagemath/sage/issues/37167
>
> this is something that should be addressed, one way or another
>
>
>
> On Mon, Mar 11, 2024 at 9:31 PM Giacomo Pope  wrote:
>
>> Dear all,
>>
>> *Summary*
>>
>> To better support arithmetic on Jacobians and have a more natural 
>> implementation of hyperelliptic curves, we should implement them as toric 
>> varieties with a weighted polynomial ring (1 : 3 : 1) instead of plane 
>> projective curves.
>>
>> *Yes / No*
>>
>> *Discussion*
>>
>> I am currently hoping to improve hyperelliptic curves and Jacobians of 
>> hyperelliptic curve in Sage. One big motivation for me is to try and get 
>> our computations with similar coverage to what exists in Magma to allow 
>> more academics in the field to benefit from the open-source community of 
>> Sage. The first main goal of this is for full featured arithmetic on the 
>> Jacobians of hyperelliptic curves.
>>
>> The big blocker for me currently is that currently Sage implements 
>> hyperelliptic curves in the plane projective model. This is not an issue 
>> for the current methods, and it also allows for sensible arithmetic on 
>> Jacobians when there is one point at infinity. However, the more natural 
>> model I believe is the smooth model which uses a weighted polynomial 
>> (weights of (1 : 3 : 1)). For example, this would allow us to have a 
>> natural way of performing arithmetic on the real model of hyperelliptic 
>> curves. Something important for my own research. 
>>
>> I believe in terms of Sage code this means changing the hyperelliptic 
>> curves to be toric varieties rather than projective varieties and will 
>> ultimately lead to a lot of work in rewriting the classes. 
>>
>> This is not unexpected though. For example the docstring of the 
>> `points()` method discusses the possibility of this change in the future: 
>> https://github.com/sagemath/sage/blob/e417e2205be84d6d567b8897527fa6945ad09bdb/src/sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py#L805-L858
>>
>> This is associated with the sage-devel thread: 
>> https://groups.google.com/g/sage-devel/c/eKY85KwFldE which discusses 
>> progress on implementing arithmetic for Jacobians of hyperelliptic curves 
>> where there are 2, 1 (all cases) or 0 (only even genus) points at infinity. 
>> The work being done there uses a weighted polynomial ring to compute on the 
>> smooth model of hyperelliptic curves. 
>>
>> *A note on inheritance*
>>
>> There is currently another hiccup in this transition. The class 
>> EllipticCurve_finite_field is a child of HyperellipticCurve_finite_field 
>> which 
>> seems to have happened at some point in the past when computing lists of 
>> points on the curve. As far as I can tell, this inheritance has no other 
>> used functionality. (Please correct me if I am missing something). I have 
>> shown in https://github.com/sagemath/sage/pull/37595 that this inherited 
>> method is always slower than using the group structure on the elliptic 
>> cu