Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rrspace
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Boards
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SPAENLEHAUER Pierre-Jean
rrspace
Commits
84708df2
Commit
84708df2
authored
Apr 19, 2019
by
SPAENLEHAUER Pierre-Jean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
magma_utils
parent
50890bae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
1 deletion
+59
-1
class_grp_arith.cc
class_grp_arith.cc
+1
-1
example_rrspace_input
example_rrspace_input
+1
-0
magma_utils/magma_utils.mgm
magma_utils/magma_utils.mgm
+57
-0
No files found.
class_grp_arith.cc
View file @
84708df2
...
...
@@ -47,7 +47,7 @@ int main() {
cin
>>
D2
;
// The following assertion should be true for a nodal curve
assert
(
g
==
C
.
degree
()
-
E
.
degree
());
assert
(
g
==
((
C
.
degree
()
-
1
)
*
(
C
.
degree
()
-
2
))
/
2
-
E
.
degree
());
EffectiveDivisor
R
=
AddReduced
(
g
,
O
,
E
,
D1
,
D2
);
...
...
example_rrspace_input
View file @
84708df2
1009
[ 5 [863 161 817 949 344 184] [132 747 1002 226 891] [768 119 991 128] [645 84 865] [351 37] [1] ]
< [1] [] >
{ < [503 216 395 835 891 697 316 553 1] [773 952 513 814 518 605 87 42] > < [510 1] [928] > }
magma_utils/magma_utils.mgm
0 → 100644
View file @
84708df2
// In this file, we provide some magma functions to test that the output of rrspace is correct.
RRSPACE_PATH="/users/pspaenle/repos/rrspace"
// Given a function f and a finite set B of functions on a curve, check if the k-vector space generated by B
// contains f
// The base curve should be defined over a finite field.
// This is a probabilistic algorithm.
function CheckBelongsSpan(f, B)
assert (Parent(f) eq Universe(B));
FF := Universe(B);
assert Type(FF) eq FldFunFracSch;
K := BaseRing(BaseRing(FF));
assert Type(K) eq FldFin;
C := Curve(FF);
nbtests := 2*#B + 2;
lM := [];
lv := [];
for i in [1..nbtests] do
repeat
P := Random(C);
until P ne Infinity() and
&and[Evaluate(g, P) ne Infinity() : g in B] and
Evaluate(f, P) ne Infinity();
lM cat:= [Evaluate(g, P) : g in B];
lv cat:= [Evaluate(f, P)];
end for;
M := Matrix(K, nbtests, #B, lM);
return IsConsistent(Transpose(M), Matrix(K, 1, nbtests, lv));
end function;
// Given two finite sets of functions on a curve, check if they span the same k-vector space in k(C)
function CheckEqualSpan(B1, B2)
return &and[CheckBelongsSpan(g, B2) : g in B1] and
&and[CheckBelongsSpan(g, B1) : g in B2];
end function;
// Set variable order y > x > z
function Check_rrspace(C, D)
// first compute the input representation for rrspace
K := BaseRing(C);
assert Type(K) eq FldFin;
assert AmbientSpace(C) eq ProjectiveSpace(K, 2);
Dp, Dm := SignDecomposition(D);
Ip := Ideal(Dp);
Im := Ideal(Dm);
R := Universe(Generators(Ip));
Gp := GroebnerBasis(ChangeOrder(Ip+Ideal(R.3-1), "lex"));
Gm := GroebnerBasis(ChangeOrder(Im+Ideal(R.3-1), "lex"));
assert(Degree(Gp[2]) eq Degree(Ip));
assert(Degree(Gm[2]) eq Degree(Im));
Runiv := PolynomialRing(K);
fp := Evaluate( Gp[2], [0, Runiv.1, 0]);
gp := Evaluate(-Gp[1], [0, Runiv.1, 0]);
fm := Evaluate( Gm[2], [0, Runiv.1, 0]);
gm := Evaluate(-Gm[1], [0, Runiv.1, 0]);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment