--Poly. Ring R=QQ[x] I=ideal(x^3-3*x+2,x^6-1,x^4-1) --gens takes the generators of an ideal, as a matrix.. we want a list so entries gens I --we take the entries of the matrix, and then "flatten" the list Igens=flatten entries gens I h=gcd(Igens) h==gcd(x^3-3*x+2,x^6-1,x^4-1) I==ideal(h) --We now have a pricipal generator for the ideal --can check membership with the div. alg. f=x^3+4*x^2+3*x+7 f%h --Note this gives the same result as if we find the rep. in k[x]/I using f%I --Note this is not zero.. so f is not in the ideal f%h==0 --We also could have done the gcd in stages.. gcd(Igens)==gcd(I_0,gcd(I_1,I_2)) --I_0 etc is another way to get the generators of I I_0 restart R=QQ[x_1..x_5] I=ideal(for i from 0 to 2 list random(2,R)); dim I codim I degree I ideal groebnerBasis I restart R=QQ[x_0..x_3] ip=ideal(x_0-x_3,x_1,x_2) IL=ideal(x_0,x_1) BlRI=reesIdeal (IL*ip) R3=QQ[x_0..x_3,w_0..w_5] I3=sub(BlRI,R3) Proj3=Proj(R3/I3) T3=tangentSheaf Proj3 rank T3 T3M=module T3 BlR=reesAlgebra(IL*ip) ideal BlR IV=ideal(x_1,x_0+x_2-x_3) S=R/IV BlS =reesAlgebra(sub(IL*ip,S)) describe BlR PBlR=Proj(BlR) TBlR=tangentSheaf PBlR restart R=QQ[x_0..x_3]/ideal(x_3) I=ideal(x_0,x_1) --function m = numgens I S = ambient R kk = coefficientRing S J=ideal(R) R2 = kk[gens S, t_0 .. t_(m-1)] R3=R2/sub(J,R2) II = sub(I,R3) K=ideal for i in 0..(m-1) m=matrix{{t_0..t_(m-1)},flatten entries gens II} minors(2,m) K = ideal apply(0..(m-2), i -> apply((i+1)..(m-1), j -> (II_i*t_j-II_j*t_i))); if m==1 then J=ideal 0_R2; saturate(J,II_0) blup = (R,I,t) -> ( m := numgens I; S := ring I; kk := coefficientRing S; R2 := kk[gens S, t_0 .. t_(m-1)]/(ideal(R)); II := substitute(I,R2); J := ideal apply(0..(m-2), i -> apply((i+1)..(m-1), j -> (II_i*t_j-II_j*t_i))); if m==1 then J=ideal 0_R2; saturate(J,II_0) );