anchor.diff:           (type-constraint-args (get-type-constraint-args-decl decl))
            (type-constraint-lemmas (get-type-constraint-lemmas-decl decl))
            (verify-guards-args (get-verify-guards-args-decl decl))
  -         (body (lookup-body rst)))
  -    (append (list 'progn
  -                  (append (list 'defun name (get-args typed-args) 
  +         (body (lookup-body rst))
  +         (type-inst-prereqs (append
  +                             (type-inst-prereqs-defun typed-args nil (list
  +                                                                      name))
  +                             (type-inst-prereqs-defun body nil (list name))))
  +         (typed-args (replace-inst typed-args nil nil))
  +         (type (replace-inst type nil nil))
  +         (body (replace-inst body nil nil)))
  +    (append (list 'progn)
  +            type-inst-prereqs
  +            (list (append (list 'defun name (get-args typed-args) 
                                   (list 'declare
                                         (list 'xargs 
                                               ':guard 
  
positive.code:          (lookup-body (cdr l)))
          (t (car l))))
  
  (defmacro defun-typed-concrete (name typed-args type &rest rst)
    (declare (xargs :guard (and (symbolp name)
                                (typed-arg-listp typed-args)
  
negative.code:   (declare (xargs :guard (and (symbolp name)
                                (typed-arg-listp typed-vars)
                                (true-listp rst))))
    (let ((enable (get-enable rst))
          (rst (remove-enable rst)))
      `(progn
         ,@(if enable `(in-theory (enable ,enable)) nil)
         (defund-typed ,(appsyms `(,name body))
             ,typed-vars
           bool
           ,@(if (get-body-declare rst)
                 (list (get-body-declare rst))
                 nil)
           ,(implies-to-implies-macro term))
         (defthm ,name
             (implies ,(get-type-constraint typed-vars)
                      ,term)
           ,@(remove-body-declare rst))
         ,@(if enable `(in-theory (disable ,enable)) nil))))
  
    ;; (list 'progn
    ;;       (append (list 'defund-typed
  