theory structures_proofs

lemma (in kernel_all_substitute) pde_ptr_get_pdeType_spec:
           defines "ptrval s \<equiv> cslift s \<^bsup>s\<^esup>pde_ptr"
           shows "\<forall>s. \<Gamma> \<turnstile> \<lbrace>s. s \<Turnstile>\<^sub>c \<^bsup>s\<^esup>pde_ptr\<rbrace>
            \<acute>ret__unsigned :== PROC pde_ptr_get_pdeType(\<acute>pde_ptr)
            \<lbrace>\<acute>ret__unsigned = pde_get_tag ((the (ptrval s)))\<rbrace> " unfolding ptrval_def apply (rule allI, rule conseqPre, vcg) apply (clarsimp simp:guard_simps) apply (frule h_t_valid_field[where f="[''words_C'']"], simp+) apply (frule iffD1[OF h_t_valid_clift_Some_iff], rule exE, assumption, simp) apply (simp add:h_val_clift' clift_field) apply (simp add:pde_get_tag_def) apply (simp add:mask_shift_simps)? done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. \<forall>s. \<Gamma>\<turnstile> \<lbrace>s. s \<Turnstile>\<^sub>c \<^bsup>s\<^esup>pde_ptr\<rbrace> Call pde_ptr_get_pdeType_'proc \<lbrace>\<acute>ret__unsigned = pde_get_tag (the (ptrval s))\<rbrace> proof (prove)
goal (1 subgoal):
 1. \<forall>s. \<Gamma>\<turnstile> \<lbrace>s. s \<Turnstile>\<^sub>c \<^bsup>s\<^esup>pde_ptr\<rbrace> Call pde_ptr_get_pdeType_'proc \<lbrace>\<acute>ret__unsigned = pde_get_tag (the (cslift s \<^bsup>s\<^esup>pde_ptr))\<rbrace> proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrace>s. s \<Turnstile>\<^sub>c \<^bsup>s\<^esup>pde_ptr\<rbrace> \<subseteq> {sa. 0 \<le>s 0 \<and> 0 <s 0x20 \<and> 0 <s 1 \<and> 0 \<le>s 0 \<and> sa \<Turnstile>\<^sub>c pde_ptr_' sa \<and> (h_val (hrs_mem (t_hrs_' (globals sa))) (PTR(32 word[1]) &(pde_ptr_' sa\<rightarrow>[''words_C''])).[unat 0] >> unat 0) && 3 = pde_get_tag (the (cslift s (pde_ptr_' s)))} proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<Turnstile>\<^sub>c pde_ptr_' x \<Longrightarrow> h_val (hrs_mem (t_hrs_' (globals x))) (PTR(32 word[1]) &(pde_ptr_' x\<rightarrow>[''words_C''])).[0] && 3 = pde_get_tag (the (cslift x (pde_ptr_' x))) proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<Turnstile>\<^sub>c pde_ptr_' x; x \<Turnstile>\<^sub>c PTR(32 word[1]) &(pde_ptr_' x\<rightarrow>[''words_C''])\<rbrakk> \<Longrightarrow> h_val (hrs_mem (t_hrs_' (globals x))) (PTR(32 word[1]) &(pde_ptr_' x\<rightarrow>[''words_C''])).[0] && 3 = pde_get_tag (the (cslift x (pde_ptr_' x))) proof (prove)
goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>x \<Turnstile>\<^sub>c pde_ptr_' x; x \<Turnstile>\<^sub>c PTR(32 word[1]) &(pde_ptr_' x\<rightarrow>[''words_C'']); cslift x (pde_ptr_' x) = Some xa\<rbrakk> \<Longrightarrow> h_val (hrs_mem (t_hrs_' (globals x))) (PTR(32 word[1]) &(pde_ptr_' x\<rightarrow>[''words_C''])).[0] && 3 = pde_get_tag xa proof (prove)
goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>x \<Turnstile>\<^sub>c pde_ptr_' x; x \<Turnstile>\<^sub>c PTR(32 word[1]) &(pde_ptr_' x\<rightarrow>[''words_C'']); cslift x (pde_ptr_' x) = Some xa\<rbrakk> \<Longrightarrow> pde_C.words_C xa.[0] && 3 = pde_get_tag xa proof (prove)
goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>x \<Turnstile>\<^sub>c pde_ptr_' x; x \<Turnstile>\<^sub>c PTR(32 word[1]) &(pde_ptr_' x\<rightarrow>[''words_C'']); cslift x (pde_ptr_' x) = Some xa\<rbrakk> \<Longrightarrow> pde_C.words_C xa.[0] && 3 = pde_C.words_C xa.[0] && mask 2 proof (prove)
goal:
No subgoals!