System for Automated Deduction (SAD)
====================================

The System for Automated Deduction (SAD) is being developed in the
frame of the "Evidence Algorithm" project (http://ea.unicyb.kiev.ua).
The system is intended for automated processing of formal mathematical
texts written in a special language called ForTheL (which stands for
FORmal THEory Language) or in first-order language.

In its current implementation, SAD executes the following four tasks:

  * Inference Search:   establish deducibility of a first-order sequent
  * Theorem Proving:    prove a theorem in the context of a ForTheL text
  * Text Verification:  verify a self-contained ForTheL text
  * TPTP Problems:      solve a problem from the TPTP Library

The system SAD can be downloaded or accessed online at the web-site
of the project (http://ea.unicyb.kiev.ua)


Programs and scripts:
=====================

The distribution contains the following programs:

alice       the core of the system SAD, which processes the input text
            using a built-in "foreground" reasoner (collection of proof
            search heuristics) and an external "background" first-order
            prover. Alice is written in Haskell, a general purpose,
            purely functional programming language (http://haskell.org)
            and requires GHC, the Glasgow Haskell Compiler, to complile.
            GHC is is freely available from haskell.org

moses       the prover for first-order logic with equality used as the
            "backgound" prover in SAD by default. Moses is based on an
            original goal-driven sequent calculus and is written in C.

haigha      a mediator between alice and external background provers.
            Currently, the only "third-party" prover supported is SPASS,
            a theorem prover for first-order logic with equality being
            developed at the Max-Planck-Institut fuer Informatik, Germany
            (http://spass.mpi-sb.mpg.de). Haigha is written in C.

These programs are not intended to be used directly. The interface for
them is provided by the following scripts:

sad-moses       a shell script that uses Alice in conjunction with Moses

sad-spass       a shell script that uses Alice in conjunction with SPASS

tptp4sad.pl     a Perl script that prepares TPTP problems for SAD


Build and install:
==================

To build the system SAD, "cd" into its root directory and type "make".
Set the appropriate pathnames in the scripts "sad-moses", "sad-spass",
and "tptp4sad.pl".


Usage:
======

The most simple way to use the system SAD is as follows:

    > ./sad-moses my.problem
or
    > ./sad-moses < my.problem

to verify a ForTheL text or to prove a first-order sequent.
Alice will recognize automatically the language of the input.

If you want to process you ForTheL text in the theorem-proving
mode (only the last proposition is proved and proof sections
are ignored), you pass the corresponding option to Alice:

    > ./sad-moses --tpm problem.ftl

To solve a problem from the TPTP library, say SET037-3.p,
you execute the following pipe:

    > ./tptp4sad.pl SET037-3.p | ./sad-moses

The script "tptp4sad.pl" will first look for the given problem
in your local copy of the TPTP library (provided, you have one)
and then try to download it from the web-site of TPTP.

If you want to try your own problem in the TPTP syntax, run

    > ./tptp4sad.pl myownproblem.p | ./sad-moses

To see just a translation of the input problem into the uniform
first-order based representaion, use -T option:

    > ./sad-moses -T example.ftl

To see other possible options for Alice, just run

    > ./sad-moses -h

If you want to pass an option not to Alice but to your background
prover, you do it as follows:

    > ./sad-moses <alice_opt1> ... -- <moses_opt1> ...

To see the possible options for Moses, run

    > ./moses/moses -h

To see how Haigha is working, look inside "sad-spass" or run

    > ./haigha/haigha -h

Of course, you can use "sad-spass" instead of "sad-moses" in
any example above.


First-order syntax in SAD:
==========================

The System for Automated Deduction accepts one-goal first-order sequents
in the form of a sequence of dot-terminated formulas where the goal formula
is separated from premises by a colon. Thus, a sequent  P1, P2, P3 -> G  is
written as  P1. P2. P3. : G.  Sequents with the empty goal are also allowed,
in the form  P1. P2. P3. :

Formulas are built from tokens: variables, function symbols and predicate
symbols, with the help of the propositional connectives, quantifiers and
parentheses. You can also use Church's dot to group subformulas. Note that
we use the same character to terminate formulas as this is unambiguous for
well-formed formulas. We adopt the following notation (in parentheses,
alternative names are shown):

  +---------------+----------------++----------------+-----------------+
  |  @  (forall)  |  universality  ||  $  (exists)   |  existence      |
  |   ~  (iff)    |  equivalence   ||  >  (implies)  |  implication    |
  |    |  (or)    |  disjunction   ||    &  (and)    |  conjunction    |
  |   -  (not)    |  negation      ||       .        |  Church's dot   |
  |      =        |  equality      ||      !=        |  disequality    |
  |     true      |  verum         ||     false      |  falsum         |
  +---------------+----------------++----------------+-----------------+

Variables, function and predicate symbols are composed of latin letters,
digits, and underscores. Free variables are treated as constants. You can
find some first-order problems for SAD in the examples/ directory.


Formal Theory Language:
=======================

The reference on the language ForTheL can be downloaded separately from
the web-site of the system SAD (http://ea.unicyb.kiev.ua/dload.en.html).
You can also find some ForTheL texts in the examples/ directory.



Have a nice play,

The SAD Development Team:
=========================

Alexander Lyaletski <lav@unicyb.kiev.ua>
    Kyiv National Taras Shevchenko University, Ukraine

Konstantin Verchinine <verko@capet.iut-fbleau.fr>
    University Paris XII -- Val de Marne, France

Andrei Paskevich <andrei@capet.iut-fbleau.fr>
    Kyiv National Taras Shevchenko University, Ukraine
    University Paris XII -- Val de Marne, France

