l_to_tree_order_wf_axioms_def: fixes heap_is_wellformed :: "(_) heap \<Rightarrow> bool"   and parent_child_rel :: "(_) heap \<Rightarrow> ((_) object_ptr \<times> (_) object_ptr) set"   and type_wf :: "(_) heap \<Rightarrow> bool"   and known_ptrs :: "(_) heap \<Rightarrow> bool"   and to_tree_order :: "(_) object_ptr \<Rightarrow> ((_) heap, exception, (_) object_ptr list) prog"   and get_parent :: "(_) node_ptr \<Rightarrow> ((_) heap, exception, (_) object_ptr option) prog"   and get_child_nodes :: "(_) object_ptr \<Rightarrow> ((_) heap, exception, (_) node_ptr list) prog" shows "l_to_tree_order_wf_axioms heap_is_wellformed parent_child_rel type_wf known_ptrs to_tree_order get_parent get_child_nodes \<equiv> (((\<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 to_tree_order ptr) \<and> (\<forall>h ptr to ptr'. heap_is_wellformed h \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r to \<longrightarrow> ptr' \<in> set to \<longrightarrow> ptr' |\<in>| object_ptr_kinds h)) \<and> (\<forall>h ptr to child_ptr. heap_is_wellformed h \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r to \<longrightarrow> ((ptr, child_ptr) \<in> (parent_child_rel h)\<^sup>*) = (child_ptr \<in> set to)) \<and> (\<forall>h ptr nodes child thesis. heap_is_wellformed h \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r nodes \<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 \<noteq> ptr \<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 \<in> set nodes \<longrightarrow> (\<forall>parent. h \<turnstile> get_parent child \<rightarrow>\<^sub>r Some parent \<longrightarrow> parent \<in> set nodes \<longrightarrow> thesis) \<longrightarrow> thesis)) \<and> ((\<forall>h ptr nodes ptr'. heap_is_wellformed h \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r nodes \<longrightarrow> ptr' \<noteq> ptr \<longrightarrow> ptr' \<in> set nodes \<longrightarrow> is_node_ptr_kind ptr') \<and> (\<forall>h ptr nodes parent children child. heap_is_wellformed h \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r nodes \<longrightarrow> h \<turnstile> get_child_nodes parent \<rightarrow>\<^sub>r 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 child \<noteq> ptr \<longrightarrow> 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 child \<in> set nodes \<longrightarrow> parent \<in> set nodes)) \<and> (\<forall>h ptr nodes. h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r nodes \<longrightarrow> ptr \<in> set nodes) \<and> (\<forall>h ptr nodes child parent. heap_is_wellformed h \<longrightarrow> type_wf h \<longrightarrow> known_ptrs h \<longrightarrow> h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r nodes \<longrightarrow> h \<turnstile> get_parent child \<rightarrow>\<^sub>r Some parent \<longrightarrow> parent \<in> set nodes \<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 \<in> set nodes) \<and> (\<forall>h ptr nodes node nodes'. heap_is_wellformed h \<longrightarrow> h \<turnstile> to_tree_order ptr \<rightarrow>\<^sub>r nodes \<longrightarrow> node \<in> set nodes \<longrightarrow> h \<turnstile> to_tree_order node \<rightarrow>\<^sub>r nodes' \<longrightarrow> known_ptrs h \<longrightarrow> type_wf h \<longrightarrow> set nodes' \<subseteq> set nodes)"