代数几何

曲线上的点计数

在Sage中如何计算有限域上椭圆曲线上的点?

在素数有限域上,包括婴儿步巨步法和SEA(Schoof-Elkies-Atkin)算法(由Christophe Doche和Sylvain Duquesne在PARI中实现)。参考手册中的一个例子:

sage: E = EllipticCurve(GF(10007),[1,2,3,4,5])
sage: E.cardinality()
10076

命令 E.points() 将返回有理点的实际列表。

如何计算有限域上平面曲线上的点?这个 rational_points 命令通过简单的枚举算法生成点。以下是语法示例:

sage: x,y,z = PolynomialRing(GF(5), 3, 'xyz').gens()
sage: C = Curve(y^2*z^7 - x^9 - x*z^8); C
Projective Plane Curve over Finite Field of size 5 defined by -x^9 + y^2*z^7 - x*z^8
sage: C.rational_points()
[(0 : 0 : 1), (0 : 1 : 0), (2 : 2 : 1), (2 : 3 : 1), (3 : 1 : 1), (3 : 4 : 1)]
sage: C.rational_points(algorithm="bn")
[(0 : 0 : 1), (0 : 1 : 0), (2 : 2 : 1), (2 : 3 : 1), (3 : 1 : 1), (3 : 4 : 1)]

选择权 algorithm="bn 使用Sage的单一接口并调用 brnoeth 包裹。

这是另一个使用Sage的例子 rational_points 适用于克莱恩的四次曲线 \(GF(8)\) .

sage: x, y, z = PolynomialRing(GF(8,'a'), 3, 'xyz').gens()
sage: f = x^3*y+y^3*z+x*z^3
sage: C = Curve(f); C
Projective Plane Curve over Finite Field in a of size 2^3 defined by x^3*y + y^3*z + x*z^3
sage: C.rational_points()
[(0 : 0 : 1),
 (0 : 1 : 0),
 (1 : 0 : 0),
 (1 : a : 1),
 (1 : a^2 : 1),
 (1 : a^2 + a : 1),
 (a : 1 : 1),
 (a : a^2 : 1),
 (a : a^2 + 1 : 1),
 (a + 1 : a + 1 : 1),
 (a + 1 : a^2 : 1),
 (a + 1 : a^2 + a + 1 : 1),
 (a^2 : 1 : 1),
 (a^2 : a^2 + a : 1),
 (a^2 : a^2 + a + 1 : 1),
 (a^2 + 1 : a + 1 : 1),
 (a^2 + 1 : a^2 + 1 : 1),
 (a^2 + 1 : a^2 + a : 1),
 (a^2 + a : 1 : 1),
 (a^2 + a : a : 1),
 (a^2 + a : a + 1 : 1),
 (a^2 + a + 1 : a : 1),
 (a^2 + a + 1 : a^2 + 1 : 1),
 (a^2 + a + 1 : a^2 + a + 1 : 1)]

其他方法

  • 对于平面曲线,可以使用单数的 closed_points 命令。输入是消失的理想 \(I\) 曲线的 \(X\) 在一圈 \(2\) 变量 \(F[x,y]\) . 这个 closed_points 命令返回一个素理想的列表(每个都是一个Gröbner基),对应于 \(V(I)\) . 下面是一个例子:

    sage: singular_console()
                         SINGULAR                             /  Development
     A Computer Algebra System for Polynomial Computations   /   version 3-0-1
                                                           0<
         by: G.-M. Greuel, G. Pfister, H. Schoenemann        \   October 2005
    FB Mathematik der Universitaet, D-67653 Kaiserslautern    \
    // ** executing /home/wdj/sagefiles/sage-0.9.4/local/LIB/.singularrc
    > LIB "brnoeth.lib";
    > ring s = 2,(x,y),lp;
    > ideal I = x4+x,y4+y;
    > list L = closed_points(I);
    > L;
    [1]:
       _[1] = y
       _[2] = x
    [2]:
       _[1] = y
       _[2] = x+1
    [3]:
       _[1] = y
       _[2] = x2+x+1
    [4]:
       _[1] = y+1
       _[2] = x
    [5]:
       _[1] = y+1
       _[2] = x+1
    [6]:
       _[1] = y+1
       _[2] = x2+x+1
    [7]:
       _[1] = y2+y+1
       _[2] = x+1
    [8]:
       _[1] = y2+y+1
       _[2] = x
    [9]:
       _[1] = y2+y+1
       _[2] = x+y
    [10]:
       _[1] = y2+y+1
       _[2] = x+y+1
    > Auf Wiedersehen.
    
    sage: singular.lib("brnoeth.lib")
    sage: s = singular.ring(2,'(x,y)','lp')
    sage: I = singular.ideal('[x^4+x, y^4+y]')
    sage: L = singular.closed_points(I)
    sage: # Here you have all the points :
    sage: print(L)
    [1]:
       _[1]=y+1  # 32-bit
       _[2]=x+1  # 32-bit
       _[1]=y    # 64-bit
       _[2]=x    # 64-bit
    ...
    
  • 另一种计算有理点的方法是使用奇异点 NSplaces 命令。这是克莱恩四次曲线 \(GF(8)\) 这样做:

    sage: singular.LIB("brnoeth.lib")
    sage: s = singular.ring(2,'(x,y)','lp')
    ...
    sage: f = singular.poly('x3y+y3+x')
    ...
    sage: klein1 = f.Adj_div(); print(klein1)
    [1]:
       [1]:
          //   coefficients: ZZ/2
    //   number of vars : 2
    //        block   1 : ordering lp
    //                  : names    x y
    //        block   2 : ordering C
    ...
    sage: # define a curve X = {f = 0} over GF(2)
    sage: klein2 = singular.NSplaces(3,klein1)
    sage: print(singular.eval('extcurve(3,%s)'%klein2.name()))
    Total number of rational places : NrRatPl = 23
    ...
    sage: klein3 = singular.extcurve(3, klein2)
    

    上面我们定义了一条曲线 \(X = \{{f = 0\}}\) 结束 \(GF(8)\) 单数形式。

    sage: print(klein1)
    [1]:
       [1]:
          //   coefficients: ZZ/2
    //   number of vars : 2
    //        block   1 : ordering lp
    //                  : names    x y
    //        block   2 : ordering C
       [2]:
          //   coefficients: ZZ/2
    //   number of vars : 3
    //        block   1 : ordering lp
    //                  : names    x y z
    //        block   2 : ordering C
    [2]:
       4,3
    [3]:
       [1]:
          1,1
       [2]:
          1,2
    [4]:
       0
    [5]:
       [1]:
          [1]:
             //   coefficients: ZZ/2
    //   number of vars : 3
    //        block   1 : ordering ls
    //                  : names    x y t
    //        block   2 : ordering C
          [2]:
             1,1
    sage: print(klein1[3])
    [1]:
       1,1
    [2]:
       1,2
    

    为了学位 \(3\)

    sage: print(klein2[3])
    [1]:
       1,1
    [2]:
       1,2
    [3]:
       3,1
    [4]:
       3,2
    [5]:
       3,3
    [6]:
       3,4
    [7]:
       3,5
    [8]:
       3,6
    [9]:
       3,7
    

    下面的每个点是一对:(度,点索引号)。

    sage: print(klein3[3])
    [1]:
       1,1
    [2]:
       1,2
    [3]:
       3,1
    [4]:
       3,2
    [5]:
       3,3
    [6]:
       3,4
    [7]:
       3,5
    [8]:
       3,6
    [9]:
       3,7
    

    为了得到 \(X(GF(8))\)

    sage: R = klein3[1][5]
    sage: R.set_ring()
    sage: singular("POINTS;")
    [1]:
       [1]:
          0
       [2]:
          1
       [3]:
          0
    [2]:
       [1]:
          1
       [2]:
          0
       [3]:
          0
    ...
    

    加上其他21个(略)。总共有 \(23\) 理性点。

使用奇异的Riemann-Roch空间

求除数的Riemann-Roch空间的基 \(D\) 在田野上的曲线上 \(F\) ,可以用Sage的包装 riemann_roch_basis Singular实现的Brill-Noether算法。请注意,此包装器当前仅在 \(F\) 是素数和除数 \(D\) 支持有理点。下面是如何使用的示例 riemann_roch_basis 以及如何使用单数来帮助理解包装器的工作原理。

  • 使用 riemann_roch_basis

    sage: x, y, z = PolynomialRing(GF(5), 3, 'xyz').gens()
    sage: f = x^7 + y^7 + z^7
    sage: X = Curve(f); pts = X.rational_points()
    sage: D = X.divisor([ (3, pts[0]), (-1,pts[1]), (10, pts[5]) ])
    sage: X.riemann_roch_basis(D)
    [(-x - 2*y)/(-2*x - 2*y), (-x + z)/(x + y)]
    
  • Using Singular's BrillNoether command (for details see the section Brill-Noether in the Singular online documentation (http://www.singular.uni-kl.de/Manual/html/sing_960.htm and the paper {CF}):

    sage: singular.LIB('brnoeth.lib')
    sage: _ = singular.ring(5,'(x,y)','lp')
    sage: print(singular.eval("list X = Adj_div(-x5+y2+x);"))
    Computing affine singular points ...
    Computing all points at infinity ...
    Computing affine singular places ...
    Computing singular places at infinity ...
    Computing non-singular places at infinity ...
    Adjunction divisor computed successfully
    <BLANKLINE>
    The genus of the curve is 2
    sage: print(singular.eval("X = NSplaces(1,X);"))
    Computing non-singular affine places of degree 1 ...
    sage: print(singular("X[3];"))
    [1]:
       1,1
    [2]:
       1,2
    [3]:
       1,3
    [4]:
       1,4
    [5]:
       1,5
    [6]:
       1,6
    

    上表中每对的第一个整数是度数 d 有一点。第二个整数是环X的列表点中该点的索引 [5] [d] [1] . 请注意,后一个列表的顺序在每次运行算法时都是不同的,例如。 11 在上面的列表中指的是每次不同的有理点。除数是通过定义一个列表得到的 G 与X长度相同的整数 [3] 如果 k -X的第个条目 [3] 是 di 然后 k -第条入口 G 是除数的重数 i -环X的点列表中的第个点 [5] [d] [1] . 让我们继续定义一个12度的“随机”除数,并计算其Riemann-Roch空间的基:

    sage: singular.eval("intvec G = 4,4,4,0,0,0;")
    ''
    sage: singular.eval("def R = X[1][2];")
    ''
    sage: singular.eval("setring R;")
    ''
    sage: print(singular.eval("list LG = BrillNoether(G,X);"))
    Forms of degree 6 :
    28
    <BLANKLINE>
    Vector basis successfully computed
    <BLANKLINE>
    

AG代码

Sage可以计算AG码 \(C=C_X(D,E)\) 通过调用奇异的brillinoether来计算Riemann-Roch空间的基 \(L(D)=L_X(D)\) . 除了曲线 \(X\) 除数呢 \(D\) ,还必须指定求值除数 \(E\) .

请注意,自包装器之后,此部分尚未更新 riemann_roch_basis 已修复。关于如何正确定义单数除数的除数,请参见上文 BrillNoether 命令。

下面是一个例子,它计算一个相关的AG代码的生成器矩阵。这次我们用单数的 AGCode_L 命令。

sage: singular.LIB('brnoeth.lib')
sage: singular.eval("ring s = 2,(x,y),lp;")
''
sage: print(singular.eval("list HC = Adj_div(x3+y2+y);"))
Computing affine singular points ...
Computing all points at infinity ...
Computing affine singular places ...
Computing singular places at infinity ...
Computing non-singular places at infinity ...
Adjunction divisor computed successfully
<BLANKLINE>
The genus of the curve is 1
sage: print(singular.eval("list HC1 = NSplaces(1..2,HC);"))
Computing non-singular affine places of degree 1 ...
Computing non-singular affine places of degree 2 ...
sage: print(singular.eval("HC = extcurve(2,HC1);"))
Total number of rational places : NrRatPl = 9

我们将以下设置为 junk 放弃输出:

sage: junk = singular.eval("intvec G = 5;")      # the rational divisor G = 5*HC[3][1]
sage: junk = singular.eval("def R = HC[1][2];")
sage: singular.eval("setring R;")
''

向量 \(G\) 表示除数“无穷远点的5倍”。

接下来,我们计算Riemann-Roch空间。

sage: print(singular.eval("BrillNoether(G,HC);"))
Forms of degree 3 :
10
<BLANKLINE>
Vector basis successfully computed
<BLANKLINE>
[1]:
   _[1]=x
   _[2]=z
[2]:
   _[1]=y
   _[2]=z
[3]:
   _[1]=1
   _[2]=1
[4]:
   _[1]=y2+yz
   _[2]=xz
[5]:
   _[1]=y3+y2z
   _[2]=x2z

这是Riemann-Roch空间的基础,其中每对函数代表商(第一个函数除以第二个函数)。这些基本元素中的每一个都在特定的点上求值,以构造代码的生成器矩阵。接下来我们构造点。

sage: singular.eval("def R = HC[1][5];")
'// ** redefining R **'
sage: singular.eval("setring R;")
''
sage: print(singular.eval("POINTS;"))
[1]:
   [1]:
      0
   [2]:
      1
   [3]:
      0
[2]:
   [1]:
      0
   [2]:
      1
   [3]:
      1
[3]:
   [1]:
      0
   [2]:
      0
   [3]:
      1
[4]:
   [1]:
      (a+1)
   [2]:
      (a)
   [3]:
      1
...

\(5\) 更多,总共 \(9\) 曲线上的有理点。我们定义“评估除数” \(D\) 使用这些点的子集(除第一个以外的所有点):

sage: singular.eval("def ER = HC[1][4];")
''
sage: singular.eval("setring ER;")
''
sage: # D = sum of the rational places no. 2..9 over F_4
sage: singular.eval("intvec D = 2..9;")
''
sage: # let us construct the corresponding evaluation AG code :
sage: print(singular.eval("matrix C = AGcode_L(G,D,HC);"))
Forms of degree 3 :
10
<BLANKLINE>
Vector basis successfully computed
<BLANKLINE>
sage: # here is a linear code of type [8,5,> = 3] over F_4
sage: print(singular.eval("print(C);"))
0,0,(a+1),(a),  1,  1,    (a),  (a+1),
1,0,(a),  (a+1),(a),(a+1),(a),  (a+1),
1,1,1,    1,    1,  1,    1,    1,
0,0,(a),  (a+1),1,  1,    (a+1),(a),
0,0,1,    1,    (a),(a+1),(a+1),(a)

最后,这是我们想要的生成器矩阵,其中 a 表示度的字段扩展的生成器 \(2\) 在基地上空 \(GF(2)\) .

这个可以“包装”吗?