theory Deterministic_AI

lemma next_sib_2_pinduct:
  "\<lbrakk>\<And>slot. \<lbrakk>\<And>a. \<lbrakk>slot \<in> descendants_of p (cdt s);
          next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some p\<rbrakk> \<Longrightarrow> P a\<rbrakk>
    \<Longrightarrow> P slot; valid_mdb s; valid_list s\<rbrakk>
      \<Longrightarrow> P slot" apply(rule_tac t=t and m=m in next_sib_2_pinduct') apply(rule next_sib_2_termination) apply(assumption)+ apply(fastforce) done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>slot. (\<And>a. \<lbrakk>slot \<in> descendants_of p (cdt s); next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some p\<rbrakk> \<Longrightarrow> P a) \<Longrightarrow> P slot; valid_mdb s; valid_list s\<rbrakk> \<Longrightarrow> P slot proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<And>slot. (\<And>a. \<lbrakk>slot \<in> descendants_of p (cdt s); next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some p\<rbrakk> \<Longrightarrow> P a) \<Longrightarrow> P slot; valid_mdb s; valid_list s\<rbrakk> \<Longrightarrow> next_sib_2_dom (slot, ?p, ?s)
 2. \<And>slot. \<lbrakk>\<And>slot. (\<And>a. \<lbrakk>slot \<in> descendants_of p (cdt s); next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some p\<rbrakk> \<Longrightarrow> P a) \<Longrightarrow> P slot; valid_mdb s; valid_list s; next_sib_2_dom (slot, ?p, ?s); \<And>a. \<lbrakk>slot \<in> descendants_of ?p (cdt ?s); next_slot slot (cdt_list ?s) (cdt ?s) = Some a; cdt ?s a \<noteq> Some ?p\<rbrakk> \<Longrightarrow> P a\<rbrakk> \<Longrightarrow> P slot proof (prove)
goal (3 subgoals):
 1. \<lbrakk>\<And>slot. (\<And>a. \<lbrakk>slot \<in> descendants_of p (cdt s); next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some p\<rbrakk> \<Longrightarrow> P a) \<Longrightarrow> P slot; valid_mdb s; valid_list s\<rbrakk> \<Longrightarrow> valid_mdb ?s
 2. \<lbrakk>\<And>slot. (\<And>a. \<lbrakk>slot \<in> descendants_of p (cdt s); next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some p\<rbrakk> \<Longrightarrow> P a) \<Longrightarrow> P slot; valid_mdb s; valid_list s\<rbrakk> \<Longrightarrow> valid_list ?s
 3. \<And>slot. \<lbrakk>\<And>slot. (\<And>a. \<lbrakk>slot \<in> descendants_of p (cdt s); next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some p\<rbrakk> \<Longrightarrow> P a) \<Longrightarrow> P slot; valid_mdb s; valid_list s; next_sib_2_dom (slot, ?p, ?s); \<And>a. \<lbrakk>slot \<in> descendants_of ?p (cdt ?s); next_slot slot (cdt_list ?s) (cdt ?s) = Some a; cdt ?s a \<noteq> Some ?p\<rbrakk> \<Longrightarrow> P a\<rbrakk> \<Longrightarrow> P slot proof (prove)
goal (1 subgoal):
 1. \<And>slot. \<lbrakk>\<And>slot. (\<And>a. \<lbrakk>slot \<in> descendants_of p (cdt s); next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some p\<rbrakk> \<Longrightarrow> P a) \<Longrightarrow> P slot; valid_mdb s; valid_list s; next_sib_2_dom (slot, ?p, s); \<And>a. \<lbrakk>slot \<in> descendants_of ?p (cdt s); next_slot slot (cdt_list s) (cdt s) = Some a; cdt s a \<noteq> Some ?p\<rbrakk> \<Longrightarrow> P a\<rbrakk> \<Longrightarrow> P slot proof (prove)
goal:
No subgoals!