src/HOL/Subst/Subst.ML
author clasohm
Tue, 21 Mar 1995 13:22:28 +0100
changeset 968 3cdaa8724175
child 972 e61b058d58d2
permissions -rw-r--r--
converted Subst with curried function application
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
968
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     1
(*  Title: 	Substitutions/subst.ML
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     2
    Author: 	Martin Coen, Cambridge University Computer Laboratory
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     3
    Copyright   1993  University of Cambridge
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     4
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     5
For subst.thy.  
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     6
*)
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     7
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     8
open Subst;
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
     9
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    10
(***********)
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    11
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    12
val subst_defs = [subst_def,comp_def,sdom_def];
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    13
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    14
val raw_subst_ss = utlemmas_ss addsimps al_rews;
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    15
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    16
local fun mk_thm s = prove_goalw Subst.thy subst_defs s 
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    17
                                 (fn _ => [simp_tac raw_subst_ss 1])
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    18
in val subst_rews = map mk_thm 
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    19
["Const(c) <| al = Const(c)",
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    20
 "Comb t u <| al = Comb (t <| al) (u <| al)",
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    21
 "[] <> bl = bl",
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    22
 "(<a,b>#al) <> bl = <a,b <| bl> # (al <> bl)",
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    23
 "sdom([]) = {}",
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    24
 "sdom(<a,b>#al) = (if Var(a)=b then (sdom al) Int Compl({a}) \
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    25
\                               else (sdom al) Un {a})"
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    26
];
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    27
   (* This rewrite isn't always desired *)
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    28
   val Var_subst = mk_thm "Var(x) <| al = assoc x (Var x) al";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    29
end;
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    30
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    31
val subst_ss = raw_subst_ss addsimps subst_rews;
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    32
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    33
(**** Substitutions ****)
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    34
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    35
goal Subst.thy "t <| [] = t";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    36
by (uterm_ind_tac "t" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    37
by (ALLGOALS (asm_simp_tac (subst_ss addsimps [Var_subst])));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    38
qed "subst_Nil";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    39
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    40
goal Subst.thy "t <: u --> t <| s <: u <| s";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    41
by (uterm_ind_tac "u" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    42
by (ALLGOALS (asm_simp_tac subst_ss));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    43
val subst_mono  = store_thm("subst_mono", result() RS mp);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    44
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    45
goal Subst.thy  "~ (Var(v) <: t) --> t <| <v,t <| s>#s = t <| s";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    46
by (imp_excluded_middle_tac "t = Var(v)" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    47
by (res_inst_tac [("P",
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    48
    "%x.~x=Var(v) --> ~(Var(v) <: x) --> x <| <v,t<|s>#s=x<|s")]
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    49
    uterm_induct 2);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    50
by (ALLGOALS (simp_tac (subst_ss addsimps [Var_subst])));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    51
by (fast_tac HOL_cs 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    52
val Var_not_occs  = store_thm("Var_not_occs", result() RS mp);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    53
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    54
goal Subst.thy
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    55
    "(t <|r = t <|s) = (! v.v : vars_of(t) --> Var(v) <|r = Var(v) <|s)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    56
by (uterm_ind_tac "t" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    57
by (REPEAT (etac rev_mp 3));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    58
by (ALLGOALS (asm_simp_tac subst_ss));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    59
by (ALLGOALS (fast_tac HOL_cs));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    60
qed "agreement";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    61
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    62
goal Subst.thy   "~ v: vars_of(t) --> t <| <v,u>#s = t <| s";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    63
by(simp_tac(subst_ss addsimps [agreement,Var_subst]
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    64
                     setloop (split_tac [expand_if])) 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    65
val repl_invariance  = store_thm("repl_invariance", result() RS mp);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    66
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    67
val asms = goal Subst.thy 
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    68
     "v : vars_of(t) --> w : vars_of(t <| <v,Var(w)>#s)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    69
by (uterm_ind_tac "t" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    70
by (ALLGOALS (asm_simp_tac (subst_ss addsimps [Var_subst])));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    71
val Var_in_subst  = store_thm("Var_in_subst", result() RS mp);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    72
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    73
(**** Equality between Substitutions ****)
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    74
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    75
goalw Subst.thy [subst_eq_def] "r =s= s = (! t.t <| r = t <| s)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    76
by (simp_tac subst_ss 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    77
qed "subst_eq_iff";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    78
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    79
local fun mk_thm s = prove_goal Subst.thy s
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    80
                  (fn prems => [cut_facts_tac prems 1,
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    81
                                REPEAT (etac rev_mp 1),
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    82
                                simp_tac (subst_ss addsimps [subst_eq_iff]) 1])
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    83
in 
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    84
  val subst_refl      = mk_thm "r = s ==> r =s= s";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    85
  val subst_sym       = mk_thm "r =s= s ==> s =s= r";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    86
  val subst_trans     = mk_thm "[| q =s= r; r =s= s |] ==> q =s= s";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    87
end;
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    88
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    89
val eq::prems = goalw Subst.thy [subst_eq_def] 
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    90
    "[| r =s= s; P (t <| r) (u <| r) |] ==> P (t <| s) (u <| s)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    91
by (resolve_tac [eq RS spec RS subst] 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    92
by (resolve_tac (prems RL [eq RS spec RS subst]) 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    93
qed "subst_subst2";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    94
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    95
val ssubst_subst2 = subst_sym RS subst_subst2;
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    96
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    97
(**** Composition of Substitutions ****)
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    98
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
    99
goal Subst.thy "s <> [] = s";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   100
by (alist_ind_tac "s" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   101
by (ALLGOALS (asm_simp_tac (subst_ss addsimps [subst_Nil])));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   102
qed "comp_Nil";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   103
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   104
goal Subst.thy "(t <| r <> s) = (t <| r <| s)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   105
by (uterm_ind_tac "t" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   106
by (ALLGOALS (asm_simp_tac (subst_ss addsimps [Var_subst])));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   107
by (alist_ind_tac "r" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   108
by (ALLGOALS (asm_simp_tac (subst_ss addsimps [Var_subst,subst_Nil]
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   109
                                     setloop (split_tac [expand_if]))));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   110
qed "subst_comp";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   111
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   112
goal Subst.thy "(q <> r) <> s =s= q <> (r <> s)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   113
by (simp_tac (subst_ss addsimps [subst_eq_iff,subst_comp]) 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   114
qed "comp_assoc";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   115
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   116
goal Subst.thy "<w,Var(w) <| s>#s =s= s"; 
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   117
by (rtac (allI RS (subst_eq_iff RS iffD2)) 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   118
by (uterm_ind_tac "t" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   119
by (REPEAT (etac rev_mp 3));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   120
by (ALLGOALS (simp_tac (subst_ss addsimps[Var_subst]
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   121
                                 setloop (split_tac [expand_if]))));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   122
qed "Cons_trivial";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   123
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   124
val [prem] = goal Subst.thy "q <> r =s= s ==>  t <| q <| r = t <| s";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   125
by (simp_tac (subst_ss addsimps [prem RS (subst_eq_iff RS iffD1),
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   126
				subst_comp RS sym]) 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   127
qed "comp_subst_subst";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   128
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   129
(****  Domain and range of Substitutions ****)
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   130
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   131
goal Subst.thy  "(v : sdom(s)) = (~ Var(v) <| s = Var(v))";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   132
by (alist_ind_tac "s" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   133
by (ALLGOALS (asm_simp_tac (subst_ss addsimps [Var_subst]
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   134
                            setloop (split_tac[expand_if]))));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   135
by (fast_tac HOL_cs 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   136
qed "sdom_iff";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   137
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   138
goalw Subst.thy [srange_def]  
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   139
   "v : srange(s) = (? w.w : sdom(s) & v : vars_of(Var(w) <| s))";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   140
by (fast_tac set_cs 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   141
qed "srange_iff";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   142
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   143
goal Subst.thy  "(t <| s = t) = (sdom(s) Int vars_of(t) = {})";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   144
by (uterm_ind_tac "t" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   145
by (REPEAT (etac rev_mp 3));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   146
by (ALLGOALS (simp_tac (subst_ss addsimps [sdom_iff,Var_subst])));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   147
by (ALLGOALS (fast_tac set_cs));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   148
qed "invariance";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   149
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   150
goal Subst.thy  "v : sdom(s) -->  ~v : srange(s) --> ~v : vars_of(t <| s)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   151
by (uterm_ind_tac "t" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   152
by (imp_excluded_middle_tac "x : sdom(s)" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   153
by (ALLGOALS (asm_simp_tac (subst_ss addsimps [sdom_iff,srange_iff])));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   154
by (ALLGOALS (fast_tac set_cs));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   155
val Var_elim  = store_thm("Var_elim", result() RS mp RS mp);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   156
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   157
val asms = goal Subst.thy 
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   158
     "[| v : sdom(s); v : vars_of(t <| s) |] ==>  v : srange(s)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   159
by (REPEAT (ares_tac (asms @ [Var_elim RS swap RS classical]) 1));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   160
qed "Var_elim2";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   161
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   162
goal Subst.thy  "v : vars_of(t <| s) --> v : srange(s) | v : vars_of(t)";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   163
by (uterm_ind_tac "t" 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   164
by (REPEAT_SOME (etac rev_mp ));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   165
by (ALLGOALS (simp_tac (subst_ss addsimps [sdom_iff,srange_iff])));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   166
by (REPEAT (step_tac (set_cs addIs [vars_var_iff RS iffD1 RS sym]) 1));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   167
by (etac notE 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   168
by (etac subst 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   169
by (ALLGOALS (fast_tac set_cs));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   170
val Var_intro  = store_thm("Var_intro", result() RS mp);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   171
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   172
goal Subst.thy
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   173
    "v : srange(s) --> (? w.w : sdom(s) & v : vars_of(Var(w) <| s))";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   174
by (simp_tac (subst_ss addsimps [srange_iff]) 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   175
val srangeE  = store_thm("srangeE", make_elim (result() RS mp));
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   176
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   177
val asms = goal Subst.thy
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   178
   "sdom(s) Int srange(s) = {} = (! t.sdom(s) Int vars_of(t <| s) = {})";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   179
by (simp_tac subst_ss 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   180
by (fast_tac (set_cs addIs [Var_elim2] addEs [srangeE]) 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   181
qed "dom_range_disjoint";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   182
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   183
val asms = goal Subst.thy "~ u <| s = u --> (? x.x : sdom(s))";
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   184
by (simp_tac (subst_ss addsimps [invariance]) 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   185
by (fast_tac set_cs 1);
3cdaa8724175 converted Subst with curried function application
clasohm
parents:
diff changeset
   186
val subst_not_empty  = store_thm("subst_not_empty", result() RS mp);