src/HOL/Isar_examples/W_correct.thy
changeset 9620 1adf6d761c97
parent 9596 6d6bf351b2cc
child 9659 b9cf6801f3da
equal deleted inserted replaced
9619:6125cc9efc18 9620:1adf6d761c97
   124       proof (rule has_type.App);
   124       proof (rule has_type.App);
   125         from s; have s': "$ u ($ s2 ($ s1 a)) = $s a";
   125         from s; have s': "$ u ($ s2 ($ s1 a)) = $s a";
   126           by (simp add: subst_comp_tel o_def);
   126           by (simp add: subst_comp_tel o_def);
   127         show "$s a |- e1 :: $ u t2 -> t";
   127         show "$s a |- e1 :: $ u t2 -> t";
   128         proof -;
   128         proof -;
   129           from hyp1 W1_ok [RS sym]; have "$ s1 a |- e1 :: t1";
   129           from hyp1 W1_ok [symmetric]; have "$ s1 a |- e1 :: t1";
   130             by blast;
   130             by blast;
   131           hence "$ u ($ s2 ($ s1 a)) |- e1 :: $ u ($ s2 t1)";
   131           hence "$ u ($ s2 ($ s1 a)) |- e1 :: $ u ($ s2 t1)";
   132             by (intro has_type_subst_closed);
   132             by (intro has_type_subst_closed);
   133           with s' t mgu_ok; show ?thesis; by simp;
   133           with s' t mgu_ok; show ?thesis; by simp;
   134         qed;
   134         qed;
   135         show "$ s a |- e2 :: $ u t2";
   135         show "$ s a |- e2 :: $ u t2";
   136         proof -;
   136         proof -;
   137           from hyp2 W2_ok [RS sym];
   137           from hyp2 W2_ok [symmetric];
   138           have "$ s2 ($ s1 a) |- e2 :: t2"; by blast;
   138           have "$ s2 ($ s1 a) |- e2 :: t2"; by blast;
   139           hence "$ u ($ s2 ($ s1 a)) |- e2 :: $ u t2";
   139           hence "$ u ($ s2 ($ s1 a)) |- e2 :: $ u t2";
   140             by (rule has_type_subst_closed);
   140             by (rule has_type_subst_closed);
   141           with s'; show ?thesis; by simp;
   141           with s'; show ?thesis; by simp;
   142         qed;
   142         qed;
   143       qed;
   143       qed;
   144     };
   144     };
   145   qed;
   145   qed;
   146   with W_ok [RS sym]; show ?thesis; by blast;
   146   with W_ok [symmetric]; show ?thesis; by blast;
   147 qed;
   147 qed;
   148 
   148 
   149 end;
   149 end;