src/FOL/ROOT.ML
author oheimb
Wed, 12 Nov 1997 18:58:50 +0100
changeset 4223 f60e3d2c81d3
parent 4222 d7573d6d0513
child 4349 50403e5a44c0
permissions -rw-r--r--
added thin_refl to hyp_subst_tac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1459
d12da312eff4 expanded tabs
clasohm
parents: 1356
diff changeset
     1
(*  Title:      FOL/ROOT
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1459
d12da312eff4 expanded tabs
clasohm
parents: 1356
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
0
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
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
print_depth 1;  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
4222
d7573d6d0513 refer to $ISABELLE_HOME/src;
wenzelm
parents: 4179
diff changeset
    16
use "$ISABELLE_HOME/src/Provers/simplifier.ML";
d7573d6d0513 refer to $ISABELLE_HOME/src;
wenzelm
parents: 4179
diff changeset
    17
use "$ISABELLE_HOME/src/Provers/splitter.ML";
d7573d6d0513 refer to $ISABELLE_HOME/src;
wenzelm
parents: 4179
diff changeset
    18
use "$ISABELLE_HOME/src/Provers/ind.ML";
d7573d6d0513 refer to $ISABELLE_HOME/src;
wenzelm
parents: 4179
diff changeset
    19
use "$ISABELLE_HOME/src/Provers/hypsubst.ML";
d7573d6d0513 refer to $ISABELLE_HOME/src;
wenzelm
parents: 4179
diff changeset
    20
use "$ISABELLE_HOME/src/Provers/classical.ML";
d7573d6d0513 refer to $ISABELLE_HOME/src;
wenzelm
parents: 4179
diff changeset
    21
use "$ISABELLE_HOME/src/Provers/blast.ML";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2237
diff changeset
    23
use_thy "IFOL";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
2866
0a648ebbf6d4 Now loads blast.ML
paulson
parents: 2469
diff changeset
    25
(** Applying HypsubstFun to generate hyp_subst_tac **)
0
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!*)
4179
cc4b6791d5dc hyp_subst_tac checks if the equality has type variables and uses a suitable
paulson
parents: 4096
diff changeset
    30
  fun dest_eq (Const("Trueprop",_) $ (Const("op =",T)  $ t $ u)) = 
cc4b6791d5dc hyp_subst_tac checks if the equality has type variables and uses a suitable
paulson
parents: 4096
diff changeset
    31
	(t, u, domain_type T)
1004
70676af0ac97 Set up for new hyp_subst_tac.
lcp
parents: 731
diff changeset
    32
  val eq_reflection = eq_reflection
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
  val imp_intr = impI
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
  val rev_mp = rev_mp
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
  val subst = subst
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
  val sym = sym
4223
f60e3d2c81d3 added thin_refl to hyp_subst_tac
oheimb
parents: 4222
diff changeset
    37
  val thin_refl = prove_goal IFOL.thy 
f60e3d2c81d3 added thin_refl to hyp_subst_tac
oheimb
parents: 4222
diff changeset
    38
		  "!!X. [|x=x; PROP W|] ==> PROP W" (K [atac 1]);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
  end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
structure Hypsubst = HypsubstFun(Hypsubst_Data);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
open Hypsubst;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2237
diff changeset
    44
97
dd350da66c2c renamed int-prover.ML to intprover.ML,
clasohm
parents: 72
diff changeset
    45
use "intprover.ML";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2237
diff changeset
    47
use_thy "FOL";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
4096
8cdf672a83e8 moved cladata.ML, simpdata.ML to ROOT.ML;
wenzelm
parents: 4024
diff changeset
    49
use "cladata.ML";
8cdf672a83e8 moved cladata.ML, simpdata.ML to ROOT.ML;
wenzelm
parents: 4024
diff changeset
    50
use "simpdata.ML";
8cdf672a83e8 moved cladata.ML, simpdata.ML to ROOT.ML;
wenzelm
parents: 4024
diff changeset
    51
1523
7513fbe502fb changed prove_goal to qed_goal
paulson
parents: 1459
diff changeset
    52
qed_goal "ex1_functional" FOL.thy
666
4d9f6d83c2bf FOL/ROOT/FOL_dup_cs: removed as obsolete
lcp
parents: 393
diff changeset
    53
    "!!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
    54
 (fn _ => [ (deepen_tac FOL_cs 0 1) ]);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    56
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
print_depth 8;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    58
1459
d12da312eff4 expanded tabs
clasohm
parents: 1356
diff changeset
    59
val FOL_build_completed = ();   (*indicate successful build*)