[STATEMENT]
lemma (in antisym)
  "R x y --> R y z --> R x z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R x y \<longrightarrow> R y z \<longrightarrow> R x z
[PROOF STEP]
quickcheck[exhaustive, finite_type_size = 2, expect = no_counterexample]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R x y \<longrightarrow> R y z \<longrightarrow> R x z
[PROOF STEP]
quickcheck[exhaustive, expect = counterexample]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R x y \<longrightarrow> R y z \<longrightarrow> R x z
[PROOF STEP]
oops


[STATEMENT]
lemma (in Repoint_impl) Repoint_spec':
shows
  "\<forall>\<sigma>. \<Gamma>\<turnstile> {\<sigma>}
  \<acute>p :== PROC Repoint (\<acute>p)
  \<lbrace>\<forall> rept. ((Dag ((\<^bsup>\<sigma>\<^esup>rep \<propto> id) \<^bsup>\<sigma>\<^esup>p) (\<^bsup>\<sigma>\<^esup>rep \<propto> \<^bsup>\<sigma>\<^esup>low) (\<^bsup>\<sigma>\<^esup>rep \<propto> \<^bsup>\<sigma>\<^esup>high) rept)
  \<and> (\<forall> no \<in> set_of rept. \<^bsup>\<sigma>\<^esup>rep no = no))
  \<longrightarrow> Dag \<acute>p \<acute>low \<acute>high rept \<and>
  (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> \<^bsup>\<sigma>\<^esup>low pt = \<acute>low pt \<and> \<^bsup>\<sigma>\<^esup>high pt = \<acute>high pt)\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<sigma>. \<Gamma>\<turnstile> {\<sigma>} \<acute>p :== PROC Repoint(\<acute>p) \<lbrace>\<forall>rept. Dag ((\<^bsup>\<sigma>\<^esup>rep \<propto> id) \<^bsup>\<sigma>\<^esup>p) (\<^bsup>\<sigma>\<^esup>rep \<propto> \<^bsup>\<sigma>\<^esup>low) (\<^bsup>\<sigma>\<^esup>rep \<propto> \<^bsup>\<sigma>\<^esup>high) rept \<and> (\<forall>no\<in>set_of rept. \<^bsup>\<sigma>\<^esup>rep no = no) \<longrightarrow> Dag \<acute>p \<acute>low \<acute>high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> \<^bsup>\<sigma>\<^esup>low pt = pt\<rightarrow>\<acute>low \<and> \<^bsup>\<sigma>\<^esup>high pt = pt\<rightarrow>\<acute>high)\<rbrace>
[PROOF STEP]
apply (hoare_rule HoarePartial.ProcRec1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<sigma>. \<Gamma>,(\<Union>\<sigma>. {({\<sigma>}, Repoint_'proc, \<lbrace>\<forall>rept. Dag ((\<^bsup>\<sigma>\<^esup>rep \<propto> id) \<^bsup>\<sigma>\<^esup>p) (\<^bsup>\<sigma>\<^esup>rep \<propto> \<^bsup>\<sigma>\<^esup>low) (\<^bsup>\<sigma>\<^esup>rep \<propto> \<^bsup>\<sigma>\<^esup>high) rept \<and> (\<forall>no\<in>set_of rept. \<^bsup>\<sigma>\<^esup>rep no = no) \<longrightarrow> Dag \<acute>p \<acute>low \<acute>high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> \<^bsup>\<sigma>\<^esup>low pt = pt\<rightarrow>\<acute>low \<and> \<^bsup>\<sigma>\<^esup>high pt = pt\<rightarrow>\<acute>high)\<rbrace>, {})})\<turnstile> {\<sigma>} IF \<acute>p \<noteq> Null THEN \<acute>p :== \<acute>p\<rightarrow>\<acute>rep;; IF \<acute>p \<noteq> Null THEN \<acute>p\<rightarrow>\<acute>low :== CALL Repoint(\<acute>p\<rightarrow>\<acute>low);; \<acute>p\<rightarrow>\<acute>high :== CALL Repoint(\<acute>p\<rightarrow>\<acute>high) FI FI \<lbrace>\<forall>rept. Dag ((\<^bsup>\<sigma>\<^esup>rep \<propto> id) \<^bsup>\<sigma>\<^esup>p) (\<^bsup>\<sigma>\<^esup>rep \<propto> \<^bsup>\<sigma>\<^esup>low) (\<^bsup>\<sigma>\<^esup>rep \<propto> \<^bsup>\<sigma>\<^esup>high) rept \<and> (\<forall>no\<in>set_of rept. \<^bsup>\<sigma>\<^esup>rep no = no) \<longrightarrow> Dag \<acute>p \<acute>low \<acute>high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> \<^bsup>\<sigma>\<^esup>low pt = pt\<rightarrow>\<acute>low \<and> \<^bsup>\<sigma>\<^esup>high pt = pt\<rightarrow>\<acute>high)\<rbrace>
[PROOF STEP]
apply vcg
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>low high rep p. (p \<noteq> Null \<longrightarrow> (rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))) \<and> (\<not> rep p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt)))) \<and> (\<not> p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag p low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt)))
[PROOF STEP]
apply  (rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>low high rep p. p \<noteq> Null \<longrightarrow> (rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))) \<and> (\<not> rep p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt)))
 2. \<And>low high rep p. \<not> p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag p low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt))
[PROOF STEP]
apply  clarify
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> (rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))) \<and> (\<not> rep p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt)))
 2. \<And>low high rep p. \<not> p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag p low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt))
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>low high rep p. \<not> p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag p low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt))
 2. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> (rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))) \<and> (\<not> rep p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt)))
[PROOF STEP]
apply (intro impI allI )
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>low high rep p rept. \<lbrakk>\<not> p \<noteq> Null; Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no)\<rbrakk> \<Longrightarrow> Dag p low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt)
 2. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> (rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))) \<and> (\<not> rep p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt)))
[PROOF STEP]
apply (simp add: null_comp_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> (rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))) \<and> (\<not> rep p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt)))
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))
 2. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> \<not> rep p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt))
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> \<not> rep p \<noteq> Null \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) low high rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = low pt \<and> high pt = high pt))
 2. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))
[PROOF STEP]
apply (clarsimp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>low high rep p. p \<noteq> Null \<Longrightarrow> rep p \<noteq> Null \<longrightarrow> (\<forall>lowa higha pa. (\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)) \<longrightarrow> (\<forall>lowb highb pb. (\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)) \<longrightarrow> (\<forall>rept. Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt))))
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
fix low high p rep lowa higha pa lowb highb pb rept
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
assume p_nNull: "p \<noteq> Null"
[PROOF STATE]
proof (state)
this:
p \<noteq> Null

goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
assume rp_nNull: " rep p \<noteq> Null"
[PROOF STATE]
proof (state)
this:
rep p \<noteq> Null

goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
assume rec_spec_lrept:
    "\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept
    \<and> (\<forall>no\<in>set_of rept. rep no = no)
    \<longrightarrow> Dag pa lowa higha rept \<and>
        (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)"
[PROOF STATE]
proof (state)
this:
\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)

goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
assume rec_spec_rrept:
    "\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept
    \<and> (\<forall>no\<in>set_of rept. rep no = no)
    \<longrightarrow> Dag pb lowb highb rept \<and>
        (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)"
[PROOF STATE]
proof (state)
this:
\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)

goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
assume rept_dag: "Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept"
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept

goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
assume rno_rept: "\<forall>no\<in>set_of rept. rep no = no"
[PROOF STATE]
proof (state)
this:
\<forall>no\<in>set_of rept. rep no = no

goal (1 subgoal):
 1. \<And>low high rep p lowa higha pa lowb highb pb rept. \<lbrakk>p \<noteq> Null; rep p \<noteq> Null; \<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. rep no = no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
show " Dag (rep p) lowb (highb(rep p := pb)) rept \<and>
    (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
from rp_nNull rept_dag p_nNull
[PROOF STATE]
proof (chain)
picking this:
rep p \<noteq> Null
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
p \<noteq> Null
[PROOF STEP]
obtain lrept rrept where
      rept_def: "rept = Node lrept (rep p) rrept"
[PROOF STATE]
proof (prove)
using this:
rep p \<noteq> Null
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
p \<noteq> Null

goal (1 subgoal):
 1. (\<And>lrept rrept. rept = Node lrept (rep p) rrept \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rept = Node lrept (rep p) rrept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
with rept_dag p_nNull
[PROOF STATE]
proof (chain)
picking this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
p \<noteq> Null
rept = Node lrept (rep p) rrept
[PROOF STEP]
have lrept_dag:
      "Dag ((rep \<propto> low) (rep p)) (rep \<propto> low) (rep \<propto> high) lrept"
[PROOF STATE]
proof (prove)
using this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
p \<noteq> Null
rept = Node lrept (rep p) rrept

goal (1 subgoal):
 1. Dag ((rep \<propto> low) (rep p)) (rep \<propto> low) (rep \<propto> high) lrept
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> low) (rep p)) (rep \<propto> low) (rep \<propto> high) lrept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
from rept_def rept_dag p_nNull
[PROOF STATE]
proof (chain)
picking this:
rept = Node lrept (rep p) rrept
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
p \<noteq> Null
[PROOF STEP]
have rrept_dag:
      "Dag ((rep \<propto> high) (rep p)) (rep \<propto> low) (rep \<propto> high) rrept"
[PROOF STATE]
proof (prove)
using this:
rept = Node lrept (rep p) rrept
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
p \<noteq> Null

goal (1 subgoal):
 1. Dag ((rep \<propto> high) (rep p)) (rep \<propto> low) (rep \<propto> high) rrept
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> high) (rep p)) (rep \<propto> low) (rep \<propto> high) rrept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
from rno_rept rept_def
[PROOF STATE]
proof (chain)
picking this:
\<forall>no\<in>set_of rept. rep no = no
rept = Node lrept (rep p) rrept
[PROOF STEP]
have rno_lrept: "\<forall> no \<in> set_of lrept. rep no = no"
[PROOF STATE]
proof (prove)
using this:
\<forall>no\<in>set_of rept. rep no = no
rept = Node lrept (rep p) rrept

goal (1 subgoal):
 1. \<forall>no\<in>set_of lrept. rep no = no
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>no\<in>set_of lrept. rep no = no

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
from rno_rept rept_def
[PROOF STATE]
proof (chain)
picking this:
\<forall>no\<in>set_of rept. rep no = no
rept = Node lrept (rep p) rrept
[PROOF STEP]
have rno_rrept: "\<forall> no \<in> set_of rrept. rep no = no"
[PROOF STATE]
proof (prove)
using this:
\<forall>no\<in>set_of rept. rep no = no
rept = Node lrept (rep p) rrept

goal (1 subgoal):
 1. \<forall>no\<in>set_of rrept. rep no = no
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>no\<in>set_of rrept. rep no = no

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
have repoint_post_low:
      " Dag pa lowa higha lrept \<and>
      (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
from lrept_dag
[PROOF STATE]
proof (chain)
picking this:
Dag ((rep \<propto> low) (rep p)) (rep \<propto> low) (rep \<propto> high) lrept
[PROOF STEP]
have " Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept"
[PROOF STATE]
proof (prove)
using this:
Dag ((rep \<propto> low) (rep p)) (rep \<propto> low) (rep \<propto> high) lrept

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept
[PROOF STEP]
by (simp add: id_trans)
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept

goal (1 subgoal):
 1. Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
with  rec_spec_lrept rno_lrept
[PROOF STATE]
proof (chain)
picking this:
\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
\<forall>no\<in>set_of lrept. rep no = no
Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
\<forall>no\<in>set_of lrept. rep no = no
Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept

goal (1 subgoal):
 1. Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
apply -
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>rept. Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pa lowa higha rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); \<forall>no\<in>set_of lrept. rep no = no; Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept\<rbrakk> \<Longrightarrow> Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
apply (erule_tac x=lrept in allE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>no\<in>set_of lrept. rep no = no; Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept; Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept \<and> (\<forall>no\<in>set_of lrept. rep no = no) \<longrightarrow> Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)\<rbrakk> \<Longrightarrow> Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
apply (erule impE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<forall>no\<in>set_of lrept. rep no = no; Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept\<rbrakk> \<Longrightarrow> Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept \<and> (\<forall>no\<in>set_of lrept. rep no = no)
 2. \<lbrakk>\<forall>no\<in>set_of lrept. rep no = no; Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept; Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)\<rbrakk> \<Longrightarrow> Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>no\<in>set_of lrept. rep no = no; Dag ((rep \<propto> id) (low (rep p))) (rep \<propto> low) (rep \<propto> high) lrept; Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)\<rbrakk> \<Longrightarrow> Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
hence low_lowa_nc: "(\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)"
[PROOF STATE]
proof (prove)
using this:
Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)

goal (1 subgoal):
 1. \<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
from lrept_dag  repoint_post_low
[PROOF STATE]
proof (chain)
picking this:
Dag ((rep \<propto> low) (rep p)) (rep \<propto> low) (rep \<propto> high) lrept
Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)
[PROOF STEP]
obtain
      pa_def: "pa = (rep \<propto> low) (rep p)" and
      lowa_higha_def: "(\<forall> no \<in> set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no)"
[PROOF STATE]
proof (prove)
using this:
Dag ((rep \<propto> low) (rep p)) (rep \<propto> low) (rep \<propto> high) lrept
Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)

goal (1 subgoal):
 1. (\<lbrakk>pa = (rep \<propto> low) (rep p); \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply -
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>pa = (rep \<propto> low) (rep p); \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> thesis; Dag ((rep \<propto> low) (rep p)) (rep \<propto> low) (rep \<propto> high) lrept; Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
apply (drule Dags_eq_hp_eq)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<lbrakk>pa = (rep \<propto> low) (rep p); \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> thesis; Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt)\<rbrakk> \<Longrightarrow> Dag ?p'3 ?l'3 ?r'3 lrept
 2. \<lbrakk>\<lbrakk>pa = (rep \<propto> low) (rep p); \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> thesis; Dag pa lowa higha lrept \<and> (\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt); ?p'3 = (rep \<propto> low) (rep p) \<and> (\<forall>no\<in>set_of lrept. ?l'3 no = (rep \<propto> low) no \<and> ?r'3 no = (rep \<propto> high) no)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
pa = (rep \<propto> low) (rep p)
\<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
from rept_dag
[PROOF STATE]
proof (chain)
picking this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
[PROOF STEP]
have rept_DAG: "DAG rept"
[PROOF STATE]
proof (prove)
using this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept

goal (1 subgoal):
 1. DAG rept
[PROOF STEP]
by (rule Dag_is_DAG)
[PROOF STATE]
proof (state)
this:
DAG rept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
with rept_def
[PROOF STATE]
proof (chain)
picking this:
rept = Node lrept (rep p) rrept
DAG rept
[PROOF STEP]
have rp_notin_lrept: "rep p \<notin> set_of lrept"
[PROOF STATE]
proof (prove)
using this:
rept = Node lrept (rep p) rrept
DAG rept

goal (1 subgoal):
 1. rep p \<notin> set_of lrept
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rep p \<notin> set_of lrept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
from rept_DAG rept_def
[PROOF STATE]
proof (chain)
picking this:
DAG rept
rept = Node lrept (rep p) rrept
[PROOF STEP]
have rp_notin_rrept: "rep p \<notin> set_of rrept"
[PROOF STATE]
proof (prove)
using this:
DAG rept
rept = Node lrept (rep p) rrept

goal (1 subgoal):
 1. rep p \<notin> set_of rrept
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rep p \<notin> set_of rrept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
have "Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
from low_lowa_nc rp_notin_lrept
[PROOF STATE]
proof (chain)
picking this:
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
rep p \<notin> set_of lrept
[PROOF STEP]
have "(rep \<propto> high) (rep p) = (rep \<propto> higha) (rep p)"
[PROOF STATE]
proof (prove)
using this:
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
rep p \<notin> set_of lrept

goal (1 subgoal):
 1. (rep \<propto> high) (rep p) = (rep \<propto> higha) (rep p)
[PROOF STEP]
by (auto simp add: null_comp_def)
[PROOF STATE]
proof (state)
this:
(rep \<propto> high) (rep p) = (rep \<propto> higha) (rep p)

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
with rrept_dag
[PROOF STATE]
proof (chain)
picking this:
Dag ((rep \<propto> high) (rep p)) (rep \<propto> low) (rep \<propto> high) rrept
(rep \<propto> high) (rep p) = (rep \<propto> higha) (rep p)
[PROOF STEP]
have higha_mixed_rrept:
        "Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept"
[PROOF STATE]
proof (prove)
using this:
Dag ((rep \<propto> high) (rep p)) (rep \<propto> low) (rep \<propto> high) rrept
(rep \<propto> high) (rep p) = (rep \<propto> higha) (rep p)

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept
[PROOF STEP]
by (simp add: id_trans)
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
thm low_high_exchange_dag
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
with low_lowa_nc lowa_higha_def rno_rrept
[PROOF STATE]
proof (chain)
picking this:
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
\<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no
\<forall>no\<in>set_of rrept. rep no = no
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept
[PROOF STEP]
have lowa_higha_rrept:
        "Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept"
[PROOF STATE]
proof (prove)
using this:
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
\<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no
\<forall>no\<in>set_of rrept. rep no = no
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept
[PROOF STEP]
apply -
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt; \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no; \<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept\<rbrakk> \<Longrightarrow> Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept
[PROOF STEP]
apply (rule low_high_exchange_dag)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt; \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no; \<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept\<rbrakk> \<Longrightarrow> \<forall>pt. pt \<notin> set_of ?lt4 \<longrightarrow> ?low4 pt = lowa pt \<and> ?high4 pt = higha pt
 2. \<lbrakk>\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt; \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no; \<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept\<rbrakk> \<Longrightarrow> \<forall>pt\<in>set_of ?lt4. lowa pt = (rep \<propto> ?low4) pt \<and> higha pt = (rep \<propto> ?high4) pt
 3. \<lbrakk>\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt; \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no; \<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept\<rbrakk> \<Longrightarrow> \<forall>pt\<in>set_of rrept. rep pt = pt
 4. \<lbrakk>\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt; \<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no; \<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> low) (rep \<propto> high) rrept\<rbrakk> \<Longrightarrow> Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> ?low4) (rep \<propto> ?high4) rrept
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
have "Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept =
        Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept = Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept = Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
have "\<forall> no \<in> set_of rrept. (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and>
          (rep \<propto> higha) no = (rep \<propto> higha) no"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>no\<in>set_of rrept. (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>no. no \<in> set_of rrept \<Longrightarrow> (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no
[PROOF STEP]
fix no
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>no. no \<in> set_of rrept \<Longrightarrow> (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no
[PROOF STEP]
assume no_in_rrept: "no \<in> set_of rrept"
[PROOF STATE]
proof (state)
this:
no \<in> set_of rrept

goal (1 subgoal):
 1. \<And>no. no \<in> set_of rrept \<Longrightarrow> (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no
[PROOF STEP]
with rp_notin_rrept
[PROOF STATE]
proof (chain)
picking this:
rep p \<notin> set_of rrept
no \<in> set_of rrept
[PROOF STEP]
have "no \<noteq> rep p"
[PROOF STATE]
proof (prove)
using this:
rep p \<notin> set_of rrept
no \<in> set_of rrept

goal (1 subgoal):
 1. no \<noteq> rep p
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
no \<noteq> rep p

goal (1 subgoal):
 1. \<And>no. no \<in> set_of rrept \<Longrightarrow> (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no
[PROOF STEP]
thus "(rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and>
            (rep \<propto> higha) no = (rep \<propto> higha) no"
[PROOF STATE]
proof (prove)
using this:
no \<noteq> rep p

goal (1 subgoal):
 1. (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no
[PROOF STEP]
by (simp add: null_comp_def)
[PROOF STATE]
proof (state)
this:
(rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>no\<in>set_of rrept. (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept = Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>no\<in>set_of rrept. (rep \<propto> lowa) no = (rep \<propto> lowa(rep p := pa)) no \<and> (rep \<propto> higha) no = (rep \<propto> higha) no

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept = Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
by (rule heaps_eq_Dag_eq)
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept = Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept = Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
with lowa_higha_rrept
[PROOF STATE]
proof (chain)
picking this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept = Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa) (rep \<propto> higha) rrept = Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept

goal (1 subgoal):
 1. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
with rec_spec_rrept rno_rrept
[PROOF STATE]
proof (chain)
picking this:
\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
\<forall>no\<in>set_of rrept. rep no = no
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept
[PROOF STEP]
have repoint_rrept: "Dag pb lowb highb rrept \<and>
      (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow>
      (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)"
[PROOF STATE]
proof (prove)
using this:
\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
\<forall>no\<in>set_of rrept. rep no = no
Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept

goal (1 subgoal):
 1. Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
[PROOF STEP]
apply -
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>rept. Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rept \<and> (\<forall>no\<in>set_of rept. rep no = no) \<longrightarrow> Dag pb lowb highb rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); \<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept\<rbrakk> \<Longrightarrow> Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
[PROOF STEP]
apply (erule_tac x=rrept in allE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept \<and> (\<forall>no\<in>set_of rrept. rep no = no) \<longrightarrow> Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)\<rbrakk> \<Longrightarrow> Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
[PROOF STEP]
apply (erule impE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept\<rbrakk> \<Longrightarrow> Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept \<and> (\<forall>no\<in>set_of rrept. rep no = no)
 2. \<lbrakk>\<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept; Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)\<rbrakk> \<Longrightarrow> Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>no\<in>set_of rrept. rep no = no; Dag ((rep \<propto> id) (higha (rep p))) (rep \<propto> lowa(rep p := pa)) (rep \<propto> higha) rrept; Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)\<rbrakk> \<Longrightarrow> Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
[PROOF STEP]
have ab_nc: "(\<forall>pt. pt \<notin> set_of rrept \<longrightarrow>
      (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)"
[PROOF STATE]
proof (prove)
using this:
Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)

goal (1 subgoal):
 1. \<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
from repoint_rrept rrept_dag
[PROOF STATE]
proof (chain)
picking this:
Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
Dag ((rep \<propto> high) (rep p)) (rep \<propto> low) (rep \<propto> high) rrept
[PROOF STEP]
obtain
      pb_def: "pb = ((rep \<propto> high) (rep p))" and
      lowb_highb_def: "(\<forall> no \<in> set_of rrept. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no)"
[PROOF STATE]
proof (prove)
using this:
Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)
Dag ((rep \<propto> high) (rep p)) (rep \<propto> low) (rep \<propto> high) rrept

goal (1 subgoal):
 1. (\<lbrakk>pb = (rep \<propto> high) (rep p); \<forall>no\<in>set_of rrept. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply -
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>pb = (rep \<propto> high) (rep p); \<forall>no\<in>set_of rrept. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> thesis; Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); Dag ((rep \<propto> high) (rep p)) (rep \<propto> low) (rep \<propto> high) rrept\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
apply (drule Dags_eq_hp_eq)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<lbrakk>pb = (rep \<propto> high) (rep p); \<forall>no\<in>set_of rrept. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> thesis; Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt)\<rbrakk> \<Longrightarrow> Dag ?p'3 ?l'3 ?r'3 rrept
 2. \<lbrakk>\<lbrakk>pb = (rep \<propto> high) (rep p); \<forall>no\<in>set_of rrept. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> thesis; Dag pb lowb highb rrept \<and> (\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt); ?p'3 = (rep \<propto> high) (rep p) \<and> (\<forall>no\<in>set_of rrept. ?l'3 no = (rep \<propto> low) no \<and> ?r'3 no = (rep \<propto> high) no)\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
pb = (rep \<propto> high) (rep p)
\<forall>no\<in>set_of rrept. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
have rept_end_dag: " Dag (rep p) lowb (highb(rep p := pb)) rept"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept
[PROOF STEP]
have "\<forall> no \<in> set_of rept. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>no\<in>set_of rept. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>no. no \<in> set_of rept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
fix no
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>no. no \<in> set_of rept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
assume no_in_rept: " no \<in> set_of rept"
[PROOF STATE]
proof (state)
this:
no \<in> set_of rept

goal (1 subgoal):
 1. \<And>no. no \<in> set_of rept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
show "lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
proof (cases "no \<in> set_of rrept")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. no \<in> set_of rrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
 2. no \<notin> set_of rrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
no \<in> set_of rrept

goal (2 subgoals):
 1. no \<in> set_of rrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
 2. no \<notin> set_of rrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
with lowb_highb_def pb_def
[PROOF STATE]
proof (chain)
picking this:
\<forall>no\<in>set_of rrept. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no
pb = (rep \<propto> high) (rep p)
no \<in> set_of rrept
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>no\<in>set_of rrept. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no
pb = (rep \<propto> high) (rep p)
no \<in> set_of rrept

goal (1 subgoal):
 1. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no

goal (1 subgoal):
 1. no \<notin> set_of rrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. no \<notin> set_of rrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
assume no_notin_rrept: " no \<notin> set_of rrept"
[PROOF STATE]
proof (state)
this:
no \<notin> set_of rrept

goal (1 subgoal):
 1. no \<notin> set_of rrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
proof (cases "no \<in> set_of lrept")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. no \<in> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
 2. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
no \<in> set_of lrept

goal (2 subgoals):
 1. no \<in> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
 2. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
with no_notin_rrept rp_notin_lrept ab_nc
[PROOF STATE]
proof (chain)
picking this:
no \<notin> set_of rrept
rep p \<notin> set_of lrept
\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt
no \<in> set_of lrept
[PROOF STEP]
have ab_nc_no: "lowa no = lowb no \<and> higha no = highb no"
[PROOF STATE]
proof (prove)
using this:
no \<notin> set_of rrept
rep p \<notin> set_of lrept
\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt
no \<in> set_of lrept

goal (1 subgoal):
 1. lowa no = lowb no \<and> higha no = highb no
[PROOF STEP]
apply -
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>no \<notin> set_of rrept; rep p \<notin> set_of lrept; \<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt; no \<in> set_of lrept\<rbrakk> \<Longrightarrow> lowa no = lowb no \<and> higha no = highb no
[PROOF STEP]
apply (erule_tac x=no in allE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>no \<notin> set_of rrept; rep p \<notin> set_of lrept; no \<in> set_of lrept; no \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) no = lowb no \<and> higha no = highb no\<rbrakk> \<Longrightarrow> lowa no = lowb no \<and> higha no = highb no
[PROOF STEP]
apply (erule impE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>no \<notin> set_of rrept; rep p \<notin> set_of lrept; no \<in> set_of lrept\<rbrakk> \<Longrightarrow> no \<notin> set_of rrept
 2. \<lbrakk>no \<notin> set_of rrept; rep p \<notin> set_of lrept; no \<in> set_of lrept; (lowa(rep p := pa)) no = lowb no \<and> higha no = highb no\<rbrakk> \<Longrightarrow> lowa no = lowb no \<and> higha no = highb no
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>no \<notin> set_of rrept; rep p \<notin> set_of lrept; no \<in> set_of lrept; (lowa(rep p := pa)) no = lowb no \<and> higha no = highb no\<rbrakk> \<Longrightarrow> lowa no = lowb no \<and> higha no = highb no
[PROOF STEP]
apply (subgoal_tac "no \<noteq> rep p")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>no \<notin> set_of rrept; rep p \<notin> set_of lrept; no \<in> set_of lrept; (lowa(rep p := pa)) no = lowb no \<and> higha no = highb no; no \<noteq> rep p\<rbrakk> \<Longrightarrow> lowa no = lowb no \<and> higha no = highb no
 2. \<lbrakk>no \<notin> set_of rrept; rep p \<notin> set_of lrept; no \<in> set_of lrept; (lowa(rep p := pa)) no = lowb no \<and> higha no = highb no\<rbrakk> \<Longrightarrow> no \<noteq> rep p
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>no \<notin> set_of rrept; rep p \<notin> set_of lrept; no \<in> set_of lrept; (lowa(rep p := pa)) no = lowb no \<and> higha no = highb no\<rbrakk> \<Longrightarrow> no \<noteq> rep p
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
lowa no = lowb no \<and> higha no = highb no

goal (2 subgoals):
 1. no \<in> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
 2. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
from lowa_higha_def True
[PROOF STATE]
proof (chain)
picking this:
\<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no
no \<in> set_of lrept
[PROOF STEP]
have
              "lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no"
[PROOF STATE]
proof (prove)
using this:
\<forall>no\<in>set_of lrept. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no
no \<in> set_of lrept

goal (1 subgoal):
 1. lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no

goal (2 subgoals):
 1. no \<in> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
 2. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
with ab_nc_no
[PROOF STATE]
proof (chain)
picking this:
lowa no = lowb no \<and> higha no = highb no
lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no
[PROOF STEP]
have "lowb no = (rep \<propto> low) no \<and> highb no =(rep \<propto> high) no"
[PROOF STATE]
proof (prove)
using this:
lowa no = lowb no \<and> higha no = highb no
lowa no = (rep \<propto> low) no \<and> higha no = (rep \<propto> high) no

goal (1 subgoal):
 1. lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no

goal (2 subgoals):
 1. no \<in> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
 2. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
with rp_notin_lrept True
[PROOF STATE]
proof (chain)
picking this:
rep p \<notin> set_of lrept
no \<in> set_of lrept
lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
rep p \<notin> set_of lrept
no \<in> set_of lrept
lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no

goal (1 subgoal):
 1. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
apply (subgoal_tac "no \<noteq> rep p")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>rep p \<notin> set_of lrept; no \<in> set_of lrept; lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no; no \<noteq> rep p\<rbrakk> \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
 2. \<lbrakk>rep p \<notin> set_of lrept; no \<in> set_of lrept; lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> no \<noteq> rep p
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>rep p \<notin> set_of lrept; no \<in> set_of lrept; lowb no = (rep \<propto> low) no \<and> highb no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> no \<noteq> rep p
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no

goal (1 subgoal):
 1. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
assume no_notin_lrept: " no \<notin> set_of lrept"
[PROOF STATE]
proof (state)
this:
no \<notin> set_of lrept

goal (1 subgoal):
 1. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
with no_in_rept rept_def no_notin_rrept
[PROOF STATE]
proof (chain)
picking this:
no \<in> set_of rept
rept = Node lrept (rep p) rrept
no \<notin> set_of rrept
no \<notin> set_of lrept
[PROOF STEP]
have no_rp: "no = rep p"
[PROOF STATE]
proof (prove)
using this:
no \<in> set_of rept
rept = Node lrept (rep p) rrept
no \<notin> set_of rrept
no \<notin> set_of lrept

goal (1 subgoal):
 1. no = rep p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
no = rep p

goal (1 subgoal):
 1. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
with rp_notin_lrept low_lowa_nc
[PROOF STATE]
proof (chain)
picking this:
rep p \<notin> set_of lrept
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
no = rep p
[PROOF STEP]
have a_nc:
              "low no = lowa no \<and> high no = higha no"
[PROOF STATE]
proof (prove)
using this:
rep p \<notin> set_of lrept
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
no = rep p

goal (1 subgoal):
 1. low no = lowa no \<and> high no = higha no
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
low no = lowa no \<and> high no = higha no

goal (1 subgoal):
 1. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
from rp_notin_rrept no_rp ab_nc
[PROOF STATE]
proof (chain)
picking this:
rep p \<notin> set_of rrept
no = rep p
\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt
[PROOF STEP]
have
              "(lowa(rep p := pa)) no = lowb no \<and> higha no = highb no"
[PROOF STATE]
proof (prove)
using this:
rep p \<notin> set_of rrept
no = rep p
\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt

goal (1 subgoal):
 1. (lowa(rep p := pa)) no = lowb no \<and> higha no = highb no
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(lowa(rep p := pa)) no = lowb no \<and> higha no = highb no

goal (1 subgoal):
 1. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
with a_nc pa_def no_rp
[PROOF STATE]
proof (chain)
picking this:
low no = lowa no \<and> high no = higha no
pa = (rep \<propto> low) (rep p)
no = rep p
(lowa(rep p := pa)) no = lowb no \<and> higha no = highb no
[PROOF STEP]
have "(rep \<propto> low) no = lowb no \<and> high no = highb no"
[PROOF STATE]
proof (prove)
using this:
low no = lowa no \<and> high no = higha no
pa = (rep \<propto> low) (rep p)
no = rep p
(lowa(rep p := pa)) no = lowb no \<and> higha no = highb no

goal (1 subgoal):
 1. (rep \<propto> low) no = lowb no \<and> high no = highb no
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(rep \<propto> low) no = lowb no \<and> high no = highb no

goal (1 subgoal):
 1. no \<notin> set_of lrept \<Longrightarrow> lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
with pb_def no_rp
[PROOF STATE]
proof (chain)
picking this:
pb = (rep \<propto> high) (rep p)
no = rep p
(rep \<propto> low) no = lowb no \<and> high no = highb no
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
pb = (rep \<propto> high) (rep p)
no = rep p
(rep \<propto> low) no = lowb no \<and> high no = highb no

goal (1 subgoal):
 1. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>no\<in>set_of rept. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept
[PROOF STEP]
with rept_dag
[PROOF STATE]
proof (chain)
picking this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
\<forall>no\<in>set_of rept. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no
[PROOF STEP]
have " Dag (rep p) lowb (highb(rep p := pb)) rept =
        Dag (rep p) (rep \<propto> low) (rep \<propto> high) rept"
[PROOF STATE]
proof (prove)
using this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
\<forall>no\<in>set_of rept. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept = Dag (rep p) (rep \<propto> low) (rep \<propto> high) rept
[PROOF STEP]
apply -
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept = Dag (rep p) (rep \<propto> low) (rep \<propto> high) rept
[PROOF STEP]
thm heaps_eq_Dag_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> Dag (rep p) lowb (highb(rep p := pb)) rept = Dag (rep p) (rep \<propto> low) (rep \<propto> high) rept
[PROOF STEP]
apply (rule heaps_eq_Dag_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept; \<forall>no\<in>set_of rept. lowb no = (rep \<propto> low) no \<and> (highb(rep p := pb)) no = (rep \<propto> high) no\<rbrakk> \<Longrightarrow> \<forall>x\<in>set_of rept. lowb x = (rep \<propto> low) x \<and> (highb(rep p := pb)) x = (rep \<propto> high) x
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
Dag (rep p) lowb (highb(rep p := pb)) rept = Dag (rep p) (rep \<propto> low) (rep \<propto> high) rept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept
[PROOF STEP]
with rept_dag p_nNull
[PROOF STATE]
proof (chain)
picking this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
p \<noteq> Null
Dag (rep p) lowb (highb(rep p := pb)) rept = Dag (rep p) (rep \<propto> low) (rep \<propto> high) rept
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Dag ((rep \<propto> id) p) (rep \<propto> low) (rep \<propto> high) rept
p \<noteq> Null
Dag (rep p) lowb (highb(rep p := pb)) rept = Dag (rep p) (rep \<propto> low) (rep \<propto> high) rept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Dag (rep p) lowb (highb(rep p := pb)) rept

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Dag (rep p) lowb (highb(rep p := pb)) rept

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
have "(\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt
[PROOF STEP]
proof (intro allI impI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>pt. pt \<notin> set_of rept \<Longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt
[PROOF STEP]
fix pt
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>pt. pt \<notin> set_of rept \<Longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt
[PROOF STEP]
assume pt_notin_rept: "pt \<notin> set_of rept"
[PROOF STATE]
proof (state)
this:
pt \<notin> set_of rept

goal (1 subgoal):
 1. \<And>pt. pt \<notin> set_of rept \<Longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt
[PROOF STEP]
with rept_def
[PROOF STATE]
proof (chain)
picking this:
rept = Node lrept (rep p) rrept
pt \<notin> set_of rept
[PROOF STEP]
obtain
        pt_notin_lrept: "pt \<notin> set_of lrept" and
        pt_notin_rrept: "pt \<notin> set_of rrept" and
        pt_neq_rp: "pt \<noteq> rep p"
[PROOF STATE]
proof (prove)
using this:
rept = Node lrept (rep p) rrept
pt \<notin> set_of rept

goal (1 subgoal):
 1. (\<lbrakk>pt \<notin> set_of lrept; pt \<notin> set_of rrept; pt \<noteq> rep p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pt \<notin> set_of lrept
pt \<notin> set_of rrept
pt \<noteq> rep p

goal (1 subgoal):
 1. \<And>pt. pt \<notin> set_of rept \<Longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt
[PROOF STEP]
with low_lowa_nc ab_nc
[PROOF STATE]
proof (chain)
picking this:
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt
pt \<notin> set_of lrept
pt \<notin> set_of rrept
pt \<noteq> rep p
[PROOF STEP]
show "low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt"
[PROOF STATE]
proof (prove)
using this:
\<forall>pt. pt \<notin> set_of lrept \<longrightarrow> low pt = lowa pt \<and> high pt = higha pt
\<forall>pt. pt \<notin> set_of rrept \<longrightarrow> (lowa(rep p := pa)) pt = lowb pt \<and> higha pt = highb pt
pt \<notin> set_of lrept
pt \<notin> set_of rrept
pt \<noteq> rep p

goal (1 subgoal):
 1. low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
with rept_end_dag
[PROOF STATE]
proof (chain)
picking this:
Dag (rep p) lowb (highb(rep p := pb)) rept
\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Dag (rep p) lowb (highb(rep p := pb)) rept
\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt

goal (1 subgoal):
 1. Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Dag (rep p) lowb (highb(rep p := pb)) rept \<and> (\<forall>pt. pt \<notin> set_of rept \<longrightarrow> low pt = lowb pt \<and> high pt = (highb(rep p := pb)) pt)

goal:
No subgoals!
[PROOF STEP]
qed