theory Detype_R

lemma ArchCreateObject_pspace_no_overlap':
  "\<lbrace>\<lambda>s. pspace_no_overlap'
          (ptr + (of_nat n << APIType_capBits ty userSize)) sz s \<and>
        pspace_aligned' s \<and> pspace_distinct' s \<and>
        range_cover ptr sz (APIType_capBits ty userSize) (n + 2) \<and> ptr \<noteq> 0\<rbrace>
   ARM_H.createObject ty
     (ptr + (of_nat n << APIType_capBits ty userSize)) userSize d
   \<lbrace>\<lambda>archCap. pspace_no_overlap'
                (ptr + (1 + of_nat n << APIType_capBits ty userSize)) sz\<rbrace>" apply (rule hoare_pre) apply (clarsimp simp:ARM_H.createObject_def) apply wpc apply (wp doMachineOp_psp_no_overlap
              createObjects'_pspace_no_overlap2 hoare_when_weak_wp
              copyGlobalMappings_pspace_no_overlap'
              createObjects'_psp_aligned[where sz = sz]
              createObjects'_psp_distinct[where sz = sz]
            | simp add: placeNewObject_def2 word_shiftl_add_distrib
            | simp add: placeNewObject_def2 word_shiftl_add_distrib
            | simp add: placeNewDataObject_def placeNewObject_def2 word_shiftl_add_distrib
                        field_simps  split del: if_splits
            | clarsimp simp add: add.assoc[symmetric],wp createObjects'_pspace_no_overlap2[where n =0 and sz = sz,simplified]
            | clarsimp simp add: APIType_capBits_def objBits_simps pageBits_def)+ apply (clarsimp simp: conj_comms) apply (frule(1) range_cover_no_0[where p = n]) apply simp apply (subgoal_tac "is_aligned (ptr + (of_nat n << APIType_capBits ty userSize))
                                 (APIType_capBits ty userSize) ") prefer 2 apply (rule aligned_add_aligned[OF range_cover.aligned],assumption) apply (simp add:is_aligned_shiftl_self range_cover_sz') apply (simp add: APIType_capBits_def) apply (frule range_cover_offset[rotated,where p = n]) apply simp+ apply (frule range_cover_le[where n = "Suc (Suc 0)"]) apply simp apply (frule pspace_no_overlap'_le2) apply (rule range_cover_compare_offset) apply simp+ apply (clarsimp simp:word_shiftl_add_distrib
              ,simp add:field_simps) apply (clarsimp simp:add.assoc[symmetric]) apply (rule range_cover_tail_mask[where n =0,simplified]) apply (drule range_cover_offset[rotated,where p = n]) apply simp apply (clarsimp simp:shiftl_t2n field_simps) apply (metis numeral_2_eq_2) apply (simp add:shiftl_t2n field_simps) apply (intro conjI allI) apply (clarsimp simp: field_simps pageBits_def pdBits_def word_bits_conv archObjSize_def ptBits_def
                        APIType_capBits_def shiftl_t2n objBits_simps pdeBits_def pteBits_def
         | rule conjI | erule range_cover_le,simp)+ done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. \<lbrace>\<lambda>s. pspace_no_overlap' (ptr + (word_of_nat n << APIType_capBits ty userSize)) sz s \<and> pspace_aligned' s \<and> pspace_distinct' s \<and> range_cover ptr sz (APIType_capBits ty userSize) (n + 2) \<and> ptr \<noteq> 0\<rbrace> Arch.createObject ty (ptr + (word_of_nat n << APIType_capBits ty userSize)) userSize d \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace> proof (prove)
goal (2 subgoals):
 1. \<lbrace>?Q\<rbrace> Arch.createObject ty (ptr + (word_of_nat n << APIType_capBits ty userSize)) userSize d \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 2. \<And>s. pspace_no_overlap' (ptr + (word_of_nat n << APIType_capBits ty userSize)) sz s \<and> pspace_aligned' s \<and> pspace_distinct' s \<and> range_cover ptr sz (APIType_capBits ty userSize) (n + 2) \<and> ptr \<noteq> 0 \<Longrightarrow> ?Q s proof (prove)
goal (2 subgoals):
 1. \<lbrace>?Q\<rbrace> case ty of APIObjectType v2 \<Rightarrow> haskell_fail [] | SmallPageObject \<Rightarrow> do placeNewDataObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) 0 d;
modify (\<lambda>ks. ks\<lparr>gsUserPages := \<lambda>y. if y = fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) then Just ARMSmallPage else gsUserPages ks y\<rparr>);
return $ arch_capability.PageCap d (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) VMReadWrite ARMSmallPage None
od | LargePageObject \<Rightarrow> do placeNewDataObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) 4 d;
modify (\<lambda>ks. ks\<lparr>gsUserPages := \<lambda>y. if y = fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) then Just ARMLargePage else gsUserPages ks y\<rparr>);
return $ arch_capability.PageCap d (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) VMReadWrite ARMLargePage None
od | SectionObject \<Rightarrow> do placeNewDataObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) 8 d;
modify (\<lambda>ks. ks\<lparr>gsUserPages := \<lambda>y. if y = fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) then Just ARMSection else gsUserPages ks y\<rparr>);
return $ arch_capability.PageCap d (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) VMReadWrite ARMSection None
od | SuperSectionObject \<Rightarrow> do placeNewDataObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) 12 d;
modify (\<lambda>ks. ks\<lparr>gsUserPages := \<lambda>y. if y = fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) then Just ARMSuperSection else gsUserPages ks y\<rparr>);
return $ arch_capability.PageCap d (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) VMReadWrite ARMSuperSection None
od | PageTableObject \<Rightarrow> do ptSize <- return (ptBits - objBits makeObject);
placeNewObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) makeObject ptSize;
return $ arch_capability.PageTableCap (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) Nothing
od | PageDirectoryObject \<Rightarrow> do pdSize <- return (pdBits - objBits makeObject);
regionSize <- return (1 `~shiftL~` pdBits);
placeNewObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) makeObject pdSize;
copyGlobalMappings (id (ptr + (word_of_nat n << APIType_capBits ty userSize)));
doMachineOp $ cleanCacheRange_PoU (VPtr $ fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize))) (VPtr $ fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) + regionSize - 1) (addrFromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)));
return $ arch_capability.PageDirectoryCap (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) Nothing
od \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 2. \<And>s. pspace_no_overlap' (ptr + (word_of_nat n << APIType_capBits ty userSize)) sz s \<and> pspace_aligned' s \<and> pspace_distinct' s \<and> range_cover ptr sz (APIType_capBits ty userSize) (n + 2) \<and> ptr \<noteq> 0 \<Longrightarrow> ?Q s proof (prove)
goal (8 subgoals):
 1. \<And>x1. ty = APIObjectType x1 \<Longrightarrow> \<lbrace>?R21 x1\<rbrace> haskell_fail [] \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 2. ty = SmallPageObject \<Longrightarrow> \<lbrace>?R19\<rbrace> do placeNewDataObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) 0 d;
modify (\<lambda>ks. ks\<lparr>gsUserPages := \<lambda>y. if y = fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) then Just ARMSmallPage else gsUserPages ks y\<rparr>);
return $ arch_capability.PageCap d (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) VMReadWrite ARMSmallPage None
od \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 3. ty = LargePageObject \<Longrightarrow> \<lbrace>?R18\<rbrace> do placeNewDataObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) 4 d;
modify (\<lambda>ks. ks\<lparr>gsUserPages := \<lambda>y. if y = fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) then Just ARMLargePage else gsUserPages ks y\<rparr>);
return $ arch_capability.PageCap d (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) VMReadWrite ARMLargePage None
od \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 4. ty = SectionObject \<Longrightarrow> \<lbrace>?R17\<rbrace> do placeNewDataObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) 8 d;
modify (\<lambda>ks. ks\<lparr>gsUserPages := \<lambda>y. if y = fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) then Just ARMSection else gsUserPages ks y\<rparr>);
return $ arch_capability.PageCap d (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) VMReadWrite ARMSection None
od \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 5. ty = SuperSectionObject \<Longrightarrow> \<lbrace>?R16\<rbrace> do placeNewDataObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) 12 d;
modify (\<lambda>ks. ks\<lparr>gsUserPages := \<lambda>y. if y = fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) then Just ARMSuperSection else gsUserPages ks y\<rparr>);
return $ arch_capability.PageCap d (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) VMReadWrite ARMSuperSection None
od \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 6. ty = PageTableObject \<Longrightarrow> \<lbrace>?R15\<rbrace> do ptSize <- return (ptBits - objBits makeObject);
placeNewObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) makeObject ptSize;
return $ arch_capability.PageTableCap (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) Nothing
od \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 7. ty = PageDirectoryObject \<Longrightarrow> \<lbrace>?R14\<rbrace> do pdSize <- return (pdBits - objBits makeObject);
regionSize <- return (1 `~shiftL~` pdBits);
placeNewObject (ptr + (word_of_nat n << APIType_capBits ty userSize)) makeObject pdSize;
copyGlobalMappings (id (ptr + (word_of_nat n << APIType_capBits ty userSize)));
doMachineOp $ cleanCacheRange_PoU (VPtr $ fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize))) (VPtr $ fromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)) + regionSize - 1) (addrFromPPtr (ptr + (word_of_nat n << APIType_capBits ty userSize)));
return $ arch_capability.PageDirectoryCap (id (ptr + (word_of_nat n << APIType_capBits ty userSize))) Nothing
od \<lbrace>\<lambda>archCap. pspace_no_overlap' (ptr + (1 + word_of_nat n << APIType_capBits ty userSize)) sz\<rbrace>
 8. \<And>s. pspace_no_overlap' (ptr + (word_of_nat n << APIType_capBits ty userSize)) sz s \<and> pspace_aligned' s \<and> pspace_distinct' s \<and> range_cover ptr sz (APIType_capBits ty userSize) (n + 2) \<and> ptr \<noteq> 0 \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> ?R21 x s) \<and> (ty = SmallPageObject \<longrightarrow> ?R19 s) \<and> (ty = LargePageObject \<longrightarrow> ?R18 s) \<and> (ty = SectionObject \<longrightarrow> ?R17 s) \<and> (ty = SuperSectionObject \<longrightarrow> ?R16 s) \<and> (ty = PageTableObject \<longrightarrow> ?R15 s) \<and> (ty = PageDirectoryObject \<longrightarrow> ?R14 s) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> ptr + (word_of_nat n << 12) \<noteq> 0) \<and> (ty = LargePageObject \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> ptr + (word_of_nat n << 16) \<noteq> 0) \<and> (ty = SectionObject \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> ptr + (word_of_nat n << 20) \<noteq> 0) \<and> (ty = SuperSectionObject \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> ptr + (word_of_nat n << 24) \<noteq> 0) \<and> (ty = PageTableObject \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> ptr + (word_of_nat n << 10) \<noteq> 0) \<and> (ty = PageDirectoryObject \<longrightarrow> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0\<rbrakk> \<Longrightarrow> n < Suc (Suc n)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize)\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0\<rbrakk> \<Longrightarrow> is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0\<rbrakk> \<Longrightarrow> is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize)\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (3 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0\<rbrakk> \<Longrightarrow> is_aligned (word_of_nat n << APIType_capBits ty userSize) (APIType_capBits ty userSize)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0\<rbrakk> \<Longrightarrow> APIType_capBits ty userSize \<le> (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)
 3. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize)\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0\<rbrakk> \<Longrightarrow> APIType_capBits ty userSize \<le> (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize)\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize)\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize)\<rbrakk> \<Longrightarrow> n < Suc (Suc n)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n) - n)\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2\<rbrakk> \<Longrightarrow> Suc (Suc 0) \<le> Suc (Suc n)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (3 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) \<le> ?ptr'199 s
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ?ptr'199 s && ~~ mask sz = ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) && ~~ mask sz
 3. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (?ptr'199 s) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (5 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> range_cover ptr (?sz203 s) (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (?t203 s)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> n + 1 < ?t203 s
 3. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr \<noteq> 0
 4. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) && ~~ mask sz = ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) && ~~ mask sz
 5. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) && ~~ mask sz = ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) && ~~ mask sz
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + ((word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) + 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) && ~~ mask sz = ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) && ~~ mask sz
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) + 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) && ~~ mask sz = ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) && ~~ mask sz
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (3 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> range_cover (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) \<noteq> 0
 3. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (4 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> n < Suc (Suc n)
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n) - n)\<rbrakk> \<Longrightarrow> range_cover (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))
 3. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) \<noteq> 0
 4. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (3 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n) - n)\<rbrakk> \<Longrightarrow> range_cover (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) \<noteq> 0
 3. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (3 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz s; pspace_aligned' s; pspace_distinct' s; ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + word_of_nat n * 2 ^ APIType_capBits ty userSize) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) \<noteq> 0
 3. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0))\<rbrakk> \<Longrightarrow> ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) \<noteq> 0
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> (\<forall>x. ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s) \<and> (ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s) \<and> (ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s) \<and> (ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s) \<and> (ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s) \<and> (ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s) \<and> (ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s) proof (prove)
goal (7 subgoals):
 1. \<And>s x. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> ty = APIObjectType x \<longrightarrow> pspace_no_overlap' (ptr + ((word_of_nat n << (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize)) + 2 ^ (case x of ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize))) sz s
 2. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> ty = SmallPageObject \<longrightarrow> ptr + (word_of_nat n << 12) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 12)) sz 12 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 12) + 0x1000)) sz s
 3. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> ty = LargePageObject \<longrightarrow> ptr + (word_of_nat n << 16) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 16)) sz 16 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 16) + 0x10000)) sz s
 4. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> ty = SectionObject \<longrightarrow> ptr + (word_of_nat n << 20) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 20)) sz 20 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 20) + 0x100000)) sz s
 5. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> ty = PageTableObject \<longrightarrow> ptr + (word_of_nat n << 10) \<noteq> 0 \<and> archObjSize (KOPTE makeObject) + (ptBits - archObjSize (KOPTE makeObject)) = 10 \<and> range_cover (ptr + (word_of_nat n << 10)) sz 10 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 10) + 0x400)) sz s
 6. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> ty = SuperSectionObject \<longrightarrow> ptr + (word_of_nat n << 24) \<noteq> 0 \<and> range_cover (ptr + (word_of_nat n << 24)) sz 24 (Suc (Suc 0)) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 24) + 0x1000000)) sz s
 7. \<And>s. \<lbrakk>pspace_no_overlap' (ptr + (word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s; pspace_aligned' s; pspace_distinct' s; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc n)); ptr \<noteq> 0; ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) \<noteq> 0; is_aligned (ptr + (word_of_nat n << APIType_capBits ty userSize)) (APIType_capBits ty userSize); range_cover (ptr + word_of_nat n * 2 ^ (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14)) sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) 2; range_cover ptr sz (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14) (Suc (Suc 0)); pspace_no_overlap' (ptr + (1 + word_of_nat n << (case ty of APIObjectType ArchTypes_H.apiobject_type.Untyped \<Rightarrow> userSize | APIObjectType ArchTypes_H.apiobject_type.TCBObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.EndpointObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.NotificationObject \<Rightarrow> objBits makeObject | APIObjectType ArchTypes_H.apiobject_type.CapTableObject \<Rightarrow> objBits makeObject + userSize | SmallPageObject \<Rightarrow> pageBitsForSize ARMSmallPage | LargePageObject \<Rightarrow> pageBitsForSize ARMLargePage | SectionObject \<Rightarrow> pageBitsForSize ARMSection | SuperSectionObject \<Rightarrow> pageBitsForSize ARMSuperSection | PageTableObject \<Rightarrow> 10 | PageDirectoryObject \<Rightarrow> 14))) sz s\<rbrakk> \<Longrightarrow> ty = PageDirectoryObject \<longrightarrow> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) < word_bits \<and> ptr + (word_of_nat n << 14) \<noteq> 0 \<and> pspace_no_overlap' (ptr + (word_of_nat n << 14)) sz s \<and> archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject)) = 14 \<and> is_aligned (ptr + (word_of_nat n << 14)) (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) \<and> range_cover (ptr + (word_of_nat n << 14)) sz 14 (Suc (Suc 0)) \<and> range_cover (ptr + (word_of_nat n << 14)) sz (archObjSize (KOPDE makeObject) + (pdBits - archObjSize (KOPDE makeObject))) (Suc 0) \<and> pspace_no_overlap' (ptr + ((word_of_nat n << 14) + 0x4000)) sz s proof (prove)
goal:
No subgoals!