Some explanations on the format of the renumbering table.
1. Format of the file
2. Given an ideal (p,r) on side s, how do I find its index in the table ?
3. Given an index in the table (and the polynomial pair), how do I find the
corresponding ideal ?
0. Convention
=============
A rational ideal above p is represented by (p,r) with r greater than p.
A projective ideal above p is represented by (p,p).
1. Format of the file
=====================
The format of the file is described in filter/REAME.fileformat
2. Given an ideal (p,r) on side s, how do I find its index in the table ?
=========================================================================
* Compute vp
vp = p + 1 if there is a rational side
vp = 2*p + 1 if there are two algebraic sides
* Compute vr
vr = r if there is a rational side and s corresponds to the algrebraic side
vr = p + 1 if there is a rational side and s corresponds to the rational side
vr = s*(p+1) + r if there are two algebraic sides
* Find the index j such that table[j] = vp and it is the beginning of a sequence
of decreasing values
In the renumbering table, all ideals above the same prime p belong to the
same sequences of decreasing values, where the first one is vp
* Let i = j
While table[i+1] >= vr and table[i+1] < table[j] do
j++
done
* The index of the ideal of (p,r) on side s in the renumbering table is i
This can be done with misc/renumber_convert with the following command line:
echo "p r side" | ./misc/renumber_convert -renumber /path/to/renumber/file
Warning: p and r should be in hexa.
3. Given an index in the table (and the polynomial pair), how do I find the
corresponding ideal ?
===========================================================================
* Let j = i
While table[j-1] > table[j] do
j--
done
* Compute p
p = index[j] - 1 if there is a rational side
p = (index[j] - 1)/2 if there are two algebraic sides
* If i != j:
if there is a rational side:
r = index[i]
s = algebraic side
if there are two algebraic side:
if index[i] <= p:
r = index[i]
side = 0
else
r = index[i] - (p+1)
side = 1
* If i == j:
if there is a rational side:
if p > large prime bound on rational side:
r = largest_root_mod_p (algebraic polynomial)
side = algebraic side
else
r = p + 1 /* convention, does not really matter */
side = rational side
if there are two algebraic side:
if polynomial on side 1 has a root modulo p
r = largest_root_mod_p (side 1 polynomial)
side = 1
else
r = largest_root_mod_p (side 0 polynomial)
side = 0
This can be done with misc/renumber_convert with the following command line:
echo "i" | ./misc/renumber_convert -renumber /path/to/renumberfile -poly /path/to/polyfile -inverse
Warning: i should be in hexa.