summaryrefslogtreecommitdiff
path: root/examples/logic/LogicI.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-11-27 10:54:26 +0000
committeraarne <aarne@cs.chalmers.se>2006-11-27 10:54:26 +0000
commita5232f7e5b8f6ca988696f3870f019113edb8d90 (patch)
tree7e9d543ac07c037c0f86dcc00937a4bbc7a8cc63 /examples/logic/LogicI.gf
parentc75688651e95d1fe69175ca3e4859e6d753b2b8c (diff)
part of Logic implemented generically
Diffstat (limited to 'examples/logic/LogicI.gf')
-rw-r--r--examples/logic/LogicI.gf44
1 files changed, 44 insertions, 0 deletions
diff --git a/examples/logic/LogicI.gf b/examples/logic/LogicI.gf
new file mode 100644
index 000000000..c9c374622
--- /dev/null
+++ b/examples/logic/LogicI.gf
@@ -0,0 +1,44 @@
+incomplete concrete LogicI of Logic =
+ open
+ LexTheory,
+ Prooftext,
+ Grammar,
+ Constructors,
+ Combinators
+ in {
+
+lincat
+ Prop = Prooftext.Prop ;
+ Proof = Prooftext.Proof ;
+ Dom = Typ ;
+ Elem = Object ;
+ Hypo = Label ;
+ Text = Section ;
+
+lin
+ Disj A B = coord or_Conj A B ;
+ Impl A B = coord ifthen_DConj A B ;
+
+ Abs = mkS (pred have_V2 (mkNP we_Pron) (mkNP (mkDet IndefArt) contradiction_N)) ;
+
+ DisjIl A B a = proof a (proof afortiori (coord or_Conj A B)) ;
+ DisjIr A B b = proof b (proof afortiori (coord or_Conj A B)) ;
+
+ DisjE A B C c b1 b2 =
+ appendText
+ c
+ (appendText
+ (appendText
+ (cases (mkNum n2))
+ (proofs
+ (appendText (assumption A) b1)
+ (appendText (assumption B) b2)))
+ (proof therefore C)) ;
+
+ ImplI A B b =
+ proof (assumption A) (appendText b (proof therefore (coord ifthen_DConj A B))) ;
+
+ Hypoth A h = proof hypothesis A ;
+
+
+} \ No newline at end of file