# Singular

#### D.2.4.8 PtoCrep

Procedure from library `grobcov.lib` (see grobcov_lib).

Usage:
PtoCrep(list L)
list L= [ Comp_1, .. , Comp_s ] where
list Comp_i=[p_i,[p_i1,..,p_is_i] ], is the P-representation of a locally closed set V(N) - V(M). To be called in a ring Q[a][x] or a ring Q[a]. But the ideals can contain only the parameters in Q[a]. RETURN:The canonical C-representation [P,Q] of the locally closed set. A pair of radical ideals with P included in Q, representing the set V(P) - V(Q)
KEYWORDS: locally closed set; canoncial form
EXAMPLE: PtoCrep; shows an example

Example:
 ```LIB "grobcov.lib"; if(defined(R)){kill R;} ring R=0,(a,b,c),lp; short=0; ideal p=a*(a^2+b^2+c^2-25); ideal q=a*(a-3),b-4; def Cr=Crep(p,q); Cr; ==> [1]: ==> _[1]=a^3+a*b^2+a*c^2-25*a ==> [2]: ==> _[1]=b-4 ==> _[2]=a*c ==> _[3]=a^2-3*a def L=Prep(p,q); L; ==> [1]: ==> [1]: ==> _[1]=a^2+b^2+c^2-25 ==> [2]: ==> [1]: ==> _[1]=c ==> _[2]=b-4 ==> _[3]=a-3 ==> [2]: ==> _[1]=c+3 ==> _[2]=b-4 ==> _[3]=a ==> [3]: ==> _[1]=c-3 ==> _[2]=b-4 ==> _[3]=a ==> [2]: ==> [1]: ==> _[1]=a ==> [2]: ==> [1]: ==> _[1]=b-4 ==> _[2]=a def Cr1=PtoCrep(L); Cr1; ==> [1]: ==> _[1]=a^3+a*b^2+a*c^2-25*a ==> [2]: ==> _[1]=b-4 ==> _[2]=a*c ==> _[3]=a^2-3*a ```