src/FOL/ROOT.ML
author clasohm
Tue, 24 Oct 1995 14:50:24 +0100
changeset 1296 ae31bb7774a7
parent 1263 290c4dfc34ba
child 1356 dc8acbc64062
permissions -rw-r--r--
added calls of init_html and make_chart
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title: 	FOL/ROOT
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1993  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
Adds First-Order Logic to a database containing pure Isabelle. 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
Should be executed in the subdirectory FOL.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
val banner = "First-Order Logic with Natural Deduction";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
writeln banner;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
393
02b27671b899 thy reader now initialised by init_thy_reader();
wenzelm
parents: 121
diff changeset
    14
init_thy_reader();
72
099d949fe467 changes for new Readthy
clasohm
parents: 0
diff changeset
    15
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
print_depth 1;  
97
dd350da66c2c renamed int-prover.ML to intprover.ML,
clasohm
parents: 72
diff changeset
    17
use_thy "FOL";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
use "../Provers/splitter.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
use "../Provers/ind.ML";
1004
70676af0ac97 Set up for new hyp_subst_tac.
lcp
parents: 731
diff changeset
    21
use "../Provers/hypsubst.ML";
70676af0ac97 Set up for new hyp_subst_tac.
lcp
parents: 731
diff changeset
    22
use "../Provers/classical.ML";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
(*** Applying HypsubstFun to generate hyp_subst_tac ***)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
structure Hypsubst_Data =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
  struct
1004
70676af0ac97 Set up for new hyp_subst_tac.
lcp
parents: 731
diff changeset
    28
  structure Simplifier = Simplifier
70676af0ac97 Set up for new hyp_subst_tac.
lcp
parents: 731
diff changeset
    29
    (*Take apart an equality judgement; otherwise raise Match!*)
70676af0ac97 Set up for new hyp_subst_tac.
lcp
parents: 731
diff changeset
    30
  fun dest_eq (Const("Trueprop",_) $ (Const("op =",_)  $ t $ u)) = (t,u)
70676af0ac97 Set up for new hyp_subst_tac.
lcp
parents: 731
diff changeset
    31
  val eq_reflection = eq_reflection
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
  val imp_intr = impI
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
  val rev_mp = rev_mp
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
  val subst = subst
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
  val sym = sym
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
  end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    38
structure Hypsubst = HypsubstFun(Hypsubst_Data);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
open Hypsubst;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
97
dd350da66c2c renamed int-prover.ML to intprover.ML,
clasohm
parents: 72
diff changeset
    41
use "intprover.ML";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
(*** Applying ClassicalFun to create a classical prover ***)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
structure Classical_Data = 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
  struct
666
4d9f6d83c2bf FOL/ROOT/FOL_dup_cs: removed as obsolete
lcp
parents: 393
diff changeset
    46
  val sizef	= size_of_thm
4d9f6d83c2bf FOL/ROOT/FOL_dup_cs: removed as obsolete
lcp
parents: 393
diff changeset
    47
  val mp	= mp
4d9f6d83c2bf FOL/ROOT/FOL_dup_cs: removed as obsolete
lcp
parents: 393
diff changeset
    48
  val not_elim	= notE
4d9f6d83c2bf FOL/ROOT/FOL_dup_cs: removed as obsolete
lcp
parents: 393
diff changeset
    49
  val classical	= classical
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    50
  val hyp_subst_tacs=[hyp_subst_tac]
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
  end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    53
structure Cla = ClassicalFun(Classical_Data);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
open Cla;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    56
(*Propositional rules 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
  -- iffCE might seem better, but in the examples in ex/cla
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    58
     run about 7% slower than with iffE*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    59
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    60
                       addSEs [conjE,disjE,impCE,FalseE,iffE];
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
(*Quantifier rules*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    63
val FOL_cs = prop_cs addSIs [allI] addIs [exI,ex1I] 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    64
                     addSEs [exE,ex1E] addEs [allE];
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    65
666
4d9f6d83c2bf FOL/ROOT/FOL_dup_cs: removed as obsolete
lcp
parents: 393
diff changeset
    66
val ex1_functional = prove_goal FOL.thy
4d9f6d83c2bf FOL/ROOT/FOL_dup_cs: removed as obsolete
lcp
parents: 393
diff changeset
    67
    "!!a b c. [| EX! z. P(a,z);  P(a,b);  P(a,c) |] ==> b = c"
731
435ff9ec4058 trivial changes
lcp
parents: 666
diff changeset
    68
 (fn _ => [ (deepen_tac FOL_cs 0 1) ]);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    69
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    70
use "simpdata.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    71
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    72
use "../Pure/install_pp.ML";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    73
print_depth 8;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    74
1296
ae31bb7774a7 added calls of init_html and make_chart
clasohm
parents: 1263
diff changeset
    75
make_chart ();   (*make HTML chart*)
ae31bb7774a7 added calls of init_html and make_chart
clasohm
parents: 1263
diff changeset
    76
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    77
val FOL_build_completed = ();	(*indicate successful build*)