diff --git a/.ghci b/.ghci
new file mode 100644
--- /dev/null
+++ b/.ghci
@@ -0,0 +1,1 @@
+:set -isrc
diff --git a/.git b/.git
new file mode 100644
--- /dev/null
+++ b/.git
@@ -0,0 +1,1 @@
+gitdir: ../.git/modules/liquid-fixpoint
diff --git a/.gitignore b/.gitignore
new file mode 100644
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,30 @@
+.depend
+*.cmi
+*.cmo
+*.cmx
+*.o
+/dist*
+.liquid
+/.vagrant/
+/.stack-work/
+/build.sh
+/external/fixpoint/config.make
+/external/fixpoint/fixpoint.native
+/external/fixpoint/misc
+/external/fixpoint/smtZ3.ml
+/external/ocamlgraph/META
+/external/ocamlgraph/Makefile
+/external/ocamlgraph/config.status
+/external/ocamlgraph/graph.a
+/external/ocamlgraph/graph.cma
+/external/ocamlgraph/graph.cmxa
+/external/ocamlgraph/src/dot_lexer.ml
+/external/ocamlgraph/src/dot_parser.ml
+/external/ocamlgraph/src/dot_parser.mli
+/external/ocamlgraph/src/dot_parser.output
+/external/ocamlgraph/src/gml.ml
+/external/ocamlgraph/src/version.ml
+/tests/neg/.liquid/
+/tests/pos/.liquid/
+/external/ocamlgraph/config.log
+/TAGS
diff --git a/CHANGES.md b/CHANGES.md
new file mode 100644
--- /dev/null
+++ b/CHANGES.md
@@ -0,0 +1,36 @@
+# CHANGES
+
+## NEXT
+
+## 0.7.0.0
+
+- New `eliminate` based solver (see ICFP 2017 paper for algorithm)
+- Proof by Logical Evaluation see `tests/proof`
+- SMTLIB2 ADTs to make data constructors injective 
+- Uniformly support polymorphic functions via `apply` and elaborate
+
+## 0.3.0.0
+
+- Make interpreted mul and div the default, when `solver = z3`
+- Use `higherorder` flag to allow higher order binders into the environment 
+
+## 0.2.2.0
+
+- Added support for theory of Arrays `Map_t`, `Map_select`, `Map_store`
+
+- Added support for theory of Bitvectors -- see `Language.Fixpoint.Smt.Bitvector`
+
+- Added support for string literals
+
+## 0.2.1.0
+
+- Pre-compiled binaries of the underlying ocaml solver are now
+  provided for Linux, Mac OSX, and Windows.
+
+  No more need to install Ocaml!
+
+## 0.2.0.0
+
+- Parsing has been improved to require *much* fewer parentheses.
+
+- Experimental support for Z3's theory of real numbers with the `--real` flag.
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,304 @@
+Liquid Fixpoint [![Hackage](https://img.shields.io/hackage/v/liquid-fixpoint.svg)](https://hackage.haskell.org/package/liquid-fixpoint) [![Hackage-Deps](https://img.shields.io/hackage-deps/v/liquid-fixpoint.svg)](http://packdeps.haskellers.com/feed?needle=liquid-fixpoint) [![CircleCI](https://circleci.com/gh/ucsd-progsys/liquid-fixpoint.svg?style=svg)](https://circleci.com/gh/ucsd-progsys/liquid-fixpoint)
+===============
+
+
+
+This package implements a Horn-Clause/Logical Implication constraint solver used
+for various Liquid Types. The solver uses SMTLIB2 to implement an algorithm similar to:
+
++ [Houdini](https://users.soe.ucsc.edu/~cormac/papers/fme01.pdf)
++ [Cartesian predicate abstraction](http://swt.informatik.uni-freiburg.de/berit/papers/boolean-and-cartesian-....pdf)
+
+
+Requirements
+------------
+
+In addition to the .cabal dependencies you require an SMTLIB2 compatible solver binary:
+
+- [Z3](http://z3.codeplex.com)
+- [CVC4](http://cvc4.cs.nyu.edu)
+- [MathSat](http://mathsat.fbk.eu/download.html)
+
+If on Windows, please make sure to place the binary and any associated DLLs somewhere
+in your path.
+
+How To Build and Install
+------------------------
+
+Simply do:
+
+    git clone https://github.com/ucsd-progsys/liquid-fixpoint.git
+    cd liquid-fixpoint
+    stack install
+
+or (`cabal` instead of `stack` if you prefer.)
+
+
+Using SMTLIB-based SMT Solvers
+------------------------------
+
+You can use one of several SMTLIB2 compliant solvers, by:
+
+    fixpoint --smtsolver=z3 path/to/file.hs
+
+Currently, we support
+
+    * Z3
+    * CVC4
+    * MathSat
+
+
+
+Configuration Management
+------------------------
+
+It is very important that the version of Liquid Fixpoint be maintained properly.
+
+Suppose that the current version of Liquid Haskell is `A.B.C.D`:
+
++ After a release to hackage is made, if any of the components `B`, `C`, or `D` are missing, they shall be added and set to `0`. Then the `D` component of Liquid Fixpoint shall be incremented by `1`. The version of Liquid Fixpoint is now `A.B.C.(D + 1)`
+
++ The first time a new function or type is exported from Liquid Fixpoint, if any of the components `B`, or `C` are missing, they shall be added and set to `0`. Then the `C` component shall be incremented by `1`, and the `D` component shall stripped. The version of Liquid Fixpoint is now `A.B.(C + 1)`
+
++ The first time the signature of an exported function or type is changed, or an exported function or type is removed (this includes functions or types that Liquid Fixpoint re-exports from its own dependencies), if the `B` component is missing, it shall be added and set to `0`. Then the `B` component shall be incremented by `1`, and the `C` and `D` components shall be stripped. The version of Liquid Fixpoint is now `A.(B + 1)`
+
++ The `A` component shall be updated at the sole discretion of the project owners.
+
+It is recommended to use the [Bumper](https://hackage.haskell.org/package/bumper) utility to manage the versioning of Liquid Fixpoint. Bumper will automatically do the correct update to the cabal file. Additionally, it will update any packages that you have the source for that depend on Liquid Fixpoint.
+
+To update Liquid Fixpoint and Liquid Haskell, first clone Liquid Haskell and Liquid Fixpoint to a common location:
+
+```
+git clone https://github.com/ucsd-progsys/liquidhaskell.git
+git clone https://github.com/ucsd-progsys/liquid-fixpoint.git
+```
+
+To increment the `D` component of Liquid Fixpoint:
+
+```
+./path/to/bumper -3 liquid-fixpoint
+```
+
+This will update the `D` component of Liquid Fixpoint. If necessary, this will update the `Build-Depends` of Liquid Haskell. If the `Build-Depends` was updated, Liquid Haskell's `D` component will be incremented.
+
+To increment the `C` component of Liquid Fixpoint, and strip the `D` component:
+
+```
+./path/to/bumper --minor liquid-fixpoint
+```
+
+As before, this will update Liquid Fixpoint and, if necessary, Liquid Haskell.
+
+To increment the `B` component of Liquid Fixpoint, and strip the `D` and `C` components:
+
+```
+./path/to/bumper --major liquid-fixpoint
+```
+
+As before, this will update Liquid Fixpoint and, if necessary, Liquid Haskell
+
+SMTLIB2 Interface
+-----------------
+
+There is a new SMTLIB2 interface directly from Haskell:
+
++ Language.Fixpoint.SmtLib2
+
+See `tests/smt2/{Smt.hs, foo.smt2}` for an example of how to use it.
+
+Options
+-------
+
+`--higherorder` allows higher order binders into the environment
+
+`--extsolver` runs the **deprecated** external solver.
+
+`--parts` Partitions an `FInfo` into a `[FInfo]` and emits a bunch of files. So:
+
+    $ fixpoint -n -p path/to/foo.fq
+
+will now emit files:
+
+    path/to/.liquid/foo.1.fq
+    path/to/.liquid/foo.2.fq
+    . . .
+    path/to/.liquid/foo.k.fq
+
+and also a dot file with the constraint dependency graph:
+
+    path/to/.liquid/foo.fq.dot
+
+
+## FInfo Invariants
+
+### Binders
+
+This is the field
+
+```
+     , bs       :: !BindEnv         -- ^ Bind  |-> (Symbol, SortedReft)
+```
+
+or in the .fq files as
+
+```
+bind 1 x : ...
+bind 2 y : ...
+```
+
+* Each `BindId` must be a distinct `Int`,
+* Each `BindId` that appears in a constraint
+  environment i.e. inside _any_ `IBindEnv`
+  must appear inside the `bs`
+
+### Environments
+
+* Each constraint's environment is a set of `BindId`
+  which must be defined in the `bindInfo`. Furthermore
+
+* Each constraint should not have _duplicate_ names in its
+  environment, that is if you have two binders
+
+```
+  bind 1 x : ...
+  bind 12 x : ...
+```
+
+  Then a single `IBindEnv` should only mention _at most_
+  one of `1` or `12`.
+
+* There is also a "tree-shape" property that its a bit hard
+  to describe ... TODO     
+
+### LHS
+
+Each `slhs` of a constraint is a `SortedReft`.
+
+- Each `SortredReft` is basically a `Reft` -- a logical predicate.
+  The important bit is that a `KVar` i.e. terms of the formalized
+
+```
+     $k1[x1:=y1][x2:=y2]...[xn:=yn]
+```
+
+  That is represented in the `Expr` type as
+
+```
+  | PKVar  !KVar !Subst
+```
+
+  must appear _only_ at the **top-level** that is not under _any_
+  other operators, i.e. not as a sub-`Expr` of other expressions.
+
+
+- This is basically a predicate that needs to be "well sorted"
+  with respect to the `BindId`, intuitively
+
+```
+    x:int, y:int |- x + y : int
+```
+
+  is well sorted. but
+
+```
+    x:int  |- x + y : int
+```
+
+  is not, and
+
+```
+    x:int, y: list |- x + y : int
+```
+
+  is not. The exact definition is formalized in `Language.Fixpoint.SortCheck`
+
+
+### RHS
+
+Similarly each `rhs` of a `SubC` must either be a single `$k[...]` or an plain `$k`-free `Expr`.
+
+### Global vs. Distinct Literals
+
+```
+     , gLits    :: !(SEnv Sort)               -- ^ Global Constant symbols
+     , dLits    :: !(SEnv Sort)       
+```
+
+The _global_ literals `gLits` are symbols that
+are in scope _everywhere_ i.e. need not be separately
+defined in individual environments. These include things like
+
+- uninterpreted _measure_ functions `len`, `height`,
+- uninterpreted _data constructor_ literals `True`, `False`
+
+Suppose you have an enumerated type like:
+
+```
+data Day = Sun | Mon | Tue | Wed | ... | Sat
+```
+
+You can model the above values in fixpoint as:
+
+```
+constant lit#Sun : Day
+constant lit#Mon : Day
+constant lit#Tue : Day
+constant lit#Wed : Day
+```
+
+The _distinct_ literals are a subset of the above where we
+want to tell the SMT solver that the values are *distinct*
+i.e. **not equal** to each other, for example, you can
+**additionally** specify this as:
+
+```
+distinct lit#Sun : Day
+distinct lit#Mon : Day
+distinct lit#Tue : Day
+distinct lit#Wed : Day
+```
+
+The above two are represented programmatically by generating   
+suitable `Symbol` values (for the literals  see `litSymbol`)
+and `Sort` values as `FTC FTycon` and then making an `SEnv`
+from the `[(Symbol, Sort)]`.
+
+### Sorts
+
+> What's the difference between an FTC and an FObj?
+
+In early versions of fixpoint, there was support for 
+three sorts for expressions (`Expr`) that were sent 
+to the SMT solver:
+
+1. `int`
+2. `bool`
+3. "other"
+
+The `FObj` sort was introduced to represent essentially _all_ 
+non-int and non-bool values (e.g. tuples, lists, trees, pointers...)
+
+However, we later realized that it is valuable to keep _more_
+precise information for `Expr`s and so we introduced the `FTC`
+(fixpoint type constructor), which lets us represent the above
+respectively as:
+
+- `FTC "String" []`                   -- in Haskell `String`
+- `FTC "Tuple"  [FInt, Bool]`         -- in Haskell `(Int, Bool)`
+- `FTC "List" [FTC "List" [FInt]]`    -- in Haskell `[[Int]]`
+
+> There is a comment that says FObj's are uninterpretted types;
+> so probably a type the SMT solver doesn't know about?
+> Does that then make FTC types that the SMT solver does
+> know about (bools, ints, lists, sets, etc.)?
+
+The SMT solver knows about `bool`, `int` and `set` (also `bitvector` 
+and `map`) but _all_ other types are _currently_ represented as plain 
+`Int` inside the SMT solver. However, we _will be_ changing this 
+to make use of SMT support for ADTs ...
+
+To sum up: the `FObj` is there for historical reasons; it has been 
+subsumed by `FTC` which is what I recomend you use. However `FObj` 
+is there if you want a simple "unitype" / "any" type for terms 
+that are not "interpreted".
+
diff --git a/TODO.md b/TODO.md
new file mode 100644
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,21 @@
+# TODO
+
+## Proper Encoding of DataTypes
+
+Need to get proper casts.
+
+So
+
+    (Cons 1 Emp)
+
+should be elaborated to
+
+    ((Cons : (int, List int) => List int) (1 : int) (Emp : List int))
+
+
+1. Rig `checkSym` to call `instantiate`
+    - currently returns poly-type (e.g. `forall a. List a`)
+
+2. Change all places where `unify`/`apply` happens to
+   ALSO apply the substitutions to the casts.
+  
diff --git a/circle.yml b/circle.yml
new file mode 100644
--- /dev/null
+++ b/circle.yml
@@ -0,0 +1,45 @@
+machine:
+  #ghc:
+  #  version: 7.10.2
+  pre:
+    - sudo add-apt-repository -y ppa:hvr/z3
+    - sudo apt-get -y update
+    - sudo apt-get -y install z3
+
+checkout:
+  post:
+    # - git submodule sync
+    # - sed -i '/fixpoint.git/a fetch = +refs/pull/*/head:refs/remotes/origin/pr/*' .git/modules/liquid-fixpoint/config
+    # - git submodule update --init
+    - pwd
+
+dependencies:
+  cache_directories:
+    - "~/.stack"
+    - ".stack-work"
+  pre:
+    - curl -SL https://www.stackage.org/stack/linux-x86_64-static | tar zx -C /tmp
+    - sudo mv /tmp/stack-*-linux-x86_64-static/stack /usr/bin
+  override:
+    - stack setup
+    - rm -fr $(stack path --dist-dir) $(stack path --local-install-root)
+    - stack build liquid-fixpoint --only-dependencies --test --no-run-tests
+
+compile:
+  override:
+    - stack build liquid-fixpoint --flag liquid-fixpoint:devel
+    - stack build liquid-fixpoint --flag liquid-fixpoint:devel --test --no-run-tests
+
+test:
+  override:
+    - mkdir -p $CIRCLE_TEST_REPORTS/junit
+    - stack test liquid-fixpoint:test --flag liquid-fixpoint:devel --test-arguments="--xml=$CIRCLE_TEST_REPORTS/junit/main-test-results.xml":
+        timeout: 1800
+    - stack test liquid-fixpoint:testparser --flag liquid-fixpoint:devel
+    - stack sdist
+  post:
+    # - stack haddock liquidhaskell --no-haddock-deps --haddock-arguments="--no-print-missing-docs --odir=$CIRCLE_ARTIFACTS"
+    # - cp -r dist/doc $CIRCLE_ARTIFACTS
+    - mkdir -p $CIRCLE_TEST_REPORTS/tasty
+    - cp -r tests/logs/cur $CIRCLE_TEST_REPORTS/tasty/log
+    # - hpc-coveralls --exclude-dir=tests --repo-token=$COVERALLS_REPO_TOKEN
diff --git a/default.nix b/default.nix
new file mode 100644
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,32 @@
+{ fetchgitLocal }:
+{ mkDerivation, ansi-terminal, array, ascii-progress, async
+, attoparsec, base, bifunctors, binary, boxes, bytestring, cereal
+, cmdargs, containers, deepseq, directory, filemanip, filepath
+, ghc-prim, hashable, intern, located-base, mtl, parallel, parsec, pretty
+, process, stdenv, syb, tasty, tasty-hunit, tasty-rerun, text
+, text-format, transformers, unordered-containers, z3
+, dotgen, fgl, fgl-visualize
+}:
+mkDerivation {
+  pname = "liquid-fixpoint";
+  version = "9.9.9.9";
+  src = fetchgitLocal ./.;
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    ansi-terminal array ascii-progress async attoparsec base bifunctors
+    binary boxes bytestring cereal cmdargs containers deepseq directory
+    filemanip filepath ghc-prim hashable intern located-base mtl parallel parsec
+    pretty process syb text text-format transformers
+    unordered-containers
+    dotgen fgl fgl-visualize
+  ];
+  executableHaskellDepends = [ base ];
+  testHaskellDepends = [
+    base directory filepath process tasty tasty-hunit tasty-rerun text
+  ];
+  testSystemDepends = [ z3 ];
+  homepage = "https://github.com/ucsd-progsys/liquid-fixpoint";
+  description = "Predicate Abstraction-based Horn-Clause/Implication Constraint Solver";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/liquid-fixpoint.cabal b/liquid-fixpoint.cabal
--- a/liquid-fixpoint.cabal
+++ b/liquid-fixpoint.cabal
@@ -1,5 +1,5 @@
 name:                liquid-fixpoint
-version:             0.7.0.2
+version:             0.7.0.3
 Copyright:           2010-17 Ranjit Jhala, University of California, San Diego.
 synopsis:            Predicate Abstraction-based Horn-Clause/Implication Constraint Solver
 homepage:            https://github.com/ucsd-progsys/liquid-fixpoint
diff --git a/scripts/travis b/scripts/travis
new file mode 100644
--- /dev/null
+++ b/scripts/travis
@@ -0,0 +1,137 @@
+#!/bin/bash
+
+set -eu
+set -o pipefail
+
+## Helper Functions
+
+function loud {
+  echo "$ $@"
+  $@
+}
+
+# Source: https://github.com/travis-ci/travis-build/blob/fc4ae8a2ffa1f2b3a2f62533bbc4f8a9be19a8ae/lib/travis/build/script/templates/header.sh#L104-L123
+RED="\033[31;1m"
+GREEN="\033[32;1m"
+RESET="\033[0m"
+function travis_retry {
+  local result=0
+  local count=1
+  while [ $count -le 3 ]; do
+    [ $result -ne 0 ] && {
+      echo -e "\n${RED}The command \"$@\" failed. Retrying, $count of 3.${RESET}\n" >&2
+    }
+    set +e
+    "$@"
+    result=$?
+    set -e
+    [ $result -eq 0 ] && break
+    count=$(($count + 1))
+    sleep 1
+  done
+
+  [ $count -eq 4 ] && {
+    echo "\n${RED}The command \"$@\" failed 3 times.${RESET}\n" >&2
+  }
+
+  return $result
+}
+
+function prevent_timeout {
+  local cmd="$@"
+
+  $cmd &
+  local cmd_pid=$!
+
+  poke_stdout &
+  local poke_pid=$!
+
+  wait $cmd_pid
+  exit_code=$?
+
+  kill $poke_pid
+  (wait $poke_pid 2>/dev/null) || true
+
+  return $exit_code
+}
+
+function poke_stdout {
+  # Print an invisible character every minute
+  while true; do
+    echo -ne "\xE2\x80\x8B"
+    sleep 60
+  done
+}
+
+function pastebin {
+  curl -s -F 'clbin=<-' https://clbin.com
+}
+
+## Testing Stages
+
+function clean_cache {
+  local smt="$1"
+
+  loud ghc-pkg unregister liquid-fixpoint --force || true
+  loud rm "$HOME/.cabal/bin/$smt" || true
+}
+
+function install_smt {
+  local smt="$1"
+
+  mkdir -p "$HOME/.cabal/bin"
+  loud curl "http://goto.ucsd.edu/~gridaphobe/$smt" -o "$HOME/.cabal/bin/$smt"
+  loud chmod a+x "$HOME/.cabal/bin/$smt"
+}
+
+function install_cabal_deps {
+  if ! _install_cabal_deps; then
+    echo " ==> Cabal install failed. Clearing dependency cache and retrying."
+    loud rm -rf "$HOME/.cabal"
+    loud rm -rf "$HOME/.ghc"
+    _install_cabal_deps
+  fi
+}
+
+function _install_cabal_deps {
+  loud travis_retry cabal update || return 1
+  loud travis_retry cabal install --only-dependencies --enable-tests || return 1
+}
+
+function do_build {
+  loud cabal configure -fbuild-external --enable-tests -v2
+  loud prevent_timeout cabal build -j2
+  loud cabal haddock
+}
+
+function do_test {
+  loud prevent_timeout ./dist/build/test/test
+}
+
+function dump_fail_logs {
+  find . -type f -wholename '*/.liquid/*' -name '*.log' -print0 | while IFS= read -r -d $'\0' file; do
+    echo "${file}:"
+    echo "    $(pastebin < "${file}")"
+  done
+}
+
+function test_source_pkg {
+  loud cabal sdist
+
+  local src_tgz="dist/$(cabal info . | awk '{print $2 ".tar.gz";exit}')"
+
+  if [ -f "$src_tgz" ]; then
+    loud prevent_timeout cabal install -j4 "$src_tgz"
+  else
+    echo "expected '$src_tgz' not found"
+    return 1
+  fi
+}
+
+## Run Test Stage
+
+stage="$1"
+shift
+
+$stage "$@"
+
diff --git a/shell.nix b/shell.nix
new file mode 100644
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,17 @@
+{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
+
+let
+
+  inherit (nixpkgs) pkgs;
+
+  f = import ./default.nix { inherit (pkgs) fetchgitLocal; };
+
+  haskellPackages = if compiler == "default"
+                       then pkgs.haskellPackages
+                       else pkgs.haskell.packages.${compiler};
+
+  drv = haskellPackages.callPackage f { inherit (pkgs) z3; };
+
+in
+
+  if pkgs.lib.inNixShell then drv.env else drv
diff --git a/src/Language/Fixpoint/Parse.hs b/src/Language/Fixpoint/Parse.hs
--- a/src/Language/Fixpoint/Parse.hs
+++ b/src/Language/Fixpoint/Parse.hs
@@ -69,6 +69,7 @@
 
   -- * Utilities
   , isSmall
+  , isNotReserved
 
   , initPState, PState
 
@@ -92,7 +93,7 @@
 -- import           Text.Printf                 (printf)
 import           GHC.Generics                (Generic)
 
-import           Data.Char                   (isLower)
+import qualified Data.Char                   as Char -- (isUpper, isLower)
 import           Language.Fixpoint.Smt.Bitvector
 import           Language.Fixpoint.Types.Errors
 import           Language.Fixpoint.Misc      (tshow, thd3)
@@ -119,8 +120,8 @@
                , Token.commentEnd     = ""
                , Token.commentLine    = ""
                , Token.nestedComments = True
-               , Token.identStart     = letter <|> char '_'
-               , Token.identLetter    = alphaNum <|> oneOf "_"
+               , Token.identStart     = lower <|> char '_'             -- letter <|> char '_'
+               , Token.identLetter    = satisfy (`S.member` symChars)  -- alphaNum <|> oneOf "_"
                , Token.opStart        = Token.opLetter emptyDef
                , Token.opLetter       = oneOf ":!#$%&*+./<=>?@\\^|-~'"
                , Token.reservedOpNames= []
@@ -133,83 +134,89 @@
   emptyDef { Token.commentStart    = "/* "
            , Token.commentEnd      = " */"
            , Token.commentLine     = "//"
-           -- , Token.identStart      = satisfy (const False)
-           -- , Token.identLetter     = satisfy (const False)
-           , Token.reservedNames   = [ "SAT"
-                                     , "UNSAT"
-                                     , "true"
-                                     , "false"
-                                     , "mod"
-                                     , "data"
-                                     , "Bexp"
-                                     , "True"
-                                     , "Int"
-                                     , "import"
-                                     , "if", "then", "else"
-                                     , "func"
-
-                                     -- reserved words used in liquid haskell
-                                     , "forall"
-                                     , "exists"
-                                     , "module"
-                                     , "spec"
-                                     , "where"
+           , Token.identStart      = lower <|> char '_'
+           , Token.identLetter     = alphaNum <|> oneOf "_"
+           , Token.reservedNames   = S.toList reservedNames
+           , Token.reservedOpNames =          reservedOpNames
+           }
 
-                                     , "decrease"
-                                     , "lazyvar"
-                                     , "LIQUID"
-                                     , "lazy"
-                                     , "local"
-                                     , "assert"
-                                     , "assume"
-                                     , "automatic-instances"
-                                     , "autosize"
-                                     , "axiomatize"
-                                     , "bound"
-                                     , "class"
-                                     , "data"
-                                     , "define"
-                                     , "defined"
-                                     , "embed"
-                                     , "expression"
-                                     , "import"
-                                     , "include"
-                                     , "infix"
-                                     , "infixl"
-                                     , "infixr"
-                                     , "inline"
-                                     , "instance"
-                                     , "invariant"
-                                     , "measure"
-                                     , "newtype"
-                                     , "predicate"
-                                     , "qualif"
-                                     , "reflect"
-                                     , "type"
-                                     , "using"
-                                     , "with"
+reservedNames :: S.HashSet String
+reservedNames = S.fromList
+  [ -- reserved words used in fixpoint
+    "SAT"
+  , "UNSAT"
+  , "true"
+  , "false"
+  , "mod"
+  , "data"
+  , "Bexp"
+  -- , "True"
+  -- , "Int"
+  , "import"
+  , "if", "then", "else"
+  , "func"
 
+  -- reserved words used in liquid haskell
+  , "forall"
+  , "exists"
+  , "module"
+  , "spec"
+  , "where"
+  , "decrease"
+  , "lazyvar"
+  , "LIQUID"
+  , "lazy"
+  , "local"
+  , "assert"
+  , "assume"
+  , "automatic-instances"
+  , "autosize"
+  , "axiomatize"
+  , "bound"
+  , "class"
+  , "data"
+  , "define"
+  , "defined"
+  , "embed"
+  , "expression"
+  , "import"
+  , "include"
+  , "infix"
+  , "infixl"
+  , "infixr"
+  , "inline"
+  , "instance"
+  , "invariant"
+  , "measure"
+  , "newtype"
+  , "predicate"
+  , "qualif"
+  , "reflect"
+  , "type"
+  , "using"
+  , "with"
+  ]
 
-                                     ]
-           , Token.reservedOpNames = [ "+", "-", "*", "/", "\\", ":"
-                                     , "<", ">", "<=", ">=", "=", "!=" , "/="
-                                     , "mod", "and", "or"
-                                  --, "is"
-                                     , "&&", "||"
-                                     , "~", "=>", "==>", "<=>"
-                                     , "->"
-                                     , ":="
-                                     , "&", "^", "<<", ">>", "--"
-                                     , "?", "Bexp"
-                                     , "'"
-                                     , "_|_"
-                                     , "|"
-                                     , "<:"
-                                     , "|-"
-                                     , "::"
-                                     , "."
-                                     ]
-           }
+reservedOpNames :: [String]
+reservedOpNames =
+  [ "+", "-", "*", "/", "\\", ":"
+  , "<", ">", "<=", ">=", "=", "!=" , "/="
+  , "mod", "and", "or"
+  --, "is"
+  , "&&", "||"
+  , "~", "=>", "==>", "<=>"
+  , "->"
+  , ":="
+  , "&", "^", "<<", ">>", "--"
+  , "?", "Bexp"
+  , "'"
+  , "_|_"
+  , "|"
+  , "<:"
+  , "|-"
+  , "::"
+  , "."
+  ]
 
 lexer :: Monad m => Token.GenTokenParser String u m
 lexer = Token.makeTokenParser languageDef
@@ -240,6 +247,7 @@
 double        = Token.float         lexer
 -- integer       = Token.integer       lexer
 
+-- identifier :: Parser String
 -- identifier = Token.identifier lexer
 
 -- TODO:AZ: pretty sure there is already a whitespace eater in parsec,
@@ -272,40 +280,53 @@
 -- FIXME: we (LH) rely on this parser being dumb and *not* consuming trailing
 -- whitespace, in order to avoid some parsers spanning multiple lines..
 
-condIdP  :: S.HashSet Char -> (String -> Bool) -> Parser Symbol
-condIdP chars f
-  = do c  <- letter <|> char '_'
-       cs <- many (satisfy (`S.member` chars))
+condIdP  :: Parser Char -> S.HashSet Char -> (String -> Bool) -> Parser Symbol
+condIdP initP okChars p
+  = do c    <- initP -- letter <|> char '_'
+       cs   <- many (satisfy (`S.member` okChars))
        blanks
-       if f (c:cs) then return (symbol $ c:cs) else parserZero
+       let s = c:cs
+       if p s then return (symbol s) else parserZero
 
--- | Lower-case identifiers
+-- upperIdP :: Parser Symbol
+-- upperIdP = do
+--  c  <- upper
+--  cs <- many (satisfy (`S.member` symChars))
+--  blanks
+--  return (symbol $ c:cs)
+-- lowerIdP = do
+  -- c  <- satisfy (\c -> isLower c || c == '_' )
+  -- cs <- many (satisfy (`S.member` symChars))
+  -- blanks
+  -- return (symbol $ c:cs)
+
+-- TODO:RJ we really _should_ just use the below, but we cannot,
+-- because 'identifier' also chomps newlines which then make
+-- it hard to parse stuff like: "measure foo :: a -> b \n foo x = y"
+-- as the type parser thinks 'b \n foo` is a type. Sigh.
+-- lowerIdP :: Parser Symbol
+-- lowerIdP = symbol <$> (identifier <* blanks)
+
 upperIdP :: Parser Symbol
-upperIdP = do
-  c <- upper
-  cs <- many (satisfy (`S.member` symChars))
-  blanks
-  return (symbol $ c:cs)
+upperIdP  = condIdP upper                  symChars (const True)
 
--- | Lower-case identifiers
 lowerIdP :: Parser Symbol
-lowerIdP = do
-  c <- satisfy (\c -> isLower c || c == '_' )
-  cs <- many (satisfy (`S.member` symChars))
-  blanks
-  return (symbol $ c:cs)
+lowerIdP  = condIdP (lower <|> char '_')   symChars isNotReserved
 
 symCharsP :: Parser Symbol
-symCharsP = condIdP symChars (`notElem` keyWordSyms)
-  where
-    keyWordSyms = ["if", "then", "else", "mod"]
+symCharsP = condIdP (letter <|> char '_')  symChars isNotReserved
 
+isNotReserved :: String -> Bool
+isNotReserved s = not (s `S.member` reservedNames)
+
+-- (&&&) :: (a -> Bool) -> (a -> Bool) -> a -> Bool
+-- f &&& g = \x -> f x && g x
 -- | String Haskell infix Id
 infixIdP :: Parser String
 infixIdP = many (satisfy (`notElem` [' ', '.']))
 
 isSmall :: Char -> Bool
-isSmall c = isLower c || c == '_'
+isSmall c = Char.isLower c || c == '_'
 
 locSymbolP, locLowerIdP, locUpperIdP :: Parser LocSymbol
 locLowerIdP = locParserP lowerIdP
@@ -327,7 +348,9 @@
 
 expr0P :: Parser Expr
 expr0P
-  =  (fastIfP EIte exprP)
+  =  trueP
+ <|> falseP
+ <|> (fastIfP EIte exprP)
  <|> (ESym <$> symconstP)
  <|> (ECon <$> constantP)
  <|> (reservedOp "_|_" >> return EBot)
@@ -717,9 +740,7 @@
   | Opt !String
   | Def !Equation
   | Mat !Rewrite
-  | Fuel ![(Int,Int)]
   | Expand ![(Int,Bool)]
-  | Syms !Int
   | Adt  !DataDecl
   deriving (Show, Generic)
   --  Sol of solbind
@@ -748,9 +769,7 @@
     <|> Opt    <$> (reserved "fixpoint"   >> stringLiteral)
     <|> Def    <$> (reserved "define"     >> defineP)
     <|> Mat    <$> (reserved "match"      >> matchP)
-    <|> Fuel   <$> (reserved "fuel"       >> pairsP intP intP)
     <|> Expand <$> (reserved "expand"     >> pairsP intP boolP)
-    <|> Syms   <$> (reserved "syms"       >> intP)
     <|> Adt    <$> (reserved "data"       >> dataDeclP)
 
 
@@ -821,13 +840,11 @@
     kts        = KS $ S.fromList    [k                  | Kut k       <- defs]
     qs         =                    [q                  | Qul q       <- defs]
     binfo      = mempty
-    fuel       = M.fromList         [(fromIntegral i, f)| Fuel fs     <- defs, (i,f) <- fs]
     expand     = M.fromList         [(fromIntegral i, f)| Expand fs   <- defs, (i,f) <- fs]
-    syms       = sum                [s                  | Syms s      <- defs]
     eqs        =                    [e                  | Def e       <- defs]
     rews       =                    [r                  | Mat r       <- defs]
     cid        = fromJust . sid
-    ae         = AEnv syms eqs rews fuel expand
+    ae         = AEnv eqs rews expand
     adts       =                    [d                  | Adt d       <- defs]
     -- msg    = show $ "#Lits = " ++ (show $ length consts)
 
diff --git a/src/Language/Fixpoint/Smt/Interface.hs b/src/Language/Fixpoint/Smt/Interface.hs
--- a/src/Language/Fixpoint/Smt/Interface.hs
+++ b/src/Language/Fixpoint/Smt/Interface.hs
@@ -30,7 +30,6 @@
     , makeContext
     , makeContextNoLog
     , makeContextWithSEnv
-    -- , makeSmtContext
     , cleanupContext
 
     -- * Execute Queries
@@ -115,29 +114,6 @@
        return zs
 -}
 
-
--- TODO: DEPRECATE `makeSmtContext`; instead use just `makeContextWithSEnv`
---       which should call `declare` inside it. Currently broken as the use
---       case is in `instantiate` which needs it BEFORE we `Sanitize` and
---       hence before we can call `symbolEnv` to find the set of all symbols etc...
-
--- makeSmtContext :: Config -> FilePath -> [DataDecl] -> [(Symbol, Sort)] -> [Sort]
---                -> IO Context
--- makeSmtContext cfg f dds xts ts = do
-  -- let env = makeSmtEnv dds xts ts
-  -- me     <- makeContextWithSEnv cfg f env
-  -- smtDecls me (theoryDecls env)
-  -- smtDecls me xts
-  -- return me
-
--- makeSmtEnv :: [DataDecl] -> [(Symbol, Sort)] -> [Sort] -> SymEnv
--- makeSmtEnv dds xts ts = symEnv (fromListSEnv xts) (Thy.theorySymbols dds) dds ts
-
-_theoryDecls :: SymEnv -> [(Symbol, Sort)]
-_theoryDecls env = [ (x, tsSort ty) | (x, ty) <- theorySyms, Uninterp == tsInterp ty]
-  where
-    theorySyms  = toListSEnv (seTheory env)
-
 checkValidWithContext :: Context -> [(Symbol, Sort)] -> Expr -> Expr -> IO Bool
 checkValidWithContext me xts p q =
   smtBracket me "checkValidWithContext" $
@@ -171,14 +147,13 @@
 -- debugFile :: FilePath
 -- debugFile = "DEBUG.smt2"
 
---------------------------------------------------------------------------
--- | SMT IO --------------------------------------------------------------
---------------------------------------------------------------------------
-
+--------------------------------------------------------------------------------
+-- | SMT IO --------------------------------------------------------------------
+--------------------------------------------------------------------------------
 
---------------------------------------------------------------------------
+--------------------------------------------------------------------------------
 command              :: Context -> Command -> IO Response
---------------------------------------------------------------------------
+--------------------------------------------------------------------------------
 command me !cmd       = say cmd >> hear cmd
   where
     env               = ctxSymEnv me
@@ -192,15 +167,16 @@
 smtWrite me !s = smtWriteRaw me s
 
 smtRead :: Context -> IO Response
-smtRead me = {-# SCC "smtRead" #-}
-    do ln  <- smtReadRaw me
-       res <- A.parseWith (smtReadRaw me) responseP ln
-       case A.eitherResult res of
-         Left e  -> Misc.errorstar $ "SMTREAD:" ++ e
-         Right r -> do
-           maybe (return ()) (\h -> hPutStrLnNow h $ format "; SMT Says: {}" (Only $ show r)) (ctxLog me)
-           -- when (verbose me) $ TIO.putStrLn $ format "SMT Says: {}" (Only $ show r)
-           return r
+smtRead me = {-# SCC "smtRead" #-} do
+  when (ctxVerbose me) $ LTIO.putStrLn "SMT READ"
+  ln  <- smtReadRaw me
+  res <- A.parseWith (smtReadRaw me) responseP ln
+  case A.eitherResult res of
+    Left e  -> Misc.errorstar $ "SMTREAD:" ++ e
+    Right r -> do
+      maybe (return ()) (\h -> hPutStrLnNow h $ format "; SMT Says: {}" (Only $ show r)) (ctxLog me)
+      when (ctxVerbose me) $ LTIO.putStrLn $ format "SMT Says: {}" (Only $ show r)
+      return r
 
 type SmtParser a = Parser T.Text a
 
@@ -301,7 +277,7 @@
                   , ctxAeq     = alphaEquivalence cfg
                   , ctxBeq     = betaEquivalence  cfg
                   , ctxNorm    = normalForm       cfg
-                  , ctxSymEnv  = mempty -- tsSort <$> Thy.theorySymbols -- Thy.theorySEnv
+                  , ctxSymEnv  = mempty
                   }
 
 --------------------------------------------------------------------------
@@ -493,7 +469,9 @@
 symKind :: F.SymEnv -> F.Symbol -> Int
 symKind env x = case F.tsInterp <$> F.symEnvTheory x env of
                   Just F.Theory   -> 0
-                  Just F.Data     -> 0
+                  Just F.Ctor     -> 0
+                  Just F.Test     -> 0
+                  Just F.Field    -> 0
                   Just F.Uninterp -> 1
                   Nothing         -> 2
               -- Just t  -> if tsInterp t then 0 else 1
diff --git a/src/Language/Fixpoint/Smt/Serialize.hs b/src/Language/Fixpoint/Smt/Serialize.hs
--- a/src/Language/Fixpoint/Smt/Serialize.hs
+++ b/src/Language/Fixpoint/Smt/Serialize.hs
@@ -14,12 +14,14 @@
 
 import           Language.Fixpoint.SortCheck
 import           Language.Fixpoint.Types
+import qualified Language.Fixpoint.Types.Visitor as Vis
 import           Language.Fixpoint.Smt.Types
 import qualified Language.Fixpoint.Smt.Theories as Thy
 import           Data.Monoid
 import qualified Data.Text.Lazy.Builder         as Builder
 import           Data.Text.Format
-import           Language.Fixpoint.Misc (errorstar)
+import           Language.Fixpoint.Misc (sortNub, errorstar)
+-- import Debug.Trace (trace)
 
 instance SMTLIB2 (Symbol, Sort) where
   smt2 env c@(sym, t) = build "({} {})" (smt2 env sym, smt2SortMono c env t)
@@ -32,14 +34,16 @@
 smt2Sort poly _ env t = smt2 env (Thy.sortSmtSort poly (seData env) t)
 
 smt2data :: SymEnv -> DataDecl -> Builder.Builder
-smt2data env (DDecl tc n cs) = build "({}) (({} {}))" (tvars, name, ctors)
+smt2data env = smt2data' env . padDataDecl
+
+smt2data' :: SymEnv -> DataDecl -> Builder.Builder
+smt2data' env (DDecl tc n cs) = build "({}) (({} {}))" (tvars, name, ctors)
   where
     tvars                    = smt2many (smt2TV <$> [0..(n-1)])
     name                     = smt2 env (symbol tc)
     ctors                    = smt2many (smt2ctor env <$> cs)
     smt2TV                   = smt2 env . SVar
 
-
 smt2ctor :: SymEnv -> DataCtor -> Builder.Builder
 smt2ctor env (DCtor c [])  = smt2 env c
 smt2ctor env (DCtor c fs)  = build "({} {})" (smt2 env c, fields)
@@ -49,6 +53,31 @@
 smt2field :: SymEnv -> DataField -> Builder.Builder
 smt2field env d@(DField x t) = build "({} {})" (smt2 env x, smt2SortPoly d env t)
 
+-- | SMTLIB/Z3 don't like "unused" type variables; they get pruned away and
+--   cause wierd hassles. See tests/pos/adt_poly_dead.fq for an example.
+--   'padDataDecl' adds a junk constructor that "uses" up all the tyvars just
+--   to avoid this pruning problem.
+
+padDataDecl :: DataDecl -> DataDecl
+padDataDecl d@(DDecl tc n cs)
+  | hasDead    = DDecl tc n (junkDataCtor tc n : cs)
+  | otherwise  = d
+  where
+    hasDead    = length usedVars < n
+    usedVars   = declUsedVars d
+
+junkDataCtor :: FTycon -> Int -> DataCtor
+junkDataCtor c n = DCtor (atLoc c junkc) [DField (junkFld i) (FVar i) | i <- [0..(n-1)]]
+  where
+    junkc        = suffixSymbol "junk" (symbol c)
+    junkFld i    = atLoc c    (intSymbol junkc i)
+
+declUsedVars :: DataDecl -> [Int]
+declUsedVars = sortNub . Vis.foldDataDecl go []
+  where
+    go is (FVar i) = i : is
+    go is _        = is
+
 instance SMTLIB2 Symbol where
   smt2 env s
     | Just t <- Thy.smt2Symbol env s = t
@@ -128,18 +157,10 @@
 
 smtLamArg :: SymEnv -> Symbol -> Sort -> Builder.Builder
 smtLamArg env x t = symbolBuilder $ symbolAtName x env () (FFunc t FInt)
-  -- symbolBuilder (symbolAtName x env () t)
 
 smt2VarAs :: SymEnv -> Symbol -> Sort -> Builder.Builder
 smt2VarAs env x t = build "(as {} {})" (smt2 env x, smt2SortMono x env t)
 
-isPolyInst :: Sort -> Sort -> Bool
-isPolyInst s t = isPoly s && not (isPoly t)
-
-isPoly :: Sort -> Bool
-isPoly (FAbs {}) = True
-isPoly _         = False
-
 smt2Lam :: SymEnv -> (Symbol, Sort) -> Expr -> Builder.Builder
 smt2Lam env (x, xT) (ECst e eT) = build "({} {} {})" (smt2 env lambda, x', smt2 env e)
   where
@@ -154,22 +175,22 @@
   | Just t <- unApplyAt f
   = build "({} {})" (symbolBuilder (symbolAtName applyName env e t), smt2s env [e1, e2])
 smt2App env e
-  | Just b <- Thy.smt2App env (unCast f) (smt2 env <$> es)
+  | Just b <- Thy.smt2App smt2VarAs env f (smt2 env <$> es)
   = b
   | otherwise
   = build "({} {})" (smt2 env f, smt2s env es)
   where
-    (f, es)   =  splitEApp' e
+    (f, es)   = splitEApp' e
 
-unCast :: Expr -> Expr
-unCast (ECst e _) = unCast e
-unCast e          = e
+-- unCast :: Expr -> Expr
+-- unCast (ECst e _) = unCast e
+-- unCast e          = e
 
 splitEApp' :: Expr -> (Expr, [Expr])
 splitEApp'            = go []
   where
     go acc (EApp f e) = go (e:acc) f
-    go acc (ECst e _) = go acc e
+  --   go acc (ECst e _) = go acc e
     go acc e          = (e, acc)
 
 mkRel :: SymEnv -> Brel -> Expr -> Expr -> Builder.Builder
diff --git a/src/Language/Fixpoint/Smt/Theories.hs b/src/Language/Fixpoint/Smt/Theories.hs
--- a/src/Language/Fixpoint/Smt/Theories.hs
+++ b/src/Language/Fixpoint/Smt/Theories.hs
@@ -22,6 +22,7 @@
 
        -- * Theory Symbols
      , theorySymbols
+     , dataDeclSymbols
 
 
        -- * Theories
@@ -238,84 +239,71 @@
 smt2SmtSorts :: [SmtSort] -> Builder.Builder
 smt2SmtSorts = buildMany . fmap smt2SmtSort
 
+type VarAs = SymEnv -> Symbol -> Sort -> Builder.Builder
 --------------------------------------------------------------------------------
-smt2App :: SymEnv -> Expr -> [Builder.Builder] -> Maybe Builder.Builder
+smt2App :: VarAs -> SymEnv -> Expr -> [Builder.Builder] -> Maybe Builder.Builder
 --------------------------------------------------------------------------------
-smt2App _ (EVar f) [d]
+smt2App _ _ (ECst (EVar f) _) [d]
   | f == setEmpty = Just $ build "{}"             (Only emp)
   | f == setEmp   = Just $ build "(= {} {})"      (emp, d)
   | f == setSng   = Just $ build "({} {} {})"     (add, emp, d)
-smt2App env (EVar f) (d:ds)
-  | Just s <- {- tracepp ("SYMENVTHEORY: " ++ showpp f) $ -} symEnvTheory f env
-  = Just $ build "({} {})" (tsRaw s, d <> mconcat [ " " <> d | d <- ds])
-smt2App _ _ _    = Nothing
 
--- isSmt2App :: Expr -> [a] -> Bool
--- isSmt2App e xs = tracepp ("isSmt2App e := " ++ show e) (isSmt2App' e xs)
+smt2App k env f (d:ds)
+  | Just fb <- smt2AppArg k env f
+  = Just $ build "({} {})" (fb, d <> mconcat [ " " <> d | d <- ds])
 
---------------------------------------------------------------------------------
--- / isSmt2App :: SEnv TheorySymbol -> Expr -> [a] -> Bool
--- / --------------------------------------------------------------------------------
--- / isSmt2App _ (EVar f) [_]
-  -- / | f == setEmpty = True
-  -- / | f == setEmp   = True
-  -- / | f == setSng   = True
--- / isSmt2App env (EVar f) _
-  -- / =  isJust (lookupSEnv f env)
--- / isSmt2App _ _ _
-  -- / = False
+smt2App _ _ _ _    = Nothing
 
+-- smt2App env (EVar f) (d:ds)
+--  | Just s <- {- tracepp ("SYMENVTHEORY: " ++ showpp f) $ -} symEnvTheory f env
+--  = Just $ build "({} {})" (tsRaw s, d <> mconcat [ " " <> d | d <- ds])
+
+smt2AppArg :: VarAs -> SymEnv -> Expr -> Maybe Builder.Builder
+smt2AppArg k env (ECst (EVar f) t)
+  | Just fThy <- symEnvTheory f env
+  = Just $ if isPolyCtor fThy t
+            then (k env f (ffuncOut t))
+            else (build "{}" (Only (tsRaw fThy)))
+
+-- // smt2AppArg _ env (EVar f)
+-- // | Just fThy <- symEnvTheory f env
+-- //  = Just (build "{}" (Only (tsRaw fThy)))
+
+smt2AppArg _ _ _
+  = Nothing
+
+isPolyCtor :: TheorySymbol -> Sort -> Bool
+isPolyCtor fThy t = isPolyInst (tsSort fThy) t && tsInterp fThy == Ctor
+
+ffuncOut :: Sort -> Sort
+ffuncOut t = maybe t (last . snd) (bkFFunc t)
+
 --------------------------------------------------------------------------------
 isSmt2App :: SEnv TheorySymbol -> Expr -> Maybe Int
 --------------------------------------------------------------------------------
-isSmt2App _ (EVar f)
-  | f == setEmpty    = Just 1
-  | f == setEmp      = Just 1
-  | f == setSng      = Just 1
-isSmt2App g (EVar f) = do t  <- tsSort <$> lookupSEnv f g
-                          ts <- snd    <$> bkFFunc t
-                          Just (length ts - 1)
-isSmt2App _ _        = Nothing
+isSmt2App g  (EVar f)
+  | f == setEmpty = Just 1
+  | f == setEmp   = Just 1
+  | f == setSng   = Just 1
+  | otherwise     = lookupSEnv f g >>= thyAppInfo
+isSmt2App _ _     = Nothing
 
+thyAppInfo :: TheorySymbol -> Maybe Int
+thyAppInfo ti = case tsInterp ti of
+  Field -> Just 1
+  _     -> sortAppInfo (tsSort ti)
 
+sortAppInfo :: Sort -> Maybe Int
+sortAppInfo t = case bkFFunc t of
+  Just (_, ts) -> Just (length ts - 1)
+  Nothing      -> Nothing
+
 preamble :: Config -> SMTSolver -> [T.Text]
 preamble u Z3   = z3Preamble u
 preamble u Cvc4 = cvc4Preamble u
 preamble u _    = smtlibPreamble u
 
 --------------------------------------------------------------------------------
--- | Converting Non-Int types to Int -------------------------------------------
---------------------------------------------------------------------------------
--- toInt :: Expr -> Sort -> Expr
--- toInt e s = tracepp msg (toInt' e s)
-  -- where
-    -- msg   = "toInt e = " ++ show e ++ ", t = " ++ show s
-
-_toInt :: Expr -> Sort -> Expr
-_toInt e s
-  |  (FApp (FTC c) _) <- s
-  , setConName == symbol c
-  = castWith setToIntName e
-  | (FApp (FApp (FTC c) _) _) <- s
-  , mapConName == symbol c
-  = castWith mapToIntName e
-  | (FApp (FTC bv) (FTC s)) <- s
-  , bitVecName == symbol bv
-  , Just _ <- sizeBv s
-  = castWith bitVecToIntName e
-  | FTC c <- s
-  , c == boolFTyCon
-  = castWith boolToIntName e
-  | FTC c <- s
-  , c == realFTyCon
-  = castWith realToIntName e
-  | otherwise
-  = e
-
-castWith :: Symbol -> Expr -> Expr
-castWith s = eAppC intSort (EVar s)
-
---------------------------------------------------------------------------------
 -- | Theory Symbols : `uninterpSEnv` should be disjoint from see `interpSEnv`
 --   to avoid duplicate SMT definitions.  `uninterpSEnv` is for uninterpreted
 --   symbols, and `interpSEnv` is for interpreted symbols.
@@ -424,7 +412,7 @@
 -- | Constructors, Selectors and Tests from 'DataDecl'arations.
 --------------------------------------------------------------------------------
 dataDeclSymbols :: DataDecl -> [(Symbol, TheorySymbol)]
-dataDeclSymbols d = {- tracepp "dataDeclSymbols" $ -} ctorSymbols d ++ testSymbols d ++ selectSymbols d
+dataDeclSymbols d = ctorSymbols d ++ testSymbols d ++ selectSymbols d
 
 -- | 'selfSort d' returns the _self-sort_ of 'd' :: 'DataDecl'.
 --   See [NOTE:DataDecl] for details.
@@ -440,18 +428,13 @@
   | c == ddTyCon d = selfSort d
 fldSort _ s        = s
 
--- | 'theorify' converts the 'Sort' into a full 'TheorySymbol'
-
-theorify :: (Symbol, Sort) -> (Symbol, TheorySymbol)
-theorify (x, t) = (x, Thy x (symbolRaw x) t Data)
-
 --------------------------------------------------------------------------------
 ctorSymbols :: DataDecl -> [(Symbol, TheorySymbol)]
 --------------------------------------------------------------------------------
 ctorSymbols d = ctorSort d <$> ddCtors d
 
 ctorSort :: DataDecl -> DataCtor -> (Symbol, TheorySymbol)
-ctorSort d ctor = (x, Thy x (symbolRaw x) t Data)
+ctorSort d ctor = (x, Thy x (symbolRaw x) t Ctor)
   where
     x           = symbol ctor
     t           = mkFFunc n (ts ++ [selfSort d])
@@ -466,7 +449,7 @@
     t         = mkFFunc (ddVars d) [selfSort d, boolSort]
 
 testTheory :: Sort -> Symbol -> (Symbol, TheorySymbol)
-testTheory t x = (sx, Thy sx raw t Data)
+testTheory t x = (sx, Thy sx raw t Test)
   where
     sx         = testSymbol x
     raw        = "is-" <> symbolRaw x
@@ -478,6 +461,10 @@
 selectSymbols :: DataDecl -> [(Symbol, TheorySymbol)]
 --------------------------------------------------------------------------------
 selectSymbols d = theorify <$> concatMap (ctorSelectors d) (ddCtors d)
+
+-- | 'theorify' converts the 'Sort' into a full 'TheorySymbol'
+theorify :: (Symbol, Sort) -> (Symbol, TheorySymbol)
+theorify (x, t) = (x, Thy x (symbolRaw x) t Field)
 
 ctorSelectors :: DataDecl -> DataCtor -> [(Symbol, Sort)]
 ctorSelectors d ctor = fieldSelector d <$> dcFields ctor
diff --git a/src/Language/Fixpoint/Solver.hs b/src/Language/Fixpoint/Solver.hs
--- a/src/Language/Fixpoint/Solver.hs
+++ b/src/Language/Fixpoint/Solver.hs
@@ -193,13 +193,14 @@
   rnf si3 `seq` donePhase Loud "Uniqify & Rename"
   loudDump 1 cfg si3
   let si4  = {-# SCC "defunction" #-} defunctionalize cfg $!! si3
-  -- putStrLn $ "AXIOMS: " ++ showpp (asserts si4)
   loudDump 2 cfg si4
+  rnf si4 `seq` donePhase Loud "Defunctionalize"
   let si5  = {-# SCC "elaborate"  #-} elaborate "solver" (symbolEnv cfg si4) si4
   loudDump 3 cfg si5
+  rnf si5 `seq` donePhase Loud "Elaborate"
   si6 <- {-# SCC "Sol.inst"  #-} instantiate cfg $!! si5
+  rnf si6 `seq` donePhase Loud "Instantiate"
   res <- {-# SCC "Sol.solve" #-} Sol.solve cfg $!! si6
-  -- rnf soln `seq` donePhase Loud "Solve2"
   --let stat = resStatus res
   saveSolution cfg res
   -- when (save cfg) $ saveSolution cfg
diff --git a/src/Language/Fixpoint/Solver/GradualSolve.hs b/src/Language/Fixpoint/Solver/GradualSolve.hs
new file mode 100644
--- /dev/null
+++ b/src/Language/Fixpoint/Solver/GradualSolve.hs
@@ -0,0 +1,319 @@
+{-# LANGUAGE PatternGuards     #-}
+{-# LANGUAGE TupleSections     #-}
+{-# LANGUAGE FlexibleContexts  #-}
+{-# LANGUAGE OverloadedStrings #-}
+
+--------------------------------------------------------------------------------
+-- | Solve a system of horn-clause constraints ---------------------------------
+--------------------------------------------------------------------------------
+
+module Language.Fixpoint.Solver.GradualSolve (solveGradual) where
+
+import           Control.Monad (when, filterM, foldM)
+import           Control.Monad.State.Strict (lift)
+import           Language.Fixpoint.Misc
+import qualified Language.Fixpoint.Types           as F
+import qualified Language.Fixpoint.Types.Solutions as Sol
+import qualified Language.Fixpoint.SortCheck       as So
+import           Language.Fixpoint.Types.PrettyPrint
+import           Language.Fixpoint.Types.Config hiding (stats)
+import qualified Language.Fixpoint.Solver.GradualSolution  as S
+import qualified Language.Fixpoint.Solver.Worklist  as W
+import qualified Language.Fixpoint.Solver.Eliminate as E
+import           Language.Fixpoint.Solver.Monad
+import           Language.Fixpoint.Utils.Progress
+import           Language.Fixpoint.Graph
+import           Text.PrettyPrint.HughesPJ
+import           Text.Printf
+import           System.Console.CmdArgs.Verbosity (whenNormal, whenLoud)
+import           Control.DeepSeq
+import qualified Data.HashMap.Strict as M
+import qualified Data.HashSet        as S
+
+--------------------------------------------------------------------------------
+-- | Progress Bar
+--------------------------------------------------------------------------------
+withProgressFI :: SolverInfo a b -> IO b -> IO b
+withProgressFI = withProgress . fromIntegral . cNumScc . siDeps
+--------------------------------------------------------------------------------
+
+printStats :: F.SInfo a ->  W.Worklist a -> Stats -> IO ()
+printStats fi w s = putStrLn "\n" >> ppTs [ ptable fi, ptable s, ptable w ]
+  where
+    ppTs          = putStrLn . showpp . mconcat
+
+--------------------------------------------------------------------------------
+solverInfo :: Config -> F.SInfo a -> SolverInfo a b
+--------------------------------------------------------------------------------
+solverInfo cfg fI
+  | useElim cfg = E.solverInfo cfg fI
+  | otherwise   = SI mempty fI cD (siKvars fI)
+  where
+    cD          = elimDeps fI (kvEdges fI) mempty
+
+siKvars :: F.SInfo a -> S.HashSet F.KVar
+siKvars = S.fromList . M.keys . F.ws
+
+
+--------------------------------------------------------------------------------
+-- | tidyResult ensures we replace the temporary kVarArg names introduced to
+--   ensure uniqueness with the original names in the given WF constraints.
+--------------------------------------------------------------------------------
+tidyResult :: F.Result a -> F.Result a
+tidyResult r = r { F.resSolution  =  tidySolution  (F.resSolution r)
+                 , F.gresSolution =  gtidySolution (F.gresSolution r) 
+                 }
+
+tidySolution :: F.FixSolution -> F.FixSolution
+tidySolution = fmap tidyPred
+
+gtidySolution :: F.GFixSolution -> F.GFixSolution
+gtidySolution = fmap tidyPred --  (\(e, es) -> (tidyPred e, tidyPred <$> es))
+
+tidyPred :: F.Expr -> F.Expr
+tidyPred = F.substf (F.eVar . F.tidySymbol)
+
+
+predKs :: F.Expr -> [(F.KVar, F.Subst)]
+predKs (F.PAnd ps)    = concatMap predKs ps
+predKs (F.PKVar k su) = [(k, su)]
+predKs _              = []
+
+
+
+--------------------------------------------------------------------------------
+minimizeResult :: Config -> M.HashMap F.KVar F.Expr
+               -> SolveM (M.HashMap F.KVar F.Expr)
+--------------------------------------------------------------------------------
+minimizeResult cfg s
+  | minimalSol cfg = mapM minimizeConjuncts s
+  | otherwise      = return s
+
+minimizeConjuncts :: F.Expr -> SolveM F.Expr
+minimizeConjuncts p = F.pAnd <$> go (F.conjuncts p) []
+  where
+    go []     acc   = return acc
+    go (p:ps) acc   = do b <- isValid (F.pAnd (acc ++ ps)) p
+                         if b then go ps acc
+                              else go ps (p:acc)
+
+
+
+showUnsat :: Bool -> Integer -> F.Pred -> F.Pred -> IO ()
+showUnsat u i lP rP = {- when u $ -} do
+  putStrLn $ printf   "UNSAT id %s %s" (show i) (show u)
+  putStrLn $ showpp $ "LHS:" <+> pprint lP
+  putStrLn $ showpp $ "RHS:" <+> pprint rP
+
+--------------------------------------------------------------------------------
+-- | Predicate corresponding to RHS of constraint in current solution
+--------------------------------------------------------------------------------
+rhsPred :: F.SimpC a -> F.Expr
+--------------------------------------------------------------------------------
+rhsPred c
+  | isTarget c = F.crhs c
+  | otherwise  = errorstar $ "rhsPred on non-target: " ++ show (F.sid c)
+
+isValid :: F.Expr -> F.Expr -> SolveM Bool
+isValid p q = (not . null) <$> filterValid p [(q, ())]
+
+
+-------------------------------------------------------------------------------
+-- | solve with edits to allow Gradual types ----------------------------------
+-------------------------------------------------------------------------------
+
+solveGradual :: (NFData a, F.Fixpoint a) => Config -> F.SInfo a -> IO (F.Result (Integer, a))
+
+solveGradual cfg fi = do
+    (res, stat) <- withProgressFI sI $ runSolverM cfg sI n act
+    when (solverStats cfg) $ printStats fi wkl stat
+    return res
+  where
+    act  = solveGradual_ cfg fi s0 ks  wkl
+    sI   = solverInfo cfg fi
+    wkl  = W.init sI
+    n    = fromIntegral $ W.wRanks wkl
+    s0   = siSol  sI
+    ks   = siVars sI
+
+--------------------------------------------------------------------------------
+solveGradual_ :: (NFData a, F.Fixpoint a)
+       => Config
+       -> F.SInfo a
+       -> Sol.GSolution 
+       -> S.HashSet F.KVar
+       -> W.Worklist a
+       -> SolveM (F.Result (Integer, a), Stats)
+--------------------------------------------------------------------------------
+solveGradual_ cfg fi s0 ks wkl = do
+  let s1  = mappend s0 $ {-# SCC "sol-init" #-} S.init cfg fi ks
+  s2      <- {-# SCC "sol-local"  #-} filterLocal s1
+  s       <- {-# SCC "sol-refine" #-} refine s2 wkl
+  res     <- {-# SCC "sol-result" #-} result cfg wkl s
+  st      <- stats
+  let res' = {-# SCC "sol-tidy"   #-} tidyResult res
+  return $!! (res', st)
+
+filterLocal :: Sol.GSolution -> SolveM Sol.GSolution 
+filterLocal sol = do 
+  gs' <- mapM (initGBind sol) gs 
+  return $ Sol.updateGMap sol $ M.fromList gs'
+  where 
+    gs = M.toList $ Sol.gMap sol 
+
+initGBind :: Sol.GSolution -> (F.KVar, (((F.Symbol, F.Sort), F.Expr), Sol.GBind)) -> SolveM (F.KVar, (((F.Symbol, F.Sort), F.Expr), Sol.GBind))
+initGBind sol (k, (e, gb)) = do  
+   elems0  <- filterM (isLocal e) (Sol.gbEquals gb)
+   elems   <- sortEquals elems0 
+   lattice <- makeLattice [] (map (:[]) elems) elems
+   return $ ((k,) . (e,) . Sol.equalsGb) lattice
+  where
+    makeLattice acc new elems
+      | null new
+      = return acc 
+      | otherwise
+      = do let cands = [e:es |e<-elems, es<-new]
+           localCans <- filterM (isLocal e) cands
+           newElems  <- filterM (notTrivial (new ++ acc)) localCans 
+           makeLattice (acc ++ new) newElems elems
+
+    notTrivial [] _     = return True 
+    notTrivial (x:xs) p = do v <- isValid (mkPred x) (mkPred p)
+                             if v then return False 
+                                  else notTrivial xs p 
+
+    mkPred eq = So.elaborate "initBGind.mkPred" (Sol.sEnv sol) (F.pAnd (Sol.eqPred <$> eq))
+    isLocal (v, e) eqs = do 
+      let pp = So.elaborate "filterLocal" (Sol.sEnv sol) $ F.PExist [v] $ F.pAnd (e:(Sol.eqPred <$> eqs)) 
+      isValid mempty pp
+
+    root      = Sol.trueEqual
+    sortEquals xs = (bfs [0]) <$> makeEdges vs [] vs 
+      where 
+       vs        = zip [0..] (root:(head <$> xs))
+
+       bfs []     _  = [] 
+       bfs (i:is) es = (snd $ (vs!!i)) : bfs (is++map snd (filter (\(j,k) ->  (j==i && notElem k is)) es)) es
+
+       makeEdges _   acc []    = return acc
+       makeEdges vs acc (x:xs) = do ves  <- concat <$> mapM (makeEdgesOne x) vs
+                                    if any (\(i,j) -> elem (j,i) acc) ves 
+                                      then makeEdges (filter ((/= fst x) . fst) vs) (filter (\(i,j) -> ((i /= fst x) && (j /= fst x))) acc) xs 
+                                      else makeEdges vs (mergeEdges (ves ++ acc)) xs 
+
+    makeEdgesOne (i,_) (j,_) | i == j = return [] 
+    makeEdgesOne (i,x) (j,y) = do 
+      ij <- isValid (mkPred [x]) (mkPred [y])
+      return (if ij then [(j,i)] else [])
+
+    mergeEdges es = filter (\(i,j) -> (not (any (\k -> ((i,k) `elem` es && (k,j) `elem` es)) (fst <$> es)))) es
+
+
+--------------------------------------------------------------------------------
+refine :: Sol.GSolution -> W.Worklist a -> SolveM Sol.GSolution
+--------------------------------------------------------------------------------
+refine s w
+  | Just (c, w', newScc, rnk) <- W.pop w = do
+     i       <- tickIter newScc
+     (b, s') <- refineC i s c
+     lift $ writeLoud $ refineMsg i c b rnk
+     let w'' = if b then W.push c w' else w'
+     refine s' w''
+  | otherwise = return s
+  where
+    -- DEBUG
+    refineMsg i c b rnk = printf "\niter=%d id=%d change=%s rank=%d\n"
+                            i (F.subcId c) (show b) rnk
+
+---------------------------------------------------------------------------
+-- | Single Step Refinement -----------------------------------------------
+---------------------------------------------------------------------------
+refineC :: Int -> Sol.GSolution -> F.SimpC a -> SolveM (Bool, Sol.GSolution)
+---------------------------------------------------------------------------
+refineC _i s c
+  | null rhs  = return (False, s)
+  | otherwise = do be      <- getBinds
+                   let lhss = snd <$> S.lhsPred be s c
+                   kqs     <- filterValidGradual lhss rhs
+                   return   $ S.update s ks kqs
+  where
+    _ci       = F.subcId c
+    (ks, rhs) = rhsCands s c
+    -- msg       = printf "refineC: iter = %d, sid = %s, soln = \n%s\n"
+    --               _i (show (F.sid c)) (showpp s)
+    _msg ks xs ys = printf "refineC: iter = %d, sid = %s, s = %s, rhs = %d, rhs' = %d \n"
+                     _i (show _ci) (showpp ks) (length xs) (length ys)
+
+
+rhsCands :: Sol.GSolution -> F.SimpC a -> ([F.KVar], Sol.Cand (F.KVar, Sol.EQual))
+rhsCands s c    = (fst <$> ks, kqs)
+  where
+    kqs         = [ (p, (k, q)) | (k, su) <- ks, (p, q)  <- cnd k su ]
+    ks          = predKs . F.crhs $ c
+    cnd k su    = Sol.qbPreds msg s su (Sol.lookupQBind s k)
+    msg         = "rhsCands: " ++ show (F.sid c)
+
+--------------------------------------------------------------------------------
+-- | Gradual Convert Solution into Result ----------------------------------------------
+--------------------------------------------------------------------------------
+result :: (F.Fixpoint a) => Config -> W.Worklist a -> Sol.GSolution
+       -> SolveM (F.Result (Integer, a))
+--------------------------------------------------------------------------------
+result cfg wkl s = do
+  lift $ writeLoud "Computing Result"
+  stat    <- result_ wkl s 
+  lift $ whenNormal $ putStrLn $ "RESULT: " ++ show (F.sid <$> stat)
+  F.Result (ci <$> stat) <$> solResult cfg s <*> solResultGradual wkl cfg s 
+  where
+    ci c = (F.subcId c, F.sinfo c)
+
+result_ :: Fixpoint a =>  W.Worklist a -> Sol.GSolution -> SolveM (F.FixResult (F.SimpC a))
+result_  w s = res <$> filterM (isUnsat s) cs
+  where
+    cs       = W.unsatCandidates w
+    res []   = F.Safe
+    res cs'  = F.Unsafe cs'
+
+solResult :: Config -> Sol.GSolution -> SolveM (M.HashMap F.KVar F.Expr)
+solResult cfg
+  = minimizeResult cfg . Sol.result
+
+
+solResultGradual :: W.Worklist a -> Config -> Sol.GSolution -> SolveM F.GFixSolution
+solResultGradual w _cfg sol 
+  = F.toGFixSol . Sol.resultGradual <$> updateGradualSolution (W.unsatCandidates w) sol
+
+--------------------------------------------------------------------------------
+updateGradualSolution :: [F.SimpC a] -> Sol.GSolution -> SolveM (Sol.GSolution)
+--------------------------------------------------------------------------------
+updateGradualSolution cs sol = foldM f (Sol.emptyGMap sol) cs
+  where
+   f s c = do
+    be <- getBinds
+    let lpi = S.lhsPred be sol c 
+    let rp  = rhsPred c 
+    gbs    <- firstValid rp lpi 
+    return $ Sol.updateGMapWithKey gbs s 
+
+
+firstValid :: Monoid a =>  F.Expr -> [(a, F.Expr)] -> SolveM a 
+firstValid _   [] = return mempty 
+firstValid rhs ((y,lhs):xs) = do
+  v <- isValid lhs rhs
+  if v then return y else firstValid rhs xs 
+
+
+--------------------------------------------------------------------------------
+isUnsat :: Fixpoint a => Sol.GSolution -> F.SimpC a -> SolveM Bool
+--------------------------------------------------------------------------------
+isUnsat s c = do
+  -- lift   $ printf "isUnsat %s" (show (F.subcId c))
+  _     <- tickIter True -- newScc
+  be    <- getBinds
+  let lpi = S.lhsPred be s c
+  let rp = rhsPred        c
+  res   <- (not . or) <$> mapM (`isValid` rp) (snd <$> lpi)
+  lift   $ whenLoud $ showUnsat res (F.subcId c) (F.pOr (snd <$> lpi)) rp
+  return res
+
+
diff --git a/src/Language/Fixpoint/Solver/Instantiate.hs b/src/Language/Fixpoint/Solver/Instantiate.hs
--- a/src/Language/Fixpoint/Solver/Instantiate.hs
+++ b/src/Language/Fixpoint/Solver/Instantiate.hs
@@ -33,7 +33,7 @@
 import qualified Data.List            as L
 import           Data.Maybe           (catMaybes, fromMaybe)
 import           Data.Char            (isUpper)
-import           Data.Foldable        (foldlM)
+-- import           Data.Foldable        (foldlM)
 
 (~>) :: (Expr, String) -> Expr -> EvalST Expr
 (_e,_str) ~> e' = do
@@ -47,38 +47,34 @@
 --------------------------------------------------------------------------------
 instantiate :: Config -> SInfo a -> IO (SInfo a)
 instantiate cfg fi
-  | inst      = instantiate' cfg fi
+  | rewriteAxioms cfg = instantiate' cfg fi
   | otherwise = return fi
+
+instantiate' :: Config -> GInfo SimpC a -> IO (SInfo a)
+instantiate' cfg fi = sInfo cfg fi env <$> withCtx cfg file env act
   where
-    inst      = rewriteAxioms cfg || arithmeticAxioms cfg
+    act ctx         = forM cstrs $ \(i, c) ->
+                        (i,) . notracepp ("INSTANTIATE i = " ++ show i) <$> instSimpC cfg ctx (bs fi) (ae fi) i c
+    cstrs           = M.toList (cm fi)
+    file            = srcFile cfg ++ ".evals"
+    env             = symbolEnv cfg fi
 
--- instantiate' :: Config -> SInfo a -> IO (SInfo a)
--- instantiate' cfg fi = do
-    -- ctx <- SMT.makeContextWithSEnv cfg file env
-    -- -- ctx <- SMT.makeSmtContext cfg file (ddecls fi) [] (applySorts fi)
-    -- SMT.smtPush ctx
-    -- ips <- forM cstrs $ \(i, c) -> do
-             -- p <- instSimpC cfg ctx (bs fi) (ae fi) i c
-             -- return (i, elaborate "PLE-instantiate" env p)
-    -- return (strengthenHyp fi ips)
+sInfo :: Config -> GInfo SimpC a -> SymEnv -> [(SubcId, Expr)] -> SInfo a
+sInfo cfg fi env ips = strengthenHyp fi' (notracepp "ELAB-INST:  " $ zip is ps'')
+  where
+    (is, ps)         = unzip ips
+    (ps', axs)       = defuncAxioms cfg env ps
+    ps''             = elaborate "PLE1" env <$> ps'
+    axs'             = elaborate "PLE2" env <$> axs
+    fi'              = fi { asserts = axs' ++ asserts fi }
 
-instantiate' :: Config -> GInfo SimpC a -> IO (SInfo a)
-instantiate' cfg fi = do
+withCtx :: Config -> FilePath -> SymEnv -> (SMT.Context -> IO a) -> IO a
+withCtx cfg file env k = do
   ctx <- SMT.makeContextWithSEnv cfg file env
-  -- ctx <- SMT.makeSmtContext cfg file (ddecls fi) [] (applySorts fi)
-  SMT.smtPush ctx
-  ips           <- forM cstrs $ \(i, c) ->
-                      (i,) <$> instSimpC cfg ctx (bs fi) (ae fi) i c
-  let (is, ps)   = unzip ips
-  let (ps', axs) = defuncAxioms cfg env ps
-  let ps''       = elaborate "PLE1" env <$> ps'
-  let axs'       = elaborate "PLE2" env <$> axs
-  let fi'        = fi { asserts = axs' ++ asserts fi }
-  return         $ strengthenHyp fi' (zip is ps'')
-  where
-    cstrs        = M.toList (cm fi)
-    file         = srcFile cfg ++ ".evals"
-    env          = symbolEnv cfg fi
+  _   <- SMT.smtPush ctx
+  res <- k ctx
+  _   <- SMT.cleanupContext ctx
+  return res
 
 instSimpC :: Config -> SMT.Context -> BindEnv -> AxiomEnv
           -> Integer -> SimpC a
@@ -86,25 +82,17 @@
 instSimpC _ _ _ aenv sid _
   | not (M.lookupDefault False sid (aenvExpand aenv))
   = return PTrue
-instSimpC cfg ctx bds aenv sid sub
+instSimpC cfg ctx bds aenv _ sub
   = -- tracepp ("instSimpC " ++ show sid) .
-    pAnd . (is0 ++) .
-    (if arithmeticAxioms cfg then (is1 ++) else id) <$>
+    pAnd . (is0 ++) <$>
     if rewriteAxioms cfg then evalEqs else return []
   where
     is0              = eqBody <$> L.filter (null . eqArgs) eqs
-    is1              = instances maxNumber aenv initOccurences
-    evalEqs          =
-       map (uncurry (PAtom Eq)) .
-       filter (uncurry (/=)) <$>
-       evaluate cfg ctx ({- (vv Nothing, slhs sub): -} binds) aenv iExprs
-    initOccurences   = concatMap (makeInitOccurences as eqs) iExprs
+    evalEqs          = map (uncurry (PAtom Eq)) .
+                       filter (uncurry (/=)) <$>
+                       evaluate cfg ctx binds aenv iExprs
     eqs              = aenvEqs aenv
     (binds, iExprs)  = cstrBindExprs bds sub
-    -- fuel calculated and used only by `instances` arith rewrite method
-    fuelNumber       = M.lookupDefault 0 sid (aenvFuel aenv)
-    as               = (,fuelNumber) . eqName <$> filter (not . null . eqArgs) eqs
-    maxNumber        = (aenvSyms aenv * length initOccurences) ^ fuelNumber
 
 cstrBindExprs :: BindEnv -> SimpC a -> ([(Symbol, SortedReft)], [Expr])
 cstrBindExprs bds sub = {- tracepp "initExpressions" -} (unElab <$> binds, unElab <$> es)
@@ -166,10 +154,6 @@
                                      , knPreds  = \bs e c -> askSMT c bs e
                                      }
   where
-    -- (xv, sv) = (vv Nothing, sr_sort $ snd $ head es)
-    -- fbinds   = toListSEnv fenv ++ [(x, s) | (x, RR s _) <- es]
-    -- senv     = senvCtx { seSort = fromListSEnv fbinds }
-    -- thySyms  = seTheory senvCtx
     senv = SMT.ctxSymEnv ctx
     context :: IO SMT.Context
     context = do
@@ -186,9 +170,11 @@
     -- 1. when e2 is a data con and can lead to further reductions
     -- 2. when size e2 < size e1
     -- @TODO: Can this be generalized?
+    -- simpleEqs = []
+    simpleEqs = {- tracepp "SIMPLEEQS" $ -} _makeSimplifications (aenvSimpl aenv) =<<
+               L.nub (catMaybes [_getDCEquality e1 e2 | PAtom Eq e1 e2 <- atms])
     atms = splitPAnd =<< (expr <$> filter isProof es)
-    simpleEqs = makeSimplifications (aenvSimpl aenv) =<<
-                L.nub (catMaybes [getDCEquality e1 e2 | PAtom Eq e1 e2 <- atms])
+    isProof (_, RR s _) = showpp s == "Tuple"
     sels = (go . expr) =<< es
     go e = let es   = splitPAnd e
                su   = mkSubst [(x, EVar y)  | PAtom Eq (EVar x) (EVar y) <- es ]
@@ -220,10 +206,9 @@
     -- TODO: Stringy hacks
     isSelector :: Symbol -> Bool
     isSelector  = L.isPrefixOf "select" . symbolString
-    isProof (_, RR s _) =  showpp s == "Tuple"
 
-makeSimplifications :: [Rewrite] -> (Symbol, [Expr], Expr) -> [(Expr, Expr)]
-makeSimplifications sis (dc, es, e)
+_makeSimplifications :: [Rewrite] -> (Symbol, [Expr], Expr) -> [(Expr, Expr)]
+_makeSimplifications sis (dc, es, e)
  = go =<< sis
  where
    go (SMeasure f dc' xs bd)
@@ -232,8 +217,8 @@
    go _
      = []
 
-getDCEquality :: Expr -> Expr -> Maybe (Symbol, [Expr], Expr)
-getDCEquality e1 e2
+_getDCEquality :: Expr -> Expr -> Maybe (Symbol, [Expr], Expr)
+_getDCEquality e1 e2
     | Just dc1 <- f1
     , Just dc2 <- f2
     = if dc1 == dc2
@@ -252,8 +237,8 @@
     -- TODO: Stringy hacks
     getDC (EVar x)
       = if isUpper $ head $ symbolString $ dropModuleNames x
-           then Just x
-           else Nothing
+          then Just x
+          else Nothing
     getDC _
       = Nothing
 
@@ -279,25 +264,27 @@
 -- that appears in the expression e
 -- required by PMEquivalence.mconcatChunk
 assertSelectors :: Knowledge -> Expr -> EvalST ()
-assertSelectors γ e = do
-   EvalEnv _ _ evaenv <- get
-   let sims = aenvSimpl evaenv
-   _ <- foldlM (\_ s -> Vis.mapMExpr (go s) e) e sims
-   return ()
-  where
-    go :: Rewrite -> Expr -> EvalST Expr
-    go (SMeasure f dc xs bd) e@(EApp _ _)
-      | (EVar dc', es) <- splitEApp e
-      , dc == dc', length xs == length es
-      = addSMTEquality γ (EApp (EVar f) e) (subst (mkSubst $ zip xs es) bd)
-      >> return e
-    go _ e
-      = return e
+assertSelectors _ _ = return ()
+-- ADT/DATACONS TAKES CARE OF THIS
+-- assertSelectors γ e = do
+   -- EvalEnv _ _ evaenv <- get
+   -- let sims = aenvSimpl evaenv
+   -- _ <- foldlM (\_ s -> Vis.mapMExpr (go s) e) e sims
+   -- return ()
+  -- where
+    -- go :: Rewrite -> Expr -> EvalST Expr
+    -- go (SMeasure f dc xs bd) e@(EApp _ _)
+      -- | (EVar dc', es) <- splitEApp e
+      -- , dc == dc', length xs == length es
+      -- = addSMTEquality γ (EApp (EVar f) e) (subst (mkSubst $ zip xs es) bd)
+      -- >> return e
+    -- go _ e
+      -- = return e
 
-addSMTEquality :: Knowledge -> Expr -> Expr -> EvalST (IO ())
-addSMTEquality γ e1 e2 =
-  return $ do ctx <- knContext γ
-              SMT.smtAssert ctx (PAtom Eq (makeLam γ e1) (makeLam γ e2))
+-- addSMTEquality :: Knowledge -> Expr -> Expr -> EvalST (IO ())
+-- addSMTEquality γ e1 e2 =
+--  return $ do ctx <- knContext γ
+--              SMT.smtAssert ctx (PAtom Eq (makeLam γ e1) (makeLam γ e2))
 
 --------------------------------------------------------------------------------
 -- | Symbolic Evaluation with SMT
@@ -377,8 +364,16 @@
   = PImp <$> eval γ e1 <*> eval γ e2
 eval γ (PIff e1 e2)
   = PIff <$> eval γ e1 <*> eval γ e2
+eval γ (PAnd es)
+  = PAnd <$> (eval γ <$$> es)
+eval γ (POr es)
+  = POr  <$> (eval γ <$$> es)
 eval _ e = return e
 
+(<$$>) :: (Monad m) => (a -> m b) -> [a] -> m [b]
+f <$$> xs = f Misc.<$$> xs
+
+
 evalArgs :: Knowledge -> Expr -> EvalST (Expr, [Expr])
 evalArgs γ = go []
   where
@@ -418,19 +413,19 @@
     go e (x, EIte b e1 e2) = EIte b (subst1 e (x, e1)) (subst1 e (x, e2))
     go e (x, ex)           = subst1 e (x, ex)
 
-evalRecApplication :: Knowledge ->  Expr -> Expr -> EvalST Expr
+evalRecApplication :: Knowledge -> Expr -> Expr -> EvalST Expr
 evalRecApplication γ e (EIte b e1 e2)
   = do b' <- eval γ b
        b'' <- liftIO (isValid γ b')
        if b''
           then addApplicationEq γ e e1 >>
-               assertSelectors γ e1 >>
+               ({-# SCC "assertSelectors-1" #-} assertSelectors γ e1) >>
                eval γ e1 >>=
                ((e, "App") ~>)
           else do b''' <- liftIO (isValid γ (PNot b'))
                   if b'''
                      then addApplicationEq γ e e2 >>
-                          assertSelectors γ e2 >>
+                          ({-# SCC "assertSelectors-1" #-} assertSelectors γ e2) >>
                           eval γ e2 >>=
                           ((e, "App") ~>)
                      else return e
@@ -488,85 +483,6 @@
               then go $ EApp e1' e2'
               else (False, EApp e1' e2')
     go e = (False, e)
-
-
--- Fuel
--------
-type Fuel = Int
-type FuelMap = [(Symbol, Fuel)]
-
-goodFuelMap :: FuelMap -> Bool
-goodFuelMap = any ((>0) . snd)
-
-hasFuel :: FuelMap -> Symbol -> Bool
-hasFuel fm x = maybe True (\x -> 0 < x) (L.lookup x fm)
-
-makeFuelMap :: (Fuel -> Fuel) -> FuelMap -> Symbol -> FuelMap
-makeFuelMap f ((x, fx):fs) y
-  | x == y    = (x, f fx) : fs
-  | otherwise = (x, fx)   : makeFuelMap f fs y
-makeFuelMap _ _ _ = error "makeFuelMap"
-
-----------------------------
--- Naive evaluation strategy
-----------------------------
-data Occurence = Occ {_ofun :: Symbol, _oargs :: [Expr], ofuel :: FuelMap}
- deriving (Show)
-
-instances :: Int -> AxiomEnv -> [Occurence] -> [Expr]
-instances maxIs aenv !occs
-  = instancesLoop aenv maxIs eqs occs -- (eqBody <$> eqsZero) ++ is
-  where
-    eqs = filter (not . null . eqArgs) (aenvEqs  aenv)
-
--- Naively: Instantiation happens arbitrary times (in recursive functions it
--- diverges)
--- Step 1 [done] : Hack it so that instantiation of axiom A happens from an
--- occurences and its subsequent instances <= FUEL times
--- How? Hack expressions to contatin fuel info within eg Cst Step 2: Compute
--- fuel based on Ranjit's algorithm
-
-instancesLoop :: AxiomEnv ->  Int -> [Equation] -> [Occurence] -> [Expr]
-instancesLoop _ _ eqs = go 0 []
-  where
-    go :: Int -> [Expr] -> [Occurence] -> [Expr]
-    go !i acc occs
-       = let is      = concatMap (unfold eqs) occs
-             newIs   = findNewEqs is acc
-             newOccs = concatMap (grepOccurences eqs) newIs
-             in
-         if null newIs
-            then acc
-            else go (i + length newIs) ((fst <$> newIs) ++ acc) newOccs
-
-findNewEqs :: [(Expr, FuelMap)] -> [Expr] -> [(Expr, FuelMap)]
-findNewEqs [] _ = []
-findNewEqs ((e, f):xss) es
-  | e `elem` es = findNewEqs xss es
-  | otherwise   = (e,f):findNewEqs xss es
-
-makeInitOccurences :: [(Symbol, Fuel)] -> [Equation] -> Expr -> [Occurence]
-makeInitOccurences xs eqs e
-  = [Occ x es xs | (EVar x, es) <- splitEApp <$> Vis.eapps e
-                 , Equ x' xs' _ <- eqs, x == x'
-                 , length xs' == length es]
-
-grepOccurences :: [Equation] -> (Expr, FuelMap) -> [Occurence]
-grepOccurences eqs (e, fs)
-  = filter (goodFuelMap . ofuel)
-           [Occ x es fs | (EVar x, es) <- splitEApp <$> Vis.eapps e
-                        , Equ x' xs' _ <- eqs, x == x'
-                        , length xs' == length es]
-
-unfold :: [Equation] -> Occurence -> [(Expr, FuelMap)]
-unfold eqs (Occ x es fs)
-  = catMaybes [if hasFuel fs x
-                  then Just (subst (mkSubst $ zip  xs' es) e
-                            , makeFuelMap (\x -> x-1) fs x)
-                  else Nothing
-              | Equ x' xs' e <- eqs
-              , x == x'
-              , length xs' == length es]
 
 instance Expression (Symbol, SortedReft) where
   expr (x, RR _ (Reft (v, r))) = subst1 (expr r) (v, EVar x)
diff --git a/src/Language/Fixpoint/Solver/Sanitize.hs b/src/Language/Fixpoint/Solver/Sanitize.hs
--- a/src/Language/Fixpoint/Solver/Sanitize.hs
+++ b/src/Language/Fixpoint/Solver/Sanitize.hs
@@ -37,6 +37,8 @@
 sanitize :: F.SInfo a -> SanitizeM (F.SInfo a)
 --------------------------------------------------------------------------------
 sanitize =    -- banIllScopedKvars
+        --      Misc.fM dropAdtMeasures
+        --      >=>
              Misc.fM dropFuncSortedShadowedBinders
          >=> Misc.fM sanitizeWfC
          >=> Misc.fM replaceDeadKvars
@@ -48,6 +50,23 @@
 
 
 --------------------------------------------------------------------------------
+-- | 'dropAdtMeasures' removes all the measure definitions that correspond to
+--   constructor, selector or test names for declared datatypes, as these are
+--   now "natively" handled by the SMT solver.
+--------------------------------------------------------------------------------
+_dropAdtMeasures :: F.SInfo a -> F.SInfo a
+_dropAdtMeasures si = si { F.ae = dropAdtAenv (F.ddecls si) (F.ae si) }
+
+dropAdtAenv :: [F.DataDecl] -> F.AxiomEnv -> F.AxiomEnv
+dropAdtAenv ds ae = ae { F.aenvSimpl = filter (not . isAdt) (F.aenvSimpl ae) }
+  where
+    isAdt         = (`S.member` adtSyms) . F.smName
+    adtSyms       = adtSymbols ds
+
+adtSymbols :: [F.DataDecl] -> S.HashSet F.Symbol
+adtSymbols = S.fromList . map fst . concatMap Thy.dataDeclSymbols
+
+--------------------------------------------------------------------------------
 -- | `addLiterals` traverses the constraints to find (string) literals that
 --   are then added to the `dLits` field.
 --------------------------------------------------------------------------------
@@ -358,11 +377,14 @@
 --------------------------------------------------------------------------------
 dropFuncSortedShadowedBinders :: F.SInfo a -> F.SInfo a
 --------------------------------------------------------------------------------
-dropFuncSortedShadowedBinders fi = dropBinders f (const True) fi
+dropFuncSortedShadowedBinders fi = dropBinders ok (const True) fi
   where
-    f x t  = not (M.member x defs) || F.allowHO fi || isFirstOrder t
-    defs   = M.fromList $ F.toListSEnv $ F.gLits fi
+    ok x t  = (M.member x defs) ==> (F.allowHO fi || isFirstOrder t)
+    defs    = M.fromList $ F.toListSEnv $ F.gLits fi
 
+(==>) :: Bool -> Bool -> Bool
+p ==> q = not p || q
+
 --------------------------------------------------------------------------------
 -- | Drop irrelevant binders from WfC Environments
 --------------------------------------------------------------------------------
@@ -405,8 +427,8 @@
                          , F.ws    = ws'
                          , F.gLits = lits' }
   where
-    discards        = diss
-    (bs', diss)     = filterBindEnv f $ F.bs fi
+    -- discards        = diss
+    (bs', discards) = filterBindEnv f $ F.bs fi
     cm'             = deleteSubCBinds discards   <$> F.cm fi
     ws'             = deleteWfCBinds  discards   <$> F.ws fi
     lits'           = F.filterSEnv g (F.gLits fi)
diff --git a/src/Language/Fixpoint/Solver/Solution.hs b/src/Language/Fixpoint/Solver/Solution.hs
--- a/src/Language/Fixpoint/Solver/Solution.hs
+++ b/src/Language/Fixpoint/Solver/Solution.hs
@@ -40,7 +40,7 @@
 --------------------------------------------------------------------------------
 -- | Initial Solution (from Qualifiers and WF constraints) ---------------------
 --------------------------------------------------------------------------------
-init :: Config -> F.SInfo a -> S.HashSet F.KVar -> Sol.Solution
+init :: (F.Fixpoint a) => Config -> F.SInfo a -> S.HashSet F.KVar -> Sol.Solution
 --------------------------------------------------------------------------------
 init cfg si ks = Sol.fromList senv mempty keqs [] mempty
   where
@@ -271,6 +271,8 @@
   where
     err x            = error $ "Solution.mkSubst: unknown binder " ++ F.showpp x
 
+
+-- LH #1091
 mkSubst :: F.SymEnv -> F.Symbol -> F.Sort -> F.Expr -> F.Sort -> F.Expr
 mkSubst env x tx ey ty
   | tx == ty    = F.EEq ex ey
diff --git a/src/Language/Fixpoint/Solver/Solve.hs b/src/Language/Fixpoint/Solver/Solve.hs
--- a/src/Language/Fixpoint/Solver/Solve.hs
+++ b/src/Language/Fixpoint/Solver/Solve.hs
@@ -13,6 +13,7 @@
 import           Control.Monad (when, filterM)
 import           Control.Monad.State.Strict (lift)
 import           Language.Fixpoint.Misc
+import qualified Language.Fixpoint.Misc            as Misc
 import qualified Language.Fixpoint.Types           as F
 import qualified Language.Fixpoint.Types.Solutions as Sol
 import qualified Language.Fixpoint.Types.Graduals  as G
@@ -46,7 +47,7 @@
  = solveGradual cfg fi
 
 solve cfg fi = do
-    -- donePhase Loud "Worklist Initialize"
+    donePhase Misc.Loud "Worklist Initialize"
     (res, stat) <- withProgressFI sI $ runSolverM cfg sI act
     when (solverStats cfg) $ printStats fi wkl stat
     -- print (numIter stat)
diff --git a/src/Language/Fixpoint/Solver/UniqifyKVars.hs b/src/Language/Fixpoint/Solver/UniqifyKVars.hs
--- a/src/Language/Fixpoint/Solver/UniqifyKVars.hs
+++ b/src/Language/Fixpoint/Solver/UniqifyKVars.hs
@@ -73,7 +73,7 @@
 updateWfc :: SInfo a -> WfC a -> SInfo a
 updateWfc fi w    = fi'' { ws = M.insert k w' (ws fi) }
   where
-    w'            = updateWfCExpr (subst su) w'' 
+    w'            = updateWfCExpr (subst su) w''
     w''           = w { wenv = insertsIBindEnv newIds mempty, wrft = (v', t, k) }
     (_, fi'')     = newTopBind v' (trueSortedReft t) fi'
     (fi', newIds) = foldl' (accumBindsIfValid k) (fi, []) (elemsIBindEnv $ wenv w)
diff --git a/src/Language/Fixpoint/SortCheck.hs b/src/Language/Fixpoint/SortCheck.hs
--- a/src/Language/Fixpoint/SortCheck.hs
+++ b/src/Language/Fixpoint/SortCheck.hs
@@ -153,16 +153,15 @@
 instance Elaborate (SimpC a) where
   elaborate x env c = c {_crhs = elaborate x env (_crhs c) }
 
--- instance Elaborate Qualifier where
-  -- elaborate env q = q { qParams = elaborate env (qParams q)
-                      -- , qBody   = elaborate [env ++ qParams] (qBody q)
-                      -- }
 
+--------------------------------------------------------------------------------
+-- | 'elabExpr' adds "casts" to decorate polymorphic instantiation sites.
+--------------------------------------------------------------------------------
 elabExpr :: String -> SymEnv -> Expr -> Expr
 elabExpr msg env e
   = case runCM0 $ elab (env, f) e of
       Left msg -> die $ err dummySpan (d msg)
-      Right s  -> fst s
+      Right s  -> notracepp ("elabExpr: e =" ++ showpp e) $ fst s
     where
       sEnv = seSort env
       f    = (`lookupSEnvWithDistance` sEnv)
@@ -175,6 +174,9 @@
                  , nest 4 (pprint $ subEnv sEnv e)
                  ]
 
+--------------------------------------------------------------------------------
+-- | 'elabApply' replaces all direct function calls indirect calls via `apply`
+--------------------------------------------------------------------------------
 elabApply :: SymEnv -> Expr -> Expr
 elabApply env = go
   where
@@ -241,11 +243,7 @@
 -- | Checking Refinements ------------------------------------------------------
 --------------------------------------------------------------------------------
 
--- RJ: why are we handrolling monads!
 -- | Types used throughout checker
-
--- newtype CheckM a = CM {runCM :: StateM -> (StateM, Either String a)}
--- type CheckM   = ExceptT ChError (State ChState)
 type CheckM   = StateT ChState (Either ChError)
 type ChError  = String
 type ChState  = Int
@@ -257,25 +255,15 @@
 act `withError` e' = act `catchError` (\e -> throwError (e ++ "\n  because\n" ++ e'))
 
 runCM0 :: CheckM a -> Either String a
--- runCM0 act = snd $ runCM act initCM
-runCM0 act = fst <$> runStateT act initCM -- :: Either ChError (a, ChState)
+runCM0 act = fst <$> runStateT act initCM
   where
     initCM = 42
 
-
--- class Freshable a where
---  fresh   :: CheckM a
---  refresh :: a -> CheckM a
---  refresh _ = fresh
-
--- instance Freshable Int where
-
 fresh :: CheckM Int
 fresh = do
   !n <- get
   put (n + 1)
   return n
-    -- CM (\n -> (n + 1, Right n))
 
 --------------------------------------------------------------------------------
 -- | Checking Refinements ------------------------------------------------------
@@ -390,7 +378,7 @@
   return (EBin o (ECst e1' s1) (ECst e2' s2), s)
 
 elab f (EApp e1@(EApp _ _) e2) = do
-  (e1', _, e2', s2, s) <- elabEApp f e1 e2
+  (e1', _, e2', s2, s) <- notracepp "ELAB-EAPP" <$> elabEApp f e1 e2
   return (eAppC s e1'          (ECst e2' s2), s)
 
 elab f (EApp e1 e2) = do
@@ -502,7 +490,7 @@
 cast e          t = ECst e t
 
 elabAs :: ElabEnv -> Sort -> Expr -> CheckM Expr
-elabAs f t e = {- tracepp _msg <$> -} go e
+elabAs f t e = notracepp _msg <$>  go e
   where
     _msg  = "elabAs: t = " ++ showpp t ++ " e = " ++ showpp e
     go (EApp e1 e2)   = elabAppAs f t e1 e2
@@ -525,7 +513,7 @@
 
 elabEApp  :: ElabEnv -> Expr -> Expr -> CheckM (Expr, Sort, Expr, Sort, Sort)
 elabEApp f@(_, g) e1 e2 = do
-  (e1', s1)     <- elab f e1
+  (e1', s1)     <- notracepp ("elabEApp1: e1 = " ++ showpp e1) <$> elab f e1
   (e2', s2)     <- elab f e2
   (s1', s2', s) <- elabAppSort g e1 e2 s1 s2
   return           (e1', s1', e2', s2', s)
@@ -534,7 +522,7 @@
 elabAppSort f e1 e2 s1 s2 = do
   let e            = Just (EApp e1 e2)
   (sIn, sOut, su) <- checkFunSort s1
-  su'             <- unify1 f e su sIn s2 -- unifyMany f e su [sIn] [s2]
+  su'             <- unify1 f e su sIn s2
   return           $ (apply su' s1, apply su' s2, apply su' sOut)
 
 
@@ -675,8 +663,6 @@
   t2 <- checkExpr f e2
   checkIteTy f p e1 e2 t1 t2
 
---  ((`apply` t1) <$> unifys f e' [t1] [t2]) `withError` (errIte e1 e2 t1 t2)
-
 checkIteTy :: Env -> Expr -> Expr -> Expr -> Sort -> Sort -> CheckM Sort
 checkIteTy f p e1 e2 t1 t2
   = ((`apply` t1) <$> unifys f e' [t1] [t2]) `withError` (errIte e1 e2 t1 t2)
@@ -928,36 +914,13 @@
 instantiate :: Sort -> CheckM Sort
 --------------------------------------------------------------------------------
 instantiate !t = go t
-  -- / | tn > 10   = go $ tracepp ("SIZE=" ++ show tn) t
-  -- / | otherwise = go t
   where
-    -- _tn = sortSize t
     go (FAbs !i !t) = do
       !t'    <- instantiate t
       !v     <- fresh
       return  $ subst i (FVar v) t'
     go !t =
       return t
-
--- instantiate s = do
---  where
---    (is, t)   = unAbs s
-
-_unAbs :: Sort -> ([Int], Sort)
-_unAbs = go []
-  where
-    go !acc (FAbs !i !t) = go (i:acc) t
-    go !acc !t           = (reverse acc, t)
-
-_sortSize :: Sort -> Int
-_sortSize !t = go t
-  where
-    go :: Sort -> Int
-    go (FApp  !t1 !t2) = go t1 + go t2
-    go (FFunc !t1 !t2) = go t1 + go t2
-    go (FAbs  _   !t)  = 1     + go t
-    go _               = 1
-
 
 unifyVar :: Env -> Maybe Expr -> TVSubst -> Int -> Sort -> CheckM TVSubst
 unifyVar _ _ θ !i !t@(FVar !j)
diff --git a/src/Language/Fixpoint/Types/Config.hs b/src/Language/Fixpoint/Types/Config.hs
--- a/src/Language/Fixpoint/Types/Config.hs
+++ b/src/Language/Fixpoint/Types/Config.hs
@@ -90,7 +90,6 @@
     , nonLinCuts       :: Bool           -- ^ Treat non-linear vars as cuts
     , noslice          :: Bool           -- ^ Disable non-concrete KVar slicing
     , rewriteAxioms    :: Bool           -- ^ allow axiom instantiation via rewriting
-    , arithmeticAxioms :: Bool           -- ^ allow axiom instantiation on arithmetic expressions
     } deriving (Eq,Data,Typeable,Show,Generic)
 
 instance Default Config where
@@ -171,7 +170,6 @@
   , nonLinCuts       = False &= help "Treat non-linear kvars as cuts"
   , noslice          = False &= help "Disable non-concrete KVar slicing"
   , rewriteAxioms    = False &= help "allow axiom instantiation via rewriting"
-  , arithmeticAxioms = False &= help "Disable non-concrete KVar slicing"
   }
   &= verbosity
   &= program "fixpoint"
diff --git a/src/Language/Fixpoint/Types/Constraints.hs b/src/Language/Fixpoint/Types/Constraints.hs
--- a/src/Language/Fixpoint/Types/Constraints.hs
+++ b/src/Language/Fixpoint/Types/Constraints.hs
@@ -635,6 +635,8 @@
 toFixpoint :: (Fixpoint a, Fixpoint (c a)) => Config -> GInfo c a -> Doc
 --------------------------------------------------------------------------
 toFixpoint cfg x' =    cfgDoc   cfg
+                  $++$ declsDoc x'
+                  $++$ aeDoc    x'
                   $++$ qualsDoc x'
                   $++$ kutsDoc  x'
                 --   $++$ packsDoc x'
@@ -644,7 +646,6 @@
                   $++$ csDoc    x'
                   $++$ wsDoc    x'
                   $++$ binfoDoc x'
-                  $++$ aeDoc    x'
                   $++$ text "\n"
   where
     cfgDoc cfg    = text ("// " ++ show cfg)
@@ -654,6 +655,7 @@
     wsDoc         = vcat     . map toFix . M.elems . ws
     kutsDoc       = toFix    . kuts
     -- packsDoc      = toFix    . packs
+    declsDoc      = vcat     . map ((text "data" <+>) . toFix) . ddecls
     bindsDoc      = toFix    . bs
     qualsDoc      = vcat     . map toFix . quals
     aeDoc         = toFix    . ae
@@ -736,10 +738,8 @@
 ---------------------------------------------------------------------------
 -- | Axiom Instantiation Information --------------------------------------
 ---------------------------------------------------------------------------
-data AxiomEnv = AEnv { aenvSyms    :: !Int
-                     , aenvEqs     :: ![Equation]
+data AxiomEnv = AEnv { aenvEqs     :: ![Equation]
                      , aenvSimpl   :: ![Rewrite]
-                     , aenvFuel    :: M.HashMap SubcId Int
                      , aenvExpand  :: M.HashMap SubcId Bool
                      }
   deriving (Eq, Show, Generic)
@@ -756,12 +756,10 @@
 instance NFData Eliminate
 
 instance Monoid AxiomEnv where
-  mempty = AEnv 0 [] [] (M.fromList []) (M.fromList [])
-  mappend a1 a2 = AEnv aenvSyms' aenvEqs' aenvSimpl' aenvFuel' aenvExpand'
-    where aenvSyms'    = aenvSyms a1 + aenvSyms a2
-          aenvEqs'     = mappend (aenvEqs a1) (aenvEqs a2)
+  mempty = AEnv [] [] (M.fromList [])
+  mappend a1 a2 = AEnv aenvEqs' aenvSimpl' aenvExpand'
+    where aenvEqs'     = mappend (aenvEqs a1) (aenvEqs a2)
           aenvSimpl'   = mappend (aenvSimpl a1) (aenvSimpl a2)
-          aenvFuel'    = mappend (aenvFuel a1) (aenvFuel a2)
           aenvExpand'  = mappend (aenvExpand a1) (aenvExpand a2)
 
 data Equation = Equ { eqName :: Symbol
@@ -785,12 +783,9 @@
 
 instance Fixpoint AxiomEnv where
   toFix axe = vcat ((toFix <$> aenvEqs axe) ++ (toFix <$> aenvSimpl axe))
-              $+$ text "syms" <+> text (show (aenvSyms axe))
-              $+$ text "fuel" <+> toFix (pairdoc <$> M.toList (aenvFuel axe))
               $+$ text "expand" <+> toFix (pairdoc <$> M.toList(aenvExpand axe))
     where pairdoc (x,y) = text $ show x ++ " : " ++ show y
 
--- teehee
 instance Fixpoint Doc where
   toFix = id
 
@@ -798,6 +793,7 @@
   toFix (Equ f xs e)  = text "define"
                      <+> toFix f <+> hsep (toFix <$> xs) <+> text " = "
                      <+> lparen <> toFix e <> rparen
+
 instance Fixpoint Rewrite where
   toFix (SMeasure f d xs e)
     = text "match"
diff --git a/src/Language/Fixpoint/Types/Names.hs b/src/Language/Fixpoint/Types/Names.hs
--- a/src/Language/Fixpoint/Types/Names.hs
+++ b/src/Language/Fixpoint/Types/Names.hs
@@ -98,6 +98,7 @@
   , bitVecName
   , bvAndName
   , bvOrName
+  , propConName
   -- HKT , tyAppName
   , prims
   , mulFuncName
@@ -549,14 +550,14 @@
 funConName   = "->"
 
 
-listConName, listLConName, tupConName, _propConName, _hpropConName, vvName, setConName, mapConName :: Symbol
+listConName, listLConName, tupConName, propConName, _hpropConName, vvName, setConName, mapConName :: Symbol
 listConName  = "[]"
 listLConName = "List"
 tupConName   = "Tuple"
 setConName   = "Set_Set"
 mapConName   = "Map_t"
 vvName       = "VV"
-_propConName  = "Prop"
+propConName  = "Prop"
 _hpropConName = "HProp"
 
 strConName  :: (IsString a) => a
@@ -584,7 +585,7 @@
 divFuncName  = "Z3_OP_DIV"
 
 prims :: [Symbol]
-prims = [ _propConName
+prims = [ propConName
         , _hpropConName
         , vvName
         , "Pred"
diff --git a/src/Language/Fixpoint/Types/Sorts.hs b/src/Language/Fixpoint/Types/Sorts.hs
--- a/src/Language/Fixpoint/Types/Sorts.hs
+++ b/src/Language/Fixpoint/Types/Sorts.hs
@@ -41,6 +41,7 @@
   , isFirstOrder
   , mappendFTC
   , fTyconSymbol, symbolFTycon, fTyconSort, symbolNumInfoFTyCon
+  , fTyconSelfSort
   , fApp
   , fAppTC
   , fObj
@@ -52,7 +53,7 @@
   , mkFFunc
   , bkFFunc
 
-  , isNumeric, isReal, isString
+  , isNumeric, isReal, isString, isPolyInst 
 
   -- * User-defined ADTs
   , DataField (..)
@@ -161,6 +162,9 @@
 fAppTC :: FTycon -> [Sort] -> Sort
 fAppTC = fApp . fTyconSort
 
+fTyconSelfSort :: FTycon -> Int -> Sort
+fTyconSelfSort c n = fAppTC c [FVar i | i <- [0..(n - 1)]]
+
 -- | fApp' (FApp (FApp "Map" key) val) ===> ["Map", key, val]
 --   That is, `fApp'` is used to split a type application into
 --   the FTyCon and its args.
@@ -193,7 +197,7 @@
   | otherwise
   = Just (is, ss, r)
   where
-    (is, ss, r) = go [] [] s
+    (is, ss, r)            = go [] [] s
     go vs ss (FAbs i t)    = go (i:vs) ss t
     go vs ss (FFunc s1 s2) = go vs (s1:ss) s2
     go vs ss t             = (reverse vs, reverse ss, t)
@@ -284,7 +288,7 @@
   where
     go [] [s]    = s
     go [] (s:ss) = FFunc s $ go [] ss
-    go (i:is) ss = FAbs i $ go is ss
+    go (i:is) ss = FAbs  i $ go is ss
     go _ _       = error "cannot happen"
 
    -- foldl (flip FAbs) (foldl1 (flip FFunc) ss) [0..i-1]
@@ -305,10 +309,20 @@
     go t             = [t]
 bkFun _              = Nothing
 
+isPolyInst :: Sort -> Sort -> Bool
+isPolyInst s t = isPoly s && not (isPoly t)
 
+isPoly :: Sort -> Bool
+isPoly (FAbs {}) = True
+isPoly _         = False
+
+
 instance Hashable FTycon where
   hashWithSalt i (TC s _) = hashWithSalt i s
 
+instance Loc FTycon where
+  srcSpan (TC c _) = srcSpan c
+
 instance Hashable Sort
 
 newtype Sub = Sub [(Int, Sort)] deriving (Generic)
@@ -425,7 +439,6 @@
 instance NFData FTycon where
   rnf (TC x i) = x `seq` i `seq` ()
 
--- data FTycon   = TC LocSymbol TCInfo deriving (Ord, Show, Data, Typeable, Generic)
 
 instance NFData TCInfo
 instance NFData Sort
diff --git a/src/Language/Fixpoint/Types/Spans.hs b/src/Language/Fixpoint/Types/Spans.hs
--- a/src/Language/Fixpoint/Types/Spans.hs
+++ b/src/Language/Fixpoint/Types/Spans.hs
@@ -176,8 +176,14 @@
 dummySpan = SS l l
   where l = initialPos ""
 
-atLoc :: Located a -> b -> Located b
-atLoc (Loc l l' _) = Loc l l'
+-- atLoc :: Located a -> b -> Located b
+-- atLoc (Loc l l' _) = Loc l l'
+
+atLoc :: (Loc l) => l -> b -> Located b
+atLoc z x   = Loc l l' x
+  where
+    SS l l' = srcSpan z
+
 
 locAt :: String -> a -> Located a
 locAt s  = Loc l l
diff --git a/src/Language/Fixpoint/Types/Theories.hs b/src/Language/Fixpoint/Types/Theories.hs
--- a/src/Language/Fixpoint/Types/Theories.hs
+++ b/src/Language/Fixpoint/Types/Theories.hs
@@ -125,7 +125,7 @@
 --   such a strategy would NUKE the entire apply-sort machinery from the CODE base.
 --   [TODO]: dynamic-apply-declaration
 
-funcSorts :: SEnv a -> [Sort] -> [FuncSort]
+funcSorts :: SEnv DataDecl -> [Sort] -> [FuncSort]
 funcSorts dEnv ts = [ (t1, t2) | t1 <- smts, t2 <- smts]
   where
     smts         = Misc.sortNub $ concat [ [tx t1, tx t2] | FFunc t1 t2 <- ts]
@@ -160,10 +160,10 @@
     args (FFunc a b) = (a, b)
     args _           = (FInt, FInt)
 
-applySmtSort :: SEnv a -> Sort -> SmtSort
+applySmtSort :: SEnv DataDecl -> Sort -> SmtSort
 applySmtSort = sortSmtSort False
 
-isIntSmtSort :: SEnv a -> Sort -> Bool
+isIntSmtSort :: SEnv DataDecl -> Sort -> Bool
 isIntSmtSort env s = SInt == applySmtSort env s
 
 --------------------------------------------------------------------------------
@@ -195,9 +195,11 @@
 --------------------------------------------------------------------------------
 
 data Sem
-  = Uninterp                     -- ^ for UDF: `len`, `height`, `append`
-  | Data                         -- ^ for ADT ctors & accessor: `cons`, `nil`, `head`
-  | Theory                       -- ^ for theory ops: mem, cup, select
+  = Uninterp      -- ^ for UDF: `len`, `height`, `append`
+  | Ctor         -- ^ for ADT constructor and tests: `cons`, `nil`
+  | Test          -- ^ for ADT tests : `is$cons`
+  | Field         -- ^ for ADT field: `hd`, `tl`
+  | Theory        -- ^ for theory ops: mem, cup, select
   deriving (Eq, Ord, Show, Data, Typeable, Generic)
 
 instance B.Binary Sem
@@ -223,11 +225,15 @@
 instance NFData   SmtSort
 instance B.Binary SmtSort
 
--- | 'smtSort True  msg t' serializes a sort 't' using type variables,
+-- | The 'poly' parameter is True when we are *declaring* sorts,
+--   and so we need to leave type variables be; it is False when
+--   we are declaring variables etc., and there, we serialize them
+--   using `Int` (though really, there SHOULD BE NO floating tyVars...
+--   'smtSort True  msg t' serializes a sort 't' using type variables,
 --   'smtSort False msg t' serializes a sort 't' using 'Int' instead of tyvars.
 
-sortSmtSort :: Bool -> SEnv a -> Sort -> SmtSort
-sortSmtSort poly env  = go
+sortSmtSort :: Bool -> SEnv DataDecl -> Sort -> SmtSort
+sortSmtSort poly env  = go . unAbs
   where
     go (FFunc _ _)    = SInt
     go FInt           = SInt
@@ -237,9 +243,9 @@
     go (FVar i)
       | poly          = SVar i
       | otherwise     = SInt
-    go t              = fappSmtSort poly env ct ts where (ct:ts)= unFApp t
+    go t              = fappSmtSort poly env ct ts where (ct:ts) = unFApp t
 
-fappSmtSort :: Bool -> SEnv a -> Sort -> [Sort] -> SmtSort
+fappSmtSort :: Bool -> SEnv DataDecl -> Sort -> [Sort] -> SmtSort
 fappSmtSort poly env = go
   where
 -- HKT    go t@(FVar _) ts            = SApp (sortSmtSort poly env <$> (t:ts))
@@ -253,11 +259,15 @@
     go s []
       | isString s              = SString
     go (FTC c) ts
-      | symEnvData c env        = SData c (sortSmtSort poly env <$> ts)
+      | Just n <- tyArgs c env
+      , let i = n - length ts   = SData c ((sortSmtSort poly env <$> ts) ++ pad i)
     go _ _                      = SInt
 
-symEnvData :: (Symbolic x) => x -> SEnv a -> Bool
-symEnvData = memberSEnv . symbol
+    pad i | poly                = []
+          | otherwise           = replicate i SInt
+
+tyArgs :: (Symbolic x) => x -> SEnv DataDecl -> Maybe Int
+tyArgs x env = ddVars <$> lookupSEnv (symbol x) env
 
 instance PPrint SmtSort where
   pprintTidy _ SInt         = text "Int"
diff --git a/src/Language/Fixpoint/Types/Visitor.hs b/src/Language/Fixpoint/Types/Visitor.hs
--- a/src/Language/Fixpoint/Types/Visitor.hs
+++ b/src/Language/Fixpoint/Types/Visitor.hs
@@ -39,6 +39,7 @@
   -- * Sorts
   , foldSort
   , mapSort
+  , foldDataDecl
 
 
   ) where
@@ -337,6 +338,14 @@
     go !(FAbs i t)    = FAbs i (step t)
     go !t             = t
 
+foldDataDecl :: (a -> Sort -> a) -> a -> DataDecl -> a
+foldDataDecl f acc = L.foldl' f acc . dataDeclSorts
+
+dataDeclSorts :: DataDecl -> [Sort]
+dataDeclSorts = concatMap dataCtorSorts . ddCtors
+
+dataCtorSorts :: DataCtor -> [Sort]
+dataCtorSorts = map dfSort . dcFields
 ---------------------------------------------------------------
 -- | String Constants -----------------------------------------
 ---------------------------------------------------------------
diff --git a/stack.yaml b/stack.yaml
new file mode 100644
--- /dev/null
+++ b/stack.yaml
@@ -0,0 +1,15 @@
+flags:
+  liquid-fixpoint:
+    devel: false 
+
+packages:
+- '.'
+extra-deps:
+- dotgen-0.4.2
+- fgl-visualize-0.1.0.1
+- intern-0.9.1.4
+- located-base-0.1.1.0
+
+resolver: lts-8.9
+
+# resolver: nightly-2016-05-21
diff --git a/tests/crash/num00.fq b/tests/crash/num00.fq
new file mode 100644
--- /dev/null
+++ b/tests/crash/num00.fq
@@ -0,0 +1,29 @@
+// This qualifier saves the day; solve constraints WITHOUT IT
+
+qualif Zog(v:a) : (0 <= v)
+qualif Bog(v:a) : (0 <= 1)
+
+
+bind 0 zog : {v : int | true}
+
+constraint:
+  env [0]
+  lhs {v : alpha | (v = 10)}
+  rhs {v : alpha | $k0}
+  id 1 tag []
+
+constraint:
+  env [0]
+  lhs {v : alpha | $k0}
+  rhs {v : alpha | $k0}
+  id 2 tag []
+
+constraint:
+  env [0]
+  lhs {v : alpha | $k0}
+  rhs {v : alpha | 0 <= v}
+  id 3 tag []
+
+wf:
+  env [0]
+  reft {v: alpha | $k0}
diff --git a/tests/crash/sort00.fq b/tests/crash/sort00.fq
new file mode 100644
--- /dev/null
+++ b/tests/crash/sort00.fq
@@ -0,0 +1,12 @@
+// for LH Issue 773
+
+constant foo : (func(0, [int; int]))
+
+bind 0 x     : {v: Str | true}
+
+constraint:
+  env [ 0 ]
+  lhs {v : int | (foo x = 0)}
+  rhs {v : int | (3 = 1 + 2) }
+  id 1 tag []
+
diff --git a/tests/crash/sort01.fq b/tests/crash/sort01.fq
new file mode 100644
--- /dev/null
+++ b/tests/crash/sort01.fq
@@ -0,0 +1,13 @@
+// for LH Issue 774
+
+constant foo : (func(0, [int; int]))
+
+bind 0 x     : {v: Str | true}
+bind 1 y     : {v: Str | true}
+
+constraint:
+  env [ 0; 1 ]
+  lhs {v : int | (foo x = foo y)}
+  rhs {v : int | (3 = 1 + 2) }
+  id 1 tag []
+
diff --git a/tests/cut/test00-tx.fq b/tests/cut/test00-tx.fq
new file mode 100644
--- /dev/null
+++ b/tests/cut/test00-tx.fq
@@ -0,0 +1,12 @@
+
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+bind 0 a : {v:int | (v = 10 || v = 20) }
+
+constraint:
+  env [ 0 ]
+  lhs {v : int | v = a}
+  rhs {v : int | 10 <= v}
+  id 3 
diff --git a/tests/cut/test00.fq b/tests/cut/test00.fq
new file mode 100644
--- /dev/null
+++ b/tests/cut/test00.fq
@@ -0,0 +1,28 @@
+
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+bind 0 a : {v: int | $k0}
+
+constraint:
+  env [ ]
+  lhs {v : int | (v = 10)}
+  rhs {v : int | $k0}
+  id 1 
+
+constraint:
+  env [ ]
+  lhs {v : int | v = 20}
+  rhs {v : int | $k0}
+  id 2 
+
+constraint:
+  env [ 0 ]
+  lhs {v : int | v = a}
+  rhs {v : int | 10 <= v}
+  id 3 
+
+wf:
+  env [ ]
+  reft {v: int | $k0}
diff --git a/tests/cut/test00a-tx.fq b/tests/cut/test00a-tx.fq
new file mode 100644
--- /dev/null
+++ b/tests/cut/test00a-tx.fq
@@ -0,0 +1,43 @@
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+constraint:
+  env [z : {v : int | true}]
+  lhs {v : int | (z=10) \/ (z=20)}
+  rhs {v : int | 10 <= z}
+  id 3 
+
+/*
+
+Rewriting constraints as:
+
+    id 1
+    x:int, v:int |- x=10 /\ v=x => k0
+    
+    id 2
+    y:int, v:int |- y=20 /\ v=y => k0
+
+Projecting out all variables NOT in the WF of k0
+
+    id 1
+    v:int |- (exists x:int. x=10 /\ v=x) => k0
+           
+    id 2
+    v:int |- (exists y:int. y=20 /\ v=y) => k0
+
+Take the \/ of all constraints on k0
+
+     k0 = (exists x:int. x=10 /\ v=x) \/ (exists y:int. y=20 /\ v=y)
+     
+     k0[z/v]
+       = (\x. x=10 /\ v=x) \/ (\y. y=20 /\ v=y)[z/v]
+         = (\x. x=10 /\ z=x) \/ (\y. y=20 /\ z=y)
+
+So you get:
+
+     env [2]
+        lhs {v : int | (\x. x=10 /\ z=x) \/ (\y. y=20 /\ z=y)}
+     rhs {v : int | 10 <= z}
+     id 3 
+
+*/
diff --git a/tests/cut/test00a.fq b/tests/cut/test00a.fq
new file mode 100644
--- /dev/null
+++ b/tests/cut/test00a.fq
@@ -0,0 +1,29 @@
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+bind 0 x : {v : int | true}
+bind 1 y : {v : int | true}
+bind 2 z : {v : int | true}
+
+constraint:
+  env [0]
+  lhs {v : int | (x = 10)}
+  rhs {v : int | $k0[v:=x]}
+  id 1 
+
+constraint:
+  env [1]
+  lhs {v : int | y = 20}
+  rhs {v : int | $k0[v:=y]}
+  id 2 
+
+constraint:
+  env [2]
+  lhs {v : int | $k0[v:=z]}
+  rhs {v : int | 10 <= z}
+  id 3 
+
+wf:
+  env [ ]
+  reft {v: int | $k0}
+
diff --git a/tests/cut/test1-tx.fq b/tests/cut/test1-tx.fq
new file mode 100644
--- /dev/null
+++ b/tests/cut/test1-tx.fq
@@ -0,0 +1,43 @@
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+constraint:
+  env [a : {v : int | (exists x:int. x=10 /\ v=x) 
+                   \/ (exists y:int. y=20 /\ v=y) }]
+  lhs {v : int | v = a  }
+  rhs {v : int | 10 <= v}
+  id 3 
+
+/*
+
+Rewriting constraints as:
+
+    id 1
+    x:int, v:int |- (v=10)[x/v] /\ (v=x) => k0
+    x:int, v:int |- (x=10) /\ (v=x) => k0
+
+    id 2
+    y:int, v:int |- (v=20)[y/v] /\ (v=y) => k0
+    y:int, v:int |- (y=20) /\ (v=y) => k0
+
+Projecting out all variables NOT in the WF of k0
+
+    id 1
+    v:int |- (exists x:int. x=10 /\ v=x) => k0
+
+    id 2
+    v:int |- (exists y:int. y=20 /\ v=y) => k0
+
+Take the \/ of all constraints on k0
+
+    k0 = (exists x:int. x=10 /\ v=x) \/ (exists y:int. y=20 /\ v=y)
+     
+So you get:
+
+    env [a : {v : int | (exists x:int. x=10 /\ v=x) \/ (exists y:int. y=20 /\ v=y) }]
+      lhs {v : int | v = a  }
+    rhs {v : int | 10 <= v}
+    id 3
+
+*/
diff --git a/tests/cut/test1.fq b/tests/cut/test1.fq
new file mode 100644
--- /dev/null
+++ b/tests/cut/test1.fq
@@ -0,0 +1,29 @@
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+bind 0 x : {v : int | v = 10}
+bind 1 y : {v : int | v = 20}
+bind 2 a : {v : int | $k0    }
+      
+constraint:
+  env [0]
+  lhs {v : int | v = x}
+  rhs {v : int | $k0   }
+  id 1 
+
+constraint:
+  env [1]
+  lhs {v : int | v = y}
+  rhs {v : int | $k0   }
+  id 2 
+
+constraint:
+  env [2]
+  lhs {v : int | v = a  }
+  rhs {v : int | 10 <= v}
+  id 3 
+
+wf:
+  env [ ]
+  reft {v : int | $k0}
diff --git a/tests/cut/test2-tx.fq b/tests/cut/test2-tx.fq
new file mode 100644
--- /dev/null
+++ b/tests/cut/test2-tx.fq
@@ -0,0 +1,112 @@
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a): (10 <= v)
+
+// But you may use this one
+qualif Pog(v:a): (0 <= v)
+
+
+
+
+/* 
+
+-- Version 1 (eliminate k1) --
+
+Rewriting constraints as:
+
+    id 0
+    v:int |- (v=0) => k1
+
+    id 3
+    v:int |- k0 => k1
+
+Projecting out all variables NOT in the WF of k1
+
+    N/A
+
+Take the \/ of all constraints on k1
+
+    k1 = (v=0) \/ k0
+
+So you get:
+
+  bind 0 x: {v: int | v = 10      }
+  bind 1 a: {v: int | (v=0) \/ k0 }
+  bind 2 y: {v: int | v = 20      }
+  bind 3 b: {v: int | (v=0) \/ k0 }
+  bind 4 c: {v: int | k0          }
+
+  constraint:
+    env [ 0; 1]
+      lhs {v : int | v = x + a}
+    rhs {v : int | k0}
+    id 1 
+
+  constraint:
+    env [2; 3]
+      lhs {v : int | v = y + b}
+    rhs {v : int | k0}
+    id 2 
+
+  constraint:
+    env [4]
+      lhs {v : int | v = c  }
+    rhs {v : int | 10 <= v}
+    id 4 
+
+  wf:
+    env [ ]
+    reft {v: int | k1}
+
+
+
+
+-- Version 2 (eliminate k0) --
+
+Rewriting constraints as:
+
+    id 1
+    x:int, a:int, v:int |- (v=10)[x/v] /\ k1[a/v] /\ (v=x+a) => k0
+    x:int, a:int, v:int |- (x=10) /\ k1[a/v] /\ (v=x+a) => k0
+
+    id 2
+    y:int, b:int, v:int |- (v=20)[y/v] /\ k1[b/v] /\ (v=y+b) => k0
+    y:int, b:int, v:int |- (y=20) /\ k1[b/v] /\ (v=y+b) => k0
+
+Projecting out all variables NOT in the WF of k0
+
+    id 1
+    v:int |- (exists x:int a:int. (x=10) /\ k1[a/v] /\ (v=x+a)) => k0
+    
+    id 2
+    v:int |- (exists y:int b:int. (y=20) /\ k1[b/v] /\ (v=y+b)) => k0
+
+Take the \/ of all constraints on k0
+
+    k0 = (exists x:int a:int. (x=10) /\ k1[a/v] /\ (v=x+a))
+      \/ (exists y:int b:int. (y=20) /\ k1[b/v] /\ (v=y+b))
+
+So you get:
+
+  bind 4 c: {v: int | (exists x:int a:int. (x=10) /\ k1[a/v] /\ (v=x+a))
+                   \/ (exists y:int b:int. (y=20) /\ k1[b/v] /\ (v=y+b))    }
+
+  constraint:
+    env [ ]
+      lhs {v : int | v = 0}
+    rhs {v : int | k1 }
+    id 0 
+
+
+  constraint:
+    env [ ]
+      lhs {v : int | (exists x:int a:int. (x=10) /\ k1[a/v] /\ (v=x+a))
+                \/ (exists y:int b:int. (y=20) /\ k1[b/v] /\ (v=y+b))}
+    rhs {v : int | k1}
+    id 3
+
+  constraint:
+    env [4]
+      lhs {v : int | v = c  }
+    rhs {v : int | 10 <= v}
+    id 4 
diff --git a/tests/cut/test2.fq b/tests/cut/test2.fq
new file mode 100644
--- /dev/null
+++ b/tests/cut/test2.fq
@@ -0,0 +1,51 @@
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a): (10 <= v)
+
+// But you may use this one
+qualif Pog(v:a): (0 <= v)
+
+bind 0 x: {v: int | v = 10}
+bind 1 a: {v: int | $k1    }
+bind 2 y: {v: int | v = 20}
+bind 3 b: {v: int | $k1    }
+bind 4 c: {v: int | $k0    }
+
+constraint:
+  env [ ]
+  lhs {v : int | v = 0}
+  rhs {v : int | $k1 }
+  id 0 
+
+
+constraint:
+  env [ 0; 1]
+  lhs {v : int | v = x + a}
+  rhs {v : int | $k0}
+  id 1 
+
+constraint:
+  env [2; 3]
+  lhs {v : int | v = y + b}
+  rhs {v : int | $k0}
+  id 2 
+
+constraint:
+  env [ ]
+  lhs {v : int | $k0}
+  rhs {v : int | $k1}
+  id 3
+
+constraint:
+  env [4]
+  lhs {v : int | v = c  }
+  rhs {v : int | 10 <= v}
+  id 4 
+
+wf:
+  env [ ]
+  reft {v: int | $k0}
+
+wf:
+  env [ ]
+  reft {v: int | $k1}
diff --git a/tests/elim/div00.fq b/tests/elim/div00.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/div00.fq
@@ -0,0 +1,23 @@
+
+// --eliminate should be able to solve this WITHOUT the qualifier
+// qualif Zog(v:int) : (v /= 0)
+
+bind 0 n : {v: int | true }
+bind 1 m : {v: int | true }
+bind 2 z : {v: int | $k0[n := m] }
+
+constraint:
+  env [ ]
+  lhs {v : int | v = 12 }
+  rhs {v : int | $k0    }
+  id 1 tag []
+
+constraint:
+  env [ 1; 2 ]
+  lhs {v : int | v  = z}
+  rhs {v : int | v /= 0}
+  id 2 tag []
+
+wf:
+  env [ 0 ]
+  reft {v: int | $k0 }
diff --git a/tests/elim/elim00.fq b/tests/elim/elim00.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/elim00.fq
@@ -0,0 +1,1494 @@
+fixpoint "--defunct"
+
+// qualif Cmp(v : @(0), x : @(0)): ((v > x)) // "tests/todo/elim00.hs.fq" (line 1, column 8)
+// qualif Cmp(v : @(0), x : @(0)): ((v = x)) // "tests/todo/elim00.hs.fq" (line 2, column 8)
+
+
+constant Control.Exception.Base.irrefutPatError##09 : (func(1, [int;
+                                                                @(0)]))
+constant GHC.Base..##r2C : (func(3, [func(0, [@(0); @(1)]);
+                                     func(0, [@(2); @(0)]);
+                                     @(2);
+                                     @(1)]))
+constant runFun : (func(2, [(Arrow  @(0)  @(1)); @(0); @(1)]))
+constant GHC.Tuple.$40$$44$$44$$41$$35$$35$76 : (func(3, [@(0);
+                                                          @(1);
+                                                          @(2);
+                                                          (Tuple  @(0)  @(1)  @(2))]))
+constant GHC.Real.D$58$Integral$35$$35$rWH : (func(1, [func(0, [@(0);
+                                                                @(0);
+                                                                @(0)]);
+                                                       func(0, [@(0); @(0); @(0)]);
+                                                       func(0, [@(0); @(0); @(0)]);
+                                                       func(0, [@(0); @(0); @(0)]);
+                                                       func(0, [@(0); @(0); (Tuple  @(0)  @(0))]);
+                                                       func(0, [@(0); @(0); (Tuple  @(0)  @(0))]);
+                                                       func(0, [@(0); int]);
+                                                       (GHC.Real.Integral  @(0))]))
+constant addrLen : (func(0, [int; int]))
+constant papp5 : (func(10, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4));
+                            @(5);
+                            @(6);
+                            @(7);
+                            @(8);
+                            @(9);
+                            bool]))
+constant xsListSelector : (func(1, [[@(0)]; [@(0)]]))
+constant x_Tuple21 : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant x_Tuple65 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(4)]))
+constant Elim.foo##rlD : (func(0, [Elim.Foo; Elim.Foo]))
+constant x_Tuple55 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(4)]))
+constant GHC.Integer.Type.smallInteger##0Z : (func(0, [int; int]))
+constant x_Tuple33 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(2)]))
+constant x_Tuple77 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(6)]))
+constant GHC.Base.Just##r1e : (func(1, [@(0);
+                                        (GHC.Base.Maybe  @(0))]))
+constant Elim.xx##rlB : (func(0, [Elim.Foo; int]))
+constant papp3 : (func(6, [(Pred  @(0)  @(1)  @(2));
+                           @(3);
+                           @(4);
+                           @(5);
+                           bool]))
+constant GHC.Prim.$43$$35$$35$$35$98 : (func(0, [int; int; int]))
+constant x_Tuple63 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(2)]))
+constant x_Tuple41 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(0)]))
+constant GHC.Types.LT##6S : (GHC.Types.Ordering)
+constant GHC.Prim.$60$$35$$35$$35$9q : (func(0, [int; int; int]))
+constant papp4 : (func(8, [(Pred  @(0)  @(1)  @(2)  @(3));
+                           @(4);
+                           @(5);
+                           @(6);
+                           @(7);
+                           bool]))
+constant Elim.PP##rlx : (func(2, [@(0);
+                                  @(1);
+                                  (Elim.Pair  @(0)  @(1))]))
+constant x_Tuple64 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(3)]))
+constant GHC.Types.GT##6W : (GHC.Types.Ordering)
+constant GHC.Prim.$45$$35$$35$$35$99 : (func(0, [int; int; int]))
+constant GHC.Types.$58$$35$$35$64 : (func(1, [@(0);
+                                              [@(0)];
+                                              [@(0)]]))
+constant autolen : (func(1, [@(0); int]))
+constant GHC.Types.I###6c : (func(0, [int; int]))
+constant x_Tuple52 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(1)]))
+constant xx : (func(0, [Elim.Foo; int]))
+constant null : (func(1, [[@(0)]; bool]))
+constant GHC.Num.$43$$35$$35$rt : (func(1, [@(0); @(0); @(0)]))
+constant GHC.Tuple.$40$$44$$44$$44$$44$$41$$35$$35$7a : (func(5, [@(0);
+                                                                  @(1);
+                                                                  @(2);
+                                                                  @(3);
+                                                                  @(4);
+                                                                  (Tuple  @(0)  @(1)  @(2)  @(3)  @(4))]))
+constant papp2 : (func(4, [(Pred  @(0)  @(1)); @(2); @(3); bool]))
+constant x_Tuple62 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(1)]))
+constant GHC.Tuple.$40$$44$$41$$35$$35$74 : (func(2, [@(0);
+                                                      @(1);
+                                                      (Tuple  @(0)  @(1))]))
+constant Elim.yy##rlC : (func(0, [Elim.Foo; int]))
+constant fromJust : (func(1, [(GHC.Base.Maybe  @(0)); @(0)]))
+constant papp7 : (func(14, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                            @(7);
+                            @(8);
+                            @(9);
+                            @(10);
+                            @(11);
+                            @(12);
+                            @(13);
+                            bool]))
+constant x_Tuple53 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(2)]))
+constant x_Tuple71 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(0)]))
+constant GHC.Prim.$62$$35$$35$$35$9m : (func(0, [int; int; int]))
+constant x_Tuple74 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(3)]))
+constant Elim.Emp##rly : (func(2, [(Elim.Pair  @(0)  @(1))]))
+constant len : (func(2, [(@(0)  @(1)); int]))
+constant GHC.Tuple.$40$$44$$44$$44$$44$$44$$44$$41$$35$$35$7e : (func(7, [@(0);
+                                                                          @(1);
+                                                                          @(2);
+                                                                          @(3);
+                                                                          @(4);
+                                                                          @(5);
+                                                                          @(6);
+                                                                          (Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6))]))
+constant papp6 : (func(12, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                            @(6);
+                            @(7);
+                            @(8);
+                            @(9);
+                            @(10);
+                            @(11);
+                            bool]))
+constant x_Tuple22 : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant Data.Foldable.length##r1s : (func(2, [(@(0)  @(0)); int]))
+constant x_Tuple66 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(5)]))
+constant x_Tuple44 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(3)]))
+constant xListSelector : (func(1, [[@(0)]; @(0)]))
+constant strLen : (func(0, [int; int]))
+constant x_Tuple72 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(1)]))
+constant GHC.Tuple.$40$$44$$44$$44$$41$$35$$35$78 : (func(4, [@(0);
+                                                              @(1);
+                                                              @(2);
+                                                              @(3);
+                                                              (Tuple  @(0)  @(1)  @(2)  @(3))]))
+constant isJust : (func(1, [(GHC.Base.Maybe  @(0)); bool]))
+constant GHC.Prim.$61$$61$$35$$35$$35$9o : (func(0, [int;
+                                                     int;
+                                                     int]))
+constant Elim.Foo##rlA : (func(0, [int; int; Elim.Foo]))
+constant Prop : (func(0, [GHC.Types.Bool; bool]))
+constant x_Tuple31 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(0)]))
+constant x_Tuple75 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(4)]))
+constant papp1 : (func(2, [(Pred  @(0)); @(1); bool]))
+constant yy : (func(0, [Elim.Foo; int]))
+constant x_Tuple61 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(0)]))
+constant GHC.Prim.$62$$61$$35$$35$$35$9n : (func(0, [int;
+                                                     int;
+                                                     int]))
+constant lit$36$tests$47$pos$47$elim00.hs$58$14$58$5$45$30$124$PP$32$wink$32$cow : (Str)
+constant x_Tuple43 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(2)]))
+constant GHC.Types.EQ##6U : (GHC.Types.Ordering)
+constant x_Tuple51 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(0)]))
+constant GHC.Base.Nothing##r1d : (func(1, [(GHC.Base.Maybe  @(0))]))
+constant GHC.Num.$45$$35$$35$02B : (func(1, [@(0); @(0); @(0)]))
+constant GHC.Num.$42$$35$$35$ru : (func(1, [@(0); @(0); @(0)]))
+constant x_Tuple73 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(2)]))
+constant GHC.Types.$91$$93$$35$$35$6m : (func(1, [[@(0)]]))
+constant x_Tuple54 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(3)]))
+constant cmp : (func(0, [GHC.Types.Ordering; GHC.Types.Ordering]))
+constant x_Tuple32 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(1)]))
+constant x_Tuple76 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(5)]))
+constant GHC.Prim.$60$$61$$35$$35$$35$9r : (func(0, [int;
+                                                     int;
+                                                     int]))
+constant GHC.Real.D$58$Fractional$35$$35$rVU : (func(1, [func(0, [@(0);
+                                                                  @(0);
+                                                                  @(0)]);
+                                                         func(0, [@(0); @(0)]);
+                                                         func(0, [(GHC.Real.Ratio  int); @(0)]);
+                                                         (GHC.Real.Fractional  @(0))]))
+constant fst : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant snd : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant GHC.Tuple.$40$$44$$44$$44$$44$$44$$41$$35$$35$7c : (func(6, [@(0);
+                                                                      @(1);
+                                                                      @(2);
+                                                                      @(3);
+                                                                      @(4);
+                                                                      @(5);
+                                                                      (Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5))]))
+constant x_Tuple42 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(1)]))
+constant GHC.Prim.void###0l : (GHC.Prim.Void#)
+
+
+bind 0 GHC.Prim.void###0l : {VV##180 : GHC.Prim.Void# | []}
+bind 1 Elim.Emp##rly : {VV : func(2, [(Elim.Pair  @(0)  @(1))]) | []}
+bind 2 GHC.Types.EQ##6U : {VV##185 : GHC.Types.Ordering | [(VV##185 = GHC.Types.EQ##6U)]}
+bind 3 GHC.Types.LT##6S : {VV##186 : GHC.Types.Ordering | [(VV##186 = GHC.Types.LT##6S)]}
+bind 4 GHC.Types.GT##6W : {VV##187 : GHC.Types.Ordering | [(VV##187 = GHC.Types.GT##6W)]}
+bind 5 Elim.Emp##rly : {VV : func(2, [(Elim.Pair  @(0)  @(1))]) | []}
+bind 6 GHC.Types.$91$$93$$35$$35$6m : {VV : func(1, [[@(0)]]) | []}
+bind 7 GHC.Types.GT##6W : {VV##213 : GHC.Types.Ordering | [((cmp VV##213) = GHC.Types.GT##6W)]}
+bind 8 GHC.Types.LT##6S : {VV##214 : GHC.Types.Ordering | [((cmp VV##214) = GHC.Types.LT##6S)]}
+bind 9 GHC.Types.EQ##6U : {VV##215 : GHC.Types.Ordering | [((cmp VV##215) = GHC.Types.EQ##6U)]}
+bind 10 GHC.Base.Nothing##r1d : {VV : func(1, [(GHC.Base.Maybe  @(0))]) | []}
+bind 11 ds_dxd : {VV##222 : Elim.Foo | []}
+bind 12 lq_anf$##dxr : {lq_tmp$x##223 : Elim.Foo | [(lq_tmp$x##223 = ds_dxd)]}
+bind 13 lq_anf$##dxr : {lq_tmp$x##225 : Elim.Foo | [(lq_tmp$x##225 = ds_dxd)]}
+bind 14 xig##awy : {lq_tmp$x##233 : int | []}
+bind 15 yog##awz : {lq_tmp$x##234 : int | [(xig##awy < lq_tmp$x##234)]}
+bind 16 lq_anf$##dxr : {lq_tmp$x##225 : Elim.Foo | [(lq_tmp$x##225 = ds_dxd);
+                                                    ((yy lq_tmp$x##225) = yog##awz);
+                                                    ((xx lq_tmp$x##225) = xig##awy);
+                                                    (lq_tmp$x##225 = (Elim.Foo##rlA xig##awy yog##awz));
+                                                    ((yy lq_tmp$x##225) = yog##awz);
+                                                    ((xx lq_tmp$x##225) = xig##awy)]}
+bind 17 lq_anf$##dxs : {lq_tmp$x##242 : (Elim.Pair  int  int) | [(lq_tmp$x##242 = (Elim.PP##rlx xig##awy yog##awz))]}
+bind 18 lq_anf$##dxt : {lq_tmp$x##273 : (Elim.Pair  int  int) | [(lq_tmp$x##273 = lq_anf$##dxs)]}
+bind 19 lq_anf$##dxt : {lq_tmp$x##277 : (Elim.Pair  int  int) | [(lq_tmp$x##277 = lq_anf$##dxs)]}
+bind 20 wink##ax3 : {lq_tmp$x##275 : int | [$k_##248[lq_tmp$x##277:=lq_anf$##dxt][VV##247:=lq_tmp$x##275][lq_tmp$x##242:=lq_anf$##dxt][lq_tmp$x##271:=lq_tmp$x##275][lq_tmp$x##273:=lq_anf$##dxt][lq_tmp$x##245:=xig##awy][lq_tmp$x##246:=yog##awz][lq_tmp$x##250:=lq_tmp$x##275]]}
+bind 21 cow##ax4 : {lq_tmp$x##276 : int | [$k_##252[lq_tmp$x##277:=lq_anf$##dxt][lq_tmp$x##281:=wink##ax3][VV##251:=lq_tmp$x##276][lq_tmp$x##242:=lq_anf$##dxt][lq_tmp$x##254:=lq_tmp$x##276][lq_tmp$x##273:=lq_anf$##dxt][lq_tmp$x##245:=xig##awy][lq_tmp$x##246:=yog##awz][lq_tmp$x##272:=lq_tmp$x##276]]}
+bind 22 lq_anf$##dxt : {lq_tmp$x##277 : (Elim.Pair  int  int) | [(lq_tmp$x##277 = lq_anf$##dxs);
+                                                                 (lq_tmp$x##277 = (Elim.PP##rlx wink##ax3 cow##ax4));
+                                                                 (lq_tmp$x##277 = (Elim.PP##rlx wink##ax3 cow##ax4));
+                                                                 (lq_tmp$x##277 = (Elim.PP##rlx wink##ax3 cow##ax4))]}
+bind 23 lq_tmp$x##307 : {VV##308 : int | []}
+bind 24 lq_anf$##dxt : {lq_tmp$x##313 : (Elim.Pair  int  int) | [(lq_tmp$x##313 = lq_anf$##dxs)]}
+bind 25 lq_anf$##dxt : {lq_tmp$x##313 : (Elim.Pair  int  int) | [(lq_tmp$x##313 = lq_anf$##dxs);
+                                                                 (lq_tmp$x##313 = Elim.Emp##rly);
+                                                                 (lq_tmp$x##313 = Elim.Emp##rly);
+                                                                 (lq_tmp$x##313 = Elim.Emp##rly)]}
+bind 26 ds_dxg : {VV##318 : GHC.Prim.Void# | [$k_##319]}
+bind 27 lq_anf$##dxu : {lq_tmp$x##335 : int | [(lq_tmp$x##335 ~~ lit$36$tests$47$pos$47$elim00.hs$58$14$58$5$45$30$124$PP$32$wink$32$cow);
+                                               ((strLen lq_tmp$x##335) = 39)]}
+bind 28 ds_dxh : {VV##268 : (Tuple  int  int) | [$k_##269]}
+bind 29 lq_anf$##dxw : {lq_tmp$x##368 : (Tuple  int  int) | [(lq_tmp$x##368 = ds_dxh)]}
+bind 30 lq_anf$##dxw : {lq_tmp$x##374 : (Tuple  int  int) | [(lq_tmp$x##374 = ds_dxh)]}
+bind 31 wink##ax3 : {lq_tmp$x##370 : int | [$k_##259[lq_tmp$x##368:=lq_anf$##dxw][VV##268:=lq_anf$##dxw][lq_tmp$x##364:=lq_tmp$x##370][VV##258:=lq_tmp$x##370][lq_tmp$x##374:=lq_anf$##dxw]]}
+bind 32 cow##Xxd : {lq_tmp$x##371 : int | [$k_##262[lq_tmp$x##368:=lq_anf$##dxw][VV##268:=lq_anf$##dxw][VV##261:=lq_tmp$x##371][lq_tmp$x##365:=lq_tmp$x##371][lq_tmp$x##379:=wink##ax3][lq_tmp$x##374:=lq_anf$##dxw];
+                                           $k_##266[lq_tmp$x##368:=lq_anf$##dxw][lq_tmp$x##373:=lq_tmp$x##371][VV##265:=lq_tmp$x##371][lq_tmp$x##264:=wink##ax3][lq_tmp$x##367:=lq_tmp$x##371][VV##268:=lq_anf$##dxw][lq_tmp$x##372:=wink##ax3][lq_tmp$x##366:=wink##ax3][lq_tmp$x##379:=wink##ax3][lq_tmp$x##374:=lq_anf$##dxw]]}
+bind 33 lq_anf$##dxw : {lq_tmp$x##374 : (Tuple  int  int) | [(lq_tmp$x##374 = ds_dxh);
+                                                             ((snd lq_tmp$x##374) = cow##Xxd);
+                                                             ((fst lq_tmp$x##374) = wink##ax3);
+                                                             ((x_Tuple22 lq_tmp$x##374) = cow##Xxd);
+                                                             ((x_Tuple21 lq_tmp$x##374) = wink##ax3);
+                                                             (lq_tmp$x##374 = (GHC.Tuple.$40$$44$$41$$35$$35$74 wink##ax3 cow##Xxd));
+                                                             ((snd lq_tmp$x##374) = cow##Xxd);
+                                                             ((fst lq_tmp$x##374) = wink##ax3);
+                                                             ((x_Tuple22 lq_tmp$x##374) = cow##Xxd);
+                                                             ((x_Tuple21 lq_tmp$x##374) = wink##ax3)]}
+bind 34 wink##ax3 : {VV##361 : int | [$k_##362]}
+// bind 45 wink##ax3 : {lq_tmp$x##452 : int | [$k_##428[lq_tmp$x##425:=wink##ax3][lq_tmp$x##456:=lq_anf$##dxy][VV##427:=lq_tmp$x##452][lq_tmp$x##426:=cow##ax4][lq_tmp$x##450:=lq_anf$##dxy][lq_tmp$x##430:=lq_tmp$x##452][lq_tmp$x##446:=lq_tmp$x##452][lq_tmp$x##422:=lq_anf$##dxy]]}
+
+bind 35 lq_anf$##dxv : {lq_tmp$x##398 : (Tuple  int  int) | [(lq_tmp$x##398 = ds_dxh)]}
+bind 36 lq_anf$##dxv : {lq_tmp$x##404 : (Tuple  int  int) | [(lq_tmp$x##404 = ds_dxh)]}
+bind 37 wink##ax3 : {lq_tmp$x##400 : int | [$k_##259[VV##268:=lq_anf$##dxv][lq_tmp$x##394:=lq_tmp$x##400][VV##258:=lq_tmp$x##400][lq_tmp$x##398:=lq_anf$##dxv][lq_tmp$x##404:=lq_anf$##dxv]]}
+bind 38 cow##ax4 : {lq_tmp$x##401 : int | [$k_##262[VV##268:=lq_anf$##dxv][VV##261:=lq_tmp$x##401][lq_tmp$x##409:=wink##ax3][lq_tmp$x##398:=lq_anf$##dxv][lq_tmp$x##395:=lq_tmp$x##401][lq_tmp$x##404:=lq_anf$##dxv];
+                                           $k_##266[lq_tmp$x##396:=wink##ax3][VV##265:=lq_tmp$x##401][lq_tmp$x##264:=wink##ax3][VV##268:=lq_anf$##dxv][lq_tmp$x##397:=lq_tmp$x##401][lq_tmp$x##409:=wink##ax3][lq_tmp$x##403:=lq_tmp$x##401][lq_tmp$x##398:=lq_anf$##dxv][lq_tmp$x##402:=wink##ax3][lq_tmp$x##404:=lq_anf$##dxv]]}
+bind 39 lq_anf$##dxv : {lq_tmp$x##404 : (Tuple  int  int) | [(lq_tmp$x##404 = ds_dxh);
+                                                             ((snd lq_tmp$x##404) = cow##ax4);
+                                                             ((fst lq_tmp$x##404) = wink##ax3);
+                                                             ((x_Tuple22 lq_tmp$x##404) = cow##ax4);
+                                                             ((x_Tuple21 lq_tmp$x##404) = wink##ax3);
+                                                             (lq_tmp$x##404 = (GHC.Tuple.$40$$44$$41$$35$$35$74 wink##ax3 cow##ax4));
+                                                             ((snd lq_tmp$x##404) = cow##ax4);
+                                                             ((fst lq_tmp$x##404) = wink##ax3);
+                                                             ((x_Tuple22 lq_tmp$x##404) = cow##ax4);
+                                                             ((x_Tuple21 lq_tmp$x##404) = wink##ax3)]}
+bind 40 cow##ax4 : {VV##391 : int | [$k_##392]}
+bind 41 lq_tmp$x##438 : {VV##439 : int | []}
+bind 42 ds_dxi : {lq_tmp$x##422 : (Tuple  int  int) | [((snd lq_tmp$x##422) = cow##ax4);
+                                                       ((fst lq_tmp$x##422) = wink##ax3);
+                                                       ((x_Tuple22 lq_tmp$x##422) = cow##ax4);
+                                                       ((x_Tuple21 lq_tmp$x##422) = wink##ax3)]}
+bind 43 lq_anf$##dxy : {lq_tmp$x##450 : (Tuple  int  int) | [(lq_tmp$x##450 = ds_dxi)]}
+bind 44 lq_anf$##dxy : {lq_tmp$x##456 : (Tuple  int  int) | [(lq_tmp$x##456 = ds_dxi)]}
+bind 45 wink##ax3 : {lq_tmp$x##452 : int | [$k_##428[lq_tmp$x##425:=wink##ax3][lq_tmp$x##456:=lq_anf$##dxy][VV##427:=lq_tmp$x##452][lq_tmp$x##426:=cow##ax4][lq_tmp$x##450:=lq_anf$##dxy][lq_tmp$x##430:=lq_tmp$x##452][lq_tmp$x##446:=lq_tmp$x##452][lq_tmp$x##422:=lq_anf$##dxy]]}
+bind 46 cow##ax4 : {lq_tmp$x##453 : int | [$k_##432[lq_tmp$x##425:=wink##ax3][lq_tmp$x##456:=lq_anf$##dxy][lq_tmp$x##426:=cow##ax4][VV##431:=lq_tmp$x##453][lq_tmp$x##450:=lq_anf$##dxy][lq_tmp$x##447:=lq_tmp$x##453][lq_tmp$x##461:=wink##ax3][lq_tmp$x##422:=lq_anf$##dxy][lq_tmp$x##434:=lq_tmp$x##453];
+                                           $k_##436[lq_tmp$x##425:=wink##ax3][lq_tmp$x##456:=lq_anf$##dxy][lq_tmp$x##426:=cow##ax4][lq_tmp$x##455:=lq_tmp$x##453][lq_tmp$x##450:=lq_anf$##dxy][lq_tmp$x##461:=wink##ax3][lq_tmp$x##438:=wink##ax3][lq_tmp$x##421:=wink##ax3][lq_tmp$x##422:=lq_anf$##dxy][lq_tmp$x##434:=lq_tmp$x##453][lq_tmp$x##448:=wink##ax3][lq_tmp$x##449:=lq_tmp$x##453][VV##435:=lq_tmp$x##453][lq_tmp$x##454:=wink##ax3]]}
+bind 47 lq_anf$##dxy : {lq_tmp$x##456 : (Tuple  int  int) | [(lq_tmp$x##456 = ds_dxi);
+                                                             ((snd lq_tmp$x##456) = cow##ax4);
+                                                             ((fst lq_tmp$x##456) = wink##ax3);
+                                                             ((x_Tuple22 lq_tmp$x##456) = cow##ax4);
+                                                             ((x_Tuple21 lq_tmp$x##456) = wink##ax3);
+                                                             (lq_tmp$x##456 = (GHC.Tuple.$40$$44$$41$$35$$35$74 wink##ax3 cow##ax4));
+                                                             ((snd lq_tmp$x##456) = cow##ax4);
+                                                             ((fst lq_tmp$x##456) = wink##ax3);
+                                                             ((x_Tuple22 lq_tmp$x##456) = cow##ax4);
+                                                             ((x_Tuple21 lq_tmp$x##456) = wink##ax3)]}
+bind 48 wink##awA : {VV##443 : int | [$k_##444]}
+
+bind 49 lq_anf$##dxx : {lq_tmp$x##480 : (Tuple  int  int) | [(lq_tmp$x##480 = ds_dxi)]}
+bind 50 lq_anf$##dxx : {lq_tmp$x##486 : (Tuple  int  int) | [(lq_tmp$x##486 = ds_dxi)]}
+bind 51 wink##ax3 : {lq_tmp$x##482 : int | [$k_##428[lq_tmp$x##425:=wink##ax3][VV##427:=lq_tmp$x##482][lq_tmp$x##426:=cow##ax4][lq_tmp$x##476:=lq_tmp$x##482][lq_tmp$x##430:=lq_tmp$x##482][lq_tmp$x##480:=lq_anf$##dxx][lq_tmp$x##422:=lq_anf$##dxx][lq_tmp$x##486:=lq_anf$##dxx]]}
+bind 52 cow##ax4 : {lq_tmp$x##483 : int | [$k_##432[lq_tmp$x##425:=wink##ax3][lq_tmp$x##426:=cow##ax4][VV##431:=lq_tmp$x##483][lq_tmp$x##491:=wink##ax3][lq_tmp$x##480:=lq_anf$##dxx][lq_tmp$x##477:=lq_tmp$x##483][lq_tmp$x##422:=lq_anf$##dxx][lq_tmp$x##434:=lq_tmp$x##483][lq_tmp$x##486:=lq_anf$##dxx];
+                                           $k_##436[lq_tmp$x##425:=wink##ax3][lq_tmp$x##426:=cow##ax4][lq_tmp$x##491:=wink##ax3][lq_tmp$x##480:=lq_anf$##dxx][lq_tmp$x##479:=lq_tmp$x##483][lq_tmp$x##485:=lq_tmp$x##483][lq_tmp$x##438:=wink##ax3][lq_tmp$x##421:=wink##ax3][lq_tmp$x##422:=lq_anf$##dxx][lq_tmp$x##434:=lq_tmp$x##483][lq_tmp$x##484:=wink##ax3][lq_tmp$x##478:=wink##ax3][lq_tmp$x##486:=lq_anf$##dxx][VV##435:=lq_tmp$x##483]]}
+bind 53 lq_anf$##dxx : {lq_tmp$x##486 : (Tuple  int  int) | [(lq_tmp$x##486 = ds_dxi);
+                                                             ((snd lq_tmp$x##486) = cow##ax4);
+                                                             ((fst lq_tmp$x##486) = wink##ax3);
+                                                             ((x_Tuple22 lq_tmp$x##486) = cow##ax4);
+                                                             ((x_Tuple21 lq_tmp$x##486) = wink##ax3);
+                                                             (lq_tmp$x##486 = (GHC.Tuple.$40$$44$$41$$35$$35$74 wink##ax3 cow##ax4));
+                                                             ((snd lq_tmp$x##486) = cow##ax4);
+                                                             ((fst lq_tmp$x##486) = wink##ax3);
+                                                             ((x_Tuple22 lq_tmp$x##486) = cow##ax4);
+                                                             ((x_Tuple21 lq_tmp$x##486) = wink##ax3)]}
+bind 54 cow##awB : {VV##473 : int | [$k_##474]}
+bind 55 ds_dxo : {VV##514 : Elim.Foo | []}
+bind 56 lq_anf$##dxz : {lq_tmp$x##515 : Elim.Foo | [(lq_tmp$x##515 = ds_dxo)]}
+bind 57 lq_anf$##dxz : {lq_tmp$x##517 : Elim.Foo | [(lq_tmp$x##517 = ds_dxo)]}
+bind 58 ds_dxp : {lq_tmp$x##525 : int | []}
+bind 59 ds_dxq : {lq_tmp$x##526 : int | [(ds_dxp < lq_tmp$x##526)]}
+bind 60 lq_anf$##dxz : {lq_tmp$x##517 : Elim.Foo | [(lq_tmp$x##517 = ds_dxo);
+                                                    ((yy lq_tmp$x##517) = ds_dxq);
+                                                    ((xx lq_tmp$x##517) = ds_dxp);
+                                                    (lq_tmp$x##517 = (Elim.Foo##rlA ds_dxp ds_dxq));
+                                                    ((yy lq_tmp$x##517) = ds_dxq);
+                                                    ((xx lq_tmp$x##517) = ds_dxp)]}
+bind 61 ds_dxl : {VV##537 : Elim.Foo | []}
+bind 62 lq_anf$##dxA : {lq_tmp$x##538 : Elim.Foo | [(lq_tmp$x##538 = ds_dxl)]}
+bind 63 lq_anf$##dxA : {lq_tmp$x##540 : Elim.Foo | [(lq_tmp$x##540 = ds_dxl)]}
+bind 64 ds_dxm : {lq_tmp$x##548 : int | []}
+bind 65 ds_dxn : {lq_tmp$x##549 : int | [(ds_dxm < lq_tmp$x##549)]}
+bind 66 lq_anf$##dxA : {lq_tmp$x##540 : Elim.Foo | [(lq_tmp$x##540 = ds_dxl);
+                                                    ((yy lq_tmp$x##540) = ds_dxn);
+                                                    ((xx lq_tmp$x##540) = ds_dxm);
+                                                    (lq_tmp$x##540 = (Elim.Foo##rlA ds_dxm ds_dxn));
+                                                    ((yy lq_tmp$x##540) = ds_dxn);
+                                                    ((xx lq_tmp$x##540) = ds_dxm)]}
+bind 67 VV##559 : {VV##559 : int | [(VV##559 = ds_dxm)]}
+bind 68 VV##561 : {VV##561 : int | [(VV##561 = ds_dxq)]}
+bind 69 VV##563 : {VV##563 : Elim.Foo | [((yy VV##563) = cow##awB);
+                                         ((xx VV##563) = wink##awA)]}
+bind 70 VV##565 : {VV##565 : int | [(VV##565 = cow##awB)]}
+bind 71 VV##567 : {VV##567 : int | [(VV##567 = wink##awA)]}
+bind 72 VV##569 : {VV##569 : int | [(VV##569 = cow##ax4)]}
+bind 73 VV##571 : {VV##571 : int | [(VV##571 = wink##ax3)]}
+bind 74 VV##573 : {VV##573 : int | [(VV##573 = cow##ax4)]}
+bind 75 VV##575 : {VV##575 : int | [(VV##575 = wink##ax3)]}
+bind 76 VV##577 : {VV##577 : int | [(VV##577 = cow##ax4)]}
+bind 77 VV##579 : {VV##579 : int | [(VV##579 = wink##ax3)]}
+bind 78 VV##581 : {VV##581 : (Tuple  int  int) | [$k_##333[VV##332:=VV##581][ds_dxg:=GHC.Prim.void###0l]]}
+bind 79 VV##583 : {VV##583 : int | [$k_##323[VV##322:=VV##583][VV##332:=VV##581][ds_dxg:=GHC.Prim.void###0l]]}
+bind 80 VV##585 : {VV##585 : int | [$k_##326[VV##325:=VV##585][VV##332:=VV##581][ds_dxg:=GHC.Prim.void###0l]]}
+bind 81 lq_tmp$x##264 : {VV##587 : int | []}
+bind 82 VV##588 : {VV##588 : int | [$k_##330[VV##332:=VV##581][VV##329:=VV##588][ds_dxg:=GHC.Prim.void###0l][lq_tmp$x##328:=lq_tmp$x##264]]}
+bind 83 VV##590 : {VV##590 : GHC.Prim.Void# | [(VV##590 = GHC.Prim.void###0l)]}
+bind 84 VV##592 : {VV##592 : (Tuple  int  int) | [$k_##351[lq_tmp$x##339:=lq_anf$##dxu][lq_tmp$x##357:=VV##592][VV##350:=VV##592]]}
+bind 85 VV##594 : {VV##594 : int | [$k_##341[lq_tmp$x##353:=VV##594][lq_tmp$x##339:=lq_anf$##dxu][lq_tmp$x##357:=VV##592][VV##340:=VV##594][VV##350:=VV##592]]}
+bind 86 VV##596 : {VV##596 : int | [$k_##344[lq_tmp$x##339:=lq_anf$##dxu][lq_tmp$x##357:=VV##592][VV##343:=VV##596][lq_tmp$x##354:=VV##596][VV##350:=VV##592]]}
+bind 87 lq_tmp$x##328 : {VV##598 : int | []}
+bind 88 VV##599 : {VV##599 : int | [$k_##348[lq_tmp$x##355:=lq_tmp$x##328][lq_tmp$x##356:=VV##599][VV##347:=VV##599][lq_tmp$x##339:=lq_anf$##dxu][lq_tmp$x##346:=lq_tmp$x##328][lq_tmp$x##357:=VV##592][VV##350:=VV##592]]}
+bind 89 VV##601 : {VV##601 : int | [(VV##601 = lq_anf$##dxu)]}
+bind 90 VV##603 : {VV##603 : (Tuple  int  int) | [((snd VV##603) = cow##ax4);
+                                                  ((fst VV##603) = wink##ax3);
+                                                  ((x_Tuple22 VV##603) = cow##ax4);
+                                                  ((x_Tuple21 VV##603) = wink##ax3)]}
+bind 91 VV##605 : {VV##605 : int | [$k_##297[lq_tmp$x##295:=cow##ax4][lq_tmp$x##299:=VV##605][lq_tmp$x##291:=VV##603][lq_tmp$x##294:=wink##ax3][VV##296:=VV##605]]}
+bind 92 VV##607 : {VV##607 : int | [$k_##301[lq_tmp$x##295:=cow##ax4][lq_tmp$x##291:=VV##603][lq_tmp$x##294:=wink##ax3][VV##300:=VV##607][lq_tmp$x##303:=VV##607]]}
+bind 93 lq_tmp$x##264 : {VV##609 : int | []}
+bind 94 VV##610 : {VV##610 : int | [$k_##305[lq_tmp$x##295:=cow##ax4][lq_tmp$x##290:=lq_tmp$x##264][VV##304:=VV##610][lq_tmp$x##307:=lq_tmp$x##264][lq_tmp$x##291:=VV##603][lq_tmp$x##294:=wink##ax3][lq_tmp$x##303:=VV##610]]}
+bind 95 VV##612 : {VV##612 : int | [(VV##612 = cow##ax4)]}
+bind 96 VV##614 : {VV##614 : int | [(VV##614 = wink##ax3)]}
+bind 97 VV##616 : {VV##616 : int | [(VV##616 = yog##awz)]}
+bind 98 VV##618 : {VV##618 : int | [(VV##618 = xig##awy)]}
+bind 99 VV##473 : {VV##473 : int | [$k_##474]}
+bind 100 VV##443 : {VV##443 : int | [$k_##444]}
+bind 101 VV##435 : {VV##435 : int | [$k_##436]}
+bind 102 VV##431 : {VV##431 : int | [$k_##432]}
+bind 103 VV##427 : {VV##427 : int | [$k_##428]}
+bind 104 VV##391 : {VV##391 : int | [$k_##392]}
+bind 105 VV##361 : {VV##361 : int | [$k_##362]}
+bind 106 VV##318 : {VV##318 : GHC.Prim.Void# | [$k_##319]}
+bind 107 VV##350 : {VV##350 : (Tuple  int  int) | [$k_##351]}
+bind 108 VV##340 : {VV##340 : int | [$k_##341]}
+bind 109 VV##343 : {VV##343 : int | [$k_##344]}
+bind 110 lq_tmp$x##346 : {VV##631 : int | []}
+bind 111 VV##347 : {VV##347 : int | [$k_##348]}
+bind 112 VV##332 : {VV##332 : (Tuple  int  int) | [$k_##333]}
+bind 113 VV##322 : {VV##322 : int | [$k_##323]}
+bind 114 VV##325 : {VV##325 : int | [$k_##326]}
+bind 115 lq_tmp$x##328 : {VV##636 : int | []}
+bind 116 VV##329 : {VV##329 : int | [$k_##330]}
+bind 117 VV##304 : {VV##304 : int | [$k_##305]}
+bind 118 VV##300 : {VV##300 : int | [$k_##301]}
+bind 119 VV##296 : {VV##296 : int | [$k_##297]}
+bind 120 VV##268 : {VV##268 : (Tuple  int  int) | [$k_##269]}
+bind 121 VV##258 : {VV##258 : int | [$k_##259]}
+bind 122 VV##261 : {VV##261 : int | [$k_##262]}
+bind 123 lq_tmp$x##264 : {VV##644 : int | []}
+bind 124 VV##265 : {VV##265 : int | [$k_##266]}
+bind 125 VV##251 : {VV##251 : int | [$k_##252]}
+bind 126 VV##247 : {VV##247 : int | [$k_##248]}
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40;
+       42;
+       48;
+       54 ]
+  lhs {VV##1 : int | [(VV##1 = cow##awB)]}
+  rhs {VV##1 : int | [(wink##awA < VV##1)]}
+  id 1 tag [1]
+  // META constraint id 1 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40;
+       42;
+       48;
+       49;
+       50;
+       51;
+       52;
+       53]
+  lhs {VV##2 : int | [(VV##2 = cow##ax4)]}
+  rhs {VV##2 : int | [$k_##474[VV##569:=VV##2][VV##F##2:=VV##2][VV##F:=VV##2][VV##473:=VV##2]]}
+  id 2 tag [1]
+  // META constraint id 2 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22]
+  lhs {VV##18 : (Tuple  int  int) | [((snd VV##18) = cow##ax4);
+                                     ((fst VV##18) = wink##ax3);
+                                     ((x_Tuple22 VV##18) = cow##ax4);
+                                     ((x_Tuple21 VV##18) = wink##ax3)]}
+  rhs {VV##18 : (Tuple  int  int) | [$k_##269[VV##F##18:=VV##18][VV##268:=VV##18][VV##603:=VV##18][VV##F:=VV##18]]}
+  id 18 tag [1]
+  // META constraint id 18 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40;
+       42;
+       43;
+       44;
+       45;
+       46;
+       47]
+  lhs {VV##3 : int | [(VV##3 = wink##ax3)]}
+  rhs {VV##3 : int | [$k_##444[VV##571:=VV##3][VV##F:=VV##3][VV##F##3:=VV##3][VV##443:=VV##3]]}
+  id 3 tag [1]
+  // META constraint id 3 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22;
+       90]
+  lhs {VV##19 : int | [$k_##297[lq_tmp$x##295:=cow##ax4][VV##605:=VV##19][lq_tmp$x##299:=VV##19][lq_tmp$x##291:=VV##603][VV##F##19:=VV##19][lq_tmp$x##294:=wink##ax3][VV##F:=VV##19][VV##296:=VV##19]]}
+  rhs {VV##19 : int | [$k_##259[VV##605:=VV##19][VV##268:=VV##603][VV##258:=VV##19][VV##F##19:=VV##19][VV##F:=VV##19]]}
+  id 19 tag [1]
+  // META constraint id 19 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40]
+  lhs {VV##4 : int | [(VV##4 = cow##ax4)]}
+  rhs {VV##4 : int | [$k_##432[lq_tmp$x##425:=wink##ax3][VV##431:=VV##4][VV##573:=VV##4][lq_tmp$x##434:=VV##4][VV##F:=VV##4][VV##F##4:=VV##4]]}
+  id 4 tag [1]
+  // META constraint id 4 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22;
+       90]
+  lhs {VV##20 : int | [$k_##301[lq_tmp$x##295:=cow##ax4][VV##607:=VV##20][VV##F##20:=VV##20][lq_tmp$x##291:=VV##603][lq_tmp$x##294:=wink##ax3][VV##300:=VV##20][lq_tmp$x##303:=VV##20][VV##F:=VV##20]]}
+  rhs {VV##20 : int | [$k_##262[VV##268:=VV##603][VV##607:=VV##20][VV##F##20:=VV##20][VV##261:=VV##20][VV##F:=VV##20]]}
+  id 20 tag [1]
+  // META constraint id 20 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40]
+  lhs {VV##5 : int | [(VV##5 = cow##ax4)]}
+  rhs {VV##5 : int | [$k_##436[lq_tmp$x##425:=wink##ax3][VV##F##5:=VV##5][VV##573:=VV##5][lq_tmp$x##438:=wink##ax3][lq_tmp$x##434:=VV##5][VV##F:=VV##5][VV##435:=VV##5]]}
+  id 5 tag [1]
+  // META constraint id 5 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22;
+       90;
+       93]
+  lhs {VV##21 : int | [$k_##305[lq_tmp$x##295:=cow##ax4][lq_tmp$x##290:=lq_tmp$x##264][VV##304:=VV##21][VV##610:=VV##21][lq_tmp$x##307:=lq_tmp$x##264][lq_tmp$x##291:=VV##603][lq_tmp$x##294:=wink##ax3][lq_tmp$x##303:=VV##21][VV##F##21:=VV##21][VV##F:=VV##21]]}
+  rhs {VV##21 : int | [$k_##266[VV##265:=VV##21][VV##610:=VV##21][VV##268:=VV##603][VV##F##21:=VV##21][VV##F:=VV##21]]}
+  id 21 tag [1]
+  // META constraint id 21 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40]
+  lhs {VV##6 : int | [(VV##6 = wink##ax3)]}
+  rhs {VV##6 : int | [$k_##428[VV##F##6:=VV##6][VV##427:=VV##6][lq_tmp$x##430:=VV##6][VV##F:=VV##6][VV##575:=VV##6]]}
+  id 6 tag [1]
+  // META constraint id 6 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22]
+  lhs {VV##22 : int | [(VV##22 = cow##ax4)]}
+  rhs {VV##22 : int | [$k_##301[VV##F##22:=VV##22][VV##612:=VV##22][lq_tmp$x##294:=wink##ax3][VV##300:=VV##22][lq_tmp$x##303:=VV##22][VV##F:=VV##22]]}
+  id 22 tag [1]
+  // META constraint id 22 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       35;
+       36;
+       37;
+       38;
+       39]
+  lhs {VV##7 : int | [(VV##7 = cow##ax4)]}
+  rhs {VV##7 : int | [$k_##392[VV##391:=VV##7][VV##F##7:=VV##7][VV##F:=VV##7][VV##577:=VV##7]]}
+  id 7 tag [1]
+  // META constraint id 7 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22]
+  lhs {VV##23 : int | [(VV##23 = cow##ax4)]}
+  rhs {VV##23 : int | [$k_##305[VV##304:=VV##23][lq_tmp$x##307:=wink##ax3][VV##612:=VV##23][lq_tmp$x##294:=wink##ax3][lq_tmp$x##303:=VV##23][VV##F:=VV##23][VV##F##23:=VV##23]]}
+  id 23 tag [1]
+  // META constraint id 23 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       29;
+       30;
+       31;
+       32;
+       33]
+  lhs {VV##8 : int | [(VV##8 = wink##ax3)]}
+  rhs {VV##8 : int | [$k_##362[VV##579:=VV##8][VV##F##8:=VV##8][VV##361:=VV##8][VV##F:=VV##8]]}
+  id 8 tag [1]
+  // META constraint id 8 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22]
+  lhs {VV##24 : int | [(VV##24 = wink##ax3)]}
+  rhs {VV##24 : int | [$k_##297[lq_tmp$x##299:=VV##24][VV##614:=VV##24][VV##F:=VV##24][VV##296:=VV##24][VV##F##24:=VV##24]]}
+  id 24 tag [1]
+  // META constraint id 24 : ()
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16]
+  lhs {VV##25 : int | [(VV##25 = yog##awz)]}
+  rhs {VV##25 : int | [$k_##252[VV##251:=VV##25][lq_tmp$x##254:=VV##25][lq_tmp$x##245:=xig##awy][VV##F:=VV##25][VV##616:=VV##25][VV##F##25:=VV##25]]}
+  id 25 tag [1]
+  // META constraint id 25 : ()
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16]
+  lhs {VV##26 : int | [(VV##26 = xig##awy)]}
+  rhs {VV##26 : int | [$k_##248[VV##618:=VV##26][VV##247:=VV##26][VV##F##26:=VV##26][VV##F:=VV##26][lq_tmp$x##250:=VV##26]]}
+  id 26 tag [1]
+  // META constraint id 26 : ()
+
+
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25;
+       26;
+       115]
+  reft {VV##329 : int | [$k_##330]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25]
+  reft {VV##318 : GHC.Prim.Void# | [$k_##319]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25;
+       26;
+       27;
+       107]
+  reft {VV##343 : int | [$k_##344]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40]
+  reft {VV##427 : int | [$k_##428]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16]
+  reft {VV##247 : int | [$k_##248]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40;
+       41]
+  reft {VV##435 : int | [$k_##436]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40;
+       42]
+  reft {VV##443 : int | [$k_##444]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22]
+  reft {VV##296 : int | [$k_##297]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25;
+       26;
+       27;
+       110]
+  reft {VV##347 : int | [$k_##348]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40;
+       42;
+       48]
+  reft {VV##473 : int | [$k_##474]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25;
+       26;
+       27]
+  reft {VV##350 : (Tuple  int  int) | [$k_##351]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34]
+  reft {VV##391 : int | [$k_##392]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25;
+       26]
+  reft {VV##332 : (Tuple  int  int) | [$k_##333]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       120]
+  reft {VV##258 : int | [$k_##259]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       120]
+  reft {VV##261 : int | [$k_##262]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25;
+       26;
+       27;
+       107]
+  reft {VV##340 : int | [$k_##341]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22;
+       23]
+  reft {VV##304 : int | [$k_##305]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25;
+       26;
+       112]
+  reft {VV##325 : int | [$k_##326]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28]
+  reft {VV##361 : int | [$k_##362]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       123]
+  reft {VV##265 : int | [$k_##266]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       24;
+       25;
+       26;
+       112]
+  reft {VV##322 : int | [$k_##323]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       18;
+       19;
+       20;
+       21;
+       22]
+  reft {VV##300 : int | [$k_##301]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17]
+  reft {VV##268 : (Tuple  int  int) | [$k_##269]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15;
+       16;
+       17;
+       28;
+       34;
+       40]
+  reft {VV##431 : int | [$k_##432]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16]
+  reft {VV##251 : int | [$k_##252]}
+  // META wf : ()
diff --git a/tests/elim/kvparam00.fq b/tests/elim/kvparam00.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/kvparam00.fq
@@ -0,0 +1,20 @@
+bind 0 x : {v : int | []}
+
+bind 1 y : {v : int | []}
+
+constraint:
+  env [0; 1]
+  lhs {VV#F1 : int | []}
+  rhs {VV#F1 : int | [$k_0[v:=x]]}
+  id 1 tag [3]
+
+constraint:
+  env [0; 1]
+  lhs {VV#F2 : int | [$k_0[v:=y]]}
+  rhs {VV#F2 : int | [y = x]}
+  id 2 tag [4]
+
+wf:
+  env []
+  reft {v : int | [$k_0]}
+
diff --git a/tests/elim/len00.fq b/tests/elim/len00.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/len00.fq
@@ -0,0 +1,23 @@
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+//qualif ListZ(v : [@(0)]): (len v >= 0)
+
+constant len : (func(2, [(@(0)  @(1)); int]))
+
+bind 0 y : {v : [(Tuple int a)] | [len v >= 0]}
+
+constraint:
+  env [0]
+  lhs {v : [(Tuple int a)] | [v = y] }
+  rhs {v : [(Tuple int a)] | [$k0]   }
+  id 1 tag []
+
+constraint:
+  env []
+  lhs {v : [(Tuple int a)] | [$k0]             }
+  rhs {v : [(Tuple int a)] | [len v >= 0] }
+  id 2 tag []
+
+wf:
+  env [ ]
+  reft {v : [(Tuple int a)] | [$k0] }
diff --git a/tests/elim/test00-tx.fq b/tests/elim/test00-tx.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/test00-tx.fq
@@ -0,0 +1,12 @@
+
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+bind 0 a : {v:int | (v = 10 || v = 20) }
+
+constraint:
+  env [ 0 ]
+  lhs {v : int | v = a}
+  rhs {v : int | 10 <= v}
+  id 3 tag []
diff --git a/tests/elim/test00.fq b/tests/elim/test00.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/test00.fq
@@ -0,0 +1,26 @@
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+bind 0 a : {v: int | $k0}
+
+constraint:
+  env [ ]
+  lhs {v : int | v = 10}
+  rhs {v : int | $k0}
+  id 1 tag []
+
+constraint:
+  env [ ]
+  lhs {v : int | v = 20}
+  rhs {v : int | $k0}
+  id 2 tag []
+
+constraint:
+  env [ 0 ]
+  lhs {v : int | v = a}
+  rhs {v : int | 10 <= v}
+  id 3 tag []
+
+wf:
+  env [ ]
+  reft {v: int | $k0}
diff --git a/tests/elim/test00a.fq b/tests/elim/test00a.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/test00a.fq
@@ -0,0 +1,28 @@
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+bind 0 x : {v : int | true}
+bind 1 y : {v : int | true}
+bind 2 z : {v : int | true}
+
+constraint:
+  env [0]
+  lhs {v : int | (x = 10)}
+  rhs {v : int | $k0[v:=x]}
+  id 1 tag []
+
+constraint:
+  env [1]
+  lhs {v : int | y = 20}
+  rhs {v : int | $k0[v:=y]}
+  id 2 tag []
+
+constraint:
+  env [2]
+  lhs {v : int | $k0[v:=z]}
+  rhs {v : int | 10 <= z}
+  id 3 tag []
+
+wf:
+  env [ ]
+  reft {v: int | $k0}
diff --git a/tests/elim/test1.fq b/tests/elim/test1.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/test1.fq
@@ -0,0 +1,29 @@
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a) : (10 <= v)
+
+bind 0 x : {v : int | v = 10}
+bind 1 y : {v : int | v = 20}
+bind 2 a : {v : int | $k0    }
+      
+constraint:
+  env [0]
+  lhs {v : int | v = x}
+  rhs {v : int | $k0   }
+  id 1 tag []
+
+constraint:
+  env [1]
+  lhs {v : int | v = y}
+  rhs {v : int | $k0   }
+  id 2 tag []
+
+constraint:
+  env [2]
+  lhs {v : int | v = a  }
+  rhs {v : int | 10 <= v}
+  id 3 tag []
+
+wf:
+  env [ ]
+  reft {v : int | $k0}
diff --git a/tests/elim/test2.fq b/tests/elim/test2.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/test2.fq
@@ -0,0 +1,53 @@
+
+// This qualifier saves the day; solve constraints WITHOUT IT
+// qualif Zog(v:a): (10 <= v)
+
+// But you may use this one
+qualif Pog(v:a): (0 <= v)
+
+bind 0 x: {v: int | v = 10}
+bind 1 a: {v: int | $k1    }
+bind 2 y: {v: int | v = 20}
+bind 3 b: {v: int | $k1    }
+bind 4 c: {v: int | $k0    }
+
+cut $k1
+
+constraint:
+  env [ ]
+  lhs {v : int | v = 0}
+  rhs {v : int | $k1 }
+  id 0 tag []
+
+
+constraint:
+  env [0; 1]
+  lhs {v : int | v = x + a}
+  rhs {v : int | $k0}
+  id 1 tag []
+
+constraint:
+  env [2; 3]
+  lhs {v : int | v = y + b}
+  rhs {v : int | $k0}
+  id 2 tag []
+
+constraint:
+  env [ ]
+  lhs {v : int | $k0}
+  rhs {v : int | $k1}
+  id 3 tag []
+
+constraint:
+  env [4]
+  lhs {v : int | v = c  }
+  rhs {v : int | 10 <= v}
+  id 4 tag []
+
+wf:
+  env [ ]
+  reft {v: int | $k0}
+
+wf:
+  env [ ]
+  reft {v: int | $k1}
diff --git a/tests/elim/tuple00.fq b/tests/elim/tuple00.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/tuple00.fq
@@ -0,0 +1,114 @@
+
+bind 0 cat   : {v: int | v = 100 }
+bind 1 dog   : {v: int | v = 200 }
+bind 2 frog  : {v: int | v = 400 }
+bind 3 mouse : {v: int | v = 500 }
+bind 4 hippo : {v: int | v = 600 }
+bind 5 goose : {v: int | v = 700 }
+bind 6 crow  : {v: int | v = 800 }
+bind 7 pig   : {v: int | v = 900 }
+
+bind 20 x_1_1 : {v: int | $k_1_1 }
+bind 21 x_1_2 : {v: int | $k_1_2 }
+bind 22 x_2_1 : {v: int | $k_2_1 }
+bind 23 x_2_2 : {v: int | $k_2_2 }
+bind 24 x_3_1 : {v: int | $k_3_1 }
+bind 25 x_3_2 : {v: int | $k_3_2 }
+
+pack $k_1_1 : 1
+pack $k_1_2 : 1
+pack $k_2_1 : 2
+pack $k_2_2 : 2
+pack $k_3_1 : 3
+pack $k_3_2 : 3
+pack $k_4_1 : 4
+pack $k_4_2 : 4
+
+
+
+constraint:
+  env [ 0; 1; 2; 3; 4; 5; 6; 7 ]
+  lhs {v : int | v = 1}
+  rhs {v : int | $k_1_1}
+  id 1 tag []
+
+constraint:
+  env [ 0; 1; 2; 3; 4; 5; 6; 7 ]
+  lhs {v : int | v = 2}
+  rhs {v : int | $k_1_2}
+  id 2 tag []
+
+constraint:
+  env [ 20; 21 ]
+  lhs {v : int | v = x_1_1 }
+  rhs {v : int | $k_2_1    }
+  id 3 tag []
+
+constraint:
+  env [ 20; 21 ]
+  lhs {v : int | v = x_1_2 }
+  rhs {v : int | $k_2_2    }
+  id 4 tag []
+
+constraint:
+  env [ 22; 23 ]
+  lhs {v : int | v = x_2_1 }
+  rhs {v : int | $k_3_1    }
+  id 5 tag []
+
+constraint:
+  env [ 22; 23 ]
+  lhs {v : int | v = x_2_2 }
+  rhs {v : int | $k_3_2    }
+  id 6 tag []
+
+constraint:
+  env [ 24; 25 ]
+  lhs {v : int | v = x_3_1 }
+  rhs {v : int | $k_4_1    }
+  id 7 tag []
+
+constraint:
+  env [ 24; 25 ]
+  lhs {v : int | v = x_3_2 }
+  rhs {v : int | $k_4_2    }
+  id 8 tag []
+
+constraint:
+  env [ ]
+  lhs {v : int | $k_4_1 }
+  rhs {v : int | v = 1  }
+  id 9 tag []
+
+wf:
+  env [ ]
+  reft {v: int | $k_1_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_1_2}
+
+wf:
+  env [ ]
+  reft {v: int | $k_2_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_2_2}
+
+wf:
+  env [ ]
+  reft {v: int | $k_3_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_3_2}
+
+
+wf:
+  env [ ]
+  reft {v: int | $k_4_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_4_2}
diff --git a/tests/elim/tuple01.fq b/tests/elim/tuple01.fq
new file mode 100644
--- /dev/null
+++ b/tests/elim/tuple01.fq
@@ -0,0 +1,137 @@
+// This test illustrates how you can get an exponential VC from nested tuples
+
+bind 0 cat   : {v: int | v = 100 }
+bind 1 dog   : {v: int | v = 200 }
+bind 2 frog  : {v: int | v = 400 }
+bind 3 mouse : {v: int | v = 500 }
+bind 4 hippo : {v: int | v = 600 }
+bind 5 goose : {v: int | v = 700 }
+bind 6 crow  : {v: int | v = 800 }
+bind 7 pig   : {v: int | v = 900 }
+
+bind 20 x_1_1 : {v: int | $k_1_1 }
+bind 21 x_1_2 : {v: int | $k_1_2 }
+bind 22 x_2_1 : {v: int | $k_2_1 }
+bind 23 x_2_2 : {v: int | $k_2_2 }
+bind 24 x_3_1 : {v: int | $k_3_1 }
+bind 25 x_3_2 : {v: int | $k_3_2 }
+bind 26 x_4_1 : {v: int | $k_4_1 }
+bind 27 x_4_2 : {v: int | $k_4_2 }
+
+// pack $k_1_1 : 1
+// pack $k_1_2 : 1
+// pack $k_2_1 : 2
+// pack $k_2_2 : 2
+// pack $k_3_1 : 3
+// pack $k_3_2 : 3
+// pack $k_4_1 : 4
+// pack $k_4_2 : 4
+// pack $k_5_1 : 5
+// pack $k_5_2 : 5
+
+constraint:
+  env [ 0; 1; 2; 3; 4; 5; 6; 7 ]
+  lhs {v : int | v = 1}
+  rhs {v : int | $k_1_1}
+  id 1 tag []
+
+constraint:
+  env [ 0; 1; 2; 3; 4; 5; 6; 7 ]
+  lhs {v : int | v = 2}
+  rhs {v : int | $k_1_2}
+  id 2 tag []
+
+constraint:
+  env [ 20; 21 ]
+  lhs {v : int | v = x_1_1 }
+  rhs {v : int | $k_2_1    }
+  id 3 tag []
+
+constraint:
+  env [ 20; 21 ]
+  lhs {v : int | v = x_1_2 }
+  rhs {v : int | $k_2_2    }
+  id 4 tag []
+
+constraint:
+  env [ 22; 23 ]
+  lhs {v : int | v = x_2_1 }
+  rhs {v : int | $k_3_1    }
+  id 5 tag []
+
+constraint:
+  env [ 22; 23 ]
+  lhs {v : int | v = x_2_2 }
+  rhs {v : int | $k_3_2    }
+  id 6 tag []
+
+constraint:
+  env [ 24; 25 ]
+  lhs {v : int | v = x_3_1 }
+  rhs {v : int | $k_4_1    }
+  id 7 tag []
+
+constraint:
+  env [ 24; 25 ]
+  lhs {v : int | v = x_3_2 }
+  rhs {v : int | $k_4_2    }
+  id 8 tag []
+
+constraint:
+  env [ 26; 27 ]
+  lhs {v : int | v = x_4_1 }
+  rhs {v : int | $k_5_1    }
+  id 9 tag []
+
+constraint:
+  env [ 26; 27 ]
+  lhs {v : int | v = x_4_2 }
+  rhs {v : int | $k_5_2    }
+  id 10 tag []
+
+constraint:
+  env [ ]
+  lhs {v : int | $k_5_1 }
+  rhs {v : int | v = 1  }
+  id 11 tag []
+
+wf:
+  env [ ]
+  reft {v: int | $k_1_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_1_2}
+
+wf:
+  env [ ]
+  reft {v: int | $k_2_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_2_2}
+
+wf:
+  env [ ]
+  reft {v: int | $k_3_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_3_2}
+
+
+wf:
+  env [ ]
+  reft {v: int | $k_4_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_4_2}
+
+wf:
+  env [ ]
+  reft {v: int | $k_5_1}
+
+wf:
+  env [ ]
+  reft {v: int | $k_5_2}
diff --git a/tests/minimize/two-cores.fq b/tests/minimize/two-cores.fq
new file mode 100644
--- /dev/null
+++ b/tests/minimize/two-cores.fq
@@ -0,0 +1,30 @@
+qualif Cmp(v:a): (v = 10)
+qualif Cmp(v:a): (v = 12)
+
+constraint:
+  env []
+  lhs {v : int | [v = 10]}
+  rhs {v : int | [$k_0]}
+  id 1 tag [3]
+
+constraint:
+  env []
+  lhs {v : int | [$k_0]}
+  rhs {v : int | [v != 10]}
+  id 4 tag [4]
+
+constraint:
+  env []
+  lhs {v : int | [v = 12]}
+  rhs {v : int | [$k_0]}
+  id 2 tag [5]
+
+constraint:
+  env []
+  lhs {v : int | [$k_0]}
+  rhs {v : int | [v != 12]}
+  id 3 tag [6]
+
+wf:
+  env []
+  reft {v : int | [$k_0]}
diff --git a/tests/neg/NonLinear.hs.fq b/tests/neg/NonLinear.hs.fq
new file mode 100644
--- /dev/null
+++ b/tests/neg/NonLinear.hs.fq
@@ -0,0 +1,91 @@
+
+bind 0 GHC.Num.$fNumInt##rlL : {VV##27 : (GHC.Num.Num  int) | []}
+bind 1 GHC.Types.EQ##6U : {VV##28 : GHC.Types.Ordering | [(VV##28 = GHC.Types.EQ##6U)]}
+bind 2 GHC.Types.LT##6S : {VV##29 : GHC.Types.Ordering | [(VV##29 = GHC.Types.LT##6S)]}
+bind 3 GHC.Types.GT##6W : {VV##30 : GHC.Types.Ordering | [(VV##30 = GHC.Types.GT##6W)]}
+bind 4 pig##amI : {VV##33 : int | []}
+bind 5 lq_anf$##dvQ : {lq_tmp$x##41 : int | [(lq_tmp$x##41 = (1  :  int))]}
+bind 6 zink##alG : {zink##0 : int | [(zink##0 = 5)]}
+bind 7 zonk##alH : {zonk##1 : int | [(zonk##1 = 67)]}
+bind 8 bob##alJ : {lq_tmp$x##65 : int | [$k_##38[VV##37:=lq_tmp$x##65][lq_tmp$x##67:=zonk##alH][pig##amI:=zonk##alH]]}
+bind 9 alice##alI : {lq_tmp$x##71 : int | [$k_##38[VV##37:=lq_tmp$x##71][pig##amI:=zink##alG][lq_tmp$x##73:=zink##alG]]}
+bind 10 VV##96 : {VV##96 : int | []}
+bind 11 zink##alG : {zink##0 : int | []}
+bind 12 VV##99 : {VV##99 : int | []}
+bind 13 lq_tmp$x##92 : {zonk##1 : int | []}
+bind 14 VV##102 : {VV##102 : int | []}
+bind 15 VV##104 : {VV##104 : int | []}
+bind 16 zonk##alH : {zonk##1 : int | []}
+bind 17 VV##107 : {VV##107 : int | []}
+bind 18 VV##109 : {VV##109 : int | [(VV##109 = (alice##alI + bob##alJ))]}
+bind 19 VV##111 : {VV##111 : int | [$k_##38[VV##37:=VV##111][lq_tmp$x##88:=VV##111][lq_tmp$x##67:=zonk##alH][lq_tmp$x##65:=VV##111][pig##amI:=zonk##alH];
+                                    (VV##111 = bob##alJ)]}
+bind 20 VV##113 : {VV##113 : int | [$k_##38[VV##37:=VV##113][lq_tmp$x##87:=VV##113][lq_tmp$x##71:=VV##113][pig##amI:=zink##alG][lq_tmp$x##73:=zink##alG];
+                                    (VV##113 = alice##alI)]}
+bind 21 VV##115 : {VV##115 : int | [(VV##115 = 5);
+                                    (VV##115 = zink##alG)]}
+bind 22 VV##117 : {VV##117 : int | [(VV##117 = 67);
+                                    (VV##117 = zonk##alH)]}
+bind 23 VV##119 : {VV##119 : int | [(VV##119 = (pig##amI + lq_anf$##dvQ))]}
+bind 24 VV##121 : {VV##121 : int | [(VV##121 = (1  :  int));
+                                    (VV##121 = lq_anf$##dvQ)]}
+bind 25 VV##123 : {VV##123 : int | [$k_##34[lq_tmp$x##57:=VV##123][VV##33:=VV##123];
+                                    (VV##123 = pig##amI)]}
+bind 26 VV##125 : {VV##125 : int | [(VV##125 = 1)]}
+bind 27 VV##33 : {VV##33 : int | [$k_##34]}
+bind 28 VV##37 : {VV##37 : int | [$k_##38]}
+
+
+
+
+constraint:
+  env [0; 1; 2; 3; 6; 7; 8; 9]
+  lhs {VV##F##1 : int | [(VV##F##1 = (alice##alI + bob##alJ))]}
+  rhs {VV##F##1 : int | [(VV##F##1 = 0)]}
+  id 1 tag [2]
+  // META constraint id 1 : ()
+
+
+constraint:
+  env [0; 1; 2; 3; 6; 7]
+  lhs {VV##F##2 : int | [(VV##F##2 = 5); (VV##F##2 = zink##alG)]}
+  rhs {VV##F##2 : int | [$k_##34[VV##115:=VV##F##2][lq_tmp$x##70:=VV##F##2][VV##F:=VV##F##2][VV##33:=VV##F##2]]}
+  id 2 tag [2]
+  // META constraint id 2 : ()
+
+
+constraint:
+  env [0; 1; 2; 3; 6; 7]
+  lhs {VV##F##3 : int | [(VV##F##3 = 67); (VV##F##3 = zonk##alH)]}
+  rhs {VV##F##3 : int | [$k_##34[lq_tmp$x##64:=VV##F##3][VV##117:=VV##F##3][VV##F:=VV##F##3][VV##33:=VV##F##3]]}
+  id 3 tag [2]
+  // META constraint id 3 : ()
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 5]
+  lhs {VV##F##4 : int | [(VV##F##4 = (pig##amI + lq_anf$##dvQ))]}
+  rhs {VV##F##4 : int | [$k_##38[VV##37:=VV##F##4][VV##119:=VV##F##4][VV##F:=VV##F##4]]}
+  id 4 tag [1]
+  // META constraint id 4 : ()
+
+
+
+
+wf:
+  env [0; 1; 2; 3; 4]
+  reft {VV##37 : int | [$k_##38]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3]
+  reft {VV##33 : int | [$k_##34]}
+  // META wf : ()
+
+
+
+
+
+
+
diff --git a/tests/neg/test00.hs.fq b/tests/neg/test00.hs.fq
new file mode 100644
--- /dev/null
+++ b/tests/neg/test00.hs.fq
@@ -0,0 +1,286 @@
+qualif Fst(v : @(1), y : @(0)): (v = fst([y])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.spec" (line 29, column 8)
+qualif Snd(v : @(1), y : @(0)): (v = snd([y])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.spec" (line 30, column 8)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): ((? Prop([v])) <=> (len([xs]) > 0)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 13, column 8)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): ((? Prop([v])) <=> (len([xs]) = 0)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 14, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) = 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 16, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) >= 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 17, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) > 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 18, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) = len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 20, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) >= len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 21, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) > len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 22, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) <= len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 23, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) < len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 24, column 8)
+qualif EqLen(v : int, xs : [@(0)]): (v = len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 26, column 8)
+qualif LenEq(v : [@(0)], x : int): (x = len([v])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 27, column 8)
+qualif LenDiff(v : [@(0)], x : int): (len([v]) = (x + 1)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 28, column 8)
+qualif LenDiff(v : [@(0)], x : int): (len([v]) = (x - 1)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 29, column 8)
+qualif LenAcc(v : int, xs : [@(0)], n : int): (v = (len([xs]) + n)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 30, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 3, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 4, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 5, column 8)
+qualif Bot(v : bool): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 6, column 8)
+qualif Bot(v : int): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 7, column 8)
+qualif CmpZ(v : @(0)): (v < 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 9, column 8)
+qualif CmpZ(v : @(0)): (v <= 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 10, column 8)
+qualif CmpZ(v : @(0)): (v > 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 11, column 8)
+qualif CmpZ(v : @(0)): (v >= 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 12, column 8)
+qualif CmpZ(v : @(0)): (v = 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 13, column 8)
+qualif CmpZ(v : @(0)): (v != 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 14, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v < x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 16, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v <= x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 17, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v > x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 18, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v >= x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 19, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v = x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 20, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v != x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 21, column 8)
+qualif One(v : int): (v = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 28, column 8)
+qualif True(v : bool): (? v) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 29, column 8)
+qualif False(v : bool): (~ ((? v))) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 30, column 8)
+qualif True1(v : GHC.Types.Bool): (? Prop([v])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 31, column 8)
+qualif False1(v : GHC.Types.Bool): (~ ((? Prop([v])))) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 32, column 8)
+qualif Papp(v : @(0), p : (Pred  @(0))): (? papp1([p;
+                                                   v])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 35, column 8)
+qualif Papp2(v : @(1), x : @(0), p : (Pred  @(1)  @(0))): (? papp2([p;
+                                                                    v;
+                                                                    x])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 38, column 8)
+qualif Papp3(v : @(2), x : @(0), y : @(1), p : (Pred  @(2)  @(0)  @(1))): (? papp3([p;
+                                                                                    v;
+                                                                                    x;
+                                                                                    y])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 41, column 8)
+
+
+
+
+constant runFun : (func(2, [(Arrow  @(0)  @(1)); @(0); @(1)]))
+constant addrLen : (func(0, [int; int]))
+constant xsListSelector : (func(1, [[@(0)]; [@(0)]]))
+constant x_Tuple21 : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant x_Tuple65 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(4)]))
+constant GHC.Types.False$35$68 : (GHC.Types.Bool)
+constant x_Tuple55 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(4)]))
+constant x_Tuple33 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(2)]))
+constant x_Tuple77 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(6)]))
+constant papp3 : (func(6, [(Pred  @(0)  @(1)  @(2));
+                           @(3);
+                           @(4);
+                           @(5);
+                           bool]))
+constant x_Tuple63 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(2)]))
+constant x_Tuple41 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(0)]))
+constant papp4 : (func(8, [(Pred  @(0)  @(1)  @(2)  @(6));
+                           @(3);
+                           @(4);
+                           @(5);
+                           @(7);
+                           bool]))
+constant x_Tuple64 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(3)]))
+constant autolen : (func(1, [@(0); int]))
+constant x_Tuple52 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(1)]))
+constant null : (func(1, [[@(0)]; bool]))
+constant papp2 : (func(4, [(Pred  @(0)  @(1)); @(2); @(3); bool]))
+constant x_Tuple62 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(1)]))
+constant fromJust : (func(1, [(GHC.Base.Maybe  @(0)); @(0)]))
+constant x_Tuple53 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(2)]))
+constant x_Tuple71 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(0)]))
+constant x_Tuple74 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(3)]))
+constant len : (func(2, [(@(0)  @(1)); int]))
+constant x_Tuple22 : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant x_Tuple66 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(5)]))
+constant x_Tuple44 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(3)]))
+constant xListSelector : (func(1, [[@(0)]; @(0)]))
+constant strLen : (func(0, [int; int]))
+constant x_Tuple72 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(1)]))
+constant isJust : (func(1, [(GHC.Base.Maybe  @(0)); bool]))
+constant Prop : (func(0, [GHC.Types.Bool; bool]))
+constant x_Tuple31 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(0)]))
+constant x_Tuple75 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(4)]))
+constant papp1 : (func(1, [(Pred  @(0)); @(0); bool]))
+constant x_Tuple61 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(0)]))
+constant x_Tuple43 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(2)]))
+constant x_Tuple51 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(0)]))
+constant GHC.Types.I$35$$35$6c : (func(0, [int; int]))
+constant x_Tuple73 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(2)]))
+constant x_Tuple54 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(3)]))
+constant x_Tuple32 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(1)]))
+constant cmp : (func(0, [GHC.Types.Ordering; GHC.Types.Ordering]))
+constant x_Tuple76 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(5)]))
+constant fst : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant snd : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant x_Tuple42 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(1)]))
+constant GHC.Types.True$35$6u : (GHC.Types.Bool)
+
+
+bind 0 GHC.Types.False$35$68 : {VV$35$159 : GHC.Types.Bool | []}
+bind 1 GHC.Types.True$35$6u : {VV$35$161 : GHC.Types.Bool | []}
+bind 2 GHC.Classes.$36$fOrdInt$35$rni : {VV$35$166 : (GHC.Classes.Ord  int) | []}
+bind 3 GHC.Types.EQ$35$6U : {VV$35$167 : GHC.Types.Ordering | [(VV$35$167 = GHC.Types.EQ$35$6U)]}
+bind 4 GHC.Types.LT$35$6S : {VV$35$168 : GHC.Types.Ordering | [(VV$35$168 = GHC.Types.LT$35$6S)]}
+bind 5 GHC.Types.GT$35$6W : {VV$35$169 : GHC.Types.Ordering | [(VV$35$169 = GHC.Types.GT$35$6W)]}
+bind 6 GHC.Types.True$35$6u : {v$35$4 : GHC.Types.Bool | [(? Prop([v$35$4]))]}
+bind 7 GHC.Types.False$35$68 : {v$35$5 : GHC.Types.Bool | [(~ ((? Prop([v$35$5]))))]}
+bind 8 GHC.Types.False$35$68 : {v$35$5 : GHC.Types.Bool | [(~ ((? Prop([v$35$5]))))]}
+bind 9 GHC.Types.$91$$93$$35$6m : {VV : func(1, [[@(0)]]) | []}
+bind 10 GHC.Types.True$35$6u : {v$35$4 : GHC.Types.Bool | [(? Prop([v$35$4]))]}
+bind 11 GHC.Types.GT$35$6W : {VV$35$214 : GHC.Types.Ordering | [(cmp([VV$35$214]) = GHC.Types.GT$35$6W)]}
+bind 12 GHC.Types.LT$35$6S : {VV$35$215 : GHC.Types.Ordering | [(cmp([VV$35$215]) = GHC.Types.LT$35$6S)]}
+bind 13 GHC.Types.EQ$35$6U : {VV$35$216 : GHC.Types.Ordering | [(cmp([VV$35$216]) = GHC.Types.EQ$35$6U)]}
+bind 14 GHC.Base.Nothing$35$r1d : {VV : func(1, [(GHC.Base.Maybe  @(0))]) | []}
+bind 15 z$35$a10N : {VV$35$221 : int | [$k_$35$222]}
+bind 16 lq_anf$36$_d116 : {lq_tmp$36$x$35$229 : int | [(lq_tmp$36$x$35$229 = (100  :  int))]}
+bind 17 lq_anf$36$_d117 : {lq_tmp$36$x$35$236 : GHC.Types.Bool | [((? Prop([lq_tmp$36$x$35$236])) <=> (z$35$a10N >= lq_anf$36$_d116))]}
+bind 18 lq_anf$36$_d118 : {lq_tmp$36$x$35$254 : int | [(lq_tmp$36$x$35$254 = (0  :  int))]}
+bind 19 Test0.x$35$rYP : {VV$35$250 : int | [$k_$35$251]}
+bind 20 lq_anf$36$_d119 : {lq_tmp$36$x$35$269 : int | [(lq_tmp$36$x$35$269 = (0  :  int))]}
+bind 21 lq_anf$36$_d11a : {lq_tmp$36$x$35$275 : GHC.Types.Bool | [((? Prop([lq_tmp$36$x$35$275])) <=> (Test0.x$35$rYP > lq_anf$36$_d119))]}
+bind 22 lq_anf$36$_d11b : {lq_tmp$36$x$35$291 : GHC.Types.Bool | [(lq_tmp$36$x$35$291 = lq_anf$36$_d11a)]}
+bind 23 lq_anf$36$_d11b : {lq_tmp$36$x$35$293 : GHC.Types.Bool | [(lq_tmp$36$x$35$293 = lq_anf$36$_d11a)]}
+bind 24 lq_anf$36$_d11b : {lq_tmp$36$x$35$293 : GHC.Types.Bool | [(lq_tmp$36$x$35$293 = lq_anf$36$_d11a);
+                                                                  (~ ((? Prop([lq_tmp$36$x$35$293]))));
+                                                                  (~ ((? Prop([lq_tmp$36$x$35$293]))));
+                                                                  (~ ((? Prop([lq_tmp$36$x$35$293]))))]}
+bind 25 lq_anf$36$_d11b : {lq_tmp$36$x$35$299 : GHC.Types.Bool | [(lq_tmp$36$x$35$299 = lq_anf$36$_d11a)]}
+bind 26 lq_anf$36$_d11b : {lq_tmp$36$x$35$299 : GHC.Types.Bool | [(lq_tmp$36$x$35$299 = lq_anf$36$_d11a);
+                                                                  (? Prop([lq_tmp$36$x$35$299]));
+                                                                  (? Prop([lq_tmp$36$x$35$299]));
+                                                                  (? Prop([lq_tmp$36$x$35$299]))]}
+bind 27 Test0.prop_abs$35$r10h : {VV$35$265 : GHC.Types.Bool | [$k_$35$266]}
+bind 28 VV$35$310 : {VV$35$310 : GHC.Types.Bool | [$k_$35$226[lq_tmp$36$x$35$307:=Test0.x$35$rYP][lq_tmp$36$x$35$305:=VV$35$310][VV$35$225:=VV$35$310][z$35$a10N:=Test0.x$35$rYP]]}
+bind 29 VV$35$310 : {VV$35$310 : GHC.Types.Bool | [$k_$35$226[lq_tmp$36$x$35$307:=Test0.x$35$rYP][lq_tmp$36$x$35$305:=VV$35$310][VV$35$225:=VV$35$310][z$35$a10N:=Test0.x$35$rYP]]}
+bind 30 VV$35$313 : {VV$35$313 : int | [(VV$35$313 = Test0.x$35$rYP)]}
+bind 31 VV$35$313 : {VV$35$313 : int | [(VV$35$313 = Test0.x$35$rYP)]}
+bind 32 VV$35$316 : {VV$35$316 : GHC.Types.Bool | [(VV$35$316 = GHC.Types.False$35$68)]}
+bind 33 VV$35$316 : {VV$35$316 : GHC.Types.Bool | [(VV$35$316 = GHC.Types.False$35$68)]}
+bind 34 VV$35$319 : {VV$35$319 : int | [(VV$35$319 = lq_anf$36$_d119)]}
+bind 35 VV$35$319 : {VV$35$319 : int | [(VV$35$319 = lq_anf$36$_d119)]}
+bind 36 VV$35$322 : {VV$35$322 : int | [(VV$35$322 = Test0.x$35$rYP)]}
+bind 37 VV$35$322 : {VV$35$322 : int | [(VV$35$322 = Test0.x$35$rYP)]}
+bind 38 VV$35$325 : {VV$35$325 : int | [(VV$35$325 = 0)]}
+bind 39 VV$35$325 : {VV$35$325 : int | [(VV$35$325 = 0)]}
+bind 40 VV$35$328 : {VV$35$328 : int | []}
+bind 41 VV$35$328 : {VV$35$328 : int | []}
+bind 42 VV$35$331 : {VV$35$331 : int | [(VV$35$331 = lq_anf$36$_d118)]}
+bind 43 VV$35$331 : {VV$35$331 : int | [(VV$35$331 = lq_anf$36$_d118)]}
+bind 44 VV$35$334 : {VV$35$334 : int | [(VV$35$334 = 0)]}
+bind 45 VV$35$334 : {VV$35$334 : int | [(VV$35$334 = 0)]}
+bind 46 VV$35$337 : {VV$35$337 : GHC.Types.Bool | [(? Prop([VV$35$337]))]}
+bind 47 VV$35$337 : {VV$35$337 : GHC.Types.Bool | [(? Prop([VV$35$337]))]}
+bind 48 VV$35$340 : {VV$35$340 : GHC.Types.Bool | [(VV$35$340 = lq_anf$36$_d117)]}
+bind 49 VV$35$340 : {VV$35$340 : GHC.Types.Bool | [(VV$35$340 = lq_anf$36$_d117)]}
+bind 50 VV$35$343 : {VV$35$343 : int | [(VV$35$343 = lq_anf$36$_d116)]}
+bind 51 VV$35$343 : {VV$35$343 : int | [(VV$35$343 = lq_anf$36$_d116)]}
+bind 52 VV$35$346 : {VV$35$346 : int | [(VV$35$346 = z$35$a10N)]}
+bind 53 VV$35$346 : {VV$35$346 : int | [(VV$35$346 = z$35$a10N)]}
+bind 54 VV$35$349 : {VV$35$349 : int | [(VV$35$349 = 100)]}
+bind 55 VV$35$349 : {VV$35$349 : int | [(VV$35$349 = 100)]}
+bind 56 VV$35$282 : {VV$35$282 : int | [$k_$35$283]}
+bind 57 VV$35$265 : {VV$35$265 : GHC.Types.Bool | [$k_$35$266]}
+bind 58 VV$35$250 : {VV$35$250 : int | [$k_$35$251]}
+bind 59 VV$35$221 : {VV$35$221 : int | [$k_$35$222]}
+bind 60 VV$35$225 : {VV$35$225 : GHC.Types.Bool | [$k_$35$226]}
+
+
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       19;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       8;
+       9;
+       25;
+       10;
+       26;
+       11;
+       12;
+       13;
+       14;
+       30]
+  lhs {VV$35$F2 : int | [(VV$35$F2 = Test0.x$35$rYP)]}
+  rhs {VV$35$F2 : int | [$k_$35$222[VV$35$221:=VV$35$F2][lq_tmp$36$x$35$304:=VV$35$F2][VV$35$313:=VV$35$F2][VV$35$F:=VV$35$F2]]}
+  id 2 tag [3]
+  // META constraint id 2 : tests/neg/test00.hs:8:30
+
+
+constraint:
+  env [0; 1; 2; 18; 3; 4; 5; 6; 7; 8; 40; 9; 10; 11; 12; 13; 14]
+  lhs {VV$35$F6 : int | []}
+  rhs {VV$35$F6 : int | [$k_$35$251[VV$35$328:=VV$35$F6][VV$35$250:=VV$35$F6][VV$35$F:=VV$35$F6]]}
+  id 6 tag [2]
+  // META constraint id 6 : tests/neg/test00.hs:6:1-12
+
+
+constraint:
+  env [0;
+       16;
+       48;
+       1;
+       17;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15]
+  lhs {VV$35$F8 : GHC.Types.Bool | [(VV$35$F8 = lq_anf$36$_d117)]}
+  rhs {VV$35$F8 : GHC.Types.Bool | [(? Prop([VV$35$F8]))]}
+  id 8 tag [1]
+  // META constraint id 8 : tests/neg/test00.hs:11:23-35
+
+
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14]
+  reft {VV$35$221 : int | [$k_$35$222]}
+  // META wf : <no location info>
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14]
+  reft {VV$35$250 : int | [$k_$35$251]}
+  // META wf : <no location info>
+
+
+
+
+
+
+
diff --git a/tests/pos/LogicCurry1.hs.fq b/tests/pos/LogicCurry1.hs.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/LogicCurry1.hs.fq
@@ -0,0 +1,245 @@
+fixpoint "--allowho"
+
+qualif Fst(v : @(1), y : @(0)): ((v = (fst y))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.spec" (line 28, column 8)
+qualif Snd(v : @(1), y : @(0)): ((v = (snd y))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.spec" (line 29, column 8)
+qualif Auto(v##1 : int, n : int, x : int): ((v##1 = (ack n x))) // "/Users/rjhala/research/stack/liquidhaskell/tests/pos/LogicCurry1.hs" (line 10, column 1)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): ((v <=> ((len xs) > 0))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 13, column 8)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): ((v <=> ((len xs) = 0))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 14, column 8)
+qualif ListZ(v : [@(0)]): (((len v) = 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 16, column 8)
+qualif ListZ(v : [@(0)]): (((len v) >= 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 17, column 8)
+qualif ListZ(v : [@(0)]): (((len v) > 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 18, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) = (len xs))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 20, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) >= (len xs))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 21, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) > (len xs))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 22, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) <= (len xs))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 23, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) < (len xs))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 24, column 8)
+qualif EqLen(v : int, xs : [@(0)]): ((v = (len xs))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 26, column 8)
+qualif LenEq(v : [@(0)], x : int): ((x = (len v))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 27, column 8)
+qualif LenDiff(v : [@(0)], x : int): (((len v) = (x + 1))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 28, column 8)
+qualif LenDiff(v : [@(0)], x : int): (((len v) = (x - 1))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 29, column 8)
+qualif LenAcc(v : int, xs : [@(0)], n : int): ((v = ((len xs) + n))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/GHC/Base.hquals" (line 30, column 8)
+qualif Bot(v : @(0)): ((0 = 1)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 3, column 8)
+qualif Bot(v : @(0)): ((0 = 1)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 4, column 8)
+qualif Bot(v : @(0)): ((0 = 1)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 5, column 8)
+qualif Bot(v : bool): ((0 = 1)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 6, column 8)
+qualif Bot(v : int): ((0 = 1)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 7, column 8)
+qualif CmpZ(v : @(0)): ((v < 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 9, column 8)
+qualif CmpZ(v : @(0)): ((v <= 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 10, column 8)
+qualif CmpZ(v : @(0)): ((v > 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 11, column 8)
+qualif CmpZ(v : @(0)): ((v >= 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 12, column 8)
+qualif CmpZ(v : @(0)): ((v = 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 13, column 8)
+qualif CmpZ(v : @(0)): ((v != 0)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 14, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v < x)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 16, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v <= x)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 17, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v > x)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 18, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v >= x)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 19, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v = x)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 20, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v != x)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 21, column 8)
+qualif One(v : int): ((v = 1)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 28, column 8)
+qualif True1(v : GHC.Types.Bool): (v) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 29, column 8)
+qualif False1(v : GHC.Types.Bool): ((~ (v))) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 30, column 8)
+qualif Papp(v : @(0), p : (Pred  @(0))): ((papp1 p v)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 34, column 8)
+qualif Papp2(v : @(1), x : @(0), p : (Pred  @(1)  @(0))): ((papp2 p v x)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 37, column 8)
+qualif Papp3(v : @(2), x : @(0), y : @(1), p : (Pred  @(2)  @(0)  @(1))): ((papp3 p v x y)) // "/Users/rjhala/research/stack/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2016-05-21/7.10.3/share/x86_64-osx-ghc-7.10.3/liquidhaskell-0.6.0.0/include/Prelude.hquals" (line 39, column 8)
+
+
+
+
+constant runFun : (func(2, [(Arrow  @(0)  @(1)); @(0); @(1)]))
+constant addrLen : (func(0, [Str; int]))
+constant papp5 : (func(10, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4));
+                            @(5);
+                            @(6);
+                            @(7);
+                            @(8);
+                            @(9);
+                            bool]))
+constant x_Tuple21 : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant GHC.Types.False##68 : (bool)
+constant x_Tuple65 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(4)]))
+constant x_Tuple55 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(4)]))
+constant x_Tuple33 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(2)]))
+constant x_Tuple77 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(6)]))
+constant papp3 : (func(6, [(Pred  @(0)  @(1)  @(2));
+                           @(3);
+                           @(4);
+                           @(5);
+                           bool]))
+constant GHC.Types.True##6u : (bool)
+constant x_Tuple63 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(2)]))
+constant x_Tuple41 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(0)]))
+constant GHC.Types.LT##6S : (GHC.Types.Ordering)
+constant papp4 : (func(8, [(Pred  @(0)  @(1)  @(2)  @(3));
+                           @(4);
+                           @(5);
+                           @(6);
+                           @(7);
+                           bool]))
+constant x_Tuple64 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(3)]))
+constant GHC.Types.GT##6W : (GHC.Types.Ordering)
+constant autolen : (func(1, [@(0); int]))
+constant x_Tuple52 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(1)]))
+constant head : (func(1, [[@(0)]; @(0)]))
+constant null : (func(1, [[@(0)]; bool]))
+constant papp2 : (func(4, [(Pred  @(0)  @(1)); @(2); @(3); bool]))
+constant x_Tuple62 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(1)]))
+constant fromJust : (func(1, [(GHC.Base.Maybe  @(0)); @(0)]))
+constant papp7 : (func(14, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                            @(7);
+                            @(8);
+                            @(9);
+                            @(10);
+                            @(11);
+                            @(12);
+                            @(13);
+                            bool]))
+constant x_Tuple53 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(2)]))
+constant x_Tuple71 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(0)]))
+constant ack : (func(0, [int; int; int]))
+constant x_Tuple74 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(3)]))
+constant len : (func(2, [(@(0)  @(1)); int]))
+constant papp6 : (func(12, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                            @(6);
+                            @(7);
+                            @(8);
+                            @(9);
+                            @(10);
+                            @(11);
+                            bool]))
+constant x_Tuple22 : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant x_Tuple66 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(5)]))
+constant x_Tuple44 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(3)]))
+constant GHC.Err.undefined##02v : (func(1, [@(0)]))
+constant strLen : (func(0, [[Char]; int]))
+constant x_Tuple72 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(1)]))
+constant isJust : (func(1, [(GHC.Base.Maybe  @(0)); bool]))
+constant x_Tuple31 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(0)]))
+constant x_Tuple75 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(4)]))
+constant papp1 : (func(2, [(Pred  @(0)); @(1); bool]))
+constant x_Tuple61 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(0)]))
+constant x_Tuple43 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(2)]))
+constant tail : (func(1, [[@(0)]; [@(0)]]))
+constant GHC.Types.EQ##6U : (GHC.Types.Ordering)
+constant x_Tuple51 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(0)]))
+constant x_Tuple73 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(2)]))
+constant Main.ack##rjG : (func(0, [int; int; int]))
+constant x_Tuple54 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(3)]))
+constant cmp : (func(0, [GHC.Types.Ordering; GHC.Types.Ordering]))
+constant x_Tuple32 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(1)]))
+constant x_Tuple76 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(5)]))
+constant snd : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant fst : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant x_Tuple42 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(1)]))
+
+
+distinct GHC.Types.False##68 : (bool)
+distinct GHC.Types.True##6u : (bool)
+distinct GHC.Types.LT##6S : (GHC.Types.Ordering)
+distinct GHC.Types.GT##6W : (GHC.Types.Ordering)
+distinct GHC.Types.EQ##6U : (GHC.Types.Ordering)
+
+
+bind 0 GHC.Err.undefined##02v : {VV : func(1, [@(0)]) | []}
+bind 1 GHC.Types.True##6u : {VV##9 : bool | [(VV##9 = GHC.Types.True##6u)]}
+bind 2 GHC.Types.False##68 : {VV##10 : bool | [(VV##10 = GHC.Types.False##68)]}
+bind 3 GHC.Types.EQ##6U : {VV##11 : GHC.Types.Ordering | [(VV##11 = GHC.Types.EQ##6U)]}
+bind 4 GHC.Types.LT##6S : {VV##12 : GHC.Types.Ordering | [(VV##12 = GHC.Types.LT##6S)]}
+bind 5 GHC.Types.GT##6W : {VV##13 : GHC.Types.Ordering | [(VV##13 = GHC.Types.GT##6W)]}
+bind 6 Main.ack##rjG : {VV : func(0, [int; int; int]) | []}
+bind 7 Main.ack##rjG : {VV : func(0, [int; int; int]) | []}
+bind 8 m##alH : {VV##41 : int | []}
+bind 9 Main.bar##rlx : {VV : func(0, [int; int; int]) | []}
+bind 10 VV##55 : {VV##55 : int | []}
+bind 11 m##alH : {VV##57 : int | []}
+bind 12 VV##58 : {VV##58 : int | []}
+bind 13 lq_tmp$x##51 : {v : int | []}
+bind 14 VV##61 : {VV##61 : int | []}
+bind 15 VV##63 : {VV##63 : int | []}
+bind 16 lq_tmp$x##40 : {v : int | []}
+bind 17 VV##66 : {VV##66 : int | [(VV##66 = (ack m##alH lq_tmp$x##40))]}
+bind 18 VV##68 : {VV##68 : int | [(VV##68 = m##alH)]}
+bind 19 VV##70 : {VV##70 : int | []}
+bind 20 lq_tmp$x##17 : {VV##72 : int | []}
+bind 21 VV##73 : {VV##73 : int | []}
+bind 22 lq_tmp$x##19 : {VV##75 : int | []}
+bind 23 VV##76 : {VV##76 : int | [$k_##31[lq_tmp$x##22:=lq_tmp$x##17][VV##30:=VV##76][lq_tmp$x##26:=lq_tmp$x##19][lq_tmp$x##35:=VV##76]]}
+bind 24 VV##23 : {VV##23 : int | [$k_##24]}
+bind 25 lq_tmp$x##22 : {VV##23 : int | [$k_##24]}
+bind 26 VV##27 : {VV##27 : int | [$k_##28]}
+bind 27 lq_tmp$x##26 : {VV##27 : int | [$k_##28]}
+bind 28 VV##30 : {VV##30 : int | [$k_##31]}
+
+
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8]
+  lhs {VV##F##1 : func(0, [int; int]) | [(VV##F##1 = (ack m##alH))]}
+  rhs {VV##F##1 : func(0, [int; int]) | [(VV##F##1 = (ack m##alH))]}
+  id 1 tag [2]
+  // META constraint id 1 : ()
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 5; 6]
+  lhs {VV##F##2 : int | []}
+  rhs {VV##F##2 : int | [$k_##24[VV##70:=VV##F##2][VV##23:=VV##F##2][VV##F:=VV##F##2][lq_tmp$x##33:=VV##F##2]]}
+  id 2 tag [1]
+  // META constraint id 2 : ()
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 5; 6; 20]
+  lhs {VV##F##3 : int | []}
+  rhs {VV##F##3 : int | [$k_##28[lq_tmp$x##22:=lq_tmp$x##17][lq_tmp$x##34:=VV##F##3][VV##27:=VV##F##3][VV##73:=VV##F##3][VV##F:=VV##F##3]]}
+  id 3 tag [1]
+  // META constraint id 3 : ()
+
+
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 25]
+  reft {VV##27 : int | [$k_##28]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 25; 27]
+  reft {VV##30 : int | [$k_##31]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6]
+  reft {VV##23 : int | [$k_##24]}
+  // META wf : ()
+
+
+
+
+
+
+
diff --git a/tests/pos/MergeSort.fq b/tests/pos/MergeSort.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/MergeSort.fq
@@ -0,0 +1,3234 @@
+qualif Fst(v : @(1), y : @(0)): ((v = (fst y))) // "tests/todo/MergeSort.new.min.fq" (line 1, column 8)
+qualif Snd(v : @(1), y : @(0)): ((v = (snd y))) // "tests/todo/MergeSort.new.min.fq" (line 2, column 8)
+qualif Auto(VV : @(0), fld##0 : @(0)): ((VV >= fld##0)) // "tests/todo/MergeSort.new.min.fq" (line 3, column 8)
+qualif Auto(VV : @(0), fld##0 : @(0)): ((VV >= fld##0)) // "tests/todo/MergeSort.new.min.fq" (line 4, column 8)
+qualif Auto(VV : [@(0)], xs : [@(0)], ys : [@(0)]): (((len VV) = ((len xs) + (len ys)))) // "tests/todo/MergeSort.new.min.fq" (line 5, column 8)
+qualif Auto(VV : @(0), fld##0 : @(0)): ((VV >= fld##0)) // "tests/todo/MergeSort.new.min.fq" (line 6, column 8)
+qualif Auto(VV : [@(0)], xs : [@(0)]): (((len VV) = (len xs))) // "tests/todo/MergeSort.new.min.fq" (line 7, column 8)
+qualif Auto(VV : @(0), fld##0 : @(0)): ((VV >= fld##0)) // "tests/todo/MergeSort.new.min.fq" (line 8, column 8)
+qualif Auto(v##0 : (Tuple  [@(0)]  [@(0)]), xs : [@(0)]): ((((len (fst v##0)) + (len (snd v##0))) = (len xs))) // "tests/todo/MergeSort.new.min.fq" (line 9, column 8)
+qualif Auto(v##0 : [@(0)], xs : [@(0)]): ((((len v##0) > 1) => ((len v##0) < (len xs)))) // "tests/todo/MergeSort.new.min.fq" (line 10, column 8)
+qualif Auto(v##0 : [@(0)], xs : [@(0)]): ((((len v##0) > 1) => ((len v##0) < (len xs)))) // "tests/todo/MergeSort.new.min.fq" (line 11, column 8)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): (((Prop v) <=> ((len xs) > 0))) // "tests/todo/MergeSort.new.min.fq" (line 12, column 8)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): (((Prop v) <=> ((len xs) = 0))) // "tests/todo/MergeSort.new.min.fq" (line 13, column 8)
+qualif ListZ(v : [@(0)]): (((len v) = 0)) // "tests/todo/MergeSort.new.min.fq" (line 14, column 8)
+qualif ListZ(v : [@(0)]): (((len v) >= 0)) // "tests/todo/MergeSort.new.min.fq" (line 15, column 8)
+qualif ListZ(v : [@(0)]): (((len v) > 0)) // "tests/todo/MergeSort.new.min.fq" (line 16, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) = (len xs))) // "tests/todo/MergeSort.new.min.fq" (line 17, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) >= (len xs))) // "tests/todo/MergeSort.new.min.fq" (line 18, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) > (len xs))) // "tests/todo/MergeSort.new.min.fq" (line 19, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) <= (len xs))) // "tests/todo/MergeSort.new.min.fq" (line 20, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (((len v) < (len xs))) // "tests/todo/MergeSort.new.min.fq" (line 21, column 8)
+qualif EqLen(v : int, xs : [@(0)]): ((v = (len xs))) // "tests/todo/MergeSort.new.min.fq" (line 22, column 8)
+qualif LenEq(v : [@(0)], x : int): ((x = (len v))) // "tests/todo/MergeSort.new.min.fq" (line 23, column 8)
+qualif LenDiff(v : [@(0)], x : int): (((len v) = (x + 1))) // "tests/todo/MergeSort.new.min.fq" (line 24, column 8)
+qualif LenDiff(v : [@(0)], x : int): (((len v) = (x - 1))) // "tests/todo/MergeSort.new.min.fq" (line 25, column 8)
+qualif LenAcc(v : int, xs : [@(0)], n : int): ((v = ((len xs) + n))) // "tests/todo/MergeSort.new.min.fq" (line 26, column 8)
+qualif Bot(v : @(0)): ((0 = 1)) // "tests/todo/MergeSort.new.min.fq" (line 27, column 8)
+qualif Bot(v : @(0)): ((0 = 1)) // "tests/todo/MergeSort.new.min.fq" (line 28, column 8)
+qualif Bot(v : @(0)): ((0 = 1)) // "tests/todo/MergeSort.new.min.fq" (line 29, column 8)
+qualif Bot(v : bool): ((0 = 1)) // "tests/todo/MergeSort.new.min.fq" (line 30, column 8)
+qualif Bot(v : int): ((0 = 1)) // "tests/todo/MergeSort.new.min.fq" (line 31, column 8)
+qualif CmpZ(v : @(0)): ((v < 0)) // "tests/todo/MergeSort.new.min.fq" (line 32, column 8)
+qualif CmpZ(v : @(0)): ((v <= 0)) // "tests/todo/MergeSort.new.min.fq" (line 33, column 8)
+qualif CmpZ(v : @(0)): ((v > 0)) // "tests/todo/MergeSort.new.min.fq" (line 34, column 8)
+qualif CmpZ(v : @(0)): ((v >= 0)) // "tests/todo/MergeSort.new.min.fq" (line 35, column 8)
+qualif CmpZ(v : @(0)): ((v = 0)) // "tests/todo/MergeSort.new.min.fq" (line 36, column 8)
+qualif CmpZ(v : @(0)): ((v != 0)) // "tests/todo/MergeSort.new.min.fq" (line 37, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v < x)) // "tests/todo/MergeSort.new.min.fq" (line 38, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v <= x)) // "tests/todo/MergeSort.new.min.fq" (line 39, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v > x)) // "tests/todo/MergeSort.new.min.fq" (line 40, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v >= x)) // "tests/todo/MergeSort.new.min.fq" (line 41, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v = x)) // "tests/todo/MergeSort.new.min.fq" (line 42, column 8)
+qualif Cmp(v : @(0), x : @(0)): ((v != x)) // "tests/todo/MergeSort.new.min.fq" (line 43, column 8)
+qualif One(v : int): ((v = 1)) // "tests/todo/MergeSort.new.min.fq" (line 44, column 8)
+qualif True1(v : GHC.Types.Bool): ((Prop v)) // "tests/todo/MergeSort.new.min.fq" (line 45, column 8)
+qualif False1(v : GHC.Types.Bool): ((~ ((Prop v)))) // "tests/todo/MergeSort.new.min.fq" (line 46, column 8)
+qualif Papp(v : @(0), p : (Pred  @(0))): ((papp1 p v)) // "tests/todo/MergeSort.new.min.fq" (line 47, column 8)
+qualif Papp2(v : @(1), x : @(0), p : (Pred  @(1)  @(0))): ((papp2 p v x)) // "tests/todo/MergeSort.new.min.fq" (line 48, column 8)
+qualif Papp3(v : @(2), x : @(0), y : @(1), p : (Pred  @(2)  @(0)  @(1))): ((papp3 p v x y)) // "tests/todo/MergeSort.new.min.fq" (line 49, column 8)
+
+
+cut $k_##795
+cut $k_##1160
+cut $k_##1118
+cut $k_##753
+cut $k_##1115
+cut $k_##792
+cut $k_##750
+cut $k_##746
+cut $k_##1111
+cut $k_##1153
+cut $k_##788
+cut $k_##1157
+
+
+pack $k_##686 : 0
+pack $k_##671 : 0
+pack $k_##655 : 0
+pack $k_##679 : 0
+pack $k_##667 : 0
+pack $k_##659 : 0
+pack $k_##662 : 0
+pack $k_##674 : 0
+pack $k_##683 : 0
+pack $k_##572 : 1
+pack $k_##560 : 1
+pack $k_##556 : 1
+pack $k_##584 : 1
+pack $k_##575 : 1
+pack $k_##587 : 1
+pack $k_##563 : 1
+pack $k_##568 : 1
+pack $k_##580 : 1
+pack $k_##883 : 2
+pack $k_##907 : 2
+pack $k_##890 : 2
+pack $k_##914 : 2
+pack $k_##899 : 2
+pack $k_##902 : 2
+pack $k_##911 : 2
+pack $k_##895 : 2
+pack $k_##887 : 2
+pack $k_##314 : 3
+pack $k_##321 : 3
+pack $k_##318 : 3
+pack $k_##753 : 4
+pack $k_##750 : 4
+pack $k_##746 : 4
+pack $k_##1020 : 5
+pack $k_##1017 : 5
+pack $k_##540 : 6
+pack $k_##543 : 6
+pack $k_##639 : 7
+pack $k_##642 : 7
+pack $k_##971 : 8
+pack $k_##968 : 8
+pack $k_##168 : 9
+pack $k_##175 : 9
+pack $k_##172 : 9
+pack $k_##1118 : 10
+pack $k_##1115 : 10
+pack $k_##1111 : 10
+pack $k_##256 : 11
+pack $k_##259 : 11
+pack $k_##252 : 11
+pack $k_##1037 : 12
+pack $k_##1040 : 12
+pack $k_##237 : 13
+pack $k_##241 : 13
+pack $k_##244 : 13
+pack $k_##467 : 14
+pack $k_##470 : 14
+pack $k_##415 : 15
+pack $k_##418 : 15
+pack $k_##1160 : 16
+pack $k_##1153 : 16
+pack $k_##1157 : 16
+pack $k_##387 : 17
+pack $k_##390 : 17
+pack $k_##867 : 18
+pack $k_##864 : 18
+pack $k_##844 : 19
+pack $k_##841 : 19
+pack $k_##1076 : 20
+pack $k_##1080 : 20
+pack $k_##1083 : 20
+pack $k_##338 : 21
+pack $k_##335 : 21
+pack $k_##795 : 22
+pack $k_##792 : 22
+pack $k_##788 : 22
+
+
+constant runFun : (func(2, [(Arrow  @(0)  @(1)); @(0); @(1)]))
+constant addrLen : (func(0, [int; int]))
+constant lit$36$$47$Users$47$rjhala$47$research$47$stack$47$liquidhaskell$47$tests$47$pos$47$MergeSort.hs$58$$40$48$44$1$41$$45$$40$52$44$41$41$$124$function$32$merge : (Str)
+constant papp5 : (func(10, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4));
+                            @(5);
+                            @(6);
+                            @(7);
+                            @(8);
+                            @(9);
+                            bool]))
+constant x_Tuple21 : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant GHC.Types.False##68 : (GHC.Types.Bool)
+constant x_Tuple65 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(4)]))
+constant x_Tuple55 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(4)]))
+constant x_Tuple33 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(2)]))
+constant x_Tuple77 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(6)]))
+constant papp3 : (func(6, [(Pred  @(0)  @(1)  @(2));
+                           @(3);
+                           @(4);
+                           @(5);
+                           bool]))
+constant GHC.Types.True##6u : (GHC.Types.Bool)
+constant x_Tuple63 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(2)]))
+constant x_Tuple41 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(0)]))
+constant GHC.Types.LT##6S : (GHC.Types.Ordering)
+constant papp4 : (func(8, [(Pred  @(0)  @(1)  @(2)  @(3));
+                           @(4);
+                           @(5);
+                           @(6);
+                           @(7);
+                           bool]))
+constant x_Tuple64 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(3)]))
+constant GHC.Types.GT##6W : (GHC.Types.Ordering)
+constant GHC.Types.$58$$35$$35$64 : (func(1, [@(0);
+                                              [@(0)];
+                                              [@(0)]]))
+constant autolen : (func(1, [@(0); int]))
+constant x_Tuple52 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(1)]))
+constant head : (func(1, [[@(0)]; @(0)]))
+constant MergeSort.split##rlx : (func(1, [[@(0)];
+                                          (Tuple  [@(0)]  [@(0)])]))
+constant null : (func(1, [[@(0)]; bool]))
+constant GHC.Classes.$60$$61$$35$$35$r4 : (func(1, [@(0);
+                                                    @(0);
+                                                    GHC.Types.Bool]))
+constant papp2 : (func(4, [(Pred  @(0)  @(1)); @(2); @(3); bool]))
+constant x_Tuple62 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(1)]))
+constant GHC.Tuple.$40$$44$$41$$35$$35$74 : (func(2, [@(0);
+                                                      @(1);
+                                                      (Tuple  @(0)  @(1))]))
+constant fromJust : (func(1, [(GHC.Base.Maybe  @(0)); @(0)]))
+constant papp7 : (func(14, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                            @(7);
+                            @(8);
+                            @(9);
+                            @(10);
+                            @(11);
+                            @(12);
+                            @(13);
+                            bool]))
+constant MergeSort.sort##rjG : (func(1, [[@(0)]; [@(0)]]))
+constant x_Tuple53 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(2)]))
+constant x_Tuple71 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(0)]))
+constant x_Tuple74 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(3)]))
+constant len : (func(2, [(@(0)  @(1)); int]))
+constant papp6 : (func(12, [(Pred  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                            @(6);
+                            @(7);
+                            @(8);
+                            @(9);
+                            @(10);
+                            @(11);
+                            bool]))
+constant x_Tuple22 : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant x_Tuple66 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(5)]))
+constant x_Tuple44 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(3)]))
+constant strLen : (func(0, [int; int]))
+constant x_Tuple72 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(1)]))
+constant isJust : (func(1, [(GHC.Base.Maybe  @(0)); bool]))
+constant Prop : (func(0, [GHC.Types.Bool; bool]))
+constant x_Tuple31 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(0)]))
+constant x_Tuple75 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(4)]))
+constant papp1 : (func(2, [(Pred  @(0)); @(1); bool]))
+constant x_Tuple61 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(0)]))
+constant x_Tuple43 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(2)]))
+constant tail : (func(1, [[@(0)]; [@(0)]]))
+constant GHC.Types.EQ##6U : (GHC.Types.Ordering)
+constant Control.Exception.Base.patError##0e : (func(1, [int;
+                                                         @(0)]))
+constant MergeSort.merge##rly : (func(1, [[@(0)]; [@(0)]; [@(0)]]))
+constant x_Tuple51 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(0)]))
+constant x_Tuple73 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(2)]))
+constant GHC.Types.$91$$93$$35$$35$6m : (func(1, [[@(0)]]))
+constant x_Tuple54 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(3)]))
+constant cmp : (func(0, [GHC.Types.Ordering; GHC.Types.Ordering]))
+constant x_Tuple32 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(1)]))
+constant x_Tuple76 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(5)]))
+constant snd : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant fst : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant x_Tuple42 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(1)]))
+constant GHC.Prim.void###0l : (GHC.Prim.Void#)
+
+
+bind 0 GHC.Prim.void###0l : {VV##84 : GHC.Prim.Void# | []}
+bind 1 GHC.Types.False##68 : {VV##86 : GHC.Types.Bool | []}
+bind 2 GHC.Types.$91$$93$$35$$35$6m : {VV : func(1, [[@(0)]]) | []}
+bind 3 GHC.Types.True##6u : {VV##88 : GHC.Types.Bool | []}
+bind 4 GHC.Types.EQ##6U : {VV##91 : GHC.Types.Ordering | [(VV##91 = GHC.Types.EQ##6U)]}
+bind 5 GHC.Types.LT##6S : {VV##92 : GHC.Types.Ordering | [(VV##92 = GHC.Types.LT##6S)]}
+bind 6 GHC.Types.GT##6W : {VV##93 : GHC.Types.Ordering | [(VV##93 = GHC.Types.GT##6W)]}
+bind 7 GHC.Types.True##6u : {v##4 : GHC.Types.Bool | [(Prop v##4)]}
+bind 8 GHC.Types.False##68 : {v##5 : GHC.Types.Bool | [(~ ((Prop v##5)))]}
+bind 9 GHC.Types.False##68 : {v##5 : GHC.Types.Bool | [(~ ((Prop v##5)))]}
+bind 10 GHC.Types.$91$$93$$35$$35$6m : {VV : func(1, [[@(0)]]) | []}
+bind 11 GHC.Types.True##6u : {v##4 : GHC.Types.Bool | [(Prop v##4)]}
+bind 12 fix$36$$36$dOrd_azK : {VV##119 : (GHC.Classes.Ord  a_azo) | []}
+bind 13 xs##ayP : {VV##120 : [a_azo] | [((len VV##120) >= 0)]}
+bind 14 ds_dMl : {VV##121 : [a_azo] | [((len VV##121) >= 0)]}
+bind 15 lq_anf$##dMK : {lq_tmp$x##123 : [a_azo] | [((len lq_tmp$x##123) >= 0);
+                                                   (lq_tmp$x##123 = ds_dMl);
+                                                   ((len lq_tmp$x##123) >= 0)]}
+bind 16 lq_anf$##dMK : {lq_tmp$x##127 : [a_azo] | [((len lq_tmp$x##127) >= 0);
+                                                   (lq_tmp$x##127 = ds_dMl);
+                                                   ((len lq_tmp$x##127) >= 0);
+                                                   ((len lq_tmp$x##127) >= 0)]}
+bind 17 lq_anf$##dMK : {lq_tmp$x##127 : [a_azo] | [((len lq_tmp$x##127) >= 0);
+                                                   (lq_tmp$x##127 = ds_dMl);
+                                                   ((len lq_tmp$x##127) >= 0);
+                                                   ((len lq_tmp$x##127) = 0);
+                                                   ((null lq_tmp$x##127) <=> true);
+                                                   (lq_tmp$x##127 = GHC.Types.$91$$93$$35$$35$6m);
+                                                   ((len lq_tmp$x##127) = 0);
+                                                   ((null lq_tmp$x##127) <=> true);
+                                                   ((len lq_tmp$x##127) >= 0)]}
+bind 18 lq_anf$##dMK : {lq_tmp$x##140 : [a_azo] | [((len lq_tmp$x##140) >= 0);
+                                                   (lq_tmp$x##140 = ds_dMl);
+                                                   ((len lq_tmp$x##140) >= 0);
+                                                   ((len lq_tmp$x##140) >= 0)]}
+bind 19 lq_anf$##dMU : {VV : a_azo | []}
+bind 20 lq_anf$##dMV : {lq_tmp$x##154 : [a_azo] | [((len lq_tmp$x##154) >= 0)]}
+bind 21 lq_anf$##dMK : {lq_tmp$x##140 : [a_azo] | [((len lq_tmp$x##140) >= 0);
+                                                   (lq_tmp$x##140 = ds_dMl);
+                                                   ((len lq_tmp$x##140) >= 0);
+                                                   ((len lq_tmp$x##140) = (1 + (len lq_anf$##dMV)));
+                                                   ((null lq_tmp$x##140) <=> false);
+                                                   ((tail lq_tmp$x##140) = lq_anf$##dMV);
+                                                   ((head lq_tmp$x##140) = lq_anf$##dMU);
+                                                   (lq_tmp$x##140 = (GHC.Types.$58$$35$$35$64 lq_anf$##dMU lq_anf$##dMV));
+                                                   ((len lq_tmp$x##140) = (1 + (len lq_anf$##dMV)));
+                                                   ((null lq_tmp$x##140) <=> false);
+                                                   ((tail lq_tmp$x##140) = lq_anf$##dMV);
+                                                   ((head lq_tmp$x##140) = lq_anf$##dMU);
+                                                   ((len lq_tmp$x##140) >= 0)]}
+bind 22 ds_dMr : {VV##163 : GHC.Prim.Void# | [$k_##164]}
+bind 23 lq_anf$##dML : {lq_tmp$x##178 : [a_azo] | [((len lq_tmp$x##178) >= 0);
+                                                   (lq_tmp$x##178 = xs##ayP);
+                                                   ((len lq_tmp$x##178) >= 0)]}
+bind 24 lq_anf$##dML : {lq_tmp$x##182 : [a_azo] | [((len lq_tmp$x##182) >= 0);
+                                                   (lq_tmp$x##182 = xs##ayP);
+                                                   ((len lq_tmp$x##182) >= 0);
+                                                   ((len lq_tmp$x##182) >= 0)]}
+bind 25 lq_anf$##dML : {lq_tmp$x##182 : [a_azo] | [((len lq_tmp$x##182) >= 0);
+                                                   (lq_tmp$x##182 = xs##ayP);
+                                                   ((len lq_tmp$x##182) >= 0);
+                                                   ((len lq_tmp$x##182) = 0);
+                                                   ((null lq_tmp$x##182) <=> true);
+                                                   (lq_tmp$x##182 = GHC.Types.$91$$93$$35$$35$6m);
+                                                   ((len lq_tmp$x##182) = 0);
+                                                   ((null lq_tmp$x##182) <=> true);
+                                                   ((len lq_tmp$x##182) >= 0)]}
+bind 26 lq_anf$##dML : {lq_tmp$x##195 : [a_azo] | [((len lq_tmp$x##195) >= 0);
+                                                   (lq_tmp$x##195 = xs##ayP);
+                                                   ((len lq_tmp$x##195) >= 0);
+                                                   ((len lq_tmp$x##195) >= 0)]}
+bind 27 x##ayR : {VV : a_azo | []}
+bind 28 xs##ayS : {lq_tmp$x##209 : [a_azo] | [((len lq_tmp$x##209) >= 0)]}
+bind 29 lq_anf$##dML : {lq_tmp$x##195 : [a_azo] | [((len lq_tmp$x##195) >= 0);
+                                                   (lq_tmp$x##195 = xs##ayP);
+                                                   ((len lq_tmp$x##195) >= 0);
+                                                   ((len lq_tmp$x##195) = (1 + (len xs##ayS)));
+                                                   ((null lq_tmp$x##195) <=> false);
+                                                   ((tail lq_tmp$x##195) = xs##ayS);
+                                                   ((head lq_tmp$x##195) = x##ayR);
+                                                   (lq_tmp$x##195 = (GHC.Types.$58$$35$$35$64 x##ayR xs##ayS));
+                                                   ((len lq_tmp$x##195) = (1 + (len xs##ayS)));
+                                                   ((null lq_tmp$x##195) <=> false);
+                                                   ((tail lq_tmp$x##195) = xs##ayS);
+                                                   ((head lq_tmp$x##195) = x##ayR);
+                                                   ((len lq_tmp$x##195) >= 0)]}
+bind 30 lq_anf$##dMM : {lq_tmp$x##219 : [a_azo] | [((len lq_tmp$x##219) >= 0);
+                                                   (lq_tmp$x##219 = ds_dMl);
+                                                   ((len lq_tmp$x##219) >= 0)]}
+bind 31 lq_anf$##dMM : {lq_tmp$x##223 : [a_azo] | [((len lq_tmp$x##223) >= 0);
+                                                   (lq_tmp$x##223 = ds_dMl);
+                                                   ((len lq_tmp$x##223) >= 0);
+                                                   ((len lq_tmp$x##223) >= 0)]}
+bind 32 lq_anf$##dMM : {lq_tmp$x##223 : [a_azo] | [((len lq_tmp$x##223) >= 0);
+                                                   (lq_tmp$x##223 = ds_dMl);
+                                                   ((len lq_tmp$x##223) >= 0);
+                                                   ((len lq_tmp$x##223) = 0);
+                                                   ((null lq_tmp$x##223) <=> true);
+                                                   (lq_tmp$x##223 = GHC.Types.$91$$93$$35$$35$6m);
+                                                   ((len lq_tmp$x##223) = 0);
+                                                   ((null lq_tmp$x##223) <=> true);
+                                                   ((len lq_tmp$x##223) >= 0)]}
+bind 33 ds_dMn : {VV##232 : GHC.Prim.Void# | [$k_##233]}
+bind 34 lq_anf$##dMN : {lq_tmp$x##246 : int | [(lq_tmp$x##246 ~~ lit$36$$47$Users$47$rjhala$47$research$47$stack$47$liquidhaskell$47$tests$47$pos$47$MergeSort.hs$58$$40$48$44$1$41$$45$$40$52$44$41$41$$124$function$32$merge);
+                                               ((strLen lq_tmp$x##246) = 95)]}
+bind 35 lq_anf$##dMM : {lq_tmp$x##266 : [a_azo] | [((len lq_tmp$x##266) >= 0);
+                                                   (lq_tmp$x##266 = ds_dMl);
+                                                   ((len lq_tmp$x##266) >= 0);
+                                                   ((len lq_tmp$x##266) >= 0)]}
+bind 36 y##ayT : {VV : a_azo | []}
+bind 37 ys##ayU : {lq_tmp$x##280 : [a_azo] | [((len lq_tmp$x##280) >= 0)]}
+bind 38 lq_anf$##dMM : {lq_tmp$x##266 : [a_azo] | [((len lq_tmp$x##266) >= 0);
+                                                   (lq_tmp$x##266 = ds_dMl);
+                                                   ((len lq_tmp$x##266) >= 0);
+                                                   ((len lq_tmp$x##266) = (1 + (len ys##ayU)));
+                                                   ((null lq_tmp$x##266) <=> false);
+                                                   ((tail lq_tmp$x##266) = ys##ayU);
+                                                   ((head lq_tmp$x##266) = y##ayT);
+                                                   (lq_tmp$x##266 = (GHC.Types.$58$$35$$35$64 y##ayT ys##ayU));
+                                                   ((len lq_tmp$x##266) = (1 + (len ys##ayU)));
+                                                   ((null lq_tmp$x##266) <=> false);
+                                                   ((tail lq_tmp$x##266) = ys##ayU);
+                                                   ((head lq_tmp$x##266) = y##ayT);
+                                                   ((len lq_tmp$x##266) >= 0)]}
+bind 39 lq_anf$##dMO : {lq_tmp$x##290 : GHC.Types.Bool | [((Prop lq_tmp$x##290) <=> (x##ayR <= y##ayT))]}
+bind 40 lq_anf$##dMP : {lq_tmp$x##302 : GHC.Types.Bool | [((Prop lq_tmp$x##302) <=> (x##ayR <= y##ayT));
+                                                          (lq_tmp$x##302 = lq_anf$##dMO)]}
+bind 41 lq_anf$##dMP : {lq_tmp$x##304 : GHC.Types.Bool | [((Prop lq_tmp$x##304) <=> (x##ayR <= y##ayT));
+                                                          (lq_tmp$x##304 = lq_anf$##dMO)]}
+bind 42 lq_anf$##dMP : {lq_tmp$x##304 : GHC.Types.Bool | [((Prop lq_tmp$x##304) <=> (x##ayR <= y##ayT));
+                                                          (lq_tmp$x##304 = lq_anf$##dMO);
+                                                          (~ ((Prop lq_tmp$x##304)));
+                                                          (~ ((Prop lq_tmp$x##304)));
+                                                          (~ ((Prop lq_tmp$x##304)))]}
+bind 43 ds_dMp : {VV##309 : GHC.Prim.Void# | [$k_##310]}
+bind 44 lq_tmp$x##340 : {VV : a_azo | []}
+bind 45 lq_anf$##dMQ : {lq_tmp$x##326 : [a_azo] | [((len lq_tmp$x##326) = (1 + (len xs##ayS)));
+                                                   ((null lq_tmp$x##326) <=> false);
+                                                   ((tail lq_tmp$x##326) = xs##ayS);
+                                                   ((head lq_tmp$x##326) = x##ayR);
+                                                   ((len lq_tmp$x##326) >= 0)]}
+bind 46 lq_anf$##dMR : {VV##374 : [a_azo] | [((len VV##374) = ((len lq_anf$##dMQ) + (len ys##ayU)));
+                                             ((len VV##374) >= 0)]}
+bind 47 lq_tmp$x##392 : {VV : a_azo | []}
+bind 48 lq_anf$##dMP : {lq_tmp$x##398 : GHC.Types.Bool | [((Prop lq_tmp$x##398) <=> (x##ayR <= y##ayT));
+                                                          (lq_tmp$x##398 = lq_anf$##dMO)]}
+bind 49 lq_anf$##dMP : {lq_tmp$x##398 : GHC.Types.Bool | [((Prop lq_tmp$x##398) <=> (x##ayR <= y##ayT));
+                                                          (lq_tmp$x##398 = lq_anf$##dMO);
+                                                          (Prop lq_tmp$x##398);
+                                                          (Prop lq_tmp$x##398);
+                                                          (Prop lq_tmp$x##398)]}
+bind 50 lq_tmp$x##420 : {VV : a_azo | []}
+bind 51 lq_anf$##dMS : {lq_tmp$x##406 : [a_azo] | [((len lq_tmp$x##406) = (1 + (len ys##ayU)));
+                                                   ((null lq_tmp$x##406) <=> false);
+                                                   ((tail lq_tmp$x##406) = ys##ayU);
+                                                   ((head lq_tmp$x##406) = y##ayT);
+                                                   ((len lq_tmp$x##406) >= 0)]}
+bind 52 lq_anf$##dMT : {VV##454 : [a_azo] | [((len VV##454) = ((len xs##ayS) + (len lq_anf$##dMS)));
+                                             ((len VV##454) >= 0)]}
+bind 53 lq_tmp$x##472 : {VV : a_azo | []}
+bind 54 ds_dMs : {VV##521 : [a_azx] | [((len VV##521) >= 0)]}
+bind 55 lq_anf$##dMW : {lq_tmp$x##523 : [a_azx] | [((len lq_tmp$x##523) >= 0);
+                                                   (lq_tmp$x##523 = ds_dMs);
+                                                   ((len lq_tmp$x##523) >= 0)]}
+bind 56 lq_anf$##dMW : {lq_tmp$x##527 : [a_azx] | [((len lq_tmp$x##527) >= 0);
+                                                   (lq_tmp$x##527 = ds_dMs);
+                                                   ((len lq_tmp$x##527) >= 0);
+                                                   ((len lq_tmp$x##527) >= 0)]}
+bind 57 lq_anf$##dMW : {lq_tmp$x##527 : [a_azx] | [((len lq_tmp$x##527) >= 0);
+                                                   (lq_tmp$x##527 = ds_dMs);
+                                                   ((len lq_tmp$x##527) >= 0);
+                                                   ((len lq_tmp$x##527) = 0);
+                                                   ((null lq_tmp$x##527) <=> true);
+                                                   (lq_tmp$x##527 = GHC.Types.$91$$93$$35$$35$6m);
+                                                   ((len lq_tmp$x##527) = 0);
+                                                   ((null lq_tmp$x##527) <=> true);
+                                                   ((len lq_tmp$x##527) >= 0)]}
+bind 58 lq_tmp$x##545 : {VV : a_azx | []}
+bind 59 lq_anf$##dMX : {lq_tmp$x##537 : [a_azx] | [((len lq_tmp$x##537) = 0);
+                                                   ((null lq_tmp$x##537) <=> true);
+                                                   ((len lq_tmp$x##537) >= 0)]}
+bind 60 lq_tmp$x##589 : {VV##590 : [a_azx] | [((len VV##590) >= 0)]}
+bind 61 lq_anf$##dMW : {lq_tmp$x##598 : [a_azx] | [((len lq_tmp$x##598) >= 0);
+                                                   (lq_tmp$x##598 = ds_dMs);
+                                                   ((len lq_tmp$x##598) >= 0);
+                                                   ((len lq_tmp$x##598) >= 0)]}
+bind 62 x##ayC : {VV : a_azx | []}
+bind 63 ds_dMt : {lq_tmp$x##612 : [a_azx] | [((len lq_tmp$x##612) >= 0)]}
+bind 64 lq_anf$##dMW : {lq_tmp$x##598 : [a_azx] | [((len lq_tmp$x##598) >= 0);
+                                                   (lq_tmp$x##598 = ds_dMs);
+                                                   ((len lq_tmp$x##598) >= 0);
+                                                   ((len lq_tmp$x##598) = (1 + (len ds_dMt)));
+                                                   ((null lq_tmp$x##598) <=> false);
+                                                   ((tail lq_tmp$x##598) = ds_dMt);
+                                                   ((head lq_tmp$x##598) = x##ayC);
+                                                   (lq_tmp$x##598 = (GHC.Types.$58$$35$$35$64 x##ayC ds_dMt));
+                                                   ((len lq_tmp$x##598) = (1 + (len ds_dMt)));
+                                                   ((null lq_tmp$x##598) <=> false);
+                                                   ((tail lq_tmp$x##598) = ds_dMt);
+                                                   ((head lq_tmp$x##598) = x##ayC);
+                                                   ((len lq_tmp$x##598) >= 0)]}
+bind 65 lq_anf$##dMY : {lq_tmp$x##622 : [a_azx] | [((len lq_tmp$x##622) >= 0);
+                                                   (lq_tmp$x##622 = ds_dMt);
+                                                   ((len lq_tmp$x##622) >= 0)]}
+bind 66 lq_anf$##dMY : {lq_tmp$x##626 : [a_azx] | [((len lq_tmp$x##626) >= 0);
+                                                   (lq_tmp$x##626 = ds_dMt);
+                                                   ((len lq_tmp$x##626) >= 0);
+                                                   ((len lq_tmp$x##626) >= 0)]}
+bind 67 lq_anf$##dMY : {lq_tmp$x##626 : [a_azx] | [((len lq_tmp$x##626) >= 0);
+                                                   (lq_tmp$x##626 = ds_dMt);
+                                                   ((len lq_tmp$x##626) >= 0);
+                                                   ((len lq_tmp$x##626) = 0);
+                                                   ((null lq_tmp$x##626) <=> true);
+                                                   (lq_tmp$x##626 = GHC.Types.$91$$93$$35$$35$6m);
+                                                   ((len lq_tmp$x##626) = 0);
+                                                   ((null lq_tmp$x##626) <=> true);
+                                                   ((len lq_tmp$x##626) >= 0)]}
+bind 68 lq_tmp$x##644 : {VV : a_azx | []}
+bind 69 lq_anf$##dMZ : {lq_tmp$x##636 : [a_azx] | [((len lq_tmp$x##636) = 0);
+                                                   ((null lq_tmp$x##636) <=> true);
+                                                   ((len lq_tmp$x##636) >= 0)]}
+bind 70 lq_tmp$x##688 : {VV##689 : [a_azx] | [((len VV##689) >= 0)]}
+bind 71 lq_anf$##dMY : {lq_tmp$x##697 : [a_azx] | [((len lq_tmp$x##697) >= 0);
+                                                   (lq_tmp$x##697 = ds_dMt);
+                                                   ((len lq_tmp$x##697) >= 0);
+                                                   ((len lq_tmp$x##697) >= 0)]}
+bind 72 y##ayD : {VV : a_azx | []}
+bind 73 zs##ayE : {lq_tmp$x##711 : [a_azx] | [((len lq_tmp$x##711) >= 0)]}
+bind 74 lq_anf$##dMY : {lq_tmp$x##697 : [a_azx] | [((len lq_tmp$x##697) >= 0);
+                                                   (lq_tmp$x##697 = ds_dMt);
+                                                   ((len lq_tmp$x##697) >= 0);
+                                                   ((len lq_tmp$x##697) = (1 + (len zs##ayE)));
+                                                   ((null lq_tmp$x##697) <=> false);
+                                                   ((tail lq_tmp$x##697) = zs##ayE);
+                                                   ((head lq_tmp$x##697) = y##ayD);
+                                                   (lq_tmp$x##697 = (GHC.Types.$58$$35$$35$64 y##ayD zs##ayE));
+                                                   ((len lq_tmp$x##697) = (1 + (len zs##ayE)));
+                                                   ((null lq_tmp$x##697) <=> false);
+                                                   ((tail lq_tmp$x##697) = zs##ayE);
+                                                   ((head lq_tmp$x##697) = y##ayD);
+                                                   ((len lq_tmp$x##697) >= 0)]}
+bind 75 ds_dMw : {v##0 : (Tuple  [a_azx]  [a_azx]) | [(((len (fst v##0)) + (len (snd v##0))) = (len zs##ayE))]}
+bind 76 ds_dMw : {lq_tmp$x##762 : (Tuple  [a_azx]  [a_azx]) | [(((len (fst lq_tmp$x##762)) + (len (snd lq_tmp$x##762))) = (len zs##ayE))]}
+bind 77 xs##aA4 : {lq_tmp$x##756 : [a_azx] | [(((len lq_tmp$x##756) > 1) => ((len lq_tmp$x##756) < (len zs##ayE)));
+                                              ((len lq_tmp$x##756) >= 0)]}
+bind 78 ys##XAl : {lq_tmp$x##758 : [a_azx] | [((len lq_tmp$x##758) >= 0)]}
+bind 79 ds_dMw : {lq_tmp$x##762 : (Tuple  [a_azx]  [a_azx]) | [(((len (fst lq_tmp$x##762)) + (len (snd lq_tmp$x##762))) = (len zs##ayE));
+                                                               ((snd lq_tmp$x##762) = ys##XAl);
+                                                               ((fst lq_tmp$x##762) = xs##aA4);
+                                                               ((x_Tuple22 lq_tmp$x##762) = ys##XAl);
+                                                               ((x_Tuple21 lq_tmp$x##762) = xs##aA4);
+                                                               (lq_tmp$x##762 = (GHC.Tuple.$40$$44$$41$$35$$35$74 xs##aA4 ys##XAl));
+                                                               ((snd lq_tmp$x##762) = ys##XAl);
+                                                               ((fst lq_tmp$x##762) = xs##aA4);
+                                                               ((x_Tuple22 lq_tmp$x##762) = ys##XAl);
+                                                               ((x_Tuple21 lq_tmp$x##762) = xs##aA4)]}
+bind 80 xs##aA4 : {VV##752 : [a_azx] | [$k_##753;
+                                        ((len VV##752) >= 0)]}
+bind 81 ds_dMw : {lq_tmp$x##804 : (Tuple  [a_azx]  [a_azx]) | [(((len (fst lq_tmp$x##804)) + (len (snd lq_tmp$x##804))) = (len zs##ayE))]}
+bind 82 xs##aA4 : {lq_tmp$x##798 : [a_azx] | [((len lq_tmp$x##798) >= 0)]}
+bind 83 ys##aA5 : {lq_tmp$x##800 : [a_azx] | [(((len lq_tmp$x##800) > 1) => ((len lq_tmp$x##800) < (len zs##ayE)));
+                                              ((len lq_tmp$x##800) >= 0)]}
+bind 84 ds_dMw : {lq_tmp$x##804 : (Tuple  [a_azx]  [a_azx]) | [(((len (fst lq_tmp$x##804)) + (len (snd lq_tmp$x##804))) = (len zs##ayE));
+                                                               ((snd lq_tmp$x##804) = ys##aA5);
+                                                               ((fst lq_tmp$x##804) = xs##aA4);
+                                                               ((x_Tuple22 lq_tmp$x##804) = ys##aA5);
+                                                               ((x_Tuple21 lq_tmp$x##804) = xs##aA4);
+                                                               (lq_tmp$x##804 = (GHC.Tuple.$40$$44$$41$$35$$35$74 xs##aA4 ys##aA5));
+                                                               ((snd lq_tmp$x##804) = ys##aA5);
+                                                               ((fst lq_tmp$x##804) = xs##aA4);
+                                                               ((x_Tuple22 lq_tmp$x##804) = ys##aA5);
+                                                               ((x_Tuple21 lq_tmp$x##804) = xs##aA4)]}
+bind 85 ys##aA5 : {VV##794 : [a_azx] | [$k_##795;
+                                        ((len VV##794) >= 0)]}
+bind 86 lq_tmp$x##846 : {VV : a_azx | []}
+bind 87 lq_anf$##dN0 : {lq_tmp$x##832 : [a_azx] | [((len lq_tmp$x##832) = (1 + (len xs##aA4)));
+                                                   ((null lq_tmp$x##832) <=> false);
+                                                   ((tail lq_tmp$x##832) = xs##aA4);
+                                                   ((head lq_tmp$x##832) = x##ayC);
+                                                   ((len lq_tmp$x##832) >= 0)]}
+bind 88 lq_tmp$x##869 : {VV : a_azx | []}
+bind 89 lq_anf$##dN1 : {lq_tmp$x##855 : [a_azx] | [((len lq_tmp$x##855) = (1 + (len ys##aA5)));
+                                                   ((null lq_tmp$x##855) <=> false);
+                                                   ((tail lq_tmp$x##855) = ys##aA5);
+                                                   ((head lq_tmp$x##855) = y##ayD);
+                                                   ((len lq_tmp$x##855) >= 0)]}
+bind 90 lq_tmp$x##916 : {VV##917 : [a_azx] | [((len VV##917) >= 0)]}
+bind 91 fix$36$$36$dOrd_aAe : {VV##948 : (GHC.Classes.Ord  a_azJ) | []}
+bind 92 ds_dMB : {VV##949 : [a_azJ] | [((len VV##949) >= 0)]}
+bind 93 lq_anf$##dN2 : {lq_tmp$x##951 : [a_azJ] | [((len lq_tmp$x##951) >= 0);
+                                                   (lq_tmp$x##951 = ds_dMB);
+                                                   ((len lq_tmp$x##951) >= 0)]}
+bind 94 lq_anf$##dN2 : {lq_tmp$x##955 : [a_azJ] | [((len lq_tmp$x##955) >= 0);
+                                                   (lq_tmp$x##955 = ds_dMB);
+                                                   ((len lq_tmp$x##955) >= 0);
+                                                   ((len lq_tmp$x##955) >= 0)]}
+bind 95 lq_anf$##dN2 : {lq_tmp$x##955 : [a_azJ] | [((len lq_tmp$x##955) >= 0);
+                                                   (lq_tmp$x##955 = ds_dMB);
+                                                   ((len lq_tmp$x##955) >= 0);
+                                                   ((len lq_tmp$x##955) = 0);
+                                                   ((null lq_tmp$x##955) <=> true);
+                                                   (lq_tmp$x##955 = GHC.Types.$91$$93$$35$$35$6m);
+                                                   ((len lq_tmp$x##955) = 0);
+                                                   ((null lq_tmp$x##955) <=> true);
+                                                   ((len lq_tmp$x##955) >= 0)]}
+bind 96 lq_tmp$x##973 : {VV : a_azJ | []}
+bind 97 lq_anf$##dN2 : {lq_tmp$x##976 : [a_azJ] | [((len lq_tmp$x##976) >= 0);
+                                                   (lq_tmp$x##976 = ds_dMB);
+                                                   ((len lq_tmp$x##976) >= 0);
+                                                   ((len lq_tmp$x##976) >= 0)]}
+bind 98 x##ayy : {VV : a_azJ | []}
+bind 99 ds_dMC : {lq_tmp$x##990 : [a_azJ] | [((len lq_tmp$x##990) >= 0)]}
+bind 100 lq_anf$##dN2 : {lq_tmp$x##976 : [a_azJ] | [((len lq_tmp$x##976) >= 0);
+                                                    (lq_tmp$x##976 = ds_dMB);
+                                                    ((len lq_tmp$x##976) >= 0);
+                                                    ((len lq_tmp$x##976) = (1 + (len ds_dMC)));
+                                                    ((null lq_tmp$x##976) <=> false);
+                                                    ((tail lq_tmp$x##976) = ds_dMC);
+                                                    ((head lq_tmp$x##976) = x##ayy);
+                                                    (lq_tmp$x##976 = (GHC.Types.$58$$35$$35$64 x##ayy ds_dMC));
+                                                    ((len lq_tmp$x##976) = (1 + (len ds_dMC)));
+                                                    ((null lq_tmp$x##976) <=> false);
+                                                    ((tail lq_tmp$x##976) = ds_dMC);
+                                                    ((head lq_tmp$x##976) = x##ayy);
+                                                    ((len lq_tmp$x##976) >= 0)]}
+bind 101 lq_anf$##dN3 : {lq_tmp$x##1000 : [a_azJ] | [((len lq_tmp$x##1000) >= 0);
+                                                     (lq_tmp$x##1000 = ds_dMC);
+                                                     ((len lq_tmp$x##1000) >= 0)]}
+bind 102 lq_anf$##dN3 : {lq_tmp$x##1004 : [a_azJ] | [((len lq_tmp$x##1004) >= 0);
+                                                     (lq_tmp$x##1004 = ds_dMC);
+                                                     ((len lq_tmp$x##1004) >= 0);
+                                                     ((len lq_tmp$x##1004) >= 0)]}
+bind 103 lq_anf$##dN3 : {lq_tmp$x##1004 : [a_azJ] | [((len lq_tmp$x##1004) >= 0);
+                                                     (lq_tmp$x##1004 = ds_dMC);
+                                                     ((len lq_tmp$x##1004) >= 0);
+                                                     ((len lq_tmp$x##1004) = 0);
+                                                     ((null lq_tmp$x##1004) <=> true);
+                                                     (lq_tmp$x##1004 = GHC.Types.$91$$93$$35$$35$6m);
+                                                     ((len lq_tmp$x##1004) = 0);
+                                                     ((null lq_tmp$x##1004) <=> true);
+                                                     ((len lq_tmp$x##1004) >= 0)]}
+bind 104 lq_tmp$x##1022 : {VV : a_azJ | []}
+bind 105 lq_anf$##dN6 : {lq_tmp$x##1014 : [a_azJ] | [((len lq_tmp$x##1014) = 0);
+                                                     ((null lq_tmp$x##1014) <=> true);
+                                                     ((len lq_tmp$x##1014) >= 0)]}
+bind 106 lq_tmp$x##1042 : {VV : a_azJ | []}
+bind 107 lq_anf$##dN3 : {lq_tmp$x##1048 : [a_azJ] | [((len lq_tmp$x##1048) >= 0);
+                                                     (lq_tmp$x##1048 = ds_dMC);
+                                                     ((len lq_tmp$x##1048) >= 0);
+                                                     ((len lq_tmp$x##1048) >= 0)]}
+bind 108 lq_anf$##dN7 : {VV : a_azJ | []}
+bind 109 lq_anf$##dN8 : {lq_tmp$x##1062 : [a_azJ] | [((len lq_tmp$x##1062) >= 0)]}
+bind 110 lq_anf$##dN3 : {lq_tmp$x##1048 : [a_azJ] | [((len lq_tmp$x##1048) >= 0);
+                                                     (lq_tmp$x##1048 = ds_dMC);
+                                                     ((len lq_tmp$x##1048) >= 0);
+                                                     ((len lq_tmp$x##1048) = (1 + (len lq_anf$##dN8)));
+                                                     ((null lq_tmp$x##1048) <=> false);
+                                                     ((tail lq_tmp$x##1048) = lq_anf$##dN8);
+                                                     ((head lq_tmp$x##1048) = lq_anf$##dN7);
+                                                     (lq_tmp$x##1048 = (GHC.Types.$58$$35$$35$64 lq_anf$##dN7 lq_anf$##dN8));
+                                                     ((len lq_tmp$x##1048) = (1 + (len lq_anf$##dN8)));
+                                                     ((null lq_tmp$x##1048) <=> false);
+                                                     ((tail lq_tmp$x##1048) = lq_anf$##dN8);
+                                                     ((head lq_tmp$x##1048) = lq_anf$##dN7);
+                                                     ((len lq_tmp$x##1048) >= 0)]}
+bind 111 ds_dMJ : {VV##1071 : GHC.Prim.Void# | [$k_##1072]}
+bind 112 ds_dMD : {lq_tmp$x##1094 : (Tuple  [a_azJ]  [a_azJ]) | [(((len (fst lq_tmp$x##1094)) + (len (snd lq_tmp$x##1094))) = (len ds_dMB))]}
+bind 113 ds_dMD : {lq_tmp$x##1127 : (Tuple  [a_azJ]  [a_azJ]) | [(((len (fst lq_tmp$x##1127)) + (len (snd lq_tmp$x##1127))) = (len ds_dMB))]}
+bind 114 xs1##aAj : {lq_tmp$x##1121 : [a_azJ] | [(((len lq_tmp$x##1121) > 1) => ((len lq_tmp$x##1121) < (len ds_dMB)));
+                                                 ((len lq_tmp$x##1121) >= 0)]}
+bind 115 xs2##XAw : {lq_tmp$x##1123 : [a_azJ] | [((len lq_tmp$x##1123) >= 0)]}
+bind 116 ds_dMD : {lq_tmp$x##1127 : (Tuple  [a_azJ]  [a_azJ]) | [(((len (fst lq_tmp$x##1127)) + (len (snd lq_tmp$x##1127))) = (len ds_dMB));
+                                                                 ((snd lq_tmp$x##1127) = xs2##XAw);
+                                                                 ((fst lq_tmp$x##1127) = xs1##aAj);
+                                                                 ((x_Tuple22 lq_tmp$x##1127) = xs2##XAw);
+                                                                 ((x_Tuple21 lq_tmp$x##1127) = xs1##aAj);
+                                                                 (lq_tmp$x##1127 = (GHC.Tuple.$40$$44$$41$$35$$35$74 xs1##aAj xs2##XAw));
+                                                                 ((snd lq_tmp$x##1127) = xs2##XAw);
+                                                                 ((fst lq_tmp$x##1127) = xs1##aAj);
+                                                                 ((x_Tuple22 lq_tmp$x##1127) = xs2##XAw);
+                                                                 ((x_Tuple21 lq_tmp$x##1127) = xs1##aAj)]}
+bind 117 xs1##aAj : {VV##1117 : [a_azJ] | [$k_##1118;
+                                           ((len VV##1117) >= 0)]}
+bind 118 ds_dMD : {lq_tmp$x##1169 : (Tuple  [a_azJ]  [a_azJ]) | [(((len (fst lq_tmp$x##1169)) + (len (snd lq_tmp$x##1169))) = (len ds_dMB))]}
+bind 119 xs1##aAj : {lq_tmp$x##1163 : [a_azJ] | [((len lq_tmp$x##1163) >= 0)]}
+bind 120 xs2##aAk : {lq_tmp$x##1165 : [a_azJ] | [(((len lq_tmp$x##1165) > 1) => ((len lq_tmp$x##1165) < (len ds_dMB)));
+                                                 ((len lq_tmp$x##1165) >= 0)]}
+bind 121 ds_dMD : {lq_tmp$x##1169 : (Tuple  [a_azJ]  [a_azJ]) | [(((len (fst lq_tmp$x##1169)) + (len (snd lq_tmp$x##1169))) = (len ds_dMB));
+                                                                 ((snd lq_tmp$x##1169) = xs2##aAk);
+                                                                 ((fst lq_tmp$x##1169) = xs1##aAj);
+                                                                 ((x_Tuple22 lq_tmp$x##1169) = xs2##aAk);
+                                                                 ((x_Tuple21 lq_tmp$x##1169) = xs1##aAj);
+                                                                 (lq_tmp$x##1169 = (GHC.Tuple.$40$$44$$41$$35$$35$74 xs1##aAj xs2##aAk));
+                                                                 ((snd lq_tmp$x##1169) = xs2##aAk);
+                                                                 ((fst lq_tmp$x##1169) = xs1##aAj);
+                                                                 ((x_Tuple22 lq_tmp$x##1169) = xs2##aAk);
+                                                                 ((x_Tuple21 lq_tmp$x##1169) = xs1##aAj)]}
+bind 122 xs2##aAk : {VV##1159 : [a_azJ] | [$k_##1160;
+                                           ((len VV##1159) >= 0)]}
+bind 123 lq_anf$##dN4 : {VV##1213 : [a_azJ] | [((len VV##1213) = (len xs1##aAj));
+                                               ((len VV##1213) >= 0)]}
+bind 124 lq_anf$##dN5 : {VV##1233 : [a_azJ] | [((len VV##1233) = (len xs2##aAk));
+                                               ((len VV##1233) >= 0)]}
+bind 125 fix$36$$36$dOrd_aAe : {VV##1277 : (GHC.Classes.Ord  a_azJ) | []}
+bind 126 VV##1278 : {VV##1278 : [a_azJ] | [((len VV##1278) >= 0)]}
+bind 127 lq_tmp$x##945 : {VV : a_azJ | []}
+bind 128 lq_tmp$x##1270 : {VV##1281 : [a_azJ] | [((len VV##1281) >= 0)]}
+bind 129 VV##1282 : {VV##1282 : [a_azJ] | [((len VV##1282) >= 0)]}
+bind 130 lq_tmp$x##946 : {VV : a_azJ | []}
+bind 131 VV##1285 : {VV##1285 : [a_azJ] | [((len VV##1285) >= 0)]}
+bind 132 lq_tmp$x##945 : {VV : a_azJ | []}
+bind 133 ds_dMB : {VV##1288 : [a_azJ] | [((len VV##1288) >= 0)]}
+bind 134 VV##1289 : {VV##1289 : [a_azJ] | [((len VV##1289) >= 0)]}
+bind 135 lq_tmp$x##946 : {VV : a_azJ | []}
+bind 136 VV##1292 : {VV##1292 : [a_azJ] | [$k_##1083[VV##1082:=VV##1292][ds_dMJ:=GHC.Prim.void###0l];
+                                           ((len VV##1292) >= 0)]}
+bind 137 lq_tmp$x##946 : {VV : a_azJ | []}
+bind 138 VV##1295 : {VV##1295 : GHC.Prim.Void# | [(VV##1295 = GHC.Prim.void###0l)]}
+bind 139 VV##1297 : {VV##1297 : [a_azJ] | [((len VV##1297) = ((len lq_anf$##dN4) + (len lq_anf$##dN5)));
+                                           ((len VV##1297) >= 0)]}
+bind 140 lq_tmp$x##1078 : {VV : a_azJ | []}
+bind 141 VV##1300 : {VV##1300 : [a_azJ] | [((len VV##1300) = (len xs2##aAk));
+                                           ((len VV##1300) >= 0);
+                                           (VV##1300 = lq_anf$##dN5);
+                                           ((len VV##1300) >= 0)]}
+bind 142 lq_tmp$x##1250 : {VV : a_azJ | []}
+bind 143 VV##1303 : {VV##1303 : [a_azJ] | [((len VV##1303) = (len xs1##aAj));
+                                           ((len VV##1303) >= 0);
+                                           (VV##1303 = lq_anf$##dN4);
+                                           ((len VV##1303) >= 0)]}
+bind 144 lq_tmp$x##1249 : {VV : a_azJ | []}
+bind 145 VV##1306 : {VV##1306 : [a_azJ] | [$k_##1160[VV##1159:=VV##1306][lq_tmp$x##1231:=VV##1306];
+                                           ((len VV##1306) >= 0);
+                                           (VV##1306 = xs2##aAk);
+                                           ((len VV##1306) >= 0)]}
+bind 146 lq_tmp$x##945 : {VV : a_azJ | []}
+bind 147 VV##1309 : {VV##1309 : [a_azJ] | [$k_##1118[VV##1117:=VV##1309][lq_tmp$x##1211:=VV##1309];
+                                           ((len VV##1309) >= 0);
+                                           (VV##1309 = xs1##aAj);
+                                           ((len VV##1309) >= 0)]}
+bind 148 lq_tmp$x##945 : {VV : a_azJ | []}
+bind 149 VV##1312 : {VV##1312 : [a_azJ] | [(((len VV##1312) > 1) => ((len VV##1312) < (len ds_dMB)));
+                                           ((len VV##1312) >= 0);
+                                           (VV##1312 = xs2##aAk);
+                                           ((len VV##1312) >= 0)]}
+bind 150 lq_tmp$x##1155 : {VV : a_azJ | []}
+bind 151 VV##1315 : {VV##1315 : [a_azJ] | [(((len VV##1315) > 1) => ((len VV##1315) < (len ds_dMB)));
+                                           ((len VV##1315) >= 0);
+                                           (VV##1315 = xs1##aAj);
+                                           ((len VV##1315) >= 0)]}
+bind 152 lq_tmp$x##1113 : {VV : a_azJ | []}
+bind 153 VV##1318 : {VV##1318 : [a_azJ] | [((len VV##1318) >= 0);
+                                           (VV##1318 = ds_dMB);
+                                           ((len VV##1318) >= 0)]}
+bind 154 lq_tmp$x##1098 : {VV : a_azJ | []}
+bind 155 VV##1321 : {VV##1321 : [a_azJ] | [((len VV##1321) = (1 + (len lq_anf$##dN6)));
+                                           ((null VV##1321) <=> false);
+                                           ((tail VV##1321) = lq_anf$##dN6);
+                                           ((head VV##1321) = x##ayy);
+                                           ((len VV##1321) >= 0)]}
+bind 156 lq_tmp$x##946 : {VV : a_azJ | []}
+bind 157 VV##1324 : {VV##1324 : [a_azJ] | [((len VV##1324) = 0);
+                                           ((null VV##1324) <=> true);
+                                           ((len VV##1324) >= 0);
+                                           (VV##1324 = lq_anf$##dN6);
+                                           ((len VV##1324) >= 0)]}
+bind 158 lq_tmp$x##1034 : {VV : a_azJ | []}
+bind 159 VV##1327 : {VV##1327 : [a_azJ] | [((len VV##1327) = 0);
+                                           ((null VV##1327) <=> true);
+                                           ((len VV##1327) >= 0)]}
+bind 160 lq_tmp$x##946 : {VV : a_azJ | []}
+bind 161 VV##1330 : {VV##1330 : [a_azx] | [((len VV##1330) >= 0)]}
+bind 162 lq_tmp$x##515 : {VV : a_azx | []}
+bind 163 ds_dMs : {VV##1333 : [a_azx] | [((len VV##1333) >= 0)]}
+bind 164 VV##1334 : {VV##1334 : (Tuple  [a_azx]  [a_azx]) | []}
+bind 165 VV##1336 : {VV##1336 : [a_azx] | [((len VV##1336) >= 0)]}
+bind 166 lq_tmp$x##516 : {VV : a_azx | []}
+bind 167 VV##1339 : {VV##1339 : [a_azx] | [((len VV##1339) >= 0)]}
+bind 168 lq_tmp$x##517 : {VV : a_azx | []}
+bind 169 lq_tmp$x##519 : {VV##1342 : [a_azx] | [((len VV##1342) >= 0)]}
+bind 170 VV##1343 : {VV##1343 : [a_azx] | [((len VV##1343) >= 0)]}
+bind 171 lq_tmp$x##518 : {VV : a_azx | []}
+bind 172 VV##1346 : {VV##1346 : (Tuple  [a_azx]  [a_azx]) | [((snd VV##1346) = lq_anf$##dN1);
+                                                             ((fst VV##1346) = lq_anf$##dN0);
+                                                             ((x_Tuple22 VV##1346) = lq_anf$##dN1);
+                                                             ((x_Tuple21 VV##1346) = lq_anf$##dN0)]}
+bind 173 VV##1348 : {VV##1348 : [a_azx] | [$k_##890[VV##889:=VV##1348][lq_tmp$x##893:=VV##1348][lq_tmp$x##879:=lq_anf$##dN0][lq_tmp$x##880:=lq_anf$##dN1][lq_tmp$x##876:=VV##1346];
+                                           ((len VV##1348) >= 0)]}
+bind 174 lq_tmp$x##516 : {VV : a_azx | []}
+bind 175 VV##1351 : {VV##1351 : [a_azx] | [$k_##902[lq_tmp$x##879:=lq_anf$##dN0][lq_tmp$x##905:=VV##1351][lq_tmp$x##880:=lq_anf$##dN1][VV##901:=VV##1351][lq_tmp$x##876:=VV##1346];
+                                           ((len VV##1351) >= 0)]}
+bind 176 lq_tmp$x##517 : {VV : a_azx | []}
+bind 177 lq_tmp$x##519 : {VV##1354 : [a_azx] | [((len VV##1354) >= 0)]}
+bind 178 VV##1355 : {VV##1355 : [a_azx] | [$k_##914[lq_tmp$x##881:=lq_tmp$x##519][VV##913:=VV##1355][lq_tmp$x##879:=lq_anf$##dN0][lq_tmp$x##916:=lq_tmp$x##519][lq_tmp$x##905:=VV##1355][lq_tmp$x##880:=lq_anf$##dN1][lq_tmp$x##876:=VV##1346];
+                                           ((len VV##1355) >= 0)]}
+bind 179 lq_tmp$x##518 : {VV : a_azx | []}
+bind 180 VV##1358 : {VV##1358 : [a_azx] | [((len VV##1358) = (1 + (len ys##aA5)));
+                                           ((null VV##1358) <=> false);
+                                           ((tail VV##1358) = ys##aA5);
+                                           ((head VV##1358) = y##ayD);
+                                           ((len VV##1358) >= 0);
+                                           (VV##1358 = lq_anf$##dN1);
+                                           ((len VV##1358) >= 0)]}
+bind 181 lq_tmp$x##904 : {VV : a_azx | []}
+bind 182 VV##1361 : {VV##1361 : [a_azx] | [((len VV##1361) = (1 + (len xs##aA4)));
+                                           ((null VV##1361) <=> false);
+                                           ((tail VV##1361) = xs##aA4);
+                                           ((head VV##1361) = x##ayC);
+                                           ((len VV##1361) >= 0);
+                                           (VV##1361 = lq_anf$##dN0);
+                                           ((len VV##1361) >= 0)]}
+bind 183 lq_tmp$x##892 : {VV : a_azx | []}
+bind 184 VV##1364 : {VV##1364 : [a_azx] | [$k_##795[lq_tmp$x##872:=VV##1364][VV##794:=VV##1364];
+                                           ((len VV##1364) >= 0);
+                                           (VV##1364 = ys##aA5);
+                                           ((len VV##1364) >= 0)]}
+bind 185 lq_tmp$x##861 : {VV : a_azx | []}
+bind 186 VV##1367 : {VV##1367 : [a_azx] | [$k_##753[VV##752:=VV##1367][lq_tmp$x##849:=VV##1367];
+                                           ((len VV##1367) >= 0);
+                                           (VV##1367 = xs##aA4);
+                                           ((len VV##1367) >= 0)]}
+bind 187 lq_tmp$x##838 : {VV : a_azx | []}
+bind 188 VV##1370 : {VV##1370 : [a_azx] | [(((len VV##1370) > 1) => ((len VV##1370) < (len zs##ayE)));
+                                           ((len VV##1370) >= 0);
+                                           (VV##1370 = ys##aA5);
+                                           ((len VV##1370) >= 0)]}
+bind 189 lq_tmp$x##790 : {VV : a_azx | []}
+bind 190 VV##1373 : {VV##1373 : [a_azx] | [(((len VV##1373) > 1) => ((len VV##1373) < (len zs##ayE)));
+                                           ((len VV##1373) >= 0);
+                                           (VV##1373 = xs##aA4);
+                                           ((len VV##1373) >= 0)]}
+bind 191 lq_tmp$x##748 : {VV : a_azx | []}
+bind 192 VV##1376 : {VV##1376 : [a_azx] | [((len VV##1376) >= 0);
+                                           (VV##1376 = zs##ayE);
+                                           ((len VV##1376) >= 0)]}
+bind 193 lq_tmp$x##515 : {VV : a_azx | []}
+bind 194 VV##1379 : {VV##1379 : (Tuple  [a_azx]  [a_azx]) | [((snd VV##1379) = lq_anf$##dMZ);
+                                                             ((fst VV##1379) = ds_dMs);
+                                                             ((x_Tuple22 VV##1379) = lq_anf$##dMZ);
+                                                             ((x_Tuple21 VV##1379) = ds_dMs)]}
+bind 195 VV##1381 : {VV##1381 : [a_azx] | [$k_##662[lq_tmp$x##652:=lq_anf$##dMZ][lq_tmp$x##665:=VV##1381][lq_tmp$x##648:=VV##1379][lq_tmp$x##651:=ds_dMs][VV##661:=VV##1381];
+                                           ((len VV##1381) >= 0)]}
+bind 196 lq_tmp$x##516 : {VV : a_azx | []}
+bind 197 VV##1384 : {VV##1384 : [a_azx] | [$k_##674[lq_tmp$x##652:=lq_anf$##dMZ][VV##673:=VV##1384][lq_tmp$x##648:=VV##1379][lq_tmp$x##651:=ds_dMs][lq_tmp$x##677:=VV##1384];
+                                           ((len VV##1384) >= 0)]}
+bind 198 lq_tmp$x##517 : {VV : a_azx | []}
+bind 199 lq_tmp$x##519 : {VV##1387 : [a_azx] | [((len VV##1387) >= 0)]}
+bind 200 VV##1388 : {VV##1388 : [a_azx] | [$k_##686[lq_tmp$x##652:=lq_anf$##dMZ][lq_tmp$x##688:=lq_tmp$x##519][lq_tmp$x##648:=VV##1379][VV##685:=VV##1388][lq_tmp$x##651:=ds_dMs][lq_tmp$x##653:=lq_tmp$x##519][lq_tmp$x##677:=VV##1388];
+                                           ((len VV##1388) >= 0)]}
+bind 201 lq_tmp$x##518 : {VV : a_azx | []}
+bind 202 VV##1391 : {VV##1391 : [a_azx] | [((len VV##1391) = 0);
+                                           ((null VV##1391) <=> true);
+                                           ((len VV##1391) >= 0);
+                                           (VV##1391 = lq_anf$##dMZ);
+                                           ((len VV##1391) >= 0)]}
+bind 203 lq_tmp$x##676 : {VV : a_azx | []}
+bind 204 VV##1394 : {VV##1394 : [a_azx] | [((len VV##1394) >= 0);
+                                           (VV##1394 = ds_dMs);
+                                           ((len VV##1394) >= 0)]}
+bind 205 lq_tmp$x##664 : {VV : a_azx | []}
+bind 206 VV##1397 : {VV##1397 : (Tuple  [a_azx]  [a_azx]) | [((snd VV##1397) = lq_anf$##dMX);
+                                                             ((fst VV##1397) = ds_dMs);
+                                                             ((x_Tuple22 VV##1397) = lq_anf$##dMX);
+                                                             ((x_Tuple21 VV##1397) = ds_dMs)]}
+bind 207 VV##1399 : {VV##1399 : [a_azx] | [$k_##563[lq_tmp$x##553:=lq_anf$##dMX][lq_tmp$x##566:=VV##1399][lq_tmp$x##552:=ds_dMs][VV##562:=VV##1399][lq_tmp$x##549:=VV##1397];
+                                           ((len VV##1399) >= 0)]}
+bind 208 lq_tmp$x##516 : {VV : a_azx | []}
+bind 209 VV##1402 : {VV##1402 : [a_azx] | [$k_##575[VV##574:=VV##1402][lq_tmp$x##553:=lq_anf$##dMX][lq_tmp$x##578:=VV##1402][lq_tmp$x##552:=ds_dMs][lq_tmp$x##549:=VV##1397];
+                                           ((len VV##1402) >= 0)]}
+bind 210 lq_tmp$x##517 : {VV : a_azx | []}
+bind 211 lq_tmp$x##519 : {VV##1405 : [a_azx] | [((len VV##1405) >= 0)]}
+bind 212 VV##1406 : {VV##1406 : [a_azx] | [$k_##587[lq_tmp$x##554:=lq_tmp$x##519][lq_tmp$x##553:=lq_anf$##dMX][lq_tmp$x##589:=lq_tmp$x##519][lq_tmp$x##578:=VV##1406][VV##586:=VV##1406][lq_tmp$x##552:=ds_dMs][lq_tmp$x##549:=VV##1397];
+                                           ((len VV##1406) >= 0)]}
+bind 213 lq_tmp$x##518 : {VV : a_azx | []}
+bind 214 VV##1409 : {VV##1409 : [a_azx] | [((len VV##1409) = 0);
+                                           ((null VV##1409) <=> true);
+                                           ((len VV##1409) >= 0);
+                                           (VV##1409 = lq_anf$##dMX);
+                                           ((len VV##1409) >= 0)]}
+bind 215 lq_tmp$x##577 : {VV : a_azx | []}
+bind 216 VV##1412 : {VV##1412 : [a_azx] | [((len VV##1412) >= 0);
+                                           (VV##1412 = ds_dMs);
+                                           ((len VV##1412) >= 0)]}
+bind 217 lq_tmp$x##565 : {VV : a_azx | []}
+bind 218 fix$36$$36$dOrd_azK : {VV##1415 : (GHC.Classes.Ord  a_azo) | []}
+bind 219 VV##1416 : {VV##1416 : [a_azo] | [((len VV##1416) >= 0)]}
+bind 220 lq_tmp$x##115 : {VV : a_azo | []}
+bind 221 lq_tmp$x##495 : {VV##1419 : [a_azo] | [((len VV##1419) >= 0)]}
+bind 222 VV##1420 : {VV##1420 : [a_azo] | [((len VV##1420) >= 0)]}
+bind 223 lq_tmp$x##116 : {VV : a_azo | []}
+bind 224 lq_tmp$x##499 : {VV##1423 : [a_azo] | [((len VV##1423) >= 0)]}
+bind 225 VV##1424 : {VV##1424 : [a_azo] | [((len VV##1424) >= 0)]}
+bind 226 lq_tmp$x##117 : {VV : a_azo | []}
+bind 227 VV##1427 : {VV##1427 : [a_azo] | [((len VV##1427) >= 0)]}
+bind 228 lq_tmp$x##115 : {VV : a_azo | []}
+bind 229 xs##ayP : {VV##1430 : [a_azo] | [((len VV##1430) >= 0)]}
+bind 230 VV##1431 : {VV##1431 : [a_azo] | [((len VV##1431) >= 0)]}
+bind 231 lq_tmp$x##116 : {VV : a_azo | []}
+bind 232 lq_tmp$x##487 : {VV##1434 : [a_azo] | [((len VV##1434) >= 0)]}
+bind 233 VV##1435 : {VV##1435 : [a_azo] | [((len VV##1435) >= 0)]}
+bind 234 lq_tmp$x##117 : {VV : a_azo | []}
+bind 235 VV##1438 : {VV##1438 : [a_azo] | [((len VV##1438) >= 0)]}
+bind 236 lq_tmp$x##116 : {VV : a_azo | []}
+bind 237 ds_dMl : {VV##1441 : [a_azo] | [((len VV##1441) >= 0)]}
+bind 238 VV##1442 : {VV##1442 : [a_azo] | [((len VV##1442) >= 0)]}
+bind 239 lq_tmp$x##117 : {VV : a_azo | []}
+bind 240 VV##1445 : {VV##1445 : [a_azo] | [$k_##175[VV##174:=VV##1445][ds_dMr:=GHC.Prim.void###0l];
+                                           ((len VV##1445) >= 0)]}
+bind 241 lq_tmp$x##117 : {VV : a_azo | []}
+bind 242 VV##1448 : {VV##1448 : GHC.Prim.Void# | [(VV##1448 = GHC.Prim.void###0l)]}
+bind 243 VV##1450 : {VV##1450 : [a_azo] | [((len VV##1450) = (1 + (len lq_anf$##dMT)));
+                                           ((null VV##1450) <=> false);
+                                           ((tail VV##1450) = lq_anf$##dMT);
+                                           ((head VV##1450) = x##ayR);
+                                           ((len VV##1450) >= 0)]}
+bind 244 lq_tmp$x##170 : {VV : a_azo | []}
+bind 245 VV##1453 : {VV##1453 : [a_azo] | [((len VV##1453) = ((len xs##ayS) + (len lq_anf$##dMS)));
+                                           ((len VV##1453) >= 0);
+                                           (VV##1453 = lq_anf$##dMT);
+                                           ((len VV##1453) >= 0)]}
+bind 246 lq_tmp$x##464 : {VV : a_azo | []}
+bind 247 VV##1456 : {VV##1456 : [a_azo] | [((len VV##1456) = (1 + (len ys##ayU)));
+                                           ((null VV##1456) <=> false);
+                                           ((tail VV##1456) = ys##ayU);
+                                           ((head VV##1456) = y##ayT);
+                                           ((len VV##1456) >= 0);
+                                           (VV##1456 = lq_anf$##dMS);
+                                           ((len VV##1456) >= 0)]}
+bind 248 lq_tmp$x##116 : {VV : a_azo | []}
+bind 249 VV##1459 : {VV##1459 : [a_azo] | [((len VV##1459) >= 0);
+                                           (VV##1459 = xs##ayS);
+                                           ((len VV##1459) >= 0)]}
+bind 250 lq_tmp$x##115 : {VV : a_azo | []}
+bind 251 VV##1462 : {VV##1462 : [a_azo] | [((len VV##1462) >= 0);
+                                           (VV##1462 = ys##ayU);
+                                           ((len VV##1462) >= 0)]}
+bind 252 lq_tmp$x##412 : {VV : a_azo | []}
+bind 253 VV##1465 : {VV##1465 : [a_azo] | [$k_##321[VV##320:=VV##1465][ds_dMp:=GHC.Prim.void###0l];
+                                           ((len VV##1465) >= 0)]}
+bind 254 lq_tmp$x##170 : {VV : a_azo | []}
+bind 255 VV##1468 : {VV##1468 : GHC.Prim.Void# | [(VV##1468 = GHC.Prim.void###0l)]}
+bind 256 VV##1470 : {VV##1470 : [a_azo] | [((len VV##1470) = (1 + (len lq_anf$##dMR)));
+                                           ((null VV##1470) <=> false);
+                                           ((tail VV##1470) = lq_anf$##dMR);
+                                           ((head VV##1470) = y##ayT);
+                                           ((len VV##1470) >= 0)]}
+bind 257 lq_tmp$x##316 : {VV : a_azo | []}
+bind 258 VV##1473 : {VV##1473 : [a_azo] | [((len VV##1473) = ((len lq_anf$##dMQ) + (len ys##ayU)));
+                                           ((len VV##1473) >= 0);
+                                           (VV##1473 = lq_anf$##dMR);
+                                           ((len VV##1473) >= 0)]}
+bind 259 lq_tmp$x##384 : {VV : a_azo | []}
+bind 260 VV##1476 : {VV##1476 : [a_azo] | [((len VV##1476) >= 0);
+                                           (VV##1476 = ys##ayU);
+                                           ((len VV##1476) >= 0)]}
+bind 261 lq_tmp$x##116 : {VV : a_azo | []}
+bind 262 VV##1479 : {VV##1479 : [a_azo] | [((len VV##1479) = (1 + (len xs##ayS)));
+                                           ((null VV##1479) <=> false);
+                                           ((tail VV##1479) = xs##ayS);
+                                           ((head VV##1479) = x##ayR);
+                                           ((len VV##1479) >= 0);
+                                           (VV##1479 = lq_anf$##dMQ);
+                                           ((len VV##1479) >= 0)]}
+bind 263 lq_tmp$x##115 : {VV : a_azo | []}
+bind 264 VV##1482 : {VV##1482 : [a_azo] | [((len VV##1482) >= 0);
+                                           (VV##1482 = xs##ayS);
+                                           ((len VV##1482) >= 0)]}
+bind 265 lq_tmp$x##332 : {VV : a_azo | []}
+bind 266 VV##1485 : {VV##1485 : [a_azo] | [$k_##244[ds_dMn:=GHC.Prim.void###0l][VV##243:=VV##1485];
+                                           ((len VV##1485) >= 0)]}
+bind 267 lq_tmp$x##170 : {VV : a_azo | []}
+bind 268 VV##1488 : {VV##1488 : GHC.Prim.Void# | [(VV##1488 = GHC.Prim.void###0l)]}
+bind 269 VV##1490 : {VV##1490 : [a_azo] | [$k_##259[VV##258:=VV##1490][lq_tmp$x##262:=VV##1490][lq_tmp$x##250:=lq_anf$##dMN];
+                                           ((len VV##1490) >= 0)]}
+bind 270 lq_tmp$x##239 : {VV : a_azo | []}
+bind 271 VV##1493 : {VV##1493 : int | [(VV##1493 ~~ lit$36$$47$Users$47$rjhala$47$research$47$stack$47$liquidhaskell$47$tests$47$pos$47$MergeSort.hs$58$$40$48$44$1$41$$45$$40$52$44$41$41$$124$function$32$merge);
+                                       ((strLen VV##1493) = 95);
+                                       (VV##1493 = lq_anf$##dMN)]}
+bind 272 VV##1495 : {VV##1495 : [a_azo] | [((len VV##1495) >= 0);
+                                           (VV##1495 = ds_dMl);
+                                           ((len VV##1495) >= 0)]}
+bind 273 lq_tmp$x##170 : {VV : a_azo | []}
+bind 274 VV##1498 : {VV##1498 : [a_azo] | [((len VV##1498) >= 0);
+                                           (VV##1498 = xs##ayP);
+                                           ((len VV##1498) >= 0)]}
+bind 275 lq_tmp$x##117 : {VV : a_azo | []}
+bind 276 VV##1071 : {VV##1071 : GHC.Prim.Void# | [$k_##1072]}
+bind 277 VV##1159 : {VV##1159 : [a_azJ] | [$k_##1160;
+                                           ((len VV##1159) >= 0)]}
+bind 278 lq_tmp$x##1155 : {VV : a_azJ | []}
+bind 279 VV##1117 : {VV##1117 : [a_azJ] | [$k_##1118;
+                                           ((len VV##1117) >= 0)]}
+bind 280 lq_tmp$x##1113 : {VV : a_azJ | []}
+bind 281 VV##1082 : {VV##1082 : [a_azJ] | [$k_##1083;
+                                           ((len VV##1082) >= 0)]}
+bind 282 lq_tmp$x##1078 : {VV : a_azJ | []}
+bind 283 VV##913 : {VV##913 : [a_azx] | [$k_##914;
+                                         ((len VV##913) >= 0)]}
+bind 284 lq_tmp$x##909 : {VV : a_azx | []}
+bind 285 VV##901 : {VV##901 : [a_azx] | [$k_##902;
+                                         ((len VV##901) >= 0)]}
+bind 286 lq_tmp$x##897 : {VV : a_azx | []}
+bind 287 VV##889 : {VV##889 : [a_azx] | [$k_##890;
+                                         ((len VV##889) >= 0)]}
+bind 288 lq_tmp$x##885 : {VV : a_azx | []}
+bind 289 VV##794 : {VV##794 : [a_azx] | [$k_##795;
+                                         ((len VV##794) >= 0)]}
+bind 290 lq_tmp$x##790 : {VV : a_azx | []}
+bind 291 VV##752 : {VV##752 : [a_azx] | [$k_##753;
+                                         ((len VV##752) >= 0)]}
+bind 292 lq_tmp$x##748 : {VV : a_azx | []}
+bind 293 VV##685 : {VV##685 : [a_azx] | [$k_##686;
+                                         ((len VV##685) >= 0)]}
+bind 294 lq_tmp$x##681 : {VV : a_azx | []}
+bind 295 VV##673 : {VV##673 : [a_azx] | [$k_##674;
+                                         ((len VV##673) >= 0)]}
+bind 296 lq_tmp$x##669 : {VV : a_azx | []}
+bind 297 VV##661 : {VV##661 : [a_azx] | [$k_##662;
+                                         ((len VV##661) >= 0)]}
+bind 298 lq_tmp$x##657 : {VV : a_azx | []}
+bind 299 VV##586 : {VV##586 : [a_azx] | [$k_##587;
+                                         ((len VV##586) >= 0)]}
+bind 300 lq_tmp$x##582 : {VV : a_azx | []}
+bind 301 VV##574 : {VV##574 : [a_azx] | [$k_##575;
+                                         ((len VV##574) >= 0)]}
+bind 302 lq_tmp$x##570 : {VV : a_azx | []}
+bind 303 VV##562 : {VV##562 : [a_azx] | [$k_##563;
+                                         ((len VV##562) >= 0)]}
+bind 304 lq_tmp$x##558 : {VV : a_azx | []}
+bind 305 VV##163 : {VV##163 : GHC.Prim.Void# | [$k_##164]}
+bind 306 VV##309 : {VV##309 : GHC.Prim.Void# | [$k_##310]}
+bind 307 VV##320 : {VV##320 : [a_azo] | [$k_##321;
+                                         ((len VV##320) >= 0)]}
+bind 308 lq_tmp$x##316 : {VV : a_azo | []}
+bind 309 VV##232 : {VV##232 : GHC.Prim.Void# | [$k_##233]}
+bind 310 VV##258 : {VV##258 : [a_azo] | [$k_##259;
+                                         ((len VV##258) >= 0)]}
+bind 311 lq_tmp$x##254 : {VV : a_azo | []}
+bind 312 VV##243 : {VV##243 : [a_azo] | [$k_##244;
+                                         ((len VV##243) >= 0)]}
+bind 313 lq_tmp$x##239 : {VV : a_azo | []}
+bind 314 VV##174 : {VV##174 : [a_azo] | [$k_##175;
+                                         ((len VV##174) >= 0)]}
+bind 315 lq_tmp$x##170 : {VV : a_azo | []}
+
+
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       80;
+       82;
+       83;
+       84]
+  lhs {VV##50 : [a_azx] | [(((len VV##50) > 1) => ((len VV##50) < (len zs##ayE)));
+                           ((len VV##50) >= 0);
+                           (VV##50 = ys##aA5);
+                           ((len VV##50) >= 0)]}
+  rhs {VV##50 : [a_azx] | [$k_##795[VV##794:=VV##50][VV##1370:=VV##50][VV##F:=VV##50][VV##F##50:=VV##50]]}
+  id 50 tag [2]
+  // META constraint id 50 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       77;
+       78;
+       79]
+  lhs {VV##53 : [a_azx] | [(((len VV##53) > 1) => ((len VV##53) < (len zs##ayE)));
+                           ((len VV##53) >= 0);
+                           (VV##53 = xs##aA4);
+                           ((len VV##53) >= 0)]}
+  rhs {VV##53 : [a_azx] | [$k_##753[VV##752:=VV##53][VV##1373:=VV##53][VV##F##53:=VV##53][VV##F:=VV##53]]}
+  id 53 tag [2]
+  // META constraint id 53 : ()
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89]
+  lhs {VV##30 : (Tuple  [a_azx]  [a_azx]) | [((snd VV##30) = lq_anf$##dN1);
+                                             ((fst VV##30) = lq_anf$##dN0);
+                                             ((x_Tuple22 VV##30) = lq_anf$##dN1);
+                                             ((x_Tuple21 VV##30) = lq_anf$##dN0)]}
+  rhs {VV##30 : (Tuple  [a_azx]  [a_azx]) | [(((len (fst VV##30)) + (len (snd VV##30))) = (len ds_dMs))]}
+  id 30 tag [2]
+  // META constraint id 30 : ()
+
+
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       67;
+       69;
+       70]
+  reft {VV##685 : [a_azx] | [$k_##686]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       49]
+  reft {VV##414 : a_azo | [$k_##415]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59; 302]
+  reft {VV##571 : a_azx | [$k_##572]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       67;
+       69;
+       296]
+  reft {VV##670 : a_azx | [$k_##671]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       86]
+  reft {VV##843 : a_azx | [$k_##844]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 19; 20; 21]
+  reft {VV##163 : GHC.Prim.Void# | [$k_##164]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89;
+       287]
+  reft {VV##882 : a_azx | [$k_##883]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80]
+  reft {VV##794 : [a_azx] | [$k_##795]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59; 304]
+  reft {VV##559 : a_azx | [$k_##560]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59; 303]
+  reft {VV##555 : a_azx | [$k_##556]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112;
+       117;
+       122;
+       123]
+  reft {VV##1226 : a_azJ | [$k_##1227]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89;
+       90;
+       283]
+  reft {VV##906 : a_azx | [$k_##907]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42;
+       43;
+       307]
+  reft {VV##313 : a_azo | [$k_##314]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       67;
+       69;
+       297]
+  reft {VV##654 : a_azx | [$k_##655]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       32;
+       33;
+       312]
+  reft {VV##236 : a_azo | [$k_##237]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112;
+       117]
+  reft {VV##1159 : [a_azJ] | [$k_##1160]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112]
+  reft {VV##1117 : [a_azJ] | [$k_##1118]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89]
+  reft {VV##889 : [a_azx] | [$k_##890]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75]
+  reft {VV##752 : [a_azx] | [$k_##753]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       88]
+  reft {VV##866 : a_azx | [$k_##867]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       32;
+       33;
+       34;
+       311]
+  reft {VV##255 : a_azo | [$k_##256]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59; 60; 300]
+  reft {VV##583 : a_azx | [$k_##584]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89;
+       90]
+  reft {VV##913 : [a_azx] | [$k_##914]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110]
+  reft {VV##1071 : GHC.Prim.Void# | [$k_##1072]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 62; 63; 64; 67]
+  reft {VV##638 : a_azx | [$k_##639]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112;
+       280]
+  reft {VV##1114 : a_azJ | [$k_##1115]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       290]
+  reft {VV##791 : a_azx | [$k_##792]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59]
+  reft {VV##574 : [a_azx] | [$k_##575]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       314]
+  reft {VV##167 : a_azo | [$k_##168]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87]
+  reft {VV##863 : a_azx | [$k_##864]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59; 60]
+  reft {VV##586 : [a_azx] | [$k_##587]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42]
+  reft {VV##309 : GHC.Prim.Void# | [$k_##310]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       32]
+  reft {VV##232 : GHC.Prim.Void# | [$k_##233]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       292]
+  reft {VV##749 : a_azx | [$k_##750]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       291]
+  reft {VV##745 : a_azx | [$k_##746]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       49;
+       51]
+  reft {VV##444 : a_azo | [$k_##445]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       103;
+       105]
+  reft {VV##1036 : a_azJ | [$k_##1037]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       49;
+       51;
+       52]
+  reft {VV##466 : a_azo | [$k_##467]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74]
+  reft {VV##738 : a_azx | [$k_##739]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112;
+       117;
+       122;
+       123;
+       124]
+  reft {VV##1252 : a_azJ | [$k_##1253]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       49;
+       50]
+  reft {VV##417 : a_azo | [$k_##418]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59]
+  reft {VV##562 : [a_azx] | [$k_##563]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 62; 63; 64; 67; 68]
+  reft {VV##641 : a_azx | [$k_##642]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112;
+       279]
+  reft {VV##1110 : a_azJ | [$k_##1111]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42;
+       43]
+  reft {VV##320 : [a_azo] | [$k_##321]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89;
+       286]
+  reft {VV##898 : a_azx | [$k_##899]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42;
+       43;
+       44]
+  reft {VV##337 : a_azo | [$k_##338]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       67;
+       69;
+       70;
+       293]
+  reft {VV##678 : a_azx | [$k_##679]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42;
+       43;
+       45]
+  reft {VV##364 : a_azo | [$k_##365]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       281]
+  reft {VV##1075 : a_azJ | [$k_##1076]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       103;
+       104]
+  reft {VV##1019 : a_azJ | [$k_##1020]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       49;
+       51;
+       52;
+       53]
+  reft {VV##469 : a_azo | [$k_##470]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59; 301]
+  reft {VV##567 : a_azx | [$k_##568]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89]
+  reft {VV##901 : [a_azx] | [$k_##902]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38]
+  reft {VV##297 : a_azo | [$k_##298]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22]
+  reft {VV##174 : [a_azo] | [$k_##175]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       32;
+       33;
+       34]
+  reft {VV##258 : [a_azo] | [$k_##259]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112;
+       117;
+       277]
+  reft {VV##1152 : a_azJ | [$k_##1153]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89;
+       90;
+       284]
+  reft {VV##910 : a_azx | [$k_##911]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       282]
+  reft {VV##1079 : a_azJ | [$k_##1080]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57]
+  reft {VV##539 : a_azx | [$k_##540]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111]
+  reft {VV##1103 : a_azJ | [$k_##1104]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       315]
+  reft {VV##171 : a_azo | [$k_##172]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42;
+       43;
+       45;
+       46]
+  reft {VV##386 : a_azo | [$k_##387]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112;
+       117;
+       122]
+  reft {VV##1206 : a_azJ | [$k_##1207]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89;
+       285]
+  reft {VV##894 : a_azx | [$k_##895]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       67;
+       69;
+       295]
+  reft {VV##666 : a_azx | [$k_##667]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       103]
+  reft {VV##1016 : a_azJ | [$k_##1017]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 91; 92; 95; 96]
+  reft {VV##970 : a_azJ | [$k_##971]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85;
+       87;
+       89;
+       288]
+  reft {VV##886 : a_azx | [$k_##887]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 91; 92; 95]
+  reft {VV##967 : a_azJ | [$k_##968]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       289]
+  reft {VV##787 : a_azx | [$k_##788]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       32;
+       33;
+       313]
+  reft {VV##240 : a_azo | [$k_##241]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42;
+       43;
+       308]
+  reft {VV##317 : a_azo | [$k_##318]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       67;
+       69;
+       298]
+  reft {VV##658 : a_azx | [$k_##659]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       32;
+       33]
+  reft {VV##243 : [a_azo] | [$k_##244]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 58]
+  reft {VV##542 : a_azx | [$k_##543]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 62; 63; 64; 67; 69]
+  reft {VV##661 : [a_azx] | [$k_##662]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111;
+       112;
+       117;
+       278]
+  reft {VV##1156 : a_azJ | [$k_##1157]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42;
+       43;
+       45;
+       46;
+       47]
+  reft {VV##389 : a_azo | [$k_##390]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       108;
+       109;
+       110;
+       111]
+  reft {VV##1082 : [a_azJ] | [$k_##1083]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 57; 59; 60; 299]
+  reft {VV##579 : a_azx | [$k_##580]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       92;
+       98;
+       99;
+       100;
+       103;
+       105;
+       106]
+  reft {VV##1039 : a_azJ | [$k_##1040]}
+  // META wf : ()
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 54; 62; 63; 64; 67; 69]
+  reft {VV##673 : [a_azx] | [$k_##674]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       36;
+       37;
+       38;
+       39;
+       42;
+       43]
+  reft {VV##334 : a_azo | [$k_##335]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       72;
+       73;
+       74;
+       75;
+       80;
+       85]
+  reft {VV##840 : a_azx | [$k_##841]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       54;
+       62;
+       63;
+       64;
+       67;
+       69;
+       70;
+       294]
+  reft {VV##682 : a_azx | [$k_##683]}
+  // META wf : ()
+
+
+wf:
+  env [0;
+       1;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       19;
+       20;
+       21;
+       22;
+       27;
+       28;
+       29;
+       32;
+       33;
+       34;
+       310]
+  reft {VV##251 : a_azo | [$k_##252]}
+  // META wf : ()
+
+
+
+
+
+
+
diff --git a/tests/pos/adt_func_0.fq b/tests/pos/adt_func_0.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/adt_func_0.fq
@@ -0,0 +1,14 @@
+data Boo 0 = [
+  | bling { booFirst : func(0, [int; int]) }
+]
+
+constant booFirst : func(0, [Boo; int; int])
+
+bind 1 x  : {v : Boo | true}
+bind 2 y  : {v : Boo | v = x}
+
+constraint:
+  env [1;2]
+  lhs {v : int | booFirst x 0 = 10 }
+  rhs {v : int | booFirst y 0 = 10 }
+  id 1 tag []
diff --git a/tests/pos/adt_func_1.fq b/tests/pos/adt_func_1.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/adt_func_1.fq
@@ -0,0 +1,14 @@
+data Boo 0 = [
+  | bling { booFirst : func(0, [int; int]) }
+]
+
+constant booFirst : func(0, [Boo; int; int])
+
+bind 1 x  : {v : Boo | true}
+bind 2 y  : {v : Boo | v = x}
+
+constraint:
+  env [1;2]
+  lhs {v : int | booFirst x 0 = 10 }
+  rhs {v : int | booFirst y 0 = 10 }
+  id 1 tag []
diff --git a/tests/pos/adt_list_2.fq b/tests/pos/adt_list_2.fq
--- a/tests/pos/adt_list_2.fq
+++ b/tests/pos/adt_list_2.fq
@@ -4,11 +4,10 @@
   | con { lHead : @(0), lTail : LL }
 ]
 
-bind 0 junk : {v:LL bool | true} 
+bind 0 junk : {v:LL bool | true}
 
 constraint:
   env [0]
   lhs {v:int | true }
   rhs {v:int | emp = (if (1 < 2) then emp else (con 1 emp)) }
   id 1 tag []
-
diff --git a/tests/pos/adt_partial.fq b/tests/pos/adt_partial.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/adt_partial.fq
@@ -0,0 +1,13 @@
+data Vec 1 = [
+  | mkCons { head : @(0) }
+]
+
+bind 1 x  : {v : Vec | true}
+bind 2 y  : {v : Vec | true}
+
+constraint:
+  env [1;2]
+  lhs {v : int | x = y }
+  rhs {v : int | y = x }
+  id 1 tag []
+
diff --git a/tests/pos/adt_poly_dead.fq b/tests/pos/adt_poly_dead.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/adt_poly_dead.fq
@@ -0,0 +1,22 @@
+
+// Due to a quirk of Z3, adding an extra "junk" ctor that uses the @(0) ty-var makes this ok, specifically,
+//  | junk  { fjunk    : @(0) }
+
+data Boo 1 = [
+  | bling { booFirst : int  }
+]
+
+data LL 1 = [
+  | emp { }
+  | con { lHead : @(0), lTail : LL }
+]
+
+bind 1 x  : {v: Boo int  | true}
+bind 2 y  : {v: Boo bool | true}
+bind 3 z  : {v: int      | z = 12}
+
+constraint:
+  env [1;2;3]
+  lhs {v : int | v = z + 1 }
+  rhs {v : int | v < 20    }
+  id 1 tag []
diff --git a/tests/pos/baz.fq b/tests/pos/baz.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/baz.fq
@@ -0,0 +1,22 @@
+// Uncommenting the WF renders the constraints "unsafe" but right now its SAFE
+// which is bad. We should fail with "missing WF" or somesuch.
+
+
+bind 0 x : {v: int | $k1 }
+
+constraint:
+  env []
+  lhs {v : int | [v = 6] }
+  rhs {v : int | $k1      }
+  id 0 tag []
+
+constraint:
+  env [0]
+  lhs {v : int | [v = x] }
+  rhs {v : int | v = 0   }
+  id 0 tag []
+
+// wf:
+//  env []
+//  reft {v: int | $k1 }
+
diff --git a/tests/pos/hex.ts.fq b/tests/pos/hex.ts.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/hex.ts.fq
@@ -0,0 +1,342 @@
+qualif Bot(v : a): (0 = 1) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Bot(v : obj): (0 = 1) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Bot(v : Boolean): (0 = 1) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Bot(v : int): (0 = 1) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif CmpZ(v : int): (v < 0) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif CmpZ(v : int): (v <= 0) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif CmpZ(v : int): (v > 0) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif CmpZ(v : int): (v >= 0) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif CmpZ(v : int): (v = 0) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif CmpZ(v : int): (v != 0) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Cmp(v : int, x : int): (v < x) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Cmp(v : int, x : int): (v <= x) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Cmp(v : int, x : int): (v > x) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Cmp(v : int, x : int): (v >= x) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Cmp(v : a, x : a): (v ~~ x) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Cmp(v : a, x : a): (v != x) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif True1(v : Boolean): (? Prop([v])) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif False1(v : Boolean): (~ ((? Prop([v])))) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Tag(v : a, x : Str): (ttag([v]) = x) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+qualif Len(v : b, w : a): (v < len([w])) // "/Users/rjhala/research/stack/liquid/refscript/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/refscript-0.1.0.0/include/prelude.ts" (line 1, column 1)
+
+
+
+
+constant lit$36$Array : (Str)
+constant lit$36$PI : (Str)
+constant lit$36$documentElement : (Str)
+constant extends_class : (func(1, [@(0); Str; bool]))
+constant numeric_min_value : (int)
+constant numeric_positive_infinity : (int)
+constant lit$36$Document : (Str)
+constant lit$36$Console : (Str)
+constant lit$36$LOG10E : (Str)
+constant lit$36$MAX_VALUE : (Str)
+constant lit$36$Error : (Str)
+constant numeric_nan : (int)
+constant lit$36$Math : (Str)
+constant lit$36$LN2 : (Str)
+constant offset : (func(2, [@(0); Str; @(1)]))
+constant hasDirectProperty : (func(1, [Str; @(0); bool]))
+constant lit$36$Object : (Str)
+constant lit$36$StringConstructor : (Str)
+constant lit$36$object : (Str)
+constant lit$36$NEGATIVE_INFINITY : (Str)
+constant lit$36$BUBBLING_PHASE : (Str)
+constant ttag : (func(1, [@(0); Str]))
+constant lit$36$AT_TARGET : (Str)
+constant lit$36$LN10 : (Str)
+constant lit$36$Event : (Str)
+constant numeric_max_value : (int)
+constant lit$36$CAPTURING_PHASE : (Str)
+constant lit$36$NaN : (Str)
+constant lit$36$undefined : (Str)
+constant lit$36$Function : (Str)
+constant len : (func(2, [(Array  @(0)  @(1)); int]))
+constant extends_interface : (func(1, [@(0); Str; bool]))
+constant numeric_negative_infinity : (int)
+constant lit$36$SQRT1_2 : (Str)
+constant Prop : (func(1, [@(0); bool]))
+constant hasProperty : (func(1, [Str; @(0); bool]))
+constant lit$36$String : (Str)
+constant lit$36$E : (Str)
+constant lit$36$POSITIVE_INFINITY : (Str)
+constant lit$36$MIN_VALUE : (Str)
+constant lit$36$prototype : (Str)
+constant lit$36$SQRT2 : (Str)
+constant lit$36$LOG2E : (Str)
+constant lit$36$Number : (Str)
+constant lit$36$HTMLElement : (Str)
+constant lit$36$number : (Str)
+constant enumProp : (func(1, [Str; @(0); bool]))
+constant lit$36$boolean : (Str)
+constant lit$36$Window : (Str)
+
+
+bind 0 undefined : {v : Undefined | [(ttag([v]) = lit$36$undefined);
+                                     (~ ((? Prop([v]))))]}
+bind 1 Object : {VV$35$285 : Object | [(? Prop([VV$35$285]));
+                                       (ttag([VV$35$285]) = lit$36$object)]}
+bind 2 Object.prototype : {VV : (Object  Immutable) | [(? extends_interface([VV;
+                                                                             lit$36$Object]));
+                                                       (? Prop([VV]));
+                                                       (ttag([VV]) = lit$36$object);
+                                                       (VV ~~ offset([Object; lit$36$prototype]))]}
+bind 3 NaN : {v : int | [(ttag([v]) = lit$36$number);
+                         ((? Prop([v])) <=> (v != 0));
+                         (v = numeric_nan)]}
+bind 4 Number : {VV$35$325 : Object | [(? Prop([VV$35$325]));
+                                       (ttag([VV$35$325]) = lit$36$object)]}
+bind 5 Number.POSITIVE_INFINITY : {v : int | [(ttag([v]) = lit$36$number);
+                                              ((? Prop([v])) <=> (v != 0));
+                                              (v ~~ offset([Number; lit$36$POSITIVE_INFINITY]))]}
+bind 6 Number.MIN_VALUE : {v : int | [(ttag([v]) = lit$36$number);
+                                      ((? Prop([v])) <=> (v != 0));
+                                      (v ~~ offset([Number; lit$36$MIN_VALUE]))]}
+bind 7 Number.prototype : {VV : (Number  Immutable) | [(? extends_interface([VV;
+                                                                             lit$36$Number]));
+                                                       (? Prop([VV]));
+                                                       (ttag([VV]) = lit$36$object);
+                                                       (VV ~~ offset([Number; lit$36$prototype]))]}
+bind 8 Number.NaN : {v : int | [(ttag([v]) = lit$36$number);
+                                ((? Prop([v])) <=> (v != 0));
+                                (v ~~ offset([Number; lit$36$NaN]))]}
+bind 9 Number.NEGATIVE_INFINITY : {v : int | [(ttag([v]) = lit$36$number);
+                                              ((? Prop([v])) <=> (v != 0));
+                                              (v ~~ offset([Number; lit$36$NEGATIVE_INFINITY]))]}
+bind 10 Number.MAX_VALUE : {v : int | [(ttag([v]) = lit$36$number);
+                                       ((? Prop([v])) <=> (v != 0));
+                                       (v ~~ offset([Number; lit$36$MAX_VALUE]))]}
+bind 11 Math : {VV$35$387 : (Math  Immutable) | [(? extends_interface([VV$35$387;
+                                                                       lit$36$Math]));
+                                                 (? Prop([VV$35$387]));
+                                                 (ttag([VV$35$387]) = lit$36$object)]}
+bind 12 Math.SQRT2 : {v : int | [(ttag([v]) = lit$36$number);
+                                 ((? Prop([v])) <=> (v != 0));
+                                 (v ~~ offset([Math; lit$36$SQRT2]))]}
+bind 13 Math.LN2 : {v : int | [(ttag([v]) = lit$36$number);
+                               ((? Prop([v])) <=> (v != 0));
+                               (v ~~ offset([Math; lit$36$LN2]))]}
+bind 14 Math.PI : {v : int | [(ttag([v]) = lit$36$number);
+                              ((? Prop([v])) <=> (v != 0));
+                              (v ~~ offset([Math; lit$36$PI]))]}
+bind 15 Math.LOG10E : {v : int | [(ttag([v]) = lit$36$number);
+                                  ((? Prop([v])) <=> (v != 0));
+                                  (v ~~ offset([Math; lit$36$LOG10E]))]}
+bind 16 Math.LOG2E : {v : int | [(ttag([v]) = lit$36$number);
+                                 ((? Prop([v])) <=> (v != 0));
+                                 (v ~~ offset([Math; lit$36$LOG2E]))]}
+bind 17 Math.E : {v : int | [(ttag([v]) = lit$36$number);
+                             ((? Prop([v])) <=> (v != 0));
+                             (v ~~ offset([Math; lit$36$E]))]}
+bind 18 Math.SQRT1_2 : {v : int | [(ttag([v]) = lit$36$number);
+                                   ((? Prop([v])) <=> (v != 0));
+                                   (v ~~ offset([Math; lit$36$SQRT1_2]))]}
+bind 19 Math.LN10 : {v : int | [(ttag([v]) = lit$36$number);
+                                ((? Prop([v])) <=> (v != 0));
+                                (v ~~ offset([Math; lit$36$LN10]))]}
+bind 20 String : {VV$35$469 : (StringConstructor  Immutable) | [(? extends_interface([VV$35$469;
+                                                                                      lit$36$StringConstructor]));
+                                                                (? Prop([VV$35$469]));
+                                                                (ttag([VV$35$469]) = lit$36$object)]}
+bind 21 String.prototype : {VV : (String  Immutable) | [(? extends_interface([VV;
+                                                                              lit$36$String]));
+                                                        (? Prop([VV]));
+                                                        (ttag([VV]) = lit$36$object);
+                                                        (VV ~~ offset([String; lit$36$prototype]))]}
+bind 22 Array : {VV$35$727 : Object | [(? Prop([VV$35$727]));
+                                       (ttag([VV$35$727]) = lit$36$object)]}
+bind 23 Array.prototype : {VV : (Array  Mutable  Top) | [(? extends_interface([VV;
+                                                                               lit$36$Array]));
+                                                         (? Prop([VV]));
+                                                         (ttag([VV]) = lit$36$object);
+                                                         (VV ~~ offset([Array; lit$36$prototype]))]}
+bind 24 Function : {VV$35$762 : Object | [(? Prop([VV$35$762]));
+                                          (ttag([VV$35$762]) = lit$36$object)]}
+bind 25 Function.prototype : {VV : (Function  Immutable) | [(? extends_interface([VV;
+                                                                                  lit$36$Function]));
+                                                            (? Prop([VV]));
+                                                            (ttag([VV]) = lit$36$object);
+                                                            (VV ~~ offset([Function;
+                                                                           lit$36$prototype]))]}
+bind 26 Console : {VV$35$891 : Object | [(? Prop([VV$35$891]));
+                                         (ttag([VV$35$891]) = lit$36$object)]}
+bind 27 Console.prototype : {VV : (Console  Immutable) | [(? extends_interface([VV;
+                                                                                lit$36$Console]));
+                                                          (? Prop([VV]));
+                                                          (ttag([VV]) = lit$36$object);
+                                                          (VV ~~ offset([Console;
+                                                                         lit$36$prototype]))]}
+bind 28 console : {VV$35$893 : (Console  Immutable) | [(? extends_interface([VV$35$893;
+                                                                             lit$36$Console]));
+                                                       (? Prop([VV$35$893]));
+                                                       (ttag([VV$35$893]) = lit$36$object)]}
+bind 29 Error : {VV$35$983 : Object | [(? Prop([VV$35$983]));
+                                       (ttag([VV$35$983]) = lit$36$object)]}
+bind 30 Error.prototype : {VV : (Error  Immutable) | [(? extends_interface([VV;
+                                                                            lit$36$Error]));
+                                                      (? Prop([VV]));
+                                                      (ttag([VV]) = lit$36$object);
+                                                      (VV ~~ offset([Error; lit$36$prototype]))]}
+bind 31 Event : {VV$35$1025 : Object | [(? Prop([VV$35$1025]));
+                                        (ttag([VV$35$1025]) = lit$36$object)]}
+bind 32 Event.CAPTURING_PHASE : {v : int | [(ttag([v]) = lit$36$number);
+                                            ((? Prop([v])) <=> (v != 0));
+                                            (v ~~ offset([Event; lit$36$CAPTURING_PHASE]))]}
+bind 33 Event.AT_TARGET : {v : int | [(ttag([v]) = lit$36$number);
+                                      ((? Prop([v])) <=> (v != 0));
+                                      (v ~~ offset([Event; lit$36$AT_TARGET]))]}
+bind 34 Event.prototype : {VV : (Event  Immutable) | [(? extends_interface([VV;
+                                                                            lit$36$Event]));
+                                                      (? Prop([VV]));
+                                                      (ttag([VV]) = lit$36$object);
+                                                      (VV ~~ offset([Event; lit$36$prototype]))]}
+bind 35 Event.BUBBLING_PHASE : {v : int | [(ttag([v]) = lit$36$number);
+                                           ((? Prop([v])) <=> (v != 0));
+                                           (v ~~ offset([Event; lit$36$BUBBLING_PHASE]))]}
+bind 36 document : {VV$35$1027 : (Document  Immutable) | [(? extends_interface([VV$35$1027;
+                                                                                lit$36$Document]));
+                                                          (? Prop([VV$35$1027]));
+                                                          (ttag([VV$35$1027]) = lit$36$object)]}
+bind 37 document.documentElement : {VV : (HTMLElement  Immutable) | [(? extends_interface([VV;
+                                                                                           lit$36$HTMLElement]));
+                                                                     (? Prop([VV]));
+                                                                     (ttag([VV]) = lit$36$object);
+                                                                     (VV ~~ offset([document;
+                                                                                    lit$36$documentElement]))]}
+bind 38 window : {VV$35$1031 : (Window  Immutable) | [(? extends_interface([VV$35$1031;
+                                                                            lit$36$Window]));
+                                                      (? Prop([VV$35$1031]));
+                                                      (ttag([VV$35$1031]) = lit$36$object)]}
+bind 39 lq_tmp_nano_1 : {VV : (BitVec  Size32) | [(VV = (lit "#x00000008" (BitVec  Size32)))]}
+bind 40 a_SSA_0 : {VV : (BitVec  Size32) | [(VV ~~ lq_tmp_nano_1);
+                                            (VV = (lit "#x00000008" (BitVec  Size32)))]}
+bind 41 lq_tmp_nano_2 : {VV : (BitVec  Size32) | [(VV = (lit "#x00000008" (BitVec  Size32)))]}
+bind 42 b_SSA_1 : {VV : (BitVec  Size32) | [(VV ~~ lq_tmp_nano_2);
+                                            (VV = (lit "#x00000008" (BitVec  Size32)))]}
+bind 43 lq_tmp_nano_3 : {v : (BitVec  Size32) | [(v = bvor([a_SSA_0;
+                                                            a_SSA_0]))]}
+bind 44 lq_tmp_nano_6 : {v : Boolean | [(ttag([v]) = lit$36$boolean);
+                                        ((? Prop([v])) <=> (b_SSA_1 ~~ lq_tmp_nano_3))]}
+bind 45 lq_tmp_nano_9 : {VV$35$4 : Void | []}
+
+
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       39;
+       8;
+       24;
+       40;
+       9;
+       25;
+       41;
+       10;
+       26;
+       42;
+       11;
+       27;
+       43;
+       12;
+       28;
+       44;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV$35$F1 : Boolean | [(ttag([VV$35$F1]) = lit$36$boolean);
+                             (VV$35$F1 ~~ lq_tmp_nano_6);
+                             (ttag([VV$35$F1]) = lit$36$boolean);
+                             ((? Prop([VV$35$F1])) <=> (b_SSA_1 ~~ lq_tmp_nano_3))]}
+  rhs {VV$35$F1 : Boolean | [(? Prop([VV$35$F1]))]}
+  id 1 tag [1]
+  // META constraint id 1 : /Users/rjhala/research/stack/liquid/refscript/tests/pos/simple/hex.ts:7:1-7:22
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       39;
+       8;
+       24;
+       40;
+       9;
+       25;
+       41;
+       10;
+       26;
+       42;
+       11;
+       27;
+       43;
+       12;
+       28;
+       44;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV$35$F2 : Boolean | [(ttag([VV$35$F2]) = lit$36$boolean);
+                             (VV$35$F2 ~~ lq_tmp_nano_6);
+                             (ttag([VV$35$F2]) = lit$36$boolean);
+                             ((? Prop([VV$35$F2])) <=> (b_SSA_1 ~~ lq_tmp_nano_3))]}
+  rhs {VV$35$F2 : Boolean | [(? Prop([VV$35$F2]))]}
+  id 2 tag [1]
+  // META constraint id 2 : /Users/rjhala/research/stack/liquid/refscript/tests/pos/simple/hex.ts:7:1-7:22
+
+
+
+
+
+
+
+
+
diff --git a/tests/pos/listqual.hs.fq b/tests/pos/listqual.hs.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/listqual.hs.fq
@@ -0,0 +1,577 @@
+qualif Append(v : [@(0)], xs : [@(0)], ys : [@(0)]): (len([v]) = (len([xs]) + len([ys]))) // "tests/pos/listqual.hs" (line 3, column 12)
+qualif Fst(v : @(1), y : @(0)): (v = fst([y])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.spec" (line 29, column 8)
+qualif Snd(v : @(1), y : @(0)): (v = snd([y])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.spec" (line 30, column 8)
+qualif Auto(v : [int]): (len([v]) = 2) // "tests/pos/listqual.hs" (line 10, column 1)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): ((? Prop([v])) <=> (len([xs]) > 0)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 13, column 8)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): ((? Prop([v])) <=> (len([xs]) = 0)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 14, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) = 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 16, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) >= 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 17, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) > 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 18, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) = len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 20, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) >= len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 21, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) > len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 22, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) <= len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 23, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) < len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 24, column 8)
+qualif EqLen(v : int, xs : [@(0)]): (v = len([xs])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 26, column 8)
+qualif LenEq(v : [@(0)], x : int): (x = len([v])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 27, column 8)
+qualif LenDiff(v : [@(0)], x : int): (len([v]) = (x + 1)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 28, column 8)
+qualif LenDiff(v : [@(0)], x : int): (len([v]) = (x - 1)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 29, column 8)
+qualif LenAcc(v : int, xs : [@(0)], n : int): (v = (len([xs]) + n)) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/GHC/Base.hquals" (line 30, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 3, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 4, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 5, column 8)
+qualif Bot(v : bool): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 6, column 8)
+qualif Bot(v : int): (0 = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 7, column 8)
+qualif CmpZ(v : @(0)): (v < 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 9, column 8)
+qualif CmpZ(v : @(0)): (v <= 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 10, column 8)
+qualif CmpZ(v : @(0)): (v > 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 11, column 8)
+qualif CmpZ(v : @(0)): (v >= 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 12, column 8)
+qualif CmpZ(v : @(0)): (v = 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 13, column 8)
+qualif CmpZ(v : @(0)): (v != 0) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 14, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v < x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 16, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v <= x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 17, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v > x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 18, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v >= x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 19, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v = x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 20, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v != x) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 21, column 8)
+qualif One(v : int): (v = 1) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 28, column 8)
+qualif True(v : bool): (? v) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 29, column 8)
+qualif False(v : bool): (~ ((? v))) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 30, column 8)
+qualif True1(v : GHC.Types.Bool): (? Prop([v])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 31, column 8)
+qualif False1(v : GHC.Types.Bool): (~ ((? Prop([v])))) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 32, column 8)
+qualif Papp(v : @(0), p : (Pred  @(0))): (? papp1([p;
+                                                   v])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 35, column 8)
+qualif Papp2(v : @(1), x : @(0), p : (Pred  @(1)  @(0))): (? papp2([p;
+                                                                    v;
+                                                                    x])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 38, column 8)
+qualif Papp3(v : @(2), x : @(0), y : @(1), p : (Pred  @(2)  @(0)  @(1))): (? papp3([p;
+                                                                                    v;
+                                                                                    x;
+                                                                                    y])) // "/Users/rjhala/research/stack/liquid/liquidhaskell/.stack-work/install/x86_64-osx/nightly-2015-09-24/7.10.2/share/x86_64-osx-ghc-7.10.2/liquidhaskell-0.5.0.2/include/Prelude.hquals" (line 41, column 8)
+
+
+cut $k__185
+cut $k__172
+cut $k__178
+cut $k__175
+cut $k__182
+cut $k__162
+cut $k__168
+cut $k__158
+cut $k__165
+
+
+constant runFun : (func(2, [(Arrow  @(0)  @(1)); @(0); @(1)]))
+constant addrLen : (func(0, [int; int]))
+constant xsListSelector : (func(1, [[@(0)]; [@(0)]]))
+constant x_Tuple21 : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant x_Tuple65 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(4)]))
+constant x_Tuple55 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(4)]))
+constant x_Tuple33 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(2)]))
+constant x_Tuple77 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(6)]))
+constant papp3 : (func(6, [(Pred  @(0)  @(1)  @(2));
+                           @(3);
+                           @(4);
+                           @(5);
+                           bool]))
+constant x_Tuple63 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(2)]))
+constant x_Tuple41 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(0)]))
+constant papp4 : (func(8, [(Pred  @(0)  @(1)  @(2)  @(6));
+                           @(3);
+                           @(4);
+                           @(5);
+                           @(7);
+                           bool]))
+constant x_Tuple64 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(3)]))
+constant autolen : (func(1, [@(0); int]))
+constant x_Tuple52 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(1)]))
+constant null : (func(1, [[@(0)]; bool]))
+constant papp2 : (func(4, [(Pred  @(0)  @(1)); @(2); @(3); bool]))
+constant x_Tuple62 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(1)]))
+constant fromJust : (func(1, [(GHC.Base.Maybe  @(0)); @(0)]))
+constant GHC.Types.$91$$93$$35$6m : (func(1, [[@(0)]]))
+constant x_Tuple53 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(2)]))
+constant x_Tuple71 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(0)]))
+constant GHC.Types.$58$$35$64 : (func(1, [@(0); [@(0)]; [@(0)]]))
+constant x_Tuple74 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(3)]))
+constant len : (func(2, [(@(0)  @(1)); int]))
+constant x_Tuple22 : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant x_Tuple66 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(5)]))
+constant x_Tuple44 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(3)]))
+constant xListSelector : (func(1, [[@(0)]; @(0)]))
+constant strLen : (func(0, [int; int]))
+constant x_Tuple72 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(1)]))
+constant isJust : (func(1, [(GHC.Base.Maybe  @(0)); bool]))
+constant Prop : (func(0, [GHC.Types.Bool; bool]))
+constant x_Tuple31 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(0)]))
+constant x_Tuple75 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(4)]))
+constant papp1 : (func(1, [(Pred  @(0)); @(0); bool]))
+constant x_Tuple61 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(0)]))
+constant x_Tuple43 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(2)]))
+constant x_Tuple51 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(0)]))
+constant GHC.Types.I$35$$35$6c : (func(0, [int; int]))
+constant x_Tuple73 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(2)]))
+constant x_Tuple54 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(3)]))
+constant x_Tuple32 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(1)]))
+constant cmp : (func(0, [GHC.Types.Ordering; GHC.Types.Ordering]))
+constant x_Tuple76 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(5)]))
+constant fst : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant snd : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant x_Tuple42 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(1)]))
+
+
+bind 0 GHC.Types.$91$$93$$35$6m : {VV : func(1, [[@(0)]]) | []}
+bind 1 GHC.Types.EQ$35$6U : {VV$35$125 : GHC.Types.Ordering | [(VV$35$125 = GHC.Types.EQ$35$6U)]}
+bind 2 GHC.Types.LT$35$6S : {VV$35$126 : GHC.Types.Ordering | [(VV$35$126 = GHC.Types.LT$35$6S)]}
+bind 3 GHC.Types.GT$35$6W : {VV$35$127 : GHC.Types.Ordering | [(VV$35$127 = GHC.Types.GT$35$6W)]}
+bind 4 GHC.Types.$91$$93$$35$6m : {VV : func(1, [[@(0)]]) | []}
+bind 5 GHC.Types.GT$35$6W : {VV$35$150 : GHC.Types.Ordering | [(cmp([VV$35$150]) = GHC.Types.GT$35$6W)]}
+bind 6 GHC.Types.LT$35$6S : {VV$35$151 : GHC.Types.Ordering | [(cmp([VV$35$151]) = GHC.Types.LT$35$6S)]}
+bind 7 GHC.Types.EQ$35$6U : {VV$35$152 : GHC.Types.Ordering | [(cmp([VV$35$152]) = GHC.Types.EQ$35$6U)]}
+bind 8 GHC.Base.Nothing$35$r1d : {VV : func(1, [(GHC.Base.Maybe  @(0))]) | []}
+bind 9 ds_dwT : {VV$35$164 : [a_awA] | [$k__165;
+                                        (len([VV$35$164]) >= 0)]}
+bind 10 ys$35$awn : {VV$35$174 : [a_awA] | [$k__175[lq_tmp_x_187:=ds_dwT][lq_tmp_x_189:=ds_dwT][ds_dwT:=ds_dwT];
+                                            (len([VV$35$174]) >= 0)]}
+bind 11 lq_anf__dwU : {lq_tmp_x_195 : [a_awA] | [(lq_tmp_x_195 = ds_dwT);
+                                                 (len([lq_tmp_x_195]) >= 0)]}
+bind 12 lq_anf__dwU : {lq_tmp_x_198 : [a_awA] | [(lq_tmp_x_198 = ds_dwT);
+                                                 (len([lq_tmp_x_198]) >= 0);
+                                                 (len([lq_tmp_x_198]) >= 0)]}
+bind 13 lq_anf__dwU : {lq_tmp_x_198 : [a_awA] | [(lq_tmp_x_198 = ds_dwT);
+                                                 (len([lq_tmp_x_198]) >= 0);
+                                                 (len([lq_tmp_x_198]) = 0);
+                                                 ((? null([lq_tmp_x_198])) <=> true);
+                                                 (lq_tmp_x_198 = GHC.Types.$91$$93$$35$6m([]));
+                                                 (len([lq_tmp_x_198]) = 0);
+                                                 ((? null([lq_tmp_x_198])) <=> true);
+                                                 (len([lq_tmp_x_198]) >= 0)]}
+bind 14 lq_anf__dwU : {lq_tmp_x_208 : [a_awA] | [(lq_tmp_x_208 = ds_dwT);
+                                                 (len([lq_tmp_x_208]) >= 0);
+                                                 (len([lq_tmp_x_208]) >= 0)]}
+bind 15 x$35$awo : {VV : a_awA | [$k__158[VV$35$164:=lq_anf__dwU][lq_tmp_x_208:=lq_anf__dwU][lq_tmp_x_195:=lq_anf__dwU][VV$35$157:=VV]]}
+bind 16 xs$35$awp : {lq_tmp_x_218 : [a_awA] | [(len([lq_tmp_x_218]) >= 0)]}
+bind 17 lq_anf__dwU : {lq_tmp_x_208 : [a_awA] | [(lq_tmp_x_208 = ds_dwT);
+                                                 (len([lq_tmp_x_208]) >= 0);
+                                                 (len([lq_tmp_x_208]) = (1 + len([xs$35$awp])));
+                                                 ((? null([lq_tmp_x_208])) <=> false);
+                                                 (xsListSelector([lq_tmp_x_208]) = xs$35$awp);
+                                                 (xListSelector([lq_tmp_x_208]) = x$35$awo);
+                                                 (lq_tmp_x_208 = GHC.Types.$58$$35$64([x$35$awo;
+                                                                                       xs$35$awp]));
+                                                 (len([lq_tmp_x_208]) = (1 + len([xs$35$awp])));
+                                                 ((? null([lq_tmp_x_208])) <=> false);
+                                                 (xsListSelector([lq_tmp_x_208]) = xs$35$awp);
+                                                 (xListSelector([lq_tmp_x_208]) = x$35$awo);
+                                                 (len([lq_tmp_x_208]) >= 0)]}
+bind 18 lq_anf__dwV : {VV$35$184 : [a_awA] | [$k__185[lq_tmp_x_187:=xs$35$awp][lq_tmp_x_189:=xs$35$awp][ds_dwT:=xs$35$awp][lq_tmp_x_188:=ys$35$awn][ys$35$awn:=ys$35$awn][lq_tmp_x_190:=ys$35$awn];
+                                              (len([VV$35$184]) >= 0)]}
+bind 19 lq_tmp_x_259 : {VV : a_awA | []}
+bind 20 lq_anf__dwW : {lq_tmp_x_264 : int | [(lq_tmp_x_264 = (1  :  int))]}
+bind 21 lq_tmp_x_278 : {VV$35$279 : int | []}
+bind 22 lq_anf__dwX : {lq_tmp_x_270 : [int] | [(len([lq_tmp_x_270]) = 0);
+                                               ((? null([lq_tmp_x_270])) <=> true);
+                                               (len([lq_tmp_x_270]) >= 0)]}
+bind 23 lq_tmp_x_296 : {VV$35$297 : int | []}
+bind 24 lq_anf__dwY : {lq_tmp_x_284 : [int] | [(len([lq_tmp_x_284]) = (1 + len([lq_anf__dwX])));
+                                               ((? null([lq_tmp_x_284])) <=> false);
+                                               (xsListSelector([lq_tmp_x_284]) = lq_anf__dwX);
+                                               (xListSelector([lq_tmp_x_284]) = lq_anf__dwW);
+                                               (len([lq_tmp_x_284]) >= 0)]}
+bind 25 lq_anf__dwZ : {lq_tmp_x_305 : int | [(lq_tmp_x_305 = (2  :  int))]}
+bind 26 lq_tmp_x_319 : {VV$35$320 : int | []}
+bind 27 lq_anf__dx0 : {lq_tmp_x_311 : [int] | [(len([lq_tmp_x_311]) = 0);
+                                               ((? null([lq_tmp_x_311])) <=> true);
+                                               (len([lq_tmp_x_311]) >= 0)]}
+bind 28 lq_tmp_x_337 : {VV$35$338 : int | []}
+bind 29 lq_anf__dx1 : {lq_tmp_x_325 : [int] | [(len([lq_tmp_x_325]) = (1 + len([lq_anf__dx0])));
+                                               ((? null([lq_tmp_x_325])) <=> false);
+                                               (xsListSelector([lq_tmp_x_325]) = lq_anf__dx0);
+                                               (xListSelector([lq_tmp_x_325]) = lq_anf__dwZ);
+                                               (len([lq_tmp_x_325]) >= 0)]}
+bind 30 ListQual.boo$35$rlx : {v : [int] | [(len([v]) = 2);
+                                            (len([v]) >= 0)]}
+bind 31 VV$35$368 : {VV$35$368 : [int] | [$k__185[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_187:=lq_anf__dwY][lq_tmp_x_189:=lq_anf__dwY][lq_tmp_x_353:=lq_anf__dwY][ds_dwT:=lq_anf__dwY][lq_tmp_x_350:=VV$35$368][lq_tmp_x_188:=lq_anf__dx1][ys$35$awn:=lq_anf__dx1][VV$35$184:=VV$35$368][lq_tmp_x_190:=lq_anf__dx1];
+                                          (len([VV$35$368]) >= 0)]}
+bind 32 VV$35$368 : {VV$35$368 : [int] | [$k__185[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_187:=lq_anf__dwY][lq_tmp_x_189:=lq_anf__dwY][lq_tmp_x_353:=lq_anf__dwY][ds_dwT:=lq_anf__dwY][lq_tmp_x_350:=VV$35$368][lq_tmp_x_188:=lq_anf__dx1][ys$35$awn:=lq_anf__dx1][VV$35$184:=VV$35$368][lq_tmp_x_190:=lq_anf__dx1];
+                                          (len([VV$35$368]) >= 0)]}
+bind 33 VV$35$371 : {VV$35$371 : int | [$k__356[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_353:=lq_anf__dwY][VV$35$355:=VV$35$371][lq_tmp_x_350:=VV$35$368][lq_tmp_x_358:=VV$35$371];
+                                        $k__178[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_187:=lq_anf__dwY][lq_tmp_x_189:=lq_anf__dwY][lq_tmp_x_353:=lq_anf__dwY][ds_dwT:=lq_anf__dwY][VV$35$177:=VV$35$371][lq_tmp_x_350:=VV$35$368][lq_tmp_x_188:=lq_anf__dx1][ys$35$awn:=lq_anf__dx1][lq_tmp_x_358:=VV$35$371][VV$35$184:=VV$35$368][lq_tmp_x_190:=lq_anf__dx1]]}
+bind 34 VV$35$371 : {VV$35$371 : int | [$k__356[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_353:=lq_anf__dwY][VV$35$355:=VV$35$371][lq_tmp_x_350:=VV$35$368][lq_tmp_x_358:=VV$35$371];
+                                        $k__178[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_187:=lq_anf__dwY][lq_tmp_x_189:=lq_anf__dwY][lq_tmp_x_353:=lq_anf__dwY][ds_dwT:=lq_anf__dwY][VV$35$177:=VV$35$371][lq_tmp_x_350:=VV$35$368][lq_tmp_x_188:=lq_anf__dx1][ys$35$awn:=lq_anf__dx1][lq_tmp_x_358:=VV$35$371][VV$35$184:=VV$35$368][lq_tmp_x_190:=lq_anf__dx1]]}
+bind 35 fldList : {VV$35$374 : int | []}
+bind 36 VV$35$375 : {VV$35$375 : int | [$k__182[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_187:=lq_anf__dwY][lq_tmp_x_189:=lq_anf__dwY][lq_tmp_x_353:=lq_anf__dwY][ds_dwT:=lq_anf__dwY][VV$35$181:=VV$35$375][lq_tmp_x_350:=VV$35$368][lq_tmp_x_188:=lq_anf__dx1][ys$35$awn:=lq_anf__dx1][lq_tmp_x_180:=fldList][lq_tmp_x_349:=fldList][lq_tmp_x_358:=VV$35$375][VV$35$184:=VV$35$368][lq_tmp_x_190:=lq_anf__dx1]]}
+bind 37 VV$35$375 : {VV$35$375 : int | [$k__182[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_187:=lq_anf__dwY][lq_tmp_x_189:=lq_anf__dwY][lq_tmp_x_353:=lq_anf__dwY][ds_dwT:=lq_anf__dwY][VV$35$181:=VV$35$375][lq_tmp_x_350:=VV$35$368][lq_tmp_x_188:=lq_anf__dx1][ys$35$awn:=lq_anf__dx1][lq_tmp_x_180:=fldList][lq_tmp_x_349:=fldList][lq_tmp_x_358:=VV$35$375][VV$35$184:=VV$35$368][lq_tmp_x_190:=lq_anf__dx1]]}
+bind 38 VV$35$378 : {VV$35$378 : [int] | [(VV$35$378 = lq_anf__dx1);
+                                          (len([VV$35$378]) >= 0)]}
+bind 39 VV$35$378 : {VV$35$378 : [int] | [(VV$35$378 = lq_anf__dx1);
+                                          (len([VV$35$378]) >= 0)]}
+bind 40 VV$35$381 : {VV$35$381 : int | [$k__331[lq_tmp_x_329:=lq_anf__dx0][lq_tmp_x_363:=VV$35$381][VV$35$330:=VV$35$381][lq_tmp_x_366:=VV$35$378][lq_tmp_x_328:=lq_anf__dwZ][lq_tmp_x_333:=VV$35$381][lq_tmp_x_325:=VV$35$378]]}
+bind 41 VV$35$381 : {VV$35$381 : int | [$k__331[lq_tmp_x_329:=lq_anf__dx0][lq_tmp_x_363:=VV$35$381][VV$35$330:=VV$35$381][lq_tmp_x_366:=VV$35$378][lq_tmp_x_328:=lq_anf__dwZ][lq_tmp_x_333:=VV$35$381][lq_tmp_x_325:=VV$35$378]]}
+bind 42 lq_tmp_x_347 : {VV$35$384 : int | []}
+bind 43 VV$35$385 : {VV$35$385 : int | [$k__335[lq_tmp_x_365:=VV$35$385][lq_tmp_x_329:=lq_anf__dx0][lq_tmp_x_324:=lq_tmp_x_347][lq_tmp_x_364:=lq_tmp_x_347][lq_tmp_x_366:=VV$35$378][lq_tmp_x_328:=lq_anf__dwZ][lq_tmp_x_333:=VV$35$385][lq_tmp_x_337:=lq_tmp_x_347][lq_tmp_x_325:=VV$35$378][VV$35$334:=VV$35$385]]}
+bind 44 VV$35$385 : {VV$35$385 : int | [$k__335[lq_tmp_x_365:=VV$35$385][lq_tmp_x_329:=lq_anf__dx0][lq_tmp_x_324:=lq_tmp_x_347][lq_tmp_x_364:=lq_tmp_x_347][lq_tmp_x_366:=VV$35$378][lq_tmp_x_328:=lq_anf__dwZ][lq_tmp_x_333:=VV$35$385][lq_tmp_x_337:=lq_tmp_x_347][lq_tmp_x_325:=VV$35$378][VV$35$334:=VV$35$385]]}
+bind 45 VV$35$388 : {VV$35$388 : [int] | [(VV$35$388 = lq_anf__dwY);
+                                          (len([VV$35$388]) >= 0)]}
+bind 46 VV$35$388 : {VV$35$388 : [int] | [(VV$35$388 = lq_anf__dwY);
+                                          (len([VV$35$388]) >= 0)]}
+bind 47 VV$35$391 : {VV$35$391 : int | [$k__290[VV$35$289:=VV$35$391][lq_tmp_x_288:=lq_anf__dwX][lq_tmp_x_292:=VV$35$391][lq_tmp_x_362:=VV$35$388][lq_tmp_x_359:=VV$35$391][lq_tmp_x_284:=VV$35$388][lq_tmp_x_287:=lq_anf__dwW]]}
+bind 48 VV$35$391 : {VV$35$391 : int | [$k__290[VV$35$289:=VV$35$391][lq_tmp_x_288:=lq_anf__dwX][lq_tmp_x_292:=VV$35$391][lq_tmp_x_362:=VV$35$388][lq_tmp_x_359:=VV$35$391][lq_tmp_x_284:=VV$35$388][lq_tmp_x_287:=lq_anf__dwW]]}
+bind 49 lq_tmp_x_345 : {VV$35$394 : int | []}
+bind 50 VV$35$395 : {VV$35$395 : int | [$k__294[lq_tmp_x_361:=VV$35$395][lq_tmp_x_288:=lq_anf__dwX][lq_tmp_x_360:=lq_tmp_x_345][VV$35$293:=VV$35$395][lq_tmp_x_292:=VV$35$395][lq_tmp_x_362:=VV$35$388][lq_tmp_x_296:=lq_tmp_x_345][lq_tmp_x_283:=lq_tmp_x_345][lq_tmp_x_284:=VV$35$388][lq_tmp_x_287:=lq_anf__dwW]]}
+bind 51 VV$35$395 : {VV$35$395 : int | [$k__294[lq_tmp_x_361:=VV$35$395][lq_tmp_x_288:=lq_anf__dwX][lq_tmp_x_360:=lq_tmp_x_345][VV$35$293:=VV$35$395][lq_tmp_x_292:=VV$35$395][lq_tmp_x_362:=VV$35$388][lq_tmp_x_296:=lq_tmp_x_345][lq_tmp_x_283:=lq_tmp_x_345][lq_tmp_x_284:=VV$35$388][lq_tmp_x_287:=lq_anf__dwW]]}
+bind 52 VV$35$398 : {VV$35$398 : [int] | [(VV$35$398 = lq_anf__dx0);
+                                          (len([VV$35$398]) >= 0)]}
+bind 53 VV$35$398 : {VV$35$398 : [int] | [(VV$35$398 = lq_anf__dx0);
+                                          (len([VV$35$398]) >= 0)]}
+bind 54 VV$35$401 : {VV$35$401 : int | [$k__313[lq_tmp_x_340:=VV$35$401][lq_tmp_x_343:=VV$35$398][VV$35$312:=VV$35$401][lq_tmp_x_311:=VV$35$398][lq_tmp_x_315:=VV$35$401]]}
+bind 55 VV$35$401 : {VV$35$401 : int | [$k__313[lq_tmp_x_340:=VV$35$401][lq_tmp_x_343:=VV$35$398][VV$35$312:=VV$35$401][lq_tmp_x_311:=VV$35$398][lq_tmp_x_315:=VV$35$401]]}
+bind 56 lq_tmp_x_322 : {VV$35$404 : int | []}
+bind 57 VV$35$405 : {VV$35$405 : int | [$k__317[lq_tmp_x_342:=VV$35$405][lq_tmp_x_343:=VV$35$398][lq_tmp_x_341:=lq_tmp_x_322][VV$35$316:=VV$35$405][lq_tmp_x_319:=lq_tmp_x_322][lq_tmp_x_311:=VV$35$398][lq_tmp_x_310:=lq_tmp_x_322][lq_tmp_x_315:=VV$35$405]]}
+bind 58 VV$35$405 : {VV$35$405 : int | [$k__317[lq_tmp_x_342:=VV$35$405][lq_tmp_x_343:=VV$35$398][lq_tmp_x_341:=lq_tmp_x_322][VV$35$316:=VV$35$405][lq_tmp_x_319:=lq_tmp_x_322][lq_tmp_x_311:=VV$35$398][lq_tmp_x_310:=lq_tmp_x_322][lq_tmp_x_315:=VV$35$405]]}
+bind 59 VV$35$408 : {VV$35$408 : int | [(VV$35$408 = lq_anf__dwZ)]}
+bind 60 VV$35$408 : {VV$35$408 : int | [(VV$35$408 = lq_anf__dwZ)]}
+bind 61 VV$35$411 : {VV$35$411 : int | [(VV$35$411 = 2)]}
+bind 62 VV$35$411 : {VV$35$411 : int | [(VV$35$411 = 2)]}
+bind 63 VV$35$414 : {VV$35$414 : [int] | [(VV$35$414 = lq_anf__dwX);
+                                          (len([VV$35$414]) >= 0)]}
+bind 64 VV$35$414 : {VV$35$414 : [int] | [(VV$35$414 = lq_anf__dwX);
+                                          (len([VV$35$414]) >= 0)]}
+bind 65 VV$35$417 : {VV$35$417 : int | [$k__272[lq_tmp_x_274:=VV$35$417][VV$35$271:=VV$35$417][lq_tmp_x_302:=VV$35$414][lq_tmp_x_299:=VV$35$417][lq_tmp_x_270:=VV$35$414]]}
+bind 66 VV$35$417 : {VV$35$417 : int | [$k__272[lq_tmp_x_274:=VV$35$417][VV$35$271:=VV$35$417][lq_tmp_x_302:=VV$35$414][lq_tmp_x_299:=VV$35$417][lq_tmp_x_270:=VV$35$414]]}
+bind 67 lq_tmp_x_281 : {VV$35$420 : int | []}
+bind 68 VV$35$421 : {VV$35$421 : int | [$k__276[lq_tmp_x_269:=lq_tmp_x_281][VV$35$275:=VV$35$421][lq_tmp_x_274:=VV$35$421][lq_tmp_x_301:=VV$35$421][lq_tmp_x_302:=VV$35$414][lq_tmp_x_300:=lq_tmp_x_281][lq_tmp_x_278:=lq_tmp_x_281][lq_tmp_x_270:=VV$35$414]]}
+bind 69 VV$35$421 : {VV$35$421 : int | [$k__276[lq_tmp_x_269:=lq_tmp_x_281][VV$35$275:=VV$35$421][lq_tmp_x_274:=VV$35$421][lq_tmp_x_301:=VV$35$421][lq_tmp_x_302:=VV$35$414][lq_tmp_x_300:=lq_tmp_x_281][lq_tmp_x_278:=lq_tmp_x_281][lq_tmp_x_270:=VV$35$414]]}
+bind 70 VV$35$424 : {VV$35$424 : int | [(VV$35$424 = lq_anf__dwW)]}
+bind 71 VV$35$424 : {VV$35$424 : int | [(VV$35$424 = lq_anf__dwW)]}
+bind 72 VV$35$427 : {VV$35$427 : int | [(VV$35$427 = 1)]}
+bind 73 VV$35$427 : {VV$35$427 : int | [(VV$35$427 = 1)]}
+bind 74 VV$35$430 : {VV$35$430 : [a_awA] | [(len([VV$35$430]) = (1 + len([lq_anf__dwV])));
+                                            ((? null([VV$35$430])) <=> false);
+                                            (xsListSelector([VV$35$430]) = lq_anf__dwV);
+                                            (xListSelector([VV$35$430]) = x$35$awo);
+                                            (len([VV$35$430]) >= 0)]}
+bind 75 VV$35$430 : {VV$35$430 : [a_awA] | [(len([VV$35$430]) = (1 + len([lq_anf__dwV])));
+                                            ((? null([VV$35$430])) <=> false);
+                                            (xsListSelector([VV$35$430]) = lq_anf__dwV);
+                                            (xListSelector([VV$35$430]) = x$35$awo);
+                                            (len([VV$35$430]) >= 0)]}
+bind 76 VV$35$253 : {VV$35$253 : a_awA | [$k__254[lq_tmp_x_252:=lq_anf__dwV][lq_tmp_x_248:=VV$35$430][lq_tmp_x_251:=x$35$awo]]}
+bind 77 lq_tmp_x_180 : {VV : a_awA | []}
+bind 78 VV$35$253 : {VV$35$253 : a_awA | [$k__257[lq_tmp_x_252:=lq_anf__dwV][VV$35$256:=VV$35$253][lq_tmp_x_248:=VV$35$430][lq_tmp_x_259:=lq_tmp_x_180][lq_tmp_x_247:=lq_tmp_x_180][lq_tmp_x_251:=x$35$awo]]}
+bind 79 VV$35$436 : {VV$35$436 : [a_awA] | [(VV$35$436 = lq_anf__dwV);
+                                            (len([VV$35$436]) >= 0)]}
+bind 80 VV$35$436 : {VV$35$436 : [a_awA] | [(VV$35$436 = lq_anf__dwV);
+                                            (len([VV$35$436]) >= 0)]}
+bind 81 VV$35$237 : {VV$35$237 : a_awA | [$k__238[lq_tmp_x_262:=VV$35$436][lq_tmp_x_189:=xs$35$awp][VV$35$184:=VV$35$436][lq_tmp_x_190:=ys$35$awn];
+                                          $k__178[lq_tmp_x_262:=VV$35$436][lq_tmp_x_187:=xs$35$awp][lq_tmp_x_189:=xs$35$awp][ds_dwT:=xs$35$awp][VV$35$177:=VV$35$237][lq_tmp_x_188:=ys$35$awn][ys$35$awn:=ys$35$awn][VV$35$184:=VV$35$436][lq_tmp_x_190:=ys$35$awn]]}
+bind 82 lq_tmp_x_245 : {VV : a_awA | []}
+bind 83 VV$35$237 : {VV$35$237 : a_awA | [$k__182[lq_tmp_x_262:=VV$35$436][lq_tmp_x_187:=xs$35$awp][lq_tmp_x_189:=xs$35$awp][ds_dwT:=xs$35$awp][VV$35$181:=VV$35$237][lq_tmp_x_261:=lq_tmp_x_245][lq_tmp_x_188:=ys$35$awn][ys$35$awn:=ys$35$awn][lq_tmp_x_180:=lq_tmp_x_245][VV$35$184:=VV$35$436][lq_tmp_x_190:=ys$35$awn]]}
+bind 84 VV : {VV : a_awA | [(VV = x$35$awo)]}
+bind 85 VV$35$443 : {VV$35$443 : [a_awA] | [(VV$35$443 = ys$35$awn);
+                                            (len([VV$35$443]) >= 0)]}
+bind 86 VV$35$443 : {VV$35$443 : [a_awA] | [(VV$35$443 = ys$35$awn);
+                                            (len([VV$35$443]) >= 0)]}
+bind 87 VV : {VV : a_awA | [$k__168[lq_tmp_x_187:=ds_dwT][VV$35$167:=VV][lq_tmp_x_189:=ds_dwT][ds_dwT:=ds_dwT][lq_tmp_x_243:=VV$35$443][VV$35$174:=VV$35$443]]}
+bind 88 lq_tmp_x_170 : {VV : a_awA | []}
+bind 89 VV : {VV : a_awA | [$k__172[lq_tmp_x_187:=ds_dwT][lq_tmp_x_189:=ds_dwT][lq_tmp_x_242:=lq_tmp_x_170][ds_dwT:=ds_dwT][lq_tmp_x_243:=VV$35$443][lq_tmp_x_170:=lq_tmp_x_170][VV$35$174:=VV$35$443][VV$35$171:=VV]]}
+bind 90 VV$35$449 : {VV$35$449 : [a_awA] | [(VV$35$449 = xs$35$awp);
+                                            (len([VV$35$449]) >= 0)]}
+bind 91 VV$35$449 : {VV$35$449 : [a_awA] | [(VV$35$449 = xs$35$awp);
+                                            (len([VV$35$449]) >= 0)]}
+bind 92 VV : {VV : a_awA | [$k__158[lq_tmp_x_215:=x$35$awo][lq_tmp_x_218:=VV$35$449][VV$35$164:=lq_anf__dwU][lq_tmp_x_208:=lq_anf__dwU][lq_tmp_x_241:=VV$35$449][lq_tmp_x_195:=lq_anf__dwU][VV$35$157:=VV];
+                            $k__162[lq_tmp_x_215:=x$35$awo][lq_tmp_x_218:=VV$35$449][VV$35$164:=lq_anf__dwU][lq_tmp_x_207:=x$35$awo][lq_tmp_x_208:=lq_anf__dwU][VV$35$161:=VV][lq_tmp_x_160:=x$35$awo][lq_tmp_x_241:=VV$35$449][lq_tmp_x_195:=lq_anf__dwU][lq_tmp_x_194:=x$35$awo]]}
+bind 93 lq_tmp_x_160 : {VV : a_awA | []}
+bind 94 VV : {VV : a_awA | [$k__162[lq_tmp_x_215:=x$35$awo][lq_tmp_x_218:=VV$35$449][VV$35$164:=lq_anf__dwU][lq_tmp_x_207:=lq_tmp_x_160][lq_tmp_x_208:=lq_anf__dwU][VV$35$161:=VV][lq_tmp_x_160:=lq_tmp_x_160][lq_tmp_x_241:=VV$35$449][lq_tmp_x_217:=lq_tmp_x_160][lq_tmp_x_195:=lq_anf__dwU][lq_tmp_x_240:=lq_tmp_x_160][lq_tmp_x_194:=lq_tmp_x_160]]}
+bind 95 VV$35$455 : {VV$35$455 : [a_awA] | [(VV$35$455 = ys$35$awn);
+                                            (len([VV$35$455]) >= 0)]}
+bind 96 VV$35$455 : {VV$35$455 : [a_awA] | [(VV$35$455 = ys$35$awn);
+                                            (len([VV$35$455]) >= 0)]}
+bind 97 VV : {VV : a_awA | [$k__168[lq_tmp_x_187:=ds_dwT][VV$35$167:=VV][lq_tmp_x_189:=ds_dwT][lq_tmp_x_206:=VV$35$455][ds_dwT:=ds_dwT][VV$35$174:=VV$35$455]]}
+bind 98 lq_tmp_x_180 : {VV : a_awA | []}
+bind 99 VV : {VV : a_awA | [$k__172[lq_tmp_x_187:=ds_dwT][lq_tmp_x_189:=ds_dwT][lq_tmp_x_206:=VV$35$455][ds_dwT:=ds_dwT][lq_tmp_x_205:=lq_tmp_x_180][lq_tmp_x_170:=lq_tmp_x_180][VV$35$174:=VV$35$455][VV$35$171:=VV]]}
+bind 100 VV$35$355 : {VV$35$355 : int | [$k__356]}
+bind 101 VV$35$334 : {VV$35$334 : int | [$k__335]}
+bind 102 VV$35$330 : {VV$35$330 : int | [$k__331]}
+bind 103 VV$35$316 : {VV$35$316 : int | [$k__317]}
+bind 104 VV$35$312 : {VV$35$312 : int | [$k__313]}
+bind 105 VV$35$293 : {VV$35$293 : int | [$k__294]}
+bind 106 VV$35$289 : {VV$35$289 : int | [$k__290]}
+bind 107 VV$35$275 : {VV$35$275 : int | [$k__276]}
+bind 108 VV$35$271 : {VV$35$271 : int | [$k__272]}
+bind 109 VV$35$164 : {VV$35$164 : [a_awA] | [$k__165;
+                                             (len([VV$35$164]) >= 0)]}
+bind 110 lq_tmp_x_160 : {VV : a_awA | []}
+bind 111 ds_dwT : {VV$35$164 : [a_awA] | [$k__165;
+                                          (len([VV$35$164]) >= 0)]}
+bind 112 VV$35$174 : {VV$35$174 : [a_awA] | [$k__175;
+                                             (len([VV$35$174]) >= 0)]}
+bind 113 lq_tmp_x_170 : {VV : a_awA | []}
+bind 114 ys$35$awn : {VV$35$174 : [a_awA] | [$k__175;
+                                             (len([VV$35$174]) >= 0)]}
+bind 115 VV$35$184 : {VV$35$184 : [a_awA] | [$k__185;
+                                             (len([VV$35$184]) >= 0)]}
+bind 116 lq_tmp_x_180 : {VV : a_awA | []}
+
+
+
+
+constraint:
+  env [0; 64; 1; 2; 3; 67; 4; 20; 68; 5; 6; 22; 7; 8]
+  lhs {VV$35$F16 : int | [$k__276[VV$35$421:=VV$35$F16][lq_tmp_x_269:=lq_tmp_x_281][VV$35$275:=VV$35$F16][lq_tmp_x_274:=VV$35$F16][lq_tmp_x_301:=VV$35$F16][VV$35$F:=VV$35$F16][lq_tmp_x_302:=VV$35$414][lq_tmp_x_300:=lq_tmp_x_281][lq_tmp_x_278:=lq_tmp_x_281][lq_tmp_x_270:=VV$35$414]]}
+  rhs {VV$35$F16 : int | [$k__294[VV$35$421:=VV$35$F16][lq_tmp_x_282:=VV$35$414][VV$35$F:=VV$35$F16][VV$35$293:=VV$35$F16][lq_tmp_x_292:=VV$35$F16][lq_tmp_x_296:=lq_tmp_x_281][lq_tmp_x_287:=lq_anf__dwW]]}
+  id 16 tag [2]
+  // META constraint id 16 : tests/pos/listqual.hs:10:1-3
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 20; 5; 6; 22; 7; 8; 24; 25; 27; 29; 31]
+  lhs {VV$35$F1 : [int] | [$k__185[lq_tmp_x_354:=lq_anf__dx1][lq_tmp_x_187:=lq_anf__dwY][lq_tmp_x_189:=lq_anf__dwY][lq_tmp_x_353:=lq_anf__dwY][ds_dwT:=lq_anf__dwY][VV$35$F:=VV$35$F1][lq_tmp_x_350:=VV$35$F1][VV$35$368:=VV$35$F1][lq_tmp_x_188:=lq_anf__dx1][ys$35$awn:=lq_anf__dx1][VV$35$184:=VV$35$F1][lq_tmp_x_190:=lq_anf__dx1];
+                           (len([VV$35$F1]) >= 0)]}
+  rhs {VV$35$F1 : [int] | [(len([VV$35$F1]) = 2)]}
+  id 1 tag [2]
+  // META constraint id 1 : tests/pos/listqual.hs:10:1-20
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 20; 5; 6; 22; 70; 7; 8]
+  lhs {VV$35$F17 : int | [(VV$35$F17 = lq_anf__dwW)]}
+  rhs {VV$35$F17 : int | [$k__290[VV$35$424:=VV$35$F17][VV$35$289:=VV$35$F17][VV$35$F:=VV$35$F17][lq_tmp_x_292:=VV$35$F17]]}
+  id 17 tag [2]
+  // META constraint id 17 : tests/pos/listqual.hs:10:15
+
+
+constraint:
+  env [0; 16; 1; 17; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 91; 92; 14; 15]
+  lhs {VV$35$F33 : a_awA | [$k__158[lq_tmp_x_215:=x$35$awo][VV:=VV$35$F33][lq_tmp_x_218:=VV$35$449][VV$35$164:=lq_anf__dwU][lq_tmp_x_208:=lq_anf__dwU][lq_tmp_x_241:=VV$35$449][VV$35$F:=VV$35$F33][lq_tmp_x_195:=lq_anf__dwU][VV$35$157:=VV$35$F33];
+                            $k__162[lq_tmp_x_215:=x$35$awo][VV:=VV$35$F33][lq_tmp_x_218:=VV$35$449][VV$35$164:=lq_anf__dwU][lq_tmp_x_207:=x$35$awo][lq_tmp_x_208:=lq_anf__dwU][VV$35$161:=VV$35$F33][lq_tmp_x_160:=x$35$awo][lq_tmp_x_241:=VV$35$449][VV$35$F:=VV$35$F33][lq_tmp_x_195:=lq_anf__dwU][lq_tmp_x_194:=x$35$awo]]}
+  rhs {VV$35$F33 : a_awA | [$k__158[VV$35$164:=VV$35$449][VV$35$F:=VV$35$F33][VV$35$237:=VV$35$F33][VV$35$157:=VV$35$F33]]}
+  id 33 tag [1]
+  // META constraint id 33 : tests/pos/listqual.hs:6:31-32
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 20; 5; 6; 22; 38; 7; 8; 24; 25; 27; 29]
+  lhs {VV$35$F2 : [int] | [(VV$35$F2 = lq_anf__dx1);
+                           (len([VV$35$F2]) >= 0)]}
+  rhs {VV$35$F2 : [int] | [$k__175[lq_tmp_x_187:=lq_anf__dwY][lq_tmp_x_189:=lq_anf__dwY][lq_tmp_x_353:=lq_anf__dwY][ds_dwT:=lq_anf__dwY][VV$35$F:=VV$35$F2][lq_tmp_x_348:=VV$35$F2][VV$35$174:=VV$35$F2][VV$35$378:=VV$35$F2]]}
+  id 2 tag [2]
+  // META constraint id 2 : tests/pos/listqual.hs:10:18-20
+
+
+constraint:
+  env [0; 16; 1; 17; 2; 18; 3; 4; 5; 6; 7; 8; 9; 10; 74; 11; 14; 15]
+  lhs {VV$35$F18 : [a_awA] | [(len([VV$35$F18]) = (1 + len([lq_anf__dwV])));
+                              ((? null([VV$35$F18])) <=> false);
+                              (xsListSelector([VV$35$F18]) = lq_anf__dwV);
+                              (xListSelector([VV$35$F18]) = x$35$awo);
+                              (len([VV$35$F18]) >= 0)]}
+  rhs {VV$35$F18 : [a_awA] | [$k__185[lq_tmp_x_187:=ds_dwT][lq_tmp_x_189:=ds_dwT][VV$35$430:=VV$35$F18][ds_dwT:=ds_dwT][VV$35$F:=VV$35$F18][lq_tmp_x_188:=ys$35$awn][ys$35$awn:=ys$35$awn][VV$35$184:=VV$35$F18][lq_tmp_x_190:=ys$35$awn]]}
+  id 18 tag [1]
+  // META constraint id 18 : tests/pos/listqual.hs:6:20-35
+
+
+constraint:
+  env [0;
+       16;
+       1;
+       17;
+       2;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       11;
+       91;
+       93;
+       14;
+       94;
+       15]
+  lhs {VV$35$F34 : a_awA | [$k__162[lq_tmp_x_215:=x$35$awo][VV:=VV$35$F34][lq_tmp_x_218:=VV$35$449][VV$35$164:=lq_anf__dwU][lq_tmp_x_207:=lq_tmp_x_160][lq_tmp_x_208:=lq_anf__dwU][VV$35$161:=VV$35$F34][lq_tmp_x_160:=lq_tmp_x_160][lq_tmp_x_241:=VV$35$449][VV$35$F:=VV$35$F34][lq_tmp_x_217:=lq_tmp_x_160][lq_tmp_x_195:=lq_anf__dwU][lq_tmp_x_240:=lq_tmp_x_160][lq_tmp_x_194:=lq_tmp_x_160]]}
+  rhs {VV$35$F34 : a_awA | [$k__162[VV$35$164:=VV$35$449][VV$35$161:=VV$35$F34][VV$35$F:=VV$35$F34][VV$35$237:=VV$35$F34]]}
+  id 34 tag [1]
+  // META constraint id 34 : tests/pos/listqual.hs:6:31-32
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 95]
+  lhs {VV$35$F35 : [a_awA] | [(VV$35$F35 = ys$35$awn);
+                              (len([VV$35$F35]) >= 0)]}
+  rhs {VV$35$F35 : [a_awA] | [$k__185[lq_tmp_x_187:=ds_dwT][lq_tmp_x_189:=ds_dwT][ds_dwT:=ds_dwT][VV$35$F:=VV$35$F35][VV$35$455:=VV$35$F35][lq_tmp_x_188:=ys$35$awn][ys$35$awn:=ys$35$awn][VV$35$184:=VV$35$F35][lq_tmp_x_190:=ys$35$awn]]}
+  id 35 tag [1]
+  // META constraint id 35 : tests/pos/listqual.hs:5:20-21
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 20; 5; 6; 22; 7; 8; 24; 25; 27; 29; 45]
+  lhs {VV$35$F6 : [int] | [(VV$35$F6 = lq_anf__dwY);
+                           (len([VV$35$F6]) >= 0)]}
+  rhs {VV$35$F6 : [int] | [$k__165[VV$35$164:=VV$35$F6][VV$35$F:=VV$35$F6][lq_tmp_x_346:=VV$35$F6][VV$35$388:=VV$35$F6]]}
+  id 6 tag [2]
+  // META constraint id 6 : tests/pos/listqual.hs:10:14-16
+
+
+constraint:
+  env [0; 1; 2; 3; 4; 20; 5; 6; 22; 7; 8; 24; 25; 27; 29; 46; 47]
+  lhs {VV$35$F8 : int | [$k__290[VV$35$289:=VV$35$F8][lq_tmp_x_288:=lq_anf__dwX][VV$35$F:=VV$35$F8][lq_tmp_x_292:=VV$35$F8][lq_tmp_x_362:=VV$35$388][lq_tmp_x_359:=VV$35$F8][lq_tmp_x_284:=VV$35$388][VV$35$391:=VV$35$F8][lq_tmp_x_287:=lq_anf__dwW]]}
+  rhs {VV$35$F8 : int | [$k__158[VV$35$164:=VV$35$388][VV$35$F:=VV$35$F8][lq_tmp_x_346:=VV$35$388][VV$35$157:=VV$35$F8][lq_tmp_x_358:=VV$35$F8][VV$35$391:=VV$35$F8]]}
+  id 8 tag [2]
+  // META constraint id 8 : tests/pos/listqual.hs:10:14-16
+
+
+constraint:
+  env [0; 1; 49; 2; 50; 3; 4; 20; 5; 6; 22; 7; 8; 24; 25; 27; 29; 46]
+  lhs {VV$35$F9 : int | [$k__294[lq_tmp_x_361:=VV$35$F9][lq_tmp_x_288:=lq_anf__dwX][VV$35$F:=VV$35$F9][lq_tmp_x_360:=lq_tmp_x_345][VV$35$293:=VV$35$F9][lq_tmp_x_292:=VV$35$F9][VV$35$395:=VV$35$F9][lq_tmp_x_362:=VV$35$388][lq_tmp_x_296:=lq_tmp_x_345][lq_tmp_x_283:=lq_tmp_x_345][lq_tmp_x_284:=VV$35$388][lq_tmp_x_287:=lq_anf__dwW]]}
+  rhs {VV$35$F9 : int | [$k__162[VV$35$164:=VV$35$388][VV$35$161:=VV$35$F9][lq_tmp_x_160:=lq_tmp_x_345][VV$35$F:=VV$35$F9][lq_tmp_x_346:=VV$35$388][VV$35$395:=VV$35$F9][lq_tmp_x_358:=VV$35$F9]]}
+  id 9 tag [2]
+  // META constraint id 9 : tests/pos/listqual.hs:10:14-16
+
+
+constraint:
+  env [0; 16; 1; 17; 2; 3; 4; 5; 85; 6; 7; 8; 9; 10; 11; 14; 15]
+  lhs {VV$35$F25 : [a_awA] | [(VV$35$F25 = ys$35$awn);
+                              (len([VV$35$F25]) >= 0)]}
+  rhs {VV$35$F25 : [a_awA] | [$k__175[lq_tmp_x_187:=xs$35$awp][lq_tmp_x_189:=xs$35$awp][ds_dwT:=xs$35$awp][VV$35$F:=VV$35$F25][VV$35$174:=VV$35$F25][VV$35$443:=VV$35$F25]]}
+  id 25 tag [1]
+  // META constraint id 25 : tests/pos/listqual.hs:6:34-35
+
+
+constraint:
+  env [0; 16; 1; 17; 2; 3; 4; 5; 6; 7; 8; 9; 10; 90; 11; 14; 15]
+  lhs {VV$35$F29 : [a_awA] | [(VV$35$F29 = xs$35$awp);
+                              (len([VV$35$F29]) >= 0)]}
+  rhs {VV$35$F29 : [a_awA] | [$k__165[VV$35$164:=VV$35$F29][VV$35$F:=VV$35$F29][VV$35$449:=VV$35$F29]]}
+  id 29 tag [1]
+  // META constraint id 29 : tests/pos/listqual.hs:6:31-32
+
+
+constraint:
+  env [0; 64; 1; 65; 2; 3; 4; 20; 5; 6; 22; 7; 8]
+  lhs {VV$35$F14 : int | [$k__272[lq_tmp_x_274:=VV$35$F14][VV$35$271:=VV$35$F14][VV$35$F:=VV$35$F14][lq_tmp_x_302:=VV$35$414][VV$35$417:=VV$35$F14][lq_tmp_x_299:=VV$35$F14][lq_tmp_x_270:=VV$35$414]]}
+  rhs {VV$35$F14 : int | [$k__290[lq_tmp_x_282:=VV$35$414][VV$35$289:=VV$35$F14][VV$35$F:=VV$35$F14][VV$35$417:=VV$35$F14][lq_tmp_x_292:=VV$35$F14][lq_tmp_x_287:=lq_anf__dwW]]}
+  id 14 tag [2]
+  // META constraint id 14 : tests/pos/listqual.hs:10:1-3
+
+
+constraint:
+  env [0; 16; 1; 17; 2; 3; 4; 5; 6; 7; 8; 9; 10; 90; 11; 14; 15]
+  lhs {VV$35$F30 : [a_awA] | [(VV$35$F30 = xs$35$awp);
+                              (len([VV$35$F30]) >= 0)]}
+  rhs {VV$35$F30 : [a_awA] | [(len([VV$35$F30]) < len([ds_dwT]))]}
+  id 30 tag [1]
+  // META constraint id 30 : tests/pos/listqual.hs:6:31-32
+
+
+constraint:
+  env [0; 64; 1; 65; 2; 3; 4; 20; 5; 6; 22; 7; 8]
+  lhs {VV$35$F15 : int | [$k__272[lq_tmp_x_274:=VV$35$F15][VV$35$271:=VV$35$F15][VV$35$F:=VV$35$F15][lq_tmp_x_302:=VV$35$414][VV$35$417:=VV$35$F15][lq_tmp_x_299:=VV$35$F15][lq_tmp_x_270:=VV$35$414]]}
+  rhs {VV$35$F15 : int | [$k__294[lq_tmp_x_282:=VV$35$414][VV$35$F:=VV$35$F15][VV$35$417:=VV$35$F15][VV$35$293:=VV$35$F15][lq_tmp_x_292:=VV$35$F15][lq_tmp_x_296:=lq_anf__dwW][lq_tmp_x_287:=lq_anf__dwW]]}
+  id 15 tag [2]
+  // META constraint id 15 : tests/pos/listqual.hs:10:1-3
+
+
+constraint:
+  env [0; 16; 1; 17; 2; 3; 4; 5; 6; 7; 8; 9; 10; 90; 11; 14; 15]
+  lhs {VV$35$F31 : [a_awA] | [(VV$35$F31 = xs$35$awp);
+                              (len([VV$35$F31]) >= 0)]}
+  rhs {VV$35$F31 : [a_awA] | [(len([VV$35$F31]) >= 0)]}
+  id 31 tag [1]
+  // META constraint id 31 : tests/pos/listqual.hs:6:31-32
+
+
+
+
+wf:
+  env [0; 1; 2; 3; 4; 20; 5; 6; 22; 7; 23; 8]
+  reft {VV$35$293 : int | [$k__294]}
+  
+  // META wf  : tests/pos/listqual.hs:10:1-3
+
+
+wf:
+  env [0; 1; 2; 3; 4; 20; 5; 6; 22; 7; 8]
+  reft {VV$35$289 : int | [$k__290]}
+  
+  // META wf  : tests/pos/listqual.hs:10:1-3
+
+
+wf:
+  env [0; 1; 2; 3; 4; 20; 5; 21; 6; 7; 8]
+  reft {VV$35$275 : int | [$k__276]}
+  
+  // META wf  : tests/pos/listqual.hs:10:1-3
+
+
+wf:
+  env [0; 1; 2; 3; 4; 20; 5; 6; 7; 8]
+  reft {VV$35$271 : int | [$k__272]}
+  
+  // META wf  : tests/pos/listqual.hs:10:1-3
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8]
+  reft {VV$35$164 : [a_awA] | [$k__165]}
+  
+  // META wf  : <no location info>
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 109]
+  reft {VV$35$157 : a_awA | [$k__158]}
+  
+  // META wf  : <no location info>
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 110]
+  reft {VV$35$161 : a_awA | [$k__162]}
+  
+  // META wf  : <no location info>
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 111]
+  reft {VV$35$174 : [a_awA] | [$k__175]}
+  
+  // META wf  : <no location info>
+
+
+wf:
+  env [0; 1; 2; 114; 3; 4; 5; 6; 7; 8; 111]
+  reft {VV$35$184 : [a_awA] | [$k__185]}
+  
+  // META wf  : <no location info>
+
+
+
+
+
+
+
diff --git a/tests/pos/poly.fq b/tests/pos/poly.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/poly.fq
@@ -0,0 +1,14 @@
+
+// This definition works fine ...
+// constant offset : (func(0, [int ; int ; (BitVec Size32) ]))
+
+// But this crashes as 'offset 0' is embedded as int not bv...
+constant offset : (func(1, [int; int; @(0)]))
+
+bind 0 x  : {VV : (BitVec  Size32) | [ VV = offset 0 0 ]}
+
+constraint:
+  env [0]
+  lhs {VV : (BitVec Size32) | [ VV = x ] }
+  rhs {VV : (BitVec Size32) | [ VV = x ] }
+  id 1 tag [1]
diff --git a/tests/pos/test00.hs.fq b/tests/pos/test00.hs.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/test00.hs.fq
@@ -0,0 +1,1021 @@
+
+qualif IsEmp(v:GHC.Types.Bool, xs: [a]) : (Prop(v) <=> len([xs]) > 0)
+qualif IsEmp(v:GHC.Types.Bool, xs: [a]) : (Prop(v) <=> len([xs]) = 0)
+qualif ListZ(v: [a])          : len([v]) =  0 
+qualif ListZ(v: [a])          : len([v]) >= 0 
+qualif ListZ(v: [a])          : len([v]) >  0 
+qualif CmpLen(v:[a], xs:[b])  : len([v]) =  len([xs]) 
+qualif CmpLen(v:[a], xs:[b])  : len([v]) >= len([xs]) 
+qualif CmpLen(v:[a], xs:[b])  : len([v]) >  len([xs]) 
+qualif CmpLen(v:[a], xs:[b])  : len([v]) <= len([xs]) 
+qualif CmpLen(v:[a], xs:[b])  : len([v]) <  len([xs]) 
+qualif EqLen(v:int, xs: [a]): v = len([xs]) 
+qualif LenEq(v:[a], x: int) :  x = len([v]) 
+qualif LenDiff(v:[a], x:int): len([v]) = x + 1
+qualif LenDiff(v:[a], x:int): len([v]) = x - 1
+qualif LenAcc(v:int, xs:[a], n: int): (v = len([xs]) + n)
+
+qualif Bot(v:obj): 0 = 1 
+qualif Bot(v:a): 0 = 1 
+qualif Bot(v:bool): 0 = 1 
+qualif Bot(v:int): 0 = 1 
+qualif CmpZ(v:a): (v <  0)
+qualif CmpZ(v:a): (v <= 0)
+qualif CmpZ(v:a): (v >  0)
+qualif CmpZ(v:a): (v >= 0)
+qualif CmpZ(v:a): (v  = 0)
+qualif CmpZ(v:a): (v != 0)
+
+qualif Cmp(v:a, x:a): (v <  x)
+qualif Cmp(v:a, x:a): (v <= x)
+qualif Cmp(v:a, x:a): (v >  x)
+qualif Cmp(v:a, x:a): (v >= x)
+qualif Cmp(v:a, x:a): (v  = x)
+qualif Cmp(v:a, x:a): (v != x)
+
+qualif One(v:int)     : v = 1
+qualif True(v:bool)   : (? v) 
+qualif False(v:bool)  : ~ (? v) 
+qualif True1(v:GHC.Types.Bool): (Prop(v))
+qualif False1(v:GHC.Types.Bool): (~ Prop(v))
+qualif Papp(v:a, p:Pred a) : (papp1(p, v))
+
+constant papp1 : func(1, [Pred @(0); @(0); bool])
+
+qualif Papp2(v:a,x:b,p:Pred a b) : papp2(p, v, x)
+constant papp2 : func(4, [Pred @(0) @(1); @(2); @(3); bool])
+
+qualif Papp3(v:a,x:b, y:c, p:Pred a b c) : papp3(p, v, x, y)
+constant papp3 : func(6, [Pred @(0) @(1) @(2); @(3); @(4); @(5); bool])
+
+qualif Papp4(v:a,x:b, y:c, z:d, p:Pred a b c d) : papp4(p, v, x, y, z)
+constant papp4 : func(8, [Pred @(0) @(1) @(2) @(6); @(3); @(4); @(5); @(7); bool])
+
+
+
+constant Prop : func(0, [GHC.Types.Bool; bool])
+qualif Fst(v : @(1), fix##126#Y : @(0)): (v = fst([fix##126#Y])) // "/Users/rjhala/research/liquid/liquidhaskell/.cabal-sandbox/share/x86_64-osx-ghc-7.8.3/liquidhaskell-0.3.1.0/include/GHC/Base.spec" (line 26, column 8)
+qualif Snd(v : @(1), fix##126#Y : @(0)): (v = snd([fix##126#Y])) // "/Users/rjhala/research/liquid/liquidhaskell/.cabal-sandbox/share/x86_64-osx-ghc-7.8.3/liquidhaskell-0.3.1.0/include/GHC/Base.spec" (line 27, column 8)
+
+constant Prop : func(0, [GHC.Types.Bool; bool])
+constant x_Tuple54 : func(5, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4);
+                              @(3)])
+constant x_Tuple44 : func(4, [FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3);
+                              @(3)])
+constant xListSelector : func(1, [[@(0)]; @(0)])
+constant x_Tuple41 : func(4, [FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3);
+                              @(0)])
+constant x_Tuple76 : func(7, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5))  @(6);
+                              @(5)])
+constant addrLen : func(0, [int; int])
+constant x_Tuple65 : func(6, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5);
+                              @(4)])
+constant x_Tuple52 : func(5, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4);
+                              @(1)])
+constant GHC.Types.False#68 : (GHC.Types.Bool)
+constant x_Tuple64 : func(6, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5);
+                              @(3)])
+constant x_Tuple33 : func(3, [FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2);
+                              @(2)])
+constant fst : func(2, [FAppTy (FAppTy fix##40##41#  @(0))  @(1);
+                        @(0)])
+constant x_Tuple31 : func(3, [FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2);
+                              @(0)])
+constant x_Tuple43 : func(4, [FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3);
+                              @(2)])
+constant x_Tuple71 : func(7, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5))  @(6);
+                              @(0)])
+constant x_Tuple32 : func(3, [FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2);
+                              @(1)])
+constant x_Tuple72 : func(7, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5))  @(6);
+                              @(1)])
+constant x_Tuple63 : func(6, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5);
+                              @(2)])
+constant x_Tuple75 : func(7, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5))  @(6);
+                              @(4)])
+constant x_Tuple51 : func(5, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4);
+                              @(0)])
+constant len : func(1, [[@(0)]; int])
+constant xsListSelector : func(1, [[@(0)]; [@(0)]])
+constant null : func(1, [[@(0)]; bool])
+constant x_Tuple53 : func(5, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4);
+                              @(2)])
+constant x_Tuple22 : func(2, [FAppTy (FAppTy fix##40##41#  @(0))  @(1);
+                              @(1)])
+constant fromJust : func(1, [FAppTy Data.Maybe.Maybe  @(0); @(0)])
+constant snd : func(2, [FAppTy (FAppTy fix##40##41#  @(0))  @(1);
+                        @(1)])
+constant x_Tuple73 : func(7, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5))  @(6);
+                              @(2)])
+constant x_Tuple62 : func(6, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5);
+                              @(1)])
+constant x_Tuple55 : func(5, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4);
+                              @(4)])
+constant x_Tuple74 : func(7, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5))  @(6);
+                              @(3)])
+constant cmp : func(0, [GHC.Types.Ordering; GHC.Types.Ordering])
+constant x_Tuple42 : func(4, [FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3);
+                              @(1)])
+constant x_Tuple21 : func(2, [FAppTy (FAppTy fix##40##41#  @(0))  @(1);
+                              @(0)])
+constant x_Tuple61 : func(6, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5);
+                              @(0)])
+constant isJust : func(1, [FAppTy Data.Maybe.Maybe  @(0); bool])
+constant x_Tuple66 : func(6, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5);
+                              @(5)])
+constant GHC.Types.True#6u : (GHC.Types.Bool)
+constant x_Tuple77 : func(7, [FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy (FAppTy fix##40##41#  @(0))  @(1))  @(2))  @(3))  @(4))  @(5))  @(6);
+                              @(6)])
+bind 0 GHC.Types.False#68 : {VV#171 : GHC.Types.Bool | []}
+bind 1 GHC.Types.I##6c : {VV : func(0, [int; int]) | []}
+bind 2 GHC.Types.True#6u : {VV#173 : GHC.Types.Bool | []}
+bind 3 fix#GHC.Classes.#36#fOrdInt#35#rhx : {VV#175 : FAppTy GHC.Classes.Ord  int | []}
+bind 4 fix#GHC.Num.#36#fNumInt#35#rhy : {VV#176 : FAppTy GHC.Num.Num  int | []}
+bind 5 Language.Haskell.Liquid.Prelude.liquidAssertB#rpD : {VV : func(0, [GHC.Types.Bool;
+                                                                          GHC.Types.Bool]) | []}
+bind 6 Language.Haskell.Liquid.Prelude.choose#rpK : {VV : func(0, [int;
+                                                                   int]) | []}
+bind 7 GHC.Types.EQ#6U : {VV#179 : GHC.Types.Ordering | []}
+bind 8 GHC.Types.LT#6S : {VV#180 : GHC.Types.Ordering | []}
+bind 9 GHC.Types.GT#6W : {VV#181 : GHC.Types.Ordering | []}
+bind 10 GHC.Types.True#6u : {v : GHC.Types.Bool | [(? Prop([v]))]}
+bind 11 GHC.Types.False#68 : {v : GHC.Types.Bool | [(~ ((? Prop([v]))))]}
+bind 12 Language.Haskell.Liquid.Prelude.plus#rou : {VV : func(0, [int;
+                                                                  int;
+                                                                  int]) | []}
+bind 13 Language.Haskell.Liquid.Prelude.minus#rpv : {VV : func(0, [int;
+                                                                   int;
+                                                                   int]) | []}
+bind 14 Language.Haskell.Liquid.Prelude.times#rpw : {VV : func(0, [int;
+                                                                   int;
+                                                                   int]) | []}
+bind 15 Language.Haskell.Liquid.Prelude.eq#rpx : {VV : func(0, [int;
+                                                                int;
+                                                                GHC.Types.Bool]) | []}
+bind 16 Language.Haskell.Liquid.Prelude.neq#rpy : {VV : func(0, [int;
+                                                                 int;
+                                                                 GHC.Types.Bool]) | []}
+bind 17 Language.Haskell.Liquid.Prelude.leq#rpz : {VV : func(0, [int;
+                                                                 int;
+                                                                 GHC.Types.Bool]) | []}
+bind 18 Language.Haskell.Liquid.Prelude.geq#rpA : {VV : func(0, [int;
+                                                                 int;
+                                                                 GHC.Types.Bool]) | []}
+bind 19 Language.Haskell.Liquid.Prelude.lt#rpB : {VV : func(0, [int;
+                                                                int;
+                                                                GHC.Types.Bool]) | []}
+bind 20 Language.Haskell.Liquid.Prelude.gt#rpC : {VV : func(0, [int;
+                                                                int;
+                                                                GHC.Types.Bool]) | []}
+bind 21 Language.Haskell.Liquid.Prelude.liquidAssertB#rpD : {VV : func(0, [GHC.Types.Bool;
+                                                                           GHC.Types.Bool]) | []}
+bind 22 Language.Haskell.Liquid.Prelude.isEven#rpL : {VV : func(0, [int;
+                                                                    GHC.Types.Bool]) | []}
+bind 23 Language.Haskell.Liquid.Prelude.isOdd#rpM : {VV : func(0, [int;
+                                                                   GHC.Types.Bool]) | []}
+bind 24 GHC.Integer.Type.smallInteger#0Z : {VV : func(0, [int;
+                                                          int]) | []}
+bind 25 GHC.Types.I##6c : {VV : func(0, [int; int]) | []}
+bind 26 fix#GHC.Prim.#43##35##35#98 : {VV : func(0, [int;
+                                                     int;
+                                                     int]) | []}
+bind 27 fix#GHC.Prim.#45##35##35#99 : {VV : func(0, [int;
+                                                     int;
+                                                     int]) | []}
+bind 28 fix#GHC.Prim.#61##61##35##35#9o : {VV : func(0, [int;
+                                                         int;
+                                                         int]) | []}
+bind 29 fix#GHC.Prim.#62##61##35##35#9n : {VV : func(0, [int;
+                                                         int;
+                                                         int]) | []}
+bind 30 fix#GHC.Prim.#60##61##35##35#9r : {VV : func(0, [int;
+                                                         int;
+                                                         int]) | []}
+bind 31 fix#GHC.Prim.#60##35##35#9q : {VV : func(0, [int;
+                                                     int;
+                                                     int]) | []}
+bind 32 fix#GHC.Prim.#62##35##35#9m : {VV : func(0, [int;
+                                                     int;
+                                                     int]) | []}
+bind 33 GHC.Types.EQ#6U : {VV#220 : GHC.Types.Ordering | [(cmp([VV#220]) = GHC.Types.EQ#6U)]}
+bind 34 GHC.Types.LT#6S : {VV#222 : GHC.Types.Ordering | [(cmp([VV#222]) = GHC.Types.LT#6S)]}
+bind 35 GHC.Types.GT#6W : {VV#223 : GHC.Types.Ordering | [(cmp([VV#223]) = GHC.Types.GT#6W)]}
+bind 36 fix##36#dOrd_a165 : {VV#232 : FAppTy GHC.Classes.Ord  a_a164 | []}
+bind 37 fix##36#dNum_a166 : {VV#233 : FAppTy GHC.Num.Num  a_a164 | []}
+bind 38 a_a164 : {VV : num | []}
+bind 39 gooberding#a15N : {VV#234 : a_a164 | [$k_235]}
+bind 40 lq_anf__d16w : {lq_tmp_x241 : int | [(lq_tmp_x241 = 0)]}
+bind 41 lq_anf__d16x : {VV : a_a164 | [(VV = lq_anf__d16w)]}
+bind 42 lq_anf__d16y : {lq_tmp_x254 : GHC.Types.Bool | [((? Prop([lq_tmp_x254])) <=> (gooberding#a15N >= lq_anf__d16x))]}
+bind 43 lq_anf__d16z : {lq_tmp_x276 : int | [(lq_tmp_x276 = (0  :  int))]}
+bind 44 Test0.x#r12i : {VV#272 : int | [$k_273]}
+bind 45 lq_anf__d16A : {lq_tmp_x291 : int | [(lq_tmp_x291 = (0  :  int))]}
+bind 46 lq_anf__d16B : {lq_tmp_x297 : GHC.Types.Bool | [((? Prop([lq_tmp_x297])) <=> (Test0.x#r12i > lq_anf__d16A))]}
+bind 47 lq_anf__d16C : {lq_tmp_x313 : GHC.Types.Bool | [((? Prop([lq_tmp_x313])) <=> (Test0.x#r12i > lq_anf__d16A));
+                                                        (lq_tmp_x313 = lq_anf__d16B)]}
+bind 48 lq_anf__d16C : {lq_tmp_x315 : GHC.Types.Bool | [((? Prop([lq_tmp_x315])) <=> (Test0.x#r12i > lq_anf__d16A));
+                                                        (lq_tmp_x315 = lq_anf__d16B)]}
+bind 49 lq_anf__d16C : {lq_tmp_x315 : GHC.Types.Bool | [((? Prop([lq_tmp_x315])) <=> (Test0.x#r12i > lq_anf__d16A));
+                                                        (lq_tmp_x315 = lq_anf__d16B);
+                                                        (~ ((? Prop([lq_tmp_x315]))));
+                                                        (~ ((? Prop([lq_tmp_x315]))))]}
+bind 50 lq_anf__d16C : {lq_tmp_x321 : GHC.Types.Bool | [((? Prop([lq_tmp_x321])) <=> (Test0.x#r12i > lq_anf__d16A));
+                                                        (lq_tmp_x321 = lq_anf__d16B)]}
+bind 51 lq_anf__d16C : {lq_tmp_x321 : GHC.Types.Bool | [((? Prop([lq_tmp_x321])) <=> (Test0.x#r12i > lq_anf__d16A));
+                                                        (lq_tmp_x321 = lq_anf__d16B);
+                                                        (? Prop([lq_tmp_x321]));
+                                                        (? Prop([lq_tmp_x321]))]}
+bind 52 Test0.prop_abs#r12j : {VV#287 : GHC.Types.Bool | [$k_288]}
+bind 53 VV#343 : {VV#343 : GHC.Types.Bool | [$k_239[VV#238:=VV#343][fix##36#dOrd_a165:=fix#GHC.Classes.#36#fOrdInt#35#rhx][fix##36#dNum_a166:=fix#GHC.Num.#36#fNumInt#35#rhy][gooberding#a15N:=Test0.x#r12i][lq_tmp_x332:=fix#GHC.Classes.#36#fOrdInt#35#rhx][lq_tmp_x333:=fix#GHC.Num.#36#fNumInt#35#rhy][lq_tmp_x334:=Test0.x#r12i][lq_tmp_x328:=VV#343]]}
+bind 54 VV#343 : {VV#343 : GHC.Types.Bool | [$k_239[VV#238:=VV#343][fix##36#dOrd_a165:=fix#GHC.Classes.#36#fOrdInt#35#rhx][fix##36#dNum_a166:=fix#GHC.Num.#36#fNumInt#35#rhy][gooberding#a15N:=Test0.x#r12i][lq_tmp_x332:=fix#GHC.Classes.#36#fOrdInt#35#rhx][lq_tmp_x333:=fix#GHC.Num.#36#fNumInt#35#rhy][lq_tmp_x334:=Test0.x#r12i][lq_tmp_x328:=VV#343]]}
+bind 55 VV#346 : {VV#346 : int | [$k_273[VV#272:=VV#346][lq_tmp_x341:=VV#346];
+                                  (VV#346 = Test0.x#r12i)]}
+bind 56 VV#346 : {VV#346 : int | [$k_273[VV#272:=VV#346][lq_tmp_x341:=VV#346];
+                                  (VV#346 = Test0.x#r12i)]}
+bind 57 VV#349 : {VV#349 : GHC.Types.Bool | [(~ ((? Prop([VV#349]))));
+                                             (VV#349 = GHC.Types.False#68)]}
+bind 58 VV#349 : {VV#349 : GHC.Types.Bool | [(~ ((? Prop([VV#349]))));
+                                             (VV#349 = GHC.Types.False#68)]}
+bind 59 VV#352 : {VV#352 : int | [(VV#352 = (0  :  int));
+                                  (VV#352 = lq_anf__d16A)]}
+bind 60 VV#352 : {VV#352 : int | [(VV#352 = (0  :  int));
+                                  (VV#352 = lq_anf__d16A)]}
+bind 61 VV#355 : {VV#355 : int | [$k_273[VV#272:=VV#355][lq_tmp_x310:=VV#355];
+                                  (VV#355 = Test0.x#r12i)]}
+bind 62 VV#355 : {VV#355 : int | [$k_273[VV#272:=VV#355][lq_tmp_x310:=VV#355];
+                                  (VV#355 = Test0.x#r12i)]}
+bind 63 VV#358 : {VV#358 : int | [(VV#358 = 0)]}
+bind 64 VV#358 : {VV#358 : int | [(VV#358 = 0)]}
+bind 65 VV#361 : {VV#361 : int | []}
+bind 66 VV#361 : {VV#361 : int | []}
+bind 67 VV#364 : {VV#364 : int | [(VV#364 = (0  :  int));
+                                  (VV#364 = lq_anf__d16z)]}
+bind 68 VV#364 : {VV#364 : int | [(VV#364 = (0  :  int));
+                                  (VV#364 = lq_anf__d16z)]}
+bind 69 VV#367 : {VV#367 : int | [(VV#367 = 0)]}
+bind 70 VV#367 : {VV#367 : int | [(VV#367 = 0)]}
+bind 71 VV#370 : {VV#370 : GHC.Types.Bool | [(? Prop([VV#370]))]}
+bind 72 VV#370 : {VV#370 : GHC.Types.Bool | [(? Prop([VV#370]))]}
+bind 73 VV#373 : {VV#373 : GHC.Types.Bool | [((? Prop([VV#373])) <=> (gooberding#a15N >= lq_anf__d16x));
+                                             (VV#373 = lq_anf__d16y)]}
+bind 74 VV#373 : {VV#373 : GHC.Types.Bool | [((? Prop([VV#373])) <=> (gooberding#a15N >= lq_anf__d16x));
+                                             (VV#373 = lq_anf__d16y)]}
+bind 75 VV : {VV : a_a164 | [(VV = lq_anf__d16w);
+                             (VV = lq_anf__d16x)]}
+bind 76 VV#234 : {VV#234 : a_a164 | [$k_235;
+                                     (VV#234 = gooberding#a15N)]}
+bind 77 VV#378 : {VV#378 : int | [(VV#378 = 0);
+                                  (VV#378 = lq_anf__d16w)]}
+bind 78 VV#378 : {VV#378 : int | [(VV#378 = 0);
+                                  (VV#378 = lq_anf__d16w)]}
+bind 79 VV#304 : {VV#304 : int | [$k_305]}
+bind 80 VV#287 : {VV#287 : GHC.Types.Bool | [$k_288]}
+bind 81 VV#272 : {VV#272 : int | [$k_273]}
+bind 82 VV#238 : {VV#238 : GHC.Types.Bool | [$k_239]}
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       50;
+       3;
+       19;
+       35;
+       51;
+       4;
+       20;
+       5;
+       21;
+       53;
+       6;
+       22;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       44;
+       13;
+       29;
+       45;
+       14;
+       30;
+       46;
+       15;
+       31;
+       47]
+  lhs {VV#F1 : GHC.Types.Bool | [$k_239[VV#238:=VV#F1][fix##36#dOrd_a165:=fix#GHC.Classes.#36#fOrdInt#35#rhx][fix##36#dNum_a166:=fix#GHC.Num.#36#fNumInt#35#rhy][gooberding#a15N:=Test0.x#r12i][lq_tmp_x332:=fix#GHC.Classes.#36#fOrdInt#35#rhx][lq_tmp_x333:=fix#GHC.Num.#36#fNumInt#35#rhy][lq_tmp_x334:=Test0.x#r12i][lq_tmp_x328:=VV#F1][VV#343:=VV#F1][VV#F:=VV#F1]]}
+  rhs {VV#F1 : GHC.Types.Bool | [$k_288[VV#287:=VV#F1][VV#343:=VV#F1][VV#F:=VV#F1]]}
+  id 1 tag [3]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       50;
+       3;
+       19;
+       35;
+       51;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       23;
+       55;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       44;
+       13;
+       29;
+       45;
+       14;
+       30;
+       46;
+       15;
+       31;
+       47]
+  lhs {VV#F2 : int | [$k_273[VV#272:=VV#F2][lq_tmp_x341:=VV#F2][VV#346:=VV#F2][VV#F:=VV#F2];
+                      (VV#F2 = Test0.x#r12i)]}
+  rhs {VV#F2 : int | [$k_235[fix##36#dOrd_a165:=fix#GHC.Classes.#36#fOrdInt#35#rhx][fix##36#dNum_a166:=fix#GHC.Num.#36#fNumInt#35#rhy][VV#234:=VV#F2][lq_tmp_x332:=fix#GHC.Classes.#36#fOrdInt#35#rhx][lq_tmp_x333:=fix#GHC.Num.#36#fNumInt#35#rhy][lq_tmp_x336:=VV#F2][VV#346:=VV#F2][VV#F:=VV#F2]]}
+  id 2 tag [3]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       48;
+       1;
+       17;
+       33;
+       49;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       57;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       44;
+       13;
+       29;
+       45;
+       14;
+       30;
+       46;
+       15;
+       31;
+       47]
+  lhs {VV#F3 : GHC.Types.Bool | [(~ ((? Prop([VV#F3]))));
+                                 (VV#F3 = GHC.Types.False#68)]}
+  rhs {VV#F3 : GHC.Types.Bool | [$k_288[VV#287:=VV#F3][VV#349:=VV#F3][VV#F:=VV#F3]]}
+  id 3 tag [3]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       59;
+       12;
+       28;
+       44;
+       13;
+       29;
+       45;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV#F4 : int | [(VV#F4 = (0  :  int)); (VV#F4 = lq_anf__d16A)]}
+  rhs {VV#F4 : int | [$k_305[VV#304:=VV#F4][lq_tmp_x301:=fix#GHC.Classes.#36#fOrdInt#35#rhx][lq_tmp_x302:=Test0.x#r12i][lq_tmp_x307:=VV#F4][VV#352:=VV#F4][VV#F:=VV#F4]]}
+  id 4 tag [3]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       44;
+       13;
+       29;
+       45;
+       61;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV#F5 : int | [$k_273[VV#272:=VV#F5][lq_tmp_x310:=VV#F5][VV#355:=VV#F5][VV#F:=VV#F5];
+                      (VV#F5 = Test0.x#r12i)]}
+  rhs {VV#F5 : int | [$k_305[VV#304:=VV#F5][lq_tmp_x301:=fix#GHC.Classes.#36#fOrdInt#35#rhx][lq_tmp_x307:=VV#F5][VV#355:=VV#F5][VV#F:=VV#F5]]}
+  id 5 tag [3]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       65;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       43;
+       12;
+       28;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV#F6 : int | []}
+  rhs {VV#F6 : int | [$k_273[VV#272:=VV#F6][VV#361:=VV#F6][VV#F:=VV#F6]]}
+  id 6 tag [2]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       39;
+       71;
+       8;
+       24;
+       40;
+       9;
+       25;
+       41;
+       10;
+       26;
+       42;
+       11;
+       27;
+       12;
+       28;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV#F7 : GHC.Types.Bool | [(? Prop([VV#F7]))]}
+  rhs {VV#F7 : GHC.Types.Bool | [$k_239[VV#238:=VV#F7][VV#370:=VV#F7][VV#F:=VV#F7]]}
+  id 7 tag [1]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       39;
+       8;
+       24;
+       40;
+       9;
+       25;
+       41;
+       73;
+       10;
+       26;
+       42;
+       11;
+       27;
+       12;
+       28;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV#F8 : GHC.Types.Bool | [((? Prop([VV#F8])) <=> (gooberding#a15N >= lq_anf__d16x));
+                                 (VV#F8 = lq_anf__d16y)]}
+  rhs {VV#F8 : GHC.Types.Bool | [(? Prop([VV#F8]))]}
+  id 8 tag [1]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       39;
+       8;
+       24;
+       40;
+       9;
+       25;
+       41;
+       10;
+       26;
+       11;
+       27;
+       75;
+       12;
+       28;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV#F9 : a_a164 | [(VV#F9 = lq_anf__d16w);
+                         (VV#F9 = lq_anf__d16x)]}
+  rhs {VV#F9 : a_a164 | [$k_262[lq_tmp_x258:=fix##36#dOrd_a165][lq_tmp_x259:=gooberding#a15N][VV#261:=VV#F9][VV#F:=VV#F9]]}
+  id 9 tag [1]
+
+
+constraint:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       39;
+       8;
+       24;
+       40;
+       9;
+       25;
+       41;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       76;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV#F10 : a_a164 | [$k_235[VV#234:=VV#F10][VV#F:=VV#F10];
+                          (VV#F10 = gooberding#a15N)]}
+  rhs {VV#F10 : a_a164 | [$k_262[lq_tmp_x258:=fix##36#dOrd_a165][VV#261:=VV#F10][VV#F:=VV#F10]]}
+  id 10 tag [1]
+
+
+wf:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       44;
+       13;
+       29;
+       45;
+       14;
+       30;
+       15;
+       31]
+  reft {VV#304 : int | [$k_305]}
+  
+
+
+wf:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       44;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  reft {VV#287 : GHC.Types.Bool | [$k_288]}
+  
+
+
+wf:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  reft {VV#272 : int | [$k_273]}
+  
+
+
+wf:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  reft {VV#234 : a_a164 | [$k_235]}
+  
+
+
+wf:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       39;
+       8;
+       24;
+       40;
+       9;
+       25;
+       41;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  reft {VV#261 : a_a164 | [$k_262]}
+  
+
+
+wf:
+  env [0;
+       16;
+       32;
+       1;
+       17;
+       33;
+       2;
+       18;
+       34;
+       3;
+       19;
+       35;
+       4;
+       20;
+       36;
+       5;
+       21;
+       37;
+       6;
+       22;
+       38;
+       7;
+       23;
+       39;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       28;
+       13;
+       29;
+       14;
+       30;
+       15;
+       31]
+  reft {VV#238 : GHC.Types.Bool | [$k_239]}
+  
diff --git a/tests/pos/test000.hs.fq b/tests/pos/test000.hs.fq
new file mode 100644
--- /dev/null
+++ b/tests/pos/test000.hs.fq
@@ -0,0 +1,489 @@
+qualif Fst(v : @(1), y : @(0)): (v = fst([y])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.spec" (line 29, column 8)
+qualif Snd(v : @(1), y : @(0)): (v = snd([y])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.spec" (line 30, column 8)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): ((? Prop([v])) <=> (len([xs]) > 0)) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 13, column 8)
+qualif IsEmp(v : GHC.Types.Bool, xs : [@(0)]): ((? Prop([v])) <=> (len([xs]) = 0)) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 14, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) = 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 16, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) >= 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 17, column 8)
+qualif ListZ(v : [@(0)]): (len([v]) > 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 18, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) = len([xs])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 20, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) >= len([xs])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 21, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) > len([xs])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 22, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) <= len([xs])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 23, column 8)
+qualif CmpLen(v : [@(1)], xs : [@(0)]): (len([v]) < len([xs])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 24, column 8)
+qualif EqLen(v : int, xs : [@(0)]): (v = len([xs])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 26, column 8)
+qualif LenEq(v : [@(0)], x : int): (x = len([v])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 27, column 8)
+qualif LenDiff(v : [@(0)], x : int): (len([v]) = (x + 1)) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 28, column 8)
+qualif LenDiff(v : [@(0)], x : int): (len([v]) = (x - 1)) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 29, column 8)
+qualif LenAcc(v : int, xs : [@(0)], n : int): (v = (len([xs]) + n)) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/GHC/Base.hquals" (line 30, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 3, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 4, column 8)
+qualif Bot(v : @(0)): (0 = 1) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 5, column 8)
+qualif Bot(v : bool): (0 = 1) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 6, column 8)
+qualif Bot(v : int): (0 = 1) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 7, column 8)
+qualif CmpZ(v : @(0)): (v < 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 9, column 8)
+qualif CmpZ(v : @(0)): (v <= 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 10, column 8)
+qualif CmpZ(v : @(0)): (v > 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 11, column 8)
+qualif CmpZ(v : @(0)): (v >= 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 12, column 8)
+qualif CmpZ(v : @(0)): (v = 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 13, column 8)
+qualif CmpZ(v : @(0)): (v != 0) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 14, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v < x) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 16, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v <= x) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 17, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v > x) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 18, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v >= x) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 19, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v = x) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 20, column 8)
+qualif Cmp(v : @(0), x : @(0)): (v != x) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 21, column 8)
+qualif One(v : int): (v = 1) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 28, column 8)
+qualif True(v : bool): (? v) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 29, column 8)
+qualif False(v : bool): (~ ((? v))) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 30, column 8)
+qualif True1(v : GHC.Types.Bool): (? Prop([v])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 31, column 8)
+qualif False1(v : GHC.Types.Bool): (~ ((? Prop([v])))) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 32, column 8)
+qualif Papp(v : @(0), p : (Pred  @(0))): (? papp1([p;
+                                                   v])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 35, column 8)
+qualif Papp2(v : @(1), x : @(0), p : (Pred  @(1)  @(0))): (? papp2([p;
+                                                                    v;
+                                                                    x])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 38, column 8)
+qualif Papp3(v : @(2), x : @(0), y : @(1), p : (Pred  @(2)  @(0)  @(1))): (? papp3([p;
+                                                                                    v;
+                                                                                    x;
+                                                                                    y])) // "/Users/benjamin/UCSDrepos/liquidhaskell/include/Prelude.hquals" (line 41, column 8)
+
+
+
+
+constant runFun : (func(2, [(Arrow  @(0)  @(1)); @(0); @(1)]))
+constant addrLen : (func(0, [int; int]))
+constant xsListSelector : (func(1, [[@(0)]; [@(0)]]))
+constant x_Tuple21 : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant x_Tuple65 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(4)]))
+constant GHC.Types.False$35$68 : (GHC.Types.Bool)
+constant x_Tuple55 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(4)]))
+constant x_Tuple33 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(2)]))
+constant x_Tuple77 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(6)]))
+constant papp3 : (func(6, [(Pred  @(0)  @(1)  @(2));
+                           @(3);
+                           @(4);
+                           @(5);
+                           bool]))
+constant x_Tuple63 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(2)]))
+constant x_Tuple41 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(0)]))
+constant papp4 : (func(8, [(Pred  @(0)  @(1)  @(2)  @(6));
+                           @(3);
+                           @(4);
+                           @(5);
+                           @(7);
+                           bool]))
+constant x_Tuple64 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(3)]))
+constant autolen : (func(1, [@(0); int]))
+constant x_Tuple52 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(1)]))
+constant null : (func(1, [[@(0)]; bool]))
+constant papp2 : (func(4, [(Pred  @(0)  @(1)); @(2); @(3); bool]))
+constant x_Tuple62 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(1)]))
+constant fromJust : (func(1, [(GHC.Base.Maybe  @(0)); @(0)]))
+constant x_Tuple53 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(2)]))
+constant x_Tuple71 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(0)]))
+constant x_Tuple74 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(3)]))
+constant len : (func(2, [(@(0)  @(1)); int]))
+constant x_Tuple22 : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant x_Tuple66 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(5)]))
+constant x_Tuple44 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(3)]))
+constant xListSelector : (func(1, [[@(0)]; @(0)]))
+constant strLen : (func(0, [int; int]))
+constant x_Tuple72 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(1)]))
+constant isJust : (func(1, [(GHC.Base.Maybe  @(0)); bool]))
+constant Prop : (func(0, [GHC.Types.Bool; bool]))
+constant x_Tuple31 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(0)]))
+constant x_Tuple75 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(4)]))
+constant papp1 : (func(1, [(Pred  @(0)); @(0); bool]))
+constant x_Tuple61 : (func(6, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5));
+                               @(0)]))
+constant x_Tuple43 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(2)]))
+constant x_Tuple51 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(0)]))
+constant GHC.Types.I$35$$35$6c : (func(0, [int; int]))
+constant x_Tuple73 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(2)]))
+constant x_Tuple54 : (func(5, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4));
+                               @(3)]))
+constant cmp : (func(0, [GHC.Types.Ordering; GHC.Types.Ordering]))
+constant x_Tuple32 : (func(3, [(Tuple  @(0)  @(1)  @(2)); @(1)]))
+constant x_Tuple76 : (func(7, [(Tuple  @(0)  @(1)  @(2)  @(3)  @(4)  @(5)  @(6));
+                               @(5)]))
+constant fst : (func(2, [(Tuple  @(0)  @(1)); @(0)]))
+constant snd : (func(2, [(Tuple  @(0)  @(1)); @(1)]))
+constant x_Tuple42 : (func(4, [(Tuple  @(0)  @(1)  @(2)  @(3));
+                               @(1)]))
+constant GHC.Types.True$35$6u : (GHC.Types.Bool)
+
+
+bind 0 GHC.Types.False$35$68 : {VV$35$170 : GHC.Types.Bool | []}
+bind 1 GHC.Types.True$35$6u : {VV$35$172 : GHC.Types.Bool | []}
+bind 2 GHC.Num.$36$fNumInt$35$rma : {VV$35$178 : (GHC.Num.Num  int) | []}
+bind 3 GHC.Classes.$36$fOrdInt$35$rni : {VV$35$179 : (GHC.Classes.Ord  int) | []}
+bind 4 GHC.Types.EQ$35$6U : {VV$35$180 : GHC.Types.Ordering | [(VV$35$180 = GHC.Types.EQ$35$6U)]}
+bind 5 GHC.Types.LT$35$6S : {VV$35$181 : GHC.Types.Ordering | [(VV$35$181 = GHC.Types.LT$35$6S)]}
+bind 6 GHC.Types.GT$35$6W : {VV$35$182 : GHC.Types.Ordering | [(VV$35$182 = GHC.Types.GT$35$6W)]}
+bind 7 GHC.Types.True$35$6u : {v_4 : GHC.Types.Bool | [(? Prop([v_4]))]}
+bind 8 GHC.Types.False$35$68 : {v_5 : GHC.Types.Bool | [(~ ((? Prop([v_5]))))]}
+bind 9 GHC.Types.False$35$68 : {v_5 : GHC.Types.Bool | [(~ ((? Prop([v_5]))))]}
+bind 10 GHC.Types.$91$$93$$35$6m : {VV : func(1, [[@(0)]]) | []}
+bind 11 GHC.Types.True$35$6u : {v_4 : GHC.Types.Bool | [(? Prop([v_4]))]}
+bind 12 GHC.Types.GT$35$6W : {VV$35$227 : GHC.Types.Ordering | [(cmp([VV$35$227]) = GHC.Types.GT$35$6W)]}
+bind 13 GHC.Types.LT$35$6S : {VV$35$228 : GHC.Types.Ordering | [(cmp([VV$35$228]) = GHC.Types.LT$35$6S)]}
+bind 14 GHC.Types.EQ$35$6U : {VV$35$229 : GHC.Types.Ordering | [(cmp([VV$35$229]) = GHC.Types.EQ$35$6U)]}
+bind 15 GHC.Base.Nothing$35$r1d : {VV : func(1, [(GHC.Base.Maybe  @(0))]) | []}
+bind 16 lq_anf__d12p : {lq_tmp_x_238 : int | [(lq_tmp_x_238 = (0  :  int))]}
+bind 17 lq_anf__d12q : {lq_tmp_x_244 : int | []}
+bind 18 lq_anf__d12r : {lq_tmp_x_250 : int | [(lq_tmp_x_250 = (10  :  int))]}
+bind 19 Test0.toss$35$rYP : {VV$35$234 : GHC.Types.Bool | [$k__235]}
+bind 20 lq_anf__d12s : {lq_tmp_x_275 : GHC.Types.Bool | [(lq_tmp_x_275 = Test0.toss$35$rYP)]}
+bind 21 lq_anf__d12s : {lq_tmp_x_277 : GHC.Types.Bool | [(lq_tmp_x_277 = Test0.toss$35$rYP)]}
+bind 22 lq_anf__d12s : {lq_tmp_x_277 : GHC.Types.Bool | [(lq_tmp_x_277 = Test0.toss$35$rYP);
+                                                         (~ ((? Prop([lq_tmp_x_277]))));
+                                                         (~ ((? Prop([lq_tmp_x_277]))));
+                                                         (~ ((? Prop([lq_tmp_x_277]))))]}
+bind 23 lq_anf__d12s : {lq_tmp_x_283 : GHC.Types.Bool | [(lq_tmp_x_283 = Test0.toss$35$rYP)]}
+bind 24 lq_anf__d12s : {lq_tmp_x_283 : GHC.Types.Bool | [(lq_tmp_x_283 = Test0.toss$35$rYP);
+                                                         (? Prop([lq_tmp_x_283]));
+                                                         (? Prop([lq_tmp_x_283]));
+                                                         (? Prop([lq_tmp_x_283]))]}
+bind 25 lq_anf__d12t : {lq_tmp_x_288 : GHC.Types.Bool | [(lq_tmp_x_288 = lq_anf__d12s)]}
+bind 26 lq_anf__d12t : {lq_tmp_x_290 : GHC.Types.Bool | [(lq_tmp_x_290 = lq_anf__d12s)]}
+bind 27 lq_anf__d12t : {lq_tmp_x_290 : GHC.Types.Bool | [(lq_tmp_x_290 = lq_anf__d12s);
+                                                         (~ ((? Prop([lq_tmp_x_290]))));
+                                                         (~ ((? Prop([lq_tmp_x_290]))));
+                                                         (~ ((? Prop([lq_tmp_x_290]))))]}
+bind 28 lq_anf__d12t : {lq_tmp_x_296 : GHC.Types.Bool | [(lq_tmp_x_296 = lq_anf__d12s)]}
+bind 29 lq_anf__d12t : {lq_tmp_x_296 : GHC.Types.Bool | [(lq_tmp_x_296 = lq_anf__d12s);
+                                                         (? Prop([lq_tmp_x_296]));
+                                                         (? Prop([lq_tmp_x_296]));
+                                                         (? Prop([lq_tmp_x_296]))]}
+bind 30 Test0.prop_abs$35$r10h : {VV$35$272 : GHC.Types.Bool | [$k__273]}
+bind 31 x$35$a11A : {VV$35$307 : int | [$k__308]}
+bind 32 lq_anf__d12u : {lq_tmp_x_315 : int | [(lq_tmp_x_315 = (0  :  int))]}
+bind 33 lq_anf__d12v : {lq_tmp_x_321 : GHC.Types.Bool | [((? Prop([lq_tmp_x_321])) <=> (x$35$a11A > lq_anf__d12u))]}
+bind 34 lq_anf__d12w : {lq_tmp_x_345 : int | [$k__343[lq_tmp_x_340:=lq_anf__d12v][VV$35$342:=lq_tmp_x_345][lq_tmp_x_341:=x$35$a11A]]}
+bind 35 lq_anf__d12x : {lq_tmp_x_350 : int | [(lq_tmp_x_350 = (1  :  int))]}
+bind 36 lq_anf__d12y : {lq_tmp_x_373 : int | [(lq_tmp_x_373 = (12  :  int))]}
+bind 37 Test0.goo$35$r10j : {VV$35$369 : int | [$k__370]}
+bind 38 zzz$35$a11B : {VV$35$384 : int | [$k__385]}
+bind 39 lq_anf__d12z : {lq_tmp_x_392 : int | [(lq_tmp_x_392 = (1  :  int))]}
+bind 40 lq_anf__d12A : {lq_tmp_x_415 : int | [(lq_tmp_x_415 = (29  :  int))]}
+bind 41 Test0.zoo$35$r10l : {VV$35$411 : int | [$k__412]}
+bind 42 VV$35$426 : {VV$35$426 : int | [$k__389[lq_tmp_x_423:=lq_anf__d12A][lq_tmp_x_421:=VV$35$426][zzz$35$a11B:=lq_anf__d12A][VV$35$388:=VV$35$426]]}
+bind 43 VV$35$426 : {VV$35$426 : int | [$k__389[lq_tmp_x_423:=lq_anf__d12A][lq_tmp_x_421:=VV$35$426][zzz$35$a11B:=lq_anf__d12A][VV$35$388:=VV$35$426]]}
+bind 44 VV$35$429 : {VV$35$429 : int | [(VV$35$429 = lq_anf__d12A)]}
+bind 45 VV$35$429 : {VV$35$429 : int | [(VV$35$429 = lq_anf__d12A)]}
+bind 46 VV$35$432 : {VV$35$432 : int | [(VV$35$432 = 29)]}
+bind 47 VV$35$432 : {VV$35$432 : int | [(VV$35$432 = 29)]}
+bind 48 VV$35$435 : {VV$35$435 : int | [(VV$35$435 = (zzz$35$a11B + lq_anf__d12z))]}
+bind 49 VV$35$435 : {VV$35$435 : int | [(VV$35$435 = (zzz$35$a11B + lq_anf__d12z))]}
+bind 50 VV$35$438 : {VV$35$438 : int | [(VV$35$438 = lq_anf__d12z)]}
+bind 51 VV$35$438 : {VV$35$438 : int | [(VV$35$438 = lq_anf__d12z)]}
+bind 52 VV$35$441 : {VV$35$441 : int | [(VV$35$441 = zzz$35$a11B)]}
+bind 53 VV$35$441 : {VV$35$441 : int | [(VV$35$441 = zzz$35$a11B)]}
+bind 54 VV$35$444 : {VV$35$444 : int | [(VV$35$444 = 1)]}
+bind 55 VV$35$444 : {VV$35$444 : int | [(VV$35$444 = 1)]}
+bind 56 VV$35$447 : {VV$35$447 : int | [$k__312[VV$35$311:=VV$35$447][lq_tmp_x_381:=lq_anf__d12y][x$35$a11A:=lq_anf__d12y][lq_tmp_x_379:=VV$35$447]]}
+bind 57 VV$35$447 : {VV$35$447 : int | [$k__312[VV$35$311:=VV$35$447][lq_tmp_x_381:=lq_anf__d12y][x$35$a11A:=lq_anf__d12y][lq_tmp_x_379:=VV$35$447]]}
+bind 58 VV$35$450 : {VV$35$450 : int | [(VV$35$450 = lq_anf__d12y)]}
+bind 59 VV$35$450 : {VV$35$450 : int | [(VV$35$450 = lq_anf__d12y)]}
+bind 60 VV$35$453 : {VV$35$453 : int | [(VV$35$453 = 12)]}
+bind 61 VV$35$453 : {VV$35$453 : int | [(VV$35$453 = 12)]}
+bind 62 VV$35$456 : {VV$35$456 : int | [(VV$35$456 = (lq_anf__d12w + lq_anf__d12x))]}
+bind 63 VV$35$456 : {VV$35$456 : int | [(VV$35$456 = (lq_anf__d12w + lq_anf__d12x))]}
+bind 64 VV$35$459 : {VV$35$459 : int | [(VV$35$459 = lq_anf__d12x)]}
+bind 65 VV$35$459 : {VV$35$459 : int | [(VV$35$459 = lq_anf__d12x)]}
+bind 66 VV$35$462 : {VV$35$462 : int | [(VV$35$462 = lq_anf__d12w)]}
+bind 67 VV$35$462 : {VV$35$462 : int | [(VV$35$462 = lq_anf__d12w)]}
+bind 68 VV$35$465 : {VV$35$465 : int | [(VV$35$465 = 1)]}
+bind 69 VV$35$465 : {VV$35$465 : int | [(VV$35$465 = 1)]}
+bind 70 VV$35$468 : {VV$35$468 : int | [(VV$35$468 = x$35$a11A)]}
+bind 71 VV$35$468 : {VV$35$468 : int | [(VV$35$468 = x$35$a11A)]}
+bind 72 VV$35$471 : {VV$35$471 : GHC.Types.Bool | [(VV$35$471 = lq_anf__d12v)]}
+bind 73 VV$35$471 : {VV$35$471 : GHC.Types.Bool | [(VV$35$471 = lq_anf__d12v)]}
+bind 74 VV$35$474 : {VV$35$474 : int | [(VV$35$474 = lq_anf__d12u)]}
+bind 75 VV$35$474 : {VV$35$474 : int | [(VV$35$474 = lq_anf__d12u)]}
+bind 76 VV$35$477 : {VV$35$477 : int | [(VV$35$477 = x$35$a11A)]}
+bind 77 VV$35$477 : {VV$35$477 : int | [(VV$35$477 = x$35$a11A)]}
+bind 78 VV$35$480 : {VV$35$480 : int | [(VV$35$480 = 0)]}
+bind 79 VV$35$480 : {VV$35$480 : int | [(VV$35$480 = 0)]}
+bind 80 VV$35$483 : {VV$35$483 : GHC.Types.Bool | [(? Prop([VV$35$483]))]}
+bind 81 VV$35$483 : {VV$35$483 : GHC.Types.Bool | [(? Prop([VV$35$483]))]}
+bind 82 VV$35$486 : {VV$35$486 : GHC.Types.Bool | [(VV$35$486 = lq_anf__d12t)]}
+bind 83 VV$35$486 : {VV$35$486 : GHC.Types.Bool | [(VV$35$486 = lq_anf__d12t)]}
+bind 84 VV$35$489 : {VV$35$489 : GHC.Types.Bool | [(VV$35$489 = GHC.Types.False$35$68)]}
+bind 85 VV$35$489 : {VV$35$489 : GHC.Types.Bool | [(VV$35$489 = GHC.Types.False$35$68)]}
+bind 86 VV$35$492 : {VV$35$492 : GHC.Types.Bool | [(VV$35$492 = GHC.Types.False$35$68)]}
+bind 87 VV$35$492 : {VV$35$492 : GHC.Types.Bool | [(VV$35$492 = GHC.Types.False$35$68)]}
+bind 88 VV$35$495 : {VV$35$495 : GHC.Types.Bool | [((? Prop([VV$35$495])) <=> (lq_anf__d12q > lq_anf__d12r))]}
+bind 89 VV$35$495 : {VV$35$495 : GHC.Types.Bool | [((? Prop([VV$35$495])) <=> (lq_anf__d12q > lq_anf__d12r))]}
+bind 90 VV$35$498 : {VV$35$498 : int | [(VV$35$498 = lq_anf__d12r)]}
+bind 91 VV$35$498 : {VV$35$498 : int | [(VV$35$498 = lq_anf__d12r)]}
+bind 92 VV$35$501 : {VV$35$501 : int | [(VV$35$501 = lq_anf__d12q)]}
+bind 93 VV$35$501 : {VV$35$501 : int | [(VV$35$501 = lq_anf__d12q)]}
+bind 94 VV$35$504 : {VV$35$504 : int | [(VV$35$504 = 10)]}
+bind 95 VV$35$504 : {VV$35$504 : int | [(VV$35$504 = 10)]}
+bind 96 VV$35$507 : {VV$35$507 : int | [(VV$35$507 = lq_anf__d12p)]}
+bind 97 VV$35$507 : {VV$35$507 : int | [(VV$35$507 = lq_anf__d12p)]}
+bind 98 VV$35$510 : {VV$35$510 : int | [(VV$35$510 = 0)]}
+bind 99 VV$35$510 : {VV$35$510 : int | [(VV$35$510 = 0)]}
+bind 100 VV$35$411 : {VV$35$411 : int | [$k__412]}
+bind 101 VV$35$384 : {VV$35$384 : int | [$k__385]}
+bind 102 VV$35$388 : {VV$35$388 : int | [$k__389]}
+bind 103 VV$35$369 : {VV$35$369 : int | [$k__370]}
+bind 104 VV$35$307 : {VV$35$307 : int | [$k__308]}
+bind 105 VV$35$342 : {VV$35$342 : int | [$k__343]}
+bind 106 VV$35$328 : {VV$35$328 : int | [$k__329]}
+bind 107 VV$35$311 : {VV$35$311 : int | [$k__312]}
+bind 108 VV$35$272 : {VV$35$272 : GHC.Types.Bool | [$k__273]}
+bind 109 VV$35$263 : {VV$35$263 : int | [$k__264]}
+bind 110 VV$35$234 : {VV$35$234 : GHC.Types.Bool | [$k__235]}
+
+
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       19;
+       4;
+       36;
+       5;
+       6;
+       7;
+       8;
+       9;
+       10;
+       58;
+       11;
+       12;
+       13;
+       14;
+       30;
+       15]
+  lhs {VV$35$F5 : int | [(VV$35$F5 = lq_anf__d12y)]}
+  rhs {VV$35$F5 : int | [$k__308[VV$35$307:=VV$35$F5][VV$35$F:=VV$35$F5][VV$35$450:=VV$35$F5][lq_tmp_x_378:=VV$35$F5]]}
+  id 5 tag [4]
+  // META constraint id 5 : tests/pos/test000.hs:16:11-12
+
+
+constraint:
+  env [0;
+       32;
+       1;
+       33;
+       2;
+       3;
+       19;
+       4;
+       5;
+       6;
+       7;
+       8;
+       72;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       30;
+       15;
+       31]
+  lhs {VV$35$F8 : GHC.Types.Bool | [(VV$35$F8 = lq_anf__d12v)]}
+  rhs {VV$35$F8 : GHC.Types.Bool | [(? Prop([VV$35$F8]))]}
+  id 8 tag [3]
+  // META constraint id 8 : tests/pos/test000.hs:14:23-29
+
+
+constraint:
+  env [0;
+       80;
+       1;
+       2;
+       3;
+       19;
+       4;
+       20;
+       5;
+       6;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       11;
+       12;
+       28;
+       13;
+       29;
+       14;
+       15]
+  lhs {VV$35$F11 : GHC.Types.Bool | [(? Prop([VV$35$F11]))]}
+  rhs {VV$35$F11 : GHC.Types.Bool | [$k__273[VV$35$272:=VV$35$F11][VV$35$F:=VV$35$F11][VV$35$483:=VV$35$F11]]}
+  id 11 tag [6]
+  // META constraint id 11 : tests/pos/test000.hs:10:33-50
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       82;
+       3;
+       19;
+       4;
+       20;
+       5;
+       6;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       11;
+       12;
+       28;
+       13;
+       29;
+       14;
+       15]
+  lhs {VV$35$F12 : GHC.Types.Bool | [(VV$35$F12 = lq_anf__d12t)]}
+  rhs {VV$35$F12 : GHC.Types.Bool | [(? Prop([VV$35$F12]))]}
+  id 12 tag [6]
+  // META constraint id 12 : tests/pos/test000.hs:10:47-50
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       19;
+       4;
+       20;
+       84;
+       5;
+       6;
+       7;
+       23;
+       8;
+       24;
+       9;
+       25;
+       10;
+       26;
+       11;
+       27;
+       12;
+       13;
+       14;
+       15]
+  lhs {VV$35$F13 : GHC.Types.Bool | [(VV$35$F13 = GHC.Types.False$35$68)]}
+  rhs {VV$35$F13 : GHC.Types.Bool | [$k__273[VV$35$272:=VV$35$F13][VV$35$489:=VV$35$F13][VV$35$F:=VV$35$F13]]}
+  id 13 tag [6]
+  // META constraint id 13 : tests/pos/test000.hs:10:57-61
+
+
+constraint:
+  env [0;
+       1;
+       2;
+       3;
+       19;
+       4;
+       20;
+       5;
+       21;
+       6;
+       22;
+       86;
+       7;
+       8;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15]
+  lhs {VV$35$F14 : GHC.Types.Bool | [(VV$35$F14 = GHC.Types.False$35$68)]}
+  rhs {VV$35$F14 : GHC.Types.Bool | [$k__273[VV$35$272:=VV$35$F14][VV$35$F:=VV$35$F14][VV$35$492:=VV$35$F14]]}
+  id 14 tag [6]
+  // META constraint id 14 : tests/pos/test000.hs:11:19-23
+
+
+constraint:
+  env [0;
+       16;
+       1;
+       17;
+       2;
+       18;
+       3;
+       4;
+       5;
+       6;
+       7;
+       8;
+       88;
+       9;
+       10;
+       11;
+       12;
+       13;
+       14;
+       15]
+  lhs {VV$35$F15 : GHC.Types.Bool | [((? Prop([VV$35$F15])) <=> (lq_anf__d12q > lq_anf__d12r))]}
+  rhs {VV$35$F15 : GHC.Types.Bool | [$k__235[VV$35$F:=VV$35$F15][VV$35$495:=VV$35$F15][VV$35$234:=VV$35$F15]]}
+  id 15 tag [5]
+  // META constraint id 15 : tests/pos/test000.hs:6:1-22
+
+
+
+
+wf:
+  env [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15]
+  reft {VV$35$234 : GHC.Types.Bool | [$k__235]}
+  // META wf : <no location info>
+
+
+wf:
+  env [0; 1; 2; 3; 19; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 30; 15]
+  reft {VV$35$307 : int | [$k__308]}
+  // META wf : <no location info>
+
+
+wf:
+  env [0; 1; 2; 3; 19; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15]
+  reft {VV$35$272 : GHC.Types.Bool | [$k__273]}
+  // META wf : tests/pos/test000.hs:(9,1)-(11,23)
+
+
+
+
+
+
+
diff --git a/tests/proof/list00.fq b/tests/proof/list00.fq
new file mode 100644
--- /dev/null
+++ b/tests/proof/list00.fq
@@ -0,0 +1,16 @@
+fixpoint "--rewrite"
+
+constant len: (func(1, [(Main.List  @(0)); int]))
+constant Cons: (func(2, [@(0); (Main.List  @(0)); (Main.List @(0))]))
+constant Nil: (Main.List @(0))
+
+match len Nil = 0
+match len Cons x xs = (1 + len xs)
+
+constraint:
+  env []
+  lhs {v : int | true }
+  rhs {v : int | len(Cons(1, Cons(2, Cons(3, Nil)))) = 3}
+  id 1 tag []
+
+expand [1 : True]
diff --git a/tests/proof/list01.fq b/tests/proof/list01.fq
new file mode 100644
--- /dev/null
+++ b/tests/proof/list01.fq
@@ -0,0 +1,19 @@
+fixpoint "--rewrite"
+
+data Vec 1 = [
+  | VNil  { }
+  | VCons { head : @(0), tail : Vec }
+]
+
+constant len: (func(1, [(Vec @(0)); int]))
+
+match len VNil       = 0
+match len VCons x xs = (1 + len xs)
+
+constraint:
+  env []
+  lhs {v : int | true }
+  rhs {v : int | len (VCons 1 (VCons 2 (VCons 3 VNil))) = 3}
+  id 1 tag []
+
+expand [1 : True]
diff --git a/tests/proof/list02.fq b/tests/proof/list02.fq
new file mode 100644
--- /dev/null
+++ b/tests/proof/list02.fq
@@ -0,0 +1,29 @@
+fixpoint "--rewrite"
+
+data Blob 0 = [ 
+  | VBlob { vgoo : Int } 
+  ]
+
+data Vec 1 = [
+  | VCons { vhead : @(0) } 
+]
+
+constant len : (func(1, [(Vec @(0)); int]))
+constant hen : (func(1, [Blob; int]))
+constant tt  : (Vec bool)
+constant bob : (Blob)
+constant foo : (func(0, [Blob; Blob]))
+
+match hen VBlob z = 10 
+
+match len VCons x = (hen (foo (VBlob 12)))
+
+bind 0 thing : {v: int | true} 
+
+constraint:
+  env [0]
+  lhs {v : int | len (VCons 1) = 10 }
+  rhs {v : int | len (VCons 1) = 10 }
+  id 1 tag []
+
+expand [1 : True]
diff --git a/tests/smt2/Smt.hs b/tests/smt2/Smt.hs
new file mode 100644
--- /dev/null
+++ b/tests/smt2/Smt.hs
@@ -0,0 +1,28 @@
+-- just fire up ghci, :load Smt.hs and run `go file.smt2`
+
+module Smt where
+
+import qualified Data.Text.Lazy.IO as T
+
+import Language.Fixpoint.Types.Config (SMTSolver (..))
+import Language.Fixpoint.Parse
+import Language.Fixpoint.SmtLib2
+import System.Environment
+
+main    = do f:_ <- getArgs
+             _   <- go f
+             return ()
+
+runFile f
+  = readFile f >>= runString
+
+runString str
+  = runCommands $ rr str
+
+runCommands cmds 
+  = do me   <- makeContext Z3
+       mapM_ (T.putStrLn . smt2) cmds
+       zs   <- mapM (command me) cmds
+       return zs
+
+
diff --git a/tests/test.hs b/tests/test.hs
--- a/tests/test.hs
+++ b/tests/test.hs
@@ -74,6 +74,7 @@
     , testGroup "elim-neg"   <$> dirTests elimCmd   "tests/neg"    ["float.fq"]   (ExitFailure 1)
     , testGroup "elim-crash" <$> dirTests elimCmd   "tests/crash"  []             (ExitFailure 2)
     , testGroup "proof"      <$> dirTests elimCmd   "tests/proof"  []             ExitSuccess
+    , testGroup "todo"       <$> dirTests elimCmd   "tests/todo"   ["LH1090.fq"]  (ExitFailure 2)
    ]
 
 skipNativePos :: [FilePath]
diff --git a/tests/testParser.hs b/tests/testParser.hs
--- a/tests/testParser.hs
+++ b/tests/testParser.hs
@@ -181,7 +181,7 @@
         show (doParse' expr0P "test" "_|_") @?= "POr []" -- pattern for "EBot"
 
     , testCase "ELam" $
-        show (doParse' expr0P "test" "\\ foo : Int -> true") @?= "ELam (\"foo\",FInt) (EVar \"true\")"
+        show (doParse' expr0P "test" "\\ foo : Int -> true") @?= "ELam (\"foo\",FInt) (PAnd [])"
 
     , testCase "Expr" $
         show (doParse' expr0P "test" "(1)") @?= "ECon (I 1)"
diff --git a/tests/todo/LH1090.fq b/tests/todo/LH1090.fq
new file mode 100644
--- /dev/null
+++ b/tests/todo/LH1090.fq
@@ -0,0 +1,17 @@
+// This test works on z3-4.4.1, but is broken in 4.4.2 or newer
+
+data Either 2 = [
+  | right { eRight : @(0) }
+  | left { eLeft : @(1) }
+]
+
+bind 0 escobar : {v:int | true }
+bind 1 junk : {v:Either bool int | v = left escobar}
+bind 2 punk : {v:Either int int | true}
+
+constraint:
+  env [0; 1; 2]
+  lhs {v:int | true }
+  rhs {v:int | punk = left escobar }
+  id 1 tag []
+
diff --git a/tests/todo/adt_pair_cast.fq b/tests/todo/adt_pair_cast.fq
new file mode 100644
--- /dev/null
+++ b/tests/todo/adt_pair_cast.fq
@@ -0,0 +1,15 @@
+
+DELIBERATELY BREAKING PARSE TO APPEASE CIRCLE 
+
+data P 2 = [
+   | P {pfst : @(0), psnd : @(1)}
+   ]
+
+bind 1 pig : {v : int  | true }
+bind 2 dog : {v : bool | true }
+
+constraint:
+  env [1;2]
+  lhs {v : int | psnd (P pig dog) }
+  rhs {v:int | 12 = 4 + 8}
+  id 1 tag []
diff --git a/tests/todo/wl01.fq b/tests/todo/wl01.fq
new file mode 100644
--- /dev/null
+++ b/tests/todo/wl01.fq
@@ -0,0 +1,39 @@
+qualif Nat(v:int) : (0 <= v)
+
+bind 0 x : {v: int | [$k0]}
+bind 1 y : {v: int | [$k0]}
+bind 2 z : {v: int | [$k1]}
+
+constraint:
+  env [ ]
+  lhs {v : int | [v = 10]}
+  rhs {v : int | [$k0]}
+  id 1 tag [0]
+
+constraint:
+  env [ 0 ]
+  lhs {v : int | [v = x + x]}
+  rhs {v : int | [$k0]}
+  id 2 tag [0]
+
+constraint:
+  env [ 0; 1 ]
+  lhs {v : int | [v = x + y ]}
+  rhs {v : int | [$k1]}
+  id 3 tag [0]
+
+
+constraint:
+  env [ 1 ]
+  lhs {v : int | [v =  z]}
+  rhs {v : int | [0 <= v]}
+  id 4 tag [0]
+
+wf:
+  env [ ]
+  reft {v: int | [$k0]}
+
+
+wf:
+  env [ ]
+  reft {v: int | [$k1]}
