anchor.diff:                 Need to check inductive and base downclosure. *)
               | [i], [] ->
                   let! iInfo = lookupFunc vprotos i.Func
  -                if iInfo.IsIterated
  -                then return! (checkDownclosure i rhs)
  -                else return! fail (IteratorOnNonIterated i)
  -
  +                return!
  +                    (match iInfo with
  +                     | Some { IsIterated = true } ->
  +                        (lift
  +                            (fun (v, r) -> ([v], r))
  +                            (checkDownclosure i empDefn rhs))
  +                     | Some { IsIterated = _ } -> fail (IteratorOnNonIterated i)
  +                     | None -> fail (NoSuchView (i.Func.Name)))
               // Over-large iterated view definition (for now, anyway).
               | xs, [] -> return! fail (TooManyIteratedFuncs (lhs, List.length xs))
               // Mixed view definition (currently not allowed).
  
positive.code:             fmt "definition of '{0}', {1}, does not satisfy inductive downclosure"
                  [ printDView view
                    printBoolExpr (printSym printVar) def ]
          | BaseDownclosureError (view, def) ->
              fmt "definition of '{0}', {1}, does not satisfy base downclosure"
                  [ printDView view
                    printBoolExpr (printSym printVar) def ]
          | TooManyIteratedFuncs (view, count) ->
              fmt "constraint '{0}' contains {1} iterated funcs, but iterated\
                   definitions can only contain at most one"
  
negative.code:                     printDFunc
                      (Option.map printTypedVar >> withDefault Nop)
                      func ]
          | BadIteratorType (view, ty) ->
              fmt "iterator on constraint '{0}' is of type {1}, should be int"
                  [ printDView view
                    printType ty ]
          | MissingIterator view ->
              fmt "constraint '{0}' should have an iterator, but does not"
                  [ printDView view ]
          | SymInIteratedConstraint sym ->
              fmt "symbol '{0}' not allowed in an iterated constraint"
                  [ String sym ]
          >> error
  