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

https://github.com/koffie/mdmagma
22 August 2025, 12:46:07 UTC
  • Code
  • Branches (5)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/heads/patch-1
    • refs/tags/v0.1.0
    • refs/tags/v0.2.0
    • refs/tags/v0.2.1
    • f69d0e06f67b9ac6f57e7d8e6ba3b3d69e650352
    No releases to show
  • 6cabcdb
  • /
  • X_1_n.m
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

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
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:358505457e472fe80f02bbd46cfe086d74ca5650
origin badgedirectory badge Iframe embedding
swh:1:dir:6cabcdbbecaf6447c0138c3e9b1dfeac3ce95f9f
origin badgerevision badge
swh:1:rev:f69d0e06f67b9ac6f57e7d8e6ba3b3d69e650352
origin badgesnapshot badge
swh:1:snp:69a0fcb477f0fe8dbd9256da2f6292c8d8cf7556

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
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: f69d0e06f67b9ac6f57e7d8e6ba3b3d69e650352 authored by Maarten Derickx on 02 November 2020, 22:43:35 UTC
Quickly lists all non cuspidal places up to diamond operators on X_1(N)
Tip revision: f69d0e0
X_1_n.m

function X_1_n(n,base_ring : equation_directory:="models_X1_n")
//Input: n - integer
//       base_ring - a ring
//       equation_directory - directory with files FFFc<n>.txt containing models
//Output: C - a curve
//Returns an algebraic model C of the modular curve X_1(m,n) as a curve over base_ring

    n_str := IntegerToString(n);
    file_name := equation_directory cat "/FFFc" cat n_str cat ".txt";
    data := Read(file_name);

    A<x,y> := AffineSpace(base_ring,2);
    X := eval(data);
    C := Curve(A,X);
    return ProjectiveClosure(C);
end function;

function Functions_xyrsbcF2F3(curve)
    //Input: curve - the modular curve X_1(N) as returned by the function X_1
    //Output: x,y,r,s,b,c,F2,F3 - The modular units as in http://arxiv.org/pdf/1307.5719v1.pdf
    FF := FunctionField(curve);
    x := FF.1;
    y := FF.2;
    r := (x^2*y-x*y+y-1)/x/(x*y-1);
    s := (x*y-y+1)/x/y;
    b := r*s*(r-1);
    c := s*(r-1);
    F3 := b;
    F2 := b/(16*b^2+(1-20*c-8*c^2)*b + c*(c-1)^3);
    return x,y,r,s,b,c,F2,F3;
end function;

function TateNormalForm_bc(E,P);
//Return the b,c of the tate normal form of (E,P) as in equation (2) of http://arxiv.org/pdf/1307.5719v1.pdf
    assert P[3] eq 1;
    x0:=P[1];
    y0:=P[2];

    a1,a2,a3,a4,a6:=Explode(aInvariants(E));
    aa1:=a1;
    aa3:=2*y0+a3+a1*x0;
    aa2:=3*x0+a2;
    aa4:=3*x0^2+2*x0*a2+a4-a1*y0;

    aaa1:=2*aa4/aa3+aa1;
    aaa3:=aa3;
    aaa2:=aa2-(aa4/aa3)^2-aa1*aa4/aa3;


    b:=-aaa2^3/aaa3^2;
    c:=-(aaa1*aaa2-aaa3)/aaa3;
    return [b,c];
end function;

function TateNormalForm_xy(E,P);
//return the x,y of the tate normal form of (E,P) as in section 2.1 http://arxiv.org/pdf/1307.5719v1.pdf
    b,c := Explode(TateNormalForm_bc(E,P));
    r := b/c;
    s := c^2/(b-c);
    t := (r*s-2*r+1);
    x := (s-r)/t;
    y := t/(s^2-s-r+1);
    return [x,y];
end function;

function EllipticCurveFromX1Place(P);
//Returns the associated elliptic curve corresponding to a place on X1N
//the elliptic curve is guaranteed to be in tate normal form, so that
//0,0 is the point of order N. The point 0,0 is returned as optional second element
    X1N := Curve(P);
    x,y,r,s,b,c,F2,F3:=Functions_xyrsbcF2F3(X1N);
    bP:=Evaluate(b,P);
    cP:=Evaluate(c,P);
    E:=EllipticCurve([1-cP,-bP,-bP,0,0]);
    return E, E ! [0,0];
end function;

function X1PlaceFromEllipticCurve(X1N, E, P)
//Returns a place on X_1(N) given an elliptic curve and a point of order N
    K := BaseRing(E);
    xy := TateNormalForm_xy(E,P);
    dP := Places(X1N(K) ! xy);
    assert #dP eq 1;
    return dP[1];
end function;

function ElementsUpToFrobenius(F)
  orbits := {{Frobenius(x,i) : i in [1..Degree(F)]}: x in F};
  return [Random(orbit) : orbit in orbits];
end function;

function EllipticCurvesOverField(F)
  return &cat[Twists(EllipticCurveFromjInvariant(j)) : j in F];
end function;

function EllipticCurvesOverFieldUpToFrobenius(F)
  return &cat[Twists(EllipticCurveFromjInvariant(j)) : j in ElementsUpToFrobenius(F)];
end function;

function NonCuspidalPlacesUpToDiamond(C,i,N)
  assert IsPrime(N);
  p := Characteristic(BaseRing(C));
  F := GF(p,i);
  ECs := [E: E in EllipticCurvesOverFieldUpToFrobenius(F) | (#E(F) mod N) eq 0];
  places := [];
  for E in ECs do
    gens := [P*(Order(P) div N) : P in Generators(E(F)) | (Order(P) mod N) eq 0];
    assert #gens eq 1;
    time Append(~places,X1PlaceFromEllipticCurve(C,E,gens[1]));
  end for;
  return places;
end function;

back to top

Software Heritage — Copyright (C) 2015–2025, 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