     effect-in length 0 = and ;
 
 : assure-constant ( constant -- quot )
-    dup word? [
-        dup constant-word?
-        [ "Badly formed math inverse" throw ] unless
-    ] when 1quotation ;
+    dup word? [ "Badly formed math inverse" throw ] when 1quotation ;
 
 : swap-inverse ( math-inverse revquot -- revquot* quot )
     next assure-constant rot second [ swap ] swap 3compose ;

    [ unclip-slice inverse % (undo) ] if ;

: [undo] ( quot -- undo )
    reverse [ (undo) ] [ ] make ;

MACRO: undo ( quot -- ) [undo] ;


: define-inverse ( word quot -- ) "inverse" set-word-prop ;

: define-math-inverse ( word quot1 quot2 -- )
    pick 1quotation 3array "math-inverse" set-word-prop ;

: define-pop-inverse ( word n quot -- )
    >r dupd "pop-length" set-word-prop r>
