Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • da13d57
  • /
  • function_fields
  • /
  • places.m
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:aff4dd1e5fcc364f837b6ebb72d4127c31bea920
directory badge
swh:1:dir:f4130a3a4f050cc8385f8d02b7efbcf971586756

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
places.m
intrinsic MDTwoGenerators(x::FldFinElt,y::FldFinElt) -> RngMPolElt, RngMPolElt
{ Assumes x,y are elements of GF(p,n) and return generators of the ideal
  in PolynomialRing(GF(p),2) of bivariate polynomial vanishing at x,y
}
  Fmax := Parent(x);
  assert Fmax eq Parent(y);
  F := PrimeField(Fmax);
  f := MinimalPolynomial(x,F);
  FF<t> := sub<Fmax|x>;
  g := MinimalPolynomial(y,FF);
  // at this point f, and g are generators, however we need to make them elements
  // of the polynomial ring R[u,v];
  R<u,v> := PolynomialRing(F,2);
  f1:=Evaluate(f,u);
  g1:=R!0;
  for i in [0..Degree(g)] do
    ai:=Eltseq(Coefficient(g,i));
    ai := &+ [ai[j]*u^(j-1) : j in [1..#ai]];
    g1:=g1+ai*v^i;
  end for;
  return f1,g1;
end intrinsic;

intrinsic MDPlace(coordinates::[FldFunFracSchElt], values::[FldElt]) -> PlcCrvElt
{ Return the place on the curve corresponding coordinates[i]-value[i]=0, the values
  are allowed to lie in a field extension
}
  assert #coordinates eq 2;
  assert #values eq 2;
  a,b := Explode(values);
  f,g := MDTwoGenerators(a,b);
  // the following doesn't work:
  //   return Place([Evaluate(fi, coordinates) : fi in [f,g]]);
  // because of the error:
  //   Runtime error in 'Place': Elements of argument must be contained in the maximal
  //   finite or infinite equation order.
  f1 := Evaluate(f, coordinates);
  g1 := Evaluate(g, coordinates);
  places := [x : x in Zeros(f1) | Evaluate(g1,x) eq 0];
  assert #places eq 1;
  return places[1];
end intrinsic

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API