From 7abda884fa8f17a0d621d8a229dc037566375125 Mon Sep 17 00:00:00 2001 From: jgarnek Date: Sat, 21 Aug 2021 19:52:03 +0200 Subject: [PATCH] dziala baza dR --- superelliptic.ipynb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/superelliptic.ipynb b/superelliptic.ipynb index c159fbf..8b065a5 100644 --- a/superelliptic.ipynb +++ b/superelliptic.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 48, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -256,6 +256,7 @@ " return 0\n", " return 1\n", " \n", + " \n", "class superelliptic_cech:\n", " def __init__(self, C, omega, fct):\n", " self.omega0 = omega\n", @@ -263,6 +264,17 @@ " self.f = fct\n", " self.curve = C\n", " \n", + " def __add__(self, other):\n", + " C = self.curve\n", + " return superelliptic_cech(C, self.omega0 + other.omega0, self.f + other.f)\n", + " \n", + " def __sub__(self, other):\n", + " C = self.curve\n", + " return superelliptic_cech(C, self.omega0 - other.omega0, self.f - other.f)\n", + " \n", + " def __repr__(self):\n", + " return \"(\" + str(self.omega0) + \", \" + str(self.f) + \", \" + str(self.omega8) + \")\" \n", + " \n", "def degree_of_rational_fctn(f):\n", " R. = PolynomialRing(GF(p))\n", " RR = FractionField(R)\n", @@ -287,17 +299,16 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{0: <__main__.superelliptic_cech object at 0x6fdcefeaf60>,\n", - " 1: <__main__.superelliptic_cech object at 0x6fdcefea8d0>}" + "{0: ((1/y) dx, 0, (1/y) dx), 1: ((x/y) dx, 2/x*y, ((x - 1)/(x^2*y)) dx)}" ] }, - "execution_count": 49, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" }