l_get_ancestors_wf_axioms_def: fixes heap_is_wellformed :: "(_) heap \<Rightarrow> bool"   and parent_child_rel :: "(_) heap \<Rightarrow> ((_) object_ptr \<times> (_) object_ptr) set"   and known_ptrs :: "(_) heap \<Rightarrow> bool"   and type_wf :: "(_) heap \<Rightarrow> bool"   and get_ancestors :: "(_) object_ptr \<Rightarrow> ((_) heap, exception, (_) object_ptr list) prog"   and get_ancestors_locs :: "((_) heap \<Rightarrow> (_) heap \<Rightarrow> bool) set"   and get_child_nodes :: "(_) object_ptr \<Rightarrow> ((_) heap, exception, (_) node_ptr list) prog"   and get_parent :: "(_) node_ptr \<Rightarrow> ((_) heap, exception, (_) object_ptr option) prog" shows "l_get_ancestors_wf_axioms heap_is_wellformed parent_child_rel known_ptrs type_wf get_ancestors get_ancestors_locs get_child_nodes get_parent \<equiv> (((\<forall>h child ancestors. heap_is_wellformed h \<longrightarrow> h \<turnstile> get_ancestors child \<rightarrow>\<^sub>r ancestors \<longrightarrow> ancestors \<noteq> []) \<and> (\<forall>h ptr. heap_is_wellformed h \<longrightarrow> ptr |\<in>| object_ptr_kinds h \<longrightarrow> known_ptrs h \<longrightarrow> type_wf h \<longrightarrow> h \<turnstile> ok get_ancestors ptr)) \<and> (\<forall>h node_ptr h'. heap_is_wellformed h \<longrightarrow> reads get_ancestors_locs (get_ancestors node_ptr) h h') \<and> (\<forall>h ptr ancestors ptr'. heap_is_wellformed h \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> h \<turnstile> get_ancestors ptr \<rightarrow>\<^sub>r ancestors \<longrightarrow> ptr' \<in> set ancestors \<longrightarrow> ptr' |\<in>| object_ptr_kinds h)) \<and> ((\<forall>h h' ptr ancestors ancestors' node. heap_is_wellformed h \<longrightarrow> heap_is_wellformed h' \<longrightarrow> h \<turnstile> get_ancestors ptr \<rightarrow>\<^sub>r ancestors \<longrightarrow> h' \<turnstile> get_ancestors ptr \<rightarrow>\<^sub>r ancestors' \<longrightarrow> (\<forall>p children children'. h \<turnstile> get_child_nodes p \<rightarrow>\<^sub>r children \<longrightarrow> h' \<turnstile> get_child_nodes p \<rightarrow>\<^sub>r children' \<longrightarrow> set children' \<subseteq> set children) \<longrightarrow> node \<notin> set ancestors \<longrightarrow> object_ptr_kinds h = object_ptr_kinds h' \<longrightarrow> known_ptrs h \<longrightarrow> type_wf h \<longrightarrow> type_wf h' \<longrightarrow> node \<notin> set ancestors') \<and> (\<forall>h some_ptr ancestors child_node parent. heap_is_wellformed h \<longrightarrow> h \<turnstile> get_ancestors some_ptr \<rightarrow>\<^sub>r ancestors \<longrightarrow> cast\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>o\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r child_node \<in> set ancestors \<longrightarrow> h \<turnstile> get_parent child_node \<rightarrow>\<^sub>r Some parent \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> parent \<in> set ancestors)) \<and> (\<forall>h ancestor ptr ancestors thesis. heap_is_wellformed h \<longrightarrow> ancestor \<noteq> ptr \<longrightarrow> ancestor \<in> set ancestors \<longrightarrow> h \<turnstile> get_ancestors ptr \<rightarrow>\<^sub>r ancestors \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> (\<forall>children ancestor_child. h \<turnstile> get_child_nodes ancestor \<rightarrow>\<^sub>r children \<longrightarrow> ancestor_child \<in> set children \<longrightarrow> cast\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>o\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r ancestor_child \<in> set ancestors \<longrightarrow> thesis) \<longrightarrow> thesis) \<and> (\<forall>h child ancestors ptr. heap_is_wellformed h \<longrightarrow> h \<turnstile> get_ancestors child \<rightarrow>\<^sub>r ancestors \<longrightarrow> known_ptrs h \<longrightarrow> type_wf h \<longrightarrow> ((ptr, child) \<in> (parent_child_rel h)\<^sup>*) = (ptr \<in> set ancestors))"