src/HOL/MiniML/I.ML
author nipkow
Wed, 22 May 1996 17:11:54 +0200
changeset 1757 f7a573c46611
parent 1751 946efd210837
child 2031 03a843f0f447
permissions -rw-r--r--
Added the second half of the W/I correspondence.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
     1
open I;
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
     2
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
     3
goal thy
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
     4
  "! a m s s' t n.  \
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
     5
\    (new_tv m a & new_tv m s) --> I e a m s = Ok(s',t,n) -->   \
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
     6
\    ( ? r. W e ($ s a) m = Ok(r, $ s' t, n) & s' = ($ r o s) )";
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
     7
by (expr.induct_tac "e" 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
     8
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
     9
  (* case Var n *)
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    10
  by (simp_tac (!simpset addsimps [app_subst_list]
1723
286f9b6370ab Replaced split_tac by split_inside_tac.
berghofe
parents: 1687
diff changeset
    11
      setloop (split_inside_tac [expand_if])) 1);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    12
  by (fast_tac (HOL_cs addss !simpset) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    13
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    14
 (* case Abs e *)
1723
286f9b6370ab Replaced split_tac by split_inside_tac.
berghofe
parents: 1687
diff changeset
    15
 by (asm_full_simp_tac (!simpset setloop (split_inside_tac [expand_bind])) 1);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    16
 by (strip_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    17
 by (rtac conjI 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    18
  by (strip_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    19
  by (REPEAT (etac allE 1));
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    20
  by (etac impE 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    21
   by (fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst])) 2);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    22
  by (fast_tac (HOL_cs addIs [new_tv_Suc_list RS mp,new_tv_subst_le,
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    23
                              less_imp_le,lessI]) 1); 
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    24
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    25
 by (strip_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    26
 by (REPEAT (etac allE 1));
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    27
 by (etac impE 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    28
  by (fast_tac (HOL_cs addss (!simpset addsimps [new_tv_subst])) 2);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    29
 by (fast_tac (HOL_cs addIs [new_tv_Suc_list RS mp,new_tv_subst_le,
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    30
                             less_imp_le,lessI]) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    31
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    32
(* case App e1 e2 *)
1723
286f9b6370ab Replaced split_tac by split_inside_tac.
berghofe
parents: 1687
diff changeset
    33
by (simp_tac (!simpset setloop (split_inside_tac [expand_bind])) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    34
by (strip_tac 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    35
by (rename_tac "s1' t1 n1 s2' t2 n2 sa" 1);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1400
diff changeset
    36
by (rtac conjI 1);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    37
 by (fast_tac (HOL_cs addss !simpset) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    38
by (strip_tac 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    39
by (rename_tac "s1 t1' n1'" 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    40
by (eres_inst_tac [("x","a")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    41
by (eres_inst_tac [("x","m")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    42
by (eres_inst_tac [("x","s")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    43
by (eres_inst_tac [("x","s1'")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    44
by (eres_inst_tac [("x","t1")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    45
by (eres_inst_tac [("x","n1")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    46
by (eres_inst_tac [("x","a")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    47
by (eres_inst_tac [("x","n1")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    48
by (eres_inst_tac [("x","s1'")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    49
by (eres_inst_tac [("x","s2'")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    50
by (eres_inst_tac [("x","t2")] allE 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    51
by (eres_inst_tac [("x","n2")] allE 1);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1400
diff changeset
    52
by (rtac conjI 1);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    53
 by (strip_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    54
 by (mp_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    55
 by (mp_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    56
 by (etac exE 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    57
 by (etac conjE 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    58
 by (etac impE 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    59
  by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    60
  by ((dres_inst_tac [("a","$ s a")] new_tv_W 1) THEN (atac 1));
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    61
  by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    62
                       addss !simpset) 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    63
 by (fast_tac (HOL_cs addss (!simpset addsimps [subst_comp_tel])) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    64
by (strip_tac 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    65
by (rename_tac "s2 t2' n2'" 1);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1400
diff changeset
    66
by (rtac conjI 1);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    67
 by (strip_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    68
 by (mp_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    69
 by (mp_tac 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    70
 by (etac exE 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    71
 by (etac conjE 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    72
 by (etac impE 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    73
  by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    74
  by ((dres_inst_tac [("a","$ s a")] new_tv_W 1) THEN (atac 1));
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    75
  by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    76
                       addss !simpset) 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    77
 by (fast_tac (HOL_cs addss (!simpset addsimps [subst_comp_tel,subst_comp_te])) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    78
by (strip_tac 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    79
by (mp_tac 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    80
by (mp_tac 1);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1400
diff changeset
    81
by (etac exE 1);
5d7a7e439cec expanded tabs
clasohm
parents: 1400
diff changeset
    82
by (etac conjE 1);
5d7a7e439cec expanded tabs
clasohm
parents: 1400
diff changeset
    83
by (etac impE 1);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    84
 by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1)); 
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    85
 by ((dres_inst_tac [("a","$ s a")] new_tv_W 1) THEN (atac 1));
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    86
 by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    87
                      addss !simpset) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    88
by (mp_tac 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    89
by (REPEAT (eresolve_tac [exE,conjE] 1));
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    90
by (REPEAT(EVERY1
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    91
     [asm_full_simp_tac (!simpset addsimps [subst_comp_tel,subst_comp_te]),
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    92
      REPEAT o etac conjE, hyp_subst_tac]));
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1400
diff changeset
    93
by (rtac exI 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    94
by (safe_tac HOL_cs);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    95
  by (fast_tac HOL_cs 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    96
 by (simp_tac (!simpset addsimps [o_def,subst_comp_te]) 2);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    97
by (subgoal_tac "new_tv n2 s & new_tv n2 r & new_tv n2 ra" 1);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
    98
 by (asm_full_simp_tac (!simpset addsimps [new_tv_subst]) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
    99
by ((forward_tac [new_tv_subst_tel] 1) THEN (atac 1));
1486
7b95d7b49f7a Introduced qed_spec_mp.
nipkow
parents: 1465
diff changeset
   100
by ((dres_inst_tac [("a","$ s a")] new_tv_W 1) THEN (atac 1));
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
   101
by (safe_tac HOL_cs);
1669
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
   102
  by (fast_tac (HOL_cs addDs[sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
   103
                       addss !simpset) 1);
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
   104
 by (fast_tac (HOL_cs addDs [sym RS W_var_geD,new_tv_subst_le,new_tv_list_le] 
e56cdf711729 inserted Suc_less_eq explictly in a few proofs.
nipkow
parents: 1486
diff changeset
   105
                      addss !simpset) 1);
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
   106
by (dres_inst_tac [("e","expr1")] (sym RS W_var_geD) 1);
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
   107
by ((dtac new_tv_subst_tel 1) THEN (atac 1));
1400
5d909faf0e04 Introduced Monad syntax Pat := Val; Cont
nipkow
parents: 1300
diff changeset
   108
by ((dres_inst_tac [("ts","$ s a")] new_tv_list_le 1) THEN (atac 1));
1300
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
   109
by ((dtac new_tv_subst_tel 1) THEN (atac 1));
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
   110
by (fast_tac (HOL_cs addDs [new_tv_W] addss 
c7a8f374339b New theory: type inference for let-free MiniML
nipkow
parents:
diff changeset
   111
    (!simpset addsimps [subst_comp_tel])) 1);
1486
7b95d7b49f7a Introduced qed_spec_mp.
nipkow
parents: 1465
diff changeset
   112
qed_spec_mp "I_correct_wrt_W";
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   113
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   114
(***
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   115
We actually want the corollary
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   116
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   117
goal I.thy
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   118
  "I e [] m id_subst = Ok(s,t,n) --> W e [] m = Ok(s, $s t, n)";
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   119
by(cut_facts_tac [(read_instantiate[("x","id_subst")]
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   120
 (read_instantiate[("x","[]")](thm RS spec)
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   121
  RS spec RS spec))] 1);
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   122
by(Full_simp_tac 1);
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   123
by(fast_tac HOL_cs 1);
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   124
qed;
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   125
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   126
assuming that thm is the undischarged version of I_correct_wrt_W.
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   127
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   128
Wait until simplification of thms is possible.
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   129
***)
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   130
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   131
val lemma = I_correct_wrt_W COMP swap_prems_rl;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   132
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   133
goal I.thy "!a m s. \
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   134
\  new_tv m a & new_tv m s --> I e a m s = Fail --> W e ($s a) m = Fail";
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   135
by (expr.induct_tac "e" 1);
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   136
  by(simp_tac (!simpset addsimps [app_subst_list]
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   137
                        setloop (split_tac [expand_if])) 1);
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   138
 by(Simp_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   139
 by(strip_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   140
 br conjI 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   141
  by(strip_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   142
  by(subgoal_tac "TVar m # $ s a = $s(TVar m # a)" 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   143
   by(asm_simp_tac (HOL_ss addsimps
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   144
        [new_tv_Suc_list, lessI RS less_imp_le RS new_tv_subst_le]) 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   145
  be conjE 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   146
  bd (new_tv_not_free_tv RS not_free_impl_id) 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   147
  by(Asm_simp_tac 1);
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   148
 by(strip_tac 1);
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   149
 be exE 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   150
 by(split_all_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   151
 by(Full_simp_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   152
by(Asm_simp_tac 1);
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   153
by(strip_tac 1);
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   154
be exE 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   155
by(REPEAT(etac conjE 1));
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   156
by(split_all_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   157
by(Full_simp_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   158
bd lemma 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   159
 by(fast_tac HOL_cs 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   160
be exE 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   161
be conjE 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   162
by(hyp_subst_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   163
by(Asm_simp_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   164
br exI 1;
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   165
br conjI 1;
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   166
 br refl 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   167
by(Simp_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   168
be disjE 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   169
 br disjI1 1;
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   170
 by(full_simp_tac (!simpset addsimps [o_def,subst_comp_tel]) 1);
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   171
 by(EVERY[etac allE 1, etac allE 1, etac allE 1,
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   172
          etac impE 1, etac impE 2, atac 2, atac 2]);
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   173
 br conjI 1;
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   174
  by(fast_tac (HOL_cs addIs [W_var_ge RS new_tv_list_le]) 1);
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   175
 br new_tv_subst_comp_2 1;
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   176
  by(fast_tac (HOL_cs addIs [W_var_ge RS new_tv_subst_le]) 1);
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   177
 by(fast_tac (HOL_cs addSIs [new_tv_subst_tel]addIs[new_tv_W RS conjunct1])1);
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   178
br disjI2 1;
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   179
be exE 1;
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   180
by(split_all_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   181
be conjE 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   182
by(Full_simp_tac 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   183
bd lemma 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   184
 br conjI 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   185
  by(fast_tac (HOL_cs addIs [W_var_ge RS new_tv_list_le]) 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   186
 br new_tv_subst_comp_1 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   187
   by(fast_tac (HOL_cs addIs [W_var_ge RS new_tv_subst_le]) 1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   188
 by(fast_tac (HOL_cs addSIs [new_tv_subst_tel]addIs[new_tv_W RS conjunct1])1);
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   189
be exE 1;
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   190
be conjE 1;
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   191
by(hyp_subst_tac 1);
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   192
by(asm_full_simp_tac (!simpset addsimps
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   193
     [o_def,subst_comp_te RS sym,subst_comp_tel RS sym]) 1);
1757
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   194
by(asm_simp_tac (!simpset addcongs [conj_cong] addsimps
f7a573c46611 Added the second half of the W/I correspondence.
nipkow
parents: 1751
diff changeset
   195
           [eq_sym_conv,subst_comp_te RS sym,subst_comp_tel RS sym]) 1);
1751
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   196
qed_spec_mp "I_complete_wrt_W";
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   197
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   198
(***
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   199
We actually want the corollary
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   200
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   201
  "I e [] m id_subst = Fail ==> W e [] m = Fail";
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   202
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   203
Wait until simplification of thms is possible.
946efd210837 Added thm I_complete_wrt_W to I.
nipkow
parents: 1723
diff changeset
   204
***)