Fixed a couple of errors in ddFunction.py and oreOperator.py due to the
authorAntonio Jimenez Pastor <antonio@ebook.dk-compmath.jku.at>
Wed, 10 Jul 2019 08:46:36 +0000 (10:46 +0200)
committerAntonio Jimenez Pastor <antonio@ebook.dk-compmath.jku.at>
Wed, 10 Jul 2019 08:46:36 +0000 (10:46 +0200)
last merge.

Added the .directory file for .gitignore

.gitignore
ajpastor/dd_functions/ddFunction.py
ajpastor/operator/oreOperator.py

index fd20fdd..dfc6795 100644 (file)
@@ -1,2 +1,5 @@
+# Directory files for Dolphin configuration
+.directory
 
+# Compiled files
 *.pyc
index f62c2c0..0b59ad3 100644 (file)
@@ -412,10 +412,12 @@ class DDRing (Ring_w_Sequence, IntegralDomain):
         except:
             pass;
         if(F is None):
-            raise TypeError("Incompatible original structures:\n\t- %s\n\t- %s" %(pself, pS));
+            return None;
+            #raise TypeError("Incompatible original structures:\n\t- %s\n\t- %s" %(pself, pS));
         
         if(not F in IntegralDomains()):
-            raise TypeError("Pushout of the original structures is not an integral domain:\n\t- %s" %F);
+            return None;
+            #raise TypeError("Pushout of the original structures is not an integral domain:\n\t- %s" %F);
         if(not F.is_field()):
             F = F.fraction_field();
             
@@ -423,7 +425,8 @@ class DDRing (Ring_w_Sequence, IntegralDomain):
         polys = {str(el[0 ]):el[1 ] for el in gens_self['algebraic']}
         for el in gens_S['algebraic']:
             if(polys.get(str(el[0 ]), el[1 ]) != el[1 ]):
-                raise TypeError("Incompatible names in algebraic extensions:\n\t- %s\n\t- %s" %(el,(el[0 ],polys[str(el[0 ])])));
+                return None;
+                #raise TypeError("Incompatible names in algebraic extensions:\n\t- %s\n\t- %s" %(el,(el[0 ],polys[str(el[0 ])])));
             polys[str(el[0 ])] = el[1 ];
             
         sorted_names = sorted(polys);
index 08b15c2..450228e 100644 (file)
@@ -179,13 +179,7 @@ class w_OreOperator(Operator):
         
     def _compute_derivative_solution(self):
         d = self.__oa.gen();
-        try:
-            return w_OreOperator(self.base(), self.operator/d);
-        except ValueError:
-            c = self.getCoefficient(_sage_const_0 );
-            dc = self.derivate()(c);
-            
-            return w_OreOperator(self.base(), ((c*d - dc)*self.operator)/d);
+        return w_OreOperator(self.base(), self.operator.annihilator_of_associate(d));
         
     def _compute_integral_solution(self):
         return w_OreOperator(self.base(),self.operator.annihilator_of_integral());