src/HOL/Hoare_Parallel/OG_Hoare.thy
changeset 80914 d97fdabd9e2b
parent 67443 3abf6a722518
equal deleted inserted replaced
80913:46f59511b7bb 80914:d97fdabd9e2b
    32 definition interfree :: "(('a ann_triple_op) list) \<Rightarrow> bool" where
    32 definition interfree :: "(('a ann_triple_op) list) \<Rightarrow> bool" where
    33   "interfree Ts \<equiv> \<forall>i j. i < length Ts \<and> j < length Ts \<and> i \<noteq> j \<longrightarrow>
    33   "interfree Ts \<equiv> \<forall>i j. i < length Ts \<and> j < length Ts \<and> i \<noteq> j \<longrightarrow>
    34                          interfree_aux (com (Ts!i), post (Ts!i), com (Ts!j)) "
    34                          interfree_aux (com (Ts!i), post (Ts!i), com (Ts!j)) "
    35 
    35 
    36 inductive
    36 inductive
    37   oghoare :: "'a assn \<Rightarrow> 'a com \<Rightarrow> 'a assn \<Rightarrow> bool"  ("(3\<parallel>- _//_//_)" [90,55,90] 50)
    37   oghoare :: "'a assn \<Rightarrow> 'a com \<Rightarrow> 'a assn \<Rightarrow> bool"  (\<open>(3\<parallel>- _//_//_)\<close> [90,55,90] 50)
    38   and ann_hoare :: "'a ann_com \<Rightarrow> 'a assn \<Rightarrow> bool"  ("(2\<turnstile> _// _)" [60,90] 45)
    38   and ann_hoare :: "'a ann_com \<Rightarrow> 'a assn \<Rightarrow> bool"  (\<open>(2\<turnstile> _// _)\<close> [60,90] 45)
    39 where
    39 where
    40   AnnBasic: "r \<subseteq> {s. f s \<in> q} \<Longrightarrow> \<turnstile> (AnnBasic r f) q"
    40   AnnBasic: "r \<subseteq> {s. f s \<in> q} \<Longrightarrow> \<turnstile> (AnnBasic r f) q"
    41 
    41 
    42 | AnnSeq:   "\<lbrakk> \<turnstile> c0 pre c1; \<turnstile> c1 q \<rbrakk> \<Longrightarrow> \<turnstile> (AnnSeq c0 c1) q"
    42 | AnnSeq:   "\<lbrakk> \<turnstile> c0 pre c1; \<turnstile> c1 q \<rbrakk> \<Longrightarrow> \<turnstile> (AnnSeq c0 c1) q"
    43 
    43