incr-set prlevel 1
if #0=2 START
incr-set prlevel -1
;;; Usage:
;;;     <l_minimal0 I J
;;;
;;; Find a minimal geneating set, J1,  for a submodule I1 over the
;;; localization R of a polynomial ring at the origin.
;;; I is a homogeneous submodule over a ring R[t], and I1 is obtained
;;; from I by setting "t" to one.  J1 is obtained similarly from J.
incr-set prlevel 1
jump END
;;; Parameters:
;;;  I = mxn matrix over a ring whose first variable is the homogenizing
;;;	variable "t" (it can, of course, be named anything).
;;;
;;; Output values:
;;;  J = matrix with m rows, s.t. after setting "t" to one, the columns
;;;	 minimally generate the submodule I1 as above.
;;;
;;; J is computed by finding the relations between I, and m I.  It is
;;; possible that using as few generators for I as possible initially
;;; will save alot of computation.
;;;
;;; Caveats: This version requires I to be homogeneous.  Use l_minimal
;;; if I has not yet been homogenized.
;;;
; last modified 5/22/89 MES
START:
     
res #1 @Isyz 2
     
setring #1
nvars #1 @nv
<zeromat 1 @nv @f
edit @f
ce 1 1 1       ; f now maps t to 1, other vars to 0.
     
ev @f @Isyz.2 @Ibar
setdegs @Ibar
    #1
    ;
<complement @Ibar @ker
     
mult #1 @ker #2
     
END:
incr-set prlevel -1
     
$;;;;;;;; EXAMPLE SECTION ;;;;;;;;;;;;;;;;;;;;;;;;;
<l_min0
<ring 3 xyz r
<ideal j x2*(1+y+z2) x2*(1-x-xz2+z3) xy+z3
<l_homog0 j t k
<l_min0 k km
putmat km
listvars
     
;; example of a Gorenstein local ring, and its resolution
<ring 3 xyz r
poly f x3+y3+x2z-xy2-yz2+z3-xy-z2-xyz-x+1
<l_from_dual f I
putmat I
<l_homog0 I t J
res J Jr
pres Jr
     
