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