incr-set prlevel 1
if #0=4 START
incr-set prlevel -1
;;; Usage:
;;; 	<speedy_smooth r i a b 
;;;
;;;	r ring of P4, i ideal of surface in P4, 
;;;	creates a = singularities of the first quintic generator of i
;;;	containing V(i) and b = ideal of zeroes of the section in the normal
;;;	bundle of i given by the equation. 
;;;	If a and b have the same degree = expected degree, and expected
;;; 	dimension, then i is smooth if for i5 the ideal generated by the 
;;;	quintics of i the variety V(i5) has at most singularities of embedding
;;;	dimension 3, which is easier to varify by computation.
;;;
;;;	Everything is checked except, that the expected degree, is not computed
;;;	from the normal bundle formular. This should be done by hand in 
;;;	advance, and be compared with the degree of a and b in addition.
;;;
;;;	It is assumed that i has only generators in degree 5 and higher.
;;;
incr-set prlevel 1
jump END
;;; Parameters:
;;;
;;; Output values:
;;;
;;; (discussion)
;;;
;;; Caveats:
;;;
; created 92/FOS.
START:
set verbose 1
copy #2 @i
set autodegree 5
set autocalc 1
std @i @i5
ncols @i5 @b5
set autodegree 0
set autocalc -1
jacob @i @di
submat @di @di5
1..@b5
1..5
flat @di5 @hyp
std @hyp @hyp
deg @hyp @cod @deg
if @cod<5 END
incr-set prlevel -1
;only hypersurface singularities
incr-set prlevel 1
submat @di @di1
1
1..5
flat @di1 @di1
concat @di1 @i
std @di1 #3
shout deg #3
copy @i @sing
nrows @di @t
Circle:
submat @di @dii
1 @t
1..5
wedge @dii 2 @min
flat @min @min
concat @sing @min
int @t @t-1
shout type @t
if @t>1 Circle
set showpairs 1
incr-set prlevel -1
std @sing #4
incr-set prlevel 1
deg #3 @cd @dg
deg #4 @cod @deg
shout deg #4
if @cod<@cd END
if @deg=@dg SMOOTH
jump END
SMOOTH:
incr-set prlevel -1
;smooth
incr-set prlevel 1
kill @i5 @b5 @i @di5 @di @sing @hyp @cod @deg @dg @cd @t @di1 @dii @min
END:
incr-set prlevel -1

$;;;;;;;; EXAMPLE SECTION ;;;;;;;;;;;;;;;;;;;;;;;;;
