The Deduce language includes four kinds of phrases:
A deduce file contains a list of statements. Each statement can be one of:
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 >
.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 |