1Some explanations on the format of the renumbering table. 2 3 41. Format of the file 52. Given an ideal (p,r) on side s, how do I find its index in the table ? 63. Given an index in the table (and the polynomial pair), how do I find the 7 corresponding ideal ? 8 9 100. Convention 11============= 12 13A rational ideal above p is represented by (p,r) with r greater than p. 14A projective ideal above p is represented by (p,p). 15 161. Format of the file 17===================== 18 19The format of the file is described in filter/REAME.fileformat 20 21 222. Given an ideal (p,r) on side s, how do I find its index in the table ? 23========================================================================= 24 25* Compute vp 26 vp = p + 1 if there is a rational side 27 vp = 2*p + 1 if there are two algebraic sides 28 29* Compute vr 30 vr = r if there is a rational side and s corresponds to the algrebraic side 31 vr = p + 1 if there is a rational side and s corresponds to the rational side 32 vr = s*(p+1) + r if there are two algebraic sides 33 34* Find the index j such that table[j] = vp and it is the beginning of a sequence 35 of decreasing values 36 In the renumbering table, all ideals above the same prime p belong to the 37 same sequences of decreasing values, where the first one is vp 38 39* Let i = j 40 While table[i+1] >= vr and table[i+1] < table[j] do 41 j++ 42 done 43 44* The index of the ideal of (p,r) on side s in the renumbering table is i 45 46 47This can be done with misc/renumber_convert with the following command line: 48 49 echo "p r side" | ./misc/renumber_convert -renumber /path/to/renumber/file 50 51Warning: p and r should be in hexa. 52 53 543. Given an index in the table (and the polynomial pair), how do I find the 55 corresponding ideal ? 56=========================================================================== 57 58* Let j = i 59 While table[j-1] > table[j] do 60 j-- 61 done 62 63* Compute p 64 p = index[j] - 1 if there is a rational side 65 p = (index[j] - 1)/2 if there are two algebraic sides 66 67* If i != j: 68 if there is a rational side: 69 r = index[i] 70 s = algebraic side 71 if there are two algebraic side: 72 if index[i] <= p: 73 r = index[i] 74 side = 0 75 else 76 r = index[i] - (p+1) 77 side = 1 78 79* If i == j: 80 if there is a rational side: 81 if p > large prime bound on rational side: 82 r = largest_root_mod_p (algebraic polynomial) 83 side = algebraic side 84 else 85 r = p + 1 /* convention, does not really matter */ 86 side = rational side 87 if there are two algebraic side: 88 if polynomial on side 1 has a root modulo p 89 r = largest_root_mod_p (side 1 polynomial) 90 side = 1 91 else 92 r = largest_root_mod_p (side 0 polynomial) 93 side = 0 94 95This can be done with misc/renumber_convert with the following command line: 96 97 echo "i" | ./misc/renumber_convert -renumber /path/to/renumberfile -poly /path/to/polyfile -inverse 98 99Warning: i should be in hexa. 100