The Deduce language includes four kinds of phrases:
A deduce file contains a list of statements. Each statement can be one of:
Deduce also has an experimental imperative surface — proc,
observer, object, mutable arrays [T]!, and frame expressions —
documented separately in the
Experimental Imperative Reference. Those
forms are parser/AST only today and most require
--experimental-imperative.
In Deduce, one must give a reason for why a theorem is true, and the reason is given by a proof. Proofs are constructed using the rules of logic together with ways to organize proofs by working backwards from the goal, or forwards from the assumptions.
Both logical formulas and program expressions are represented in Deduce by terms. For example, if P then Q is a logical formula and x + 5 is a program expression, and to Deduce they are both terms.
Each term has a type that classifies the kinds of values that are produced by the term.
bool classifies true or false.fn T1,...,Tn -≥ Tr classifies a function whose n parameters are of type T1, ..., Tn and whose return type is Tr.fn <X1,...,Xk> T1,...,Tn -≥ Tr classifies a generic function with type parameters X1, ..., Xk.<, a comma-separated list of type arguments, followed by >.--experimental-imperative, [T]! is parsed as an experimental mutable-array type.Deduce uses some Unicode characters, but in case it is difficult for you to use Unicode, there are regular ASCI equivalents that you can use instead.
| Unicode | ASCI |
|---|---|
| ≠ | /= |
| ≤ | <= |
| ≥ | >= |
| ⊆ | (= |
| ∈ | in |
| ∪ | | |
| ∩ | & |
| ⨄ | .+. |
| ∘ | .o. |
| ∅ | .0. |
| λ | fun |