src/ZF/indrule.ML
author lcp
Wed, 12 Oct 1994 12:09:54 +0100
changeset 633 9e4d4f3eb812
parent 590 800603278425
child 724 36c0ac2f4935
permissions -rw-r--r--
{HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to solve the goal fully before proceeding {HOL,ZF}/indrule/mutual_ind_tac: ensures that calls to "prem" cannot loop; calls DEPTH_SOLVE_1 instead of REPEAT to solve the goal fully
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title: 	ZF/indrule.ML
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
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
     4
    Copyright   1994  University of Cambridge
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
Induction rule module -- for Inductive/Coinductive Definitions
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
Proves a strong induction rule and a mutual induction rule
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
signature INDRULE =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
  sig
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
  val induct        : thm			(*main induction rule*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
  val mutual_induct : thm			(*mutual induction rule*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
  end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    18
functor Indrule_Fun
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    19
    (structure Inductive: sig include INDUCTIVE_ARG INDUCTIVE_I end
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    20
     and Pr: PR and Intr_elim: INTR_ELIM) : INDRULE  =
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
struct
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    22
open Logic Ind_Syntax Inductive Intr_elim;
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    23
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    24
val sign = sign_of thy;
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
516
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    26
val (Const(_,recT),rec_params) = strip_comb (hd rec_tms);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    27
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    28
val big_rec_name = space_implode "_" rec_names;
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    29
val big_rec_tm = list_comb(Const(big_rec_name,recT), rec_params);
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    30
1957113f0d7d installation of new inductive/datatype sections
lcp
parents: 366
diff changeset
    31
val _ = writeln "  Proving the induction rules...";
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
(*** Prove the main induction rule ***)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
val pred_name = "P";		(*name for predicate variables*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
val big_rec_def::part_rec_defs = Intr_elim.defs;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    38
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
(*Used to make induction rules;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
   ind_alist = [(rec_tm1,pred1),...]  -- associates predicates with rec ops
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
   prem is a premise of an intr rule*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
fun add_induct_prem ind_alist (prem as Const("Trueprop",_) $ 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
		 (Const("op :",_)$t$X), iprems) =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
     (case gen_assoc (op aconv) (ind_alist, X) of
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
	  Some pred => prem :: mk_tprop (pred $ t) :: iprems
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
	| None => (*possibly membership in M(rec_tm), for M monotone*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    47
	    let fun mk_sb (rec_tm,pred) = (rec_tm, Collect_const$rec_tm$pred)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
	    in  subst_free (map mk_sb ind_alist) prem :: iprems  end)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    49
  | add_induct_prem ind_alist (prem,iprems) = prem :: iprems;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    50
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
(*Make a premise of the induction rule.*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
fun induct_prem ind_alist intr =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    53
  let val quantfrees = map dest_Free (term_frees intr \\ rec_params)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
      val iprems = foldr (add_induct_prem ind_alist)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
			 (strip_imp_prems intr,[])
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    56
      val (t,X) = rule_concl intr
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
      val (Some pred) = gen_assoc (op aconv) (ind_alist, X)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    58
      val concl = mk_tprop (pred $ t)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    59
  in list_all_free (quantfrees, list_implies (iprems,concl)) end
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    60
  handle Bind => error"Recursion term not found in conclusion";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
633
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
    62
(*Reduces backtracking by delivering the correct premise to each goal.
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
    63
  Intro rules with extra Vars in premises still cause some backtracking *)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    64
fun ind_tac [] 0 = all_tac
633
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
    65
  | ind_tac(prem::prems) i = 
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
    66
    	DEPTH_SOLVE_1 (ares_tac [Part_eqI, prem, refl] i) THEN
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
    67
	ind_tac prems (i-1);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    68
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    69
val pred = Free(pred_name, iT-->oT);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    70
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    71
val ind_prems = map (induct_prem (map (rpair pred) rec_tms)) intr_tms;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    72
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    73
val quant_induct = 
543
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
    74
    prove_goalw_cterm part_rec_defs 
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
    75
      (cterm_of sign (list_implies (ind_prems, 
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
    76
				    mk_tprop (mk_all_imp(big_rec_tm,pred)))))
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
    77
      (fn prems =>
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    78
       [rtac (impI RS allI) 1,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    79
	etac raw_induct 1,
590
800603278425 {HOL,ZF}/indrule/quant_induct: replaced ssubst in eresolve_tac by
lcp
parents: 543
diff changeset
    80
	REPEAT (FIRSTGOAL (eresolve_tac [CollectE, exE, conjE, disjE] ORELSE'
800603278425 {HOL,ZF}/indrule/quant_induct: replaced ssubst in eresolve_tac by
lcp
parents: 543
diff changeset
    81
			   hyp_subst_tac)),
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    82
	REPEAT (FIRSTGOAL (eresolve_tac [PartE,CollectE])),
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    83
	ind_tac (rev prems) (length prems) ]);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    84
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    85
(*** Prove the simultaneous induction rule ***)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    86
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    87
(*Make distinct predicates for each inductive set*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    88
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    89
(*Sigmas and Cartesian products may nest ONLY to the right!*)
366
5b6e4340085b ZF/indrule/mk_pred_typ: corrected pattern to include Abs, allowing it to
lcp
parents: 0
diff changeset
    90
fun mk_pred_typ (t $ A $ Abs(_,_,B)) = 
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    91
        if t = Pr.sigma  then  iT --> mk_pred_typ B
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    92
                         else  iT --> oT
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    93
  | mk_pred_typ _           =  iT --> oT
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    94
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    95
(*Given a recursive set and its domain, return the "fsplit" predicate
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    96
  and a conclusion for the simultaneous induction rule*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    97
fun mk_predpair (rec_tm,domt) = 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    98
  let val rec_name = (#1 o dest_Const o head_of) rec_tm
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    99
      val T = mk_pred_typ domt
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   100
      val pfree = Free(pred_name ^ "_" ^ rec_name, T)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   101
      val frees = mk_frees "za" (binder_types T)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   102
      val qconcl = 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   103
	foldr mk_all (frees, 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   104
		      imp $ (mem_const $ foldr1 (app Pr.pair) frees $ rec_tm)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   105
			  $ (list_comb (pfree,frees)))
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   106
  in  (ap_split Pr.fsplit_const pfree (binder_types T), 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   107
      qconcl)  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   108
  end;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   109
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   110
val (preds,qconcls) = split_list (map mk_predpair (rec_tms~~domts));
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   111
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   112
(*Used to form simultaneous induction lemma*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   113
fun mk_rec_imp (rec_tm,pred) = 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   114
    imp $ (mem_const $ Bound 0 $ rec_tm) $  (pred $ Bound 0);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   115
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   116
(*To instantiate the main induction rule*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   117
val induct_concl = 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   118
 mk_tprop(mk_all_imp(big_rec_tm,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   119
		     Abs("z", iT, 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   120
			 fold_bal (app conj) 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   121
			          (map mk_rec_imp (rec_tms~~preds)))))
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   122
and mutual_induct_concl = mk_tprop(fold_bal (app conj) qconcls);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   123
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   124
val lemma = (*makes the link between the two induction rules*)
543
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
   125
    prove_goalw_cterm part_rec_defs 
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
   126
	  (cterm_of sign (mk_implies (induct_concl,mutual_induct_concl)))
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
   127
	  (fn prems =>
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   128
	   [cut_facts_tac prems 1,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   129
	    REPEAT (eresolve_tac [asm_rl,conjE,PartE,mp] 1
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   130
	     ORELSE resolve_tac [allI,impI,conjI,Part_eqI] 1
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   131
	     ORELSE dresolve_tac [spec, mp, Pr.fsplitD] 1)]);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   132
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   133
(*Mutual induction follows by freeness of Inl/Inr.*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   134
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   135
(*Removes Collects caused by M-operators in the intro rules*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   136
val cmonos = [subset_refl RS Collect_mono] RL monos RLN (2,[rev_subsetD]);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   137
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   138
(*Avoids backtracking by delivering the correct premise to each goal*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   139
fun mutual_ind_tac [] 0 = all_tac
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   140
  | mutual_ind_tac(prem::prems) i = 
633
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   141
      DETERM
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   142
       (SELECT_GOAL 
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   143
	  ((*unpackage and use "prem" in the corresponding place*)
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   144
	   REPEAT (FIRSTGOAL
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   145
		   (etac conjE ORELSE' eq_mp_tac ORELSE' 
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   146
		    ares_tac [impI, conjI]))
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   147
	   (*prem is not allowed in the REPEAT, lest it loop!*)
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   148
	   THEN TRYALL (rtac prem)
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   149
	   THEN REPEAT
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   150
		  (FIRSTGOAL (ares_tac [impI] ORELSE' 
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   151
			      eresolve_tac (mp::cmonos)))
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   152
	   (*prove remaining goals by contradiction*)
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   153
	   THEN rewrite_goals_tac (con_defs@part_rec_defs)
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   154
	   THEN DEPTH_SOLVE (eresolve_tac (PartE :: sumprod_free_SEs) 1))
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   155
	  i)
9e4d4f3eb812 {HOL,ZF}/indrule/ind_tac: now calls DEPTH_SOLVE_1 instead of REPEAT, to
lcp
parents: 590
diff changeset
   156
       THEN mutual_ind_tac prems (i-1);
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   157
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   158
val mutual_induct_fsplit = 
543
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
   159
    prove_goalw_cterm []
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
   160
	  (cterm_of sign
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
   161
	   (list_implies (map (induct_prem (rec_tms~~preds)) intr_tms,
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
   162
			  mutual_induct_concl)))
e961b2092869 ZF/ind_syntax/unvarifyT, unvarify: moved to Pure/logic.ML
lcp
parents: 516
diff changeset
   163
	  (fn prems =>
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   164
	   [rtac (quant_induct RS lemma) 1,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   165
	    mutual_ind_tac (rev prems) (length prems)]);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   166
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   167
(*Attempts to remove all occurrences of fsplit*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   168
val fsplit_tac =
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   169
    REPEAT (SOMEGOAL (FIRST' [rtac Pr.fsplitI, 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   170
			      dtac Pr.fsplitD,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   171
			      etac Pr.fsplitE,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   172
			      bound_hyp_subst_tac]))
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   173
    THEN prune_params_tac;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   174
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   175
(*strip quantifier*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   176
val induct = standard (quant_induct RS spec RSN (2,rev_mp));
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   177
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   178
val mutual_induct = rule_by_tactic fsplit_tac mutual_induct_fsplit;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   179
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   180
end;