src/HOL/MicroJava/BV/LBVComplete.thy
changeset 9906 5c027cca6262
parent 9757 1024a2d80ac0
child 9941 fe05af7ec816
equal deleted inserted replaced
9905:14a71104a498 9906:5c027cca6262
   159   show ?thesis
   159   show ?thesis
   160   proof (cases (open) "cert!pc")
   160   proof (cases (open) "cert!pc")
   161     case None
   161     case None
   162     with wtl fits
   162     with wtl fits
   163     show ?thesis 
   163     show ?thesis 
   164       by - (rule wtl_inst_mono [elimify], (simp add: wtl_cert_def)+)
   164       by - (rule wtl_inst_mono [elimified], (simp add: wtl_cert_def)+)
   165   next
   165   next
   166     case Some
   166     case Some
   167     with wtl fits
   167     with wtl fits
   168 
   168 
   169     have G: "G \<turnstile> s2 <=' (Some a)"
   169     have G: "G \<turnstile> s2 <=' (Some a)"
   404 
   404 
   405 lemma fits_imp_wtl_method_complete:
   405 lemma fits_imp_wtl_method_complete:
   406   "[| wt_method G C pTs rT mxl ins phi; fits ins cert phi |] ==> 
   406   "[| wt_method G C pTs rT mxl ins phi; fits ins cert phi |] ==> 
   407   wtl_method G C pTs rT mxl ins cert"
   407   wtl_method G C pTs rT mxl ins cert"
   408 by (simp add: wt_method_def wtl_method_def)
   408 by (simp add: wt_method_def wtl_method_def)
   409    (rule wt_imp_wtl_inst_list [rulify, elimify], auto simp add: wt_start_def) 
   409    (rule wt_imp_wtl_inst_list [rulified, elimified], auto simp add: wt_start_def) 
   410 
   410 
   411 
   411 
   412 lemma wtl_method_complete:
   412 lemma wtl_method_complete:
   413   "wt_method G C pTs rT mxl ins phi ==> 
   413   "wt_method G C pTs rT mxl ins phi ==> 
   414   wtl_method G C pTs rT mxl ins (make_cert ins phi)"
   414   wtl_method G C pTs rT mxl ins (make_cert ins phi)"
   460     assume uG : "unique G" 
   460     assume uG : "unique G" 
   461     assume b  : "((ac, ba), ad, ae, bb) \<in> set b"
   461     assume b  : "((ac, ba), ad, ae, bb) \<in> set b"
   462 
   462 
   463     from 1
   463     from 1
   464     show "wtl_method G a ba ad ae bb (make_Cert G Phi a (ac, ba))"
   464     show "wtl_method G a ba ad ae bb (make_Cert G Phi a (ac, ba))"
   465     proof (rule bspec [elimify], clarsimp)
   465     proof (rule bspec [elimified], clarsimp)
   466       assume ub : "unique b"
   466       assume ub : "unique b"
   467       assume m: "\<forall>(sig,rT,mb)\<in>set b. wf_mhead G sig rT \<and> 
   467       assume m: "\<forall>(sig,rT,mb)\<in>set b. wf_mhead G sig rT \<and> 
   468                   (\<lambda>(maxl,b). wt_method G a (snd sig) rT maxl b (Phi a sig)) mb" 
   468                   (\<lambda>(maxl,b). wt_method G a (snd sig) rT maxl b (Phi a sig)) mb" 
   469       from m b
   469       from m b
   470       show ?thesis
   470       show ?thesis
   471       proof (rule bspec [elimify], clarsimp)
   471       proof (rule bspec [elimified], clarsimp)
   472         assume "wt_method G a ba ad ae bb (Phi a (ac, ba))"         
   472         assume "wt_method G a ba ad ae bb (Phi a (ac, ba))"         
   473         with wfprog uG ub b 1
   473         with wfprog uG ub b 1
   474         show ?thesis
   474         show ?thesis
   475           by - (rule wtl_method_complete [elimify], assumption+, 
   475           by - (rule wtl_method_complete [elimified], assumption+, 
   476                 simp add: make_Cert_def unique_epsilon)
   476                 simp add: make_Cert_def unique_epsilon)
   477       qed 
   477       qed 
   478     qed
   478     qed
   479   qed
   479   qed
   480 qed
   480 qed