diff --git a/_sources/about.rst.txt b/_sources/about.rst.txt new file mode 100644 index 000000000..f55118c9a --- /dev/null +++ b/_sources/about.rst.txt @@ -0,0 +1,59 @@ +About +===== + +This page is both an introspection and self documentation for this documentation stack. + +Prerequisites +------------- + +Before building this documentation, make sure to have ``sphinx`` installed: + +.. code-block:: console + + pip install sphinx + pip install in-place + +To match the visuals used in the community (*e.g.* https://coq.inria.fr/distrib/current/refman/): + +.. code-block:: console + + pip install sphinx-rtd-theme + +On debian based systems, one can use the package manager: + +.. code-block:: console + + apt install sphinx-doc + apt install python3-sphinx-rtd-theme + pip install in-place + +Extensions +---------- + +This documentation can make use of the following plugins: + +.. code-block:: python + + extensions = [ + 'sphinx.ext.intersphinx', + 'sphinx.ext.githubpages' + ] + +Namely, ``intersphinx`` (https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html) can generate links to the documentation of objects in external projects, either explicitly through the external role, or as a fallback resolution for any other cross-reference, and, ``githubpages`` (https://www.sphinx-doc.org/en/master/usage/extensions/githubpages.html#module-sphinx.ext.githubpages) which creates a ``.nojekyll`` file on generated HTML directory to publish the document on GitHub Pages. + +Building +-------- + +``sphinx`` comes with its own helpers to build the documentation but are not meant to be used directly, see :doc:`playground` section for injection points. + +Instead, use the ``doc-sphinx`` target of the source tree's root's ``Makefile`` to build the documentation: + +.. code-block:: python + + make doc-build + +Or, to build and publish the documentation to github pages: + +.. code-block:: python + + make doc-publish diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt new file mode 100644 index 000000000..9d3881d6c --- /dev/null +++ b/_sources/index.rst.txt @@ -0,0 +1,22 @@ +.. Elpi documentation master file, created by + sphinx-quickstart on Thu Jun 16 10:59:15 2022. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Elpi's documentation! +================================ + +.. .. toctree: +.. :maxdepth: 2 +.. :caption: Contents: +.. +.. about +.. playground + +.. toctree:: + :maxdepth: 2 + :caption: API: + + elpi + elpi-option-legacy-parser + diff --git a/_sources/playground.rst.txt b/_sources/playground.rst.txt new file mode 100644 index 000000000..5511f6c65 --- /dev/null +++ b/_sources/playground.rst.txt @@ -0,0 +1,4213 @@ +Playground +========== + +This page is used to test hooks in order to run ``elpi`` on code snippets and inject its output within ``sphinx`` documentation sources. + +Prerequisites +------------- + +Before running the hooks, make sure to have ``elpi`` built locally: + +.. code-block:: console + + eval $(opam env) + make build + +It doesn't hurt to check that ``dune`` runs the locally built ``elpi`` correctly: + +.. code-block:: console + + dune exec elpi -- -h + +Syntax +------ + +Elpi code blocks to be evaluated and which output is to be injected from ``docs/base`` to ``docs/source`` are conventionally denoted in ``reStructuredText`` as ``.. elpi:: FILE``. + +.. literalinclude:: ../../tests/sources/chr.elpi + :linenos: + :language: elpi + +The injection engine: + +* Retrieves all ``.. elpi::`` directives +* Changes them into ``literalinclude`` in the generated source with relevant options +* Runs ``dune exec elpi -- -test FILE`` on the ``FILE`` containing the ``elpi`` snippet, test or example. +* Captures its output (``stdout``) +* Creates a ``code-block:: console`` just after it to inject the captured console output +* Captures its output (``stderr``) +* Creates a ``code-block:: console`` just after it to inject the captured console erros +* In case of an assertion option for the ``elpi`` directive, the output is injected only if matched + +Result should look as follows: + +.. code-block:: console + + Parsing time: 0.000 + + Compilation time: 0.004 + File "/home/jwintz/Development/elpi/tests/sources/chr.elpi", line 7, column 60, character 133: Warning: constant term has no declared type. + File "/home/jwintz/Development/elpi/tests/sources/chr.elpi", line 11, column 8, character 319: Warning: constant len has no declared type. Did you mean std.length ? + File "/home/jwintz/Development/elpi/tests/sources/chr.elpi", line 28, column 28, character 761: Warning: constant compatible has no declared type. + + Typechecking time: 0.154 + compat [term c1 (uvar frozen--501 []), term c0 (uvar frozen--502 [])] |- frozen--494 [ + c1, c0] arr (uvar frozen--495 [c0, c1]) (arr (uvar frozen--496 [c0, c1]) (uvar frozen--497 [])) , [ + term c3 (uvar frozen--499 []), term c2 (uvar frozen--498 [])] |- frozen--494 [ + c2, c3] arr (uvar frozen--498 []) (arr (uvar frozen--499 []) (uvar frozen--500 [])) + NEW [X0 = X1, X2 = X3] arr (X4 c0 c1) (arr (X5 c0 c1) X6) = arr X1 (arr X3 X7) + 1 + compat [term c0 bool] |- frozen--507 [c0] uvar frozen--508 [] , [term c1 (uvar frozen--509 [])] |- frozen--507 [c1] nat + NEW [bool = X8] X9 = nat + 2 + compat [term c0 bool] |- frozen--514 [c0] uvar frozen--515 [] , [term c1 (uvar frozen--515 [])] |- frozen--514 [c1] nat + NEW [bool = X10] X10 = nat + compat [term c0 bool] |- frozen--520 [c0] uvar frozen--521 [] , [term c1 nat] |- frozen--520 [c1] nat + NEW [bool = nat] X11 = nat + + Success: + + Time: 0.001 + + Constraints: + {c0} : term c0 bool ?- term (X12 c0) nat /* suspended on X12 */ {c0 c1} : term c1 X13, term c0 X13 ?- term (X14 c1 c0) (arr X13 (arr X13 X6)) /* suspended on X14 */ + + State: + +Regexp Matching +--------------- + +This ``elpi`` directive should pass validation: + +.. code-block:: console + + .. elpi:: ./a.elpi + :assert: V = s \(.*\) + +**./a.elpi +:** + +.. literalinclude:: ./a.elpi + :linenos: + :language: elpi + +.. raw:: html + +
Injection failure: result did not pass regexp check (V = s \(.*\))
+ +This one should fail validation, only a message stating the regexp matching error will be printed: + +.. code-block:: console + + .. elpi:: ./a.elpi + :assert: /(?!)/ + +**./a.elpi +:** + +.. literalinclude:: ./a.elpi + :linenos: + :language: elpi + +.. raw:: html + +
Injection failure: result did not pass regexp check (/(?!)/)
+ +Test Bed +-------- + +**../../tests/sources/accumulate_twice1.elpi +:** + +.. literalinclude:: ../../tests/sources/accumulate_twice1.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/accumulate_twice1.elpi", line 1, column 0, characters 0-17: + Duplicate mode declaration for doomed (also at File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/accumulated.elpi", line 1, column 0, characters 0-17:) + +**../../tests/sources/accumulate_twice2.elpi +:** + +.. literalinclude:: ../../tests/sources/accumulate_twice2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: + Undeclared globals: + - File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/accumulate_twice2.elpi", line 5, column 3, characters 93-108: other.doomed. + Please add the following text to your program: + type other.doomed int -> prop. + + Compilation time: 0.000 + + Typechecking time: 0.002 + +**../../tests/sources/accumulated.elpi +:** + +.. literalinclude:: ../../tests/sources/accumulated.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + +**../../tests/sources/ackermann.elpi +:** + +.. literalinclude:: ../../tests/sources/ackermann.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ackermann.elpi", line 24, column 39, characters 795-795: + V is linear: name it _V (discard) or V_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/asclause.elpi +:** + +.. literalinclude:: ../../tests/sources/asclause.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 1 + lam c0 \ c0 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/beta.elpi +:** + +.. literalinclude:: ../../tests/sources/beta.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/block.elpi +:** + +.. literalinclude:: ../../tests/sources/block.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/block.elpi", line 1, column 0, characters 0-15: + matching } is missing + +**../../tests/sources/chr.elpi +:** + +.. literalinclude:: ../../tests/sources/chr.elpi + :linenos: + :language: elpi + +.. code-block:: console + + compat [term c1 (uvar frozen--389 []), term c0 (uvar frozen--390 [])] |- + frozen--382 [c1, c0] + arr (uvar frozen--383 [c0, c1]) + (arr (uvar frozen--384 [c0, c1]) (uvar frozen--385 [])) , + [term c3 (uvar frozen--387 []), term c2 (uvar frozen--386 [])] |- frozen--382 + [c2, c3] + arr (uvar frozen--386 []) (arr (uvar frozen--387 []) (uvar frozen--388 [])) + NEW [X0 = X1, X2 = X3] arr (X4 c0 c1) (arr (X5 c0 c1) X6) = arr X1 (arr X3 X7) + 1 + compat [term c0 bool] |- frozen--395 [c0] uvar frozen--396 [] , + [term c1 (uvar frozen--397 [])] |- frozen--395 [c1] nat + NEW [bool = X8] X9 = nat + 2 + compat [term c0 bool] |- frozen--402 [c0] uvar frozen--403 [] , + [term c1 (uvar frozen--403 [])] |- frozen--402 [c1] nat + NEW [bool = X10] X10 = nat + compat [term c0 bool] |- frozen--408 [c0] uvar frozen--409 [] , [term c1 nat] + |- frozen--408 [c1] nat + NEW [bool = nat] X11 = nat + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + {c0} : term c0 bool ?- term (X12 c0) nat /* suspended on X12 */ + {c0 c1} : term c1 X13, term c0 X13 ?- term (X14 c1 c0) (arr X13 (arr X13 X6)) /* suspended on X14 */ + + State: + + +**../../tests/sources/chrGCD.elpi +:** + +.. literalinclude:: ../../tests/sources/chrGCD.elpi + :linenos: + :language: elpi + +.. code-block:: console + + group 1 solved + group 2 solved + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/chrLEQ.elpi +:** + +.. literalinclude:: ../../tests/sources/chrLEQ.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 0.001 + + Constraints: + ltn X0 X1 /* suspended on X0, X1 */ leq X0 X1 /* suspended on X0, X1 */ + leq X2 X1 /* suspended on X2, X1 */ ltn X0 X2 /* suspended on X0, X2 */ + leq X0 X2 /* suspended on X0, X2 */ + + State: + + +**../../tests/sources/chr_nokey.elpi +:** + +.. literalinclude:: ../../tests/sources/chr_nokey.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + test 1 /* suspended on X0 */ + + State: + + +**../../tests/sources/chr_nokey2.elpi +:** + +.. literalinclude:: ../../tests/sources/chr_nokey2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + bar true /* suspended on */ foo /* suspended on */ + + State: + + +**../../tests/sources/chr_not_clique.elpi +:** + +.. literalinclude:: ../../tests/sources/chr_not_clique.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/chr_not_clique.elpi", line 1, column 14, characters 14-24: + CHR rule File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/chr_not_clique.elpi", line 1, column 14, characters 14-24:: matches b which is not a constraint on which it is applied. Check the list of predicates after the "constraint" keyword. + +**../../tests/sources/chr_sem.elpi +:** + +.. literalinclude:: ../../tests/sources/chr_sem.elpi + :linenos: + :language: elpi + +.. code-block:: console + + c + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + c /* suspended on X0 */ d /* suspended on X0 */ a /* suspended on X0 */ + + State: + + +**../../tests/sources/conj2.elpi +:** + +.. literalinclude:: ../../tests/sources/conj2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/ctx_loading.elpi +:** + +.. literalinclude:: ../../tests/sources/ctx_loading.elpi + :linenos: + :language: elpi + +.. code-block:: console + + [a, b, c] + [a, b, c] + [a, b, c] + + +.. code-block:: console + + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 17, column 3, characters 517-533: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 17, column 3, characters 517-533: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 17, column 3, characters 517-533: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 17, column 3, characters 517-533: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 16, column 3, characters 486-502: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/cut.elpi +:** + +.. literalinclude:: ../../tests/sources/cut.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/cut2.elpi +:** + +.. literalinclude:: ../../tests/sources/cut2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/cut3.elpi +:** + +.. literalinclude:: ../../tests/sources/cut3.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/cut4.elpi +:** + +.. literalinclude:: ../../tests/sources/cut4.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/cut5.elpi +:** + +.. literalinclude:: ../../tests/sources/cut5.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/cut5.elpi", line 17, column 11, characters 255-255: + Y is linear: name it _Y (discard) or Y_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/cut6.elpi +:** + +.. literalinclude:: ../../tests/sources/cut6.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/deep_indexing.elpi +:** + +.. literalinclude:: ../../tests/sources/deep_indexing.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/discard.elpi +:** + +.. literalinclude:: ../../tests/sources/discard.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/elpi_only_llam.elpi +:** + +.. literalinclude:: ../../tests/sources/elpi_only_llam.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + Fatal error: + Unification problem outside the pattern fragment. ((Data.Term.App (f, (Data.Term.Const x), [])) == (Data.Term.AppUVar ( + { Data.Term.contents = please extend this printer; uid_private = 2 }, 0, + [(Data.Term.UVar ( + { Data.Term.contents = please extend this printer; uid_private = 1 }, + 0, 0)) + ] + ))) Pass -delay-problems-outside-pattern-fragment (elpi command line utility) or set delay_outside_fragment to true (Elpi_API) in order to delay (deprecated, for Teyjus compatibility). + +**../../tests/sources/end_comment.elpi +:** + +.. literalinclude:: ../../tests/sources/end_comment.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/eta.elpi +:** + +.. literalinclude:: ../../tests/sources/eta.elpi + :linenos: + :language: elpi + +.. code-block:: console + + c2 \ c2 + c2 \ c2 + c1 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/eta_as.elpi +:** + +.. literalinclude:: ../../tests/sources/eta_as.elpi + :linenos: + :language: elpi + +.. code-block:: console + + --------- uvar_1 + --------- uvar_2 + X0 [c0] + --------- uvar_3 + --------- uvar_3 bis + X1 + --------- uvar_4 + --------- uvar_4 bis + --------- uvar_4 ter + --------- uvar_4 quater + --------- uvar_5 + --------- uvar_6 + c0 \ X2 c0 + ---------- as_1 + ---------- as_1 bis + ---------- as_1 ter + X3 + ---------- as_2 + c0 \ X4 c0 + ---------- as_3 + ---------- unif_1 + ---------- unif_1 bis + ---------- unif_1 ter + ---------- unif_2 + ---------- unif_2 bis + ---------- unif_2 ter + ---------- unif_zero + ---------- var 1 + ---------- var 2 + ---------- var 3 + + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 26, column 8, characters 781-781: + X is linear: name it _X (discard) or X_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 36, column 12, characters 1112-1114: + X is linear: name it _X (discard) or X_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 37, column 15, characters 1132-1136: + X is linear: name it _X (discard) or X_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 45, column 24, characters 1276-1279: + X is linear: name it _X (discard) or X_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 47, column 20, characters 1333-1334: + X0 is linear: name it _X0 (discard) or X0_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 49, column 18, characters 1388-1394: + X01 is linear: name it _X01 (discard) or X01_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 51, column 10, characters 1435-1436: + X1 is linear: name it _X1 (discard) or X1_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 53, column 19, characters 1489-1490: + X2 is linear: name it _X2 (discard) or X2_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 55, column 15, characters 1541-1544: + X3 is linear: name it _X3 (discard) or X3_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 57, column 22, characters 1604-1609: + X4 is linear: name it _X4 (discard) or X4_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 59, column 20, characters 1661-1666: + X5 is linear: name it _X5 (discard) or X5_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 75, column 18, characters 2253-2254: + X0 is linear: name it _X0 (discard) or X0_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 79, column 12, characters 2316-2316: + X is linear: name it _X (discard) or X_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 81, column 16, characters 2369-2372: + X1 is linear: name it _X1 (discard) or X1_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 83, column 19, characters 2429-2434: + X2 is linear: name it _X2 (discard) or X2_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 85, column 12, characters 2480-2481: + X3 is linear: name it _X3 (discard) or X3_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 87, column 16, characters 2534-2537: + X4 is linear: name it _X4 (discard) or X4_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 89, column 19, characters 2594-2599: + X5 is linear: name it _X5 (discard) or X5_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 0.000 + + Constraints: + false /* suspended on X5 */ + + State: + + +**../../tests/sources/even-odd.elpi +:** + +.. literalinclude:: ../../tests/sources/even-odd.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/even-odd.elpi", line 19, column 42, characters 437-437: + Z is linear: name it _Z (discard) or Z_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 0.000 + + Constraints: + odd X0 /* suspended on X0 */ + + State: + + +**../../tests/sources/findall.elpi +:** + +.. literalinclude:: ../../tests/sources/findall.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 1 + 2 + 3 + 4 + 5 + + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/findall.elpi", line 9, column 25, characters 135-135: + A is linear: name it _A (discard) or A_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/findall.elpi", line 9, column 27, characters 137-137: + B is linear: name it _B (discard) or B_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/findall.elpi", line 33, column 25, characters 712-712: + Z is linear: name it _Z (discard) or Z_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/fragment_exit.elpi +:** + +.. literalinclude:: ../../tests/sources/fragment_exit.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/fragment_exit2.elpi +:** + +.. literalinclude:: ../../tests/sources/fragment_exit2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/fragment_exit3.elpi +:** + +.. literalinclude:: ../../tests/sources/fragment_exit3.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/general_case.elpi +:** + +.. literalinclude:: ../../tests/sources/general_case.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/general_case.elpi", line 10, column 13, characters 213-216: + G is linear: name it _G (discard) or G_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/general_case2.elpi +:** + +.. literalinclude:: ../../tests/sources/general_case2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/general_case3.elpi +:** + +.. literalinclude:: ../../tests/sources/general_case3.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/hc_interp.elpi +:** + +.. literalinclude:: ../../tests/sources/hc_interp.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hc_interp.elpi", line 56, column 37, characters 1311-1311: + T is linear: name it _T (discard) or T_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hc_interp.elpi", line 65, column 15, characters 1644-1644: + Y is linear: name it _Y (discard) or Y_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hc_interp.elpi", line 72, column 39, characters 1877-1877: + T is linear: name it _T (discard) or T_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hc_interp.elpi", line 73, column 12, characters 1914-1915: + Cs is linear: name it _Cs (discard) or Cs_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/hdclause.elpi +:** + +.. literalinclude:: ../../tests/sources/hdclause.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/heap_discard.elpi +:** + +.. literalinclude:: ../../tests/sources/heap_discard.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/heap_discard.elpi", line 5, column 11, characters 63-65: + Y is linear: name it _Y (discard) or Y_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/ho.elpi +:** + +.. literalinclude:: ../../tests/sources/ho.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/hollight.elpi +:** + +.. literalinclude:: ../../tests/sources/hollight.elpi + :linenos: + :language: elpi + +.. code-block:: console + + File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hollight.elpi", line 28, column 0, characters 756-797: + local keyword is no longer supported + +**../../tests/sources/hollight_legacy.elpi +:** + +.. literalinclude:: ../../tests/sources/hollight_legacy.elpi + :linenos: + :language: elpi + +.. code-block:: console + + Fatal error: exception Failure("File /home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hollight_legacy.elpi not found in: /home/tassi/LPCIC/elpi/_build/default/../lib/, /home/tassi/LPCIC/elpi/_build/default/../lib/ocaml, /home/tassi/LPCIC/elpi/_build/install/default/lib, /home/tassi/LPCIC/elpi/_build/default") + +**../../tests/sources/hyp_uvar.elpi +:** + +.. literalinclude:: ../../tests/sources/hyp_uvar.elpi + :linenos: + :language: elpi + +.. code-block:: console + + ok + + +.. code-block:: console + + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hyp_uvar.elpi", line 5, column 3, characters 27-67: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/impl.elpi +:** + +.. literalinclude:: ../../tests/sources/impl.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/impl2.elpi +:** + +.. literalinclude:: ../../tests/sources/impl2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/index2.elpi +:** + +.. literalinclude:: ../../tests/sources/index2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.001 + + Typechecking time: 0.001 + + Success: + + Time: 1.311 + + Constraints: + + + State: + + +**../../tests/sources/io_colon.elpi +:** + +.. literalinclude:: ../../tests/sources/io_colon.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/lambda.elpi +:** + +.. literalinclude:: ../../tests/sources/lambda.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/lambda2.elpi +:** + +.. literalinclude:: ../../tests/sources/lambda2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/lambda3.elpi +:** + +.. literalinclude:: ../../tests/sources/lambda3.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.263 + + Constraints: + + + State: + + +**../../tests/sources/list_as_conj.elpi +:** + +.. literalinclude:: ../../tests/sources/list_as_conj.elpi + :linenos: + :language: elpi + +.. code-block:: console + + a + b + done + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/list_comma.elpi +:** + +.. literalinclude:: ../../tests/sources/list_comma.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/llam.elpi +:** + +.. literalinclude:: ../../tests/sources/llam.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 0 test pi c0 \ pi c1 \ X0 c1 c0 = c0 , X0 = (c0 \ c1 \ c1) + 0 test pi c0 \ pi c1 \ c0 = X0 c1 c0 , X0 = (c0 \ c1 \ c1) + 0 test pi c0 \ sigma c1 \ pi c2 \ pi c3 \ c1 c3 c2 = c2 , c1 = (c2 \ c3 \ c3) + 0 test pi c0 \ sigma c1 \ pi c2 \ pi c3 \ c2 = c1 c3 c2 , c1 = (c2 \ c3 \ c3) + ---------------------------------------- + 0 test not (pi c0 \ pi c1 \ X1 c0 = c1) , X1 = whatever + 0 test not (pi c0 \ pi c1 \ c1 = X1 c0) , X1 = whatever + 0 test pi c0 \ sigma c1 \ not (pi c2 \ pi c3 \ c1 c2 = c3) , c1 = whatever + 0 test pi c0 \ sigma c1 \ not (pi c2 \ pi c3 \ c3 = c1 c2) , c1 = whatever + ---------------------------------------- + 0 test + pi c0 \ pi c1 \ X2 c1 c0 = r c2 \ h c2 c0 , X2 = (c0 \ c1 \ r c2 \ h c2 c1) + 0 test + pi c0 \ pi c1 \ r c2 \ h c2 c0 = X2 c1 c0 , X2 = (c0 \ c1 \ r c2 \ h c2 c1) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ c1 c3 c2 = r c4 \ h c4 c2 , c1 = (c2 \ c3 \ r c4 \ h c4 c3) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ r c4 \ h c4 c2 = c1 c3 c2 , c1 = (c2 \ c3 \ r c4 \ h c4 c3) + ---------------------------------------- + 0 test + pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , X3 c1 c0 = c2 , X3 = (c0 \ c1 \ c1) + 0 test + pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , c2 = X3 c1 c0 , X3 = (c0 \ c1 \ c1) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c1 c3 c2 = c4 , c1 = (c2 \ c3 \ c3) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c4 = c1 c3 c2 , c1 = (c2 \ c3 \ c3) + ---------------------------------------- + 0 test not (pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , X4 c2 = c1) , X4 = whatever + 0 test not (pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , c1 = X4 c2) , X4 = whatever + 0 test + pi c0 \ + sigma c1 \ + not (pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c1 c4 = c3) , c1 = whatever + 0 test + pi c0 \ + sigma c1 \ + not (pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c3 = c1 c4) , c1 = whatever + ---------------------------------------- + 0 test + pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , X5 c1 c0 = r c3 \ h c3 c2 , + X5 = (c0 \ c1 \ r c2 \ h c2 c1) + 0 test + pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , r c3 \ h c3 c2 = X5 c1 c0 , + X5 = (c0 \ c1 \ r c2 \ h c2 c1) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c1 c3 c2 = r c5 \ h c5 c4 , + c1 = (c2 \ c3 \ r c4 \ h c4 c3) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , r c5 \ h c5 c4 = c1 c3 c2 , + c1 = (c2 \ c3 \ r c4 \ h c4 c3) + ---------------------------------------- + 0 test pi c0 \ clause c1 \ c2 \ c1 + 0 test pi c0 \ clause1 c1 \ c2 \ X6 c2 c1 , X6 = (c1 \ c2 \ c2) + 0 test pi c0 \ clause2 c1 \ c2 \ c1 , c1 + 0 test clause3 c0 \ c1 \ X7 c1 c0 => pi c0 \ clause3 c1 \ c2 \ c1 + 0 test + sigma c0 \ + pi c1 \ pi c2 \ , (X8 c2 = r (c0 c2 c1)) (c0 c1 c1 = c1) (c0 c1 c2 = c1) , + X8 = (c0 \ r c0) + 0 test + sigma c0 \ + pi c1 \ pi c2 \ , (r (c0 c2 c1) = X8 c2) (c0 c1 c1 = c1) (c0 c1 c2 = c1) , + X8 = (c0 \ r c0) + 0 test + pi c0 \ + sigma c1 \ + sigma c2 \ + pi c3 \ pi c4 \ , (c1 c4 = r (c2 c4 c3)) (c2 c3 c3 = c3) (c2 c3 c4 = c3) , + c1 = (c2 \ r c2) + 0 test + pi c0 \ + sigma c1 \ + sigma c2 \ + pi c3 \ pi c4 \ , (r (c2 c4 c3) = c1 c4) (c2 c3 c3 = c3) (c2 c3 c4 = c3) , + c1 = (c2 \ r c2) + ---------------------------------------- + 0 test + pi c0 \ + pi c1 \ + sigma c2 \ + pi c3 \ pi c4 \ , (X9 c1 = r (c2 c4)) (spy (c2 1 = c1)) (not (c2 2 = c0)) , + X9 = (c0 \ r whatever) + 0 test X10 c1 = c1 + 0 test + pi c0 \ + pi c1 \ + sigma c2 \ + pi c3 \ pi c4 \ , (r (c2 c4) = X9 c1) (spy (c2 1 = c1)) (not (c2 2 = c0)) , + X9 = (c0 \ r whatever) + 0 test X11 c1 = c1 + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ + pi c3 \ + sigma c4 \ + pi c5 \ pi c6 \ , (c1 c3 = r (c4 c6)) (spy (c4 1 = c3)) (not (c4 2 = c2)) + , c1 = (c2 \ r whatever) + 0 test X12^1 c2 = c2 + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ + pi c3 \ + sigma c4 \ + pi c5 \ pi c6 \ , (r (c4 c6) = c1 c3) (spy (c4 1 = c3)) (not (c4 2 = c2)) + , c1 = (c2 \ r whatever) + 0 test X13^1 c2 = c2 + ---------------------------------------- + 0 test + pi c0 \ pi c1 \ sigma c2 \ pi c3 \ X14 c1 c0 = r (c2 c3) , c2 1 = f c0 c1 , + X14 = (c0 \ c1 \ r (f c1 c0)) + 0 test + pi c0 \ pi c1 \ sigma c2 \ pi c3 \ r (c2 c3) = X14 c1 c0 , c2 1 = f c0 c1 , + X14 = (c0 \ c1 \ r (f c1 c0)) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ sigma c4 \ pi c5 \ c1 c3 c2 = r (c4 c5) , c4 1 = f c2 c3 , + c1 = (c2 \ c3 \ r (f c3 c2)) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ sigma c4 \ pi c5 \ r (c4 c5) = c1 c3 c2 , c4 1 = f c2 c3 , + c1 = (c2 \ c3 \ r (f c3 c2)) + ---------------------------------------- + 0 test pi c0 \ pi c1 \ prune_arg (X15 c1 c0) , X15 = (c0 \ c1 \ r (v c0 c1)) + 0 test pi c0 \ pi c1 \ prune_arg (X15 c1 c0) , X15 = (c0 \ c1 \ r (v c0 c1)) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ prune_arg (c1 c3 c2) , c1 = (c2 \ c3 \ r (v c2 c3)) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ prune_arg (c1 c3 c2) , c1 = (c2 \ c3 \ r (v c2 c3)) + ---------------------------------------- + 0 test + pi c0 \ pi c1 \ prune_arg2 (X16 c1 c0) , X16 = (c0 \ c1 \ r c2 \ v c0 c1) + 0 test + pi c0 \ pi c1 \ prune_arg2 (X16 c1 c0) , X16 = (c0 \ c1 \ r c2 \ v c0 c1) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ prune_arg2 (c1 c3 c2) , c1 = (c2 \ c3 \ r c4 \ v c2 c3) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ prune_arg2 (c1 c3 c2) , c1 = (c2 \ c3 \ r c4 \ v c2 c3) + ---------------------------------------- + 0 test + pi c0 \ pi c1 \ prune_arg3 (X17 c1 c0) , X17 = (c0 \ c1 \ r c2 \ c3 \ v c0 c1) + 0 test + pi c0 \ pi c1 \ prune_arg3 (X17 c1 c0) , X17 = (c0 \ c1 \ r c2 \ c3 \ v c0 c1) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ prune_arg3 (c1 c3 c2) , c1 = (c2 \ c3 \ r c4 \ c5 \ v c2 c3) + 0 test + pi c0 \ + sigma c1 \ + pi c2 \ pi c3 \ prune_arg3 (c1 c3 c2) , c1 = (c2 \ c3 \ r c4 \ c5 \ v c2 c3) + ---------------------------------------- + + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/llam.elpi", line 26, column 14, characters 637-637: + F is linear: name it _F (discard) or F_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/llam.elpi", line 27, column 17, characters 657-660: + F is linear: name it _F (discard) or F_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/llam.elpi", line 28, column 19, characters 683-688: + F is linear: name it _F (discard) or F_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.001 + + Constraints: + + + State: + + +**../../tests/sources/llamchr.elpi +:** + +.. literalinclude:: ../../tests/sources/llamchr.elpi + :linenos: + :language: elpi + +.. code-block:: console + + X0 X1 X1 X0 nat | lam X0 c2 \ lam X1 c3 \ X2 c0 c2 c3 | + lam X1 c2 \ lam X0 c3 \ X2 c0 c3 c2 + [ (c2 \ c3 \ X2 c0 c2 c3) = (c2 \ c3 \ c2) + ]ok + nat X1 X1 nat nat | lam nat c2 \ lam X1 c3 \ c2 | lam X1 c2 \ lam nat c3 \ c3 + [ term (app (lam X1 c2 \ lam nat c3 \ c3) false) _ + ]ok + nat bool bool nat nat | lam nat c2 \ lam bool c3 \ c2 | + lam bool c2 \ lam nat c3 \ c3 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/map.elpi +:** + +.. literalinclude:: ../../tests/sources/map.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 0.924682 + 0.043325 + 0.609252 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 1.740 + + Constraints: + + + State: + + +**../../tests/sources/map_list.elpi +:** + +.. literalinclude:: ../../tests/sources/map_list.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 5.317134 + 2.552711 + 0.261567 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 8.139 + + Constraints: + + + State: + + +**../../tests/sources/map_list_opt.elpi +:** + +.. literalinclude:: ../../tests/sources/map_list_opt.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 4.348501 + 2.003430 + 0.159274 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 6.516 + + Constraints: + + + State: + + +**../../tests/sources/name_builtin.elpi +:** + +.. literalinclude:: ../../tests/sources/name_builtin.elpi + :linenos: + :language: elpi + +.. code-block:: console + + A= c3 \ c4 \ c5 \ c3 c4 c5 + B= c1 \ c1 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/named_clauses00.elpi +:** + +.. literalinclude:: ../../tests/sources/named_clauses00.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/named_clauses00.elpi", line 6, column 0, characters 29-45: + duplicate clause name name1 + +**../../tests/sources/named_clauses01.elpi +:** + +.. literalinclude:: ../../tests/sources/named_clauses01.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/named_clauses01.elpi", line 6, column 0, characters 27-31: + c1 is not a function but it is passed the argument main. + The type of c1 is prop + +**../../tests/sources/named_clauses02.elpi +:** + +.. literalinclude:: ../../tests/sources/named_clauses02.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/namespaces00.elpi +:** + +.. literalinclude:: ../../tests/sources/namespaces00.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/namespaces01.elpi +:** + +.. literalinclude:: ../../tests/sources/namespaces01.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/namespaces02.elpi +:** + +.. literalinclude:: ../../tests/sources/namespaces02.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/namespaces03.elpi +:** + +.. literalinclude:: ../../tests/sources/namespaces03.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/nil_cons.elpi +:** + +.. literalinclude:: ../../tests/sources/nil_cons.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/notation.elpi +:** + +.. literalinclude:: ../../tests/sources/notation.elpi + :linenos: + :language: elpi + +.. code-block:: console + + a a +x [b] +y d + + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/notation.elpi", line 9, column 6, characters 107-107: + D is linear: name it _D (discard) or D_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/notation.elpi", line 9, column 0, characters 101-102: + X is linear: name it _X (discard) or X_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/notation_error.elpi +:** + +.. literalinclude:: ../../tests/sources/notation_error.elpi + :linenos: + :language: elpi + +.. code-block:: console + + File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/notation_error.elpi", line 1, column 0, characters 0-12: + Mixfix directives are not supported by this parser. + + The parser is based on token families. + A family is identified by some starting characters, for example + a token '+-->' belongs to the family of '+'. There is no need + to declare it. + + All the tokens of a family are parsed with the same precedence and + associativity, for example 'x +--> y *--> z' is parsed as + 'x +--> (y *--> z)' since the family of '*' has higher precedence + than the family of '+'. + + Here the table of tokens and token families. + Token families are represented by the start symbols followed by '..'. + Tokens of families marked with [*] cannot end with the starting symbol, + eg `foo` is not an infix, while `foo is. + The listing is ordered by increasing precedence. + + fixity | tokens / token families + -------------------------- + ----------------------------------- + Infix not associative | :- ?- + Infix right associative | ; + Infix right associative | ==> (* see note 1 *) + Infix right associative | , & + Infix right associative | -> + Infix right associative | => + Infix not associative | = == =< r< i< s< r=< i=< s=< + <.. r> i> s> r>= i>= s>= >.. + is + Infix right associative | :: + Infix not associative | '.. [*] + Infix left associative | ^.. r+ i+ s+ +.. - r- i- s- + Infix left associative | r* i* s* *.. / div mod + Infix right associative | --.. + Infix not associative | `.. [*] + Infix right associative | ==.. + Infix right associative | ||.. + Infix right associative | &&.. + Infix left associative | #.. + Prefix not associative | r~ i~ ~.. + Postfix not associative | ?.. + + If the token is a valid mixfix, and you want the file to stay compatible + with Teyjus, you can ask Elpi to skip the directive. Eg: + + % elpi:skip 2 // skips the next two lines + infixr ==> 120. + infixr || 120. + + As a debugging facility one can ask Elpi to print the AST in order to + verify how the text was parsed. Eg: + + echo 'MyFormula = a || b ==> c && d' | elpi -parse-term + + Notes: + 1: The LHS of ==> binds stronger than conjunction, hence (a,b ==> c,d) reads a, (b ==> (c,d)) + + +**../../tests/sources/notation_legacy.elpi +:** + +.. literalinclude:: ../../tests/sources/notation_legacy.elpi + :linenos: + :language: elpi + +.. code-block:: console + + Fatal error: exception Failure("File /home/tassi/LPCIC/elpi/docs/source/../../tests/sources/notation_legacy.elpi not found in: /home/tassi/LPCIC/elpi/_build/default/../lib/, /home/tassi/LPCIC/elpi/_build/default/../lib/ocaml, /home/tassi/LPCIC/elpi/_build/install/default/lib, /home/tassi/LPCIC/elpi/_build/default") + +**../../tests/sources/patternunif.elpi +:** + +.. literalinclude:: ../../tests/sources/patternunif.elpi + :linenos: + :language: elpi + +.. code-block:: console + + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/patternunif.elpi", line 2, column 29, characters 59-98: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/patternunif2.elpi +:** + +.. literalinclude:: ../../tests/sources/patternunif2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/pi.elpi +:** + +.. literalinclude:: ../../tests/sources/pi.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/pi3.elpi +:** + +.. literalinclude:: ../../tests/sources/pi3.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/pi5.elpi +:** + +.. literalinclude:: ../../tests/sources/pi5.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/pnf.elpi +:** + +.. literalinclude:: ../../tests/sources/pnf.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 19, characters 3477-3478: + F1 is linear: name it _F1 (discard) or F1_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 34, characters 3492-3493: + F2 is linear: name it _F2 (discard) or F2_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 51, characters 3509-3510: + F3 is linear: name it _F3 (discard) or F3_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 67, characters 3525-3526: + F4 is linear: name it _F4 (discard) or F4_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/polymorphic_variants.elpi +:** + +.. literalinclude:: ../../tests/sources/polymorphic_variants.elpi + :linenos: + :language: elpi + +.. code-block:: console + + Type-checking ok + Type-inference ok + ::: f : X0 -> X1 + ::: g : X2 -> X3 + mem X3 d /* suspended on X3 */ mem X3 c /* suspended on X3 */ + X2 is_subset [a, b] /* suspended on X2 */ + X3 is_subset X1 /* suspended on X3 */ mem X2 a /* suspended on X2 */ + mem X1 a /* suspended on X1 */ X0 is_subset [a, b] /* suspended on X0 */ + Type specialization ok + ::: f : X0 -> X1 + ::: g : [a] -> X3 + mem X3 d /* suspended on X3 */ mem X3 c /* suspended on X3 */ + X3 is_subset X1 /* suspended on X3 */ mem X1 a /* suspended on X1 */ + X0 is_subset [a, b] /* suspended on X0 */ + xxx failing + xxx failed + Type-inference ok + ::: f : X4 -> X5 + ::: g : X6 -> X7 + ::: h1 : X8 -> X9 + ::: h2 : X10 -> X11 + + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/polymorphic_variants.elpi", line 65, column 6, characters 2005-2006: + Y is linear: name it _Y (discard) or Y_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/polymorphic_variants.elpi", line 111, column 7, characters 3545-3546: + X is linear: name it _X (discard) or X_ (fresh variable) + + Compilation time: 0.001 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + mem X11 c /* suspended on X11 */ mem X11 b /* suspended on X11 */ + mem X11 a /* suspended on X11 */ + X10 is_subset [a, b, c] /* suspended on X10 */ + mem X9 d /* suspended on X9 */ mem X9 b /* suspended on X9 */ + mem X9 a /* suspended on X9 */ X8 is_subset [a, b, d] /* suspended on X8 */ + mem X7 a /* suspended on X7 */ X6 is_subset [a] /* suspended on X6 */ + X11 is_subset X5 /* suspended on X11 */ + X7 is_subset X10 /* suspended on X7 */ mem X6 a /* suspended on X6 */ + X9 is_subset X5 /* suspended on X9 */ X7 is_subset X8 /* suspended on X7 */ + mem X6 a /* suspended on X6 */ mem X5 a /* suspended on X5 */ + X4 is_subset [a, b, c] /* suspended on X4 */ + + State: + + +**../../tests/sources/printer.elpi +:** + +.. literalinclude:: ../../tests/sources/printer.elpi + :linenos: + :language: elpi + +.. code-block:: console + + p X0 :- q X0 , r x + X0 is f X1 mod r X0 + X0 is f X1 + r X0 * g X2 + X0 is (f X1 + r X0) * g X2 + X0 is f X1 ^ r X0 ^ g X2 + X0 || X2 && X3 ===> X4 + [f X0, g X1, (a , b), a + b] + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/queens.elpi +:** + +.. literalinclude:: ../../tests/sources/queens.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 50, column 17, characters 1169-1174: + DUMMY1 is linear: name it _DUMMY1 (discard) or DUMMY1_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 50, column 24, characters 1176-1181: + DUMMY2 is linear: name it _DUMMY2 (discard) or DUMMY2_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 70, column 11, characters 1942-1942: + X is linear: name it _X (discard) or X_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 73, column 11, characters 1985-1985: + X is linear: name it _X (discard) or X_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 76, column 10, characters 2045-2045: + X is linear: name it _X (discard) or X_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 1.089 + + Constraints: + + + State: + + +**../../tests/sources/quote_syntax.elpi +:** + +.. literalinclude:: ../../tests/sources/quote_syntax.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/quote_syntax.elpi", line 2, column 42, characters 50-50: + A is linear: name it _A (discard) or A_ (fresh variable) + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/quote_syntax.elpi", line 2, column 3, characters 11-52: + Unable to infer a closed type for quote_syntax: + string -> string -> Src263 -> Src265 -> prop + +**../../tests/sources/random.elpi +:** + +.. literalinclude:: ../../tests/sources/random.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 3 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.003 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/reduce_cbn.elpi +:** + +.. literalinclude:: ../../tests/sources/reduce_cbn.elpi + :linenos: + :language: elpi + +.. code-block:: console + + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbn.elpi", line 21, column 22, characters 728-756: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbn.elpi", line 34, column 32, characters 1237-1240: + NINE is linear: name it _NINE (discard) or NINE_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbn.elpi", line 31, column 31, characters 1129-1134: + TWELVE is linear: name it _TWELVE (discard) or TWELVE_ (fresh variable) + + Compilation time: 0.001 + + Typechecking time: 0.002 + + Success: + + Time: 0.258 + + Constraints: + + + State: + + +**../../tests/sources/reduce_cbv.elpi +:** + +.. literalinclude:: ../../tests/sources/reduce_cbv.elpi + :linenos: + :language: elpi + +.. code-block:: console + + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbv.elpi", line 18, column 9, characters 420-448: + The standard λProlog infix operator for implication => has higher precedence + than conjunction. This means that 'A => B, C' reads '(A => B), C'. + This is a common mistake since it makes A only available to B (and not to C + as many newcomers may expect). + If this is really what you want write '(A => B), C' to silence this warning. + Otherwise write 'A => (B, C)', or use the alternative implication operator ==>. + Infix ==> has lower precedence than conjunction, hence + 'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'. + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbv.elpi", line 33, column 32, characters 961-964: + NINE is linear: name it _NINE (discard) or NINE_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbv.elpi", line 30, column 31, characters 853-858: + TWELVE is linear: name it _TWELVE (discard) or TWELVE_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 1.604 + + Constraints: + + + State: + + +**../../tests/sources/restriction.elpi +:** + +.. literalinclude:: ../../tests/sources/restriction.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/restriction.elpi", line 3, column 22, characters 43-43: + X is linear: name it _X (discard) or X_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.002 + +**../../tests/sources/restriction3.elpi +:** + +.. literalinclude:: ../../tests/sources/restriction3.elpi + :linenos: + :language: elpi + +.. code-block:: console + + ----<<---- enter: X0 c0 = lam c1 \ lam c2 \ X1^1 c1 c2 + ---->>---- exit: lam c1 \ lam c2 \ X1^1 c1 c2 = lam c1 \ lam c2 \ X1^1 c1 c2 + ----<<---- enter: X2 = lam c1 \ lam c2 \ X3^1 c1 c2 + ---->>---- exit: lam c1 \ lam c2 \ X4 c1 c2 = lam c1 \ lam c2 \ X4 c1 c2 + ----<<---- enter: lam c1 \ lam c2 \ X1^1 c1 c2 = lam c1 \ lam c2 \ c1 + ---->>---- exit: lam c1 \ lam c2 \ c1 = lam c1 \ lam c2 \ c1 + ----<<---- enter: lam c1 \ lam c2 \ X4 c1 c2 = lam c1 \ lam c2 \ c1 + ---->>---- exit: lam c1 \ lam c2 \ c1 = lam c1 \ lam c2 \ c1 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/restriction4.elpi +:** + +.. literalinclude:: ../../tests/sources/restriction4.elpi + :linenos: + :language: elpi + +.. code-block:: console + + ----<<---- enter: X0 c0 = f (X1^1 c1) c2 \ X2^1 c1 c2 + ---->>---- exit: f (X3 c0) c2 \ X4 c0 c2 = f (X3 c0) c2 \ X4 c0 c2 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/restriction5.elpi +:** + +.. literalinclude:: ../../tests/sources/restriction5.elpi + :linenos: + :language: elpi + +.. code-block:: console + + ----<<---- enter: X0 c0 c1 = X0 c3 c4 + ---->>---- exit: X1 = X1 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/restriction6.elpi +:** + +.. literalinclude:: ../../tests/sources/restriction6.elpi + :linenos: + :language: elpi + +.. code-block:: console + + ----<<---- enter: X0 c0 = f (X1^1 c1) c2 \ c3 \ X2^2 c3 + ---->>---- exit: f (X3 c0) c2 \ c3 \ X4^1 c3 = f (X3 c0) c2 \ c3 \ X4^1 c3 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/rev.elpi +:** + +.. literalinclude:: ../../tests/sources/rev.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + Fatal error: exception Stack overflow + +**../../tests/sources/rev14.elpi +:** + +.. literalinclude:: ../../tests/sources/rev14.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + Fatal error: exception Stack overflow + +**../../tests/sources/same_term.elpi +:** + +.. literalinclude:: ../../tests/sources/same_term.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/self_assignment.elpi +:** + +.. literalinclude:: ../../tests/sources/self_assignment.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/set.elpi +:** + +.. literalinclude:: ../../tests/sources/set.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 0.769606 + 0.040283 + 0.551719 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 1.459 + + Constraints: + + + State: + + +**../../tests/sources/shorten.elpi +:** + +.. literalinclude:: ../../tests/sources/shorten.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/shorten2.elpi +:** + +.. literalinclude:: ../../tests/sources/shorten2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/shorten_aux.elpi +:** + +.. literalinclude:: ../../tests/sources/shorten_aux.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + +**../../tests/sources/shorten_aux2.elpi +:** + +.. literalinclude:: ../../tests/sources/shorten_aux2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: + Undeclared globals: + - File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/shorten_aux2.elpi", line 2, column 8, characters 18-20: foo. + Please add the following text to your program: + type foo prop. + + Compilation time: 0.000 + + Typechecking time: 0.001 + +**../../tests/sources/shorten_builtin.elpi +:** + +.. literalinclude:: ../../tests/sources/shorten_builtin.elpi + :linenos: + :language: elpi + +.. code-block:: console + + {{ }} + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.002 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/shorten_trie.elpi +:** + +.. literalinclude:: ../../tests/sources/shorten_trie.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/shorten_trie.elpi", line 10, column 40, characters 275-276: + AB is linear: name it _AB (discard) or AB_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/shorten_trie.elpi", line 10, column 57, characters 292-292: + E is linear: name it _E (discard) or E_ (fresh variable) + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/shorten_trie.elpi", line 10, column 18, characters 253-253: + F is linear: name it _F (discard) or F_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/spill_and.elpi +:** + +.. literalinclude:: ../../tests/sources/spill_and.elpi + :linenos: + :language: elpi + +.. code-block:: console + + lam c0 \ app t t + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/spill_impl.elpi +:** + +.. literalinclude:: ../../tests/sources/spill_impl.elpi + :linenos: + :language: elpi + +.. code-block:: console + + lam c0 \ app t t + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/spill_lam.elpi +:** + +.. literalinclude:: ../../tests/sources/spill_lam.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/trace.elpi +:** + +.. literalinclude:: ../../tests/sources/trace.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/trace2.elpi +:** + +.. literalinclude:: ../../tests/sources/trace2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + 1 + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/trace_chr.elpi +:** + +.. literalinclude:: ../../tests/sources/trace_chr.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + odd X0 /* suspended on X0 */ + + State: + + +**../../tests/sources/trace_cut.elpi +:** + +.. literalinclude:: ../../tests/sources/trace_cut.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/trace_findall.elpi +:** + +.. literalinclude:: ../../tests/sources/trace_findall.elpi + :linenos: + :language: elpi + +.. code-block:: console + + [p 1, p 2, p 3] + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/trail.elpi +:** + +.. literalinclude:: ../../tests/sources/trail.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/typeabbrv.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/typeabbrv1.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv1.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/typeabbrv10.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv10.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv10.elpi", line 7, column 17, characters 128-128: + literal "3" has type int but std.map expects a term of type list A + +**../../tests/sources/typeabbrv11.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv11.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv11.elpi", line 4, column 3, characters 34-36: + literal "x" has type string but f expects a term of type x + +**../../tests/sources/typeabbrv12.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv12.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv12.elpi", line 4, column 3, characters 41-43: + literal "x" has type string but f expects a term of type y + +**../../tests/sources/typeabbrv2.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv2.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv2.elpi", line 6, column 0, characters 39-57: + Duplicate type abbreviation for t1. Previous declaration: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv2.elpi", line 1, column 0, characters 0-17: + +**../../tests/sources/typeabbrv3.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv3.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/typeabbrv4.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv4.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/typeabbrv5.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv5.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv5.elpi", line 1, column 14, characters 14-14: + Unknown type y + +**../../tests/sources/typeabbrv6.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv6.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv6.elpi", line 1, column 22, characters 22-22: + Unknown type A + +**../../tests/sources/typeabbrv7.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv7.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/typeabbrv8.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv8.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/typeabbrv9.elpi +:** + +.. literalinclude:: ../../tests/sources/typeabbrv9.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/uminus.elpi +:** + +.. literalinclude:: ../../tests/sources/uminus.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/uvar_chr.elpi +:** + +.. literalinclude:: ../../tests/sources/uvar_chr.elpi + :linenos: + :language: elpi + +.. code-block:: console + + lam X0 + lam c0 \ X0 c0 + + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/uvar_chr.elpi", line 30, column 22, characters 819-821: + F is linear: name it _F (discard) or F_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + meta-copy (lam c0 \ X0 c0) (lam c0 \ X0 c0) /* suspended on */ + + State: + + +**../../tests/sources/var.elpi +:** + +.. literalinclude:: ../../tests/sources/var.elpi + :linenos: + :language: elpi + +.. code-block:: console + + X0 , X1 , X2 , X3 , X4 , X4 c0 c1 + + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/var.elpi", line 6, column 29, characters 113-120: + X10 is linear: name it _X10 (discard) or X10_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/variadic_declare_constraints.elpi +:** + +.. literalinclude:: ../../tests/sources/variadic_declare_constraints.elpi + :linenos: + :language: elpi + +.. code-block:: console + + + Parsing time: 0.000 + Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/variadic_declare_constraints.elpi", line 5, column 38, characters 96-96: + Z is linear: name it _Z (discard) or Z_ (fresh variable) + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + foo X0 X1 /* suspended on X0, X1, X2 */ + + State: + + +**../../tests/sources/w.elpi +:** + +.. literalinclude:: ../../tests/sources/w.elpi + :linenos: + :language: elpi + +.. code-block:: console + + Test 1 + Typing + let (lam c0 \ c0) X0 c0 \ + app (app plus (app c0 one)) (app size (app c0 empty)) + OK + let (lam c0 \ c0) (all c0 \ mono (c0 ===> c0)) c0 \ + app (app plus (app c0 one)) (app size (app c0 empty)) has type mono integer + + Test 2 + Typing + lam c0 \ + let (lam c1 \ app (app comma c0) c1) X1 c1 \ + app (app comma (app c1 one)) (app c1 c0) + OK + lam c0 \ + let (lam c1 \ app (app comma c0) c1) + (all c1 \ mono (c1 ===> pair # X2 # c1)) c1 \ + app (app comma (app c1 one)) (app c1 c0) has type + mono (X2 ===> pair # (pair # X2 # integer) # (pair # X2 # X2)) + + Test 3 + Typing lam c0 \ app (app plus (app c0 one)) (app size (app c0 empty)) + Error: c0 cannot have type all X3^1 + Error: c0 cannot have type mono (X4^1 ===> list # X5^1) + + +.. code-block:: console + + + Parsing time: 0.000 + + Compilation time: 0.000 + + Typechecking time: 0.001 + + Success: + + Time: 0.000 + + Constraints: + + + State: + + +**../../tests/sources/w_legacy.elpi +:** + +.. literalinclude:: ../../tests/sources/w_legacy.elpi + :linenos: + :language: elpi + +.. code-block:: console + + Fatal error: exception Failure("File /home/tassi/LPCIC/elpi/docs/source/../../tests/sources/w_legacy.elpi not found in: /home/tassi/LPCIC/elpi/_build/default/../lib/, /home/tassi/LPCIC/elpi/_build/default/../lib/ocaml, /home/tassi/LPCIC/elpi/_build/install/default/lib, /home/tassi/LPCIC/elpi/_build/default") + +**../../tests/sources/zebra.elpi:** + +.. literalinclude:: ../../tests/sources/zebra.elpi :linenos: + :language: elpi + +.. code-block:: console + + Fatal error: exception Failure("File /home/tassi/LPCIC/elpi/docs/source/../../tests/sources/zebra.elp not found in: /home/tassi/LPCIC/elpi/_build/default/../lib/, /home/tassi/LPCIC/elpi/_build/default/../lib/ocaml, /home/tassi/LPCIC/elpi/_build/install/default/lib, /home/tassi/LPCIC/elpi/_build/default") + diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 000000000..7577acb1a --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,903 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/css/badge_only.css b/_static/css/badge_only.css new file mode 100644 index 000000000..c718cee44 --- /dev/null +++ b/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff b/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 000000000..6cb600001 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff2 b/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 000000000..7059e2314 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff b/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 000000000..f815f63f9 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff2 b/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 000000000..f2c76e5bd Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/_static/css/fonts/fontawesome-webfont.eot b/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 000000000..e9f60ca95 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/_static/css/fonts/fontawesome-webfont.svg b/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 000000000..855c845e5 --- /dev/null +++ b/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_static/css/fonts/fontawesome-webfont.ttf b/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 000000000..35acda2fa Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/_static/css/fonts/fontawesome-webfont.woff b/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 000000000..400014a4b Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/_static/css/fonts/fontawesome-webfont.woff2 b/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 000000000..4d13fc604 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/_static/css/fonts/lato-bold-italic.woff b/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 000000000..88ad05b9f Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff differ diff --git a/_static/css/fonts/lato-bold-italic.woff2 b/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 000000000..c4e3d804b Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/_static/css/fonts/lato-bold.woff b/_static/css/fonts/lato-bold.woff new file mode 100644 index 000000000..c6dff51f0 Binary files /dev/null and b/_static/css/fonts/lato-bold.woff differ diff --git a/_static/css/fonts/lato-bold.woff2 b/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 000000000..bb195043c Binary files /dev/null and b/_static/css/fonts/lato-bold.woff2 differ diff --git a/_static/css/fonts/lato-normal-italic.woff b/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 000000000..76114bc03 Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff differ diff --git a/_static/css/fonts/lato-normal-italic.woff2 b/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 000000000..3404f37e2 Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/_static/css/fonts/lato-normal.woff b/_static/css/fonts/lato-normal.woff new file mode 100644 index 000000000..ae1307ff5 Binary files /dev/null and b/_static/css/fonts/lato-normal.woff differ diff --git a/_static/css/fonts/lato-normal.woff2 b/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 000000000..3bf984332 Binary files /dev/null and b/_static/css/fonts/lato-normal.woff2 differ diff --git a/_static/css/theme.css b/_static/css/theme.css new file mode 100644 index 000000000..c03c88f06 --- /dev/null +++ b/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 000000000..d06a71d75 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 000000000..f0902be4f --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: 'v2.0.4', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 000000000..a858a410e Binary files /dev/null and b/_static/file.png differ diff --git a/_static/js/badge_only.js b/_static/js/badge_only.js new file mode 100644 index 000000000..526d7234b --- /dev/null +++ b/_static/js/badge_only.js @@ -0,0 +1 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); \ No newline at end of file diff --git a/_static/js/html5shiv-printshiv.min.js b/_static/js/html5shiv-printshiv.min.js new file mode 100644 index 000000000..2b43bd062 --- /dev/null +++ b/_static/js/html5shiv-printshiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/_static/js/html5shiv.min.js b/_static/js/html5shiv.min.js new file mode 100644 index 000000000..cd1c674f5 --- /dev/null +++ b/_static/js/html5shiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/_static/js/theme.js b/_static/js/theme.js new file mode 100644 index 000000000..1fddb6ee4 --- /dev/null +++ b/_static/js/theme.js @@ -0,0 +1 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 000000000..d96755fda Binary files /dev/null and b/_static/minus.png differ diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 000000000..7107cec93 Binary files /dev/null and b/_static/plus.png differ diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 000000000..84ab3030a --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #9C6500 } /* Comment.Preproc */ +.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #E40000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #008400 } /* Generic.Inserted */ +.highlight .go { color: #717171 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #687822 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #767600 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #A45A77 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0000FF } /* Name.Function.Magic */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .vm { color: #19177C } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/searchtools.js b/_static/searchtools.js new file mode 100644 index 000000000..97d56a74d --- /dev/null +++ b/_static/searchtools.js @@ -0,0 +1,566 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = docUrlRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = docUrlRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms) + ); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent !== undefined) return docContent.textContent; + console.warn( + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + // array of [docname, title, anchor, descr, score, filename] + let results = []; + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // lookup as object + objectTerms.forEach((term) => + results.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); + + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + results = results.reverse(); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js new file mode 100644 index 000000000..aae669d7e --- /dev/null +++ b/_static/sphinx_highlight.js @@ -0,0 +1,144 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + parent.insertBefore( + span, + parent.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(SphinxHighlight.highlightSearchWords); +_ready(SphinxHighlight.initEscapeListener); diff --git a/about.html b/about.html new file mode 100644 index 000000000..c92fd3f5d --- /dev/null +++ b/about.html @@ -0,0 +1,147 @@ + + + + + + + About — Elpi v2.0.4 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

About

+

This page is both an introspection and self documentation for this documentation stack.

+
+

Prerequisites

+

Before building this documentation, make sure to have sphinx installed:

+
pip install sphinx
+pip install in-place
+
+
+

To match the visuals used in the community (e.g. https://coq.inria.fr/distrib/current/refman/):

+
pip install sphinx-rtd-theme
+
+
+

On debian based systems, one can use the package manager:

+
apt install sphinx-doc
+apt install python3-sphinx-rtd-theme
+pip install in-place
+
+
+
+
+

Extensions

+

This documentation can make use of the following plugins:

+
extensions = [
+   'sphinx.ext.intersphinx',
+   'sphinx.ext.githubpages'
+]
+
+
+

Namely, intersphinx (https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html) can generate links to the documentation of objects in external projects, either explicitly through the external role, or as a fallback resolution for any other cross-reference, and, githubpages (https://www.sphinx-doc.org/en/master/usage/extensions/githubpages.html#module-sphinx.ext.githubpages) which creates a .nojekyll file on generated HTML directory to publish the document on GitHub Pages.

+
+
+

Building

+

sphinx comes with its own helpers to build the documentation but are not meant to be used directly, see Playground section for injection points.

+

Instead, use the doc-sphinx target of the source tree’s root’s Makefile to build the documentation:

+
make doc-build
+
+
+

Or, to build and publish the documentation to github pages:

+
make doc-publish
+
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/genindex.html b/genindex.html new file mode 100644 index 000000000..44ecfba08 --- /dev/null +++ b/genindex.html @@ -0,0 +1,106 @@ + + + + + + Index — Elpi v2.0.4 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html index d41832021..fd1ae92d5 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@

OCaml package documentation

    -
  1. elpi 2.0.4
  2. +
  3. elpi
diff --git a/objects.inv b/objects.inv new file mode 100644 index 000000000..7f8f15639 Binary files /dev/null and b/objects.inv differ diff --git a/playground.html b/playground.html new file mode 100644 index 000000000..ba4039685 --- /dev/null +++ b/playground.html @@ -0,0 +1,8027 @@ + + + + + + + Playground — Elpi v2.0.4 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Playground

+

This page is used to test hooks in order to run elpi on code snippets and inject its output within sphinx documentation sources.

+
+

Prerequisites

+

Before running the hooks, make sure to have elpi built locally:

+
eval $(opam env)
+make build
+
+
+

It doesn’t hurt to check that dune runs the locally built elpi correctly:

+
dune exec elpi -- -h
+
+
+
+
+

Syntax

+

Elpi code blocks to be evaluated and which output is to be injected from docs/base to docs/source are conventionally denoted in reStructuredText as .. elpi:: FILE.

+
 1kind term type.
+ 2type app term -> term -> term.
+ 3type lam (term -> term) -> term.
+ 4
+ 5kind ty type.
+ 6type arr ty -> ty -> ty.
+ 7type nat ty.
+ 8type bool ty.
+ 9
+10pred term i:term, o:ty.
+11term (app HD ARG) TGT :- term HD (arr SRC TGT), term ARG SRC.
+12term (lam F) (arr SRC TGT) :- pi x\ term x SRC => term (F x) TGT.
+13term (uvar as X) T :- declare_constraint (term X T) [X].
+14
+15pred len i:list A, o:int.
+16len [] 0.
+17len [_|XS] N :- len XS M, N is M + 1.
+18
+19constraint term {
+20  rule
+21     \ (term (uvar K LX) _) (term (uvar K LY) _)
+22     | (len LX N, len LY M, not(N = M))
+23   <=> (print "wrong arity" K, false).
+24
+25  rule (GX ?- term (uvar K LX) TX)
+26     \ (GY ?- term (uvar K LY) TY)
+27     | (print "compat" GX "|-" K LX TX "," GY "|-" K LY TY, 
+28        compatible GX LX GY LY CTXCONSTR)
+29   <=> (print "NEW" CTXCONSTR TX "=" TY, CTXCONSTR, TX = TY).
+30
+31}
+32
+33pred compatible o:list prop, o:list term,o:list prop,o:list term,o:list prop.
+34compatible _ [] _ [] [] :- !.
+35compatible GX [X|XS] GY [Y|YS] [TX = TY | K] :-
+36 (GX => term X TX),
+37 (GY => term Y TY),
+38 !,
+39 compatible GX XS GY YS K.
+40compatible _ _ _ _ [false].
+41
+42main :-
+43  (term (lam x\ lam y\ app (app (F x y) x) y) T1_, 
+44   term (lam y\ lam x\ app (app (F x y) y) x) T2_),
+45  print "1",
+46  (term (lam x \ X x) (arr A_ nat),
+47   term (lam x \ X x) (arr bool B_)),
+48  print "2",
+49  not(term (lam x \ Y x) (arr C nat), term (lam x \ Y x) (arr bool C)),
+50  not(term (lam x \ Z x) (arr nat nat), term (lam x \ Z x) (arr bool D_)).
+51
+
+
+

The injection engine:

+
    +
  • Retrieves all .. elpi:: directives

  • +
  • Changes them into literalinclude in the generated source with relevant options

  • +
  • Runs dune exec elpi -- -test FILE on the FILE containing the elpi snippet, test or example.

  • +
  • Captures its output (stdout)

  • +
  • Creates a code-block:: console just after it to inject the captured console output

  • +
  • Captures its output (stderr)

  • +
  • Creates a code-block:: console just after it to inject the captured console erros

  • +
  • In case of an assertion option for the elpi directive, the output is injected only if matched

  • +
+

Result should look as follows:

+
Parsing time: 0.000
+
+Compilation time: 0.004
+File "/home/jwintz/Development/elpi/tests/sources/chr.elpi", line 7, column 60, character 133: Warning: constant term has no declared type.
+File "/home/jwintz/Development/elpi/tests/sources/chr.elpi", line 11, column 8, character 319: Warning: constant len has no declared type. Did you mean std.length ?
+File "/home/jwintz/Development/elpi/tests/sources/chr.elpi", line 28, column 28, character 761: Warning: constant compatible has no declared type.
+
+Typechecking time: 0.154
+compat [term c1 (uvar frozen--501 []), term c0 (uvar frozen--502 [])] |- frozen--494 [
+ c1, c0] arr (uvar frozen--495 [c0, c1]) (arr (uvar frozen--496 [c0, c1]) (uvar frozen--497 [])) , [
+ term c3 (uvar frozen--499 []), term c2 (uvar frozen--498 [])] |- frozen--494 [
+ c2, c3] arr (uvar frozen--498 []) (arr (uvar frozen--499 []) (uvar frozen--500 []))
+NEW [X0 = X1, X2 = X3] arr (X4 c0 c1) (arr (X5 c0 c1) X6) = arr X1 (arr X3 X7)
+1
+compat [term c0 bool] |- frozen--507 [c0] uvar frozen--508 [] , [term c1 (uvar frozen--509 [])] |- frozen--507 [c1] nat
+NEW [bool = X8] X9 = nat
+2
+compat [term c0 bool] |- frozen--514 [c0] uvar frozen--515 [] , [term c1 (uvar frozen--515 [])] |- frozen--514 [c1] nat
+NEW [bool = X10] X10 = nat
+compat [term c0 bool] |- frozen--520 [c0] uvar frozen--521 [] , [term c1 nat] |- frozen--520 [c1] nat
+NEW [bool = nat] X11 = nat
+
+Success:
+
+Time: 0.001
+
+Constraints:
+ {c0} : term c0 bool ?- term (X12 c0) nat  /* suspended on X12 */ {c0 c1} : term c1 X13, term c0 X13 ?- term (X14 c1 c0) (arr X13 (arr X13 X6))  /* suspended on X14 */
+
+State:
+
+
+
+
+

Regexp Matching

+

This elpi directive should pass validation:

+
.. elpi:: ./a.elpi
+   :assert: V = s \(.*\)
+
+
+

./a.elpi +:

+
1type s num -> num.
+2type zero num.
+3pred ack i:num, i:num, o:num.
+4ack zero N V :- !, V = (s N).
+5ack M zero V :- !, (s M2) = M, ack M2 (s zero) V.
+6ack M N V :- (s M2) = M, (s N2) = N, ack M N2 V2, ack M2 V2 V.
+7main :- ack (s (s (s zero))) (s zero) V, print "V =" V.
+
+
+
Injection failure: result did not pass regexp check (V = s \(.*\))

This one should fail validation, only a message stating the regexp matching error will be printed:

+
.. elpi:: ./a.elpi
+   :assert: /(?!)/
+
+
+

./a.elpi +:

+
1type s num -> num.
+2type zero num.
+3pred ack i:num, i:num, o:num.
+4ack zero N V :- !, V = (s N).
+5ack M zero V :- !, (s M2) = M, ack M2 (s zero) V.
+6ack M N V :- (s M2) = M, (s N2) = N, ack M N2 V2, ack M2 V2 V.
+7main :- ack (s (s (s zero))) (s zero) V, print "V =" V.
+
+
+
Injection failure: result did not pass regexp check (/(?!)/)
+
+

Test Bed

+

../../tests/sources/accumulate_twice1.elpi +:

+
1pred doomed o:int.
+2accumulate accumulated.
+3accumulate accumulated.
+4main :-
+5  doomed 100.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/accumulate_twice1.elpi", line 1, column 0, characters 0-17:
+Duplicate mode declaration for doomed (also at File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/accumulated.elpi", line 1, column 0, characters 0-17:)
+
+
+

../../tests/sources/accumulate_twice2.elpi +:

+
1accumulate accumulated.
+2namespace other { accumulate accumulated. }
+3main :-
+4  doomed 100,
+5  other.doomed 100.
+
+
+
Parsing time: 0.000
+Warning:
+Undeclared globals:
+- File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/accumulate_twice2.elpi", line 5, column 3, characters 93-108: other.doomed.
+Please add the following text to your program:
+type other.doomed int -> prop.
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+
+

../../tests/sources/accumulated.elpi +:

+
1pred doomed i:int.
+2doomed 0 :- fail.
+3doomed N :- N > 0, M is N - 1, doomed M.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+
+

../../tests/sources/ackermann.elpi +:

+
 1% ack (s zero) (s zero) V.              yields V = s(s(s(zero)))   = 3
+ 2% ack (s (s zero)) (s (s zero)) V.      yields V = s(s...(s zero)) = 7
+ 3% ack (s (s (s zero))) (s zero) V.      yields V = s(s...(s zero)) = 13
+ 4% ack (s (s (s zero))) (s (s zero)) V.  yields V = ....            = 29
+ 5% ack (s (s (s (s zero)))) (s zero) V.  yields  nothing
+ 6
+ 7% ack   +int    +int  -int
+ 8% ack(0, N, V) :- !, V is N + 1.
+ 9% ack(M, 0, V) :- !, M2 is M - 1, ack(M2, 1, V).
+10% ack(M, N, V) :- M2 is M - 1, N2 is N - 1, ack(M, N2, V2), ack(M2, V2, V).
+11
+12
+13kind nat type.
+14type s nat -> nat.
+15type zero nat.
+16
+17pred ack i:nat, i:nat, o:nat.
+18ack zero N V :- !, V = (s N).
+19
+20ack M zero V :- !, (s M2) = M, ack M2 (s zero) V.
+21
+22ack M N V :- (s M2) = M, (s N2) = N, ack M N2 V2, ack M2 V2 V.
+23
+24main :- ack (s (s (s zero))) (s zero) V.
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ackermann.elpi", line 24, column 39, characters 795-795:
+V is linear: name it _V (discard) or V_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/asclause.elpi +:

+
 1kind tm type.
+ 2type lam (tm -> tm) -> tm.
+ 3
+ 4pred hard i:tm.
+ 5hard (lam x\ _ as P) :- print P.
+ 6
+ 7pred simple i:int.
+ 8simple (1 as P) :- print P.
+ 9
+10main :-
+11  simple 1, hard (lam x\ x).
+
+
+
1
+lam c0 \ c0
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/beta.elpi +:

+
1kind tm type.
+2type f tm -> tm -> tm.
+3type a, b tm.
+4
+5main :- X = (x\ y\ f x y), X a b = f a b.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/block.elpi +:

+
1namespace xxx {
+2 foo.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/block.elpi", line 1, column 0, characters 0-15:
+matching } is missing
+
+
+

../../tests/sources/chr.elpi +:

+
 1kind term type.
+ 2type app term -> term -> term.
+ 3type lam (term -> term) -> term.
+ 4
+ 5kind ty type.
+ 6type arr ty -> ty -> ty.
+ 7type nat ty.
+ 8type bool ty.
+ 9
+10pred term i:term, o:ty.
+11term (app HD ARG) TGT :- term HD (arr SRC TGT), term ARG SRC.
+12term (lam F) (arr SRC TGT) :- pi x\ term x SRC => term (F x) TGT.
+13term (uvar as X) T :- declare_constraint (term X T) [X].
+14
+15pred len i:list A, o:int.
+16len [] 0.
+17len [_|XS] N :- len XS M, N is M + 1.
+18
+19constraint term {
+20  rule
+21     \ (term (uvar K LX) _) (term (uvar K LY) _)
+22     | (len LX N, len LY M, not(N = M))
+23   <=> (print "wrong arity" K, false).
+24
+25  rule (GX ?- term (uvar K LX) TX)
+26     \ (GY ?- term (uvar K LY) TY)
+27     | (print "compat" GX "|-" K LX TX "," GY "|-" K LY TY, 
+28        compatible GX LX GY LY CTXCONSTR)
+29   <=> (print "NEW" CTXCONSTR TX "=" TY, CTXCONSTR, TX = TY).
+30
+31}
+32
+33pred compatible o:list prop, o:list term,o:list prop,o:list term,o:list prop.
+34compatible _ [] _ [] [] :- !.
+35compatible GX [X|XS] GY [Y|YS] [TX = TY | K] :-
+36 (GX => term X TX),
+37 (GY => term Y TY),
+38 !,
+39 compatible GX XS GY YS K.
+40compatible _ _ _ _ [false].
+41
+42main :-
+43  (term (lam x\ lam y\ app (app (F x y) x) y) T1_, 
+44   term (lam y\ lam x\ app (app (F x y) y) x) T2_),
+45  print "1",
+46  (term (lam x \ X x) (arr A_ nat),
+47   term (lam x \ X x) (arr bool B_)),
+48  print "2",
+49  not(term (lam x \ Y x) (arr C nat), term (lam x \ Y x) (arr bool C)),
+50  not(term (lam x \ Z x) (arr nat nat), term (lam x \ Z x) (arr bool D_)).
+51
+
+
+
compat [term c1 (uvar frozen--389 []), term c0 (uvar frozen--390 [])] |-
+ frozen--382 [c1, c0]
+ arr (uvar frozen--383 [c0, c1])
+  (arr (uvar frozen--384 [c0, c1]) (uvar frozen--385 [])) ,
+ [term c3 (uvar frozen--387 []), term c2 (uvar frozen--386 [])] |- frozen--382
+ [c2, c3]
+ arr (uvar frozen--386 []) (arr (uvar frozen--387 []) (uvar frozen--388 []))
+NEW [X0 = X1, X2 = X3] arr (X4 c0 c1) (arr (X5 c0 c1) X6) = arr X1 (arr X3 X7)
+1
+compat [term c0 bool] |- frozen--395 [c0] uvar frozen--396 [] ,
+ [term c1 (uvar frozen--397 [])] |- frozen--395 [c1] nat
+NEW [bool = X8] X9 = nat
+2
+compat [term c0 bool] |- frozen--402 [c0] uvar frozen--403 [] ,
+ [term c1 (uvar frozen--403 [])] |- frozen--402 [c1] nat
+NEW [bool = X10] X10 = nat
+compat [term c0 bool] |- frozen--408 [c0] uvar frozen--409 [] , [term c1 nat]
+ |- frozen--408 [c1] nat
+NEW [bool = nat] X11 = nat
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ {c0} : term c0 bool ?- term (X12 c0) nat  /* suspended on X12 */
+ {c0 c1} : term c1 X13, term c0 X13 ?- term (X14 c1 c0) (arr X13 (arr X13 X6))  /* suspended on X14 */
+
+State:
+
+
+

../../tests/sources/chrGCD.elpi +:

+
 1pred gcd i:int, i:group.
+ 2kind group type.
+ 3type group-1 group.
+ 4type group-2 group.
+ 5
+ 6gcd A (uvar as B) :- !, declare_constraint (gcd A B) [B].
+ 7
+ 8% assert result is OK
+ 9gcd 11 group-1 :- print "group 1 solved".
+10gcd 7 group-2 :- print "group 2 solved".
+11
+12main :- gcd 99 X, gcd 66 X, gcd 14 Y, gcd 22 X, gcd 77 Y,
+13        % we then force a resumption to check only GCDs are there
+14        X = group-1, Y = group-2.
+15
+16constraint gcd {
+17  rule (gcd A _) \ (gcd B _) | (A = B).
+18  rule (gcd A _) \ (gcd B X) | (A < B) <=> (C is (B - A), gcd C X).
+19}
+
+
+
group 1 solved
+group 2 solved
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/chrLEQ.elpi +:

+
 1pred leq i:int, i:int.
+ 2leq (uvar as A) (uvar as B) :- !,  declare_constraint (leq A B) [A,B].
+ 3leq A         (uvar as B) :- !,  declare_constraint (leq A B) [B].
+ 4leq (uvar as A) B         :- !,  declare_constraint (leq A B) [A].
+ 5
+ 6pred ltn i:int, i:int.
+ 7ltn (uvar as A) (uvar as B) :- !,  declare_constraint (ltn A B) [A,B].
+ 8ltn A         (uvar as B) :- !,  declare_constraint (ltn A B) [B].
+ 9ltn (uvar as A) B         :- !,  declare_constraint (ltn A B) [A].
+10
+11main :-
+12  leq A B, leq B C, not (ltn C A), ltn A B, not(A = C).
+13
+14constraint leq ltn {
+15  % incompat (FIRST!!)
+16  rule (leq X Y) (ltn Y X) <=> false.
+17  rule (ltn X Y) (ltn Y X) <=> false.
+18  rule (ltn X X) <=> false.
+19  
+20  % refl
+21  rule \ (leq X X).
+22
+23  % atisym
+24  rule (leq X Y) \ (leq Y X) <=> (Y = X).
+25
+26  % trans
+27  rule (leq X Y) (leq Y Z) <=> (leq X Z).
+28  rule (leq X Y) (ltn Y Z) <=> (ltn X Z).
+29  rule (ltn X Y) (leq Y Z) <=> (ltn X Z).
+30  rule (ltn X Y) (ltn Y Z) <=> (ltn X Z).
+31
+32  % idempotence
+33  rule (leq X Y) \ (leq X Y).
+34  rule (ltn X Y) \ (ltn X Y).
+35
+36}
+37
+38% vim:set ft=lprolog:
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.001
+
+Constraints:
+ ltn X0 X1  /* suspended on X0, X1 */ leq X0 X1  /* suspended on X0, X1 */
+ leq X2 X1  /* suspended on X2, X1 */ ltn X0 X2  /* suspended on X0, X2 */
+ leq X0 X2  /* suspended on X0, X2 */
+
+State:
+
+
+

../../tests/sources/chr_nokey.elpi +:

+
 1type test int -> prop.
+ 2
+ 3main :- declare_constraint (test 1) [_], declare_constraint (test 2) [_].
+ 4
+ 5constraint test {
+ 6
+ 7 :name "fst"
+ 8 rule (test 1) \ (test 2).
+ 9
+10 rule (test 2) <=> fail.
+11
+12}
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ test 1  /* suspended on X0 */
+
+State:
+
+
+

../../tests/sources/chr_nokey2.elpi +:

+
1type foo any.
+2type bar any -> any.
+3
+4main :- declare_constraint foo [], declare_constraint (bar X) [], X.
+5
+6constraint foo bar { rule foo (bar _) <=> false. rule (bar X) <=> (X = true). }
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ bar true  /* suspended on  */ foo  /* suspended on  */
+
+State:
+
+
+

../../tests/sources/chr_not_clique.elpi +:

+
1constraint a {
+2
+3  rule b.
+4
+5}
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/chr_not_clique.elpi", line 1, column 14, characters 14-24:
+CHR rule File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/chr_not_clique.elpi", line 1, column 14, characters 14-24:: matches b which is not a constraint on which it is applied. Check the list of predicates after the "constraint" keyword.
+
+
+

../../tests/sources/chr_sem.elpi +:

+
 1type a, b, c, d any.
+ 2main :- declare_constraint a [_],
+ 3        declare_constraint b [_],
+ 4        declare_constraint b [_],
+ 5        declare_constraint d [_].
+ 6
+ 7constraint a b c d {
+ 8 rule a (d) \ b b <=> (print c, declare_constraint c [_]).
+ 9 rule c c <=> fail.
+10
+11}
+
+
+
c
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ c  /* suspended on X0 */ d  /* suspended on X0 */ a  /* suspended on X0 */
+
+State:
+
+
+

../../tests/sources/conj2.elpi +:

+
1pred test1.
+2pred test2.
+3main :- test1, test2.
+4
+5test1 :- true & true & true.
+6test2 :- X = [true & true, false], std.length X 2.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/ctx_loading.elpi +:

+
 1constraint a b c d1 d2 d3 d11 d22 d33 {
+ 2  rule (C ?- d1 X) | (print C) <=> (C ?- declare_constraint (d11 X) [X]).
+ 3  rule (C ?- d2 X) | (print C) <=> (C ?- declare_constraint (d22 X) [X]).
+ 4  rule (C ?- d3 X) | (print C) <=> (C ?- declare_constraint (d33 X) [X]).
+ 5  rule \ (C ?- d1 X) (C ?- d11 X).
+ 6  rule \ (C ?- d2 X) (C ?- d22 X).
+ 7  rule \ (C ?- d3 X) (C ?- d33 X).
+ 8}
+ 9type p prop -> prop.
+10type a prop.
+11type b prop.
+12type c prop.
+13type d1, d2, d3, d11, d22, d33 prop -> prop.
+14
+15main :-
+16  p b => p a => p W, !, W = a,
+17  [p a, p b] => p Y, !, Y = a, 
+18  (p a, p b) => p Z, !, Z = a,
+19  [a, b, c] =>   declare_constraint (d1 X) [X],
+20  c => b => a => declare_constraint (d2 X) [X],
+21  (a, b, c) =>   declare_constraint (d3 X) [X],
+22  X = a.
+23	
+
+
+
[a, b, c]
+[a, b, c]
+[a, b, c]
+
+
+
Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 17, column 3, characters 517-533:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 17, column 3, characters 517-533:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 17, column 3, characters 517-533:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 21, column 3, characters 676-719:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 20, column 3, characters 628-671:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 19, column 3, characters 580-623:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 18, column 3, characters 549-565:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 17, column 3, characters 517-533:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/ctx_loading.elpi", line 16, column 3, characters 486-502:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+
+Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/cut.elpi +:

+
 1/* To test: query q X. The only answer should be X = ok. */
+ 2
+ 3kind tm type.
+ 4type two, three, four, ok, ko tm.
+ 5
+ 6type a, b, c, q tm -> prop.
+ 7
+ 8q X :- a X.
+ 9q ok.
+10
+11a ko :- b Y, !, c Y.
+12a two.
+13
+14b three.
+15b four.
+16
+17c four.
+18
+19main :- q X, X = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/cut2.elpi +:

+
 1/* To test run q X; the only expected result is X=ok.
+ 2   This is different from the brain-damaged semantics of Teyjus
+ 3   and consistent with the implicit declaration
+ 4   ; A B :- A.
+ 5   ; A B :- B
+ 6*/
+ 7kind i type.
+ 8type one i.
+ 9type x i -> diagnostic -> prop.
+10type two i.
+11type q diagnostic -> prop.
+12type ko2 diagnostic.
+13type ko1 diagnostic.
+14type e diagnostic -> prop.
+15type c i -> prop.
+16
+17q X :- c Y, !, x Y X ; e X.
+18q ok.
+19
+20c one.
+21c two.
+22
+23x two ko1.
+24
+25e ko2.
+26
+27main :- q X, X = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/cut3.elpi +:

+
 1% Test with q X; should yield X=ok
+ 2
+ 3kind i type.
+ 4type ko i.
+ 5type ok i.
+ 6type q i -> prop.
+ 7type c i -> prop.
+ 8type b prop.
+ 9type a i -> prop.
+10
+11q X :- a X, b, c X.
+12
+13a ko.
+14a ok.
+15
+16b :- !.
+17b.
+18
+19c ok.
+20
+21main :- q X, X = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/cut4.elpi +:

+
1% Test: main. Should not fail.
+2
+3main :- !.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/cut5.elpi +:

+
 1/* To test: query q X. The only answer should be X = ok. */
+ 2
+ 3kind i type.
+ 4type ko i.
+ 5type ok i.
+ 6type four i.
+ 7type two i.
+ 8type three i.
+ 9type q i -> prop.
+10type d i -> prop.
+11type c i -> prop.
+12type b i -> prop.
+13type a i -> prop.
+14
+15q X :- a X.
+16q ok.
+17a ko :- b Y, !, d Z, !, c Z.
+18a two.
+19b three.
+20b four.
+21c four.
+22d three.
+23d four.
+24main :- q X, X = ok.
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/cut5.elpi", line 17, column 11, characters 255-255:
+Y is linear: name it _Y (discard) or Y_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/cut6.elpi +:

+
 1% q X should yield X=ok
+ 2kind i type.
+ 3type ko i.
+ 4type ok i.
+ 5type q i -> prop.
+ 6type c i -> prop.
+ 7type b i -> prop.
+ 8type a i -> prop.
+ 9
+10q X :- a X, !.
+11q X :- b X.
+12a X :- c X, !.
+13c ok.
+14c ko.
+15b ko.
+16main :- q X, X = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/deep_indexing.elpi +:

+
 1% select should only find 2 clauses (the last 2) since indexing at level 3 drops the others
+ 2% ./elpi -test tests/sources/deep_indexing.elpi -no-tc -trace-on -trace-at run 1 300 -trace-only select
+ 3
+ 4kind term type.
+ 5type f term -> term.
+ 6type g term.
+ 7
+ 8:index(3)
+ 9pred find i:term.
+10find g.
+11find (f g).
+12find (f (f g)).
+13find (f (f (f g))).
+14find (f (f (f (f g)))).
+15
+16
+17main :- find (f (f (f g))).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/discard.elpi +:

+
1type foo int.
+2type bar int.
+3main :-
+4  foo = _,
+5  _ = 4,
+6  _ = "",
+7  _ = _,
+8  _Foo = bar,
+9  pi x \ _Foo = x.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/elpi_only_llam.elpi +:

+
1:untyped main :- p (F X) F X => p (f x) f x.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+Fatal error:
+Unification problem outside the pattern fragment. ((Data.Term.App (f, (Data.Term.Const x), [])) == (Data.Term.AppUVar (
+   { Data.Term.contents = please extend this printer; uid_private = 2 }, 0,
+   [(Data.Term.UVar (
+       { Data.Term.contents = please extend this printer; uid_private = 1 },
+       0, 0))
+     ]
+   ))) Pass -delay-problems-outside-pattern-fragment (elpi command line utility) or set delay_outside_fragment to true (Elpi_API) in order to delay (deprecated, for Teyjus compatibility).
+
+
+

../../tests/sources/end_comment.elpi +:

+
1main.
+2% foo 
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/eta.elpi +:

+
 1kind tm type.
+ 2type c (tm -> A) -> tm.
+ 3macro @ctx A :- c (_\ A). % to have depth > 0 in unif
+ 4
+ 5% to test the indexing
+ 6:untyped k1 (x\ g x).
+ 7:untyped k2 g.
+ 8
+ 9%mode (foo i i).
+10pred foo i:(X -> X), i:(X -> X -> X).
+11foo X (x1 \ (x2 \ X x2)) :- (print X).
+12%% Fails, but should output `y`
+13
+14:untyped main :-
+15  pi f y\
+16    % 4 branches in unif
+17    @ctx (x\ f x) = @ctx f,
+18    @ctx f = @ctx (x\ f x),
+19    @ctx (x\ f y x) = @ctx (f y),
+20    @ctx (f y) = @ctx (x\ f y x),
+21
+22    % put some uvar around
+23    @ctx (f (X y)) = @ctx (x\ f y x), print X,
+24    @ctx (x\ f y x) = @ctx (f (Y y)), print Y,
+25
+26    % index + adepth=2 <> bdepth=0
+27    k1 g,
+28    k2 (x\ g x),
+29    
+30    % regression #135
+31    foo y (x1 \ (x2 \ y x2))
+32.
+
+
+
c2 \ c2
+c2 \ c2
+c1
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/eta_as.elpi +:

+
  1pred as_1 i:any.
+  2pred as_2 i:any.
+  3pred as_3 i:any.
+  4
+  5pred uvar_1 i:any.
+  6pred uvar_2 i:any.
+  7pred uvar_3 i:any.
+  8pred uvar_4 i:A.
+  9pred uvar_5 i:A.
+ 10pred uvar_6 i:A.
+ 11
+ 12pred tests-as.
+ 13pred tests-uvar.
+ 14pred tests-var.
+ 15pred tests-unif.
+ 16pred tests-declare-constraint.
+ 17
+ 18type bar variadic any any.
+ 19type c variadic any any.
+ 20uvar_1 (bar (uvar K Args)) :- std.assert! (var K) "uvar_1 bar X, not a var", print K Args.
+ 21uvar_2 (bar X) :- std.assert! (var X K Args) "uvar_2 bar X, not a var", print K Args.
+ 22uvar_3 (uvar K) :- std.assert! (var K) "uvar_3 X, not a var", print K.
+ 23uvar_4 (uvar K Args) :- std.assert! (var K) "uvar_4 X, not a var", std.assert! (distinct_names Args) "uvar_4 not in pattern".
+ 24uvar_5 (uvar K Args) :- std.assert! (var K) "uvar_5 X, not a var", distinct_names Args.
+ 25
+ 26uvar_6 X :- fail.
+ 27uvar_6 (uvar as X) :- print X.
+ 28
+ 29as_1 (bar (uvar as K)) :- std.assert! (var K) "bar (uvar as_1 X), not a var", print K.
+ 30as_2 (uvar as K) :- std.assert! (var K) "uvar as_2 X, not a var", print K.
+ 31as_3 (uvar as K) :- std.assert! (var K) "uvar as_3 X, not a var", print K.
+ 32
+ 33pred unif_1 o:any.
+ 34pred unif_2 o:any.
+ 35
+ 36unif_1 (x\ X x).
+ 37unif_2 (x\ y\ X x y).
+ 38
+ 39type u any.
+ 40
+ 41tests-uvar :-
+ 42  print "--------- uvar_1",
+ 43  not(uvar_1 (bar (x \ u))),
+ 44  print "--------- uvar_2",
+ 45  (pi x \ (uvar_2 (bar (X x)))),
+ 46  print "--------- uvar_3",
+ 47  not (uvar_3 (x \ X0)),
+ 48  print "--------- uvar_3 bis",
+ 49  uvar_3 (x \ y\ X01 x y),
+ 50  print "--------- uvar_4",
+ 51  uvar_4 X1,
+ 52  print "--------- uvar_4 bis",
+ 53  not(uvar_4 (x \ X2)),
+ 54  print "--------- uvar_4 ter",
+ 55  uvar_4 (x \ X3 x),
+ 56  print "--------- uvar_4 quater",
+ 57  (pi u\ uvar_4 (x \ X4 u x)),
+ 58  print "--------- uvar_5",
+ 59  not (uvar_5 (x \ X5 u x)),
+ 60  print "--------- uvar_6",
+ 61  uvar_6 (x \ X6 x), var X6.
+ 62
+ 63tests-as :-
+ 64  print "---------- as_1",
+ 65  not(as_1 (x \ bar u)), % fails because (bar (uvar as K) x ==!== bar u)
+ 66  print "---------- as_1 bis",
+ 67  not(as_1 (x \ bar u x)), % fails because u is not flexible (input mode)
+ 68  print "---------- as_1 ter",
+ 69     (as_1 (x \ bar (X2 x) x)), % works but X2 is pruned
+ 70       (pi a\ var (X2 a) _ []), % assert pruning of X2
+ 71  print "---------- as_2",
+ 72     (as_2 (x \ X1 x)) , % works
+ 73       (pi a\ var (X1 a) _ [a]), % assert X1 was not pruned
+ 74  print "---------- as_3",
+ 75  not (as_3 (x \ X0)).
+ 76
+ 77tests-unif :-
+ 78    print "---------- unif_1",
+ 79    unif_1 X,
+ 80    print "---------- unif_1 bis",
+ 81    unif_1 (x\ X1 x),
+ 82    print "---------- unif_1 ter",
+ 83    unif_1 (x\ y\ X2 x y),
+ 84    print "---------- unif_2",
+ 85    unif_2 X3,
+ 86    print "---------- unif_2 bis",
+ 87    unif_2 (x\ X4 x),
+ 88    print "---------- unif_2 ter",
+ 89    unif_2 (x\ y\ X5 x y),
+ 90    print "---------- unif_zero",
+ 91    (x\ X6 x) = X6.
+ 92
+ 93tests-var :-
+ 94    print "---------- var 1",
+ 95   pi x \ (var (y \ X x y)),
+ 96    print "---------- var 2",
+ 97   pi x \ (var (y \ X c y)), 
+ 98    print "---------- var 3",
+ 99   pi x z \ (var (y \ X x y)).
+100
+101tests-declare-constraint :-
+102  declare_constraint false [x\ X x],
+103  not(X = _\1).
+104
+105main :- tests-uvar, tests-as, tests-unif, tests-var, tests-declare-constraint.
+
+
+
--------- uvar_1
+--------- uvar_2
+X0 [c0]
+--------- uvar_3
+--------- uvar_3 bis
+X1
+--------- uvar_4
+--------- uvar_4 bis
+--------- uvar_4 ter
+--------- uvar_4 quater
+--------- uvar_5
+--------- uvar_6
+c0 \ X2 c0
+---------- as_1
+---------- as_1 bis
+---------- as_1 ter
+X3
+---------- as_2
+c0 \ X4 c0
+---------- as_3
+---------- unif_1
+---------- unif_1 bis
+---------- unif_1 ter
+---------- unif_2
+---------- unif_2 bis
+---------- unif_2 ter
+---------- unif_zero
+---------- var 1
+---------- var 2
+---------- var 3
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 26, column 8, characters 781-781:
+X is linear: name it _X (discard) or X_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 36, column 12, characters 1112-1114:
+X is linear: name it _X (discard) or X_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 37, column 15, characters 1132-1136:
+X is linear: name it _X (discard) or X_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 45, column 24, characters 1276-1279:
+X is linear: name it _X (discard) or X_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 47, column 20, characters 1333-1334:
+X0 is linear: name it _X0 (discard) or X0_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 49, column 18, characters 1388-1394:
+X01 is linear: name it _X01 (discard) or X01_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 51, column 10, characters 1435-1436:
+X1 is linear: name it _X1 (discard) or X1_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 53, column 19, characters 1489-1490:
+X2 is linear: name it _X2 (discard) or X2_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 55, column 15, characters 1541-1544:
+X3 is linear: name it _X3 (discard) or X3_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 57, column 22, characters 1604-1609:
+X4 is linear: name it _X4 (discard) or X4_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 59, column 20, characters 1661-1666:
+X5 is linear: name it _X5 (discard) or X5_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 75, column 18, characters 2253-2254:
+X0 is linear: name it _X0 (discard) or X0_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 79, column 12, characters 2316-2316:
+X is linear: name it _X (discard) or X_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 81, column 16, characters 2369-2372:
+X1 is linear: name it _X1 (discard) or X1_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 83, column 19, characters 2429-2434:
+X2 is linear: name it _X2 (discard) or X2_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 85, column 12, characters 2480-2481:
+X3 is linear: name it _X3 (discard) or X3_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 87, column 16, characters 2534-2537:
+X4 is linear: name it _X4 (discard) or X4_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/eta_as.elpi", line 89, column 19, characters 2594-2599:
+X5 is linear: name it _X5 (discard) or X5_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ false  /* suspended on X5 */
+
+State:
+
+
+

../../tests/sources/even-odd.elpi +:

+
 1kind nat type.
+ 2type zero nat.
+ 3type succ nat -> nat.
+ 4
+ 5pred odd i:nat.
+ 6pred even i:nat.
+ 7pred double i:nat, o:nat.
+ 8
+ 9even zero.
+10odd (succ X) :- even X.
+11even (succ X) :- odd X.
+12even X :- var X, declare_constraint (even X) [X].
+13odd X :- var X, declare_constraint (odd X) [X].
+14
+15double zero zero.
+16double (succ X) (succ (succ Y)) :- double X Y.
+17double X Y :- var X, declare_constraint (double X Y) [X].
+18
+19main :- odd X, not(X = zero), not(double Z X).
+20
+21constraint even odd double {
+22  rule (even X) (odd X) <=> fail.
+23  rule (double _ Y) <=> (even Y).
+24}
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/even-odd.elpi", line 19, column 42, characters 437-437:
+Z is linear: name it _Z (discard) or Z_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ odd X0  /* suspended on X0 */
+
+State:
+
+
+

../../tests/sources/findall.elpi +:

+
 1pred p o:int, o:int.
+ 2pred q o:int, o:int.
+ 3p 1 1.
+ 4p 1 2.
+ 5p 2 2.
+ 6
+ 7type test1, test2, test3, test4, test5 prop.
+ 8
+ 9test1 :- std.findall (p A B) [p 1 1, p 1 2, p 2 2].
+10test2 :- std.findall (p _ _) [p X 1, p 1 2, p 2 2], not(var X).
+11test3 :-
+12  pi q\
+13    q 1 1 =>
+14    q 1 2 =>
+15    q 2 2 =>
+16      (std.findall (q _ _) [q X 2, q 1 2, q 1 1], not (var X)).
+17
+18
+19test4 :-
+20  pi q\
+21    q 1 A =>
+22    q 2 A =>
+23      (std.findall (q _ _) [q 2 X, q 1 Y], not(same_var X Y)).
+24% this is super tricky but hard to implement differently.
+25% q _ _ -> q A^1 B^1
+26% q A^1 B^1 == q 1 X0 --restrict--> X0 := X1,  A1 := _\X1
+27% when we backtrack the "restriction" on X0 is lost
+28
+29test5 :-
+30  pi q\
+31    q 1 A =>
+32    q 2 A =>
+33      (std.findall (q _ Z) [q 2 X, q 1 Y], same_var X Y).
+34% this works because there is no restriction
+35
+36main :- test1, print 1,
+37        test2, print 2,
+38        test3, print 3,
+39        test4, print 4,
+40        test5, print 5.
+
+
+
1
+2
+3
+4
+5
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/findall.elpi", line 9, column 25, characters 135-135:
+A is linear: name it _A (discard) or A_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/findall.elpi", line 9, column 27, characters 137-137:
+B is linear: name it _B (discard) or B_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/findall.elpi", line 33, column 25, characters 712-712:
+Z is linear: name it _Z (discard) or Z_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/fragment_exit.elpi +:

+
1:untyped q Y :- pi d\ r Y.
+2:untyped r _.
+3:untyped main :- pi c\ q (x\ X c x).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/fragment_exit2.elpi +:

+
1:untyped ignore _.
+2:untyped main :- pi c\ Y c = (x\ X c x), ignore (Y c d).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/fragment_exit3.elpi +:

+
1:untyped ignore _.
+2:untyped main :- (pi c\ sigma Y\ X c = Y), ignore (X (f d)).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/general_case.elpi +:

+
 1kind i type.
+ 2type app (prop -> prop) -> prop -> prop.
+ 3type ignore, foo A -> prop.
+ 4type c prop.
+ 5app F X :- F X. 
+ 6c.
+ 7ignore _.
+ 8foo P :- pi d\ ignore P.
+ 9main :- app (x\x) c, F = (y\y), F c, (pi d\ F c),
+10        foo (G c).
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/general_case.elpi", line 10, column 13, characters 213-216:
+G is linear: name it _G (discard) or G_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/general_case2.elpi +:

+
1:untyped p F :- F (x\ c x).
+2:untyped q (x\ c x).
+3:untyped main :- p (y\ pi z\ q y).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/general_case3.elpi +:

+
1:untyped main :-
+2 (pi c\ sigma X\ pi d\ (X d = f c d, Y c = X)),
+3 Y = c\ d\ f c d.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/hc_interp.elpi +:

+
 1/*
+ 2 * An interpreter for the logic of Horn clauses. This code illustrates 
+ 3 * the usefulness of beta reduction in realizing substitution. Also note
+ 4 * the use of the logic variable in the third clause for try_clause.
+ 5 */
+ 6
+ 7%module  hc_interp.
+ 8
+ 9%accumulate lists.
+10
+11%reduce (app (lam F) T) R :- pi x\ copy x T => copy (F x) (R' x), R = R' x.
+12kind i type.
+13type a i.
+14type xcons i -> i -> i.
+15type xnil i.
+16type try_clause i -> i -> i -> prop.
+17type tru i.
+18type test2 prop.
+19type test1 prop.
+20type subst (i -> i) -> i -> i -> prop.
+21type perp i.
+22type or i -> i -> i.
+23type memb i -> i -> prop.
+24type imp i -> i -> i.
+25type hc_interp i -> i -> prop.
+26type f i -> i.
+27type copy i -> i -> prop.
+28type c i.
+29type box (i -> i) -> i.
+30type backchain i -> i -> prop.
+31type b i.
+32type and i -> i -> i.
+33type all (i -> i) -> i.
+34
+35copy (and B1 C1) (and B2 C2) :- copy B1 B2, copy C1 C2.
+36copy (or B1 C1) (or B2 C2) :- copy B1 B2, copy C1 C2.
+37copy (box F1) (box F2) :- pi x\ copy x x => copy (F1 x) (F2 x).
+38copy a a.
+39copy b b.
+40copy c c.
+41copy (f X) (f Y) :- copy X Y.
+42copy tru tru.
+43copy perp perp.
+44
+45% a[t/b] = a
+46
+47% b[t/b] = t
+48
+49subst B T B1 :- pi x\ copy x T => (copy (B x) (B2 x), B2 x = B1).
+50 
+51% perp is a fail.
+52% hc_interp Cs G means Cs |- G
+53%hc_interp _ tru.
+54
+55%hc_interp Cs (box B) :- !, hc_interp Cs (B T).
+56hc_interp Cs (box B)  :- !, subst B T B1, hc_interp Cs B1.
+57hc_interp Cs (and B C) :- !, hc_interp Cs B , hc_interp Cs C.
+58hc_interp Cs (or B C) :- !, (hc_interp Cs B ; hc_interp Cs C).
+59hc_interp Cs A  :-  backchain Cs A.
+60% why there is no rule in teyjus: hc_interp Cs (all B) :- .... ?
+61
+62backchain Cs A :- memb D Cs, try_clause Cs D A.
+63
+64memb X (xcons X _).
+65memb X (xcons Y L) :- memb X L.
+66
+67
+68% try_clause Cs A B means Cs, A |- B
+69try_clause Cs (and D1 D2) A :- 
+70     !, (try_clause Cs D1 A ; try_clause Cs D2 A).
+71% try_clause Cs (all D) A :- !, try_clause Cs (D T) A.
+72try_clause Cs (all D) A :- !, subst D T D1, try_clause Cs D1 A.
+73try_clause Cs A A.
+74try_clause Cs (imp G A) A :- hc_interp Cs G.
+75
+76%prog (xcons (adj a b) (xcons (adj b c) (xcons (adj c (f c))
+77%      (xcons (all X\ (all Y\ (imp (adj X Y) (path X Y))))
+78%      (xcons (all X\ (all Y\ (all Z\ (imp (and (adj X Y) (path Y Z)) 
+79%                                           (path X Z))))) xnil))))).
+80
+81%pathfroma X :- prog Cs, hc_interp Cs (path a X).
+82
+83test1 :- %Cs = (xcons a (xcons b (xcons c xnil))),
+84        %try_clause Cs (and a (or b c)) (or (and a b) (and a c)).
+85        hc_interp (xcons a (xcons (imp b c) (xcons (imp a b) xnil))) c.
+86
+87test2 :- Cs = xcons (f a) xnil, 
+88        hc_interp Cs (box f).
+89
+90main :- test1, test2.
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hc_interp.elpi", line 56, column 37, characters 1311-1311:
+T is linear: name it _T (discard) or T_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hc_interp.elpi", line 65, column 15, characters 1644-1644:
+Y is linear: name it _Y (discard) or Y_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hc_interp.elpi", line 72, column 39, characters 1877-1877:
+T is linear: name it _T (discard) or T_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hc_interp.elpi", line 73, column 12, characters 1914-1915:
+Cs is linear: name it _Cs (discard) or Cs_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/hdclause.elpi +:

+
 1kind foo type.
+ 2
+ 3type a ((int -> foo) -> foo) -> foo.
+ 4type b foo -> foo.
+ 5
+ 6type p (foo -> foo) -> foo -> prop.
+ 7type q (foo -> foo) -> foo -> prop.
+ 8
+ 9p K (a f\ K (f 0)).
+10q K R :- R = (a f\ K (f 0)).
+11
+12main :-
+13  (pi y\ p b (F y)),
+14  (pi y\ q b (F y)),
+15  (pi x y\ q b (F y)),
+16  (pi x y\ p b (F y)).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/heap_discard.elpi +:

+
1main :-
+2  X = [_,2],
+3  X = [1,2],
+4  not(X = [2,2]),
+5  pi a b\ Y b = [_], b = _.
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/heap_discard.elpi", line 5, column 11, characters 63-65:
+Y is linear: name it _Y (discard) or Y_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/ho.elpi +:

+
1% q(a): OK; q(b): FAIL; q(X): exception; q(a,a): OK; q(true): OK.
+2
+3pred q i:(pred).
+4q(X) :- X.
+5
+6pred a.
+7a.
+8
+9main :- q a, q (a,a), q true.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/hollight.elpi +:

+
   1/* Untrusted predicates called from the kernel:
+   2 * next_object            next object to check
+   3 * callback_proved        proof completed
+   4 * next_tactic            next tactic to use
+   5 * update_certificate     get new certificate after tactic application
+   6 * end_of_proof           is the certificate/proof empty?
+   7 * ppterm                 for pretty-printing messages
+   8 * deftac                 tactic definition
+   9 */
+  10
+  11/* Predicates exported from the trusted library:
+  12 * append
+  13 * fold2_append
+  14 * put_binds
+  15 */
+  16 
+  17/* Predicates exported from the kernel:
+  18 * proves
+  19 * check
+  20 */
+  21
+  22{ /***** Trusted code base *******/
+  23
+  24/***** Trusted library functions *****/
+  25
+  26/* The names with ' at the end are trusted; the ones without are
+  27   exported and therefore untrusted. */
+  28local append', fold2_append', put_binds'.
+  29
+  30append' [] L L.
+  31append' [ X | XS ] L [ X | RES ] :- append' XS L RES.
+  32append A B C :- append' A B C.
+  33
+  34fold2_append' [] [] _ [].
+  35fold2_append' [ X | XS ] [ Y | YS ] F OUTS :-
+  36 F X Y OUT, fold2_append' XS YS F OUTS2, append' OUT OUTS2 OUTS.
+  37fold2_append A B C D :- fold2_append' A B C D.
+  38
+  39% put_binds : list 'b -> 'a -> 'c -> list (bounded 'b) -> o
+  40% put_binds [ f1,...,fn ] x t [ bind t x \ f1,...,bind t x fn ]
+  41% binding all the xs that occur in f1,...,fn
+  42put_binds' [] _ _ [].
+  43put_binds' [ YX | YSX ] X A [ bind A Y | YYS ] :-
+  44 YX = Y X, put_binds' YSX X A YYS.
+  45put_binds A B C D :- put_binds' A B C D.
+  46
+  47/***** The HOL kernel *****/
+  48
+  49local thm, provable, def0, term, typ, typ', loop, prove, check1,
+  50 check1def, check1thm, check1axm, check1nbt,
+  51 reterm, not_defined, check_hyps.
+  52
+  53proves T TY :- provable T TY.
+  54
+  55typ T :- !. % this line temporarily drops checking of well-formedness for types
+  56            % to avoid too much slow down. It is ultimately due to re-typing
+  57            % terms that should be recognized as already well typed.
+  58typ T :- var T, !, declare_constraint (typ T) [ T ].
+  59typ T :- typ' T.
+  60typ' prop.
+  61typ' (univ ## A ## B) :- typ A, typ B.
+  62typ' (A --> B) :- typ A, typ B.
+  63typ' (disj_union ## A ## B) :- typ A, typ B.
+  64
+  65pred term i:A, o:B.
+  66term (lam A F) (A --> B) :- typ A, pi x\ term x A => term (F x) B.
+  67term (F # T) B :- term F (A --> B), term T A.
+  68term (eq ## A) (A --> A --> prop) :- typ A.
+  69term (uvar as T) TY :- declare_constraint (term T TY) T.
+  70
+  71/* like term, but on terms that are already known to be well-typed */
+  72pred reterm i:A, o:B.
+  73reterm (lam A F) (A --> B) :- pi x\ reterm x A => reterm (F x) B.
+  74reterm (F # T) B :- reterm F (A --> B).
+  75reterm (eq ## A) (A --> A --> prop).
+  76reterm (uvar as T) TY :- declare_constraint (reterm T TY) T.
+  77
+  78constraint term reterm { /* No propagation rules for now */}
+  79
+  80% thm : bounded tactic -> bounded sequent -> list (bounded sequent) -> o
+  81thm C (seq Gamma G) _ :- debug, print Gamma "|- " G " := " C, fail.
+  82
+  83/* << HACKS FOR DEBUGGING */
+  84thm daemon (seq Gamma F) [].
+  85/* >> HACKS FOR DEBUGGING */
+  86
+  87thm r (seq Gamma (eq ## _ # X # X)) [].
+  88thm (t Y) (seq Gamma (eq ## A # X # Z))
+  89 [ seq Gamma (eq ## A # X # Y), seq Gamma (eq ## A # Y # Z) ] :- term Y A.
+  90thm (m P) (seq Gamma Q) [ seq Gamma (eq ## prop # P # Q), seq Gamma P ] :- term P prop.
+  91thm b (seq Gamma (eq ## _ # ((lam _ F) # X) # (F X))) [].
+  92thm c (seq Gamma (eq ## B # (F # X) # (G # Y)))
+  93 [ seq Gamma (eq ## (A --> B) # F # G) , seq Gamma (eq ## A # X # Y) ] :- reterm X A, reterm Y A.
+  94thm k (seq Gamma (eq ## (A --> B) # (lam A S) # (lam A T)))
+  95 [ bind A x \ seq Gamma (eq ## B # (S x) # (T x)) ].
+  96thm s (seq Gamma (eq ## prop # P # Q)) [ seq (P :: Gamma) Q, seq (Q :: Gamma) P ].
+  97thm (h IGN) (seq Gamma P) [] :- append' IGN [ P | Gamma2 ] Gamma.
+  98
+  99thm d (seq Gamma (eq ## _ # C # A)) [] :- def0 C A.
+ 100thm (th NAME) (seq _ G) [] :- provable NAME G.
+ 101
+ 102thm (thenll TAC1 TACN) SEQ SEQS :-
+ 103 thm TAC1 SEQ NEW,
+ 104 deftacl TACN NEW TACL,
+ 105 fold2_append' TACL NEW thm SEQS.
+ 106
+ 107/*debprint _ (then _ _) :- !.
+ 108debprint _ (thenl _ _) :- !.
+ 109debprint O T :- print O T.*/
+ 110
+ 111thm TAC SEQ SEQS :-
+ 112 deftac TAC SEQ XTAC,
+ 113 /*debprint "<<" TAC,
+ 114 (*/ thm XTAC SEQ SEQS /*, debprint ">>" TAC
+ 115 ; debprint "XX" TAC, fail)*/.
+ 116
+ 117thm (! TAC) SEQ SEQS :-
+ 118 thm TAC SEQ SEQS,
+ 119 !.
+ 120
+ 121thm id SEQ [ SEQ ].
+ 122
+ 123thm (wl Gamma1) (seq Gamma F) [ seq WGamma F ] :-
+ 124 append' Gamma1 [ P | Gamma2 ] Gamma,
+ 125 append' Gamma1 Gamma2 WGamma.
+ 126
+ 127thm (bind A TAC) (bind A SEQ) NEWL :-
+ 128 pi x \ term x A => reterm x A => thm (TAC x) (SEQ x) (NEW x), put_binds' (NEW x) x A NEWL.
+ 129
+ 130thm ww (bind A x \ SEQ) [ SEQ ].
+ 131
+ 132/* debuggin only, remove it */
+ 133%thm A B C :- print "FAILED " (thm A B C), fail.
+ 134
+ 135% loop : list (bounded sequent) -> certificate -> o
+ 136%loop SEQS TACS :- print "LOOP" (loop SEQS TACS), fail.
+ 137loop [] CERTIFICATE :- end_of_proof CERTIFICATE.
+ 138loop [ SEQ | OLD ] CERTIFICATE :-
+ 139 next_tactic [ SEQ | OLD ] CERTIFICATE ITAC,
+ 140 thm ITAC SEQ NEW,
+ 141 append' NEW OLD SEQS,
+ 142 update_certificate CERTIFICATE ITAC NEW NEW_CERTIFICATE,
+ 143 loop SEQS NEW_CERTIFICATE.
+ 144
+ 145prove G TACS :-
+ 146 (term G prop, ! ; ppterm PG G, print "Bad statement:" PG, fail),
+ 147% (TACS = (false,_), ! ;
+ 148 loop [ seq [] G ] TACS
+ 149. % ).
+ 150
+ 151not_defined P NAME :-
+ 152 not (P NAME _) ; print "Error:" NAME already defined, fail.
+ 153
+ 154check_hyps HS (typ' TYPE) :-
+ 155 (not (typ' TYPE) ; print "Error:" TYPE already defined, fail), print HS new TYPE.
+ 156check_hyps HS (def0 NAME DEF) :- ppterm PDEF DEF, print HS NAME "=" PDEF.
+ 157check_hyps HS (term NAME TYPE) :-
+ 158 not_defined term NAME, ppterm PTYPE TYPE, print HS NAME ":" PTYPE.
+ 159check_hyps HS (reterm _ _).
+ 160check_hyps HS (provable NAME TYPE) :-
+ 161 not_defined provable NAME, ppterm PTYPE TYPE, print HS NAME ":" PTYPE.
+ 162check_hyps HS (H1,H2) :- check_hyps HS H1, check_hyps HS H2.
+ 163check_hyps HS (pi H) :- pi x \ typ' x => check_hyps [x | HS] (H x).
+ 164check_hyps HS (_ => H2) :- check_hyps HS H2.
+ 165
+ 166/* check1 I O
+ 167   checks the declaration I
+ 168   returns the new assumption O */
+ 169check1 (theorem NAME GOALTACTICS) HYPS :- check1thm NAME GOALTACTICS HYPS, !.
+ 170check1 (axiom NAME ST) HYPS :- check1axm NAME ST HYPS, !.
+ 171check1 (new_basic_type TYPE REP ABS REPABS ABSREP PREPH P_TACTICS) HYPS :- check1nbt TYPE REP ABS REPABS ABSREP PREPH P_TACTICS true HYPS, !.
+ 172check1 (def NAME TYPDEF) HYPS :- check1def NAME TYPDEF true HYPS, !.
+ 173check1 (decl NAME TYP) HYPS :- check1decl NAME TYP true HYPS, !.
+ 174
+ 175check1def NAME (pi I) HYPSUCHTHAT (pi HYPS) :-
+ 176 pi x \ typ' x => check1def (NAME ## x) (I x) (HYPSUCHTHAT, typ x) (HYPS x).
+ 177check1def NAME (TYP,DEF) HYPSUCHTHAT HYPS :-
+ 178 typ TYP, term DEF TYP,
+ 179 HYPS = ((HYPSUCHTHAT => term NAME TYP), reterm NAME TYP, def0 NAME DEF).
+ 180
+ 181check1decl NAME (pi I) HYPSUCHTHAT (pi HYPS) :-
+ 182 pi x \ typ' x => check1decl (NAME ## x) (I x) (HYPSUCHTHAT, typ x) (HYPS x).
+ 183check1decl NAME TYP HYPSUCHTHAT HYPS :-
+ 184 typ TYP, HYPS = ((HYPSUCHTHAT => term NAME TYP), reterm NAME TYP).
+ 185
+ 186check1thm NAME (pi I) (pi HYPS) :-
+ 187 pi x \ typ' x => check1thm NAME (I x) (HYPS x).
+ 188check1thm NAME (GOAL,TACTICS) (provable NAME GOAL) :-
+ 189  prove GOAL TACTICS,
+ 190  callback_proved NAME GOAL TACTICS.
+ 191
+ 192check1axm NAME (pi I) (pi HYPS) :- !,
+ 193 pi x \ typ' x => check1axm NAME (I x) (HYPS x).
+ 194check1axm NAME GOAL (provable NAME GOAL) :-
+ 195 term GOAL prop, ! ; ppterm PGOAL GOAL, print "Bad statement:" PGOAL, fail.
+ 196
+ 197check1nbt TYPE REP ABS REPABS ABSREP PREPH (pi P_TACTICS) HYPSUCHTHAT (pi HYPS) :-
+ 198 pi x \ typ' x => check1nbt (TYPE ## x) (REP ## x) (ABS ## x) REPABS ABSREP PREPH (P_TACTICS x) (HYPSUCHTHAT, typ x) (HYPS x).
+ 199check1nbt TYPE REP ABS REPABS ABSREP PREPH (P,TACTICS) HYPSUCHTHAT HYPS :-
+ 200  term P (X --> prop),
+ 201  prove (exists ## _ # P ) TACTICS,
+ 202  callback_proved existence_condition (exists ## _ # P) TACTICS,
+ 203  REPTYP = (TYPE --> X),
+ 204  ABSTYP = (X --> TYPE),
+ 205  ABSREPTYP = (forall ## TYPE # lam TYPE x \ eq ## TYPE # (ABS # (REP # x)) # x),
+ 206  REPABSTYP = (forall ## X # lam X x \ impl # (P # x) # (eq ## X # (REP # (ABS # x)) # x)),
+ 207  PREPHTYP = (forall ## TYPE # lam TYPE x \ (P # (REP # x))),
+ 208  !,
+ 209  HYPS =
+ 210   ( (HYPSUCHTHAT => typ' TYPE)
+ 211   , (HYPSUCHTHAT => term REP REPTYP), reterm REP REPTYP
+ 212   , (HYPSUCHTHAT => term ABS ABSTYP), reterm ABS ABSTYP
+ 213   , provable ABSREP ABSREPTYP
+ 214   , provable REPABS REPABSTYP, provable PREPH PREPHTYP).
+ 215
+ 216check WHAT :-
+ 217 next_object WHAT C CONT,
+ 218 (C = stop, !, K = true ; check1 C H , check_hyps [] H, print_constraints, K = (H => check CONT)),
+ 219 !, K.
+ 220
+ 221}
+ 222
+ 223/************ parsing and pretty-printing ********/
+ 224% ppterm/parseterm
+ 225%ppterm X Y :- ppp X Y. parseterm X Y :- ppp X Y.
+ 226%ppp X Y :- var X, var Y, !, X = Y.
+ 227%ppp X (F # G) :- var X, (var F ; var G), !, X = (F # G).
+ 228%ppp X (F # G # H) :- var X, (var F ; var G ; var H), !,
+ 229% X = (F # G # H).
+ 230
+ 231mode (ppp o i) xas ppterm, (ppp i o) xas parseterm.
+ 232
+ 233ppp (! F2) (forall ## _ # lam _ F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 234ppp (! TY F2) (forall ## TY # lam TY F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 235ppp (? F2) (exists ## _ # lam _ F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 236ppp (? TY F2) (exists ## TY # lam TY F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 237ppp (F2 <=> G2) (eq ## prop # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 238ppp (F2 = G2) (eq ## _ # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 239ppp (F2 && G2) (and # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 240ppp (F2 || G2) (or # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 241ppp (F2 ==> G2) (impl # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 242ppp (X2 #in S2) (in ## _ # X1 # S1) :- !, ppp X2 X1, ppp S2 S1.
+ 243ppp (U2 <<= V2) (subseteq ## _ # U1 # V1) :- !, ppp U2 U1, ppp V2 V1.
+ 244ppp (F2 + G2) (plus # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 245ppp (F2 # G2) (F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 246ppp (lam A F2) (lam A F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 247ppp A A.
+ 248
+ 249/* safe_list_map that unifies the two lists if they are both flexible
+ 250   probably only useful for parsing/pretty-printing */
+ 251safe_list_map L1 _ L2 :- var L1, var L2, !, L1 = L2.
+ 252safe_list_map L1 F L2 :- list_map L1 F L2.
+ 253
+ 254% pptac(ppterm)/parsetac(parseterm)
+ 255% pptac X Y :- ppptac X Y.  parsetac X Y :- ppptac X Y.
+ 256
+ 257mode (ppptac i o) xas parsetac(ppp -> parseterm),
+ 258     (ppptac o i) xas pptac(ppp -> ppterm).
+ 259
+ 260ppptac daemon daemon.
+ 261ppptac r r.
+ 262ppptac (t Y) (t PY) :- ppp Y PY.
+ 263ppptac (m Y) (m PY) :- ppp Y PY.
+ 264ppptac b b.
+ 265ppptac c c.
+ 266ppptac k k.
+ 267ppptac s s.
+ 268ppptac (h Gamma) (h PGamma) :- safe_list_map Gamma ppp PGamma.
+ 269ppptac d d.
+ 270ppptac (th NAME) (th NAME).
+ 271ppptac (thenll TAC1 TACN) (thenll PTAC1 PTACN) :-
+ 272 ppptac TAC1 PTAC1, ppptac TACN PTACN.
+ 273ppptac (! TAC) (! PTAC) :- ppptac TAC PTAC.
+ 274ppptac id id.
+ 275ppptac (wl Gamma) (wl PGamma) :- safe_list_map Gamma ppp PGamma.
+ 276ppptac (bind A TAC) (bind PA PTAC) :-
+ 277 ppp A PA, pi x \ ppptac (TAC x) (PTAC x).
+ 278ppptac ww ww.
+ 279
+ 280/************ interactive and non interactive loops ********/
+ 281
+ 282ppptac interactive interactive.
+ 283
+ 284parse_obj (theorem NAME PSTTAC) [theorem NAME STTAC] :-
+ 285 parse_thm NAME PSTTAC STTAC.
+ 286parse_obj (axiom NAME PTYP) [axiom NAME TYP] :- parse_axiom PTYP TYP.
+ 287parse_obj (new_basic_type TYPE REP ABS REPABS ABSREP PREP PP_TACTICS)
+ 288 [new_basic_type TYPE REP ABS REPABS ABSREP PREP P_TACTICS] :- parse_nbt PP_TACTICS P_TACTICS.
+ 289parse_obj (def NAME PTYBO) [def NAME TYBO] :- parse_def PTYBO TYBO.
+ 290parse_obj (decl NAME TY) [decl NAME TY].
+ 291parse_obj (inductive_def PRED PREDF PREDF_MON PRED_I PRED_E0 PRED_E K) EXP :-
+ 292 inductive_def_pkg PRED PREDF PREDF_MON PRED_I PRED_E0 PRED_E K EXP.
+ 293parse_obj stop [stop].
+ 294
+ 295parse_def (pi I) (pi O) :- pi x \ parse_def (I x) (O x).
+ 296parse_def (TY,PB) (TY,B) :- parseterm PB B.
+ 297
+ 298parse_axiom (pi I) (pi O) :- !, pi x \ parse_axiom (I x) (O x).
+ 299parse_axiom PST ST :- parseterm PST ST.
+ 300
+ 301parse_thm NAME (pi I) (pi O) :- pi x \ parse_thm NAME (I x) (O x).
+ 302parse_thm _ (PST,TAC) (ST,(false,TAC)) :- !, parseterm PST ST.
+ 303parse_thm NAME PST (ST,(true,[_])) :-
+ 304 (not (proves NAME _) ; print "Error:" NAME already defined, fail),
+ 305 parseterm PST ST.
+ 306
+ 307parse_nbt (pi I) (pi O) :- !, pi x \ parse_nbt (I x) (O x).
+ 308parse_nbt (PP,TACTICS) (P,(false,TACTICS)) :- parseterm PP P.
+ 309parse_nbt PP (P,(true,[_])) :- parseterm PP P.
+ 310
+ 311next_object [ C | NEXT ] CT CONTNEXT :-
+ 312  parse_obj C [ CT | CONT ], append CONT NEXT CONTNEXT.
+ 313next_object [] C CONT :- 
+ 314 print "Welcome to HOL extra-light",
+ 315 toplevel_loop [ C | CONT ].
+ 316next_object toplevel C CONT :- toplevel_loop [ C | CONT ].
+ 317
+ 318read_cmd H :-
+ 319 print "Enter a command or \"stop.\"",
+ 320 flush std_out, $readterm std_in H,
+ 321 !.
+ 322read_cmd H :- read_cmd H.
+ 323
+ 324toplevel_loop G :-
+ 325 read_cmd H,
+ 326 ( H = stop, !, G = [stop]
+ 327 ; parse_obj H PH, !, (append PH toplevel G ; print "error", toplevel_loop G)
+ 328 ; print "bad command", toplevel_loop G ).
+ 329
+ 330callback_proved _ _ (false,_).
+ 331callback_proved NAME G (true, [ TAC ]) :-
+ 332 canonical TAC CANONICALTAC,
+ 333 pptac PCANONICALTAC CANONICALTAC,
+ 334 ppterm PG G,
+ 335 print (theorem NAME (PG , [ PCANONICALTAC ] )).
+ 336
+ 337end_of_proof (true, []) :- print "proof completed".
+ 338end_of_proof (false, []).
+ 339
+ 340next_tactic0 [ SEQ | OLD ] (true, [ _ | _ ]) ITAC :-
+ 341 print,
+ 342 list_iter_rev [ SEQ | OLD ] print_sequent,
+ 343 read_in_context SEQ ITAC BACKTRACK,
+ 344 BACKTRACK.
+ 345next_tactic0 SEQS (true, CERT) ITAC :-
+ 346 print "error",
+ 347 next_tactic SEQS (true, CERT) ITAC.
+ 348next_tactic0 SEQS (true_then_false, (_,INT_TACS,_)) ITAC :-
+ 349 next_tactic0 SEQS (true, INT_TACS) ITAC.
+ 350next_tactic0 SEQS (false, [ interactive | _ ]) ITAC :-
+ 351 next_tactic0 SEQS (true, [ _ ]) ITAC.
+ 352next_tactic0 [ SEQ | OLD ] (false, [ TAC | _ ]) TAC.
+ 353next_tactic0 _ (false, _) ITAC :-
+ 354 print "aborted",
+ 355 halt.
+ 356
+ 357next_tactic SEQS CERT TAC :- next_tactic0 SEQS CERT PTAC, parsetac PTAC TAC.
+ 358
+ 359update_certificate (true, [ TAC | OTHER_TACS ]) ITAC NEW (true, TACS) :-
+ 360 mk_script ITAC NEW NEW_TACS TAC,
+ 361 append NEW_TACS OTHER_TACS TACS.
+ 362update_certificate (false, [ interactive | NON_INTERACTIVE_TACS ]) ITAC NEW CERTIFICATE :-
+ 363 update_certificate (true_then_false, (SCRIPT, [ SCRIPT ], NON_INTERACTIVE_TACS)) ITAC NEW CERTIFICATE.
+ 364update_certificate (true_then_false, (SCRIPT,[ TAC | OTHER_TACS ],NON_INTERACTIVE_TACS)) ITAC NEW CERTIFICATE :- !,
+ 365 mk_script ITAC NEW NEW_INTERACTIVE_TACS TAC,
+ 366 append NEW_INTERACTIVE_TACS OTHER_TACS INTERACTIVE_TACS,
+ 367 ( INTERACTIVE_TACS = [ _ | _ ], !,
+ 368   CERTIFICATE =
+ 369    (true_then_false, (SCRIPT,INTERACTIVE_TACS,NON_INTERACTIVE_TACS))
+ 370 ; CERTIFICATE = (false, NON_INTERACTIVE_TACS),
+ 371   print "INTERACTIVE SUBPROOF COMPLETED",
+ 372   canonical SCRIPT CSCRIPT,
+ 373   pptac PSCRIPT CSCRIPT,
+ 374   print PSCRIPT).
+ 375update_certificate (false, [ _ | OTHER_TACS ]) _ _ (false, OTHER_TACS).
+ 376
+ 377mk_script (bind A T) NEW NEW_TACS (bind A T2) :- !,
+ 378 pi x \
+ 379  put_binds (NEW2 x) x A NEW,
+ 380  mk_script (T x) (NEW2 x) (NEWT x) (T2 x),
+ 381  put_binds (NEWT x) x A NEW_TACS.
+ 382mk_script ITAC NEW NEW_TACS (thenl ITAC NEW_TACS) :-
+ 383 mk_list_of_bounded_fresh NEW NEW_TACS.
+ 384
+ 385read_in_context (bind A K) (bind A TAC) BACKTRACK :-
+ 386 pi x \ /* term x A => reterm # x A => */ read_in_context (K x) (TAC x) BACKTRACK.
+ 387read_in_context (seq A B) TAC BACKTRACK :-
+ 388 flush std_out, $readterm std_in TAC,
+ 389 (TAC = backtrack, !, BACKTRACK = (!, fail) ; BACKTRACK = true).
+ 390
+ 391print_sequent (seq Gamma G) :-
+ 392 print,
+ 393 list_iter_rev Gamma (x \ sigma PX \ ppterm PX x, print PX),
+ 394 print "|------------------",
+ 395 ppterm PG G, print PG.
+ 396print_sequent (bind A F) :- pi x \ print_sequent (F x).
+ 397
+ 398/* turns thenl into then */
+ 399canonical (bind A T1) (bind A T2) :- !,
+ 400 pi x \ canonical (T1 x) (T2 x).
+ 401canonical (thenl T L) OTAC :- !,
+ 402 list_map L canonical L2,
+ 403 (mk_constant_list L2 S L2, !,
+ 404  (S = [], !, OTAC = T ; OTAC = then T S)
+ 405 ; OTAC = thenl T L2).
+ 406canonical T T.
+ 407
+ 408/************ inductive_def package ********/
+ 409parse_inductive_def_spec (pi F) (pi PF) :- !,
+ 410 pi A \ parse_inductive_def_spec (F A) (PF A).
+ 411parse_inductive_def_spec (param TY F) (param PTY PF) :- !,
+ 412 ppp TY PTY, pi x \ parse_inductive_def_spec (F x) (PF x).
+ 413parse_inductive_def_spec L PL :-
+ 414 (pi p \ list_map (L p)
+ 415  (x \ px \ sigma A \ sigma B \ sigma PB \ x = (A, B), parseterm B PB, px = (A, PB))
+ 416  (PL p)).
+ 417
+ 418build_quantified_predicate (pi I) (pi O) :- !,
+ 419 pi A \ build_quantified_predicate (I A) (O A).
+ 420build_quantified_predicate (param TY I) (TY --> TYP, lam TY BO) :- !,
+ 421 pi x \ build_quantified_predicate (I x) (TYP, BO x).
+ 422build_quantified_predicate L (_, lam _ p \ lam _ x \ P p x) :-
+ 423 pi p \ pi x \ build_predicate (L p) p x (P p x).
+ 424
+ 425build_predicate [ (_,K) ] P X R :- !,
+ 426 process_constructor K P X R.
+ 427build_predicate [ (_,K) | REST ] P X (or # Q # R) :-
+ 428 process_constructor K P X Q,
+ 429 build_predicate REST P X R.
+ 430
+ 431process_constructor (forall ## TY # lam TY Q) P X (exists ## TY # lam TY R) :-
+ 432 pi y \ process_constructor (Q y) P X (R y).
+ 433process_constructor (impl # H # K) P X (and # H # R) :-
+ 434 process_constructor K P X R.
+ 435process_constructor (P # T) P X (eq ## _ # X # T).
+ 436
+ 437prove_monotonicity_thm (pi F) PREDF APREDF (pi THM) :- !,
+ 438 pi A \ prove_monotonicity_thm (F A) PREDF (APREDF ## A) (THM A).
+ 439prove_monotonicity_thm (param TY F) PREDF APREDF (forall ## TY # lam TY STM, PROOF) :- !,
+ 440 pi x \ prove_monotonicity_thm (F x) PREDF (APREDF # x) (STM x, PROOF).
+ 441prove_monotonicity_thm _ PREDF APREDF THM :-
+ 442 THM =
+ 443  (monotone ## _ # APREDF,
+ 444   [ then inv (bind* (then (conv (depth_tac (dd [PREDF]))) auto_monotone)) ]).
+ 445
+ 446state_fixpoint_def (pi F) PREDF (pi DEF) :- !,
+ 447 pi A \ state_fixpoint_def (F A) (PREDF ## A) (DEF A).
+ 448state_fixpoint_def (param TY F) PREDF (_, lam TY BO) :- !,
+ 449 pi x \ state_fixpoint_def (F x) (PREDF # x) (_, BO x).
+ 450state_fixpoint_def _ PREDF (_, fixpoint ## _ # PREDF).
+ 451
+ 452prove_fix_intro_thm (pi F) PREDF PRED PREDF_MONOTONE (pi THM) :- !,
+ 453 pi A \ prove_fix_intro_thm (F A) (PREDF ## A) (PRED ## A) PREDF_MONOTONE (THM A).
+ 454prove_fix_intro_thm (param TY F) PREDF PRED PREDF_MONOTONE (forall ## TY # lam TY STM, [ then forall_i (bind _ PROOF) ]) :- !,
+ 455 pi x \ prove_fix_intro_thm (F x) (PREDF # x) (PRED # x) PREDF_MONOTONE (STM x, [ PROOF x ]).
+ 456prove_fix_intro_thm _ PREDF PRED PREDF_MONOTONE THM :-
+ 457 THM =
+ 458  ((! x \ PREDF # PRED # x ==> PRED # x),
+ 459   [then forall_i
+ 460     (bind _ x13 \
+ 461       then (conv (rand_tac (rator_tac dd)))
+ 462        (then (conv (land_tac (rator_tac (rand_tac dd))))
+ 463          (then inv
+ 464            (then (cutth fixpoint_is_prefixpoint)
+ 465              (then (lforall PREDF)
+ 466                (thenl lapply [applyth PREDF_MONOTONE,
+ 467                  then
+ 468                   (g
+ 469                     (subseteq ## _ '
+ 470                       (PREDF # (fixpoint ## _ # PREDF)) '
+ 471                       (fixpoint ## _ # PREDF)))
+ 472                   (then (conv (depth_tac (dd [subseteq])))
+ 473                     (then (conv (depth_tac (dd [in])))
+ 474                       (then (conv (depth_tac (dd [in])))(itaut 4))))]))))))]).
+ 475
+ 476prove_fix_elim_thm (pi F) PREDF PRED OPRED (pi THM) :- !,
+ 477 pi A \ prove_fix_elim_thm (F A) (PREDF ## A) (PRED ## A) OPRED (THM A).
+ 478prove_fix_elim_thm (param TY F) PREDF PRED OPRED (forall ## TY # lam TY STM, [ then forall_i (bind _ PROOF) ]) :- !,
+ 479 pi x \ prove_fix_elim_thm (F x) (PREDF # x) (PRED # x) OPRED (STM x, [ PROOF x ]).
+ 480prove_fix_elim_thm _ PREDF PRED OPRED THM :-
+ 481 THM =
+ 482  ((! x13 \
+ 483     (! x14 \ PREDF # x13 # x14 ==> x13 # x14) ==>
+ 484      (! x14 \ PRED # x14 ==> x13 # x14)) ,
+ 485    [then forall_i
+ 486      (bind _ x23 \
+ 487        then (cutth fixpoint_subseteq_any_prefixpoint)
+ 488         (then (lforall PREDF)
+ 489           (then (lforall x23)
+ 490             (then (conv (depth_tac (dd [OPRED])))
+ 491               (then inv
+ 492                 (bind _ x24 \
+ 493                   then
+ 494                    (g
+ 495                      (impl # (subseteq ## _ # (PREDF # x23) # x23) '
+ 496                        (subseteq ## _ # (fixpoint ## _ # PREDF) # x23)))
+ 497                    (then (conv (depth_tac (dd [subseteq])))
+ 498                      (then (conv (depth_tac (dd [subseteq])))
+ 499                        (then (conv (depth_tac (dd [in])))
+ 500                          (then (conv (depth_tac (dd [in])))
+ 501                            (then (conv (depth_tac (dd [in])))
+ 502                              (then (conv (depth_tac (dd [in])))
+ 503                                (then
+ 504                                  (w
+ 505                                    (impl '
+ 506                                      (subseteq ## _ # (PREDF # x23) # x23) '
+ 507                                      (subseteq ## _ '
+ 508                                        (fixpoint ## _ # PREDF) # x23)))
+ 509                                  (then inv
+ 510                                    (thenl lapply_last [h,
+ 511                                      then (lforall_last x24)
+ 512                                       (then lapply_last h)])))))))))))))))]).
+ 513
+ 514prove_intro_thms (pi F) PRED PRED_I INTROTHMS :- !,
+ 515 pi A \
+ 516  prove_intro_thms (F A) (PRED ## A) PRED_I (OUT A),
+ 517  list_map (OUT A)
+ 518   (i \ o \ sigma Y \ i = (theorem NAME (P A)), o = theorem NAME (pi P))
+ 519   INTROTHMS.
+ 520prove_intro_thms (param TY F) PRED PRED_I INTROTHMS :- !,
+ 521 pi x \
+ 522  prove_intro_thms (F x) (PRED # x) PRED_I (OUT x),
+ 523  list_map (OUT x)
+ 524   (i \ o \ sigma Y \
+ 525     i = (theorem NAME (STM x, [ PROOF x ])),
+ 526     o = theorem NAME (forall ## TY # lam TY STM, [ then forall_i (bind TY PROOF) ]))
+ 527   INTROTHMS.
+ 528prove_intro_thms L PRED PRED_I INTROTHMS :-
+ 529 list_map (L PRED) (mk_intro_thm PRED_I) INTROTHMS.
+ 530
+ 531mk_intro_thm PRED_I (NAME,ST)
+ 532 (theorem NAME (ST,
+ 533   [ daemon /*(then inv (bind* (then (applyth PRED_I) (then (conv dd) (itauteq 6)))))*/ /* TOO MANY GOALS DELAYED ON typ (?): USE daemon INSTEAD */ ])).
+ 534
+ 535inductive_def_pkg PRED PREDF PREDF_MONOTONE PRED_I PRED_E0 PRED_E L OUT :-
+ 536 parse_inductive_def_spec L PL,
+ 537 build_quantified_predicate PL F,
+ 538 prove_monotonicity_thm PL PREDF PREDF MONTHM,
+ 539 state_fixpoint_def PL PREDF FIXDEF,
+ 540 prove_fix_intro_thm PL PREDF PRED PREDF_MONOTONE INTROTHM,
+ 541 prove_intro_thms PL PRED PRED_I INTROTHMS,
+ 542 prove_fix_elim_thm PL PREDF PRED PRED ELIMTHM,
+ 543 OUT1 =
+ 544  [ def PREDF F
+ 545  , theorem PREDF_MONOTONE MONTHM
+ 546  , def PRED FIXDEF
+ 547  , theorem PRED_I INTROTHM
+ 548  , theorem PRED_E0 ELIMTHM ],
+ 549 append OUT1 INTROTHMS OUT.
+ 550
+ 551/************ library of basic data types ********/
+ 552mk_bounded_fresh (bind _ F) (bind _ G) :- !, pi x\ mk_bounded_fresh (F x) (G x).
+ 553mk_bounded_fresh _ X.
+ 554
+ 555mk_list_of_bounded_fresh [] [].
+ 556mk_list_of_bounded_fresh [S|L] [X|R] :-
+ 557 mk_bounded_fresh S X, mk_list_of_bounded_fresh L R.
+ 558
+ 559/* list functions */
+ 560
+ 561list_map [] _ [].
+ 562list_map [X|XS] F [Y|YS] :- F X Y, list_map XS F YS.
+ 563
+ 564list_iter_rev [] _.
+ 565list_iter_rev [X|XS] F :- list_iter_rev XS F, F X.
+ 566
+ 567mem [ X | _ ] X, !.
+ 568mem [ _ | XS ] X :- mem XS X.
+ 569
+ 570mk_constant_list [] _ [].
+ 571mk_constant_list [_|L] X [X|R] :- mk_constant_list L X R.
+ 572
+ 573bang P :- P, !.
+ 574
+ 575/********** tacticals ********/
+ 576
+ 577% BUG in runtime.ml if the sigma is uncommented out. It does not matter btw.
+ 578/*sigma ff \*/ deftac fail SEQ ff.
+ 579
+ 580ppptac (constant_tacl TACL) (constant_tacl PTACL) :-
+ 581 list_map TACL ppptac PTACL.
+ 582deftacl (constant_tacl TACL) SEQS TACL.
+ 583
+ 584ppptac (thenl TAC TACL) (thenl PTAC PTACL) :-
+ 585 ppptac TAC PTAC, list_map TACL ppptac PTACL. 
+ 586deftac (thenl TAC TACL) SEQ XTAC :-
+ 587 XTAC = thenll TAC (constant_tacl TACL).
+ 588
+ 589ppptac (all_equals_list TAC) (all_equals_list PTAC) :- ppptac TAC PTAC.
+ 590deftacl (all_equals_list TAC2) SEQS TACL :-
+ 591 mk_constant_list SEQS TAC2 TACL.
+ 592
+ 593ppptac (then TAC1 TAC2) (then PTAC1 PTAC2) :-
+ 594 ppptac TAC1 PTAC1, ppptac TAC2 PTAC2.
+ 595deftac (then TAC1 TAC2) SEQ XTAC :-
+ 596 XTAC = thenll TAC1 (all_equals_list TAC2).
+ 597
+ 598ppptac (then! TAC1 TAC2) (then! PTAC1 PTAC2) :-
+ 599 ppptac TAC1 PTAC1, ppptac TAC2 PTAC2.
+ 600deftac (then! TAC1 TAC2) _ (then (! TAC1) TAC2).
+ 601
+ 602ppptac (orelse TAC1 TAC2) (orelse PTAC1 PTAC2) :-
+ 603 ppptac TAC1 PTAC1, ppptac TAC2 PTAC2.
+ 604deftac (orelse TAC1 TAC2) SEQ XTAC :-
+ 605 XTAC = TAC1 ; XTAC = TAC2.
+ 606
+ 607ppptac (orelse! TAC1 TAC2) (orelse! PTAC1 PTAC2) :-
+ 608 ppptac TAC1 PTAC1, ppptac TAC2 PTAC2.
+ 609deftac (orelse! TAC1 TAC2) _ (orelse (! TAC1) TAC2).
+ 610
+ 611ppptac (bind* TAC) (bind* PTAC) :- ppptac TAC PTAC.
+ 612deftac (bind* TAC) SEQ (orelse! (bind _ x \ bind* TAC) TAC).
+ 613
+ 614ppptac (repeat TAC) (repeat PTAC) :- ppptac TAC PTAC.
+ 615deftac (repeat TAC) SEQ XTAC :-
+ 616 ( XTAC = then TAC (repeat (bind* TAC))
+ 617 ; XTAC = id).
+ 618
+ 619ppptac (repeat! TAC) (repeat! PTAC) :- ppptac TAC PTAC.
+ 620deftac (repeat! TAC) SEQ (orelse! (then! TAC (repeat! (bind* TAC))) id).
+ 621
+ 622ppptac (pptac TAC) (pptac PTAC) :- ppptac TAC PTAC.
+ 623deftac (pptac TAC) SEQ TAC :-
+ 624 print "SEQ" SEQ ":=" TAC.
+ 625
+ 626ppptac (time TAC) (time PTAC) :- ppptac TAC PTAC.
+ 627deftac (time TAC) SEQ XTAC :-
+ 628 $gettimeofday B,
+ 629 XTAC = thenll TAC (time_after TAC B).
+ 630
+ 631ppptac (time_after TAC B) (time_after PTAC B) :- ppptac TAC PTAC.
+ 632deftacl (time_after TAC B) SEQS TACL :-
+ 633 $gettimeofday A,
+ 634 D is A - B,
+ 635 mk_constant_list SEQS id TACL,
+ 636 print "TIME SPENT " D "FOR" TAC.
+ 637
+ 638/* For debugging only (?) For capturing metavariables */
+ 639ppptac (inspect (seq Gamma F) TAC) (inspect (seq PGamma PF) PTAC) :-
+ 640 list_map SEQ ppp PSEQ, ppp F PF, ppptac TAC PTAC.
+ 641deftac (inspect SEQ TAC) SEQ TAC.
+ 642
+ 643/********** tactics ********/
+ 644
+ 645ppptac (w G) (w PG) :- ppp G PG.
+ 646deftac (w G) (seq Gamma _) (wl Gamma1) :-
+ 647 append Gamma1 [ G | _ ] Gamma.
+ 648
+ 649ppptac h h.
+ 650deftac h SEQ (h L).
+ 651
+ 652/*** eq ***/
+ 653
+ 654ppptac sym sym.
+ 655deftac sym (seq Gamma (eq ## T # L # R)) TAC :-
+ 656 TAC = thenl (m (eq ## T # R # R)) [ thenl c [ thenl c [ r , id ] , r ] , r ].
+ 657
+ 658ppptac eq_true_intro eq_true_intro.
+ 659deftac eq_true_intro (seq Gamma (eq ## prop # P # tt)) TAC :-
+ 660 TAC = thenl s [ th tt_intro, wl [] ].
+ 661
+ 662/*** true ***/
+ 663
+ 664/*** and ***/
+ 665
+ 666ppptac conj conj.
+ 667deftac conj (seq Gamma (and # P # Q)) TAC :-
+ 668 TAC =
+ 669  then
+ 670   (then (conv dd)
+ 671     (then k (bind _ x \
+ 672       thenl c
+ 673        [ thenl c [ r, eq_true_intro ] ,
+ 674          eq_true_intro ])))
+ 675   ww.
+ 676
+ 677/* Gamma  "|-"  q    --->   Gamma "|-" and # p # q*/
+ 678ppptac (andr P) (andr PP) :- ppp P PP.
+ 679deftac (andr P) (seq Gamma Q) TAC :-
+ 680 TAC =
+ 681  (thenl (m ((lam _ f \ f # P # Q) # (lam _ x \ lam _ y \ y)))
+ 682    [ then
+ 683       %(repeat (conv (depth_tac b))) ROBUS VERSION LINE BELOW
+ 684       (then (conv (land_tac b)) (then (conv (land_tac (rator_tac b))) (conv (land_tac b))))
+ 685      r
+ 686    , thenl (conv (rator_tac id))
+ 687       [ then (thenl (t (lam _ f \ f # tt # tt)) [ id, r ])
+ 688          (thenl (m (and # P # Q)) [ dd , id ])
+ 689       , then (repeat (conv (depth_tac b))) (th tt_intro) ]]).
+ 690
+ 691/* (and # p # q) :: nil  "|-"  q */
+ 692ppptac andr andr.
+ 693deftac andr (seq Gamma Q) TAC :-
+ 694 mem Gamma (and # P # Q),
+ 695 TAC = then (andr P) h.
+ 696
+ 697/* Gamma  "|-"  p    --->   Gamma "|-" and # p # q*/
+ 698ppptac (andl P) (andl PP) :- ppp P PP.
+ 699deftac (andl Q) (seq Gamma P) TAC :-
+ 700 TAC =
+ 701  (thenl (m ((lam _ f \ f # P # Q) # (lam _ x \ lam _ y \ x)))
+ 702    [ then
+ 703       %(repeat (conv (depth_tac b))) ROBUS VERSION LINE BELOW
+ 704       (then (conv (land_tac b)) (then (conv (land_tac (rator_tac b))) (conv (land_tac b))))
+ 705      r
+ 706    , thenl (conv (rator_tac id))
+ 707       [ then (thenl (t (lam _ f \ f # tt # tt)) [ id, r ])
+ 708          (thenl (m (and # P # Q)) [ dd , id ])
+ 709       , then (repeat (conv (depth_tac b))) (th tt_intro) ]]).
+ 710
+ 711/* (and # p # q) :: nil  "|-"  p */
+ 712ppptac andl andl.
+ 713deftac andl (seq Gamma P) TAC :-
+ 714 mem Gamma (and # P # Q),
+ 715 TAC = then (andl Q) h.
+ 716
+ 717
+ 718/*** forall ***/
+ 719
+ 720/* |- forall # F  -->   |- F # x */
+ 721ppptac forall_i forall_i.
+ 722deftac forall_i (seq Gamma (forall ## _ # lam _ G)) TAC :-
+ 723 TAC = then (conv dd) (then k (bind _ x \ eq_true_intro)).
+ 724
+ 725/* forall # F |- F # T */
+ 726ppptac forall_e forall_e.
+ 727deftac forall_e (seq Gamma GX) TAC :-
+ 728 mem Gamma (forall ## _ # (lam _ G)), GX = G X,
+ 729 TAC = thenl (m ((lam _ G) # X)) [ b, thenl (m ((lam _ z \ tt) # X))
+ 730  [ thenl c [ then sym (thenl (m (forall ## _ # lam _ G)) [dd,h ]), r ]
+ 731  , then (conv b) (th tt_intro) ] ].
+ 732
+ 733/* forall # F |- f  -->  F # a, forall # F |- f */
+ 734ppptac (lforall F A) (lforall PF PA) :- ppp F PF, ppp A PA.
+ 735deftac (lforall F A) (seq Gamma G) TAC :-
+ 736 TAC = thenl (m (impl # (F A) # G))
+ 737  [ thenl s [ then mp forall_e, then i h ] , then (w (forall ## _ # lam _ F)) i ].
+ 738
+ 739/* forall # F |- f  -->  F # a, forall # F |- f */
+ 740ppptac (lforall A) (lforall PA) :- ppp A PA.
+ 741deftac (lforall A) (seq Gamma G) (lforall F A) :-
+ 742 mem Gamma (forall ## _ # lam _ F).
+ 743
+ 744/* forall # F |- f  -->  F # a, forall # F |- f */
+ 745ppptac lforall lforall.
+ 746deftac lforall (seq Gamma G) (lforall A).
+ 747
+ 748/* forall # F |- f  -->  F # a, forall # F |- f */
+ 749ppptac (lforall_last A) (lforall_last PA) :- ppp A PA.
+ 750deftac (lforall_last A) (seq ((forall ## _ # lam _ F)::Gamma) G) (lforall F A).
+ 751
+ 752/*** false ***/
+ 753              
+ 754/*** impl ***/
+ 755
+ 756/* |- p=>q  -->  p |- q */
+ 757ppptac i i.
+ 758deftac i (seq Gamma (impl # P # Q)) TAC :-
+ 759 TAC = then (conv dd) (thenl s [ andl, thenl conj [ h [], id ]]).
+ 760
+ 761/* p=>q |- q  -->  |- p */
+ 762ppptac (mp P) (mp PP) :- ppp P PP.
+ 763deftac (mp P) (seq Gamma Q) TAC :-
+ 764 TAC = then (andr P) (thenl (m P) [ then sym (thenl (m (impl # P # Q)) [ dd , h ]) , id ]).
+ 765
+ 766/* p=>q |- q  -->  |- p */
+ 767ppptac mp mp.
+ 768deftac mp (seq Gamma Q) (mp P) :-
+ 769 mem Gamma (impl # P # Q).
+ 770
+ 771/* |- q   -->   p |- q  and  |- p */
+ 772ppptac (cut P) (cut PP) :- ppp P PP.
+ 773deftac (cut P) (seq Gamma Q) TAC :-
+ 774 TAC = then (andr P) (thenl (m P) [then sym (thenl (m (impl # P # Q)) [then (conv (land_tac dd)) r, i] ) , id]). 
+ 775
+ 776/* |-q  --> p |- q   where the theorem T proves p */
+ 777ppptac (cutth P) (cutth PP) :- ppp P PP.
+ 778deftac (cutth T) SEQ TAC :-
+ 779 proves T X,
+ 780 TAC = (thenl (cut X) [ id, th T ]).
+ 781
+ 782/* applies the theorem T */
+ 783ppptac (applyth P) (applyth PP) :- ppp P PP.
+ 784deftac (applyth T) SEQ (then (cutth T) apply_last).
+ 785
+ 786/* impl p q, Gamma |- f   --->   /*impl q f*/ Gamma |- p  ,  q, Gamma |- f */
+ 787ppptac (lapply P Q) (lapply PP PQ) :- ppp P PP, ppp Q PQ.
+ 788deftac (lapply P Q) (seq Gamma F) TAC :-
+ 789 TAC =
+ 790  thenl (m (impl # Q # F)) [ thenl s [ then (mp Q) (then (w (impl # Q # F)) (then (mp P) (w (impl # P # Q)))) , then i (h [A]) ] , then (w (impl # P # Q)) (then i id) ].
+ 791
+ 792/* impl p q, Gamma |- f   --->   /*impl q f*/ Gamma |- p  ,  q, Gamma |- f */
+ 793ppptac lapply lapply.
+ 794deftac lapply (seq Gamma F) (lapply P Q) :-
+ 795 mem Gamma (impl # P # Q).
+ 796
+ 797/* impl p q, Gamma |- f   --->   /*impl q f*/ Gamma |- p  ,  q, Gamma |- f */
+ 798ppptac lapply_last lapply_last.
+ 799deftac lapply_last (seq ((impl # P # Q)::Gamma) F) (lapply P Q).
+ 800
+ 801/* p |- f ---> p |- p ==> f */
+ 802ppptac (g P) (g PP) :- ppp P PP.
+ 803deftac (g P) (seq _ F) TAC :-
+ 804 TAC =
+ 805  (thenl (m (impl # P # F)) [thenl s [then mp h , then i h] , id ]).
+ 806
+ 807/*** not ***/
+ 808
+ 809/*** exists ***/
+ 810
+ 811/**** apply, i.e. forall + impl ****/
+ 812
+ 813ppptac (apply X) (apply PX) :- ppp X PX.
+ 814deftac (apply X) SEQ h :- var X, !.
+ 815deftac (apply X) SEQ h.
+ 816deftac (apply (impl # P # Q)) SEQ TAC :-
+ 817 TAC = thenl (lapply P Q) [ id, apply_last ].
+ 818deftac (apply (forall ## _ # lam _ G)) SEQ TAC :-
+ 819 TAC = then (lforall G X) apply_last.
+ 820
+ 821ppptac apply_last apply_last.
+ 822deftac apply_last (seq (H::Gamma) F) (apply H).
+ 823
+ 824ppptac apply apply.
+ 825deftac apply (seq Gamma F) (apply H) :-
+ 826 mem Gamma H.
+ 827
+ 828/********** conversion(als) ***********/
+ 829
+ 830strip_constant (I ## _) H :- !, strip_constant I H.
+ 831strip_constant H H.
+ 832
+ 833/* expands definitions, even if applied to arguments */
+ 834ppptac (dd L) (dd L).
+ 835deftac (dd L) (seq _ (eq ## _ # T # X)) d :- strip_constant T H, bang (mem L H).
+ 836deftac (dd L) (seq _ (eq ## _ # (D # T) # X))
+ 837 (thenl (t A) [thenl c [dd L , r], b]).
+ 838
+ 839ppptac dd dd.
+ 840deftac dd _ (dd L).
+ 841
+ 842ppptac beta_expand beta_expand.
+ 843deftac beta_expand (seq _ (eq ## _ # (lam _ x \ F x) # (lam _ x \ (lam _ F) # x))) TAC :-
+ 844 TAC = then k (bind _ x \ then sym b).
+ 845
+ 846/* folds a definition, even if applied to arguments */
+ 847/* BUG: it seems to fail with restriction errors in some cases */
+ 848ppptac f f.
+ 849deftac f SEQ (then sym dd).
+ 850
+ 851ppptac (rand_tac C) (rand_tac PC) :- ppptac C PC.
+ 852deftac (rand_tac C) SEQ TAC :-
+ 853  TAC = thenl c [ r , C ].
+ 854
+ 855ppptac (rator_tac C) (rator_tac PC) :- ppptac C PC.
+ 856deftac (rator_tac C) SEQ TAC :-
+ 857  TAC = thenl c [ C , r ].
+ 858
+ 859ppptac (abs_tac C) (abs_tac PC) :- ppptac C PC.
+ 860deftac (abs_tac C) SEQ TAC :-
+ 861  TAC = then k (bind A x \ C).
+ 862
+ 863ppptac (land_tac C) (land_tac PC) :- ppptac C PC.
+ 864deftac (land_tac C) SEQ TAC :-
+ 865  TAC = thenl c [ thenl c [ r, C ] , r ].
+ 866
+ 867ppptac (sub_tac C) (sub_tac PC) :- ppptac C PC.
+ 868deftac (sub_tac C) SEQ TAC :-
+ 869  TAC = orelse (rand_tac C) (orelse (rator_tac C) (abs_tac C)).
+ 870
+ 871ppptac (try TAC) (try PTAC) :- ppptac TAC PTAC.
+ 872deftac (try TAC) SEQ (orelse TAC id).
+ 873
+ 874ppptac (depth_tac C) (depth_tac PC) :- ppptac C PC.
+ 875deftac (depth_tac C) SEQ TAC :-
+ 876  TAC = then (try C) (sub_tac (depth_tac C)).
+ 877
+ 878ppptac (conv C) (conv PC) :- ppptac C PC.
+ 879deftac (conv C) (seq Gamma F) TAC :-
+ 880 TAC = thenl (m G) [ then sym C , id ].
+ 881
+ 882/********** Automation ***********/
+ 883/* TODO:
+ 884 1) our lforall gets rid of the hypothesis (bad) */
+ 885/* left tries to reduce the search space via focusing */
+ 886ppptac left left.
+ 887deftac left (seq Gamma _) TAC :-
+ 888 mem Gamma (not # F),
+ 889 TAC =
+ 890  (!
+ 891   (then (cutth not_e)
+ 892    (then (lforall_last F)
+ 893     (thenl lapply [ h, (w (not # F)) ])))).
+ 894deftac left (seq Gamma _) TAC :-
+ 895 /* A bit long because we want to beta-reduce the produced hypothesis.
+ 896    Maybe this should be automatized somewhere else. */
+ 897 mem Gamma (exists ## _ # F),
+ 898 TAC =
+ 899  (!
+ 900   (then (cutth exists_e)
+ 901    (then (lforall_last F)
+ 902     (thenl lapply [ h, then (w (exists ## _ # F)) (then apply_last (then forall_i (bind _ x \ then (try (conv (land_tac b))) i))) ])))).
+ 903deftac left (seq Gamma H) TAC :-
+ 904 mem Gamma (or # F # G),
+ 905 TAC =
+ 906  (!
+ 907   (then (cutth or_e)
+ 908    (then (lforall_last F)
+ 909     (then (lforall_last G)
+ 910      (then (lforall_last H)
+ 911       (thenl lapply [ h, then (w (or # F # G)) (then apply_last i)])))))).
+ 912deftac left (seq Gamma H) TAC :-
+ 913 mem Gamma (and # F # G),
+ 914 TAC =
+ 915  (!
+ 916   (then (cutth and_e)
+ 917    (then (lforall_last F)
+ 918     (then (lforall_last G)
+ 919      (then (lforall_last H)
+ 920       (thenl lapply [ h, then (w (and # F # G)) (then apply_last (then i i))])))))).
+ 921deftac left (seq Gamma H) TAC :-
+ 922 mem Gamma (eq ## TY # F # G),
+ 923 not (var TY), TY = prop,
+ 924 TAC =
+ 925  (then (g (eq ## TY # F # G))
+ 926   (then (conv (land_tac (then (applyth eq_to_impl) h)))
+ 927     (then i (w (eq ## TY # F # G))))).
+ 928
+ 929ppptac not_i not_i.
+ 930deftac not_i (seq _ (not # _)) (applyth not_i).
+ 931
+ 932ppptac inv inv.
+ 933deftac inv _ TAC :-
+ 934 TAC =
+ 935 (then!
+ 936  (repeat!
+ 937   (orelse! conj (orelse! forall_i (orelse! i (orelse! not_i s)))))
+ 938  (bind* (repeat! left))).
+ 939
+ 940ppptac (sync N) (sync N).
+ 941deftac (sync N) (seq _ tt) (th tt_intro).
+ 942deftac (sync N) (seq Gamma _) (then (applyth ff_elim) h) :-
+ 943 mem Gamma ff.
+ 944deftac (sync N) (seq _ (or # _ # _))
+ 945 (orelse (then (applyth orr) (itaut N)) (then (applyth orl) (itaut N))).
+ 946deftac (sync N) (seq _ (exists ## _ # _)) (then (applyth exists_i) (then (conv b) (itaut N2))) :-
+ 947 N2 is N - 2.
+ 948
+ 949ppptac (itaut N) (itaut N).
+ 950deftac (itaut N) SEQ fail :- N =< 0, !.
+ 951deftac (itaut N) SEQ TAC :-
+ 952 %print (itaut N) SEQ,
+ 953 N1 is N - 1,
+ 954 N2 is N - 2,
+ 955 TAC =
+ 956 (then! inv
+ 957  (bind*
+ 958   (orelse h
+ 959   (orelse (sync N)
+ 960   (orelse /* Hypothesis not moved to front */ (then lforall (itaut N2))
+ 961   (then lapply (itaut N1))))))).
+ 962
+ 963ppptac (itauteq N) (itauteq N).
+ 964deftac (itauteq N) _ (then (cutth eq_reflexive) (itaut N)).
+ 965
+ 966/********** inductive predicates package ********/
+ 967
+ 968ppptac monotone monotone.
+ 969deftac monotone (seq _ (impl # X # X)) (! (then i h)) :- !.
+ 970deftac monotone (seq [forall ## _ # lam _ x \ impl # (F # x) # (G # x)] (impl # (F # T) # (G # T))) (! apply) :- !.
+ 971deftac monotone (seq _ (impl # (and # _ # _) # _)) TAC :-
+ 972 TAC = then (applyth and_monotone) monotone.
+ 973deftac monotone (seq _ (impl # (or # _ # _) # _)) TAC :-
+ 974 TAC = then (applyth or_monotone) monotone.
+ 975deftac monotone (seq _ (impl # (impl # _ # _) # _)) TAC :-
+ 976 TAC = then (applyth impl_monotone) monotone.
+ 977deftac monotone (seq _ (impl # (not # _) # _)) TAC :-
+ 978 TAC = then (applyth not_monotone) monotone.
+ 979deftac monotone (seq _ (impl # (forall ## _ # lam _ _) # _)) TAC :-
+ 980 TAC =
+ 981  then (conv (land_tac (rand_tac beta_expand)))
+ 982   (then (conv (rand_tac (rand_tac beta_expand)))
+ 983     (then (applyth forall_monotone) (then forall_i (bind _ x \
+ 984       then (conv (depth_tac b)) (then (conv (depth_tac b)) monotone))))).
+ 985deftac monotone (seq _ (impl # (exists ## _ # lam _ _) # _)) TAC :-
+ 986 TAC =
+ 987  then (conv (land_tac (rand_tac beta_expand)))
+ 988   (then (conv (rand_tac (rand_tac beta_expand)))
+ 989     (then (applyth exists_monotone) (then forall_i (bind _ x \
+ 990       then (conv (depth_tac b)) (then (conv (depth_tac b)) monotone))))).
+ 991
+ 992/* expands "monotone # (lam _ f \ lam _ x \ X f x)" into
+ 993   "! x \ p # x ==> q # x |- X p y ==> X q y"
+ 994   and then calls the monotone tactic */
+ 995ppptac auto_monotone auto_monotone.
+ 996deftac auto_monotone _ TAC :-
+ 997 TAC =
+ 998  then (conv dd)
+ 999   (then forall_i (bind _ p \ (then forall_i (bind _ q \
+1000     then (conv (land_tac dd))
+1001      (then (conv (land_tac (depth_tac (dd [in]))))
+1002        (then (conv (land_tac (depth_tac (dd [in]))))
+1003          (then i
+1004            (then (conv dd)
+1005              (then forall_i (bind _ x \
+1006                (then (conv (land_tac dd))
+1007                  (then (conv (rand_tac dd))
+1008                    (then (conv (land_tac (rator_tac b)))
+1009                      (then (conv (land_tac b))
+1010                        (then (conv (rand_tac (rator_tac b)))
+1011                          (then (conv (rand_tac b))
+1012                            monotone)))))))))))))))).
+1013
+1014/********** the library ********/
+1015
+1016main :- the_library L, append L [stop] Lstop, check Lstop.
+1017
+1018go :- the_library L, check L.
+1019
+1020the_library L :-
+1021 L =
+1022  [ /******** Primivite operators hard-coded in the kernel ******/
+1023  % decl eq (pi A \ A --> A --> prop)
+1024
+1025  /********** Axiomatization of choice over types ********/
+1026    decl choose (pi A \ A)
+1027
+1028  /*********** Connectives and quantifiers ********/
+1029  , def tt (prop,((lam prop x \ x) = (lam prop x \ x)))
+1030  , def forall (pi A \ ((A --> prop) --> prop),
+1031     (lam (A --> prop) f \ f = (lam A g \ tt)))
+1032  , def ff (prop,(! x \ x))
+1033  , def and ((prop --> prop --> prop),
+1034     (lam _ x \ lam _ y \ (lam (prop --> prop --> prop) f \ f # x # y) = (lam _ f \ f # tt # tt)))
+1035  , def impl ((prop --> prop --> prop),(lam _ a \ lam _ b \ a && b <=> a))
+1036  , def exists (pi A \ ((A --> prop) --> prop),
+1037     (lam (A --> prop) f \ ! c \ (! a \ f # a ==> c) ==> c))
+1038  , def not ((prop --> prop),(lam _ x \ x ==> ff))
+1039  , def or ((prop --> prop --> prop),
+1040     (lam _ x \ lam _ y \ ! c \ (x ==> c) ==> (y ==> c) ==> c))
+1041  , theorem tt_intro (tt,[then (conv dd) (then k (bind _ x12 \ r))])
+1042  , theorem ff_elim ((! p \ ff ==> p),
+1043    [then forall_i (bind prop x3\ then (conv (land_tac dd)) (then i forall_e))])
+1044  , theorem sym ((! p \ ! q \ p = q ==> q = p),
+1045    [then forall_i
+1046     (bind prop x12 \
+1047       then forall_i
+1048        (bind prop x13 \
+1049          then i (then sym h)))])
+1050  , theorem not_e ((! p \ not # p ==> p ==> ff),
+1051     [then forall_i (bind prop x3 \ then (conv (land_tac dd)) (then i h))])
+1052  , theorem conj ((! p \ ! q \ p ==> q ==> p && q),
+1053    [then forall_i
+1054     (bind prop x12 \
+1055      then forall_i (bind prop x13 \ then i (then i (then conj h))))])
+1056  , theorem andl ((! p \ ! q \ p && q ==> p),
+1057    [then forall_i
+1058     (bind prop x12 \
+1059      then forall_i (bind prop x13 \ then i (then (andl x13) h)))])
+1060  , theorem andr ((! p \ ! q \ p && q ==> q),
+1061    [then forall_i
+1062     (bind prop x12 \
+1063      then forall_i (bind prop x13 \ then i (then (andr x12) h)))])
+1064  , theorem and_e ((! p \ ! q \ ! c \ p && q ==> (p ==> q ==> c) ==> c),
+1065     [then forall_i
+1066       (bind prop x12 \
+1067         then forall_i
+1068          (bind prop x13 \
+1069            then forall_i
+1070             (bind prop x14 \ then i (then i (thenl apply [andl, andr])))))])
+1071  , theorem not_i ((! p \ (p ==> ff) ==> not # p),
+1072     [then forall_i (bind prop x2 \ then i (then (conv dd) h))])
+1073  , theorem orl ((! p \ ! q \ p ==> p || q),
+1074      [then forall_i
+1075        (bind prop x12 \
+1076          then forall_i
+1077           (bind prop x13 \
+1078             then i
+1079              (then (conv dd)
+1080                (then forall_i (bind prop x14 \ then i (then i (then apply h)))))))])
+1081  , theorem orr ((! p \ ! q \ q ==> p || q),
+1082      [then forall_i
+1083        (bind prop x12 \
+1084          then forall_i
+1085           (bind prop x13 \
+1086             then i
+1087              (then (conv dd)
+1088                (then forall_i (bind prop x14 \ then i (then i (then apply h)))))))])
+1089  , theorem or_e ((! p \ ! q \ ! c \ p || q ==> (p ==> c) ==> (q ==> c) ==> c),
+1090     [then forall_i
+1091       (bind prop x12 \
+1092         then forall_i
+1093          (bind prop x13 \
+1094            then forall_i
+1095             (bind prop x14 \ then (conv (land_tac dd)) (then i forall_e))))])
+1096  , theorem exists_e (pi T \
+1097     (! f \ (exists ## T # f) ==> (! c \ (! x \ f # x ==> c) ==> c)),
+1098     [then forall_i (bind (T --> prop) x12 \ then (conv (land_tac dd)) (then i h))])
+1099 , theorem exists_i (pi T \ (! f \ ! w \ f # w ==> (exists ## T # f)),
+1100    [then forall_i
+1101     (bind (T --> prop) x12 \
+1102       then forall_i
+1103        (bind T x13 \
+1104          then i
+1105           (then (conv dd)
+1106             (then forall_i
+1107               (bind prop x14 \ then i (then (lforall x13) (then apply h)))))))])
+1108  , theorem eq_to_impl
+1109     ((! x13 \ ! x14 \ (x13 = x14) = ((x13 ==> x14) && (x14 ==> x13))),
+1110     [thenl inv [(bind prop x13 \ bind prop x14 \ then (conv (then sym h)) h),
+1111       (bind prop x13 \ bind prop x14 \ then (conv h) h),
+1112       (bind prop x13 \ bind prop x14 \ itaut 2),
+1113       (bind prop x13 \ bind prop x14 \ itaut 2)]])
+1114
+1115 /*********** Axiomatization of disjoint union ********/
+1116  , decl inj1_disj_union (pi A \pi B \ A --> disj_union ## A ## B)
+1117  , decl inj2_disj_union (pi A \ pi B \ B --> disj_union ## A ## B)
+1118  , decl case_disj_union (pi A \pi B \ pi C \ disj_union ## A ## B --> (A --> C) --> (B --> C) --> C)
+1119  , axiom case_disj_union_inj1 (pi A \ pi B \ pi C \ (! b \ ! (A --> C) e1 \ ! (B --> C) e2  \
+1120    case_disj_union ## A ## B ## C # (inj1_disj_union ## A ## B # b) # e1 # e2 = e1 # b))
+1121  , axiom case_disj_union_inj2 (pi A \ pi B \ pi C \ (! b \ ! (A --> C) e1 \ ! (B --> C) e2  \
+1122    case_disj_union ## A ## B ## C # (inj2_disj_union ## A ## B # b) # e1 # e2 = e2 # b))
+1123
+1124 /*********** Axiomatization of the universe ********/
+1125 , decl injection_univ (pi A \pi B \ A --> univ ## A ## B)
+1126 , decl ejection_univ (pi A \pi B \ univ ## A ## B --> A)
+1127 , decl inject_limit_univ (pi A \pi B \ (B --> univ ## A ## B) --> univ ## A ## B)
+1128 , decl eject_limit_univ (pi A \ pi B \ univ ## A ## B --> (B --> univ ## A ## B))
+1129 , decl pair_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B --> univ ## A ## B)
+1130 , decl proj1_univ (pi A \ pi B \ univ ## A ## B --> univ ## A ## B)
+1131 , decl proj2_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
+1132 , decl inj1_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
+1133 , decl inj2_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
+1134 , decl case_univ (pi A \pi B \ pi C \ univ ## A ## B --> (univ ## A ## B --> C) --> (univ ## A ## B --> C) --> C)
+1135 , axiom ejection_injection_univ (pi A \ pi B \
+1136    ! A p \ ejection_univ ## A ## B # (injection_univ ## A ## B # p) = p)
+1137 , axiom eject_inject_limit_univ (pi A \ pi B \
+1138    ! (B --> univ ## A ## B) p \ eject_limit_univ ## A ## B # (inject_limit_univ ## A ## B # p) = p)
+1139 , axiom proj1_pair_univ (pi A \ pi B \ ! (univ ## A ## B) p1 \ ! p2 \
+1140    proj1_univ ## A ## B # (pair_univ ## A ## B # p1 # p2) = p1)
+1141 , axiom proj2_pair_univ (pi A \ pi B \ ! p1 \ ! (univ ## A ## B) p2 \
+1142    proj2_univ ## A ## B # (pair_univ ## A ## B # p1 # p2) = p2)
+1143 , axiom case_univ_inj1 (pi A \ pi B \ pi C \ (! b \ ! (univ ## A ## B --> C) e1 \ ! e2  \
+1144    case_univ ## A ## B ## C # (inj1_univ ## A ## B # b) # e1 # e2 = e1 # b))
+1145 , axiom case_univ_inj2 (pi A \ pi B \ pi C \ (! b \ ! (univ ## A ## B --> C) e1 \ ! e2 \
+1146    case_univ ## A ## B ## C # (inj2_univ ## A ## B # b) # e1 # e2 = e2 # b))
+1147
+1148 /******************* Equality *****************/
+1149 , theorem eq_reflexive (pi A \ ((! A a \ a = a),
+1150   [ then forall_i (bind A x \ r) ]))
+1151
+1152 /******************* Logic *****************/
+1153 , theorem or_commutative ((! a \ ! b \ a || b <=> b || a),
+1154   [itaut 1])
+1155 , theorem or_ff ((! a \ a || ff <=> a),
+1156   [itaut 1])
+1157 , theorem or_tt ((! a \ a || tt <=> tt),
+1158   [itaut 1])
+1159 , theorem or_idempotent ((! a \ a || a <=> a),
+1160   [itaut 1])
+1161 , theorem or_associative ((! a \ ! b \ ! c \ a || (b || c) <=> (a || b) || c),
+1162   [itaut 1])
+1163 , theorem and_commutative ((! a \ ! b \ a && b <=> b && a),
+1164   [itaut 1])
+1165 , theorem and_tt ((! a \ a && tt <=> a),
+1166   [itaut 1])
+1167 , theorem and_ff ((! a \ a && ff <=> ff),
+1168   [itaut 1])
+1169 , theorem and_idempotent ((! a \ a && a <=> a),
+1170   [itaut 1])
+1171 , theorem and_associative ((! a \ ! b \ ! c \ a && (b && c) <=> (a && b) && c),
+1172   [itaut 1])
+1173 , theorem and_or ((! a \ ! b \ ! c \ a && (b || c) <=> (a && b) || (a && c)),
+1174   [itaut 1])
+1175 , theorem or_and ((! a \ ! b \ ! c \ a || (b && c) <=> (a || b) && (a || c)),
+1176   [itaut 1])
+1177 , theorem ads_or_and ((! a \ ! b \ (a && b) || b <=> b),
+1178   [itaut 1])
+1179 , theorem ads_and_or ((! a \ ! b \ (a || b) && b <=> b),
+1180   [itaut 1])
+1181 , theorem not_or ((! a \ ! b \ not # a && not # b <=> not # (a || b)),
+1182   [itaut 2])
+1183 , theorem not_and ((! a \ ! b \ not # a || not # b ==> not # (a && b)),
+1184   [itaut 2])
+1185 , theorem not_not_not ((! p \ not # (not # (not # p)) <=> not # p),
+1186   [itaut 3])
+1187 , theorem impl_not_not ((! a \ ! b \ (a ==> b) ==> (not # b ==> not # a)),
+1188   [itaut 3])
+1189 , theorem eq_to_impl_f ((! p \ ! q \ (p <=> q) ==> p ==> q),
+1190    [itaut 2])
+1191 , theorem eq_to_impl_b ((! p \ ! q \ (p <=> q) ==> q ==> p),
+1192    [itaut 2])
+1193
+1194/*************** Properties inj/disj/univ ***********/
+1195 , theorem pair_univ_inj_l 
+1196   (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ ! x22 \ ! x23 \ pair_univ ## A ## B # x20 # x22 = pair_univ ## A ## B # x21 # x23 ==> x20 = x21) ,
+1197   [then (repeat forall_i)
+1198     (bind (univ ## A ## B) x22 \
+1199       bind (univ ## A ## B) x23 \
+1200        bind (univ ## A ## B) x24 \
+1201         bind (univ ## A ## B) x25 \
+1202          then i
+1203           (then (cutth proj1_pair_univ)
+1204             (then (lforall x22)
+1205               (then (conv (land_tac (then sym apply)))
+1206                 (then (conv (depth_tac h)) (applyth proj1_pair_univ))))))])
+1207 , theorem pair_univ_inj_r 
+1208   (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ ! x22 \ ! x23 \ pair_univ ## A ## B # x20 # x22 = pair_univ ## A ## B # x21 # x23 ==> x22 = x23) ,
+1209   [then (repeat forall_i)
+1210     (bind (univ ## A ## B) x22 \
+1211       bind (univ ## A ## B) x23 \
+1212        bind (univ ## A ## B) x24 \
+1213         bind (univ ## A ## B) x25 \
+1214          then i
+1215           (then (cutth proj2_pair_univ)
+1216             (then (lforall x22)
+1217               (then (conv (land_tac (then sym apply)))
+1218                 (then (conv (depth_tac h)) (applyth proj2_pair_univ))))))])
+1219 , theorem injection_univ_inj
+1220   (pi A \ pi B \ (! A x20 \ ! x21 \ injection_univ ## A ## B # x20 = injection_univ ## A ## B # x21 ==> x20 = x21) ,
+1221    [then forall_i
+1222     (bind A x20 \
+1223       then forall_i
+1224        (bind A x21 \
+1225          then (then (cutth ejection_injection_univ) (lforall x21))
+1226           (then (then (cutth ejection_injection_univ) (lforall x20))
+1227             (then i
+1228               (thenl
+1229                 (cut
+1230                   (ejection_univ ## A ## B # (injection_univ ## A ## B # x20) =
+1231                     ejection_univ ## A ## B # (injection_univ ## A ## B # x21)))
+1232                 [thenl
+1233                   (cut
+1234                     ((ejection_univ ## A ## B # (injection_univ ## A ## B # x20) =
+1235                        ejection_univ ## A ## B # (injection_univ ## A ## B # x21)) =
+1236                       (x20 = x21)))
+1237                   [then (conv (depth_tac (then sym h))) h,
+1238                   thenl c [thenl c [r, h], h]], thenl c [r, h]])))))])
+1239 , theorem inj1_univ_inj
+1240   (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ inj1_univ ## A ## B # x20 = inj1_univ ## A ## B # x21 ==> x20 = x21) ,
+1241    [then inv
+1242     (bind (univ ## A ## B) x20 \ bind (univ ## A ## B) x21 \
+1243        thenl (t (case_univ ## A ## B ## (univ ## A ## B) # (inj1_univ ## A ## B # x20) '
+1244             (lam (univ ## A ## B) x22 \ x22) '
+1245             (lam (univ ## A ## B) x22 \ x22)))
+1246         [then sym
+1247           (then (conv (land_tac (applyth case_univ_inj1)))
+1248             (then (conv (land_tac b)) r)),
+1249         then (conv (depth_tac h))
+1250          (then (conv (land_tac (applyth case_univ_inj1)))
+1251            (then (conv (land_tac b)) r))])])
+1252 , theorem inj2_univ_inj
+1253   (pi A \ pi B \ (! (univ ## A ## B) x22 \ ! x23 \ inj2_univ ## A ## B # x22 = inj2_univ ## A ## B # x23 ==> x22 = x23) ,
+1254    [then inv
+1255     (bind (univ ## A ## B) x20 \ bind (univ ## A ## B) x21 \
+1256        thenl (t (case_univ ## A ## B ## (univ ## A ## B) # (inj2_univ ## A ## B # x20) '
+1257             (lam (univ ## A ## B) x22 \ x22) '
+1258             (lam (univ ## A ## B) x22 \ x22)))
+1259         [then sym
+1260           (then (conv (land_tac (applyth case_univ_inj2)))
+1261             (then (conv (land_tac b)) r)),
+1262         then (conv (depth_tac h))
+1263          (then (conv (land_tac (applyth case_univ_inj2)))
+1264            (then (conv (land_tac b)) r))])])
+1265 , theorem not_eq_inj1_inj2_univ 
+1266   (pi A \ pi B \ (! (univ ## A ## B) x22 \ ! x23 \ inj1_univ ## A ## B # x22 = inj2_univ ## A ## B # x23 ==> ff) ,
+1267    [then inv
+1268     (bind (univ ## A ## B) x22 \
+1269       bind (univ ## A ## B) x23 \
+1270        then (cutth case_univ_inj1)
+1271         (then (lforall x22)
+1272           (then (lforall (lam (univ ## A ## B) x24 \ ff))
+1273             (then (lforall (lam (univ ## A ## B) x24 \ tt))
+1274               (thenl (m ((lam (univ ## A ## B) x24 \ ff) # x22)) [b,
+1275                 then (conv (then sym h))
+1276                  (then (wl [])
+1277                    (then (conv (depth_tac h))
+1278                      (then (wl [])
+1279                        (then (conv (applyth case_univ_inj2))
+1280                          (then (conv b) (itaut 1))))))])))))])
+1281 , theorem inj1_disj_union_inj (pi A \ pi B \
+1282    ((! x \ ! y \
+1283     inj1_disj_union ## A ## B # x = inj1_disj_union ## A ## B # y ==> x = y) ,
+1284    [then inv
+1285      (bind A x23 \
+1286        bind A x24 \
+1287         then (cutth case_disj_union_inj1)
+1288          (then (lforall x23)
+1289            (then (lforall (lam A x25 \ x25))
+1290              (then (lforall (lam B x25 \ choose ## A))
+1291                (thenl (t ((lam A x25 \ x25) # x23))
+1292                  [then (conv (rand_tac b)) r,
+1293                  then (conv (land_tac (then sym h)))
+1294                   (then (wl [])
+1295                     (then (conv (depth_tac h))
+1296                       (then (wl [])
+1297                         (then (conv (land_tac (applyth case_disj_union_inj1)))
+1298                           b))))])))))]))
+1299 , theorem inj2_disj_union_inj (pi A \ pi B \
+1300    ((! x \ ! y \
+1301     inj2_disj_union ## A ## B # x = inj2_disj_union ## A ## B # y ==> x = y) ,
+1302    [then inv
+1303      (bind B x23 \
+1304        bind B x24 \
+1305         then (cutth case_disj_union_inj2)
+1306          (then (lforall x23)
+1307            (then (lforall (lam A x25 \ choose ## B))
+1308              (then (lforall (lam B x25 \ x25))
+1309                (thenl (t ((lam B x25 \ x25) # x23))
+1310                  [then (conv (rand_tac b)) r,
+1311                  then (conv (land_tac (then sym h)))
+1312                   (then (wl [])
+1313                     (then (conv (depth_tac h))
+1314                       (then (wl [])
+1315                         (then (conv (land_tac (applyth case_disj_union_inj2)))
+1316                           b))))])))))]))
+1317
+1318 /********** Monotonicity of logical connectives *********/
+1319 , theorem and_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
+1320    (a1 ==> b1) ==> (a2 ==> b2) ==> a1 && a2 ==> b1 && b2),
+1321    [itaut 2])
+1322 , theorem or_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
+1323    (a1 ==> b1) ==> (a2 ==> b2) ==> a1 || a2 ==> b1 || b2),
+1324    [itaut 2])
+1325 , theorem impl_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
+1326    (b1 ==> a1) ==> (a2 ==> b2) ==> (a1 ==> a2) ==> (b1 ==> b2)),
+1327    [itaut 3])
+1328 , theorem not_monotone ((! p \ ! q \ (p ==> q) ==> (not # q) ==> (not # p)),
+1329    [itaut 3])
+1330 , theorem forall_monotone (pi A \ (! p \ ! q \
+1331    (! A x \ p # x ==> q # x) ==> (! x \ p # x) ==> (! x \ q # x)),
+1332    [itaut 6])
+1333 , theorem exists_monotone (pi A \ (! p \ ! q \
+1334    (! A x \ p # x ==> q # x) ==> (? x \ p # x) ==> (? x \ q # x)),
+1335    [itaut 6])
+1336
+1337 /********** Knaster-Tarski theorem *********/
+1338  , def in (pi A \ (A --> (A --> prop) --> prop),
+1339     (lam A x \ lam (A --> prop) j \ j # x))
+1340  , def subseteq (pi A \ ((A --> prop) --> (A --> prop) --> prop),
+1341     (lam (A --> prop) x \ lam (A --> prop) y \ ! z \ z #in x ==> z #in y))
+1342  , theorem in_subseteq (pi A \ 
+1343     (! s \ ! t \ ! x \ s <<= t ==> x #in s ==> x #in t),
+1344     [then forall_i
+1345       (bind (A --> prop) x9 \
+1346         then forall_i
+1347          (bind (A --> prop) x10 \
+1348            then forall_i (bind A x11 \ then (conv (land_tac dd)) (itaut 4))))])
+1349  , def monotone (pi A \ (((A --> prop) --> (A --> prop)) --> prop),
+1350      (lam (_ A) f \ ! x \ ! y \ x <<= y ==> f # x <<= f # y))
+1351  , def is_fixpoint (pi A \ (((A --> prop) --> (A --> prop)) --> ((A --> prop) --> prop)),
+1352     (lam (_ A) f \ lam (_ A) x \ (f # x) <<= x && x <<= (f # x)))
+1353  , def fixpoint (pi A \ (((A --> prop) --> (A --> prop)) --> (A --> prop)),
+1354     (lam (_ A) f \ lam A a \ ! e \ f # e <<= e ==> a #in e))
+1355  , theorem fixpoint_subseteq_any_prefixpoint (pi A \
+1356     (! f \ ! x\ f # x <<= x ==> fixpoint ## A # f <<= x),
+1357     [then inv
+1358       (bind ((A --> prop) --> (A --> prop)) x9 \
+1359         (bind (A --> prop) x10 \
+1360           then (conv (land_tac dd))
+1361            (then (conv dd)
+1362              (then forall_i
+1363                (bind A x11 \
+1364                  then (conv (land_tac dd))
+1365                   (then (conv (land_tac b)) (itaut 4)))))))])
+1366  , theorem fixpoint_subseteq_any_fixpoint (pi A \
+1367     (! f \ ! x\ is_fixpoint ## A # f # x ==> fixpoint ## A # f <<= x),
+1368     [then forall_i
+1369       (bind ((A --> prop) --> (A --> prop)) x9 \
+1370         then forall_i
+1371          (bind (A --> prop) x10 \
+1372            then (conv (land_tac dd))
+1373             (then (cutth fixpoint_subseteq_any_prefixpoint) (itaut 8))))])
+1374  , theorem prefixpoint_to_prefixpoint (pi A \
+1375     (! f \ ! x \ monotone ## A # f ==> f # x <<= x ==> f # (f # x) <<= f # x),
+1376    [then forall_i
+1377      (bind ((A --> prop) --> (A --> prop)) x9 \
+1378        then forall_i
+1379         (bind (A --> prop) x10 \ then (conv (land_tac dd)) (itaut 6)))])
+1380  , theorem fixpoint_is_prefixpoint (pi A \
+1381     (! f \ monotone ## A # f ==> f # (fixpoint ## A # f)<<= fixpoint ## A # f),
+1382     [then inv
+1383       (bind ((A --> prop) --> (A --> prop)) x9 \
+1384         then (conv dd)
+1385          (then inv
+1386            (bind A x10 \
+1387              then (conv (depth_tac (dd [fixpoint])))
+1388               (then (conv dd)
+1389                 (then (conv b)
+1390                   (then inv
+1391                     (bind (A --> prop) x11 \
+1392                       thenl (cut (fixpoint ## A # x9 <<= x11))
+1393                        [thenl
+1394                          (cut (x9 # (fixpoint ## A # x9) <<= x9 # x11))
+1395                          [then (cutth in_subseteq)
+1396                            (then (lforall_last (x9 # x11))
+1397                              (then (lforall_last x11)
+1398                                (thenl apply_last [h,
+1399                                  then (cutth in_subseteq) (itaut 10)]))),
+1400                          thenl
+1401                           (m (monotone ## A # x9 ==> x9 # (fixpoint ## A # x9) <<= x9 # x11))
+1402                           [itaut 10, then (conv (land_tac dd)) (itaut 10)]],
+1403                        then (applyth fixpoint_subseteq_any_prefixpoint) h])))))))])
+1404  , theorem fixpoint_is_fixpoint (pi A \
+1405    (! f \ monotone ## A # f ==> is_fixpoint ## A # f # (fixpoint ## A # f)),
+1406    [then inv
+1407      (bind ((A --> prop) --> (A --> prop)) x9 \
+1408        then (conv (depth_tac (dd [is_fixpoint])))
+1409         (thenl inv [then (applyth fixpoint_is_prefixpoint) h,
+1410           then (applyth fixpoint_subseteq_any_prefixpoint)
+1411            (then (g (monotone ## A # x9))
+1412              (then (conv (land_tac dd))
+1413                (then inv
+1414                  (then apply (then (applyth fixpoint_is_prefixpoint) h)))))]))])
+1415
+1416 /*********** Axiomatization of well-founded recursion ********/
+1417 , decl rec (pi A \pi B \ ((A --> B) --> (A --> B)) --> (A --> B))
+1418 , inductive_def acc accF accF_monotone acc_i0 acc_e0 acc_e
+1419    (pi A \ param (A --> A --> prop) lt \ acc \
+1420     [ (acc_i, ! x \ (! y \ lt # y # x ==> acc # y) ==> acc # x) ])
+1421
+1422 , def well_founded (pi A \ ((A --> A --> prop) --> prop,
+1423    lam (_ A) lt \ ! x \ acc ## A # lt # x))
+1424
+1425 , axiom rec_is_fixpoint (pi A \ pi B \
+1426   (! lt \ well_founded ## A # lt ==>
+1427    ! ((A --> B) --> (A --> B)) h \
+1428     (! f \ ! g \ ! i \
+1429       (! p \ lt # p # i ==> f # p = g # p) ==> h # f # i = h # g # i) ==>
+1430     rec ## A ## B # h = h # (rec ## A ## B # h)))
+1431 /******************* TESTS *****************/
+1432 /* The first three tests are commented out because they require extra-hacks
+1433    in the kernel to avoid quantifying over p, q and g.
+1434 , theorem test_apply (p ==> (p ==> p ==> q) ==> q,
+1435    [then i (then i (then apply h))])
+1436 , theorem test_apply2 (p ==> (! x \ ! y \ x ==> x ==> y) ==> q,
+1437    [then i (then i (then apply h))])
+1438 , theorem test_itaut_1 (((? x \ g x) ==> ! x \ (! y \ g y ==> x) ==> x),
+1439   [itaut 4])*/
+1440 , theorem test_monotone1 (monotone ## _ # (lam _ p \ lam _ x \ not # (p # x) ==> tt && p # tt || p # x),
+1441   [ auto_monotone ])
+1442 , theorem test_monotone2 (monotone ## _ # (lam _ p \ lam _ x \ ? z \ not # (p # x) ==> tt && p # tt || z),
+1443   [ auto_monotone ])
+1444 , theorem test_monotone3 (monotone ## _ # (lam _ p \ lam _ x \ ! z \ ? y \ (not # (p # x) ==> z && p # y || y)),
+1445   [ auto_monotone ])
+1446 , inductive_def pnn pnnF pnnF_monotone pnn_i pnn_e0 pnn_e (pnn \
+1447     [ (pnn_tt, pnn # tt)
+1448     , (pnn_not, ! x \ pnn # x ==> pnn # (not # x))])
+1449 , theorem pnn_e
+1450    ((! x13 \
+1451       x13 # tt && (! x14 \ x13 # x14 ==> x13 # (not # x14)) ==>
+1452        (! x14 \ pnn # x14 ==> x13 # x14)) ,
+1453   [then forall_i
+1454     (bind (prop --> prop) x13 \
+1455       then (cutth pnn_e0)
+1456        (then (lforall x13)
+1457          (then i
+1458            (thenl lapply
+1459              [then (conv (depth_tac (dd [pnnF])))
+1460                (then forall_i
+1461                  (bind prop x14 \
+1462                    then i
+1463                     % from now on the proof is ad-hoc + fragile
+1464                     (thenl left [then (conv (depth_tac h)) (itaut 1),
+1465                       then left
+1466                        (bind prop x15 \
+1467                          then left (then (conv (depth_tac h)) (itaut 8)))]))),
+1468              h]))))])
+1469 , theorem pnn_has_two_values
+1470    ((! x13 \ pnn # x13 ==> x13 = tt || x13 = ff) ,
+1471    % applying an elimination principle is hard: it should be automatized
+1472    [then (cutth pnn_e)
+1473      (then (lforall (lam prop x13 \ or # (eq ## prop # x13 # tt) # (eq ## prop # x13 # ff)))
+1474        (thenl lapply
+1475          [thenl conj [then (conv b) (itaut 1),
+1476            then (repeat (conv (depth_tac b)))
+1477             (then forall_i (bind prop x13 \ then i (then left (itaut 8))))],
+1478          then inv
+1479           (bind prop x13 \
+1480             then (lforall x13)
+1481              (thenl lapply [h,
+1482                then
+1483                 (g
+1484                   ((lam prop x14 \ or # (eq ## prop # x14 # tt) # (eq ## prop # x14 # ff)) '
+1485                     x13))
+1486                 (then (repeat (conv (depth_tac b)))
+1487                   (then
+1488                     (w
+1489                       ((lam prop x14 \ or # (eq ## prop # x14 # tt) # (eq ## prop # x14 # ff))
+1490                         # x13)) (then (w (pnn # x13)) (itaut 2))))]))]))])
+1491 , inductive_def in_two in_twoF in_twoF_monotone in_two_i in_two_e0 in_two_e (in_two \
+1492     [ (in_two_tt, in_two # tt)
+1493     , (in_two_ff, in_two # ff) ])
+1494 , new_basic_type bool2 myrep2 myabs2 myrepabs2 myabsrep2 myproprep2
+1495    (pnn,
+1496    [then (cutth pnn_tt) (then (applyth exists_i) h)])
+1497 , def mytt (bool2,(myabs2 # tt))
+1498 , def mynot ((bool2 --> bool2),(lam _ x \ myabs2 # (not # (myrep2 # x))))
+1499 , theorem mytt_transfer
+1500   (myrep2 # mytt = tt ,
+1501     [then (conv (depth_tac (dd [mytt])))
+1502       (then (applyth myrepabs2) (applyth pnn_tt))])
+1503 , theorem mynot_transfer
+1504   ((! x18 \ myrep2 # (mynot # x18) = not # (myrep2 # x18)) ,
+1505     [then (conv (depth_tac (dd [mynot])))
+1506       (then forall_i
+1507         (bind bool2 x18 \
+1508           then (applyth myrepabs2)
+1509            (then (applyth pnn_not) (applyth myproprep2))))])
+1510 , theorem mybool2_e
+1511 ((! x18 \
+1512    x18 # mytt && (! x19 \ x18 # x19 ==> x18 # (mynot # x19)) ==>
+1513     (! x19 \ x18 # x19)) ,
+1514   [thenl
+1515     (cut
+1516       (forall ## (bool2 --> prop) '
+1517         (lam (bool2 --> prop) x18 \
+1518           impl '
+1519            (and # (x18 # (myabs2 # (myrep2 # mytt))) '
+1520              (forall ## bool2 '
+1521                (lam bool2 x19 \
+1522                  impl # (x18 # (myabs2 # (myrep2 # x19))) '
+1523                   (x18 '
+1524                     (myabs2 '
+1525                       (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
+1526            '
+1527            (forall ## bool2 '
+1528              (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
+1529     [then
+1530       (g
+1531         (forall ## (bool2 --> prop) '
+1532           (lam (bool2 --> prop) x18 \
+1533             impl '
+1534              (and # (x18 # (myabs2 # (myrep2 # mytt))) '
+1535                (forall ## bool2 '
+1536                  (lam bool2 x19 \
+1537                    impl # (x18 # (myabs2 # (myrep2 # x19))) '
+1538                     (x18 '
+1539                       (myabs2 '
+1540                         (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
+1541              '
+1542              (forall ## bool2 '
+1543                (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
+1544       (then
+1545         (w
+1546           (forall ## (bool2 --> prop) '
+1547             (lam (bool2 --> prop) x18 \
+1548               impl '
+1549                (and # (x18 # (myabs2 # (myrep2 # mytt))) '
+1550                  (forall ## bool2 '
+1551                    (lam bool2 x19 \
+1552                      impl # (x18 # (myabs2 # (myrep2 # x19))) '
+1553                       (x18 '
+1554                         (myabs2 '
+1555                           (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
+1556                '
+1557                (forall ## bool2 '
+1558                  (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
+1559         (then (repeat (conv (depth_tac (applyth myabsrep2)))) (then i h))),
+1560     then forall_i
+1561      (bind (bool2 --> prop) x18 \
+1562        then (cutth pnn_e)
+1563         (then
+1564           (lforall
+1565             (lam prop x19 \
+1566               exists ## bool2 '
+1567                (lam bool2 x20 \
+1568                  and # (eq ## _ # x19 # (myrep2 # x20)) '
+1569                   (x18 # (myabs2 # x19)))))
+1570           (then inv
+1571             (bind bool2 x19 \
+1572               thenl
+1573                (cut
+1574                  ((lam prop x20 \
+1575                     exists ## bool2 '
+1576                      (lam bool2 x21 \
+1577                        and # (eq ## _ # x20 # (myrep2 # x21)) '
+1578                         (x18 # (myabs2 # x20)))) # (myrep2 # x19)))
+1579                [then
+1580                  (g
+1581                    ((lam prop x20 \
+1582                       exists ## bool2 '
+1583                        (lam bool2 x21 \
+1584                          and # (eq ## _ # x20 # (myrep2 # x21)) '
+1585                           (x18 # (myabs2 # x20)))) # (myrep2 # x19)))
+1586                  (then (conv (depth_tac b)) inv),
+1587                thenl apply
+1588                 [then (repeat (conv (depth_tac b)))
+1589                   (thenl inv
+1590                     [then (cutth exists_i)
+1591                       (then
+1592                         (lforall_last
+1593                           (lam bool2 x20 \
+1594                             and # (eq ## _ # tt # (myrep2 # x20)) '
+1595                              (x18 # (myabs2 # tt))))
+1596                         (then (lforall_last mytt)
+1597                           (then apply_last (then (conv b)
+1598                            (thenl inv
+1599                             [then (cutth mytt_transfer)
+1600                               (then (conv (depth_tac h)) (applyth tt_intro)),
+1601                             (applyth tt_intro),
+1602                             then (cutth mytt_transfer)
+1603                              (then (g (x18 # (myabs2 # (myrep2 # mytt))))
+1604                                (then (conv (depth_tac h)) (then i h)))]))))),
+1605                     (bind prop x20 \
+1606                       bind bool2 x21 \
+1607                        then (cutth exists_i)
+1608                         (then
+1609                           (lforall_last
+1610                             (lam bool2 x22 \
+1611                               and # (eq ## _ # (not # x20) # (myrep2 # x22)) '
+1612                                (x18 # (myabs2 # (not # x20)))))
+1613                           (then (lforall_last (mynot # x21))
+1614                             (then apply_last (then (conv b)
+1615    (thenl inv
+1616     [then (conv (applyth mynot_transfer))
+1617       (then (conv (depth_tac (dd [not]))) (then inv (itaut 3))),
+1618     then (g (myrep2 # (mynot # x21)))
+1619      (then (conv (land_tac (applyth mynot_transfer)))
+1620        (then (conv (depth_tac (dd [not]))) (then inv (itaut 3)))),
+1621     then (lforall (myabs2 # x20))
+1622      (thenl lapply [then (conv (depth_tac (applyth myabsrep2))) h,
+1623        then
+1624         (g
+1625           (x18 '
+1626             (myabs2 '
+1627               (myrep2 # (mynot # (myabs2 # (myrep2 # (myabs2 # x20))))))))
+1628         (then (conv (depth_tac (applyth myabsrep2)))
+1629           (then (conv (depth_tac (applyth myabsrep2)))
+1630             (thenl (cut (x20 = myrep2 # x21))
+1631               [then (conv (depth_tac h))
+1632                 (then (conv (depth_tac h))
+1633                   (then (conv (depth_tac (applyth myabsrep2)))
+1634                     (then i
+1635                       (then
+1636                         (conv
+1637                           (rand_tac
+1638                             (rand_tac (then sym (applyth mynot_transfer)))))
+1639                         (then (conv (depth_tac (applyth myabsrep2))) h))))),
+1640               itaut 2])))])]))))))]),
+1641                 applyth myproprep2]]))))]])
+1642
+1643, theorem step0
+1644    ((! x13 \ mynot # (mynot # (mynot # x13)) = mynot # x13) ,
+1645     [then inv
+1646      (bind bool2 x13 \
+1647        then (repeat (conv (depth_tac (dd [mynot]))))
+1648         (thenl (conv (land_tac (rand_tac (rand_tac (applyth myrepabs2)))))
+1649          [then (cutth pnn_not)
+1650            (then (lforall (myrep2 # (myabs2 # (not # (myrep2 # x13)))))
+1651              (then (cutth myproprep2)
+1652                (then (lforall (myabs2 # (not # (myrep2 # x13))))
+1653                  (then apply h)))),
+1654          thenl
+1655           (conv
+1656             (land_tac
+1657               (rand_tac (rand_tac (rand_tac (applyth myrepabs2))))))
+1658           [then (cutth pnn_not)
+1659             (then (lforall (myrep2 # x13))
+1660               (then (cutth myproprep2)
+1661                 (then (lforall x13) (then apply h)))),
+1662           then (conv (land_tac (rand_tac (applyth not_not_not)))) r]]))])
+1663 , theorem mynot_mynot_mytt
+1664    (mynot # (mynot # mytt) = mytt ,
+1665     [then (conv (depth_tac (dd [mynot])))
+1666      (then (cutth mynot_transfer)
+1667        (then (lforall mytt)
+1668          (then (conv (depth_tac h))
+1669            (then (cutth mytt_transfer)
+1670              (then (conv (depth_tac h))
+1671                (then (conv (depth_tac (dd [mytt]))) (thenl c [r, itaut 3])))))))])
+1672 , theorem step1
+1673    ((! x18 \ x18 = mytt || x18 = mynot # mytt) ,
+1674     [then forall_i
+1675      (bind bool2 x18 \
+1676       then (cutth mybool2_e)
+1677        (thenl
+1678          (cut
+1679            ((lam bool2 x19 \
+1680               or # (eq ## _ # x19 # mytt) # (eq ## _ # x19 # (mynot # mytt))) # x18))
+1681          [then
+1682            (g
+1683              ((lam bool2 x19 \
+1684                 or # (eq ## _ # x19 # mytt) # (eq ## _ # x19 # (mynot # mytt))) '
+1685                x18)) (then (conv (depth_tac b)) (then i h)),
+1686          then apply
+1687           (then (repeat (conv (depth_tac b)))
+1688             (thenl conj [then (applyth orl) r,
+1689               thenl inv
+1690                [(bind bool2 x19 \
+1691                   then (applyth orr) (then (conv (depth_tac h)) r)),
+1692                (bind bool2 x19 \
+1693                  then (applyth orl) (then (conv (depth_tac h)) (applyth mynot_mynot_mytt)))]]))]))])
+1694
+1695 /******* Cartesian product of types ******/
+1696 /* TODO: this is an inductive type as well: generalize
+1697    inductive_type to type abstractions */
+1698 , def is_pair (pi A \ pi B \
+1699  (univ ## (disj_union ## A ## B) ## prop --> prop),
+1700  lam (_ A B) p \ ? A a \ ? B b \
+1701   p =
+1702    pair_univ ## (_ A B) ## _ '
+1703     (injection_univ ## (_ A B) ## _ # (inj1_disj_union ## A ## B # a)) '
+1704     (injection_univ ## (_ A B) ## _ # (inj2_disj_union ## A ## B # b)))
+1705 , new_basic_type prod prod_rep prod_abs prod_repabs prod_absrep prod_proprep
+1706    (pi A \ pi B \ is_pair ## A ## B, [daemon])
+1707 , def pair (pi A \ pi B \
+1708    (A --> B --> prod ## A ## B,
+1709    lam A a \ lam B b \
+1710     prod_abs ## A ## B '
+1711      (pair_univ ## (_ A B) ## _ '
+1712       (injection_univ ## (_ A B) ## _ # (inj1_disj_union ## A ## B # a)) '
+1713       (injection_univ ## (_ A B) ## _ # (inj2_disj_union ## A ## B # b)))
+1714    ))
+1715 /* TODO: define fst and snd and prove the usual lemmas
+1716    fst # (pair # a # b) = a */
+1717
+1718  /************* Natural numbers ***************/
+1719 , inductive_def is_nat is_natF is_nat_monotone is_nat_i is_nat_e0 is_nat_e
+1720   (is_nat \
+1721     [ (is_nat_z, is_nat # (inj1_univ ## prop ## prop # (injection_univ ## prop ## prop # ff)))
+1722     , (is_nat_s, ! x \ is_nat # x ==> is_nat # (inj2_univ ## prop ## prop # x))])
+1723 , new_basic_type nat nat_rep nat_abs nat_repabs nat_absrep nat_proprep
+1724    (is_nat,
+1725    [then (cutth is_nat_z) (then (applyth exists_i) h)])
+1726 , def z (nat, nat_abs # (inj1_univ ## prop ## prop # (injection_univ ## prop ## prop # ff)))
+1727 , def s (nat --> nat,
+1728    (lam _ x \ nat_abs # (inj2_univ ## prop ## prop # (nat_rep # x))))
+1729 /* TODO: consequence of is_nat_e by transfer principles */
+1730 , theorem nat_e ((! p \ p # z ==> (! n \ p # n ==> p # (s # n)) ==> ! n \ p # n), [ daemon ])
+1731 , theorem nat_abs_inj
+1732   ((! x18 \
+1733      ! x19 \
+1734       is_nat # x18 ==>
+1735        is_nat # x19 ==> nat_abs # x18 = nat_abs # x19 ==> x18 = x19) ,
+1736     [then inv
+1737       (bind _ x18 \
+1738         bind _ x19 \
+1739          thenl (conv (land_tac (then sym (applyth nat_repabs)))) [h,
+1740           thenl (conv (rand_tac (then sym (applyth nat_repabs)))) [h,
+1741            then (conv (depth_tac h)) r]])])
+1742 , theorem nat_rep_inj
+1743   ((! x18 \ ! x19 \ nat_rep # x18 = nat_rep # x19 ==> x18 = x19) ,
+1744     [then inv
+1745       (bind nat x18 \
+1746         bind nat x19 \
+1747          then (conv (land_tac (then sym (applyth nat_absrep))))
+1748           (then (conv (rand_tac (then sym (applyth nat_absrep))))
+1749             (then (conv (depth_tac h)) r)))])
+1750 , theorem s_inj ((! x18 \ ! x19 \ s # x18 = s # x19 ==> x18 = x19) ,
+1751     [then (repeat (conv (depth_tac (dd [s]))))
+1752       (then inv
+1753         (bind nat x18 \
+1754           bind nat x19 \
+1755            then (applyth nat_rep_inj)
+1756             (then (applyth inj2_univ_inj)
+1757               (thenl (applyth nat_abs_inj)
+1758                 [then (applyth is_nat_s) (applyth nat_proprep),
+1759                 then (applyth is_nat_s) (applyth nat_proprep), h]))))])
+1760 , theorem not_equal_z_s ((! x20 \ not # (z = s # x20)) ,
+1761     [then (repeat (conv (depth_tac (dd [z]))))
+1762       (then (repeat (conv (depth_tac (dd [s]))))
+1763         (then (repeat (conv (depth_tac (dd [not]))))
+1764           (then inv
+1765             (bind nat x20 \
+1766               then (applyth not_eq_inj1_inj2_univ)
+1767                (thenl (thenl (applyth nat_abs_inj) [id, id, h])
+1768                  [applyth is_nat_z,
+1769                  then (applyth is_nat_s) (applyth nat_proprep)])))))])
+1770 , def nat_case (pi A \ (nat --> A --> (nat --> A) --> A,
+1771    lam _ n \ lam (_ A) a \ lam (_ A) f \
+1772     case_univ ## prop ## prop ## A # (nat_rep # n) # (lam _ x \ a) # (lam _ p \ f # (nat_abs # p))))
+1773 , theorem nat_case_z (pi A \ ((! x21 \ ! x22 \ nat_case ## A # z # x21 # x22 = x21) ,
+1774      [then (conv (depth_tac (dd [nat_case])))
+1775        (then (conv (depth_tac (dd [z])))
+1776          (then forall_i
+1777            (bind A x21 \
+1778              then forall_i
+1779               (bind (nat --> A) x22 \
+1780                 thenl
+1781                  (conv (land_tac (rator_tac (land_tac (applyth nat_repabs)))))
+1782                  [applyth is_nat_z,
+1783                   then (conv (depth_tac (applyth case_univ_inj1)))
+1784                    (then (conv (depth_tac b)) r)]))))]))
+1785 , theorem nat_case_s
+1786   (pi A \ (! x21 \ ! x22 \ ! x23 \
+1787     nat_case ## A # (s # x21) # x22 # x23 = x23 # x21),
+1788     [then (conv (depth_tac (dd [nat_case])))
+1789       (then (conv (depth_tac (dd [s])))
+1790         (then forall_i
+1791           (bind nat x21 \
+1792             then forall_i
+1793              (bind A x22 \
+1794                then forall_i
+1795                 (bind (nat --> A) x23 \
+1796                   thenl
+1797                    (conv (land_tac (rator_tac (land_tac (applyth nat_repabs)))))
+1798                    [then (applyth is_nat_s) (applyth nat_proprep),
+1799                     then (conv (depth_tac (applyth case_univ_inj2)))
+1800                     (then (conv (depth_tac b))
+1801                       (then (conv (depth_tac (applyth nat_absrep))) r))])))))])
+1802
+1803
+1804 , theorem pred_well_founded
+1805   (well_founded ## nat # (lam nat x21 \ lam nat x22 \ x22 = s # x21) ,
+1806   [then (conv dd)
+1807     (then forall_i
+1808       (bind nat x21 \
+1809         thenl (applyth nat_e)
+1810          [then (applyth acc_i)
+1811            (then (repeat (conv (depth_tac b)))
+1812              (then inv
+1813                (bind nat x22 \
+1814                  then (applyth ff_elim) (then (cutth not_equal_z_s) (itaut 4))))),
+1815          then inv
+1816           (bind nat x22 \
+1817             then (applyth acc_i)
+1818              (then (repeat (conv (depth_tac b)))
+1819                (then inv
+1820                  (bind nat x23 \
+1821                    then (cutth s_inj)
+1822                     (then (lforall x22)
+1823                       (then (lforall x23)
+1824                         (thenl lapply [h,
+1825                           then (conv (rand_tac (then sym h))) h])))))))]))])
+1826 , def nat_recF (pi A \
+1827    A --> (nat --> A --> A) --> (nat --> A) --> (nat --> A)
+1828    , lam A a \ lam (_ A) f \ lam (_ A) rec \ lam _ n \
+1829       nat_case ## A # n # a # (lam _ p \ f # p # (rec # p)))
+1830 , def nat_rec (pi A \
+1831    A --> (nat --> A --> A) --> nat --> A
+1832    , lam A a \ lam (_ A) f \ rec ## nat ## A # (nat_recF ## A # a # f))
+1833 , theorem nat_rec_ok0 (pi A \
+1834   ((! a \ ! f \
+1835     nat_rec ## A # a # f = nat_recF ## A # a # f # (nat_rec ## A # a # f)) ,
+1836   [then inv
+1837     (bind A x22 \
+1838       bind (nat --> A --> A) x23 \
+1839        then (repeat (conv (depth_tac (dd [nat_rec]))))
+1840         (thenl (applyth rec_is_fixpoint) [applyth pred_well_founded,
+1841           then (repeat (conv (depth_tac b)))
+1842            (then (repeat (conv (depth_tac (dd [nat_recF]))))
+1843              (then forall_i
+1844                (bind (nat --> A) x24 \
+1845                  then forall_i
+1846                   (bind (nat --> A) x25 \
+1847                     then (conv (rand_tac beta_expand))
+1848                      (thenl (applyth nat_e)
+1849                        [then (conv (depth_tac b))
+1850                          (then inv
+1851                            (then (conv (land_tac (applyth nat_case_z)))
+1852                              (then (conv (rand_tac (applyth nat_case_z))) r))),
+1853                        then (repeat (conv (depth_tac b)))
+1854                         (then inv
+1855                           (bind nat x26 \
+1856                             then (conv (rand_tac (applyth nat_case_s)))
+1857                              (then (conv (land_tac (applyth nat_case_s)))
+1858                                (then (repeat (conv (depth_tac b)))
+1859                                  (then (lforall x26)
+1860                                    (thenl lapply [r,
+1861                                      then (conv (land_tac (rand_tac h))) r]))))))])))))]))]))
+1862 , theorem nat_rec_ok (pi A \
+1863   (! a \ ! f \ ! n \
+1864     nat_rec ## A # a # f # n =
+1865      nat_case ## A # n # a # (lam _ p \ f # p # (nat_rec ## A # a # f # p))),
+1866   [then inv
+1867     (bind A x22 \
+1868       bind (nat --> A --> A) x23 \
+1869        bind nat x24 \
+1870         then (conv (land_tac (rator_tac (applyth nat_rec_ok0))))
+1871          (then (conv (depth_tac (dd [nat_recF]))) r))])
+1872
+1873 /************* Arithmetics: plus ***************/
+1874 , def plus (nat --> nat --> nat,
+1875    lam _ n \ lam _ m \
+1876     nat_rec ## _ # m # (lam _ p \ lam _ sum \ s # sum)' n)
+1877 , theorem plus_z ((! n \ z + n = n),
+1878   [then (conv (depth_tac (dd [plus])))
+1879     (then inv
+1880       (bind nat x21 \
+1881         then (conv (land_tac (applyth nat_rec_ok)))
+1882          (then (conv (land_tac (applyth nat_case_z))) r)))])
+1883 , theorem plus_s ((! n \ ! m \  s # n + m = s # (n + m)),
+1884   [then (repeat (conv (depth_tac (dd [plus]))))
+1885     (then inv
+1886       (bind nat x21 \
+1887         bind nat x22 \
+1888          then (conv (land_tac (applyth nat_rec_ok)))
+1889           (then (conv (land_tac (applyth nat_case_s)))
+1890             (then (repeat (conv (depth_tac b))) r))))])
+1891 , theorem plus_n_z ((! n \ n + z = n),
+1892   [then (conv (rand_tac beta_expand))
+1893     (thenl (applyth nat_e) [then (conv b) (applyth plus_z),
+1894       then (repeat (conv (depth_tac b)))
+1895        (then inv
+1896          (bind nat x21 \
+1897            then (conv (land_tac (applyth plus_s)))
+1898             (then (conv (depth_tac h)) r)))])])
+1899 , theorem plus_n_s ((! n \ ! m \ n + (s # m) = s # (n + m)),
+1900   [then (conv (rand_tac beta_expand))
+1901     (thenl (applyth nat_e)
+1902       [then (conv b)
+1903         (then inv
+1904           (bind nat x21 \ then (repeat (conv (depth_tac (applyth plus_z)))) r)),
+1905       then (repeat (conv (depth_tac b)))
+1906        (then inv
+1907          (bind nat x21 \
+1908            bind nat x22 \
+1909             then (conv (land_tac (applyth plus_s)))
+1910              (thenl c [r,
+1911                then (conv (land_tac apply)) (then sym (applyth plus_s))])))])])
+1912 , theorem plus_comm ((! n \ ! m \ n + m = m + n),
+1913   [then (conv (rand_tac beta_expand))
+1914     (thenl (applyth nat_e)
+1915       [then (conv b)
+1916         (then inv
+1917           (bind nat x21 \
+1918             then (conv (land_tac (applyth plus_z)))
+1919              (then sym (applyth plus_n_z)))),
+1920       then (repeat (conv (depth_tac b)))
+1921        (then inv
+1922          (bind nat x21 \
+1923            bind nat x22 \
+1924             then (conv (land_tac (applyth plus_s)))
+1925              (then sym
+1926                (then (conv (land_tac (applyth plus_n_s)))
+1927                  (thenl c [r, then sym apply])))))])])
+1928
+1929 ].
+1930
+1931/* Status and dependencies of the tactics:
+1932+dd:
+1933+sym:
+1934+eq_true_intro: (th tt_intro)
+1935+forall_i: dd eq_true_intro
+1936+conj: dd eq_true_intro
+1937+andr: dd tt_intro
+1938+andl: dd tt_intro
+1939+forall_e: sym dd
+1940+mp: andr sym dd
+1941+i: dd andl conj
+1942+cut: andr sym dd i
+1943+cutth: cut
+1944+lapply*: mp
+1945+lforall*: mp forall_e
+1946+apply*: lapply lforall
+1947+applyth: cutth apply*
+1948
+1949- f converional sometimes fails
+1950- conv (depth_tac) diverges when applied to terms that contain
+1951  metavariables
+1952- repeat is not implemented using progress, that is not even there
+1953*/
+1954
+1955/*
+1956-2.5) in the proof for myprop, at the end I provide the
+1957  witness (and X X) where X remains free (and it is not even pi-quantified).
+1958  If prop was empty, then X could not exist. On the other hand, if X was
+1959  empty, then there would be no need to provide the proof at all.
+1960  In any case, the symptom for X remaining free at the end of a proof is
+1961  one or more goals delayed on it. We never check for them and we have
+1962  no way atm to do that. See bug -3)
+1963
+1964-2) the test apply_2 is very slow: why?
+1965    same for the witness for myprop
+1966
+19670) definitions must not be recursive; typing should capture it
+1968   (but not if declare_constraint is commented out...)
+1969
+19700.25) occurr check in bind case still missing :-(
+1971
+19720.50) case AppUvar vs AppUVar in unification is bugged (e.g.)
+1973      X^2 x0 x1 = X^2 x0 x1
+1974
+19752) we need to fix the ELPI problems about handling of metavariables.
+1976 I have already discussed with Enrico about them and he could have a
+1977 shot at them. Namely:
+1978 a) occur check + optimization to avoid it when possible (IN PROGRESS)
+1979 b) unimplemented cases of restriction (IN PROGRESS)
+1980
+19813) once we let metavariables reach the goals, the current HOL-light 
+1982 tactic implementation becomes too fragile. We should let the user 
+1983 refer to hypotheses at least by number if not by name. But we better
+1984 have a bidirectional successor/predecessor via declare_constraint
+1985
+19865) we could implement an automated theorem prover in lambdaProlog
+1987 that works or is interfaced with the HOL-light code. There are
+1988 complete provers like leanCOP 2.0 that are only 10 lines of code,
+1989 but use some Prolog tricks.
+1990
+19916) we should do a small formalization, possibly developing a tactic,
+1992 to prove that everything is working. For example, a decision procedure
+1993 for rings or for linear inequations.
+1994
+1995*/
+
+
+
File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hollight.elpi", line 28, column 0, characters 756-797:
+local keyword is no longer supported
+
+
+

../../tests/sources/hollight_legacy.elpi +:

+
Fatal error: exception Failure("File /home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hollight_legacy.elpi not found in: /home/tassi/LPCIC/elpi/_build/default/../lib/, /home/tassi/LPCIC/elpi/_build/default/../lib/ocaml, /home/tassi/LPCIC/elpi/_build/install/default/lib, /home/tassi/LPCIC/elpi/_build/default")
+
+
+

../../tests/sources/hyp_uvar.elpi +:

+
1pred f i:any.
+2
+3main :-
+4  (f uvar :- print "ok") => (f X, not(f 1)), var X.
+
+
+
ok
+
+
+
Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/hyp_uvar.elpi", line 5, column 3, characters 27-67:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+
+Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/impl.elpi +:

+
1% q X Y shoud yield X=ok Y=ok
+2
+3:untyped q X Y :- (r a => p X), f X Y.
+4:untyped f ok ko :- r a.
+5:untyped f ok ok.
+6:untyped p ko :- r a.
+7:untyped p ok :- r a.
+8:untyped main :- q X Y, X = ok, Y = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/impl2.elpi +:

+
1% q X yields X=ok
+2
+3:untyped q X :- (a, (b :- a), (a => c)) => (b,c => r ok) => r X.
+4:untyped main :- q X, X = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/index2.elpi +:

+
  1% to be traced
+  2
+  3:index(_ _ _ _ _ _ _ _ 1)
+  4pred p i:int, i:int, i:int, i:int, i:int, i:int, i:int, i:int, i:int.
+  5p X X X X X X X X 2.
+  6p X X X X X X X X 2.
+  7p X X X X X X X X 2.
+  8p X X X X X X X X 2.
+  9p X X X X X X X X 2.
+ 10p X X X X X X X X 2.
+ 11p X X X X X X X X 2.
+ 12p X X X X X X X X 2.
+ 13p X X X X X X X X 2.
+ 14p X X X X X X X X 2.
+ 15p X X X X X X X X 2.
+ 16p X X X X X X X X 2.
+ 17p X X X X X X X X 2.
+ 18p X X X X X X X X 2.
+ 19p X X X X X X X X 2.
+ 20p X X X X X X X X 2.
+ 21p X X X X X X X X 2.
+ 22p X X X X X X X X 2.
+ 23p X X X X X X X X 2.
+ 24p X X X X X X X X 2.
+ 25p X X X X X X X X 2.
+ 26p X X X X X X X X 2.
+ 27p X X X X X X X X 2.
+ 28p X X X X X X X X 2.
+ 29p X X X X X X X X 2.
+ 30p X X X X X X X X 2.
+ 31p X X X X X X X X 2.
+ 32p X X X X X X X X 2.
+ 33p X X X X X X X X 2.
+ 34p X X X X X X X X 2.
+ 35p X X X X X X X X 2.
+ 36p X X X X X X X X 2.
+ 37p X X X X X X X X 2.
+ 38p X X X X X X X X 2.
+ 39p X X X X X X X X 2.
+ 40p X X X X X X X X 2.
+ 41p X X X X X X X X 2.
+ 42p X X X X X X X X 2.
+ 43p X X X X X X X X 2.
+ 44p X X X X X X X X 2.
+ 45p X X X X X X X X 2.
+ 46p X X X X X X X X 2.
+ 47p X X X X X X X X 2.
+ 48p X X X X X X X X 2.
+ 49p X X X X X X X X 2.
+ 50p X X X X X X X X 2.
+ 51p X X X X X X X X 2.
+ 52p X X X X X X X X 2.
+ 53p X X X X X X X X 2.
+ 54p X X X X X X X X 2.
+ 55p X X X X X X X X 2.
+ 56p X X X X X X X X 2.
+ 57p X X X X X X X X 2.
+ 58p X X X X X X X X 2.
+ 59p X X X X X X X X 2.
+ 60p X X X X X X X X 2.
+ 61p X X X X X X X X 2.
+ 62p X X X X X X X X 2.
+ 63p X X X X X X X X 2.
+ 64p X X X X X X X X 2.
+ 65p X X X X X X X X 2.
+ 66p X X X X X X X X 2.
+ 67p X X X X X X X X 2.
+ 68p X X X X X X X X 2.
+ 69p X X X X X X X X 2.
+ 70p X X X X X X X X 2.
+ 71p X X X X X X X X 2.
+ 72p X X X X X X X X 2.
+ 73p X X X X X X X X 2.
+ 74p X X X X X X X X 2.
+ 75p X X X X X X X X 2.
+ 76p X X X X X X X X 2.
+ 77p X X X X X X X X 2.
+ 78p X X X X X X X X 2.
+ 79p X X X X X X X X 2.
+ 80p X X X X X X X X 2.
+ 81p X X X X X X X X 2.
+ 82p X X X X X X X X 2.
+ 83p X X X X X X X X 2.
+ 84p X X X X X X X X 2.
+ 85p X X X X X X X X 2.
+ 86p X X X X X X X X 2.
+ 87p X X X X X X X X 2.
+ 88p X X X X X X X X 2.
+ 89p X X X X X X X X 2.
+ 90p X X X X X X X X 2.
+ 91p X X X X X X X X 2.
+ 92p X X X X X X X X 2.
+ 93p X X X X X X X X 2.
+ 94p X X X X X X X X 2.
+ 95p X X X X X X X X 2.
+ 96p X X X X X X X X 2.
+ 97p X X X X X X X X 2.
+ 98p X X X X X X X X 2.
+ 99p X X X X X X X X 2.
+100p X X X X X X X X 2.
+101p X X X X X X X X 2.
+102p X X X X X X X X 2.
+103p X X X X X X X X 2.
+104p X X X X X X X X 2.
+105p X X X X X X X X 2.
+106p X X X X X X X X 2.
+107p X X X X X X X X 2.
+108p X X X X X X X X 2.
+109p X X X X X X X X 1.
+110
+111pred iter i:int, i:prop.
+112iter N P :- N > 0, !, P, M is N - 1, iter M P.
+113iter 0 _.
+114
+115main :-
+116  iter 999999 (p 1 1 1 1 1 1 1 1 1).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.001
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 1.311
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/io_colon.elpi +:

+
1pred f i:int.
+2main :- (pi i\ f i :- true) => f 1.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/lambda.elpi +:

+
 1% test Z yields Z=impl(impl A B) (impl A B)
+ 2
+ 3% Type inference for simply typed lambda terms
+ 4% Syntax: t ::= appl t t | abs F    where F is a function t -> t
+ 5% Syntax: ty ::= impl ty ty
+ 6
+ 7:untyped of (appl T1 T2) B :- of T1 (impl A B), of T2 A.
+ 8:untyped of (lam F) (impl A B) :- pi x\ of x A => of (F x) B.
+ 9
+10:untyped test Z :- of (lam f\ lam a\ appl f a) Z.
+11
+12:untyped main :- test Z, Z = impl (impl a b) (impl a b).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/lambda2.elpi +:

+
1% q X yields X=ok
+2
+3:untyped q X :- r X (x\ p x).
+4:untyped r ko (x\ g x).
+5:untyped r ok (y\ p y).
+6:untyped main :- q X, X = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/lambda3.elpi +:

+
 1%%%module lambda3.
+ 2
+ 3:untyped of (appl T1 T2) B :- of T1 (impl A B), of T2 A.
+ 4:untyped of (lam F) (impl A B) :- pi x\ of x A => of (F x) B.
+ 5
+ 6:untyped append (xcons X XS) L (xcons X L1)  :- append XS L L1 .
+ 7:untyped append xnil L L .
+ 8
+ 9:untyped termify xnil (lam x\x).
+10:untyped termify (xcons X XS) (lam F) :- pi c\ termify XS (F c).
+11
+12:untyped test L :- 
+13  X1 = (xcons x0 (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil))))))))))), 
+14  append X1 X1 X2 ,
+15  append X2 X2 X3 ,
+16  append X3 X3 X4 ,
+17  append X4 X4 X5 ,
+18  append X5 X5 X6 ,
+19  % append X6 X6 X7 ,
+20  % append X7 X7 X8 ,
+21  % append X8 X8 X9 ,
+22  % append X9 X9 X10 ,
+23  % append X10 X10 X11 ,
+24  % append X11 X11 X12 ,
+25  % append X12 X12 X13 ,
+26  % append X13 X13 X14 ,
+27   % append X14 X14 X15 ,
+28   % append X15 X15 X16 ,
+29   % append X16 X16 X17 ,
+30   % append X17 X17 X18 ,
+31   X = X6 ,
+32   termify X L.
+33
+34:untyped once L :- of L Z.
+35
+36:untyped iter zero X.
+37:untyped iter (s N) X :- X, iter N X.
+38
+39:untyped plus zero X X.
+40:untyped plus (s X) Y (s S) :- plus X Y S.
+41
+42:untyped mult zero X zero.
+43:untyped mult (s X) Y Z :- mult X Y K, plus Y K Z.
+44
+45:untyped exp zero X (s zero).
+46:untyped exp (s X) Y Z :- exp X Y K, mult Y K Z.
+47
+48:untyped main :-
+49 TEN = s (s (s (s (s (s (s (s (s (s zero))))))))),
+50 exp (s (s (s zero))) TEN THOUSAND,
+51 test L,
+52 iter THOUSAND (once L).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.263
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/list_as_conj.elpi +:

+
1type a, b, f prop.
+2f :- [print a, print b, a].
+3a :- (b :- [print "done"]) => b.
+4
+5main :- f.
+
+
+
a
+b
+done
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/list_comma.elpi +:

+
1main :-
+2  L1 = [1,2,3,],
+3  L2 = [1,2,3],
+4  std.length L1 = std.length L2.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/llam.elpi +:

+
 1pred spy i:prop.
+ 2spy X :-  counter "run" N, print N "test " X, 
+ 3  not(not(X)).
+ 4
+ 5type test ((A -> A -> prop) -> B -> prop) -> B -> prop.
+ 6test P T :-
+ 7  spy(P (x\y\x = y) F, F = T),
+ 8  spy(P (x\y\y = x) F, F = T),
+ 9  spy(pi dummy\ sigma F\ P (x\y\x = y) F, F = T),
+10  spy(pi dummy\ sigma F\ P (x\y\y = x) F, F = T)
+11  , print "----------------------------------------"
+12  .
+13
+14pred clause o:any.
+15clause (x\y\F y x) :- F = a\b\b.
+16pred clause1 o:any.
+17clause1 (x\y\x).
+18pred clause2 o:any.
+19clause2 (x\y\X x, F y (X x)) :- F = a\b\b.
+20pred clause3 o:any.
+21
+22type r A -> B.
+23pred prune_arg o:any.
+24pred prune_arg2 o:any.
+25pred prune_arg3 o:any.
+26prune_arg (r F).
+27prune_arg2 (r (x\F x)).
+28prune_arg3 (r (x\y\F y x)).
+29
+30type whatever, h, f, v A.
+31
+32main :-
+33  test (eq\F\        pi x\ pi y\ eq (F y x) x)             (a\b\b),
+34  test (eq\F\   not (pi x\ pi y\ eq (F x) y))              whatever,
+35  test (eq\F\        pi x\ pi y\ eq (F y x) (r (w\h w x))) (a\b\r (x\h x b)),
+36  test (eq\F\        pi x\ pi y\ sigma R\ R = x, eq (F y x) R)             (a\b\b),
+37  test (eq\F\   not (pi x\ pi y\ sigma R\ R = x, eq (F R) y))              whatever,
+38  test (eq\F\        pi x\ pi y\ sigma R\ R = x, eq (F y x) (r (w\h w R))) (a\b\r (x\h x b)),
+39  spy (pi dummy\ clause (x\y\x)),
+40  spy (pi dummy\ clause1 (x\y\F y x), F = a\b\b),
+41  spy (pi dummy\ clause2 (x\y\x , x)),
+42  spy (clause3 (x\y\G y x) => pi dummy\ clause3 (x\y\x)), (G = a\b\b),
+43  test (eq\F\        sigma H\pi x\ pi y\ eq (F y) (r (H y x)), H x x = x, H x y = x)   (a\r a),
+44
+45  % this is hard because F<H but is applied to y that H can see, so H is restricted to the
+46  % level of F (that alone would prune y) but applied to y, so H 1 = y works
+47  test (eq\F\        pi x\ pi y\ sigma H\ pi z\pi w\eq (F y) (r (H w)),
+48                                                    spy(H 1 = y), not(H 2 = x))
+49       (a\r whatever),
+50  test (eq\F\        pi x\ pi y\ sigma H\ pi w\eq (F y x) (r (H w)),
+51                                               H 1 = f x y)
+52       (a\b\r (f b a)),
+53 
+54  test (eq\F\        pi x\pi y\prune_arg (F y x))  (a\b\r (v a b)),
+55  test (eq\F\        pi x\pi y\prune_arg2 (F y x)) (a\b\r (x\v a b)),
+56  test (eq\F\        pi x\pi y\prune_arg3 (F y x)) (a\b\r (x\y\v a b)),
+57 
+58  true.
+
+
+
0 test  pi c0 \ pi c1 \ X0 c1 c0 = c0 , X0 = (c0 \ c1 \ c1)
+0 test  pi c0 \ pi c1 \ c0 = X0 c1 c0 , X0 = (c0 \ c1 \ c1)
+0 test  pi c0 \ sigma c1 \ pi c2 \ pi c3 \ c1 c3 c2 = c2 , c1 = (c2 \ c3 \ c3)
+0 test  pi c0 \ sigma c1 \ pi c2 \ pi c3 \ c2 = c1 c3 c2 , c1 = (c2 \ c3 \ c3)
+----------------------------------------
+0 test  not (pi c0 \ pi c1 \ X1 c0 = c1) , X1 = whatever
+0 test  not (pi c0 \ pi c1 \ c1 = X1 c0) , X1 = whatever
+0 test  pi c0 \ sigma c1 \ not (pi c2 \ pi c3 \ c1 c2 = c3) , c1 = whatever
+0 test  pi c0 \ sigma c1 \ not (pi c2 \ pi c3 \ c3 = c1 c2) , c1 = whatever
+----------------------------------------
+0 test
+ pi c0 \ pi c1 \ X2 c1 c0 = r c2 \ h c2 c0 , X2 = (c0 \ c1 \ r c2 \ h c2 c1)
+0 test
+ pi c0 \ pi c1 \ r c2 \ h c2 c0 = X2 c1 c0 , X2 = (c0 \ c1 \ r c2 \ h c2 c1)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ c1 c3 c2 = r c4 \ h c4 c2 , c1 = (c2 \ c3 \ r c4 \ h c4 c3)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ r c4 \ h c4 c2 = c1 c3 c2 , c1 = (c2 \ c3 \ r c4 \ h c4 c3)
+----------------------------------------
+0 test
+ pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , X3 c1 c0 = c2 , X3 = (c0 \ c1 \ c1)
+0 test
+ pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , c2 = X3 c1 c0 , X3 = (c0 \ c1 \ c1)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c1 c3 c2 = c4 , c1 = (c2 \ c3 \ c3)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c4 = c1 c3 c2 , c1 = (c2 \ c3 \ c3)
+----------------------------------------
+0 test  not (pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , X4 c2 = c1) , X4 = whatever
+0 test  not (pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , c1 = X4 c2) , X4 = whatever
+0 test
+ pi c0 \
+  sigma c1 \
+   not (pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c1 c4 = c3) , c1 = whatever
+0 test
+ pi c0 \
+  sigma c1 \
+   not (pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c3 = c1 c4) , c1 = whatever
+----------------------------------------
+0 test
+ pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , X5 c1 c0 = r c3 \ h c3 c2 ,
+  X5 = (c0 \ c1 \ r c2 \ h c2 c1)
+0 test
+ pi c0 \ pi c1 \ sigma c2 \ c2 = c0 , r c3 \ h c3 c2 = X5 c1 c0 ,
+  X5 = (c0 \ c1 \ r c2 \ h c2 c1)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , c1 c3 c2 = r c5 \ h c5 c4 ,
+    c1 = (c2 \ c3 \ r c4 \ h c4 c3)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ sigma c4 \ c4 = c2 , r c5 \ h c5 c4 = c1 c3 c2 ,
+    c1 = (c2 \ c3 \ r c4 \ h c4 c3)
+----------------------------------------
+0 test  pi c0 \ clause c1 \ c2 \ c1
+0 test  pi c0 \ clause1 c1 \ c2 \ X6 c2 c1 , X6 = (c1 \ c2 \ c2)
+0 test  pi c0 \ clause2 c1 \ c2 \ c1 , c1
+0 test  clause3 c0 \ c1 \ X7 c1 c0 => pi c0 \ clause3 c1 \ c2 \ c1
+0 test
+ sigma c0 \
+  pi c1 \ pi c2 \ , (X8 c2 = r (c0 c2 c1)) (c0 c1 c1 = c1) (c0 c1 c2 = c1) ,
+  X8 = (c0 \ r c0)
+0 test
+ sigma c0 \
+  pi c1 \ pi c2 \ , (r (c0 c2 c1) = X8 c2) (c0 c1 c1 = c1) (c0 c1 c2 = c1) ,
+  X8 = (c0 \ r c0)
+0 test
+ pi c0 \
+  sigma c1 \
+   sigma c2 \
+    pi c3 \ pi c4 \ , (c1 c4 = r (c2 c4 c3)) (c2 c3 c3 = c3) (c2 c3 c4 = c3) ,
+    c1 = (c2 \ r c2)
+0 test
+ pi c0 \
+  sigma c1 \
+   sigma c2 \
+    pi c3 \ pi c4 \ , (r (c2 c4 c3) = c1 c4) (c2 c3 c3 = c3) (c2 c3 c4 = c3) ,
+    c1 = (c2 \ r c2)
+----------------------------------------
+0 test
+ pi c0 \
+  pi c1 \
+   sigma c2 \
+    pi c3 \ pi c4 \ , (X9 c1 = r (c2 c4)) (spy (c2 1 = c1)) (not (c2 2 = c0)) ,
+  X9 = (c0 \ r whatever)
+0 test  X10 c1 = c1
+0 test
+ pi c0 \
+  pi c1 \
+   sigma c2 \
+    pi c3 \ pi c4 \ , (r (c2 c4) = X9 c1) (spy (c2 1 = c1)) (not (c2 2 = c0)) ,
+  X9 = (c0 \ r whatever)
+0 test  X11 c1 = c1
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \
+    pi c3 \
+     sigma c4 \
+      pi c5 \ pi c6 \ , (c1 c3 = r (c4 c6)) (spy (c4 1 = c3)) (not (c4 2 = c2))
+    , c1 = (c2 \ r whatever)
+0 test  X12^1 c2 = c2
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \
+    pi c3 \
+     sigma c4 \
+      pi c5 \ pi c6 \ , (r (c4 c6) = c1 c3) (spy (c4 1 = c3)) (not (c4 2 = c2))
+    , c1 = (c2 \ r whatever)
+0 test  X13^1 c2 = c2
+----------------------------------------
+0 test
+ pi c0 \ pi c1 \ sigma c2 \ pi c3 \ X14 c1 c0 = r (c2 c3) , c2 1 = f c0 c1 ,
+  X14 = (c0 \ c1 \ r (f c1 c0))
+0 test
+ pi c0 \ pi c1 \ sigma c2 \ pi c3 \ r (c2 c3) = X14 c1 c0 , c2 1 = f c0 c1 ,
+  X14 = (c0 \ c1 \ r (f c1 c0))
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ sigma c4 \ pi c5 \ c1 c3 c2 = r (c4 c5) , c4 1 = f c2 c3 ,
+    c1 = (c2 \ c3 \ r (f c3 c2))
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ sigma c4 \ pi c5 \ r (c4 c5) = c1 c3 c2 , c4 1 = f c2 c3 ,
+    c1 = (c2 \ c3 \ r (f c3 c2))
+----------------------------------------
+0 test  pi c0 \ pi c1 \ prune_arg (X15 c1 c0) , X15 = (c0 \ c1 \ r (v c0 c1))
+0 test  pi c0 \ pi c1 \ prune_arg (X15 c1 c0) , X15 = (c0 \ c1 \ r (v c0 c1))
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ prune_arg (c1 c3 c2) , c1 = (c2 \ c3 \ r (v c2 c3))
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ prune_arg (c1 c3 c2) , c1 = (c2 \ c3 \ r (v c2 c3))
+----------------------------------------
+0 test
+ pi c0 \ pi c1 \ prune_arg2 (X16 c1 c0) , X16 = (c0 \ c1 \ r c2 \ v c0 c1)
+0 test
+ pi c0 \ pi c1 \ prune_arg2 (X16 c1 c0) , X16 = (c0 \ c1 \ r c2 \ v c0 c1)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ prune_arg2 (c1 c3 c2) , c1 = (c2 \ c3 \ r c4 \ v c2 c3)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ prune_arg2 (c1 c3 c2) , c1 = (c2 \ c3 \ r c4 \ v c2 c3)
+----------------------------------------
+0 test
+ pi c0 \ pi c1 \ prune_arg3 (X17 c1 c0) , X17 = (c0 \ c1 \ r c2 \ c3 \ v c0 c1)
+0 test
+ pi c0 \ pi c1 \ prune_arg3 (X17 c1 c0) , X17 = (c0 \ c1 \ r c2 \ c3 \ v c0 c1)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ prune_arg3 (c1 c3 c2) , c1 = (c2 \ c3 \ r c4 \ c5 \ v c2 c3)
+0 test
+ pi c0 \
+  sigma c1 \
+   pi c2 \ pi c3 \ prune_arg3 (c1 c3 c2) , c1 = (c2 \ c3 \ r c4 \ c5 \ v c2 c3)
+----------------------------------------
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/llam.elpi", line 26, column 14, characters 637-637:
+F is linear: name it _F (discard) or F_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/llam.elpi", line 27, column 17, characters 657-660:
+F is linear: name it _F (discard) or F_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/llam.elpi", line 28, column 19, characters 683-688:
+F is linear: name it _F (discard) or F_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.001
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/llamchr.elpi +:

+
 1pred term i:A, o:B.
+ 2
+ 3:untyped term (app X Y) B :- term X (arr A B), term Y A.
+ 4:untyped term (lam A F) (arr A B) :- pi x\ term x A => term (F x) B.
+ 5:untyped term (uvar as X) A :- declare_constraint (term X A) [X].
+ 6:untyped term true bool.
+ 7:untyped term false bool.
+ 8:untyped term zero nat.
+ 9:untyped term succ (arr nat nat).
+10
+11constraint term {
+12  rule (GX ?- term (uvar K LX) TX)
+13     \ (GY ?- term (uvar K LY) TY)
+14     | (compatible GX LX GY LY CTXCONSTR)
+15   <=> [ TX = TY , CTXCONSTR ].
+16}
+17
+18% resilient to dummy ctx variables
+19:untyped both_or_none P Q :- P, !, Q.
+20:untyped both_or_none P Q :- not P, not Q.
+21
+22:untyped compatible _ [] _ [] [] :- !.
+23:untyped compatible GX [X|XS] GY [Y|YS] [TX = TY | K] :-
+24 both_or_none (GX => term X TX) (GY => term Y TY),
+25 !,
+26 compatible GX XS GY YS K.
+27:untyped compatible _ _ _ _ [false].
+28
+29:untyped spy P :- print "[" P, P, print "]ok", !.
+30:untyped spy P :- print "]fail", fail.
+31
+32pred watch i:A.
+33watch (uvar as X) :- declare_constraint (print "watch" X) [X], !.
+34watch X :- print "watch" X.
+35
+36:untyped main :- 
+37  % this is tricky becasuse X sees w, so CHR has to deal with a dirty context
+38  pi w\ (sigma X A B C A' B' T1 T2 \ pi v\
+39    term b2n (arr bool nat) =>
+40      (T1 = (lam _ x \ lam _ y\ X x y),
+41       T2 = (lam _ x \ lam _ y\ X y x),
+42       term T1 (arr A (arr B nat)),
+43       term T2 (arr A' (arr B' C)),
+44       print A A' B B' C "|" T1 "|" T2,
+45       spy (X = x\y\ x),
+46       print A A' B B' C "|" T1 "|" T2,
+47       spy (term (app T2 false) _),
+48       print A A' B B' C "|" T1 "|" T2)),
+49  true.
+50
+51% vim: set ft=lprolog:
+
+
+
X0 X1 X1 X0 nat | lam X0 c2 \ lam X1 c3 \ X2 c0 c2 c3 |
+ lam X1 c2 \ lam X0 c3 \ X2 c0 c3 c2
+[ (c2 \ c3 \ X2 c0 c2 c3) = (c2 \ c3 \ c2)
+]ok
+nat X1 X1 nat nat | lam nat c2 \ lam X1 c3 \ c2 | lam X1 c2 \ lam nat c3 \ c3
+[ term (app (lam X1 c2 \ lam nat c3 \ c3) false) _
+]ok
+nat bool bool nat nat | lam nat c2 \ lam bool c3 \ c2 |
+ lam bool c2 \ lam nat c3 \ c3
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/map.elpi +:

+
 1pred build i:int, i:int, i:std.map int int, o:std.map int int.
+ 2build N N X X :- !.
+ 3build N M X X1 :-
+ 4  N1 is N + 1,
+ 5  std.map.add N N X XR,
+ 6  build N1 M XR X1.
+ 7
+ 8pred test i:int, i:int, i:(int -> A -> int -> prop), i:A.
+ 9test N N _ _ :- !.
+10test N M F X :-
+11  N1 is N + 1,
+12  std.assert! (F N X N) "not found",
+13  test N1 M F X.
+14
+15pred test2 i:int, i:int, i:(int -> A -> A -> prop), i:A.
+16test2 N N _ _ :- !.
+17test2 N M F X :-
+18  N1 is N + 1,
+19  std.assert! (F N X X1) "not found",
+20  test2 N1 M F X1.
+21
+22macro @iters :- 4096.
+23
+24main :-
+25  std.time (build 0 @iters {std.map.make cmp_term} T) Time0, !,
+26  std.time (test 0 @iters std.map.find T) Time1, !,
+27  std.map.bindings T B,
+28  std.assert! ({std.length B} = @iters, B = [pr 0 0|_]) "bindings broken", !,
+29  std.time (test2 0 @iters std.map.remove T) Time2, !,
+30  print Time0 "+" Time1 "+" Time2.
+
+
+
0.924682 + 0.043325 + 0.609252
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 1.740
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/map_list.elpi +:

+
 1kind l type.
+ 2type n l.
+ 3type c (pair int int) -> l -> l.
+ 4
+ 5pred add i:int, i:int, i:l, o:l.
+ 6add K V n (c (pr K V) n) :- !.
+ 7add K V (c (pr K _) L) (c (pr K V) L) :- !.
+ 8add K V (c X L) (c X L1) :- add K V L L1.
+ 9
+10pred bindings i:l, o:list (pair int int).
+11bindings n [].
+12bindings (c X L) [X|L1] :- bindings L L1.
+13
+14pred assoc i:int, i:l, o:int.
+15assoc K (c (pr K V) _) V :- !.
+16assoc K (c _ L) V :- assoc K L V.
+17
+18pred remove i:int, i:l, o:l.
+19remove K (c (pr K _) L) L :- !.
+20remove K (c X L) (c X L1) :- remove K L L1.
+21
+22pred build i:int, i:int, i:l, o:l.
+23build N N X X :- !.
+24build N M X X1 :-
+25  N1 is N + 1,
+26  add N N X XR,
+27  build N1 M XR X1.
+28
+29pred test i:int, i:int, i:(int -> A -> int -> prop), i:A.
+30test N N _ _ :- !.
+31test N M F X :-
+32  N1 is N + 1,
+33  std.assert! (F N X N) "not found",
+34  test N1 M F X.
+35
+36pred test2 i:int, i:int, i:(int -> A -> A -> prop), i:A.
+37test2 N N _ _ :- !.
+38test2 N M F X :-
+39  N1 is N + 1,
+40  std.assert! (F N X X1) "not found",
+41  test2 N1 M F X1.
+42
+43macro @iters :- 4096.
+44
+45main :-
+46  std.time (build 0 @iters n T) Time0, !,
+47  std.time (test 0 @iters assoc T) Time1, !,
+48  bindings T B,
+49  std.assert! ({std.length B} = @iters, B = [pr 0 0|_]) "bindings broken", !,
+50  std.time (test2 0 @iters remove T) Time2, !,
+51  print Time0 "+" Time1 "+" Time2.
+
+
+
5.317134 + 2.552711 + 0.261567
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 8.139
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/map_list_opt.elpi +:

+
 1pred add i:int, i:int, i:list (pair int int), o:list (pair int int).
+ 2add K V [] [pr K V] :- !.
+ 3add K V [pr K _| L] [pr K V| L] :- !.
+ 4add K V [X| L] [X| L1] :- add K V L L1.
+ 5
+ 6pred bindings i:list (pair int int), o:list (pair int int).
+ 7bindings X X.
+ 8
+ 9pred assoc i:int, i:list (pair int int), o:int.
+10assoc K [pr K V| _] V :- !.
+11assoc K [_| L] V :- assoc K L V.
+12
+13pred remove i:int, i:list (pair int int), o:list (pair int int).
+14remove K [pr K _| L] L :- !.
+15remove K [X| L] [X| L1] :- remove K L L1.
+16
+17pred build i:int, i:int, i:list (pair int int), o:list (pair int int).
+18build N N X X :- !.
+19build N M X X1 :-
+20  N1 is N + 1,
+21  add N N X XR,
+22  build N1 M XR X1.
+23
+24pred test i:int, i:int, i:(int -> A -> int -> prop), i:A.
+25test N N _ _ :- !.
+26test N M F X :-
+27  N1 is N + 1,
+28  std.assert! (F N X N) "not found",
+29  test N1 M F X.
+30
+31pred test2 i:int, i:int, i:(int -> A -> A -> prop), i:A.
+32test2 N N _ _ :- !.
+33test2 N M F X :-
+34  N1 is N + 1,
+35  std.assert! (F N X X1) "not found",
+36  test2 N1 M F X1.
+37
+38macro @iters :- 4096.
+39
+40main :-
+41  std.time (build 0 @iters [] T) Time0, !,
+42  std.time (test 0 @iters assoc T) Time1, !,
+43  bindings T B,
+44  std.assert! ({std.length B} = @iters, B = [pr 0 0|_]) "bindings broken", !,
+45  std.time (test2 0 @iters remove T) Time2, !,
+46  print Time0 "+" Time1 "+" Time2.
+
+
+
4.348501 + 2.003430 + 0.159274
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 6.516
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/name_builtin.elpi +:

+
1main :-
+2  (pi f x y\
+3    name (f x y) f [x, y]),
+4  (pi x\ name x x []),
+5  (pi f x y\
+6    name (A f x y) f [x,y], print "A=" A, A f x y = (f x y)),
+7  (pi x\ name (B x) x [], print "B=" B, B x = x).
+
+
+
A= c3 \ c4 \ c5 \ c3 c4 c5
+B= c1 \ c1
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/named_clauses00.elpi +:

+
1pred c1.
+2
+3:name "name1"
+4c1.
+5
+6:name "name1"
+7c1.
+8
+9main.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/named_clauses00.elpi", line 6, column 0, characters 29-45:
+duplicate clause name name1
+
+
+

../../tests/sources/named_clauses01.elpi +:

+
1pred c1.
+2
+3:before "c"
+4c1 
+5
+6main.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/named_clauses01.elpi", line 6, column 0, characters 27-31:
+c1 is not a function but it is passed the argument main.
+The type of c1 is prop
+
+
+

../../tests/sources/named_clauses02.elpi +:

+
 1pred c.
+ 2
+ 3:name "c"
+ 4c :- !, fail.
+ 5
+ 6:before "c"
+ 7c :- true.
+ 8
+ 9:before "c"
+10c :- !, fail, fail.
+11
+12main :- c.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/namespaces00.elpi +:

+
 1namespace rev {
+ 2  pred aux i:list A, i:list A, o:list A.
+ 3  aux [X|XS] ACC R :- aux XS [X|ACC] R.
+ 4  aux [] L L.
+ 5}
+ 6pred rev i:list A, o:list A.
+ 7rev L RL  :- rev.aux L []  RL.
+ 8
+ 9pred aux i:list A, i:list A, o:list A.
+10
+11pred main.
+12main :- rev [1,2,3] [3,2,1], not(aux [] [] []), rev.aux [] [] [].
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/namespaces01.elpi +:

+
 1pred toto i:int.
+ 2toto 1.
+ 3
+ 4% We test toto is not put inside the namespace
+ 5namespace foo {
+ 6  pred bar i:any.
+ 7  bar X :- toto 2 => baz X.
+ 8  pred baz i:any.
+ 9  baz X :- toto X.
+10}
+11main :- foo.bar 2, foo.baz 1.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/namespaces02.elpi +:

+
1namespace x {
+2  namespace acc { accumulate namespaces00. }
+3  :untyped foo :- rev.aux [] [] []. % does not exists, since it is inside acc
+4}
+5
+6:untyped
+7main :- x.acc.rev [1,2,3] [3,2,1], x.acc.rev.aux [] [] [], not(x.foo).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/namespaces03.elpi +:

+
 1type a.foo4 prop.
+ 2type a.foo3 prop.
+ 3type a.foo2 prop.
+ 4type a.foo1 prop.
+ 5type a.b.foo2 prop.
+ 6type a.b.foo1 prop.
+ 7type a.b.c.foo prop.
+ 8
+ 9namespace a {
+10
+11  foo1 :- b.c.foo.
+12  foo2 :- b.foo1, b.foo2.
+13
+14  namespace b {
+15
+16     foo1 :- c.foo.
+17
+18    namespace c {
+19 
+20       foo.
+21   
+22    }
+23
+24     foo2 :- c.foo.
+25
+26  }
+27
+28   foo3 :- b.c.foo.
+29   foo4 :- b.foo1, b.foo2.
+30
+31}
+32
+33 main :- a.foo1, a.foo2, a.foo3, a.foo4.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/nil_cons.elpi +:

+
1main :- [] = nil, 3 :: [] = cons 3 [].
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/notation.elpi +:

+
 1module test.
+ 2/*
+ 3infixl x+,y+ 190.
+ 4infixr x++ 191.
+ 5prefixr z+ 191.
+ 6postfixl w+ 190.
+ 7infixl x* 200.
+ 8*/
+ 9X +x D.
+10
+11foo xx uu.
+12
+13~z x ?w.
+14
+15x *x y +x z *x w.
+16
+17a +x b +x c +x d +x e.
+18a ++x b ++x c ++x d ++x e.
+19
+20type a, b, d, x, xx, w, y, z, c, cd, e, uu any.
+21type foo any -> any -> prop.
+22type (~z) any -> prop.
+23type (?w) any -> any.
+24type (+x) any -> any -> any.
+25type (++x) any -> any -> any.
+26type (+y) A -> B -> C.
+27type (*x) A -> B -> C.
+28
+29main :- print (a a +x [b] +y d), cd +x d.
+
+
+
a a +x [b] +y d
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/notation.elpi", line 9, column 6, characters 107-107:
+D is linear: name it _D (discard) or D_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/notation.elpi", line 9, column 0, characters 101-102:
+X is linear: name it _X (discard) or X_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/notation_error.elpi +:

+
1infix foo 1.
+
+
+
File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/notation_error.elpi", line 1, column 0, characters 0-12:
+Mixfix directives are not supported by this parser.
+
+The parser is based on token families.
+A family is identified by some starting characters, for example
+a token '+-->' belongs to the family of '+'. There is no need
+to declare it.
+
+All the tokens of a family are parsed with the same precedence and
+associativity, for example 'x +--> y *--> z' is parsed as
+'x +--> (y *--> z)' since the family of '*' has higher precedence
+than the family of '+'.
+
+Here the table of tokens and token families.
+Token families are represented by the start symbols followed by '..'.
+Tokens of families marked with [*] cannot end with the starting symbol,
+eg `foo` is not an infix, while `foo is.
+The listing is ordered by increasing precedence.
+
+fixity                     | tokens / token families
+-------------------------- + -----------------------------------
+Infix   not   associative  | :-  ?-
+Infix   right associative  | ;
+Infix   right associative  | ==> (* see note 1 *)
+Infix   right associative  | ,  &
+Infix   right associative  | ->
+Infix   right associative  | =>
+Infix   not   associative  | =  ==  =<  r<  i<  s<  r=<  i=<  s=<
+                             <..  r>  i>  s>  r>=  i>=  s>=  >..
+                             is
+Infix   right associative  | ::
+Infix   not   associative  | '.. [*]
+Infix   left  associative  | ^..  r+  i+  s+  +..  -  r-  i-  s-
+Infix   left  associative  | r*  i*  s*  *..  /  div  mod
+Infix   right associative  | --..
+Infix   not   associative  | `.. [*]
+Infix   right associative  | ==..
+Infix   right associative  | ||..
+Infix   right associative  | &&..
+Infix   left  associative  | #..
+Prefix  not   associative  | r~  i~  ~..
+Postfix not   associative  | ?..
+
+If the token is a valid mixfix, and you want the file to stay compatible
+with Teyjus, you can ask Elpi to skip the directive. Eg:
+
+% elpi:skip 2  // skips the next two lines
+infixr ==> 120.
+infixr || 120.
+
+As a debugging facility one can ask Elpi to print the AST in order to
+verify how the text was parsed. Eg:
+
+echo 'MyFormula = a || b ==> c && d' | elpi -parse-term
+
+Notes:
+1: The LHS of ==> binds stronger than conjunction, hence (a,b ==> c,d) reads a, (b ==> (c,d))
+
+
+

../../tests/sources/notation_legacy.elpi +:

+
Fatal error: exception Failure("File /home/tassi/LPCIC/elpi/docs/source/../../tests/sources/notation_legacy.elpi not found in: /home/tassi/LPCIC/elpi/_build/default/../lib/, /home/tassi/LPCIC/elpi/_build/default/../lib/ocaml, /home/tassi/LPCIC/elpi/_build/install/default/lib, /home/tassi/LPCIC/elpi/_build/default")
+
+
+

../../tests/sources/patternunif.elpi +:

+
1% q Y should yield Y = \\\f 2
+2:untyped q Y :- pi b\ pi c\ (r :- pi a\ s (f a) => s (X b c a)) => r, Y = X.
+3
+4:untyped main :- q Y, Y = x\y\z\f z.
+
+
+
Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/patternunif.elpi", line 2, column 29, characters 59-98:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+
+Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/patternunif2.elpi +:

+
1% r Y yields Y=\0
+2:untyped q (a\ X a) X.
+3:untyped r A :- pi c\ q (a\a) A.
+4
+5:untyped main :- r Y, Y = x\x.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/pi.elpi +:

+
1% q X yields X=ok
+2
+3:untyped q X :- pi x\ p x => pi y\ r y => z x y X.
+4:untyped z A B ko :- r A, p B.
+5:untyped z A B ok :- p A, r B.
+6:untyped main :- q X, X = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/pi3.elpi +:

+
1% q X yields X=\0, i.e. X=b\b
+2
+3:untyped q X :- pi x\ pi y\ z (w\ X).
+4
+5:untyped z (a\ a).
+6:untyped z (a\ b\ b).
+7:untyped 
+8main :- q X, X = b\b.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/pi5.elpi +:

+
 1% q X, r X, s X all yields X=ok
+ 2kind i type.
+ 3type lam, bam (i -> i) -> i.
+ 4type of i -> prop.
+ 5type stop i.
+ 6type s diagnostic -> prop.
+ 7type r diagnostic -> prop.
+ 8type q diagnostic -> prop.
+ 9
+10of stop.
+11of (bam x\x).
+12of (lam x\F) :- pi w\ of F.
+13
+14q X :- of (lam x\ bam y\ y), X = ok.
+15r X :- of (bam y\ y), X = ok.
+16s X :- of (lam x\ lam y\ stop), X = ok.
+17
+18main :- q X, r S, s T, X = ok, S = ok, T = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/pnf.elpi +:

+
  1
+  2/*
+  3 * Predicates for transforming formulas into prenex normal form 
+  4 * assuming classical logic equivalences. This is an example of 
+  5 * analyzing formula structure, including recursion over bindings
+  6 * and generating modified structure based on this analysis
+  7 */
+  8
+  9%module  pnf.
+ 10
+ 11%type  merge  (form -> form -> o).
+ 12kind term, formula type.
+ 13type perp, tru formula.
+ 14type and, or, imp formula -> formula -> formula.
+ 15type adj, path term -> term -> formula.
+ 16type all, some (term -> formula) -> formula.
+ 17
+ 18pred quant_free o:formula.
+ 19quant_free perp.
+ 20quant_free tru.
+ 21quant_free A :- atom A.
+ 22quant_free (and B C) :- quant_free B, quant_free C.
+ 23quant_free (or B C) :- quant_free B, quant_free C.
+ 24quant_free (imp B C) :- quant_free B, quant_free C.
+ 25
+ 26pred atom o:formula.
+ 27atom (path X Y) :- termp X, termp Y.
+ 28atom (adj X Y) :- termp X, termp Y.
+ 29
+ 30type a, b, c term.
+ 31type f term -> term.
+ 32
+ 33pred termp o:term.
+ 34termp a.
+ 35termp b.
+ 36termp c.
+ 37termp (f X) :- termp X.
+ 38
+ 39pred prenex o:formula, o:formula.
+ 40(prenex B B) :- (quant_free B), !. 
+ 41(prenex (and B C) D) :- (prenex B U), (prenex C V), (merge (and U V) D).
+ 42(prenex (or B C) D) :- (prenex B U), (prenex C V), (merge (or U V) D).
+ 43(prenex (imp B C) D) :- (prenex B U), (prenex C V), (merge (imp U V) D).
+ 44(prenex (all B) (all D)) :- (pi x\ ((termp x) => (prenex (B x) (D x)))).
+ 45(prenex (some B) (some D)) :- (pi x\ ((termp x) => (prenex (B x) (D x)))).
+ 46
+ 47
+ 48/* This predicate is for moving out quantifiers appearing at the head of the 
+ 49immediate subformulas of a formula with a propositional connective as its 
+ 50top-level symbol */
+ 51pred merge o:formula, o:formula.
+ 52(merge (and (all B) (all C)) (all D)) :-
+ 53       (pi x\ ((termp x) => (merge (and (B x) (C x)) (D x)))).
+ 54(merge (and (all B) C) (all D)) :- 
+ 55       (pi x\ ((termp x) => (merge (and (B x) C) (D x)))).
+ 56(merge (and B (all C)) (all D)) :- 
+ 57       (pi x\ ((termp x) => (merge (and B (C x)) (D x)))).
+ 58
+ 59(merge (and (some B) C) (some D)) :- 
+ 60       (pi x\ ((termp x) => (merge (and (B x) C) (D x)))).
+ 61(merge (and B (some C)) (some D)) :-
+ 62       (pi x\ ((termp x) => (merge (and B (C x)) (D x)))).
+ 63
+ 64(merge (or (all B) C) (all D)) :-
+ 65       (pi x\ ((termp x) => (merge (or (B x) C) (D x)))).
+ 66(merge (or B (all C)) (all D)) :-
+ 67       (pi x\ ((termp x) => (merge (or B (C x)) (D x)))).
+ 68(merge (or (some B) (some C)) (some D)) :-
+ 69       (pi x\ ((termp x) => (merge (or (B x) (C x)) (D x)))).
+ 70(merge (or (some B) C) (some D)) :-
+ 71       (pi x\ ((termp x) => (merge (or (B x) C) (D x)))).
+ 72(merge (or B (some C)) (some D)) :-
+ 73       (pi x\ ((termp x) => (merge (or B (C x)) (D x)))).
+ 74
+ 75(merge (imp (all B) (some C)) (some D)) :- 
+ 76       (pi x\ ((termp x) => (merge (imp (B x) (C x)) (D x)))).
+ 77(merge (imp (all B) C) (some D)) :- 
+ 78       (pi x\ ((termp x) => (merge (imp (B x) C) (D x)))).
+ 79(merge (imp (some B) C) (all D)) :-
+ 80       (pi x\ ((termp x) => (merge (imp (B x) C) (D x)))).
+ 81(merge (imp B (all C)) (all D)) :-
+ 82       (pi x\ ((termp x) => (merge (imp B (C x)) (D x)))).
+ 83(merge (imp B (some C)) (some D)) :-
+ 84       (pi x\ ((termp x) => (merge (imp B (C x)) (D x)))).
+ 85
+ 86(merge B B) :- (quant_free B).
+ 87
+ 88type one, two, three, four term.
+ 89type formula term -> formula -> prop.
+ 90
+ 91formula one  (imp (all (x \ (path a x))) tru).
+ 92formula two  (imp (some (x \ (path a x))) tru).
+ 93formula three  (and (all (x \ (path a x))) (all (y \ (path y a)))).
+ 94formula four  (imp (some (x \ (path a x))) ((all (y \ (path a y))))).
+ 95
+ 96pred test o:term, o:formula.
+ 97(test N F) :- (formula N OF), (prenex OF F).
+ 98
+ 99main :- (test one F1), (test two F2), (test three F3), (test four F4),!.
+100
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 19, characters 3477-3478:
+F1 is linear: name it _F1 (discard) or F1_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 34, characters 3492-3493:
+F2 is linear: name it _F2 (discard) or F2_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 51, characters 3509-3510:
+F3 is linear: name it _F3 (discard) or F3_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 67, characters 3525-3526:
+F4 is linear: name it _F4 (discard) or F4_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/polymorphic_variants.elpi +:

+
  1% Type inference for a super-constrainted functional langage with
+  2% polymorphic variants
+  3%
+  4% Syntax:    f ::= (<case> constant term)^*    unary functions
+  5%         term ::= constant | <app> funname term
+  6%      program ::= (<fun> funname f)^*
+  7%        types ::= (<fun> funname type type)^*
+  8%         type ::= constant^*
+  9%
+ 10%      constant and funnames are distinct lambda-prolog names
+ 11
+ 12kind i type.
+ 13type a i.
+ 14type app i -> i -> i.
+ 15type check list (list i -> i) -> list i -> list i -> prop.
+ 16type union list i -> list i -> list i -> prop.
+ 17type propagate list prop -> list prop -> prop -> prop.
+ 18type mem_ list i -> i -> prop.
+ 19type mem list i -> i -> prop.
+ 20type main2 prop.
+ 21type main1 prop.
+ 22type is_subset_ list i -> list i -> prop.
+ 23type is_subset list i -> list i -> prop.
+ 24type is_ground list i -> prop.
+ 25type inter list i -> list i -> list i -> prop.
+ 26type inputs list i -> list i -> prop.
+ 27type h2 i.
+ 28type h1 i.
+ 29type g i.
+ 30type fun i -> list i -> list i -> i.
+ 31type find list i -> i -> list i -> list i -> prop.
+ 32type f i.
+ 33type e i.
+ 34type d i.
+ 35type check_term i -> list i -> list i -> prop.
+ 36type check_domain list i -> list i -> prop.
+ 37type check_codomain list i -> list i -> list i -> prop.
+ 38type case i -> i -> i.
+ 39type c i.
+ 40type b i.
+ 41
+ 42% check types program types
+ 43% the functions must be listed in the same order in both
+ 44%check A B C :- print (check A B C), fail.
+ 45check [] [] _.
+ 46check [fun F B | BTL] [fun F D C | TTL] ORIGTYS :-
+ 47 check_domain B D,
+ 48 check_codomain B C ORIGTYS,
+ 49 check BTL TTL ORIGTYS.
+ 50
+ 51% check_domain body type
+ 52%check_domain A B :- print (check_domain A B), fail.
+ 53check_domain B T :- inputs B I, is_subset T I.
+ 54
+ 55%is_subset A B :- print (is_subset A B), fail.
+ 56is_subset A B :- var A, !, declare_constraint (is_subset A B) [A].
+ 57is_subset A B :- var B, !, declare_constraint (is_subset A B) [B].
+ 58is_subset A B :- is_subset_ A B.
+ 59is_subset_ [] _.
+ 60is_subset_ [X|TL] TL1 :- mem TL1 X, is_subset TL TL1.
+ 61
+ 62mem A B :- var A, !, declare_constraint (mem A B) [A].
+ 63mem A B :- mem_ A B.
+ 64mem_ [X|_] X :- !.
+ 65mem_ [Y|TL] X :- mem TL X.
+ 66
+ 67%check_codomain body type types
+ 68%check_codomain A B C :- print (check_codomain A B C), fail.
+ 69check_codomain [] _ _.
+ 70check_codomain [case _ T | TL] TYS ORIGTYS :-
+ 71  check_term T TYS ORIGTYS,
+ 72  check_codomain TL TYS ORIGTYS.
+ 73
+ 74%check_term term type
+ 75%check_term A B C :- print "CHECK" (check_term A B C), fail.
+ 76check_term (app F T) TY ORIGTYS :-
+ 77 !,
+ 78 find ORIGTYS F D C,
+ 79 check_term T D ORIGTYS,
+ 80 is_subset C TY.
+ 81check_term X TY _ :-
+ 82 mem TY X.
+ 83
+ 84find [fun F D C | _] F D C :- !.
+ 85find [ _ | TL ] F D C :- find TL F D C.
+ 86
+ 87%inputs A B :- print "INPUT" (inputs A B), fail.
+ 88inputs [] [].
+ 89inputs [case A _ | TL] [A | TL'] :- inputs TL TL'.
+ 90
+ 91/* Expected output, according to OCaml
+ 92Note: I use ref to kill Hindley-Milner polymorphism
+ 93# let g = ref (function `A -> `C | `B -> `D);;
+ 94# let f = function `A -> `A | `B -> !g `A;;
+ 95# f,!g;;
+ 96- : (_[< `A | `B ] -> (_[> `A | `C | `D ] as 'a)) *
+ 97    (_[< `A | `B > `A ] -> 'a) */
+ 98
+ 99% This is an interesting propagation rule we would like to add:
+100% a (non empty) subset of a singleton is a singleton.
+101% We cannot add the propagation rule now because:
+102%  1. we match up to unification
+103%     => the rule turns constraints of the form (is_subset X a::Y) into
+104%        (is_subset X [a])
+105%  2. already unifying the first argument of the rule triggers resumption
+106%     but there is confusion between the two runtimes and a mess happens
+107propagate [] [is_subset X [Y]] (X = [Y]).
+108propagate [is_subset X Y,is_subset Y Z] [] (is_subset X Z).
+109
+110inter [X | A] L [X | B] :- mem L X, !, inter A L B.
+111inter [X | A] L B :- inter A L B.
+112inter [] _ [].
+113 
+114union [X | XS] L L1  :- mem L X, !, union XS L L1.
+115union [X | XS] L [X | L1]  :- union XS L L1.
+116union [] L L .
+117
+118is_ground [].
+119is_ground (_ :: L) :- is_ground L.
+120 
+121propagate [] [is_subset X YS, is_subset X XS] (is_subset X INTER) :-
+122  is_ground YS, is_ground XS, inter YS XS INTER.
+123
+124propagate [X] [X] true.
+125
+126propagate [mem X A,is_subset X Y] [] (mem Y A).
+127
+128propagate [] [mem X A] (is_subset [A] X).
+129propagate [] [is_subset A X, is_subset B X] (is_subset C X) :-
+130  is_ground A, is_ground B, union A B C.
+131
+132main1 :-
+133 P = [ fun f [ case a a
+134             , case b (app g a) ]
+135     , fun g [ case a c
+136             , case b d ]
+137     ],
+138 T = [ fun f [b] [a, c, d, e ]
+139     , fun g [a, b] [c, d, e]
+140     ],
+141 check P T T,
+142 print "Type-checking ok",
+143
+144 I = [ fun f If Of
+145     , fun g Ig Og
+146     ],
+147 check P I I,
+148 print "Type-inference ok",
+149 print ":::" f ":" If "->" Of,
+150 print ":::" g ":" Ig "->" Og,
+151 print_constraints,
+152 
+153 Ig = [a],
+154 print "Type specialization ok",
+155 print ":::" f ":" If "->" Of,
+156 print ":::" g ":" Ig "->" Og,
+157 print_constraints.
+158
+159main2 :-
+160 P' = [ fun f [ case a a
+161              , case b (app h1 (app g a))
+162              , case c (app h2 (app g a)) ]
+163      , fun g  [ case a a ]
+164      , fun h1 [ case a a
+165               , case b b
+166               , case d d ]
+167      , fun h2 [ case a a
+168               , case b b
+169               , case c c ]
+170      ],
+171 I' = [ fun f If' Of'
+172      , fun g Ig' Og'
+173      , fun h1 Ih1' Oh1'
+174      , fun h2 Ih2' Oh2'
+175      ],
+176 check P' I' I',
+177 print "Type-inference ok",
+178 print ":::" f ":" If' "->" Of',
+179 print ":::" g ":" Ig' "->" Og',
+180 print ":::" h1 ":" Ih1' "->" Oh1',
+181 print ":::" h2 ":" Ih2' "->" Oh2'.
+182
+183main :- (main1, print "xxx failing", fail) ; print "xxx failed", main2.
+184
+185% vim: set ft=lprolog:
+
+
+
Type-checking ok
+Type-inference ok
+::: f : X0 -> X1
+::: g : X2 -> X3
+ mem X3 d  /* suspended on X3 */  mem X3 c  /* suspended on X3 */
+ X2 is_subset [a, b]  /* suspended on X2 */
+ X3 is_subset X1  /* suspended on X3 */  mem X2 a  /* suspended on X2 */
+ mem X1 a  /* suspended on X1 */  X0 is_subset [a, b]  /* suspended on X0 */
+Type specialization ok
+::: f : X0 -> X1
+::: g : [a] -> X3
+ mem X3 d  /* suspended on X3 */  mem X3 c  /* suspended on X3 */
+ X3 is_subset X1  /* suspended on X3 */  mem X1 a  /* suspended on X1 */
+ X0 is_subset [a, b]  /* suspended on X0 */
+xxx failing
+xxx failed
+Type-inference ok
+::: f : X4 -> X5
+::: g : X6 -> X7
+::: h1 : X8 -> X9
+::: h2 : X10 -> X11
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/polymorphic_variants.elpi", line 65, column 6, characters 2005-2006:
+Y is linear: name it _Y (discard) or Y_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/polymorphic_variants.elpi", line 111, column 7, characters 3545-3546:
+X is linear: name it _X (discard) or X_ (fresh variable)
+
+Compilation time: 0.001
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ mem X11 c  /* suspended on X11 */ mem X11 b  /* suspended on X11 */
+ mem X11 a  /* suspended on X11 */
+ X10 is_subset [a, b, c]  /* suspended on X10 */
+ mem X9 d  /* suspended on X9 */ mem X9 b  /* suspended on X9 */
+ mem X9 a  /* suspended on X9 */ X8 is_subset [a, b, d]  /* suspended on X8 */
+ mem X7 a  /* suspended on X7 */ X6 is_subset [a]  /* suspended on X6 */
+ X11 is_subset X5  /* suspended on X11 */
+ X7 is_subset X10  /* suspended on X7 */ mem X6 a  /* suspended on X6 */
+ X9 is_subset X5  /* suspended on X9 */ X7 is_subset X8  /* suspended on X7 */
+ mem X6 a  /* suspended on X6 */ mem X5 a  /* suspended on X5 */
+ X4 is_subset [a, b, c]  /* suspended on X4 */
+
+State:
+
+
+

../../tests/sources/printer.elpi +:

+
 1
+ 2:untyped
+ 3main :-
+ 4  print (p X :- q X, r x),
+ 5  print (X is f Y mod r X),
+ 6  print (X is f Y + r X * g A),
+ 7  print (X is (f Y + r X) * g A),
+ 8  print (X is f Y ^ r X ^ g A),
+ 9  print (X || A && B ===> G),
+10  print [f X, g Y, (a , b), a + b].
+
+
+
p X0 :- q X0 , r x
+X0 is f X1 mod r X0
+X0 is f X1 + r X0 * g X2
+X0 is (f X1 + r X0) * g X2
+X0 is f X1 ^ r X0 ^ g X2
+X0 || X2 && X3 ===> X4
+[f X0, g X1, (a , b), a + b]
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/queens.elpi +:

+
 1% ?- queens(4, Qs).
+ 2%   produces
+ 3%   Qs = [3,1,4,2] ;
+ 4%   Qs = [2,4,1,3]
+ 5
+ 6% queens   +int  -[int]
+ 7
+ 8%%%%module queens.
+ 9
+10%spy X :- print start X, X, print ok X.
+11%spy X :- print ko X, fail.
+12
+13kind i type.
+14type zero i.
+15type not_attack i -> i -> i -> prop.
+16type xxx i -> prop.
+17type xnil i.
+18type xcons i -> i -> i.
+19type select i -> i -> i -> prop.
+20type s i -> i.
+21type range i -> i -> i -> prop.
+22type queens_aux i -> i -> i -> prop.
+23type queens i -> i -> prop.
+24type q i -> prop.
+25type plus i -> i -> i -> prop.
+26type once prop.
+27type not_attack_aux i -> i -> prop.
+28type neq i -> i -> prop.
+29type mult i -> i -> i -> prop.
+30type less i -> i -> prop.
+31type iter i -> prop -> prop.
+32type exp i -> i -> i -> prop.
+33
+34plus zero X X.
+35plus (s X) Y (s S) :- plus X Y S.
+36less zero (s _).
+37less (s X) (s Y) :- less X Y.
+38neq zero (s _).
+39neq (s _) zero.
+40neq (s X) (s Y) :- neq X Y.
+41queens N Qs :- range (s zero) N Ns, queens_aux Ns xnil Qs.
+42queens_aux xnil Qs Qs.
+43queens_aux UnplacedQs SafeQs Qs :- 
+44        select UnplacedQs UnplacedQs1 Q,
+45        not_attack SafeQs Q (s zero),
+46        queens_aux UnplacedQs1 (xcons Q SafeQs) Qs.
+47
+48
+49not_attack_aux Xs X :- not_attack Xs X (s zero).
+50not_attack xnil DUMMY1 DUMMY2 :- !.
+51not_attack (xcons Y Ys) X N :- plus Y N S1, neq X S1, 
+52                               plus X N S2, neq Y S2,
+53                               N1 = (s N), 
+54                               not_attack Ys X N1.
+55
+56%select A B C :- print first_clause (select A B C), fail.
+57select (xcons X Xs) Xs X.
+58%select A B C :- print backtrack (select A B C), fail.
+59select (xcons Y Ys) (xcons Y Zs) X :- select Ys Zs X.
+60%select A B C :- print no_more_chances (select A B C), fail.
+61
+62range N N (xcons N xnil) :- !.
+63range M N (xcons M Ns) :- less M N, M1 = (s M), range M1 N Ns.
+64
+65once :- queens (s (s (s (s zero)))) L, xxx L.
+66xxx (xcons (s (s zero)) (xcons (s (s (s (s zero)))) (xcons (s zero) (xcons (s (s (s zero))) xnil)))).
+67
+68q L :- queens (s (s (s (s zero)))) L.
+69
+70iter zero X.
+71iter (s N) X :- X, iter N X.
+72
+73mult zero X zero.
+74mult (s X) Y Z :- mult X Y K, plus Y K Z.
+75
+76exp zero X (s zero).
+77exp (s X) Y Z :- exp X Y K, mult Y K Z.
+78
+79main :-
+80 TEN = s (s (s (s (s (s (s (s (s (s zero))))))))),
+81 exp (s (s (s (s zero)))) TEN TENTHOUSAND,
+82 iter TENTHOUSAND once.
+83
+84% ----------------------------------------------------------
+85%queens(N,Qs) :- range(1,N,Ns), queens(Ns,[],Qs).
+86
+87%queens([],Qs,Qs).
+88%queens(UnplacedQs,SafeQs,Qs) :-  select(UnplacedQs,UnplacedQs1,Q),
+89%             not_attack(SafeQs,Q), queens(UnplacedQs1,[Q|SafeQs],Qs).
+90
+91%not_attack(Xs,X) :- not_attack(Xs,X,1).
+92%not_attack([],_,_) :- !.
+93%not_attack([Y|Ys],X,N) :-X =\= Y+N,X =\= Y-N,N1 is N+1,not_attack(Ys,X,N1).
+94
+95%select([X|Xs],Xs,X).
+96%select([Y|Ys],[Y|Zs],X) :- select(Ys,Zs,X).
+97
+98%range(N,N,[N]) :- !.
+99%range(M,N,[M|Ns]) :- M < N, M1 is M+1, range(M1,N,Ns).
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 50, column 17, characters 1169-1174:
+DUMMY1 is linear: name it _DUMMY1 (discard) or DUMMY1_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 50, column 24, characters 1176-1181:
+DUMMY2 is linear: name it _DUMMY2 (discard) or DUMMY2_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 70, column 11, characters 1942-1942:
+X is linear: name it _X (discard) or X_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 73, column 11, characters 1985-1985:
+X is linear: name it _X (discard) or X_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/queens.elpi", line 76, column 10, characters 2045-2045:
+X is linear: name it _X (discard) or X_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 1.089
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/quote_syntax.elpi +:

+
1main :-
+2  quote_syntax "src/builtin.elpi" "main" A B, print B.
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/quote_syntax.elpi", line 2, column 42, characters 50-50:
+A is linear: name it _A (discard) or A_ (fresh variable)
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/quote_syntax.elpi", line 2, column 3, characters 11-52:
+Unable to infer a closed type for quote_syntax:
+string -> string -> Src263 -> Src265 -> prop
+
+
+

../../tests/sources/random.elpi +:

+
1main :-
+2  random.self_init,
+3  random.int 10 R,
+4  print R,
+5  R >= 0,
+6  R < 10.
+
+
+
3
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.003
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/reduce_cbn.elpi +:

+
 1kind i type.
+ 2type app i -> i -> i.
+ 3type lam (i -> i) -> i.
+ 4type copy i -> i -> prop.
+ 5type cbv i -> i -> prop.
+ 6type beta i -> i -> i -> prop.
+ 7type subst (i -> i) -> i -> i -> prop.
+ 8type cbn i -> i -> prop.
+ 9
+10%copy X Y :- print "XXXXXXXXX" (copy X Y), fail.
+11copy (app M N) (app M2 N2) :- copy M M2, copy N N2.
+12copy (lam F) (lam F2) :- pi x\ copy x x => copy (F x) (F2 x).
+13
+14%cbn X Y :- print "XXXXXXXXX" (cbn X Y), fail.
+15cbn (lam F) (lam F2) :- !, pi x\cbn x x => copy x x => cbn (F x) (F2 x). 
+16cbn (app (lam F) N) M :- !, subst F N B, cbn B M.
+17cbn (app M N) R :- cbn M (lam F), !, cbn (app (lam F) N) R.
+18cbn (app X Y) (app X2 Y2) :- cbn X X2, cbn Y Y2.
+19
+20%subst F N B :- print "XXXXXXXXX" (subst F N B), fail.
+21subst F N B :- pi x\ copy x N => copy (F x) (B2 x), B = B2 x.
+22
+23main :-
+24 ZERO = (lam s\ lam z\ z),
+25 SUCC = (lam n\ lam s\ lam z\ app s (app (app n s) z)),
+26 cbn (app SUCC ZERO) ONE,
+27 PLUS = (lam n\ lam m\ lam s\ lam z\ app (app n s) (app (app m s) z)),
+28 MULT = (lam n\ lam m\ lam s\ app n (app m s)),
+29 cbn (app SUCC (app SUCC ZERO)) TWO,
+30 cbn (app (app PLUS (app (app PLUS TWO) TWO)) TWO) SIX,
+31 cbn (app (app MULT SIX) TWO) TWELVE,
+32 EXP = (lam n\ lam m\ app n m),
+33 cbn (app (app PLUS TWO) ONE) THREE,
+34 cbn (app (app EXP TWO) THREE) NINE,
+35 cbn (app (app MULT TWO) TWO) FOUR,
+36 cbn (app (app PLUS THREE) TWO) FIVE,
+37 cbn (app (app PLUS FOUR) TWO) SIX,
+38 cbn (app (app EXP FIVE) FIVE) RES,
+39 cbn (app (app EXP FIVE) FIVE) RES,
+40 cbn (app (app EXP FIVE) FIVE) RES,
+41 cbn (app (app EXP FIVE) FIVE) RES,
+42 cbn (app (app EXP FIVE) FIVE) RES,
+43 cbn (app (app EXP FIVE) FIVE) RES.
+
+
+
Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbn.elpi", line 21, column 22, characters 728-756:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+
+Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbn.elpi", line 34, column 32, characters 1237-1240:
+NINE is linear: name it _NINE (discard) or NINE_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbn.elpi", line 31, column 31, characters 1129-1134:
+TWELVE is linear: name it _TWELVE (discard) or TWELVE_ (fresh variable)
+
+Compilation time: 0.001
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.258
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/reduce_cbv.elpi +:

+
 1kind i type.
+ 2type app i -> i -> i.
+ 3type lam (i -> i) -> i.
+ 4type copy i -> i -> prop.
+ 5type cbv i -> i -> prop.
+ 6type beta i -> i -> i -> prop.
+ 7
+ 8copy (app M N) (app M2 N2) :- copy M M2, copy N N2.
+ 9copy (lam F) (lam F2) :- pi x\ copy x x => copy (F x) (F2 x).
+10
+11cbv (lam F) (lam F2) :- pi x\ cbv x x => copy x x => cbv (F x) (F2 x).
+12cbv (app M N) R2 :-
+13 cbv N N2,
+14 cbv M M2,
+15 beta M2 N2 R2.
+16
+17beta (lam F) T R2 :- !,
+18 (pi x\ copy x T => copy (F x) (R' x), R = R' x),
+19 cbv R R2.
+20beta H A (app H A).
+21
+22main :-
+23 ZERO = (lam s\ lam z\ z),
+24 SUCC = (lam n\ lam s\ lam z\ app s (app (app n s) z)),
+25 cbv (app SUCC ZERO) ONE,
+26 PLUS = (lam n\ lam m\ lam s\ lam z\ app (app n s) (app (app m s) z)),
+27 MULT = (lam n\ lam m\ lam s\ app n (app m s)),
+28 cbv (app SUCC (app SUCC ZERO)) TWO,
+29 cbv (app (app PLUS (app (app PLUS TWO) TWO)) TWO) SIX,
+30 cbv (app (app MULT SIX) TWO) TWELVE,
+31 EXP = (lam n\ lam m\ app n m),
+32 cbv (app (app PLUS TWO) ONE) THREE,
+33 cbv (app (app EXP TWO) THREE) NINE,
+34 cbv (app (app MULT TWO) TWO) FOUR,
+35 cbv (app (app PLUS THREE) TWO) FIVE,
+36 cbv (app (app PLUS FOUR) TWO) SIX,
+37 cbv (app (app EXP FIVE) FIVE) RES,
+38 cbv (app (app EXP FIVE) FIVE) RES,
+39 cbv (app (app EXP FIVE) FIVE) RES,
+40 cbv (app (app EXP FIVE) FIVE) RES,
+41 cbv (app (app EXP FIVE) FIVE) RES,
+42 cbv (app (app EXP FIVE) FIVE) RES.
+
+
+
Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbv.elpi", line 18, column 9, characters 420-448:
+The standard λProlog infix operator for implication => has higher precedence
+than conjunction. This means that 'A => B, C' reads '(A => B), C'.
+This is a common mistake since it makes A only available to B (and not to C
+as many newcomers may expect).
+If this is really what you want write '(A => B), C' to silence this warning.
+Otherwise write 'A => (B, C)', or use the alternative implication operator ==>.
+Infix ==>  has lower precedence than conjunction, hence
+'A ==> B, C' reads 'A ==> (B, C)' and means the same as 'A => (B, C)'.
+
+Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbv.elpi", line 33, column 32, characters 961-964:
+NINE is linear: name it _NINE (discard) or NINE_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/reduce_cbv.elpi", line 30, column 31, characters 853-858:
+TWELVE is linear: name it _TWELVE (discard) or TWELVE_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 1.604
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/restriction.elpi +:

+
1% main should fail.
+2
+3main :- (x\ x) = (x\ X).
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/restriction.elpi", line 3, column 22, characters 43-43:
+X is linear: name it _X (discard) or X_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+
+

../../tests/sources/restriction3.elpi +:

+
 1pred  if i:prop, i:prop, i:prop.
+ 2if B T _ :- B, !, T.
+ 3if _ _ E :- E.
+ 4
+ 5kind term type.
+ 6pred foo o:term, o:term.
+ 7
+ 8type debug-print string -> A -> prop.
+ 9debug-print A B :- print A B.
+10
+11pred spy i:prop.
+12spy P :- counter "run" NR, if (not(NR = 0)) (debug-print "run=" NR) true,
+13         debug-print "----<<---- enter: " P,
+14         P, !,
+15         debug-print "---->>---- exit: " P.
+16spy P :- debug-print "---->>---- fail: " P, fail.
+17
+18type lam (term -> term) -> term.
+19
+20foo A B :-
+21  spy(A = lam i\ lam j\ X_ i j),
+22  spy(B = lam i\ lam j\ Y_ i j),
+23  spy(A = lam i\ lam j\ i),
+24  spy(B = lam i\ lam j\ i).
+25
+26main :- pi x\ foo (A_ x) B_.
+
+
+
----<<---- enter:  X0 c0 = lam c1 \ lam c2 \ X1^1 c1 c2
+---->>---- exit:  lam c1 \ lam c2 \ X1^1 c1 c2 = lam c1 \ lam c2 \ X1^1 c1 c2
+----<<---- enter:  X2 = lam c1 \ lam c2 \ X3^1 c1 c2
+---->>---- exit:  lam c1 \ lam c2 \ X4 c1 c2 = lam c1 \ lam c2 \ X4 c1 c2
+----<<---- enter:  lam c1 \ lam c2 \ X1^1 c1 c2 = lam c1 \ lam c2 \ c1
+---->>---- exit:  lam c1 \ lam c2 \ c1 = lam c1 \ lam c2 \ c1
+----<<---- enter:  lam c1 \ lam c2 \ X4 c1 c2 = lam c1 \ lam c2 \ c1
+---->>---- exit:  lam c1 \ lam c2 \ c1 = lam c1 \ lam c2 \ c1
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/restriction4.elpi +:

+
1:untyped main :-
+2    pi x\ sigma Y Z\ pi y\
+3      std.spy(X x = f (Y y) e\ (Z y e)).
+
+
+
----<<---- enter:  X0 c0 = f (X1^1 c1) c2 \ X2^1 c1 c2
+---->>---- exit:  f (X3 c0) c2 \ X4 c0 c2 = f (X3 c0) c2 \ X4 c0 c2
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/restriction5.elpi +:

+
1main :-
+2  pi x y z u w\
+3    std.spy(X x y = X u w).
+
+
+
----<<---- enter:  X0 c0 c1 = X0 c3 c4
+---->>---- exit:  X1 = X1
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/restriction6.elpi +:

+
1:untyped main :-
+2  pi x\ sigma Y\ pi y\ sigma Z\
+3      std.spy(X x = f (Y y) l\e\ (Z e)).
+
+
+
----<<---- enter:  X0 c0 = f (X1^1 c1) c2 \ c3 \ X2^2 c3
+---->>---- exit:  f (X3 c0) c2 \ c3 \ X4^1 c3 = f (X3 c0) c2 \ c3 \ X4^1 c3
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/rev.elpi +:

+
 1% X10:
+ 2%   yap                                     0.027s
+ 3%   elpi                                    3.771s
+ 4%   one level index hashtbl                 0.528s
+ 5%   two level inefficient index             0.681s
+ 6%   one level index hashtbl + automatic GC  0.899s
+ 7%   one lvl hashtbl + flat + automatic GC   0.763s
+ 8%   one lvl hashtbl + flat                  0.629s
+ 9
+10
+11% X13:
+12%   yap                          0.083s
+13%   elpi                        10.068s
+14%   one level index hashtbl      3.90s
+15%   two level inefficient index  4.48s
+16
+17% X14:
+18%   ocamlopt                     0.014s
+19%   ocamlc                       0.024s
+20%   yap                          0.033s
+21%   teyjus                       0.257s
+22%   elpi                         4.72s (setting ulimit -s 81920)
+23%                                newlazy  lazy   eager   with formula       with terms
+24%   no index                     2.90s  3.85s  4.74s   4.49s              4.28s
+25%   one level index hashtbl      2.51s  2.37s  2.35s   2.29s              2.28s
+26%   two level inefficient index  1.78s  2.19s  3.00s   2.30s              2.34s
+27%   one level hashtbl + auto GC  3.78s  3.97s  4.67s   3.39s              3.88s
+28%   one lvl hash+flat+ auto GC   3.10s  3.22s  3.40s   3.38s              3.14s
+29%   one lvl hashtbl + flat              2.42s  2.43s   2.64s              2.27s
+30%   one lvl hash+ flat + man GC         2.99s  2.80s   2.83s              2.37s
+31%   one lvl index map main       2.61s  2.44s  2.60s   2.40s              2.18s
+32%I  one lvl hashtbl              0.72s  0.61s  -----   0.63s              0.57s
+33%I  two lvl efficient index      0.36s  0.55s  0.62s
+34%II two lvl inefficient index    0.70s
+35%I  desperate two lvl effici     0.19s
+36%I  desperate.ml                 0.11s  0.14s
+37%I  desperate2.ml                0.11s
+38%I  desperate3.ml                0.12s
+39kind i type.
+40type xnil i.
+41type xcons i -> i -> i.
+42type x9 i.
+43type x8 i.
+44type x7 i.
+45type x6 i.
+46type x5 i.
+47type x4 i.
+48type x3 i.
+49type x2 i.
+50type x10 i.
+51type x1 i.
+52type rev i -> i -> prop.
+53type aux i -> i -> i -> prop.
+54type append i -> i -> i -> prop.
+55
+56rev L RL  :- aux L xnil  RL .
+57aux (xcons X XS)  ACC  R :- aux XS (xcons X ACC) R . 
+58aux xnil  L  L .
+59
+60append (xcons X XS) L (xcons X L1)  :- append XS L L1 .
+61append xnil L L .
+62
+63:untyped
+64main :-
+65    X1 =  (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil)))))))))),
+66   append X1 X1 X2  ,
+67   append X2 X2 X3  ,
+68   append X3 X3 X4  ,
+69   append X4 X4 X5  ,
+70   append X5 X5 X6  ,
+71   append X6 X6 X7  ,
+72   append X7 X7 X8  ,
+73   append X8 X8 X9  ,
+74   append X9 X9 X10  ,
+75   append X10 X10 X11  ,
+76   append X11 X11 X12  ,
+77   append X12 X12 X13  ,
+78   append X13 X13 X14  ,
+79   % append X14 X14 X15  ,
+80   % append X15 X15 X16  ,
+81   % append X16 X16 X17  ,
+82   % append X17 X17 X18  ,
+83   X = X14 ,
+84   rev X  Y,   rev Y Z,  X = Z.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+Fatal error: exception Stack overflow
+
+
+

../../tests/sources/rev14.elpi +:

+
 1kind i type.
+ 2type xnil i.
+ 3type xcons i -> i -> i.
+ 4type x9 i.
+ 5type x8 i.
+ 6type x7 i.
+ 7type x6 i.
+ 8type x5 i.
+ 9type x4 i.
+10type x3 i.
+11type x2 i.
+12type x10 i.
+13type x1 i.
+14type rev i -> i -> prop.
+15type aux i -> i -> i -> prop.
+16type append i -> i -> i -> prop.
+17
+18rev L RL  :- aux L xnil  RL.
+19aux (xcons X XS)  ACC  R :- aux XS (xcons X ACC) R.
+20aux xnil  L  L.
+21
+22append (xcons X XS) L (xcons X L1)  :- append XS L L1.
+23append xnil L L.
+24main :-
+25    X1 =  (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil)))))))))),
+26   append X1 X1 X2  ,
+27   append X2 X2 X3  ,
+28   append X3 X3 X4  ,
+29   append X4 X4 X5  ,
+30   append X5 X5 X6  ,
+31   append X6 X6 X7  ,
+32   append X7 X7 X8  ,
+33   append X8 X8 X9  ,
+34   append X9 X9 X10  ,
+35   append X10 X10 X11  ,
+36   append X11 X11 X12  ,
+37   append X12 X12 X13  ,
+38   append X13 X13 X14  ,
+39   % append X14 X14 X15  ,
+40   % append X15 X15 X16  ,
+41   % append X16 X16 X17  ,
+42   % append X17 X17 X18  ,
+43   X = X14 ,
+44   rev X  Y,   rev Y Z,  X = Z.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+Fatal error: exception Stack overflow
+
+
+

../../tests/sources/same_term.elpi +:

+
1main :-
+2  3 == 3,
+3  not([X, _] == [X, Y]),
+4  not(X == Y),
+5  (x\ x) == (y\ y),
+6  ID = (x\x),
+7  (ID 3) == (ID 3),
+8  pi x y\ same_var (X x) (X y), not(same_term (X x) (X y)).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/self_assignment.elpi +:

+
1% main should succeed
+2
+3:untyped
+4q X X A.
+5
+6:untyped
+7main :- (pi c\ q X A Y, q Y A X, q X Y A), X = d.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/set.elpi +:

+
 1pred build i:int, i:int, i:std.set int, o:std.set int.
+ 2build N N X X :- !.
+ 3build N M X X1 :-
+ 4  N1 is N + 1,
+ 5  std.set.add N X XR,
+ 6  build N1 M XR X1.
+ 7
+ 8pred test i:int, i:int, i:(int -> A -> prop), i:A.
+ 9test N N _ _ :- !.
+10test N M F X :-
+11  N1 is N + 1,
+12  std.assert! (F N X) "not found",
+13  test N1 M F X.
+14
+15pred test2 i:int, i:int, i:(int -> A -> A -> prop), i:A, o:A.
+16test2 N N _ R R :- !.
+17test2 N M F X R :-
+18  N1 is N + 1,
+19  F N X X1,
+20  test2 N1 M F X1 R.
+21
+22macro @iters :- 4096.
+23
+24main :-
+25  std.time (build 0 @iters {std.set.make cmp_term} T) Time0, !,
+26  std.time (test 0 @iters std.set.mem T) Time1, !,
+27  std.set.elements T L,
+28  std.assert! ({std.length L} = @iters, L = [0|_]) "elements broken", !,
+29  std.time (test2 0 @iters std.set.remove T E) Time2, !,
+30  std.assert! (std.set.cardinal E 0) "not empty",
+31  print Time0 "+" Time1 "+" Time2.
+
+
+
0.769606 + 0.040283 + 0.551719
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 1.459
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/shorten.elpi +:

+
 1namespace b {
+ 2
+ 3pred foo.
+ 4foo :- true.
+ 5pred baz.
+ 6baz :- fail.
+ 7
+ 8  namespace bar {
+ 9  
+10  pred baz.
+11  baz :- foo.
+12
+13  }
+14
+15
+16shorten bar.{ baz }.
+17
+18}
+19
+20namespace a {
+21
+22  shorten b.{ foo }.
+23  shorten b.bar.{ baz }.
+24  
+25  pred main.
+26  main :- foo, b.foo, baz, bar.baz, b.bar.baz.
+27
+28  pred bar.baz.
+29  bar.baz :- true.
+30
+31  shorten b.{ baz }.
+32  
+33  baz :- true.
+34  bar.baz :- baz.
+35
+36}
+37
+38main :- a.main. 
+39       
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/shorten2.elpi +:

+
1accumulate shorten_aux, shorten_aux2.
+2
+3pred foo.
+4foo :- true.
+5
+6main :-
+7  foo, bar.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/shorten_aux.elpi +:

+
1namespace a {
+2  pred foo.
+3  foo :- !, fail.
+4}
+5
+6shorten a.{ foo }.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+
+

../../tests/sources/shorten_aux2.elpi +:

+
1pred bar.
+2bar :- foo.
+
+
+
Parsing time: 0.000
+Warning:
+Undeclared globals:
+- File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/shorten_aux2.elpi", line 2, column 8, characters 18-20: foo.
+Please add the following text to your program:
+type foo prop.
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+
+

../../tests/sources/shorten_builtin.elpi +:

+
1shorten std.string.set.{ empty }.
+2
+3main :-
+4  print {empty}.
+
+
+
{{  }}
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.002
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/shorten_trie.elpi +:

+
 1pred std.list.map i:any, i:any.
+ 2std.list.map _ _.
+ 3pred std.string.concat1 i:any, i:any, i:any.
+ 4std.string.concat1 _ _ _.
+ 5pred std.string.escape i:any, i:any.
+ 6std.string.escape _ _.
+ 7
+ 8shorten std.{list.map, string.{ concat1, escape }}.
+ 9
+10main :- list.map F [], concat1 "a" "b" AB, escape "x y" E.
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/shorten_trie.elpi", line 10, column 40, characters 275-276:
+AB is linear: name it _AB (discard) or AB_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/shorten_trie.elpi", line 10, column 57, characters 292-292:
+E is linear: name it _E (discard) or E_ (fresh variable)
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/shorten_trie.elpi", line 10, column 18, characters 253-253:
+F is linear: name it _F (discard) or F_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/spill_and.elpi +:

+
 1kind term type.
+ 2type app term -> term -> term.
+ 3type lam (term -> term) -> term.
+ 4type t term.
+ 5
+ 6pred copy i:term, o:term.
+ 7copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
+ 8copy (lam F) (lam F1) :- pi x\ copy (F x) (F1 x).
+ 9% we omit (copy x x) on purpose
+10
+11main :-
+12  T = (lam x\ {copy x t => ((A x) = x, copy (app (A x) x))}),
+13  print T,
+14  T = (lam _\ app t t). 
+
+
+
lam c0 \ app t t
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/spill_impl.elpi +:

+
 1kind term type.
+ 2type app term -> term -> term.
+ 3type lam (term -> term) -> term.
+ 4type t term.
+ 5
+ 6pred copy i:term, o:term.
+ 7copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
+ 8copy (lam F) (lam F1) :- pi x\ copy (F x) (F1 x).
+ 9% we omit (copy x x) on purpose
+10
+11main :-
+12  T = (lam x\ {copy x t => copy (app x x)}),
+13  print T,
+14  T = (lam _\ app t t). 
+
+
+
lam c0 \ app t t
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/spill_lam.elpi +:

+
1pred pp i:int, o:string.
+2pp X "name" :- name X.
+3
+4main :- (X = x\ print {pp x}), (X = x\ pp x (W x), print (W x)).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/trace.elpi +:

+
1pred p i:int, o:int.
+2p 1 1 :- 1 is 2 + 3.
+3p 1 2 :- X = 1, Y = 2, X = Y.
+4p 2 3.
+5
+6main :-
+7  p 1 X_ ; p 2 Y_.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/trace2.elpi +:

+
1main :-
+2  print 1, (pi x\ sigma Y\ fail => (true, fail)).
+
+
+
1
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/trace_chr.elpi +:

+
 1constraint even odd {
+ 2  rule \ (even X) (odd X) | (odd z) <=> true.
+ 3  rule \ (even X) (odd X) | (odd (s z)) <=> fail.
+ 4}
+ 5kind nat type.
+ 6type s nat -> nat.
+ 7type z nat.
+ 8
+ 9pred even i:nat.
+10pred odd i:nat.
+11even z.
+12
+13odd (s X) :- even X.
+14even (s X) :- odd X.
+15
+16even (uvar as X) :- declare_constraint (even X) X.
+17odd (uvar as X) :- declare_constraint (odd X) X.
+18
+19main :-
+20  even Z,
+21  declare_constraint true Z,
+22  Z = s W,
+23  not(even W).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ odd X0  /* suspended on X0 */
+
+State:
+
+
+

../../tests/sources/trace_cut.elpi +:

+
 1pred p.
+ 2p :- fail.
+ 3p :- !, fail.
+ 4p.
+ 5p :- print 1.
+ 6
+ 7pred q.
+ 8q.
+ 9q :- print 2.
+10
+11main :- p.
+12main :- q, !, q => (q :- !) => q.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/trace_findall.elpi +:

+
1pred p o:int.
+2p 1.
+3p 2.
+4p 3 :- p 2.
+5
+6main :-
+7  std.findall (p _) L, print L.
+
+
+
[p 1, p 2, p 3]
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/trail.elpi +:

+
 1% Query: p X Z.
+ 2% Expected outcome: X=ok, Z=ok.
+ 3
+ 4kind tm type.
+ 5type a, b tm.
+ 6
+ 7pred p o:diagnostic, o:diagnostic.
+ 8p X Z :- foo Y X, r Y Z.
+ 9
+10pred foo o:tm, o: diagnostic.
+11foo Y X :- A = ok, q Y, X = A.
+12
+13pred q o:tm.
+14q a.
+15q b.
+16
+17pred r o:tm, o:diagnostic.
+18r b ok.
+19
+20main :- p X Z, X = ok, Z = ok.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/typeabbrv.elpi +:

+
 1typeabbrev xx bool.
+ 2
+ 3namespace foo {
+ 4
+ 5pred f i:xx.
+ 6f _.
+ 7
+ 8}
+ 9
+10
+11main :- foo.f tt.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/typeabbrv1.elpi +:

+
1typeabbrev t1 int.
+2
+3pred f i:t1.
+4f _.
+5
+6main :- f 3.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/typeabbrv10.elpi +:

+
1typeabbrev (bar A) (list A).
+2typeabbrev (tmp A) (list A).
+3typeabbrev (foo A) (tmp A).
+4
+5pred foo i:int, o:int.
+6
+7main :- std.map 3 foo _.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv10.elpi", line 7, column 17, characters 128-128:
+literal "3" has type int but std.map expects a term of type list A
+
+
+

../../tests/sources/typeabbrv11.elpi +:

+
1typeabbrev x int.
+2
+3pred f i:x.
+4f "x".
+5
+6main.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv11.elpi", line 4, column 3, characters 34-36:
+literal "x" has type string but f expects a term of type x
+
+
+

../../tests/sources/typeabbrv12.elpi +:

+
1typeabbrev y (list int).
+2
+3pred f i:y.
+4f "x".
+5
+6main.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv12.elpi", line 4, column 3, characters 41-43:
+literal "x" has type string but f expects a term of type y
+
+
+

../../tests/sources/typeabbrv2.elpi +:

+
1typeabbrev t1 int.
+2
+3pred f i:t1.
+4f _.
+5
+6typeabbrev t1 bool.
+7
+8main :- f 3.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv2.elpi", line 6, column 0, characters 39-57:
+Duplicate type abbreviation for t1. Previous declaration: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv2.elpi", line 1, column 0, characters 0-17:
+
+
+

../../tests/sources/typeabbrv3.elpi +:

+
1typeabbrev (t1 X Y) (pair Y X).
+2
+3pred f i:t1 bool int.
+4f _.
+5
+6main :- f (pr 2 tt).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/typeabbrv4.elpi +:

+
1typeabbrev t1 int.
+2
+3pred f i:t1.
+4f _.
+5
+6typeabbrev t1 int.
+7
+8main :- f 3.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/typeabbrv5.elpi +:

+
1typeabbrev x y.
+2typeabbrev y x.
+3
+4pred f i:x.
+5f _.
+6
+7main :- f 0.
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv5.elpi", line 1, column 14, characters 14-14:
+Unknown type y
+
+
+

../../tests/sources/typeabbrv6.elpi +:

+
1typeabbrev x (option A).
+2pred f i:x.
+3f _.
+4main :- f (some 3).
+
+
+
Parsing time: 0.000
+Fatal error: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/typeabbrv6.elpi", line 1, column 22, characters 22-22:
+Unknown type A
+
+
+

../../tests/sources/typeabbrv7.elpi +:

+
 1typeabbrev xx bool.
+ 2
+ 3namespace foo {
+ 4
+ 5pred f i:xx.
+ 6f _.
+ 7
+ 8}
+ 9
+10
+11main :- foo.f tt.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/typeabbrv8.elpi +:

+
 1{ typeabbrev xx bool. }
+ 2
+ 3type g xx -> xx.
+ 4{
+ 5pred f i:xx.
+ 6f (g _).
+ 7
+ 8}
+ 9
+10
+11main :- f (g tt).
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/typeabbrv9.elpi +:

+
 1typeabbrev t int.
+ 2
+ 3namespace xx {
+ 4    typeabbrev t int.
+ 5}
+ 6
+ 7pred f i:t, i:xx.t.
+ 8f 0 0.
+ 9
+10main :- f 0 0.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/uminus.elpi +:

+
1main :-
+2  X is 3 - 2, Y is 3 + -2,
+3  X =  1, Y = 1.
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/uvar_chr.elpi +:

+
 1
+ 2kind term type.
+ 3type app term -> term -> term.
+ 4type lam (term -> term) -> term.
+ 5
+ 6pred unsafe-cast o:A, o:B.
+ 7:untyped unsafe-cast X X.
+ 8
+ 9pred mk-app i:term, i:list term, o:term.
+10mk-app HD [] HD :- !.
+11mk-app (uvar as K) [A|Args] R :- !, unsafe-cast K K', mk-app (K' A) Args R.
+12mk-app HD [X|XS] T :- mk-app (app HD X) XS T.
+13
+14pred copy i:term, o:term.
+15
+16copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
+17copy (lam F) (lam F1) :- pi x\ copy x x => copy (F x) (F1 x).
+18copy (uvar F L as X) T :- var X, !, copy-list L L1, mk-app F L1 T.
+19copy (uvar C L) (uvar C L1) :- copy-list L L1.
+20
+21pred copy-list i:list term, o:list term.
+22copy-list [] [].
+23copy-list [X|XS] [Y|YS] :- copy X Y, copy-list XS YS.
+24
+25pred meta-copy i:term, o:term.
+26constraint meta-copy {
+27  rule (meta-copy I O) | (copy I X) <=> (O = X).
+28}
+29
+30main :- In = (lam x\ F x),
+31  copy In T, print T,
+32  declare_constraint (meta-copy In S) [], print S, not(var S).
+
+
+
lam X0
+lam c0 \ X0 c0
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/uvar_chr.elpi", line 30, column 22, characters 819-821:
+F is linear: name it _F (discard) or F_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ meta-copy (lam c0 \ X0 c0) (lam c0 \ X0 c0)  /* suspended on  */
+
+State:
+
+
+

../../tests/sources/var.elpi +:

+
1main :-
+2  var X0 _ [],
+3  var X1,
+4  var X2 _ _,
+5  (pi x y\ (var (X3 x y) X3 [x,y])),
+6  (pi x y\ (var (X9 x y) X9 (X10 x y))),
+7  (pi x y\ sigma X5\ (var X5 X4 [x,y]),
+8           print X0 "," X1 "," X2 "," X3 "," X4 "," X5).
+
+
+
X0 , X1 , X2 , X3 , X4 , X4 c0 c1
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/var.elpi", line 6, column 29, characters 113-120:
+X10 is linear: name it _X10 (discard) or X10_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/variadic_declare_constraints.elpi +:

+
1kind tm type.
+2type foo tm -> (tm -> tm) -> prop.
+3
+4main :-
+5  declare_constraint (foo X Y) X [Y, Z].
+
+
+
Parsing time: 0.000
+Warning: File "/home/tassi/LPCIC/elpi/docs/source/../../tests/sources/variadic_declare_constraints.elpi", line 5, column 38, characters 96-96:
+Z is linear: name it _Z (discard) or Z_ (fresh variable)
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+ foo X0 X1  /* suspended on X0, X1, X2 */
+
+State:
+
+
+

../../tests/sources/w.elpi +:

+
  1pred filter i:list A, i:(pred i:A), o:list A.
+  2filter [] _ [].
+  3filter [X|XS] P [X|YS] :- P X, !, filter XS P YS.
+  4filter [_|XS] P YS :- filter XS P YS.
+  5
+  6pred mem o:list A, o:A.
+  7mem [X|_] X :- !.
+  8mem [_|XS] X :- mem XS X.
+  9
+ 10kind term type.
+ 11type app term -> term -> term.
+ 12type lam (term -> term) -> term.
+ 13type let term -> ty -> (term -> term) -> term.
+ 14
+ 15kind tye type.
+ 16% elpi:skip 2
+ 17infixr ===> 50.
+ 18infixl # 60.
+ 19type (===>) tye -> tye -> tye.
+ 20type (#) tye -> tye -> tye.
+ 21
+ 22kind ty type.
+ 23type all (tye -> ty) -> ty.
+ 24type mono tye -> ty.
+ 25
+ 26type one term.
+ 27type plus term.
+ 28type size term.
+ 29type empty term.
+ 30type comma term.
+ 31
+ 32type integer tye.
+ 33type list tye.
+ 34type pair tye.
+ 35
+ 36% constants
+ 37w one    (mono integer).
+ 38w plus   (mono (integer ===> integer ===> integer)).
+ 39w size   (all x\ mono (list # x ===> integer)).
+ 40w empty  (all x\ mono (list # x)).
+ 41w comma  (all x\ all y\ mono (x ===> y ===> (pair # x # y))).
+ 42
+ 43pred w i:term, o:ty.
+ 44
+ 45w (app F X) (mono R) :-
+ 46  w F (mono (A ===> R)),
+ 47  w X (mono A).
+ 48
+ 49w (lam F) (mono (A ===> R)) :-
+ 50  pi x\ w x (mono A) => w (F x) (mono R).
+ 51
+ 52w (let F FP B) (mono TC) :-
+ 53  w F (mono FT),
+ 54  declare_constraint (overbar (mono FT) FP) [],
+ 55  pi x\ w x FP => w (B x) (mono TC).
+ 56
+ 57w X (mono T) :- w X (all Poly), specialize (all Poly) T.
+ 58
+ 59w X TY :- print "Error: " X "cannot have type" TY.
+ 60
+ 61pred specialize i:ty, o:tye.
+ 62
+ 63specialize (all F) T :- specialize (F FRESH_) T.
+ 64specialize (mono X) X.
+ 65
+ 66pred overbar i:ty, o:ty.
+ 67
+ 68constraint w overbar {
+ 69
+ 70rule \ (G ?- overbar T T1)
+ 71     | (generalize G T POLYT) <=> (T1 = POLYT).
+ 72
+ 73rule \ (G ?- overbar T _) <=> (print "overbar" G "|-" T "failed", halt).
+ 74
+ 75pred generalize i:list prop, i:ty, o:ty.
+ 76generalize G (mono T) ALL :-
+ 77  free-ty (mono T) [] VT,
+ 78  free-gamma G [] VG,
+ 79  filter VT (x\ not(mem VG x)) Q,
+ 80  quantify Q T ALL.
+ 81
+ 82pred free-ty i:ty, i:list any, o:list any.
+ 83free-ty (mono X) L L1 :- free X L L1.
+ 84free-ty (all F) L L1 :- pi x\ free-ty (F x) L L1.
+ 85
+ 86pred free-gamma i:list prop, i:list any, o:list any. 
+ 87free-gamma [] L L.
+ 88free-gamma [w _ T|X] L L2 :- free-ty T L L1, free-gamma X L1 L2.
+ 89
+ 90pred free i:tye, i:list any, o:list any.
+ 91free (A # B) L L2 :- free A L L1, free B L1 L2.
+ 92free (A ===> B) L L2 :- free A L L1, free B L1 L2.
+ 93free (uvar X _) L L1 :- if (mem L X) (L1 = L) (L1 = [X|L]).
+ 94free _X L L.
+ 95
+ 96pred copy-ty i:ty, o:ty.
+ 97copy-ty (mono X1) (mono X2) :- copy X1 X2.
+ 98copy-ty (all F1) (all F2) :- pi x\ copy x x => copy-ty (F1 x) (F2 x).
+ 99
+100pred copy i:tye, o:tye.
+101copy (A ===> B) (A1 ===> B1) :- copy A A1, copy B B1.
+102copy (A # B) (A1 # B1) :- copy A A1, copy B B1.
+103copy X X.
+104
+105pred quantify i:list tye, i:tye, o:ty.
+106quantify [] X (mono X1) :- copy X X1.
+107quantify [X|XS] T (all x\ T2 x) :-
+108  quantify XS T T1,
+109  pi x\ copy (uvar X _) x => copy-ty T1 (T2 x).
+110
+111}
+112
+113main :-
+114  print "Test 1",
+115  P = let (lam x\x) T_ (id\ app (app plus (app id one))
+116                                  (app size (app id empty))),
+117  print "Typing" P,
+118  w P TP,
+119  print "OK" P "has type" TP,
+120  print "",
+121  print "Test 2",
+122  X = lam (x\
+123        let (lam y\ app (app comma x) y) Y_ (mk\
+124          app (app comma (app mk one)) (app mk x))),
+125  print "Typing" X,
+126  w X XT,
+127  print "OK" X "has type" XT,
+128  print "",
+129  print "Test 3",
+130  Q = lam (id\ app (app plus (app id one))
+131                                  (app size (app id empty))),
+132  print "Typing" Q,
+133  w Q _TQ. % should print error
+
+
+
Test 1
+Typing
+ let (lam c0 \ c0) X0 c0 \
+  app (app plus (app c0 one)) (app size (app c0 empty))
+OK
+ let (lam c0 \ c0) (all c0 \ mono (c0 ===> c0)) c0 \
+  app (app plus (app c0 one)) (app size (app c0 empty)) has type mono integer
+
+Test 2
+Typing
+ lam c0 \
+  let (lam c1 \ app (app comma c0) c1) X1 c1 \
+   app (app comma (app c1 one)) (app c1 c0)
+OK
+ lam c0 \
+  let (lam c1 \ app (app comma c0) c1)
+   (all c1 \ mono (c1 ===> pair # X2 # c1)) c1 \
+   app (app comma (app c1 one)) (app c1 c0) has type
+ mono (X2 ===> pair # (pair # X2 # integer) # (pair # X2 # X2))
+
+Test 3
+Typing lam c0 \ app (app plus (app c0 one)) (app size (app c0 empty))
+Error:  c0 cannot have type all X3^1
+Error:  c0 cannot have type mono (X4^1 ===> list # X5^1)
+
+
+
Parsing time: 0.000
+
+Compilation time: 0.000
+
+Typechecking time: 0.001
+
+Success:
+
+Time: 0.000
+
+Constraints:
+
+
+State:
+
+
+

../../tests/sources/w_legacy.elpi +:

+
Fatal error: exception Failure("File /home/tassi/LPCIC/elpi/docs/source/../../tests/sources/w_legacy.elpi not found in: /home/tassi/LPCIC/elpi/_build/default/../lib/, /home/tassi/LPCIC/elpi/_build/default/../lib/ocaml, /home/tassi/LPCIC/elpi/_build/install/default/lib, /home/tassi/LPCIC/elpi/_build/default")
+
+
+

../../tests/sources/zebra.elpi:

+
Fatal error: exception Failure("File /home/tassi/LPCIC/elpi/docs/source/../../tests/sources/zebra.elp not found in: /home/tassi/LPCIC/elpi/_build/default/../lib/, /home/tassi/LPCIC/elpi/_build/default/../lib/ocaml, /home/tassi/LPCIC/elpi/_build/install/default/lib, /home/tassi/LPCIC/elpi/_build/default")
+
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/search.html b/search.html new file mode 100644 index 000000000..5eafc5f04 --- /dev/null +++ b/search.html @@ -0,0 +1,121 @@ + + + + + + Search — Elpi v2.0.4 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 000000000..92c4953e5 --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["about", "index", "playground"], "filenames": ["about.rst", "index.rst", "playground.rst"], "titles": ["About", "Welcome to Elpi\u2019s documentation!", "Playground"], "terms": {"thi": [0, 2], "page": [0, 2], "i": [0, 2], "both": [0, 2], "an": [0, 2], "introspect": 0, "self": 0, "document": [0, 2], "stack": [0, 2], "befor": [0, 2], "make": [0, 2], "sure": [0, 2], "have": [0, 2], "sphinx": [0, 2], "instal": [0, 2], "pip": 0, "place": 0, "To": [0, 2], "match": 0, "visual": 0, "us": [0, 2], "commun": 0, "e": [0, 2], "g": [0, 2], "http": 0, "coq": 0, "inria": 0, "fr": 0, "distrib": 0, "current": [0, 2], "refman": 0, "rtd": 0, "theme": 0, "On": [0, 2], "debian": 0, "base": [0, 2], "system": 0, "one": [0, 2], "can": [0, 2], "packag": [0, 2], "manag": 0, "apt": 0, "doc": [0, 2], "python3": 0, "follow": [0, 2], "plugin": 0, "ext": 0, "intersphinx": 0, "githubpag": 0, "name": [0, 2], "www": 0, "org": 0, "en": 0, "master": 0, "usag": 0, "html": 0, "gener": [0, 2], "link": 0, "object": [0, 2], "extern": 0, "project": 0, "either": 0, "explicitli": 0, "through": 0, "role": 0, "fallback": 0, "resolut": 0, "ani": [0, 2], "other": [0, 2], "cross": 0, "refer": [0, 2], "modul": [0, 2], "which": [0, 2], "creat": [0, 2], "nojekyl": 0, "file": [0, 2], "directori": 0, "publish": 0, "github": 0, "come": 0, "its": [0, 2], "own": 0, "helper": 0, "ar": [0, 2], "meant": 0, "directli": 0, "see": [0, 2], "playground": 0, "section": 0, "inject": [0, 2], "point": 0, "instead": [0, 2], "target": 0, "sourc": [0, 2], "tree": 0, "": [0, 2], "root": 0, "makefil": 0, "Or": 0, "option": [1, 2], "legaci": 1, "parser": [1, 2], "hook": 2, "order": 2, "run": 2, "elpi": 2, "code": 2, "snippet": 2, "output": 2, "within": 2, "built": 2, "local": 2, "eval": 2, "opam": 2, "env": 2, "build": 2, "It": 2, "doesn": 2, "t": 2, "hurt": 2, "check": 2, "dune": 2, "correctli": 2, "exec": 2, "h": 2, "block": 2, "evalu": 2, "from": 2, "convention": 2, "denot": 2, "restructuredtext": 2, "kind": 2, "term": 2, "type": 2, "app": 2, "lam": 2, "ty": 2, "arr": 2, "nat": 2, "bool": 2, "pred": 2, "o": 2, "hd": 2, "arg": 2, "tgt": 2, "src": 2, "f": 2, "pi": 2, "x": 2, "uvar": 2, "declare_constraint": 2, "len": 2, "list": 2, "A": 2, "int": 2, "0": 2, "_": 2, "n": 2, "m": 2, "1": 2, "constraint": 2, "rule": 2, "k": 2, "lx": 2, "ly": 2, "print": 2, "wrong": 2, "ariti": 2, "fals": 2, "gx": 2, "tx": 2, "gy": 2, "compat": 2, "ctxconstr": 2, "new": 2, "prop": 2, "y": 2, "main": 2, "t1_": 2, "t2_": 2, "a_": 2, "b_": 2, "2": 2, "c": 2, "z": 2, "d_": 2, "The": 2, "engin": 2, "retriev": 2, "all": 2, "direct": 2, "chang": 2, "them": 2, "literalinclud": 2, "relev": 2, "contain": 2, "exampl": 2, "captur": 2, "stdout": 2, "consol": 2, "just": 2, "after": 2, "stderr": 2, "erro": 2, "In": 2, "case": 2, "assert": 2, "onli": 2, "result": 2, "should": 2, "look": 2, "pars": 2, "time": 2, "000": 2, "compil": 2, "004": 2, "home": 2, "jwintz": 2, "develop": 2, "chr": 2, "line": 2, "7": 2, "column": 2, "60": 2, "charact": 2, "133": 2, "warn": 2, "constant": 2, "ha": 2, "declar": 2, "11": 2, "8": 2, "319": 2, "did": 2, "you": 2, "mean": 2, "std": 2, "length": 2, "28": 2, "761": 2, "typecheck": 2, "154": 2, "c1": 2, "frozen": 2, "501": 2, "c0": 2, "502": 2, "494": 2, "495": 2, "496": 2, "497": 2, "c3": 2, "499": 2, "c2": 2, "498": 2, "500": 2, "x0": 2, "x1": 2, "x2": 2, "x3": 2, "x4": 2, "x5": 2, "x6": 2, "x7": 2, "507": 2, "508": 2, "509": 2, "x8": 2, "x9": 2, "514": 2, "515": 2, "x10": 2, "520": 2, "521": 2, "x11": 2, "success": 2, "001": 2, "x12": 2, "suspend": 2, "x13": 2, "x14": 2, "state": 2, "pass": 2, "valid": 2, "v": 2, "num": 2, "zero": 2, "ack": 2, "m2": 2, "n2": 2, "v2": 2, "failur": 2, "fail": 2, "messag": 2, "error": 2, "accumulate_twice1": 2, "doom": 2, "accumul": 2, "100": 2, "fatal": 2, "tassi": 2, "lpcic": 2, "17": 2, "duplic": 2, "mode": 2, "also": 2, "accumulate_twice2": 2, "namespac": 2, "undeclar": 2, "global": 2, "5": 2, "3": 2, "93": 2, "108": 2, "pleas": 2, "add": 2, "text": 2, "your": 2, "program": 2, "002": 2, "ackermann": 2, "yield": 2, "13": 2, "29": 2, "noth": 2, "24": 2, "39": 2, "795": 2, "linear": 2, "_v": 2, "discard": 2, "v_": 2, "fresh": 2, "variabl": 2, "asclaus": 2, "tm": 2, "hard": 2, "p": 2, "simpl": 2, "beta": 2, "b": 2, "xxx": 2, "foo": 2, "15": 2, "miss": 2, "389": 2, "390": 2, "382": 2, "383": 2, "384": 2, "385": 2, "387": 2, "386": 2, "388": 2, "395": 2, "396": 2, "397": 2, "402": 2, "403": 2, "408": 2, "409": 2, "chrgcd": 2, "gcd": 2, "group": 2, "ok": 2, "solv": 2, "99": 2, "66": 2, "14": 2, "22": 2, "77": 2, "we": 2, "forc": 2, "resumpt": 2, "chrleq": 2, "leq": 2, "ltn": 2, "incompat": 2, "first": 2, "refl": 2, "atisym": 2, "tran": 2, "idempot": 2, "vim": 2, "set": 2, "ft": 2, "lprolog": 2, "chr_nokei": 2, "fst": 2, "chr_nokey2": 2, "bar": 2, "true": 2, "chr_not_cliqu": 2, "appli": 2, "predic": 2, "keyword": 2, "chr_sem": 2, "d": 2, "conj2": 2, "test1": 2, "test2": 2, "ctx_load": 2, "d1": 2, "d2": 2, "d3": 2, "d11": 2, "d22": 2, "d33": 2, "w": 2, "21": 2, "676": 2, "719": 2, "standard": 2, "\u03bbprolog": 2, "infix": 2, "oper": 2, "implic": 2, "higher": 2, "preced": 2, "than": 2, "conjunct": 2, "read": 2, "common": 2, "mistak": 2, "sinc": 2, "avail": 2, "mani": 2, "newcom": 2, "mai": 2, "expect": 2, "If": 2, "realli": 2, "what": 2, "want": 2, "write": 2, "silenc": 2, "otherwis": 2, "altern": 2, "lower": 2, "henc": 2, "same": 2, "20": 2, "628": 2, "671": 2, "19": 2, "580": 2, "623": 2, "18": 2, "549": 2, "565": 2, "517": 2, "533": 2, "16": 2, "486": 2, "cut": 2, "queri": 2, "q": 2, "answer": 2, "two": 2, "three": 2, "four": 2, "ko": 2, "cut2": 2, "differ": 2, "brain": 2, "damag": 2, "semant": 2, "teyju": 2, "consist": 2, "implicit": 2, "diagnost": 2, "ko2": 2, "ko1": 2, "cut3": 2, "cut4": 2, "cut5": 2, "255": 2, "_y": 2, "y_": 2, "cut6": 2, "deep_index": 2, "select": 2, "find": 2, "claus": 2, "last": 2, "index": 2, "level": 2, "drop": 2, "tc": 2, "trace": 2, "300": 2, "4": 2, "_foo": 2, "elpi_only_llam": 2, "untyp": 2, "unif": 2, "problem": 2, "outsid": 2, "pattern": 2, "fragment": 2, "data": 2, "const": 2, "appuvar": 2, "content": 2, "extend": 2, "printer": 2, "uid_priv": 2, "delai": 2, "command": 2, "util": 2, "delay_outside_frag": 2, "elpi_api": 2, "deprec": 2, "end_com": 2, "eta": 2, "macro": 2, "ctx": 2, "depth": 2, "k1": 2, "k2": 2, "branch": 2, "put": 2, "some": 2, "around": 2, "adepth": 2, "bdepth": 2, "regress": 2, "135": 2, "eta_a": 2, "as_1": 2, "as_2": 2, "as_3": 2, "uvar_1": 2, "uvar_2": 2, "uvar_3": 2, "uvar_4": 2, "uvar_5": 2, "uvar_6": 2, "var": 2, "variad": 2, "distinct_nam": 2, "unif_1": 2, "unif_2": 2, "u": 2, "bi": 2, "x01": 2, "ter": 2, "quater": 2, "becaus": 2, "flexibl": 2, "input": 2, "work": 2, "prune": 2, "wa": 2, "unif_zero": 2, "26": 2, "781": 2, "_x": 2, "x_": 2, "36": 2, "12": 2, "1112": 2, "1114": 2, "37": 2, "1132": 2, "1136": 2, "45": 2, "1276": 2, "1279": 2, "47": 2, "1333": 2, "1334": 2, "_x0": 2, "x0_": 2, "49": 2, "1388": 2, "1394": 2, "_x01": 2, "x01_": 2, "51": 2, "10": 2, "1435": 2, "1436": 2, "_x1": 2, "x1_": 2, "53": 2, "1489": 2, "1490": 2, "_x2": 2, "x2_": 2, "55": 2, "1541": 2, "1544": 2, "_x3": 2, "x3_": 2, "57": 2, "1604": 2, "1609": 2, "_x4": 2, "x4_": 2, "59": 2, "1661": 2, "1666": 2, "_x5": 2, "x5_": 2, "75": 2, "2253": 2, "2254": 2, "79": 2, "2316": 2, "81": 2, "2369": 2, "2372": 2, "83": 2, "2429": 2, "2434": 2, "85": 2, "2480": 2, "2481": 2, "87": 2, "2534": 2, "2537": 2, "89": 2, "2594": 2, "2599": 2, "even": 2, "odd": 2, "succ": 2, "doubl": 2, "42": 2, "437": 2, "_z": 2, "z_": 2, "findal": 2, "test3": 2, "test4": 2, "test5": 2, "same_var": 2, "super": 2, "tricki": 2, "implement": 2, "restrict": 2, "a1": 2, "when": 2, "backtrack": 2, "lost": 2, "9": 2, "25": 2, "_a": 2, "27": 2, "137": 2, "_b": 2, "33": 2, "712": 2, "fragment_exit": 2, "r": 2, "fragment_exit2": 2, "ignor": 2, "fragment_exit3": 2, "sigma": 2, "general_cas": 2, "213": 2, "216": 2, "_g": 2, "g_": 2, "general_case2": 2, "general_case3": 2, "hc_interp": 2, "interpret": 2, "logic": 2, "horn": 2, "illustr": 2, "reduct": 2, "realiz": 2, "substitut": 2, "note": 2, "third": 2, "try_claus": 2, "reduc": 2, "copi": 2, "xcon": 2, "xnil": 2, "tru": 2, "subst": 2, "perp": 2, "memb": 2, "imp": 2, "box": 2, "backchain": 2, "b1": 2, "b2": 2, "f1": 2, "f2": 2, "why": 2, "l": 2, "prog": 2, "adj": 2, "path": 2, "pathfroma": 2, "56": 2, "1311": 2, "_t": 2, "t_": 2, "65": 2, "1644": 2, "72": 2, "1877": 2, "73": 2, "1914": 2, "1915": 2, "_c": 2, "cs_": 2, "hdclaus": 2, "heap_discard": 2, "63": 2, "ho": 2, "except": 2, "hollight": 2, "untrust": 2, "call": 2, "kernel": 2, "next_object": 2, "next": 2, "callback_prov": 2, "proof": 2, "complet": 2, "next_tact": 2, "tactic": 2, "update_certif": 2, "get": 2, "certif": 2, "applic": 2, "end_of_proof": 2, "empti": 2, "ppterm": 2, "pretti": 2, "deftac": 2, "definit": 2, "export": 2, "trust": 2, "librari": 2, "append": 2, "fold2_append": 2, "put_bind": 2, "prove": 2, "function": 2, "end": 2, "ones": 2, "without": 2, "therefor": 2, "re": 2, "out": 2, "outs2": 2, "bound": 2, "fn": 2, "bind": 2, "occur": 2, "yx": 2, "ysx": 2, "yy": 2, "hol": 2, "thm": 2, "provabl": 2, "def0": 2, "typ": 2, "loop": 2, "check1": 2, "check1def": 2, "check1thm": 2, "check1axm": 2, "check1nbt": 2, "reterm": 2, "not_defin": 2, "check_hyp": 2, "temporarili": 2, "well": 2, "formed": 2, "avoid": 2, "too": 2, "much": 2, "slow": 2, "down": 2, "ultim": 2, "due": 2, "recogn": 2, "alreadi": 2, "univ": 2, "disj_union": 2, "eq": 2, "like": 2, "known": 2, "No": 2, "propag": 2, "now": 2, "sequent": 2, "seq": 2, "gamma": 2, "debug": 2, "hack": 2, "FOR": 2, "daemon": 2, "ign": 2, "gamma2": 2, "th": 2, "thenll": 2, "tac1": 2, "tacn": 2, "deftacl": 2, "tacl": 2, "debprint": 2, "thenl": 2, "tac": 2, "xtac": 2, "xx": 2, "id": 2, "wl": 2, "gamma1": 2, "wgamma": 2, "newl": 2, "ww": 2, "debuggin": 2, "remov": 2, "old": 2, "itac": 2, "new_certif": 2, "pg": 2, "bad": 2, "statement": 2, "defin": 2, "def": 2, "pdef": 2, "ptype": 2, "h1": 2, "h2": 2, "return": 2, "assumpt": 2, "theorem": 2, "goaltact": 2, "hyp": 2, "axiom": 2, "st": 2, "new_basic_typ": 2, "rep": 2, "ab": 2, "repab": 2, "absrep": 2, "preph": 2, "p_tactic": 2, "typdef": 2, "decl": 2, "check1decl": 2, "hypsuchthat": 2, "goal": 2, "pgoal": 2, "exist": 2, "existence_condit": 2, "reptyp": 2, "abstyp": 2, "absreptyp": 2, "foral": 2, "repabstyp": 2, "impl": 2, "prephtyp": 2, "cont": 2, "stop": 2, "print_constraint": 2, "parseterm": 2, "ppp": 2, "xa": 2, "g2": 2, "g1": 2, "s2": 2, "s1": 2, "u2": 2, "subseteq": 2, "u1": 2, "v1": 2, "plu": 2, "safe_list_map": 2, "unifi": 2, "thei": 2, "probabl": 2, "l1": 2, "l2": 2, "list_map": 2, "pptac": 2, "parsetac": 2, "ppptac": 2, "py": 2, "pgamma": 2, "ptac1": 2, "ptacn": 2, "ptac": 2, "pa": 2, "interact": 2, "non": 2, "parse_obj": 2, "psttac": 2, "sttac": 2, "parse_thm": 2, "ptyp": 2, "parse_axiom": 2, "prep": 2, "pp_tactic": 2, "parse_nbt": 2, "ptybo": 2, "tybo": 2, "parse_def": 2, "inductive_def": 2, "predf": 2, "predf_mon": 2, "pred_i": 2, "pred_e0": 2, "pred_": 2, "exp": 2, "inductive_def_pkg": 2, "pb": 2, "pst": 2, "pp": 2, "ct": 2, "contnext": 2, "welcom": 2, "extra": 2, "light": 2, "toplevel_loop": 2, "toplevel": 2, "read_cmd": 2, "enter": 2, "flush": 2, "std_out": 2, "readterm": 2, "std_in": 2, "ph": 2, "canon": 2, "canonicaltac": 2, "pcanonicaltac": 2, "next_tactic0": 2, "list_iter_rev": 2, "print_sequ": 2, "read_in_context": 2, "cert": 2, "true_then_fals": 2, "int_tac": 2, "abort": 2, "halt": 2, "other_tac": 2, "mk_script": 2, "new_tac": 2, "non_interactive_tac": 2, "script": 2, "new_interactive_tac": 2, "interactive_tac": 2, "subproof": 2, "cscript": 2, "pscript": 2, "t2": 2, "new2": 2, "newt": 2, "mk_list_of_bounded_fresh": 2, "px": 2, "turn": 2, "t1": 2, "otac": 2, "mk_constant_list": 2, "parse_inductive_def_spec": 2, "pf": 2, "param": 2, "pty": 2, "pl": 2, "build_quantified_pred": 2, "bo": 2, "build_pred": 2, "process_constructor": 2, "rest": 2, "prove_monotonicity_thm": 2, "apredf": 2, "stm": 2, "monoton": 2, "inv": 2, "conv": 2, "depth_tac": 2, "dd": 2, "auto_monoton": 2, "state_fixpoint_def": 2, "fixpoint": 2, "prove_fix_intro_thm": 2, "predf_monoton": 2, "forall_i": 2, "rand_tac": 2, "rator_tac": 2, "land_tac": 2, "cutth": 2, "fixpoint_is_prefixpoint": 2, "lforal": 2, "lappli": 2, "applyth": 2, "itaut": 2, "prove_fix_elim_thm": 2, "opr": 2, "x23": 2, "fixpoint_subseteq_any_prefixpoint": 2, "x24": 2, "lapply_last": 2, "lforall_last": 2, "prove_intro_thm": 2, "introthm": 2, "mk_intro_thm": 2, "itauteq": 2, "6": 2, "ON": 2, "monthm": 2, "fixdef": 2, "elimthm": 2, "out1": 2, "basic": 2, "mk_bounded_fresh": 2, "mem": 2, "bang": 2, "bug": 2, "runtim": 2, "ml": 2, "uncom": 2, "doe": 2, "matter": 2, "btw": 2, "ff": 2, "constant_tacl": 2, "ptacl": 2, "all_equals_list": 2, "tac2": 2, "ptac2": 2, "orels": 2, "repeat": 2, "gettimeofdai": 2, "time_aft": 2, "spent": 2, "For": 2, "metavari": 2, "inspect": 2, "pseq": 2, "sym": 2, "eq_true_intro": 2, "tt": 2, "tt_intro": 2, "conj": 2, "andr": 2, "robu": 2, "version": 2, "below": 2, "nil": 2, "andl": 2, "forall_": 2, "mp": 2, "where": 2, "apply_last": 2, "pq": 2, "convers": 2, "al": 2, "strip_const": 2, "expand": 2, "argument": 2, "beta_expand": 2, "fold": 2, "seem": 2, "pc": 2, "abs_tac": 2, "sub_tac": 2, "try": 2, "autom": 2, "todo": 2, "our": 2, "rid": 2, "hypothesi": 2, "left": 2, "tri": 2, "search": 2, "space": 2, "via": 2, "focus": 2, "not_": 2, "bit": 2, "long": 2, "produc": 2, "mayb": 2, "automat": 2, "somewher": 2, "els": 2, "exists_": 2, "or_": 2, "and_": 2, "eq_to_impl": 2, "not_i": 2, "sync": 2, "ff_elim": 2, "orr": 2, "orl": 2, "exists_i": 2, "n1": 2, "move": 2, "front": 2, "eq_reflex": 2, "induct": 2, "and_monoton": 2, "or_monoton": 2, "impl_monoton": 2, "not_monoton": 2, "forall_monoton": 2, "exists_monoton": 2, "the_librari": 2, "lstop": 2, "go": 2, "primivit": 2, "axiomat": 2, "choic": 2, "over": 2, "choos": 2, "connect": 2, "quantifi": 2, "disjoint": 2, "union": 2, "inj1_disj_union": 2, "inj2_disj_union": 2, "case_disj_union": 2, "case_disj_union_inj1": 2, "e1": 2, "e2": 2, "case_disj_union_inj2": 2, "univers": 2, "injection_univ": 2, "ejection_univ": 2, "inject_limit_univ": 2, "eject_limit_univ": 2, "pair_univ": 2, "proj1_univ": 2, "proj2_univ": 2, "inj1_univ": 2, "inj2_univ": 2, "case_univ": 2, "ejection_injection_univ": 2, "eject_inject_limit_univ": 2, "proj1_pair_univ": 2, "p1": 2, "p2": 2, "proj2_pair_univ": 2, "case_univ_inj1": 2, "case_univ_inj2": 2, "equal": 2, "or_commut": 2, "or_ff": 2, "or_tt": 2, "or_idempot": 2, "or_associ": 2, "and_commut": 2, "and_tt": 2, "and_ff": 2, "and_idempot": 2, "and_associ": 2, "and_or": 2, "or_and": 2, "ads_or_and": 2, "ads_and_or": 2, "not_or": 2, "not_and": 2, "not_not_not": 2, "impl_not_not": 2, "eq_to_impl_f": 2, "eq_to_impl_b": 2, "properti": 2, "inj": 2, "disj": 2, "pair_univ_inj_l": 2, "x20": 2, "x21": 2, "x22": 2, "x25": 2, "pair_univ_inj_r": 2, "injection_univ_inj": 2, "inj1_univ_inj": 2, "inj2_univ_inj": 2, "not_eq_inj1_inj2_univ": 2, "inj1_disj_union_inj": 2, "inj2_disj_union_inj": 2, "a2": 2, "knaster": 2, "tarski": 2, "j": 2, "in_subseteq": 2, "is_fixpoint": 2, "fixpoint_subseteq_any_fixpoint": 2, "prefixpoint_to_prefixpoint": 2, "fixpoint_is_fixpoint": 2, "found": 2, "recurs": 2, "rec": 2, "acc": 2, "accf": 2, "accf_monoton": 2, "acc_i0": 2, "acc_e0": 2, "acc_": 2, "lt": 2, "acc_i": 2, "well_found": 2, "rec_is_fixpoint": 2, "comment": 2, "requir": 2, "test_appli": 2, "test_apply2": 2, "test_itaut_1": 2, "test_monotone1": 2, "test_monotone2": 2, "test_monotone3": 2, "pnn": 2, "pnnf": 2, "pnnf_monoton": 2, "pnn_i": 2, "pnn_e0": 2, "pnn_e": 2, "pnn_tt": 2, "pnn_not": 2, "ad": 2, "hoc": 2, "fragil": 2, "x15": 2, "pnn_has_two_valu": 2, "elimin": 2, "principl": 2, "in_two": 2, "in_twof": 2, "in_twof_monoton": 2, "in_two_i": 2, "in_two_e0": 2, "in_two_": 2, "in_two_tt": 2, "in_two_ff": 2, "bool2": 2, "myrep2": 2, "myabs2": 2, "myrepabs2": 2, "myabsrep2": 2, "myproprep2": 2, "mytt": 2, "mynot": 2, "mytt_transf": 2, "mynot_transf": 2, "x18": 2, "mybool2_": 2, "x19": 2, "step0": 2, "mynot_mynot_mytt": 2, "step1": 2, "cartesian": 2, "product": 2, "inductive_typ": 2, "abstract": 2, "is_pair": 2, "prod": 2, "prod_rep": 2, "prod_ab": 2, "prod_repab": 2, "prod_absrep": 2, "prod_proprep": 2, "pair": 2, "snd": 2, "usual": 2, "lemma": 2, "natur": 2, "number": 2, "is_nat": 2, "is_natf": 2, "is_nat_monoton": 2, "is_nat_i": 2, "is_nat_e0": 2, "is_nat_": 2, "is_nat_z": 2, "nat_rep": 2, "nat_ab": 2, "nat_repab": 2, "nat_absrep": 2, "nat_proprep": 2, "consequ": 2, "transfer": 2, "nat_": 2, "nat_abs_inj": 2, "nat_rep_inj": 2, "s_inj": 2, "not_equal_z_": 2, "nat_cas": 2, "nat_case_z": 2, "nat_case_": 2, "pred_well_found": 2, "nat_recf": 2, "nat_rec": 2, "nat_rec_ok0": 2, "x26": 2, "nat_rec_ok": 2, "arithmet": 2, "sum": 2, "plus_z": 2, "plus_": 2, "plus_n_z": 2, "plus_n_": 2, "plus_comm": 2, "statu": 2, "depend": 2, "converion": 2, "sometim": 2, "diverg": 2, "progress": 2, "myprop": 2, "provid": 2, "wit": 2, "remain": 2, "free": 2, "could": 2, "hand": 2, "would": 2, "need": 2, "symptom": 2, "more": 2, "never": 2, "wai": 2, "atm": 2, "do": 2, "apply_2": 2, "veri": 2, "must": 2, "occurr": 2, "still": 2, "50": 2, "fix": 2, "about": 2, "handl": 2, "discuss": 2, "enrico": 2, "he": 2, "shot": 2, "optim": 2, "possibl": 2, "IN": 2, "unimpl": 2, "onc": 2, "let": 2, "reach": 2, "becom": 2, "user": 2, "hypothes": 2, "least": 2, "But": 2, "better": 2, "bidirect": 2, "successor": 2, "predecessor": 2, "prover": 2, "lambdaprolog": 2, "interfac": 2, "There": 2, "leancop": 2, "prolog": 2, "trick": 2, "small": 2, "formal": 2, "possibli": 2, "everyth": 2, "decis": 2, "procedur": 2, "ring": 2, "inequ": 2, "756": 2, "797": 2, "longer": 2, "support": 2, "hollight_legaci": 2, "_build": 2, "default": 2, "lib": 2, "ocaml": 2, "hyp_uvar": 2, "67": 2, "shoud": 2, "impl2": 2, "index2": 2, "iter": 2, "999999": 2, "311": 2, "io_colon": 2, "lambda": 2, "infer": 2, "simpli": 2, "appl": 2, "lambda2": 2, "lambda3": 2, "termifi": 2, "x16": 2, "x17": 2, "mult": 2, "ten": 2, "thousand": 2, "263": 2, "list_as_conj": 2, "done": 2, "list_comma": 2, "llam": 2, "spy": 2, "counter": 2, "dummi": 2, "clause1": 2, "clause2": 2, "clause3": 2, "prune_arg": 2, "prune_arg2": 2, "prune_arg3": 2, "whatev": 2, "so": 2, "alon": 2, "c4": 2, "c5": 2, "c6": 2, "637": 2, "_f": 2, "f_": 2, "657": 2, "660": 2, "683": 2, "688": 2, "llamchr": 2, "resili": 2, "both_or_non": 2, "watch": 2, "becasus": 2, "deal": 2, "dirti": 2, "context": 2, "b2n": 2, "map": 2, "xr": 2, "4096": 2, "cmp_term": 2, "time0": 2, "time1": 2, "pr": 2, "broken": 2, "time2": 2, "924682": 2, "043325": 2, "609252": 2, "740": 2, "map_list": 2, "assoc": 2, "317134": 2, "552711": 2, "261567": 2, "139": 2, "map_list_opt": 2, "348501": 2, "003430": 2, "159274": 2, "516": 2, "name_builtin": 2, "named_clauses00": 2, "name1": 2, "named_clauses01": 2, "31": 2, "named_clauses02": 2, "namespaces00": 2, "rev": 2, "aux": 2, "rl": 2, "namespaces01": 2, "toto": 2, "insid": 2, "baz": 2, "namespaces02": 2, "namespaces03": 2, "foo4": 2, "foo3": 2, "foo2": 2, "foo1": 2, "nil_con": 2, "con": 2, "notat": 2, "infixl": 2, "190": 2, "infixr": 2, "191": 2, "prefixr": 2, "postfixl": 2, "200": 2, "uu": 2, "cd": 2, "107": 2, "_d": 2, "101": 2, "102": 2, "notation_error": 2, "mixfix": 2, "token": 2, "famili": 2, "identifi": 2, "start": 2, "belong": 2, "associ": 2, "here": 2, "tabl": 2, "repres": 2, "symbol": 2, "mark": 2, "cannot": 2, "eg": 2, "while": 2, "increas": 2, "fixiti": 2, "right": 2, "div": 2, "mod": 2, "prefix": 2, "postfix": 2, "stai": 2, "ask": 2, "skip": 2, "120": 2, "As": 2, "facil": 2, "ast": 2, "verifi": 2, "how": 2, "echo": 2, "myformula": 2, "lh": 2, "stronger": 2, "notation_legaci": 2, "patternunif": 2, "98": 2, "patternunif2": 2, "pi3": 2, "pi5": 2, "bam": 2, "pnf": 2, "transform": 2, "formula": 2, "prenex": 2, "normal": 2, "form": 2, "assum": 2, "classic": 2, "equival": 2, "analyz": 2, "structur": 2, "includ": 2, "modifi": 2, "analysi": 2, "merg": 2, "quant_fre": 2, "atom": 2, "termp": 2, "appear": 2, "head": 2, "immedi": 2, "subformula": 2, "proposit": 2, "top": 2, "OF": 2, "f3": 2, "f4": 2, "3477": 2, "3478": 2, "_f1": 2, "f1_": 2, "34": 2, "3492": 2, "3493": 2, "_f2": 2, "f2_": 2, "3509": 2, "3510": 2, "_f3": 2, "f3_": 2, "3525": 2, "3526": 2, "_f4": 2, "f4_": 2, "polymorphic_vari": 2, "langag": 2, "polymorph": 2, "variant": 2, "unari": 2, "funnam": 2, "fun": 2, "distinct": 2, "mem_": 2, "main2": 2, "main1": 2, "is_subset_": 2, "is_subset": 2, "is_ground": 2, "inter": 2, "check_term": 2, "check_domain": 2, "check_codomain": 2, "btl": 2, "ttl": 2, "origti": 2, "bodi": 2, "tl": 2, "tl1": 2, "accord": 2, "ref": 2, "kill": 2, "hindlei": 2, "milner": 2, "interest": 2, "subset": 2, "singleton": 2, "up": 2, "trigger": 2, "confus": 2, "between": 2, "mess": 2, "happen": 2, "Of": 2, "ig": 2, "og": 2, "special": 2, "ih1": 2, "oh1": 2, "ih2": 2, "oh2": 2, "2005": 2, "2006": 2, "111": 2, "3545": 2, "3546": 2, "queen": 2, "not_attack": 2, "rang": 2, "queens_aux": 2, "not_attack_aux": 2, "neq": 2, "less": 2, "unplacedq": 2, "safeq": 2, "unplacedqs1": 2, "dummy1": 2, "dummy2": 2, "first_claus": 2, "no_more_ch": 2, "m1": 2, "tenthousand": 2, "1169": 2, "1174": 2, "_dummy1": 2, "dummy1_": 2, "1176": 2, "1181": 2, "_dummy2": 2, "dummy2_": 2, "70": 2, "1942": 2, "1985": 2, "76": 2, "2045": 2, "089": 2, "quote_syntax": 2, "builtin": 2, "52": 2, "unabl": 2, "close": 2, "string": 2, "src263": 2, "src265": 2, "random": 2, "self_init": 2, "003": 2, "reduce_cbn": 2, "cbv": 2, "cbn": 2, "xxxxxxxxx": 2, "y2": 2, "ONE": 2, "six": 2, "twelv": 2, "nine": 2, "five": 2, "728": 2, "32": 2, "1237": 2, "1240": 2, "_nine": 2, "nine_": 2, "1129": 2, "1134": 2, "_twelv": 2, "twelve_": 2, "258": 2, "reduce_cbv": 2, "r2": 2, "420": 2, "448": 2, "961": 2, "964": 2, "30": 2, "853": 2, "858": 2, "604": 2, "43": 2, "restriction3": 2, "nr": 2, "exit": 2, "restriction4": 2, "restriction5": 2, "restriction6": 2, "yap": 2, "027": 2, "771": 2, "hashtbl": 2, "528": 2, "ineffici": 2, "681": 2, "gc": 2, "899": 2, "lvl": 2, "flat": 2, "763": 2, "629": 2, "083": 2, "068": 2, "90": 2, "48": 2, "ocamlopt": 2, "014": 2, "ocamlc": 2, "024": 2, "033": 2, "257": 2, "ulimit": 2, "81920": 2, "newlazi": 2, "lazi": 2, "eager": 2, "74": 2, "35": 2, "78": 2, "00": 2, "auto": 2, "97": 2, "88": 2, "hash": 2, "40": 2, "38": 2, "64": 2, "man": 2, "80": 2, "61": 2, "44": 2, "effici": 2, "62": 2, "ii": 2, "desper": 2, "desperate2": 2, "desperate3": 2, "overflow": 2, "rev14": 2, "same_term": 2, "self_assign": 2, "succe": 2, "element": 2, "cardin": 2, "769606": 2, "040283": 2, "551719": 2, "459": 2, "shorten": 2, "shorten2": 2, "shorten_aux": 2, "shorten_aux2": 2, "shorten_builtin": 2, "shorten_tri": 2, "concat1": 2, "escap": 2, "275": 2, "276": 2, "_ab": 2, "ab_": 2, "292": 2, "_e": 2, "e_": 2, "253": 2, "spill_and": 2, "omit": 2, "purpos": 2, "spill_impl": 2, "spill_lam": 2, "trace2": 2, "trace_chr": 2, "trace_cut": 2, "trace_findal": 2, "trail": 2, "outcom": 2, "typeabbrv": 2, "typeabbrev": 2, "typeabbrv1": 2, "typeabbrv10": 2, "tmp": 2, "128": 2, "liter": 2, "typeabbrv11": 2, "typeabbrv12": 2, "41": 2, "typeabbrv2": 2, "abbrevi": 2, "previou": 2, "typeabbrv3": 2, "typeabbrv4": 2, "typeabbrv5": 2, "unknown": 2, "typeabbrv6": 2, "typeabbrv7": 2, "typeabbrv8": 2, "typeabbrv9": 2, "uminu": 2, "uvar_chr": 2, "unsaf": 2, "cast": 2, "mk": 2, "meta": 2, "819": 2, "821": 2, "113": 2, "_x10": 2, "x10_": 2, "variadic_declare_constraint": 2, "96": 2, "filter": 2, "tye": 2, "mono": 2, "size": 2, "comma": 2, "integ": 2, "fp": 2, "overbar": 2, "poli": 2, "fresh_": 2, "polyt": 2, "vt": 2, "vg": 2, "tp": 2, "xt": 2, "_tq": 2, "w_legaci": 2, "zebra": 2, "elp": 2}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"about": 0, "prerequisit": [0, 2], "extens": 0, "build": 0, "welcom": 1, "elpi": 1, "": 1, "document": 1, "api": 1, "playground": 2, "syntax": 2, "regexp": 2, "match": 2, "test": 2, "bed": 2}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 57}, "alltitles": {"About": [[0, "about"]], "Prerequisites": [[0, "prerequisites"], [2, "prerequisites"]], "Extensions": [[0, "extensions"]], "Building": [[0, "building"]], "Welcome to Elpi\u2019s documentation!": [[1, "welcome-to-elpi-s-documentation"]], "API:": [[1, null]], "Playground": [[2, "playground"]], "Syntax": [[2, "syntax"]], "Regexp Matching": [[2, "regexp-matching"]], "Test Bed": [[2, "test-bed"]]}, "indexentries": {}}) \ No newline at end of file