src/HOL/UNITY/UNITY_tactics.ML
author paulson
Wed, 29 Jan 2003 11:02:08 +0100
changeset 13790 8d7e9fce8c50
parent 13786 ab8f39f48a6f
child 13792 d1811693899c
permissions -rw-r--r--
converting UNITY to new-style theories
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13786
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/UNITY_tactics.ML
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
     2
    ID:         $Id$
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
     4
    Copyright   2003  University of Cambridge
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
     5
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
     6
Specialized UNITY tactics, and ML bindings of theorems
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
     7
*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
     8
13790
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
     9
(*Extend*)
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    10
val Restrict_iff = thm "Restrict_iff";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    11
val Restrict_UNIV = thm "Restrict_UNIV";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    12
val Restrict_empty = thm "Restrict_empty";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    13
val Restrict_Int = thm "Restrict_Int";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    14
val Restrict_triv = thm "Restrict_triv";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    15
val Restrict_subset = thm "Restrict_subset";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    16
val Restrict_eq_mono = thm "Restrict_eq_mono";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    17
val Restrict_imageI = thm "Restrict_imageI";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    18
val Domain_Restrict = thm "Domain_Restrict";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    19
val Image_Restrict = thm "Image_Restrict";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    20
val insert_Id_image_Acts = thm "insert_Id_image_Acts";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    21
val good_mapI = thm "good_mapI";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    22
val good_map_is_surj = thm "good_map_is_surj";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    23
val fst_inv_equalityI = thm "fst_inv_equalityI";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    24
val project_set_iff = thm "project_set_iff";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    25
val extend_set_mono = thm "extend_set_mono";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    26
val extend_set_empty = thm "extend_set_empty";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    27
val project_set_Int_subset = thm "project_set_Int_subset";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    28
val Init_extend = thm "Init_extend";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    29
val Init_project = thm "Init_project";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    30
val Acts_project = thm "Acts_project";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    31
val project_set_UNIV = thm "project_set_UNIV";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    32
val project_set_Union = thm "project_set_Union";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    33
val project_act_mono = thm "project_act_mono";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    34
val project_constrains_project_set = thm "project_constrains_project_set";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    35
val project_stable_project_set = thm "project_stable_project_set";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    36
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    37
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    38
(*Rename*)
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    39
val good_map_bij = thm "good_map_bij";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    40
val fst_o_inv_eq_inv = thm "fst_o_inv_eq_inv";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    41
val mem_rename_set_iff = thm "mem_rename_set_iff";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    42
val extend_set_eq_image = thm "extend_set_eq_image";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    43
val Init_rename = thm "Init_rename";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    44
val extend_set_inv = thm "extend_set_inv";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    45
val bij_extend_act_eq_project_act = thm "bij_extend_act_eq_project_act";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    46
val bij_extend_act = thm "bij_extend_act";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    47
val bij_project_act = thm "bij_project_act";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    48
val bij_inv_project_act_eq = thm "bij_inv_project_act_eq";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    49
val Acts_project = thm "Acts_project";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    50
val extend_inv = thm "extend_inv";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    51
val rename_inv_rename = thm "rename_inv_rename";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    52
val rename_rename_inv = thm "rename_rename_inv";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    53
val rename_inv_eq = thm "rename_inv_eq";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    54
val bij_extend = thm "bij_extend";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    55
val bij_project = thm "bij_project";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    56
val inv_project_eq = thm "inv_project_eq";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    57
val Allowed_rename = thm "Allowed_rename";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    58
val bij_rename = thm "bij_rename";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    59
val surj_rename = thm "surj_rename";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    60
val inj_rename_imp_inj = thm "inj_rename_imp_inj";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    61
val surj_rename_imp_surj = thm "surj_rename_imp_surj";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    62
val bij_rename_imp_bij = thm "bij_rename_imp_bij";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    63
val bij_rename_iff = thm "bij_rename_iff";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    64
val rename_SKIP = thm "rename_SKIP";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    65
val rename_Join = thm "rename_Join";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    66
val rename_JN = thm "rename_JN";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    67
val rename_constrains = thm "rename_constrains";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    68
val rename_stable = thm "rename_stable";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    69
val rename_invariant = thm "rename_invariant";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    70
val rename_increasing = thm "rename_increasing";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    71
val reachable_rename_eq = thm "reachable_rename_eq";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    72
val rename_Constrains = thm "rename_Constrains";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    73
val rename_Stable = thm "rename_Stable";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    74
val rename_Always = thm "rename_Always";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    75
val rename_Increasing = thm "rename_Increasing";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    76
val rename_transient = thm "rename_transient";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    77
val rename_ensures = thm "rename_ensures";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    78
val rename_leadsTo = thm "rename_leadsTo";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    79
val rename_LeadsTo = thm "rename_LeadsTo";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    80
val rename_rename_guarantees_eq = thm "rename_rename_guarantees_eq";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    81
val rename_guarantees_eq_rename_inv = thm "rename_guarantees_eq_rename_inv";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    82
val rename_preserves = thm "rename_preserves";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    83
val ok_rename_iff = thm "ok_rename_iff";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    84
val OK_rename_iff = thm "OK_rename_iff";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    85
val bij_eq_rename = thm "bij_eq_rename";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    86
val rename_image_constrains = thm "rename_image_constrains";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    87
val rename_image_stable = thm "rename_image_stable";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    88
val rename_image_increasing = thm "rename_image_increasing";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    89
val rename_image_invariant = thm "rename_image_invariant";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    90
val rename_image_Constrains = thm "rename_image_Constrains";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    91
val rename_image_preserves = thm "rename_image_preserves";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    92
val rename_image_Stable = thm "rename_image_Stable";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    93
val rename_image_Increasing = thm "rename_image_Increasing";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    94
val rename_image_Always = thm "rename_image_Always";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    95
val rename_image_leadsTo = thm "rename_image_leadsTo";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    96
val rename_image_LeadsTo = thm "rename_image_LeadsTo";
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    97
8d7e9fce8c50 converting UNITY to new-style theories
paulson
parents: 13786
diff changeset
    98
13786
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
    99
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   100
(*Lift_prog*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   101
val sub_def = thm "sub_def";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   102
val lift_map_def = thm "lift_map_def";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   103
val drop_map_def = thm "drop_map_def";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   104
val insert_map_inverse = thm "insert_map_inverse";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   105
val insert_map_delete_map_eq = thm "insert_map_delete_map_eq";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   106
val insert_map_inject1 = thm "insert_map_inject1";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   107
val insert_map_inject2 = thm "insert_map_inject2";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   108
val insert_map_inject = thm "insert_map_inject";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   109
val insert_map_inject = thm "insert_map_inject";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   110
val lift_map_eq_iff = thm "lift_map_eq_iff";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   111
val drop_map_lift_map_eq = thm "drop_map_lift_map_eq";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   112
val inj_lift_map = thm "inj_lift_map";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   113
val lift_map_drop_map_eq = thm "lift_map_drop_map_eq";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   114
val drop_map_inject = thm "drop_map_inject";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   115
val surj_lift_map = thm "surj_lift_map";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   116
val bij_lift_map = thm "bij_lift_map";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   117
val inv_lift_map_eq = thm "inv_lift_map_eq";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   118
val inv_drop_map_eq = thm "inv_drop_map_eq";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   119
val bij_drop_map = thm "bij_drop_map";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   120
val sub_apply = thm "sub_apply";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   121
val lift_set_empty = thm "lift_set_empty";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   122
val lift_set_iff = thm "lift_set_iff";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   123
val lift_set_iff2 = thm "lift_set_iff2";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   124
val lift_set_mono = thm "lift_set_mono";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   125
val lift_set_Un_distrib = thm "lift_set_Un_distrib";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   126
val lift_set_Diff_distrib = thm "lift_set_Diff_distrib";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   127
val bij_lift = thm "bij_lift";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   128
val lift_SKIP = thm "lift_SKIP";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   129
val lift_Join = thm "lift_Join";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   130
val lift_JN = thm "lift_JN";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   131
val lift_constrains = thm "lift_constrains";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   132
val lift_stable = thm "lift_stable";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   133
val lift_invariant = thm "lift_invariant";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   134
val lift_Constrains = thm "lift_Constrains";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   135
val lift_Stable = thm "lift_Stable";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   136
val lift_Always = thm "lift_Always";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   137
val lift_transient = thm "lift_transient";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   138
val lift_ensures = thm "lift_ensures";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   139
val lift_leadsTo = thm "lift_leadsTo";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   140
val lift_LeadsTo = thm "lift_LeadsTo";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   141
val lift_lift_guarantees_eq = thm "lift_lift_guarantees_eq";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   142
val lift_guarantees_eq_lift_inv = thm "lift_guarantees_eq_lift_inv";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   143
val lift_preserves_snd_I = thm "lift_preserves_snd_I";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   144
val delete_map_eqE = thm "delete_map_eqE";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   145
val delete_map_eqE = thm "delete_map_eqE";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   146
val delete_map_neq_apply = thm "delete_map_neq_apply";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   147
val vimage_o_fst_eq = thm "vimage_o_fst_eq";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   148
val vimage_sub_eq_lift_set = thm "vimage_sub_eq_lift_set";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   149
val mem_lift_act_iff = thm "mem_lift_act_iff";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   150
val preserves_snd_lift_stable = thm "preserves_snd_lift_stable";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   151
val constrains_imp_lift_constrains = thm "constrains_imp_lift_constrains";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   152
val insert_map_upd_same = thm "insert_map_upd_same";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   153
val insert_map_upd = thm "insert_map_upd";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   154
val insert_map_eq_diff = thm "insert_map_eq_diff";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   155
val lift_map_eq_diff = thm "lift_map_eq_diff";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   156
val lift_transient_eq_disj = thm "lift_transient_eq_disj";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   157
val lift_map_image_Times = thm "lift_map_image_Times";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   158
val lift_preserves_eq = thm "lift_preserves_eq";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   159
val lift_preserves_sub = thm "lift_preserves_sub";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   160
val o_equiv_assoc = thm "o_equiv_assoc";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   161
val o_equiv_apply = thm "o_equiv_apply";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   162
val fst_o_lift_map = thm "fst_o_lift_map";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   163
val snd_o_lift_map = thm "snd_o_lift_map";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   164
val extend_act_extend_act = thm "extend_act_extend_act";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   165
val project_act_project_act = thm "project_act_project_act";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   166
val project_act_extend_act = thm "project_act_extend_act";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   167
val act_in_UNION_preserves_fst = thm "act_in_UNION_preserves_fst";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   168
val UNION_OK_lift_I = thm "UNION_OK_lift_I";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   169
val OK_lift_I = thm "OK_lift_I";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   170
val Allowed_lift = thm "Allowed_lift";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   171
val lift_image_preserves = thm "lift_image_preserves";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   172
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   173
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   174
(*PPROD*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   175
val Init_PLam = thm "Init_PLam";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   176
val PLam_empty = thm "PLam_empty";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   177
val PLam_SKIP = thm "PLam_SKIP";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   178
val PLam_insert = thm "PLam_insert";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   179
val PLam_component_iff = thm "PLam_component_iff";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   180
val component_PLam = thm "component_PLam";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   181
val PLam_constrains = thm "PLam_constrains";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   182
val PLam_stable = thm "PLam_stable";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   183
val PLam_transient = thm "PLam_transient";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   184
val PLam_ensures = thm "PLam_ensures";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   185
val PLam_leadsTo_Basis = thm "PLam_leadsTo_Basis";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   186
val invariant_imp_PLam_invariant = thm "invariant_imp_PLam_invariant";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   187
val PLam_preserves_fst = thm "PLam_preserves_fst";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   188
val PLam_preserves_snd = thm "PLam_preserves_snd";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   189
val guarantees_PLam_I = thm "guarantees_PLam_I";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   190
val Allowed_PLam = thm "Allowed_PLam";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   191
val PLam_preserves = thm "PLam_preserves";
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   192
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   193
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   194
(*proves "co" properties when the program is specified*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   195
fun gen_constrains_tac(cs,ss) i = 
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   196
   SELECT_GOAL
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   197
      (EVERY [REPEAT (Always_Int_tac 1),
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   198
	      REPEAT (etac Always_ConstrainsI 1
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   199
		      ORELSE
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   200
		      resolve_tac [StableI, stableI,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   201
				   constrains_imp_Constrains] 1),
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   202
	      rtac constrainsI 1,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   203
	      full_simp_tac ss 1,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   204
	      REPEAT (FIRSTGOAL (etac disjE)),
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   205
	      ALLGOALS (clarify_tac cs),
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   206
	      ALLGOALS (asm_lr_simp_tac ss)]) i;
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   207
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   208
(*proves "ensures/leadsTo" properties when the program is specified*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   209
fun gen_ensures_tac(cs,ss) sact = 
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   210
    SELECT_GOAL
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   211
      (EVERY [REPEAT (Always_Int_tac 1),
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   212
	      etac Always_LeadsTo_Basis 1 
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   213
	          ORELSE   (*subgoal may involve LeadsTo, leadsTo or ensures*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   214
		  REPEAT (ares_tac [LeadsTo_Basis, leadsTo_Basis,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   215
				    EnsuresI, ensuresI] 1),
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   216
	      (*now there are two subgoals: co & transient*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   217
	      simp_tac ss 2,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   218
	      res_inst_tac [("act", sact)] transientI 2,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   219
                 (*simplify the command's domain*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   220
	      simp_tac (ss addsimps [Domain_def]) 3,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   221
	      gen_constrains_tac (cs,ss) 1,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   222
	      ALLGOALS (clarify_tac cs),
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   223
	      ALLGOALS (asm_lr_simp_tac ss)]);
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   224
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   225
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   226
(*Composition equivalences, from Lift_prog*)
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   227
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   228
fun make_o_equivs th =
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   229
    [th,
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   230
     th RS o_equiv_assoc |> simplify (HOL_ss addsimps [o_assoc]),
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   231
     th RS o_equiv_apply |> simplify (HOL_ss addsimps [o_def, sub_def])];
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   232
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   233
Addsimps (make_o_equivs fst_o_funPair @ make_o_equivs snd_o_funPair);
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   234
ab8f39f48a6f More conversion of UNITY to Isar new-style theories
paulson
parents:
diff changeset
   235
Addsimps (make_o_equivs fst_o_lift_map @ make_o_equivs snd_o_lift_map);