Rewrite part of README for clarity, giving the rules of inference.
Chris Pressey
2 years ago
0 | 0 | Eqthy |
1 | 1 | ===== |
2 | 2 | |
3 | **Eqthy** is a language for equational proofs. It's similar to, but different from, the "calculational style" | |
4 | developed and popularized by Dijkstra et al. | |
3 | **Eqthy** is a language for equational proofs. It's similar to, but | |
4 | different from, the "calculational style" developed and popularized by | |
5 | Dijkstra et al. | |
5 | 6 | |
6 | This document is a sketch. It describes the language. It mentions some things a processor of the language | |
7 | might be expected to do. | |
7 | This document is a sketch. It describes the language. It mentions some | |
8 | things a processor of the language might be expected to do. | |
8 | 9 | |
9 | An Eqthy development consists of any number of axioms and theorems. Each axiom is an equation. | |
10 | An equation equates two terms. Terms consist of constructors (also called function symbols) | |
11 | and variables. Variables begin with uppercase letters. Constructors begin with lowercase | |
12 | letters are followed by a list of zero or more subterms, enclosed in parentheses. | |
13 | If a term has no subterms, it is called an "atom" and the parentheses may be omitted. | |
10 | An Eqthy development consists of any number of axioms and theorems. Each | |
11 | axiom is an equation. An equation equates two terms. Terms consist of | |
12 | constructors (also called function symbols) and variables. Variables begin | |
13 | with uppercase letters. Constructors begin with lowercase letters are | |
14 | followed by a list of zero or more subterms, enclosed in parentheses. If a | |
15 | term has no subterms, it is called an "atom" and the parentheses may be | |
16 | omitted. | |
14 | 17 | |
15 | 18 | Each axiom may optionally by named. Here are some example axioms: |
16 | 19 | |
18 | 21 | axiom (#id-left) mul(e, A) = A |
19 | 22 | axiom (#assoc) mul(A, mul(B, C)) = mul(mul(A, B), C) |
20 | 23 | |
21 | A theorem gives an equation, followed by a sequence of equations that shows that the | |
22 | validitiy of the equation follows from the axioms and theorems previously given in | |
23 | the Eqthy souce. Each equation in the sequence is optionally followed by a hint, | |
24 | indicating what rule was used to derive it. | |
24 | A theorem gives an equation, followed by a sequence of equations that shows | |
25 | that the equation can be derived using the available means. The available | |
26 | means are: | |
27 | ||
28 | * the axioms that have been previously defined | |
29 | * the theorems that have been previously proved | |
30 | * the rules of inference of equational logic, which are | |
31 | * Reflexivity (A=A) | |
32 | * Transitivity (if A=B and B=C then A=C) | |
33 | * Substitution (if x(A)=y(A) then x(B)=y(B)) | |
34 | * Congruence (if A=B then x(A)=x(B)) | |
35 | ||
36 | The sequence of equations following a theorem is a proof. Each equation in | |
37 | the proof is optionally annotated with a hint that follows it, indicating what | |
38 | axiom, theorem, or rule of inference was used to derive it. | |
25 | 39 | |
26 | 40 | theorem (#id-comm) |
27 | 41 | mul(A, e) = mul(e, A) |