src/HOLCF/Tr.ML
author paulson
Wed, 28 Jun 2000 10:54:21 +0200
changeset 9169 85a47aa21f74
parent 7654 57c4cea8b137
child 9245 428385c4bc50
permissions -rw-r--r--
tidying and unbatchifying
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     1
(*  Title:      HOLCF/Tr.ML
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     2
    ID:         $Id$
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     3
    Author:     Franz Regensburger
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     4
    Copyright   1993 Technische Universitaet Muenchen
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     5
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     6
Lemmas for Tr.thy
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     7
*)
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     8
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
     9
open Tr;
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    10
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    11
(* ------------------------------------------------------------------------ *)
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    12
(* Exhaustion and Elimination for type one                                  *)
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    13
(* ------------------------------------------------------------------------ *)
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    14
qed_goalw "Exh_tr" thy [FF_def,TT_def] "t=UU | t = TT | t = FF"
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    15
 (fn prems =>
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    16
        [
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    17
	(lift.induct_tac "t" 1),
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    18
	(fast_tac HOL_cs 1),
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3038
diff changeset
    19
	(fast_tac (HOL_cs addss simpset()) 1)
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    20
	]);
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    21
9169
85a47aa21f74 tidying and unbatchifying
paulson
parents: 7654
diff changeset
    22
val prems = Goal "[| p=UU ==> Q; p = TT ==>Q; p = FF ==>Q|] ==>Q";
85a47aa21f74 tidying and unbatchifying
paulson
parents: 7654
diff changeset
    23
by (rtac (Exh_tr RS disjE) 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 7654
diff changeset
    24
by (eresolve_tac prems 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 7654
diff changeset
    25
by (etac disjE 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 7654
diff changeset
    26
by (eresolve_tac prems 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 7654
diff changeset
    27
by (eresolve_tac prems 1);
85a47aa21f74 tidying and unbatchifying
paulson
parents: 7654
diff changeset
    28
qed "trE";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    29
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    30
(* ------------------------------------------------------------------------ *) 
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    31
(* tactic for tr-thms with case split                                       *)
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    32
(* ------------------------------------------------------------------------ *)
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    33
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    34
bind_thms ("tr_defs", [andalso_def,orelse_def,neg_def,ifte_def,TT_def,FF_def]);
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    35
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    36
fun prover t =  prove_goal thy t
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    37
 (fn prems =>
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    38
        [
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    39
        (res_inst_tac [("p","y")] trE 1),
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3038
diff changeset
    40
	(REPEAT(asm_simp_tac (simpset() addsimps 
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    41
		[o_def,flift1_def,flift2_def,inst_lift_po]@tr_defs) 1))
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    42
	]);
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    43
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    44
(* ------------------------------------------------------------------------ *) 
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    45
(* distinctness for type tr                                                 *) 
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    46
(* ------------------------------------------------------------------------ *)
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    47
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    48
bind_thms ("dist_less_tr", map prover [
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    49
			"~TT << UU",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    50
			"~FF << UU",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    51
			"~TT << FF",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    52
			"~FF << TT"
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    53
                        ]);
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    54
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    55
val dist_eq_tr = map prover ["TT~=UU","FF~=UU","TT~=FF"];
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    56
bind_thms ("dist_eq_tr", dist_eq_tr @ (map (fn thm => (thm RS not_sym)) dist_eq_tr));
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    57
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    58
(* ------------------------------------------------------------------------ *) 
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    59
(* lemmas about andalso, orelse, neg and if                                 *) 
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    60
(* ------------------------------------------------------------------------ *)
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    61
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    62
bind_thms ("andalso_thms", map prover [
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    63
                        "(TT andalso y) = y",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    64
                        "(FF andalso y) = FF",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    65
                        "(UU andalso y) = UU",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    66
			"(y andalso TT) = y",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    67
		  	"(y andalso y) = y"
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    68
                        ]);
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    69
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    70
bind_thms ("orelse_thms", map prover [
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    71
                        "(TT orelse y) = TT",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    72
                        "(FF orelse y) = y",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    73
                        "(UU orelse y) = UU",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    74
                        "(y orelse FF) = y",
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    75
			"(y orelse y) = y"]);
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    76
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    77
bind_thms ("neg_thms", map prover [
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    78
                        "neg`TT = FF",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    79
                        "neg`FF = TT",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    80
                        "neg`UU = UU"
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    81
                        ]);
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    82
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    83
bind_thms ("ifte_thms", map prover [
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    84
                        "If UU then e1 else e2 fi = UU",
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    85
                        "If FF then e1 else e2 fi = e2",
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
    86
                        "If TT then e1 else e2 fi = e1"]);
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    87
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    88
Addsimps (dist_less_tr @ dist_eq_tr @ andalso_thms @ 
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    89
	  orelse_thms @ neg_thms @ ifte_thms);
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
    90
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
    91
(* ------------------------------------------------------------------- *)
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
    92
(*  split-tac for If via If2 because the constant has to be a constant *)
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
    93
(* ------------------------------------------------------------------- *)
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
    94
  
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
    95
Goalw [If2_def] 
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
    96
  "P (If2 Q x y ) = ((Q=UU --> P UU) & (Q=TT --> P x) & (Q=FF --> P y))";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
    97
by (res_inst_tac [("p","Q")] trE 1);
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
    98
by (REPEAT (Asm_full_simp_tac 1));
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4642
diff changeset
    99
qed"split_If2";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   100
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   101
val split_If_tac =
4833
2e53109d4bc8 Renamed expand_const -> split_const
nipkow
parents: 4642
diff changeset
   102
  simp_tac (HOL_basic_ss addsimps [symmetric If2_def]) THEN' (split_tac [split_If2]);
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   103
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   104
 
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   105
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   106
(* ----------------------------------------------------------------- *)
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   107
        section"Rewriting of HOLCF operations to HOL functions";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   108
(* ----------------------------------------------------------------- *)
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   109
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   110
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   111
Goal
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   112
"!!t.[|t~=UU|]==> ((t andalso s)=FF)=(t=FF | s=FF)";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   113
by (rtac iffI 1);
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   114
by (res_inst_tac [("p","t")] trE 1);
4477
b3e5857d8d99 New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents: 4423
diff changeset
   115
by Auto_tac;
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   116
by (res_inst_tac [("p","t")] trE 1);
4477
b3e5857d8d99 New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents: 4423
diff changeset
   117
by Auto_tac;
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   118
qed"andalso_or";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   119
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5068
diff changeset
   120
Goal "[|t~=UU|]==> ((t andalso s)~=FF)=(t~=FF & s~=FF)";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   121
by (rtac iffI 1);
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   122
by (res_inst_tac [("p","t")] trE 1);
4477
b3e5857d8d99 New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents: 4423
diff changeset
   123
by Auto_tac;
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   124
by (res_inst_tac [("p","t")] trE 1);
4477
b3e5857d8d99 New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents: 4423
diff changeset
   125
by Auto_tac;
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   126
qed"andalso_and";
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   127
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   128
Goal "(Def x ~=FF)= x";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3038
diff changeset
   129
by (simp_tac (simpset() addsimps [FF_def]) 1);
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   130
qed"Def_bool1";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   131
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   132
Goal "(Def x = FF) = (~x)";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3038
diff changeset
   133
by (simp_tac (simpset() addsimps [FF_def]) 1);
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   134
qed"Def_bool2";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   135
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   136
Goal "(Def x = TT) = x";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3038
diff changeset
   137
by (simp_tac (simpset() addsimps [TT_def]) 1);
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   138
qed"Def_bool3";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   139
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   140
Goal "(Def x ~= TT) = (~x)";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3038
diff changeset
   141
by (simp_tac (simpset() addsimps [TT_def]) 1);
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   142
qed"Def_bool4";
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   143
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   144
Goal 
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   145
  "(If Def P then A else B fi)= (if P then A else B)";
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   146
by (res_inst_tac [("p","Def P")]  trE 1);
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   147
by (Asm_full_simp_tac 1);
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3038
diff changeset
   148
by (asm_full_simp_tac (simpset() addsimps tr_defs@[flift1_def,o_def]) 1);
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3038
diff changeset
   149
by (asm_full_simp_tac (simpset() addsimps tr_defs@[flift1_def,o_def]) 1);
2640
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   150
qed"If_and_if";
ee4dfce170a0 Changes of HOLCF from Oscar Slotosch:
slotosch
parents:
diff changeset
   151
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   152
Addsimps [Def_bool1,Def_bool2,Def_bool3,Def_bool4];
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   153
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   154
(* ----------------------------------------------------------------- *)
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   155
        section"admissibility";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   156
(* ----------------------------------------------------------------- *)
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   157
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   158
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   159
(* The following rewrite rules for admissibility should in the future be 
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   160
   replaced by a more general admissibility test that also checks 
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   161
   chain-finiteness, of which these lemmata are specific examples *)
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   162
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   163
Goal "x~=FF = (x=TT|x=UU)";
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   164
by (res_inst_tac [("p","x")] trE 1);
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   165
by (TRYALL (Asm_full_simp_tac));
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   166
qed"adm_trick_1";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   167
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4833
diff changeset
   168
Goal "x~=TT = (x=FF|x=UU)";
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   169
by (res_inst_tac [("p","x")] trE 1);
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   170
by (TRYALL (Asm_full_simp_tac));
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   171
qed"adm_trick_2";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   172
7654
57c4cea8b137 bind_thms;
wenzelm
parents: 5143
diff changeset
   173
bind_thms ("adm_tricks", [adm_trick_1,adm_trick_2]);
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   174
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   175
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5068
diff changeset
   176
Goal "cont(f) ==> adm (%x. (f x)~=TT)";
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   177
by (simp_tac (HOL_basic_ss addsimps adm_tricks) 1);
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   178
by (REPEAT ((resolve_tac (adm_lemmas@cont_lemmas1) 1) ORELSE atac 1));
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   179
qed"adm_nTT";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   180
5143
b94cd208f073 Removal of leading "\!\!..." from most Goal commands
paulson
parents: 5068
diff changeset
   181
Goal "cont(f) ==> adm (%x. (f x)~=FF)";
3038
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   182
by (simp_tac (HOL_basic_ss addsimps adm_tricks) 1);
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   183
by (REPEAT ((resolve_tac (adm_lemmas@cont_lemmas1) 1) ORELSE atac 1));
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   184
qed"adm_nFF";
bb2ded320911 Main changes are:
mueller
parents: 2646
diff changeset
   185
4642
2d3910d6ab10 *** empty log message ***
nipkow
parents: 4477
diff changeset
   186
Addsimps [adm_nTT,adm_nFF];