src/HOL/Induct/Comb.ML
author paulson
Wed, 07 May 1997 12:50:26 +0200
changeset 3120 c58423c20740
child 3207 fe79ad367d77
permissions -rw-r--r--
New directory to contain examples of (co)inductive definitions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3120
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     1
(*  Title:      HOL/ex/comb.ML
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     2
    ID:         $Id$
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     4
    Copyright   1996  University of Cambridge
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     5
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     6
Combinatory Logic example: the Church-Rosser Theorem
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     7
Curiously, combinators do not include free variables.
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     8
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
     9
Example taken from
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    10
    J. Camilleri and T. F. Melham.
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    11
    Reasoning with Inductively Defined Relations in the HOL Theorem Prover.
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    12
    Report 265, University of Cambridge Computer Laboratory, 1992.
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    13
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    14
HOL system proofs may be found in
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    15
/usr/groups/theory/hvg-aftp/contrib/rule-induction/cl.ml
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    16
*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    17
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    18
open Comb;
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    19
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    20
(*** Reflexive/Transitive closure preserves the Church-Rosser property 
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    21
     So does the Transitive closure; use r_into_trancl instead of rtrancl_refl
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    22
***)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    23
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    24
val [_, spec_mp] = [spec] RL [mp];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    25
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    26
(*Strip lemma.  The induction hyp is all but the last diamond of the strip.*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    27
goalw Comb.thy [diamond_def]
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    28
    "!!r. [| diamond(r);  (x,y):r^* |] ==> \ 
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    29
\         ALL y'. (x,y'):r --> (EX z. (y',z): r^* & (y,z): r)";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    30
by (etac rtrancl_induct 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    31
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    32
by (slow_best_tac (set_cs addIs [r_into_rtrancl RSN (2, rtrancl_trans)]
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    33
                           addSDs [spec_mp]) 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    34
val diamond_strip_lemmaE = result() RS spec RS mp RS exE;
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    35
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    36
val [major] = goal Comb.thy "diamond(r) ==> diamond(r^*)";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    37
by (rewtac diamond_def);  (*unfold only in goal, not in premise!*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    38
by (rtac (impI RS allI RS allI) 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    39
by (etac rtrancl_induct 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    40
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    41
by (slow_best_tac  (*Seems to be a brittle, undirected search*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    42
    (set_cs addIs [r_into_rtrancl RSN (2, rtrancl_trans)]
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    43
            addEs [major RS diamond_strip_lemmaE]) 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    44
qed "diamond_rtrancl";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    45
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    46
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    47
(*** Results about Contraction ***)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    48
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    49
(*Derive a case for each combinator constructor*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    50
val K_contractE = contract.mk_cases comb.simps "K -1-> z";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    51
val S_contractE = contract.mk_cases comb.simps "S -1-> z";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    52
val Ap_contractE = contract.mk_cases comb.simps "x#y -1-> z";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    53
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    54
AddSIs [contract.K, contract.S];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    55
AddIs  [contract.Ap1, contract.Ap2];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    56
AddSEs [K_contractE, S_contractE, Ap_contractE];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    57
Unsafe_Addss  (!simpset);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    58
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    59
goalw Comb.thy [I_def] "!!z. I -1-> z ==> P";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    60
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    61
qed "I_contract_E";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    62
AddSEs [I_contract_E];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    63
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    64
goal Comb.thy "!!x z. K#x -1-> z ==> (EX x'. z = K#x' & x -1-> x')";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    65
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    66
qed "K1_contractD";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    67
AddSEs [K1_contractD];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    68
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    69
goal Comb.thy "!!x z. x ---> y ==> x#z ---> y#z";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    70
by (etac rtrancl_induct 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    71
by (ALLGOALS (blast_tac (!claset addIs [r_into_rtrancl, rtrancl_trans])));
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    72
qed "Ap_reduce1";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    73
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    74
goal Comb.thy "!!x z. x ---> y ==> z#x ---> z#y";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    75
by (etac rtrancl_induct 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    76
by (ALLGOALS (blast_tac (!claset addIs [r_into_rtrancl, rtrancl_trans])));
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    77
qed "Ap_reduce2";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    78
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    79
(** Counterexample to the diamond property for -1-> **)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    80
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    81
goal Comb.thy "K#I#(I#I) -1-> I";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    82
by (rtac contract.K 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    83
qed "KIII_contract1";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    84
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    85
goalw Comb.thy [I_def] "K#I#(I#I) -1-> K#I#((K#I)#(K#I))";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    86
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    87
qed "KIII_contract2";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    88
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    89
goal Comb.thy "K#I#((K#I)#(K#I)) -1-> I";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    90
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    91
qed "KIII_contract3";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    92
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    93
goalw Comb.thy [diamond_def] "~ diamond(contract)";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    94
by (blast_tac (!claset addIs [KIII_contract1,KIII_contract2,KIII_contract3]) 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    95
qed "not_diamond_contract";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    96
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    97
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    98
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
    99
(*** Results about Parallel Contraction ***)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   100
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   101
(*Derive a case for each combinator constructor*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   102
val K_parcontractE = parcontract.mk_cases comb.simps "K =1=> z";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   103
val S_parcontractE = parcontract.mk_cases comb.simps "S =1=> z";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   104
val Ap_parcontractE = parcontract.mk_cases comb.simps "x#y =1=> z";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   105
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   106
AddIs  parcontract.intrs;
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   107
AddSEs [K_parcontractE, S_parcontractE,Ap_parcontractE];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   108
Unsafe_Addss  (!simpset);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   109
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   110
(*** Basic properties of parallel contraction ***)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   111
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   112
goal Comb.thy "!!x z. K#x =1=> z ==> (EX x'. z = K#x' & x =1=> x')";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   113
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   114
qed "K1_parcontractD";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   115
AddSDs [K1_parcontractD];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   116
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   117
goal Comb.thy "!!x z. S#x =1=> z ==> (EX x'. z = S#x' & x =1=> x')";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   118
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   119
qed "S1_parcontractD";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   120
AddSDs [S1_parcontractD];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   121
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   122
goal Comb.thy
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   123
 "!!x y z. S#x#y =1=> z ==> (EX x' y'. z = S#x'#y' & x =1=> x' & y =1=> y')";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   124
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   125
qed "S2_parcontractD";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   126
AddSDs [S2_parcontractD];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   127
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   128
(*The rules above are not essential but make proofs much faster*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   129
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   130
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   131
(*Church-Rosser property for parallel contraction*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   132
goalw Comb.thy [diamond_def] "diamond parcontract";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   133
by (rtac (impI RS allI RS allI) 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   134
by (etac parcontract.induct 1 THEN prune_params_tac);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   135
by (Step_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   136
by (ALLGOALS Blast_tac);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   137
qed "diamond_parcontract";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   138
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   139
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   140
(*** Equivalence of x--->y and x===>y ***)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   141
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   142
goal Comb.thy "contract <= parcontract";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   143
by (rtac subsetI 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   144
by (split_all_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   145
by (etac contract.induct 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   146
by (ALLGOALS Blast_tac);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   147
qed "contract_subset_parcontract";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   148
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   149
(*Reductions: simply throw together reflexivity, transitivity and
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   150
  the one-step reductions*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   151
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   152
AddIs [Ap_reduce1, Ap_reduce2, r_into_rtrancl, rtrancl_trans];
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   153
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   154
(*Example only: not used*)
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   155
goalw Comb.thy [I_def] "I#x ---> x";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   156
by (Blast_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   157
qed "reduce_I";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   158
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   159
goal Comb.thy "parcontract <= contract^*";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   160
by (rtac subsetI 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   161
by (split_all_tac 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   162
by (etac parcontract.induct 1 THEN prune_params_tac);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   163
by (ALLGOALS Blast_tac);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   164
qed "parcontract_subset_reduce";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   165
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   166
goal Comb.thy "contract^* = parcontract^*";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   167
by (REPEAT 
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   168
    (resolve_tac [equalityI, 
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   169
                  contract_subset_parcontract RS rtrancl_mono, 
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   170
                  parcontract_subset_reduce RS rtrancl_subset_rtrancl] 1));
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   171
qed "reduce_eq_parreduce";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   172
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   173
goal Comb.thy "diamond(contract^*)";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   174
by (simp_tac (!simpset addsimps [reduce_eq_parreduce, diamond_rtrancl, 
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   175
                                 diamond_parcontract]) 1);
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   176
qed "diamond_reduce";
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   177
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   178
c58423c20740 New directory to contain examples of (co)inductive definitions
paulson
parents:
diff changeset
   179
writeln"Reached end of file.";