incr-set prlevel 1
if #0=4 START 
incr-set prlevel -1

;;; Usage:
;;;     <kernel f0 a b c
;;;
;;; Given f0, a, b making a commutative diagram 
;;; (where the vertical arrows go down):
;;;
;;;    C1 --> A1 --> B1
;;;    |      |      |
;;;  c |     a|      | b
;;;    |      |  f0  |
;;;    C0 --> A0 --> B0
;;;    |      |      |
;;;    |      |  f   |
;;; ker f --> A  --> B
;;;
;;; we compute a presentation c for the kernel of f
incr-set prlevel 1
jump END
;;;
;;; Parameters:
;;;		f0,a,b = matrices
;;; Output values:
;;;		c = matrix
;;;
;;; We first compute the relations on the generators
;;; of the image of f0 modulo the image of b,
;;; then a presentation of the kernel is obtained
;;; by computing the relations on this
;;; modulo the image of the map presenting a.
;;;
;;; User kernel_and_map to compute the map from the 
;;; kernel to A at the same time.

;Last modified 5/14/89 DE
START:

modulo #1 #3 #4
modulo #4 #2 #4
END:
incr-set prlevel -1

$;;;;;;;; EXAMPLE SECTION ;;;;;;;;;;;;;;;;;;;;;;;;;
;Torsion in the cotangent sheaf of a nodal curve:

;The nodal plane cubic:
<ring 3 x-z r
poly i y2z-x2(x-z)
type i

<cotan i Omega
type Omega
;The following line is necessary because of a bug (5/14/89)
std i i    
qring i rr
fetch Omega Omega
<double_dual Omega N f
<kernel
<kernel f Omega N torsion
<prune torsion torsion
type torsion
; y x 

;The cotangent sheaf has torsion at the origin!
