mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
ec: add example of using sage valuation ring
This commit is contained in:
@@ -734,11 +734,107 @@
|
||||
"source": [
|
||||
"As observed we have a uniformizer $t$ with $k = 2$."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a05bc126",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Valuation with Places\n",
|
||||
"\n",
|
||||
"Using sage valuation rings since local ring is a DVR"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "3da404fc",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[Place (x, y),\n",
|
||||
" Place (x + 3, y + 4),\n",
|
||||
" Place (x + 3, y + 7),\n",
|
||||
" Place (x + 5, y + 3),\n",
|
||||
" Place (x + 5, y + 8),\n",
|
||||
" Place (x + 7, y + 5),\n",
|
||||
" Place (x + 7, y + 6),\n",
|
||||
" Place (x + 9, y + 4),\n",
|
||||
" Place (x + 9, y + 7),\n",
|
||||
" Place (x + 10, y + 4),\n",
|
||||
" Place (x + 10, y + 7)]"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"K.<x> = FunctionField(GF(11))\n",
|
||||
"_.<Y> = K[]\n",
|
||||
"L.<y> = K.extension(Y^2 - x^3 - 4*x)\n",
|
||||
"L.places_finite()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e4719879",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We are interested in $P = (2, 4)$ so we want the place $(x - 2, x - 4) = (x + 9, y + 7)$."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "f87c8b23",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"Place (x + 9, y + 7)"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# I don't know how to actually construct this yet\n",
|
||||
"p = L.places_finite()[-3]\n",
|
||||
"p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "3d007b0b",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"2"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"(y - 2*x).valuation(p)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "SageMath 9.6",
|
||||
"display_name": "SageMath 9.5",
|
||||
"language": "sage",
|
||||
"name": "sagemath"
|
||||
},
|
||||
@@ -752,7 +848,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.5"
|
||||
"version": "3.10.7"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in New Issue
Block a user