Changeset 3036:0594c5c5fb85


Ignore:
Timestamp:
02/09/07 12:16:37 (6 years ago)
Author:
'Martin Albrecht <malb@…
Branch:
default
Message:

added Ideal.integral_closure

Location:
sage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sage/interfaces/singular.py

    r1908 r3036  
    986986        if self.type() == 'matrix': 
    987987            return self.sage_matrix(R,sparse=False) 
     988        if self.type() == 'list': 
     989            return [ f._sage_(R) for f in self ] 
     990 
     991        NotImplementedError, "Coercion of this datatype not implemented yet" 
    988992 
    989993    def set_ring(self): 
  • sage/rings/multi_polynomial_ideal.py

    r2808 r3036  
    477477        return S.ideal(r) 
    478478 
     479    def integral_closure(self, p=0, r=True): 
     480        """ 
     481        Let I == self. 
     482         
     483        Returns the integral closure of I, ..., I^p, where sI 
     484        is an ideal in the polynomial ring R=k[x(1),...x(n)]. If p is 
     485        not given, or p==0, compute the closure of all powers up to 
     486        the maximum degree in t occurring in the closure of R[It] (so 
     487        this is the last power whose closure is not just the 
     488        sum/product of the smaller). If r is given and r is True, 
     489        I.integral_closure() starts with a check whether I is already a 
     490        radical ideal. 
     491 
     492        INPUT: 
     493            p -- powers of I (default: 0) 
     494            r -- check whether self is a radical ideal first (default: True) 
     495 
     496        EXAMPLE: 
     497            sage: R.<x,y> = QQ[] 
     498            sage: I = ideal([x^2,x*y^4,y^5]) 
     499            sage: I.integral_closure() 
     500            [x^2, y^5, x*y^3] 
     501 
     502        ALGORITHM: Use Singular 
     503             
     504        """ 
     505        Is = self._singular_() 
     506        R = self.ring() 
     507        singular =Is .parent() 
     508        singular.load('reesclos.lib') 
     509        ret = Sequence([ R(f) for f in Is.normalI(p,int(r))[1] ], R, 
     510                       check=False, immutable=True) 
     511        return ret 
     512 
    479513    def reduce(self, f): 
    480514        """ 
Note: See TracChangeset for help on using the changeset viewer.