-- From email 8/21/06 from Chuck Weibel

kk = QQ
kk = ZZ/32003
S1=kk[x,t,MonomialOrder=>Lex]
S2 = kk[x3,x7,x12,x13,x14,x15,x16]
f1 = x^3+t*x^5+x^11; f2 = x^7+t*x^8;
f = map(S1,S2,{f1,f2,x^12,x^13,x^14,x^15,x^16})
I = trim kernel f;
R = S2/I		------- subring of Q[x,t] generated by f1,f2,...
J = jacobian R	------ 5 x 36 matrix
Omega = cokernel J    --- \Omega_R (has 7 generators)

-- and then for the finale:

T = module R/(x15)
gbTrace=3
Hom(T,Omega)
prune oo

M = Omega;

J1 = (image J) : x15;
J % J1
(gens J1) % (image J);

M1 = time syz transpose J;

-- Let's homogenize this setup
S2 = kk[x3,x7,x12,x13,x14,x15,x16,h,Degrees=>{11,9,12,13,14,15,16,1}]
I1 = homogenize(substitute(I,S2),h)

I1 = trim I;
I = ideal flatten entries gens I
transpose gens I
jacobian I


a=101/103
S1=QQ[s,t,u]
S2=S1/ideal(s*t,s*u,t*u)
R1=QQ[x,y,z]
x1=s^2+t^3+u^5  
y1=s^5+a*t^4+u^2
z1=(5/7)*s^7+(4/7)*a*t^7+(2/7)*u^7
f = map(S2,R1,{x1,y1,z1})
I = trim kernel(f)
R = R1/I
---- define trivial module k
k= module R/(x,y,z)
---- Now find \Omega_R -- 7 x 19 matrix
J = jacobian R 
gens gb J;      
------ 7 by 39 matrix now
Omega = cokernel J
--- \Omega_R (has 3 generators)
---- this next command needs memory!
Hom(k,Omega)
--- Here's where I get the "Segmentation fault" and M2 aborts.

L = image presentation Omega
Lsat = L : (ideal(x,y,z));
saturate(L,ideal(x,y,z))
gens gb oo
betti gens Lsat
betti gens L
M1 = prune(Lsat/L);
Lsat1 = compress((gens Lsat) % L);
Lsat1
gens gb Lsat1;
Lsat2 = trim image gens gb Lsat1;
Lsat2
oo
