aboutsummaryrefslogtreecommitdiffhomepage
path: root/twelf
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2000-08-29 15:31:19 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2000-08-29 15:31:19 +0000
commit433010c92cd86bcaaa57896b8516382f7a5f4bb2 (patch)
treecf62971bbdce757dbd67bcd4f7219f8c5b159401 /twelf
parent98c930356336fed071617601f8ed0e5cd81f893a (diff)
Example file grabbed from twelf distrib
Diffstat (limited to 'twelf')
-rw-r--r--twelf/example.elf59
1 files changed, 59 insertions, 0 deletions
diff --git a/twelf/example.elf b/twelf/example.elf
new file mode 100644
index 00000000..e52d5a06
--- /dev/null
+++ b/twelf/example.elf
@@ -0,0 +1,59 @@
+%%%
+%%% Example script for Twelf Proof General.
+%%%
+%%% $Id$
+%%%
+
+
+%%% Intuitionistic propositional calculus
+%%% Positive fragment with implies, and, true.
+%%% Two formulations here: natural deduction and Hilbert-style system.
+%%% Author: Frank Pfenning
+
+% Type of propositions.
+o : type.
+%name o A.
+
+% Syntax: implication, plus a few constants.
+=> : o -> o -> o. %infix right 10 =>.
+& : o -> o -> o. %infix right 11 &.
+true : o.
+
+% Provability.
+|- : o -> type. %prefix 9 |-.
+%name |- P.
+
+% Axioms.
+K : |- A => B => A.
+S : |- (A => B => C) => (A => B) => A => C.
+ONE : |- true.
+PAIR : |- A => B => A & B.
+LEFT : |- A & B => A.
+RIGHT : |- A & B => B.
+
+% Inference Rule.
+MP : |- A => B -> |- A -> |- B.
+
+% Natural Deduction.
+
+! : o -> type. %prefix 9 !.
+%name ! D.
+
+trueI : ! true.
+andI : ! A -> ! B -> ! A & B.
+andEL : ! A & B -> ! A.
+andER : ! A & B -> ! B.
+impliesI : (! A -> ! B) -> ! A => B.
+impliesE : ! A => B -> ! A -> ! B.
+
+% Normal deductions (for faster search)
+!^ : o -> type.
+!v : o -> type.
+
+trueI^ : !^ true.
+andI^ : !^ A -> !^ B -> !^ (A & B).
+andEvL : !v (A & B) -> !v A.
+andEvR : !v (A & B) -> !v B.
+impI^ : (!v A -> !^ B) -> !^ (A => B).
+impEv : !v (A => B) -> !^ A -> !v B.
+close : !v A -> !^ A.