src/HOL/Prod.ML
author nipkow
Tue, 05 Jan 1999 17:27:59 +0100
changeset 6059 aa00e235ea27
parent 6016 797c76d6ff04
child 6394 3d9fd50fcc43
permissions -rw-r--r--
In Main: moved Bin to the left to preserve the solver in its simpset.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1454
diff changeset
     1
(*  Title:      HOL/prod
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1454
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1991  University of Cambridge
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     5
5810
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
     6
Ordered Pairs, the Cartesian product type, the unit type
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     7
*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     8
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     9
(*This counts as a non-emptiness result for admitting 'a * 'b as a type*)
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
    10
Goalw [Prod_def] "Pair_Rep a b : Prod";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    11
by (EVERY1 [rtac CollectI, rtac exI, rtac exI, rtac refl]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    12
qed "ProdI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    13
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    14
val [major] = goalw Prod.thy [Pair_Rep_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    15
    "Pair_Rep a b = Pair_Rep a' b' ==> a=a' & b=b'";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    16
by (EVERY1 [rtac (major RS fun_cong RS fun_cong RS subst), 
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1454
diff changeset
    17
            rtac conjI, rtac refl, rtac refl]);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    18
qed "Pair_Rep_inject";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    19
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
    20
Goal "inj_on Abs_Prod Prod";
4830
bd73675adbed Added a few lemmas.
nipkow
parents: 4828
diff changeset
    21
by (rtac inj_on_inverseI 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    22
by (etac Abs_Prod_inverse 1);
4830
bd73675adbed Added a few lemmas.
nipkow
parents: 4828
diff changeset
    23
qed "inj_on_Abs_Prod";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    24
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 5303
diff changeset
    25
val prems = Goalw [Pair_def]
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
    26
    "[| (a, b) = (a',b');  [| a=a';  b=b' |] ==> R |] ==> R";
4830
bd73675adbed Added a few lemmas.
nipkow
parents: 4828
diff changeset
    27
by (rtac (inj_on_Abs_Prod RS inj_onD RS Pair_Rep_inject RS conjE) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    28
by (REPEAT (ares_tac (prems@[ProdI]) 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    29
qed "Pair_inject";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    30
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
    31
Goal "((a,b) = (a',b')) = (a=a' & b=b')";
4089
96fba19bcbe2 isatool fixclasimp;
wenzelm
parents: 3919
diff changeset
    32
by (blast_tac (claset() addSEs [Pair_inject]) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    33
qed "Pair_eq";
3429
nipkow
parents: 2935
diff changeset
    34
AddIffs [Pair_eq];
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    35
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
    36
Goalw [fst_def] "fst((a,b)) = a";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
    37
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    38
qed "fst_conv";
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
    39
Goalw [snd_def] "snd((a,b)) = b";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
    40
by (Blast_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    41
qed "snd_conv";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
    42
Addsimps [fst_conv, snd_conv];
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    43
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
    44
Goalw [Pair_def] "? x y. p = (x,y)";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    45
by (rtac (rewrite_rule [Prod_def] Rep_Prod RS CollectE) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    46
by (EVERY1[etac exE, etac exE, rtac exI, rtac exI,
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1454
diff changeset
    47
           rtac (Rep_Prod_inverse RS sym RS trans),  etac arg_cong]);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    48
qed "PairE_lemma";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    49
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 5303
diff changeset
    50
val [prem] = Goal "[| !!x y. p = (x,y) ==> Q |] ==> Q";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    51
by (rtac (PairE_lemma RS exE) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    52
by (REPEAT (eresolve_tac [prem,exE] 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    53
qed "PairE";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    54
4819
ef2e8e2a10e1 improved pair_tac to call prune_params_tac afterwards
oheimb
parents: 4799
diff changeset
    55
fun pair_tac s = EVERY' [res_inst_tac [("p",s)] PairE, hyp_subst_tac,
ef2e8e2a10e1 improved pair_tac to call prune_params_tac afterwards
oheimb
parents: 4799
diff changeset
    56
			 K prune_params_tac];
4134
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
    57
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    58
(* Do not add as rewrite rule: invalidates some proofs in IMP *)
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
    59
Goal "p = (fst(p),snd(p))";
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    60
by (pair_tac "p" 1);
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    61
by (Asm_simp_tac 1);
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    62
qed "surjective_pairing";
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    63
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    64
val surj_pair = prove_goal Prod.thy "? x y. z = (x, y)" (K [
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    65
	rtac exI 1, rtac exI 1, rtac surjective_pairing 1]);
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    66
Addsimps [surj_pair];
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    67
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    68
5699
5b9a359e083c split_paired_all.ML;
wenzelm
parents: 5553
diff changeset
    69
bind_thm ("split_paired_all",
5b9a359e083c split_paired_all.ML;
wenzelm
parents: 5553
diff changeset
    70
  SplitPairedAll.rule (standard (surjective_pairing RS eq_reflection)));
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    71
(*
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    72
Addsimps [split_paired_all] does not work with simplifier 
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    73
because it also affects premises in congrence rules, 
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    74
where is can lead to premises of the form !!a b. ... = ?P(a,b)
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    75
which cannot be solved by reflexivity.
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    76
*)
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    77
1301
42782316d510 Added various thms and tactics.
nipkow
parents: 1264
diff changeset
    78
(* replace parameters of product type by individual component parameters *)
42782316d510 Added various thms and tactics.
nipkow
parents: 1264
diff changeset
    79
local
4819
ef2e8e2a10e1 improved pair_tac to call prune_params_tac afterwards
oheimb
parents: 4799
diff changeset
    80
  fun is_pair (_,Type("*",_)) = true
ef2e8e2a10e1 improved pair_tac to call prune_params_tac afterwards
oheimb
parents: 4799
diff changeset
    81
    | is_pair  _              = false;
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    82
  fun exists_paired_all prem  = exists is_pair (Logic.strip_params prem);
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    83
  val split_tac = full_simp_tac (HOL_basic_ss addsimps [split_paired_all]);
1301
42782316d510 Added various thms and tactics.
nipkow
parents: 1264
diff changeset
    84
in
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    85
val split_all_tac = SUBGOAL (fn (prem,i) => 
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    86
    if exists_paired_all prem then split_tac i else no_tac);  
1301
42782316d510 Added various thms and tactics.
nipkow
parents: 1264
diff changeset
    87
end;
42782316d510 Added various thms and tactics.
nipkow
parents: 1264
diff changeset
    88
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    89
claset_ref() := claset() addSWrapper ("split_all_tac", 
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
    90
				      fn tac2 => split_all_tac ORELSE' tac2);
3568
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
    91
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
    92
Goal "(!x. P x) = (!a b. P(a,b))";
4650
91af1ef45d68 added split_all_tac to claset()
oheimb
parents: 4534
diff changeset
    93
by (Fast_tac 1);
1301
42782316d510 Added various thms and tactics.
nipkow
parents: 1264
diff changeset
    94
qed "split_paired_All";
3568
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
    95
Addsimps [split_paired_All];
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
    96
(* AddIffs is not a good idea because it makes Blast_tac loop *)
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
    97
5715
5fc697ad232b Added theorem prod_induct (needed for rep_datatype).
berghofe
parents: 5699
diff changeset
    98
bind_thm ("prod_induct",
5fc697ad232b Added theorem prod_induct (needed for rep_datatype).
berghofe
parents: 5699
diff changeset
    99
  allI RS (allI RS (split_paired_All RS iffD2)) RS spec);
5fc697ad232b Added theorem prod_induct (needed for rep_datatype).
berghofe
parents: 5699
diff changeset
   100
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   101
Goal "(? x. P x) = (? a b. P(a,b))";
4650
91af1ef45d68 added split_all_tac to claset()
oheimb
parents: 4534
diff changeset
   102
by (Fast_tac 1);
3568
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
   103
qed "split_paired_Ex";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   104
Addsimps [split_paired_Ex];
1301
42782316d510 Added various thms and tactics.
nipkow
parents: 1264
diff changeset
   105
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   106
Goalw [split_def] "split c (a,b) = c a b";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   107
by (Simp_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   108
qed "split";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   109
Addsimps [split];
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   110
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   111
Goal "split Pair p = p";
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
   112
by (pair_tac "p" 1);
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
   113
by (Simp_tac 1);
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
   114
qed "split_Pair";
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
   115
(*unused: val surjective_pairing2 = split_Pair RS sym;*)
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
   116
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   117
Goal "!!s t. (s=t) = (fst(s)=fst(t) & snd(s)=snd(t))";
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
   118
by (split_all_tac 1);
1264
3eb91524b938 added local simpsets; removed IOA from 'make test'
clasohm
parents: 972
diff changeset
   119
by (Asm_simp_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   120
qed "Pair_fst_snd_eq";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   121
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   122
(*Prevents simplification of c: much faster*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   123
qed_goal "split_weak_cong" Prod.thy
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   124
  "p=q ==> split c p = split c q"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   125
  (fn [prem] => [rtac (prem RS arg_cong) 1]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   126
1655
5be64540f275 Added a number of lemmas
nipkow
parents: 1642
diff changeset
   127
qed_goal "split_eta" Prod.thy "(%(x,y). f(x,y)) = f"
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   128
  (K [rtac ext 1, split_all_tac 1, rtac split 1]);
1655
5be64540f275 Added a number of lemmas
nipkow
parents: 1642
diff changeset
   129
4989
857dabe71d72 added split_etas
oheimb
parents: 4830
diff changeset
   130
qed_goal "cond_split_eta" Prod.thy 
857dabe71d72 added split_etas
oheimb
parents: 4830
diff changeset
   131
	"!!f. (!!x y. f x y = g(x,y)) ==> (%(x,y). f x y) = g"
857dabe71d72 added split_etas
oheimb
parents: 4830
diff changeset
   132
  (K [asm_simp_tac (simpset() addsimps [split_eta]) 1]);
5294
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   133
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   134
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   135
(*simplification procedure for cond_split_eta. 
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   136
  using split_eta a rewrite rule is not general enough, and using 
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   137
  cond_split_eta directly would render some existing proofs very inefficient*)
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   138
local
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   139
  val split_eta_pat = Thm.read_cterm (sign_of thy) 
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   140
		("split (%x. split (%y. f x y))", HOLogic.termTVar);
5553
ae42b36a50c2 renamed mk_meta_eq to mk_eq
oheimb
parents: 5361
diff changeset
   141
  val split_eta_meta_eq = standard (mk_meta_eq cond_split_eta);
5294
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   142
  fun  Pair_pat 0      (Bound 0) = true
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   143
  |    Pair_pat k      (Const ("Pair",  _) $ Bound m $ t) = 
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   144
			m = k andalso Pair_pat (k-1) t
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   145
  |    Pair_pat _ _ = false;
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   146
  fun split_pat k (Abs  (_, _, f $ 
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   147
			(Const ("Pair",_) $ Bound m $ 
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   148
			(Const ("Pair",_) $ Bound n $ t)))) =
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   149
			if m = k andalso n = k-1 andalso Pair_pat (k-2) t
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   150
			then Some f else None
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   151
  |   split_pat k (Const ("split", _) $ Abs (_, _, t)) = split_pat (k+1) t
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   152
  |   split_pat k _ = None;
5361
1c6f72351075 debugged split_eta_proc
oheimb
parents: 5316
diff changeset
   153
  fun proc sg _	(s as
5294
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   154
	(Const ("split", _) $ Abs (_, _, 
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   155
	(Const ("split", _) $ Abs (_, _, t))))) = (case split_pat 2 t of
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   156
	  Some f => (let val fvar = Free ("f", fastype_of f);
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   157
			 fun atom_fun t = if t = f then fvar else atom t
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   158
			 and atom     (Abs (x, T, t)) = Abs (x, T,atom_fun t)
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   159
			   | atom     (t $ u)         = atom_fun t $ atom_fun u
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   160
			   | atom     x               = x;
5361
1c6f72351075 debugged split_eta_proc
oheimb
parents: 5316
diff changeset
   161
			 val ct   = cterm_of sg (HOLogic.mk_Trueprop
5294
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   162
				   (HOLogic.mk_eq (atom_fun s,fvar)));
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   163
			 val ss   = HOL_basic_ss addsimps [cond_split_eta];
5553
ae42b36a50c2 renamed mk_meta_eq to mk_eq
oheimb
parents: 5361
diff changeset
   164
         in Some (mk_meta_eq (prove_goalw_cterm [] ct (K [simp_tac ss 1]))) end)
5294
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   165
	| None => None)
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   166
  |   proc _ _ _ = None;
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   167
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   168
in
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   169
  val split_eta_proc = Simplifier.mk_simproc "split_eta" [split_eta_pat] proc;
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   170
end;
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   171
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   172
Addsimprocs [split_eta_proc];
a84dd70e9925 replaced split_etas by split_eta_proc
oheimb
parents: 5278
diff changeset
   173
4989
857dabe71d72 added split_etas
oheimb
parents: 4830
diff changeset
   174
4819
ef2e8e2a10e1 improved pair_tac to call prune_params_tac afterwards
oheimb
parents: 4799
diff changeset
   175
qed_goal "split_beta" Prod.thy "(%(x,y). P x y) z = P (fst z) (snd z)"
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   176
	(K [stac surjective_pairing 1, stac split 1, rtac refl 1]);
4134
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
   177
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   178
(*For use with split_tac and the simplifier*)
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   179
Goal "R (split c p) = (! x y. p = (x,y) --> R (c x y))";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   180
by (stac surjective_pairing 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   181
by (stac split 1);
2935
998cb95fdd43 Yet more fast_tac->blast_tac, and other tidying
paulson
parents: 2886
diff changeset
   182
by (Blast_tac 1);
4830
bd73675adbed Added a few lemmas.
nipkow
parents: 4828
diff changeset
   183
qed "split_split";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   184
3568
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
   185
(* could be done after split_tac has been speeded up significantly:
4830
bd73675adbed Added a few lemmas.
nipkow
parents: 4828
diff changeset
   186
simpset_ref() := simpset() addsplits [split_split];
3568
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
   187
   precompute the constants involved and don't do anything unless
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
   188
   the current goal contains one of those constants
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
   189
*)
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
   190
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   191
Goal "R (split c p) = (~(? x y. p = (x,y) & (~R (c x y))))";
4830
bd73675adbed Added a few lemmas.
nipkow
parents: 4828
diff changeset
   192
by (stac split_split 1);
4435
41a7e4f0e957 added expand_split_asm
oheimb
parents: 4423
diff changeset
   193
by (Simp_tac 1);
41a7e4f0e957 added expand_split_asm
oheimb
parents: 4423
diff changeset
   194
qed "expand_split_asm";
41a7e4f0e957 added expand_split_asm
oheimb
parents: 4423
diff changeset
   195
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   196
(** split used as a logical connective or set former **)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   197
2935
998cb95fdd43 Yet more fast_tac->blast_tac, and other tidying
paulson
parents: 2886
diff changeset
   198
(*These rules are for use with blast_tac.
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   199
  Could instead call simp_tac/asm_full_simp_tac using split as rewrite.*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   200
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   201
Goal "!!p. [| !!a b. p=(a,b) ==> c a b |] ==> split c p";
1552
6f71b5d46700 Ran expandshort
paulson
parents: 1515
diff changeset
   202
by (split_all_tac 1);
1454
d0266c81a85e Streamlined defs in Relation and added new intro/elim rules to do with
nipkow
parents: 1301
diff changeset
   203
by (Asm_simp_tac 1);
d0266c81a85e Streamlined defs in Relation and added new intro/elim rules to do with
nipkow
parents: 1301
diff changeset
   204
qed "splitI2";
d0266c81a85e Streamlined defs in Relation and added new intro/elim rules to do with
nipkow
parents: 1301
diff changeset
   205
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5132
diff changeset
   206
Goal "c a b ==> split c (a,b)";
1264
3eb91524b938 added local simpsets; removed IOA from 'make test'
clasohm
parents: 972
diff changeset
   207
by (Asm_simp_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   208
qed "splitI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   209
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 5303
diff changeset
   210
val prems = Goalw [split_def]
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   211
    "[| split c p;  !!x y. [| p = (x,y);  c x y |] ==> Q |] ==> Q";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   212
by (REPEAT (resolve_tac (prems@[surjective_pairing]) 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   213
qed "splitE";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   214
4134
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
   215
val splitE2 = prove_goal Prod.thy 
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
   216
"[|Q (split P z); !!x y. [|z = (x, y); Q (P x y)|] ==> R|] ==> R" (fn prems => [
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
   217
	REPEAT (resolve_tac (prems@[surjective_pairing]) 1),
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
   218
	rtac (split_beta RS subst) 1,
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
   219
	rtac (hd prems) 1]);
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
   220
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5132
diff changeset
   221
Goal "split R (a,b) ==> R a b";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   222
by (etac (split RS iffD1) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   223
qed "splitD";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   224
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5132
diff changeset
   225
Goal "z: c a b ==> z: split c (a,b)";
1264
3eb91524b938 added local simpsets; removed IOA from 'make test'
clasohm
parents: 972
diff changeset
   226
by (Asm_simp_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   227
qed "mem_splitI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   228
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   229
Goal "!!p. [| !!a b. p=(a,b) ==> z: c a b |] ==> z: split c p";
1552
6f71b5d46700 Ran expandshort
paulson
parents: 1515
diff changeset
   230
by (split_all_tac 1);
1454
d0266c81a85e Streamlined defs in Relation and added new intro/elim rules to do with
nipkow
parents: 1301
diff changeset
   231
by (Asm_simp_tac 1);
d0266c81a85e Streamlined defs in Relation and added new intro/elim rules to do with
nipkow
parents: 1301
diff changeset
   232
qed "mem_splitI2";
d0266c81a85e Streamlined defs in Relation and added new intro/elim rules to do with
nipkow
parents: 1301
diff changeset
   233
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 5303
diff changeset
   234
val prems = Goalw [split_def]
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   235
    "[| z: split c p;  !!x y. [| p = (x,y);  z: c x y |] ==> Q |] ==> Q";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   236
by (REPEAT (resolve_tac (prems@[surjective_pairing]) 1));
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   237
qed "mem_splitE";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   238
2856
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   239
AddSIs [splitI, splitI2, mem_splitI, mem_splitI2];
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   240
AddSEs [splitE, mem_splitE];
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   241
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   242
(* allows simplifications of nested splits in case of independent predicates *)
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   243
Goal "(%(a,b). P & Q a b) = (%ab. P & split Q ab)";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   244
by (rtac ext 1);
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   245
by (Blast_tac 1);
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   246
qed "split_part";
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   247
Addsimps [split_part];
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   248
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   249
Goal "(@(x',y'). x = x' & y = y') = (x,y)";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   250
by (Blast_tac 1);
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   251
qed "Eps_split_eq";
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   252
Addsimps [Eps_split_eq];
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   253
(*
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   254
the following  would be slightly more general, 
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   255
but cannot be used as rewrite rule:
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   256
### Cannot add premise as rewrite rule because it contains (type) unknowns:
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   257
### ?y = .x
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5132
diff changeset
   258
Goal "[| P y; !!x. P x ==> x = y |] ==> (@(x',y). x = x' & P y) = (x,y)";
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   259
by (rtac select_equality 1);
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   260
by ( Simp_tac 1);
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   261
by (split_all_tac 1);
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   262
by (Asm_full_simp_tac 1);
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   263
qed "Eps_split_eq";
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   264
*)
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   265
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   266
(*** prod_fun -- action of the product functor upon functions ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   267
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   268
Goalw [prod_fun_def] "prod_fun f g (a,b) = (f(a),g(b))";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   269
by (rtac split 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   270
qed "prod_fun";
4521
c7f56322a84b Tidied by adding more default simprules
paulson
parents: 4435
diff changeset
   271
Addsimps [prod_fun];
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   272
5278
a903b66822e2 even more tidying of Goal commands
paulson
parents: 5144
diff changeset
   273
Goal "prod_fun (f1 o f2) (g1 o g2) = ((prod_fun f1 g1) o (prod_fun f2 g2))";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   274
by (rtac ext 1);
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
   275
by (pair_tac "x" 1);
4521
c7f56322a84b Tidied by adding more default simprules
paulson
parents: 4435
diff changeset
   276
by (Asm_simp_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   277
qed "prod_fun_compose";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   278
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   279
Goal "prod_fun (%x. x) (%y. y) = (%z. z)";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   280
by (rtac ext 1);
4828
ee3317896a47 improved split_all_tac significantly
oheimb
parents: 4819
diff changeset
   281
by (pair_tac "z" 1);
4521
c7f56322a84b Tidied by adding more default simprules
paulson
parents: 4435
diff changeset
   282
by (Asm_simp_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   283
qed "prod_fun_ident";
4521
c7f56322a84b Tidied by adding more default simprules
paulson
parents: 4435
diff changeset
   284
Addsimps [prod_fun_ident];
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   285
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 5303
diff changeset
   286
Goal "(a,b):r ==> (f(a),g(b)) : (prod_fun f g)``r";
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   287
by (rtac image_eqI 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   288
by (rtac (prod_fun RS sym) 1);
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 5303
diff changeset
   289
by (assume_tac 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   290
qed "prod_fun_imageI";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   291
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 5303
diff changeset
   292
val major::prems = Goal
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   293
    "[| c: (prod_fun f g)``r;  !!x y. [| c=(f(x),g(y));  (x,y):r |] ==> P  \
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   294
\    |] ==> P";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   295
by (rtac (major RS imageE) 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   296
by (res_inst_tac [("p","x")] PairE 1);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   297
by (resolve_tac prems 1);
2935
998cb95fdd43 Yet more fast_tac->blast_tac, and other tidying
paulson
parents: 2886
diff changeset
   298
by (Blast_tac 2);
4089
96fba19bcbe2 isatool fixclasimp;
wenzelm
parents: 3919
diff changeset
   299
by (blast_tac (claset() addIs [prod_fun]) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   300
qed "prod_fun_imageE";
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   301
5788
e3a98a7c0634 Domain r, Range r replace fst``r, snd``r
paulson
parents: 5761
diff changeset
   302
AddIs  [prod_fun_imageI];
e3a98a7c0634 Domain r, Range r replace fst``r, snd``r
paulson
parents: 5761
diff changeset
   303
AddSEs [prod_fun_imageE];
e3a98a7c0634 Domain r, Range r replace fst``r, snd``r
paulson
parents: 5761
diff changeset
   304
4521
c7f56322a84b Tidied by adding more default simprules
paulson
parents: 4435
diff changeset
   305
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   306
(*** Disjoint union of a family of sets - Sigma ***)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   307
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   308
qed_goalw "SigmaI" Prod.thy [Sigma_def]
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   309
    "[| a:A;  b:B(a) |] ==> (a,b) : Sigma A B"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   310
 (fn prems=> [ (REPEAT (resolve_tac (prems@[singletonI,UN_I]) 1)) ]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   311
2856
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   312
AddSIs [SigmaI];
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   313
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   314
(*The general elimination rule*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   315
qed_goalw "SigmaE" Prod.thy [Sigma_def]
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   316
    "[| c: Sigma A B;  \
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   317
\       !!x y.[| x:A;  y:B(x);  c=(x,y) |] ==> P \
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   318
\    |] ==> P"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   319
 (fn major::prems=>
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   320
  [ (cut_facts_tac [major] 1),
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   321
    (REPEAT (eresolve_tac [UN_E, singletonE] 1 ORELSE ares_tac prems 1)) ]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   322
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   323
(** Elimination of (a,b):A*B -- introduces no eigenvariables **)
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   324
qed_goal "SigmaD1" Prod.thy "(a,b) : Sigma A B ==> a : A"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   325
 (fn [major]=>
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   326
  [ (rtac (major RS SigmaE) 1),
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   327
    (REPEAT (eresolve_tac [asm_rl,Pair_inject,ssubst] 1)) ]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   328
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   329
qed_goal "SigmaD2" Prod.thy "(a,b) : Sigma A B ==> b : B(a)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   330
 (fn [major]=>
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   331
  [ (rtac (major RS SigmaE) 1),
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   332
    (REPEAT (eresolve_tac [asm_rl,Pair_inject,ssubst] 1)) ]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   333
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   334
qed_goal "SigmaE2" Prod.thy
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   335
    "[| (a,b) : Sigma A B;    \
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   336
\       [| a:A;  b:B(a) |] ==> P   \
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   337
\    |] ==> P"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   338
 (fn [major,minor]=>
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   339
  [ (rtac minor 1),
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   340
    (rtac (major RS SigmaD1) 1),
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   341
    (rtac (major RS SigmaD2) 1) ]);
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   342
2856
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   343
AddSEs [SigmaE2, SigmaE];
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   344
5316
7a8975451a89 even more tidying of Goal commands
paulson
parents: 5303
diff changeset
   345
val prems = Goal
1642
21db0cf9a1a4 Using new "Times" infix
paulson
parents: 1618
diff changeset
   346
    "[| A<=C;  !!x. x:A ==> B x <= D x |] ==> Sigma A B <= Sigma C D";
1515
4ed79ebab64d Introduced normalize_thm into HOL.ML
nipkow
parents: 1485
diff changeset
   347
by (cut_facts_tac prems 1);
4089
96fba19bcbe2 isatool fixclasimp;
wenzelm
parents: 3919
diff changeset
   348
by (blast_tac (claset() addIs (prems RL [subsetD])) 1);
1515
4ed79ebab64d Introduced normalize_thm into HOL.ML
nipkow
parents: 1485
diff changeset
   349
qed "Sigma_mono";
4ed79ebab64d Introduced normalize_thm into HOL.ML
nipkow
parents: 1485
diff changeset
   350
1618
372880456b5b Library changes for mutilated checkerboard
paulson
parents: 1552
diff changeset
   351
qed_goal "Sigma_empty1" Prod.thy "Sigma {} B = {}"
2935
998cb95fdd43 Yet more fast_tac->blast_tac, and other tidying
paulson
parents: 2886
diff changeset
   352
 (fn _ => [ (Blast_tac 1) ]);
1618
372880456b5b Library changes for mutilated checkerboard
paulson
parents: 1552
diff changeset
   353
1642
21db0cf9a1a4 Using new "Times" infix
paulson
parents: 1618
diff changeset
   354
qed_goal "Sigma_empty2" Prod.thy "A Times {} = {}"
2935
998cb95fdd43 Yet more fast_tac->blast_tac, and other tidying
paulson
parents: 2886
diff changeset
   355
 (fn _ => [ (Blast_tac 1) ]);
1618
372880456b5b Library changes for mutilated checkerboard
paulson
parents: 1552
diff changeset
   356
372880456b5b Library changes for mutilated checkerboard
paulson
parents: 1552
diff changeset
   357
Addsimps [Sigma_empty1,Sigma_empty2]; 
372880456b5b Library changes for mutilated checkerboard
paulson
parents: 1552
diff changeset
   358
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   359
Goal "((a,b): Sigma A B) = (a:A & b:B(a))";
2935
998cb95fdd43 Yet more fast_tac->blast_tac, and other tidying
paulson
parents: 2886
diff changeset
   360
by (Blast_tac 1);
1618
372880456b5b Library changes for mutilated checkerboard
paulson
parents: 1552
diff changeset
   361
qed "mem_Sigma_iff";
3568
36ff1ab12021 Prod.ML: Added split_paired_EX and lots of comments about failed attempts to
nipkow
parents: 3429
diff changeset
   362
AddIffs [mem_Sigma_iff]; 
1618
372880456b5b Library changes for mutilated checkerboard
paulson
parents: 1552
diff changeset
   363
6016
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   364
Goal "x:C ==> (A Times C <= B Times C) = (A <= B)";
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   365
by (Blast_tac 1);
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   366
qed "Times_subset_cancel2";
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   367
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   368
Goal "x:C ==> (A Times C = B Times C) = (A = B)";
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   369
by (blast_tac (claset() addEs [equalityE]) 1);
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   370
qed "Times_eq_cancel2";
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   371
5810
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   372
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   373
(*** Complex rules for Sigma ***)
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   374
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   375
val Collect_split = prove_goal Prod.thy 
4134
5c6cb2a25816 added several theorems
oheimb
parents: 4089
diff changeset
   376
	"{(a,b). P a & Q b} = Collect P Times Collect Q" (K [Blast_tac 1]);
4534
6932c3ae3912 added select_equality to the implicit claset
oheimb
parents: 4521
diff changeset
   377
Addsimps [Collect_split];
1515
4ed79ebab64d Introduced normalize_thm into HOL.ML
nipkow
parents: 1485
diff changeset
   378
2856
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   379
(*Suggested by Pierre Chartier*)
5278
a903b66822e2 even more tidying of Goal commands
paulson
parents: 5144
diff changeset
   380
Goal "(UN (a,b):(A Times B). E a Times F b) = (UNION A E) Times (UNION B F)";
2935
998cb95fdd43 Yet more fast_tac->blast_tac, and other tidying
paulson
parents: 2886
diff changeset
   381
by (Blast_tac 1);
2856
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   382
qed "UNION_Times_distrib";
cdb908486a96 Reorganization of how classical rules are installed
paulson
parents: 2637
diff changeset
   383
6016
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   384
Goal "(ALL z: Sigma A B. P z) = (ALL x:A. ALL y: B x. P(x,y))";
5810
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   385
by (Fast_tac 1);
6016
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   386
qed "split_paired_Ball_Sigma";
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   387
Addsimps [split_paired_Ball_Sigma];
5810
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   388
6016
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   389
Goal "(EX z: Sigma A B. P z) = (EX x:A. EX y: B x. P(x,y))";
5810
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   390
by (Fast_tac 1);
6016
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   391
qed "split_paired_Bex_Sigma";
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   392
Addsimps [split_paired_Bex_Sigma];
5810
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   393
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   394
Goal "(SIGMA i:I Un J. C(i)) = (SIGMA i:I. C(i)) Un (SIGMA j:J. C(j))";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   395
by (Blast_tac 1);
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   396
qed "Sigma_Un_distrib1";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   397
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   398
Goal "(SIGMA i:I. A(i) Un B(i)) = (SIGMA i:I. A(i)) Un (SIGMA i:I. B(i))";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   399
by (Blast_tac 1);
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   400
qed "Sigma_Un_distrib2";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   401
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   402
Goal "(SIGMA i:I Int J. C(i)) = (SIGMA i:I. C(i)) Int (SIGMA j:J. C(j))";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   403
by (Blast_tac 1);
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   404
qed "Sigma_Int_distrib1";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   405
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   406
Goal "(SIGMA i:I. A(i) Int B(i)) = (SIGMA i:I. A(i)) Int (SIGMA i:I. B(i))";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   407
by (Blast_tac 1);
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   408
qed "Sigma_Int_distrib2";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   409
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   410
Goal "(SIGMA i:I - J. C(i)) = (SIGMA i:I. C(i)) - (SIGMA j:J. C(j))";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   411
by (Blast_tac 1);
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   412
qed "Sigma_Diff_distrib1";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   413
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   414
Goal "(SIGMA i:I. A(i) - B(i)) = (SIGMA i:I. A(i)) - (SIGMA i:I. B(i))";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   415
by (Blast_tac 1);
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   416
qed "Sigma_Diff_distrib2";
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   417
6016
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   418
Goal "Sigma (Union X) B = (UN A:X. Sigma A B)";
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   419
by (Blast_tac 1);
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   420
qed "Sigma_Union";
797c76d6ff04 new (and generalized) theorems about Sigma/Times
paulson
parents: 5810
diff changeset
   421
5810
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   422
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   423
(** Exhaustion rule for unit -- a degenerate form of induction **)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   424
5069
3ea049f7979d isatool fixgoal;
wenzelm
parents: 4989
diff changeset
   425
Goalw [Unity_def]
972
e61b058d58d2 changed syntax of tuples from <..., ...> to (..., ...)
clasohm
parents: 923
diff changeset
   426
    "u = ()";
2886
fd5645efa43d Now: unit = {True}
nipkow
parents: 2880
diff changeset
   427
by (stac (rewrite_rule [unit_def] Rep_unit RS singletonD RS sym) 1);
2880
a0fde30aa126 Removed (Unit) in Prod.
nipkow
parents: 2856
diff changeset
   428
by (rtac (Rep_unit_inverse RS sym) 1);
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   429
qed "unit_eq";
1754
852093aeb0ab Replaced fast_tac by Fast_tac (which uses default claset)
berghofe
parents: 1746
diff changeset
   430
 
5088
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   431
(*simplification procedure for unit_eq.
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   432
  Cannot use this rule directly -- it loops!*)
5083
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   433
local
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   434
  val unit_pat = Thm.cterm_of (sign_of thy) (Free ("x", HOLogic.unitT));
5553
ae42b36a50c2 renamed mk_meta_eq to mk_eq
oheimb
parents: 5361
diff changeset
   435
  val unit_meta_eq = standard (mk_meta_eq unit_eq);
5083
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   436
  fun proc _ _ t =
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   437
    if HOLogic.is_unit t then None
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   438
    else Some unit_meta_eq;
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   439
in
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   440
  val unit_eq_proc = Simplifier.mk_simproc "unit_eq" [unit_pat] proc;
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   441
end;
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   442
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   443
Addsimprocs [unit_eq_proc];
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   444
beb21c000cb1 added unit_eq simplification procedure;
wenzelm
parents: 5069
diff changeset
   445
5761
a396eff81fda Added theorem unit_induct (for rep_datatype).
berghofe
parents: 5715
diff changeset
   446
Goal "P () ==> P x";
a396eff81fda Added theorem unit_induct (for rep_datatype).
berghofe
parents: 5715
diff changeset
   447
by (Simp_tac 1);
a396eff81fda Added theorem unit_induct (for rep_datatype).
berghofe
parents: 5715
diff changeset
   448
qed "unit_induct";
a396eff81fda Added theorem unit_induct (for rep_datatype).
berghofe
parents: 5715
diff changeset
   449
a396eff81fda Added theorem unit_induct (for rep_datatype).
berghofe
parents: 5715
diff changeset
   450
5088
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   451
(*This rewrite counters the effect of unit_eq_proc on (%u::unit. f u),
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   452
  replacing it by f rather than by %u.f(). *)
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   453
Goal "(%u::unit. f()) = f";
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   454
by (rtac ext 1);
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   455
by (Simp_tac 1);
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   456
qed "unit_abs_eta_conv";
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   457
Addsimps [unit_abs_eta_conv];
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   458
e4aa78d1312f New rewrite unit_abs_eta_conv to compensate for unit_eq_proc
paulson
parents: 5083
diff changeset
   459
5096
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   460
(*Attempts to remove occurrences of split, and pair-valued parameters*)
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   461
val remove_split = rewrite_rule [split RS eq_reflection] o  
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   462
                   rule_by_tactic (TRYALL split_all_tac);
1746
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   463
5096
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   464
local
1746
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   465
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   466
(*In ap_split S T u, term u expects separate arguments for the factors of S,
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   467
  with result type T.  The call creates a new term expecting one argument
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   468
  of type S.*)
5096
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   469
fun ap_split (Type ("*", [T1, T2])) T3 u = 
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   470
      HOLogic.split_const (T1, T2, T3) $ 
1746
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   471
      Abs("v", T1, 
2031
03a843f0f447 Ran expandshort
paulson
parents: 1754
diff changeset
   472
          ap_split T2 T3
5096
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   473
             ((ap_split T1 (HOLogic.prodT_factors T2 ---> T3) (incr_boundvars 1 u)) $ 
2031
03a843f0f447 Ran expandshort
paulson
parents: 1754
diff changeset
   474
              Bound 0))
1746
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   475
  | ap_split T T3 u = u;
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   476
5096
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   477
(*Curries any Var of function type in the rule*)
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   478
fun split_rule_var' (t as Var (v, Type ("fun", [T1, T2])), rl) =
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   479
      let val T' = HOLogic.prodT_factors T1 ---> T2
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   480
          val newt = ap_split T1 T2 (Var (v, T'))
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   481
          val cterm = Thm.cterm_of (#sign (rep_thm rl))
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   482
      in
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   483
          instantiate ([], [(cterm t, cterm newt)]) rl
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   484
      end
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   485
  | split_rule_var' (t, rl) = rl;
1746
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   486
5096
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   487
in
1746
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   488
5096
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   489
val split_rule_var = standard o remove_split o split_rule_var';
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   490
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   491
(*Curries ALL function variables occurring in a rule's conclusion*)
84b00be693b4 Moved most of the Prod_Syntax - stuff to HOLogic.
berghofe
parents: 5088
diff changeset
   492
fun split_rule rl = remove_split (foldr split_rule_var' (term_vars (concl_of rl), rl))
1746
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   493
                    |> standard;
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   494
f0c6aabc6c02 Moved split_rule et al from ind_syntax.ML to Prod.ML.
nipkow
parents: 1727
diff changeset
   495
end;
5810
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   496
829cae93f132 new TIMES/Sigma rules
paulson
parents: 5788
diff changeset
   497