src/FOL/cladata.ML
author wenzelm
Mon, 02 Aug 1999 18:10:26 +0200
changeset 7156 3e84e73a3b6a
parent 5929 890f2f9b926d
child 7355 4c43090659ca
permissions -rw-r--r--
fixed Blast_Data;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     1
(*  Title:      FOL/cladata.ML
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     2
    ID:         $Id$
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     3
    Author:     Tobias Nipkow
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     4
    Copyright   1996  University of Cambridge
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     5
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     6
Setting up the classical reasoner 
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     7
*)
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     8
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
     9
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    10
section "Classical Reasoner";
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    11
2844
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    12
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    13
(*** Applying ClassicalFun to create a classical prover ***)
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    14
structure Classical_Data = 
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    15
  struct
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    16
  val sizef     = size_of_thm
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    17
  val mp        = mp
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    18
  val not_elim  = notE
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    19
  val classical = classical
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    20
  val hyp_subst_tacs=[hyp_subst_tac]
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    21
  end;
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    22
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    23
structure Cla = ClassicalFun(Classical_Data);
5929
890f2f9b926d blast: cla_method';
wenzelm
parents: 4653
diff changeset
    24
structure BasicClassical: BASIC_CLASSICAL = Cla;
890f2f9b926d blast: cla_method';
wenzelm
parents: 4653
diff changeset
    25
open BasicClassical;
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    26
2844
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    27
(*Better for fast_tac: needs no quantifier duplication!*)
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    28
qed_goal "alt_ex1E" IFOL.thy
3835
9a5a4e123859 fixed dots;
wenzelm
parents: 3610
diff changeset
    29
    "[| EX! x. P(x);                                              \
2844
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    30
\       !!x. [| P(x);  ALL y y'. P(y) & P(y') --> y=y' |] ==> R  \
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    31
\    |] ==> R"
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    32
 (fn major::prems =>
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    33
  [ (rtac (major RS ex1E) 1),
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    34
    (REPEAT (ares_tac (allI::prems) 1)),
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    35
    (etac (dup_elim allE) 1),
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    36
    (IntPr.fast_tac 1)]);
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    37
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    38
4305
03d7de40ee4f The change from iffE to iffCE means fewer case splits in most cases. Very few
paulson
parents: 4095
diff changeset
    39
(*Propositional rules*)
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    40
val prop_cs = empty_cs addSIs [refl,TrueI,conjI,disjCI,impI,notI,iffI] 
4305
03d7de40ee4f The change from iffE to iffCE means fewer case splits in most cases. Very few
paulson
parents: 4095
diff changeset
    41
                       addSEs [conjE,disjE,impCE,FalseE,iffCE];
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    42
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    43
(*Quantifier rules*)
2844
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    44
val FOL_cs = prop_cs addSIs [allI,ex_ex1I] addIs [exI] 
05d78159812d Now uses the alternative (safe!) rules for ex1
paulson
parents: 2469
diff changeset
    45
                     addSEs [exE,alt_ex1E] addEs [allE];
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    46
4095
6fd0f439e50e adapted to new implicit claset;
wenzelm
parents: 3835
diff changeset
    47
claset_ref() := FOL_cs;
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents:
diff changeset
    48
3610
7e5300420b03 Moved functions from file "thy_data.ML".
berghofe
parents: 2867
diff changeset
    49
2867
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    50
(*** Applying BlastFun to create Blast_tac ***)
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    51
structure Blast_Data = 
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    52
  struct
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    53
  type claset	= Cla.claset
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    54
  val notE	= notE
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    55
  val ccontr	= ccontr
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    56
  val contr_tac = Cla.contr_tac
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    57
  val dup_intr	= Cla.dup_intr
4466
305390f23734 Better equality handling in Blast_tac, usingd a new variant of hyp_subst_tac
paulson
parents: 4305
diff changeset
    58
  val hyp_subst_tac = Hypsubst.blast_hyp_subst_tac
2867
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    59
  val claset	= Cla.claset
4653
d60f76680bf4 renamed rep_claset to rep_cs
oheimb
parents: 4466
diff changeset
    60
  val rep_cs    = Cla.rep_cs
7156
3e84e73a3b6a fixed Blast_Data;
wenzelm
parents: 5929
diff changeset
    61
  val cla_modifiers = Cla.cla_modifiers;
3e84e73a3b6a fixed Blast_Data;
wenzelm
parents: 5929
diff changeset
    62
  val cla_meth' = Cla.cla_meth'
2867
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    63
  end;
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    64
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    65
structure Blast = BlastFun(Blast_Data);
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    66
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    67
val Blast_tac = Blast.Blast_tac
0aa5a3cd4550 Now builds blast_tac
paulson
parents: 2844
diff changeset
    68
and blast_tac = Blast.blast_tac;