src/HOL/MicroJava/Comp/CorrCompTp.thy
changeset 33836 da3e88ea6c72
parent 33640 0d82107dc07a
child 33954 1bc3b688548c
equal deleted inserted replaced
33835:d6134fb5a49f 33836:da3e88ea6c72
   130   \<Longrightarrow> (inited_LT C pTs lvars ! index (pns, lvars, blk, res) vname) = OK T"
   130   \<Longrightarrow> (inited_LT C pTs lvars ! index (pns, lvars, blk, res) vname) = OK T"
   131 apply (simp add: local_env_snd index_def)
   131 apply (simp add: local_env_snd index_def)
   132 apply (case_tac "vname = This")
   132 apply (case_tac "vname = This")
   133 apply (simp add: inited_LT_def)
   133 apply (simp add: inited_LT_def)
   134 apply (simp add: inited_LT_def)
   134 apply (simp add: inited_LT_def)
   135 apply (simp (no_asm_simp) only: map_compose map_append [THEN sym] map.simps [THEN sym])
   135 apply (simp (no_asm_simp) only: map_map [symmetric] map_append [symmetric] map.simps [symmetric])
   136 apply (subgoal_tac "length (takeWhile (\<lambda>z. z \<noteq> vname) (pns @ map fst lvars)) < length (pTs @ map snd lvars)")
   136 apply (subgoal_tac "length (takeWhile (\<lambda>z. z \<noteq> vname) (pns @ map fst lvars)) < length (pTs @ map snd lvars)")
   137 apply (simp (no_asm_simp) only: List.nth_map ok_val.simps)
   137 apply (simp (no_asm_simp) only: List.nth_map ok_val.simps)
   138 apply (subgoal_tac "map_of lvars = map_of (map (\<lambda> p. (fst p, snd p)) lvars)")
   138 apply (subgoal_tac "map_of lvars = map_of (map (\<lambda> p. (fst p, snd p)) lvars)")
   139 apply (simp only:)
   139 apply (simp only:)
   140 apply (subgoal_tac "distinct (map fst lvars)") 
   140 apply (subgoal_tac "distinct (map fst lvars)") 
   164 
   164 
   165 
   165 
   166 lemma inited_LT_at_index_no_err: " i < length (inited_LT C pTs lvars)
   166 lemma inited_LT_at_index_no_err: " i < length (inited_LT C pTs lvars)
   167   \<Longrightarrow> inited_LT C pTs lvars ! i \<noteq> Err"
   167   \<Longrightarrow> inited_LT C pTs lvars ! i \<noteq> Err"
   168 apply (simp only: inited_LT_def)
   168 apply (simp only: inited_LT_def)
   169 apply (simp only: map_compose map_append [THEN sym] map.simps [THEN sym] length_map)
   169 apply (simp only: map_map [symmetric] map_append [symmetric] map.simps [symmetric] length_map)
   170 apply (simp only: nth_map)
   170 apply (simp only: nth_map)
   171 apply simp
   171 apply simp
   172 done
   172 done
   173 
   173 
   174 
   174