[STATEMENT]
lemma trm_sound:
  fixes \<theta>::"trm"
  shows "([\<theta>]\<nu>' \<down> r) \<Longrightarrow> (\<nu> REP \<nu>') \<Longrightarrow>   ([\<theta>]<>\<nu>) \<equiv>\<^sub>P r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
proof (induction rule: rtsem.induct)
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>w r \<nu>'. \<lbrakk>Rep_bword w \<equiv>\<^sub>E r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Const w]<>\<nu> \<equiv>\<^sub>P r
 2. \<And>x \<nu>'. \<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 6. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 7. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 8. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
case rtsem_Const
[PROOF STATE]
proof (state)
this:
Rep_bword w_ \<equiv>\<^sub>E r_
\<nu> REP \<nu>_

goal (8 subgoals):
 1. \<And>w r \<nu>'. \<lbrakk>Rep_bword w \<equiv>\<^sub>E r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Const w]<>\<nu> \<equiv>\<^sub>P r
 2. \<And>x \<nu>'. \<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 6. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 7. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 8. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
fix w r \<nu>'
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>w r \<nu>'. \<lbrakk>Rep_bword w \<equiv>\<^sub>E r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Const w]<>\<nu> \<equiv>\<^sub>P r
 2. \<And>x \<nu>'. \<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 6. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 7. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 8. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
show "Rep_bword w \<equiv>\<^sub>E r \<Longrightarrow> \<nu> REP \<nu>' \<Longrightarrow> [Const w]<>\<nu> \<equiv>\<^sub>P r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Rep_bword w \<equiv>\<^sub>E r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Const w]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
using repU_def repL_def repP_def repe.simps rep_simps repstate_simps
[PROOF STATE]
proof (prove)
using this:
?w \<equiv>\<^sub>U ?r \<equiv> \<exists>r'\<ge>?r. ?w \<equiv>\<^sub>E r'
?w \<equiv>\<^sub>L ?r \<equiv> \<exists>r'\<le>?r. ?w \<equiv>\<^sub>E r'
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)
(?a1.0 \<equiv>\<^sub>E ?a2.0) = ((\<exists>r. ?a1.0 = POS_INF \<and> ?a2.0 = r \<and> real_of_int (sint POS_INF) \<le> r) \<or> (\<exists>r. ?a1.0 = NEG_INF \<and> ?a2.0 = r \<and> r \<le> real_of_int (sint NEG_INF)) \<or> (\<exists>w. ?a1.0 = w \<and> ?a2.0 = real_of_int (sint w) \<and> real_of_int (sint w) < real_of_int (sint POS_INF) \<and> real_of_int (sint NEG_INF) < real_of_int (sint w)))
(POS_INF \<equiv>\<^sub>E ?r) = (2147483647 \<le> ?r)
(NEG_INF \<equiv>\<^sub>E ?r) = (?r \<le> - 2147483647)
(?w \<equiv>\<^sub>E real_of_int (sint ?w)) = (?w = 0x7FFFFFFF \<and> 2147483647 \<le> signed_real_of_word ?w \<or> ?w = 0x80000001 \<and> signed_real_of_word ?w \<le> - 2147483647 \<or> sint ?w < 2147483647 \<and> - 2147483647 < sint ?w)
(?\<nu> REP ?\<nu>') = (\<forall>x. (?\<nu> (Inl x) \<equiv>\<^sub>L ?\<nu>' x) \<and> (?\<nu> (Inr x) \<equiv>\<^sub>U ?\<nu>' x))

goal (1 subgoal):
 1. \<lbrakk>Rep_bword w \<equiv>\<^sub>E r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Const w]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>Rep_bword w \<equiv>\<^sub>E r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Const w]<>\<nu> \<equiv>\<^sub>P r

goal (7 subgoals):
 1. \<And>x \<nu>'. \<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 6. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 7. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x \<nu>'. \<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 6. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 7. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
case rtsem_Var
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>_

goal (7 subgoals):
 1. \<And>x \<nu>'. \<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 6. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 7. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
fix x \<nu>'
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x \<nu>'. \<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 6. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 7. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
show "\<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x
[PROOF STEP]
by(auto simp add: repU_def repL_def repP_def repe.simps rep_simps repstate_simps)
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [Var x]<>\<nu> \<equiv>\<^sub>P \<nu>' x

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
case rtsem_Plus
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1_]\<nu>_ \<down> r1_
[\<theta>\<^sub>2_]\<nu>_ \<down> r2_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>1_]<>\<nu> \<equiv>\<^sub>P r1_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>2_]<>\<nu> \<equiv>\<^sub>P r2_
\<nu> REP \<nu>_

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
fix \<theta>\<^sub>1 :: "trm" and \<nu>':: "rstate" and r1 and \<theta>\<^sub>2 :: "trm" and  r2
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume rep:"\<nu> REP \<nu>'"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>'

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval1:"[\<theta>\<^sub>1]\<nu>' \<down> r1"
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1]\<nu>' \<down> r1

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1)"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
have IH1:"[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (1 subgoal):
 1. [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval2:"[\<theta>\<^sub>2]\<nu>' \<down> r2"
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>2]\<nu>' \<down> r2

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2)"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
have IH2:"[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (1 subgoal):
 1. [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
obtain l1 u1 l2 u2 where
        lu1:"(l1, u1) = ([\<theta>\<^sub>1]<> \<nu>)"
    and lu2:"(l2, u2) = ([\<theta>\<^sub>2]<> \<nu>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>l1 u1 l2 u2. \<lbrakk>(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>); (l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using IH1 IH2 repP_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)

goal (1 subgoal):
 1. (\<And>l1 u1 l2 u2. \<lbrakk>(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>); (l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>)
(l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
from lu1 and lu2
[PROOF STATE]
proof (chain)
picking this:
(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>)
(l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)
[PROOF STEP]
have
        lu1':"([\<theta>\<^sub>1]<> \<nu>) = (l1, u1)"
    and lu2':"([\<theta>\<^sub>2]<> \<nu>) = (l2, u2)"
[PROOF STATE]
proof (prove)
using this:
(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>)
(l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)

goal (1 subgoal):
 1. ([\<theta>\<^sub>1]<>\<nu>) = (l1, u1) &&& ([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have l1:"l1 \<equiv>\<^sub>L r1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l1 \<equiv>\<^sub>L r1
[PROOF STEP]
using IH1 lu1
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>)

goal (1 subgoal):
 1. l1 \<equiv>\<^sub>L r1
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
let (w1, w2) = [\<theta>\<^sub>1]<>\<nu> in (w1 \<equiv>\<^sub>L r1) \<and> (w2 \<equiv>\<^sub>U r1)
(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>)

goal (1 subgoal):
 1. l1 \<equiv>\<^sub>L r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l1 \<equiv>\<^sub>L r1

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have u1:"u1 \<equiv>\<^sub>U r1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u1 \<equiv>\<^sub>U r1
[PROOF STEP]
using IH1 lu1
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>)

goal (1 subgoal):
 1. u1 \<equiv>\<^sub>U r1
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
let (w1, w2) = [\<theta>\<^sub>1]<>\<nu> in (w1 \<equiv>\<^sub>L r1) \<and> (w2 \<equiv>\<^sub>U r1)
(l1, u1) = ([\<theta>\<^sub>1]<>\<nu>)

goal (1 subgoal):
 1. u1 \<equiv>\<^sub>U r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u1 \<equiv>\<^sub>U r1

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have l2:"l2 \<equiv>\<^sub>L r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l2 \<equiv>\<^sub>L r2
[PROOF STEP]
using IH2 lu2
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
(l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)

goal (1 subgoal):
 1. l2 \<equiv>\<^sub>L r2
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
let (w1, w2) = [\<theta>\<^sub>2]<>\<nu> in (w1 \<equiv>\<^sub>L r2) \<and> (w2 \<equiv>\<^sub>U r2)
(l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)

goal (1 subgoal):
 1. l2 \<equiv>\<^sub>L r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l2 \<equiv>\<^sub>L r2

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have u2:"u2 \<equiv>\<^sub>U r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u2 \<equiv>\<^sub>U r2
[PROOF STEP]
using IH2 lu2
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
(l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)

goal (1 subgoal):
 1. u2 \<equiv>\<^sub>U r2
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
let (w1, w2) = [\<theta>\<^sub>2]<>\<nu> in (w1 \<equiv>\<^sub>L r2) \<and> (w2 \<equiv>\<^sub>U r2)
(l2, u2) = ([\<theta>\<^sub>2]<>\<nu>)

goal (1 subgoal):
 1. u2 \<equiv>\<^sub>U r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u2 \<equiv>\<^sub>U r2

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u2 \<equiv>\<^sub>U r2
[PROOF STEP]
have "([(Plus \<theta>\<^sub>1 \<theta>\<^sub>2)]<>\<nu>) = (pl l1 l2, pu u1 u2)"
[PROOF STATE]
proof (prove)
using this:
u2 \<equiv>\<^sub>U r2

goal (1 subgoal):
 1. ([Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (pl l1 l2, pu u1 u2)
[PROOF STEP]
using lu1' lu2'
[PROOF STATE]
proof (prove)
using this:
u2 \<equiv>\<^sub>U r2
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. ([Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (pl l1 l2, pu u1 u2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (pl l1 l2, pu u1 u2)

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have lBound:"(pl l1 l2 \<equiv>\<^sub>L r1 + r2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pl l1 l2 \<equiv>\<^sub>L r1 + r2
[PROOF STEP]
using l1 l2 pl_lemma
[PROOF STATE]
proof (prove)
using this:
l1 \<equiv>\<^sub>L r1
l2 \<equiv>\<^sub>L r2
\<lbrakk>?w1.0 \<equiv>\<^sub>L ?r1.0; ?w2.0 \<equiv>\<^sub>L ?r2.0\<rbrakk> \<Longrightarrow> pl ?w1.0 ?w2.0 \<equiv>\<^sub>L ?r1.0 + ?r2.0

goal (1 subgoal):
 1. pl l1 l2 \<equiv>\<^sub>L r1 + r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pl l1 l2 \<equiv>\<^sub>L r1 + r2

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have uBound:"(pu u1 u2 \<equiv>\<^sub>U r1 + r2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pu u1 u2 \<equiv>\<^sub>U r1 + r2
[PROOF STEP]
using pu_lemma[OF u1 u2]
[PROOF STATE]
proof (prove)
using this:
pu u1 u2 \<equiv>\<^sub>U r1 + r2

goal (1 subgoal):
 1. pu u1 u2 \<equiv>\<^sub>U r1 + r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pu u1 u2 \<equiv>\<^sub>U r1 + r2

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have "(pl l1 l2, pu u1 u2) \<equiv>\<^sub>P (r1 + r2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (pl l1 l2, pu u1 u2) \<equiv>\<^sub>P r1 + r2
[PROOF STEP]
unfolding repP_def Let_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. case (pl l1 l2, pu u1 u2) of (w1, w2) \<Rightarrow> (w1 \<equiv>\<^sub>L r1 + r2) \<and> (w2 \<equiv>\<^sub>U r1 + r2)
[PROOF STEP]
using lBound uBound
[PROOF STATE]
proof (prove)
using this:
pl l1 l2 \<equiv>\<^sub>L r1 + r2
pu u1 u2 \<equiv>\<^sub>U r1 + r2

goal (1 subgoal):
 1. case (pl l1 l2, pu u1 u2) of (w1, w2) \<Rightarrow> (w1 \<equiv>\<^sub>L r1 + r2) \<and> (w2 \<equiv>\<^sub>U r1 + r2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(pl l1 l2, pu u1 u2) \<equiv>\<^sub>P r1 + r2

goal (6 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 5. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 6. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(pl l1 l2, pu u1 u2) \<equiv>\<^sub>P r1 + r2
[PROOF STEP]
show"[Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2"
[PROOF STATE]
proof (prove)
using this:
(pl l1 l2, pu u1 u2) \<equiv>\<^sub>P r1 + r2

goal (1 subgoal):
 1. [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
[PROOF STEP]
using lu1' lu2'
[PROOF STATE]
proof (prove)
using this:
(pl l1 l2, pu u1 u2) \<equiv>\<^sub>P r1 + r2
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. [Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[Plus \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 + r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
case rtsem_Times
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1_]\<nu>_ \<down> r1_
[\<theta>\<^sub>2_]\<nu>_ \<down> r2_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>1_]<>\<nu> \<equiv>\<^sub>P r1_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>2_]<>\<nu> \<equiv>\<^sub>P r2_
\<nu> REP \<nu>_

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
fix \<theta>\<^sub>1 :: "trm" and \<nu>' r1 and \<theta>\<^sub>2 :: "trm" and r2
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval1:"[\<theta>\<^sub>1]\<nu>' \<down> r1"
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1]\<nu>' \<down> r1

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval2:"[\<theta>\<^sub>2]\<nu>' \<down> r2"
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>2]\<nu>' \<down> r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume rep:"\<nu> REP \<nu>'"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>'

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> ([\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1))"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
have IH1:"[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (1 subgoal):
 1. [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> ([\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2))"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
have IH2:"[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (1 subgoal):
 1. [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
obtain l1 u1 l2 u2 where
        lu1:"([\<theta>\<^sub>1]<> \<nu>) = (l1, u1) "
    and lu2:"([\<theta>\<^sub>2]<> \<nu>) = (l2, u2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>l1 u1 l2 u2. \<lbrakk>([\<theta>\<^sub>1]<>\<nu>) = (l1, u1); ([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using IH1 IH2 repP_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)

goal (1 subgoal):
 1. (\<And>l1 u1 l2 u2. \<lbrakk>([\<theta>\<^sub>1]<>\<nu>) = (l1, u1); ([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have l1:"l1 \<equiv>\<^sub>L r1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l1 \<equiv>\<^sub>L r1
[PROOF STEP]
using IH1 lu1
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)

goal (1 subgoal):
 1. l1 \<equiv>\<^sub>L r1
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
let (w1, w2) = [\<theta>\<^sub>1]<>\<nu> in (w1 \<equiv>\<^sub>L r1) \<and> (w2 \<equiv>\<^sub>U r1)
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)

goal (1 subgoal):
 1. l1 \<equiv>\<^sub>L r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l1 \<equiv>\<^sub>L r1

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have u1:"u1 \<equiv>\<^sub>U r1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u1 \<equiv>\<^sub>U r1
[PROOF STEP]
using IH1 lu1
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)

goal (1 subgoal):
 1. u1 \<equiv>\<^sub>U r1
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
let (w1, w2) = [\<theta>\<^sub>1]<>\<nu> in (w1 \<equiv>\<^sub>L r1) \<and> (w2 \<equiv>\<^sub>U r1)
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)

goal (1 subgoal):
 1. u1 \<equiv>\<^sub>U r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u1 \<equiv>\<^sub>U r1

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have l2:"l2 \<equiv>\<^sub>L r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l2 \<equiv>\<^sub>L r2
[PROOF STEP]
using IH2 lu2
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. l2 \<equiv>\<^sub>L r2
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
let (w1, w2) = [\<theta>\<^sub>2]<>\<nu> in (w1 \<equiv>\<^sub>L r2) \<and> (w2 \<equiv>\<^sub>U r2)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. l2 \<equiv>\<^sub>L r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l2 \<equiv>\<^sub>L r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have u2:"u2 \<equiv>\<^sub>U r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u2 \<equiv>\<^sub>U r2
[PROOF STEP]
using IH2 lu2
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. u2 \<equiv>\<^sub>U r2
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
let (w1, w2) = [\<theta>\<^sub>2]<>\<nu> in (w1 \<equiv>\<^sub>L r2) \<and> (w2 \<equiv>\<^sub>U r2)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. u2 \<equiv>\<^sub>U r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u2 \<equiv>\<^sub>U r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u2 \<equiv>\<^sub>U r2
[PROOF STEP]
have "([(Times \<theta>\<^sub>1  \<theta>\<^sub>2)]<>\<nu>) = (tl l1 u1 l2 u2, tu l1 u1 l2 u2)"
[PROOF STATE]
proof (prove)
using this:
u2 \<equiv>\<^sub>U r2

goal (1 subgoal):
 1. ([Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2)
[PROOF STEP]
using lu1 lu2
[PROOF STATE]
proof (prove)
using this:
u2 \<equiv>\<^sub>U r2
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. ([Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2)
[PROOF STEP]
unfolding wTimesU Let_def
[PROOF STATE]
proof (prove)
using this:
u2 \<equiv>\<^sub>U r2
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. (case [\<theta>\<^sub>1]<>\<nu> of (l1, u1) \<Rightarrow> case [\<theta>\<^sub>2]<>\<nu> of (l2, u2) \<Rightarrow> (Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2)) = (Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2)

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have lBound:"(tl l1 u1 l2 u2 \<equiv>\<^sub>L r1 * r2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Interval_Word32.tl l1 u1 l2 u2 \<equiv>\<^sub>L r1 * r2
[PROOF STEP]
using l1 u1 l2 u2 tl_lemma
[PROOF STATE]
proof (prove)
using this:
l1 \<equiv>\<^sub>L r1
u1 \<equiv>\<^sub>U r1
l2 \<equiv>\<^sub>L r2
u2 \<equiv>\<^sub>U r2
\<lbrakk>?u\<^sub>1 \<equiv>\<^sub>U ?r1.0; ?u\<^sub>2 \<equiv>\<^sub>U ?r2.0; ?l\<^sub>1 \<equiv>\<^sub>L ?r1.0; ?l\<^sub>2 \<equiv>\<^sub>L ?r2.0\<rbrakk> \<Longrightarrow> Interval_Word32.tl ?l\<^sub>1 ?u\<^sub>1 ?l\<^sub>2 ?u\<^sub>2 \<equiv>\<^sub>L ?r1.0 * ?r2.0

goal (1 subgoal):
 1. Interval_Word32.tl l1 u1 l2 u2 \<equiv>\<^sub>L r1 * r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Interval_Word32.tl l1 u1 l2 u2 \<equiv>\<^sub>L r1 * r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have uBound:"(tu l1 u1 l2 u2 \<equiv>\<^sub>U r1 * r2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tu l1 u1 l2 u2 \<equiv>\<^sub>U r1 * r2
[PROOF STEP]
using l1 u1 l2 u2 tu_lemma
[PROOF STATE]
proof (prove)
using this:
l1 \<equiv>\<^sub>L r1
u1 \<equiv>\<^sub>U r1
l2 \<equiv>\<^sub>L r2
u2 \<equiv>\<^sub>U r2
\<lbrakk>?u\<^sub>1 \<equiv>\<^sub>U ?r1.0; ?u\<^sub>2 \<equiv>\<^sub>U ?r2.0; ?l\<^sub>1 \<equiv>\<^sub>L ?r1.0; ?l\<^sub>2 \<equiv>\<^sub>L ?r2.0\<rbrakk> \<Longrightarrow> tu ?l\<^sub>1 ?u\<^sub>1 ?l\<^sub>2 ?u\<^sub>2 \<equiv>\<^sub>U ?r1.0 * ?r2.0

goal (1 subgoal):
 1. tu l1 u1 l2 u2 \<equiv>\<^sub>U r1 * r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
tu l1 u1 l2 u2 \<equiv>\<^sub>U r1 * r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have "(tl l1 u1 l2 u2, tu l1 u1 l2 u2) \<equiv>\<^sub>P (r1 * r2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2) \<equiv>\<^sub>P r1 * r2
[PROOF STEP]
unfolding repP_def Let_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. case (Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2) of (w1, w2) \<Rightarrow> (w1 \<equiv>\<^sub>L r1 * r2) \<and> (w2 \<equiv>\<^sub>U r1 * r2)
[PROOF STEP]
using lBound uBound
[PROOF STATE]
proof (prove)
using this:
Interval_Word32.tl l1 u1 l2 u2 \<equiv>\<^sub>L r1 * r2
tu l1 u1 l2 u2 \<equiv>\<^sub>U r1 * r2

goal (1 subgoal):
 1. case (Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2) of (w1, w2) \<Rightarrow> (w1 \<equiv>\<^sub>L r1 * r2) \<and> (w2 \<equiv>\<^sub>U r1 * r2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2) \<equiv>\<^sub>P r1 * r2

goal (5 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 4. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 5. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2) \<equiv>\<^sub>P r1 * r2
[PROOF STEP]
show "[Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2"
[PROOF STATE]
proof (prove)
using this:
(Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2) \<equiv>\<^sub>P r1 * r2

goal (1 subgoal):
 1. [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
[PROOF STEP]
using lu1 lu2
[PROOF STATE]
proof (prove)
using this:
(Interval_Word32.tl l1 u1 l2 u2, tu l1 u1 l2 u2) \<equiv>\<^sub>P r1 * r2
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. [Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[Times \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r1 * r2

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
case rtsem_Max
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1_]\<nu>_ \<down> r1_
[\<theta>\<^sub>2_]\<nu>_ \<down> r2_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>1_]<>\<nu> \<equiv>\<^sub>P r1_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>2_]<>\<nu> \<equiv>\<^sub>P r2_
\<nu> REP \<nu>_

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
fix \<theta>\<^sub>1 :: "trm" and \<nu>' r1 and \<theta>\<^sub>2 :: "trm" and  r2
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval1:"([\<theta>\<^sub>1]\<nu>' \<down> r1)"
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1]\<nu>' \<down> r1

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval2:"([\<theta>\<^sub>2]\<nu>' \<down> r2)"
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>2]\<nu>' \<down> r2

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume rep:"\<nu> REP \<nu>'"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>'

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1)"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
have IH1:"[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (1 subgoal):
 1. [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2)"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
have IH2:"[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (1 subgoal):
 1. [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
obtain l1 u1 l2 u2 where
        lu1:"([\<theta>\<^sub>1]<> \<nu>) = (l1, u1)"
    and lu2:"([\<theta>\<^sub>2]<> \<nu>) = (l2, u2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>l1 u1 l2 u2. \<lbrakk>([\<theta>\<^sub>1]<>\<nu>) = (l1, u1); ([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using IH1 IH2 repP_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)

goal (1 subgoal):
 1. (\<And>l1 u1 l2 u2. \<lbrakk>([\<theta>\<^sub>1]<>\<nu>) = (l1, u1); ([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
from IH1 IH2
[PROOF STATE]
proof (chain)
picking this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
obtain ub1 ub2 lb1 lb2:: real
   where urep1:"(ub1 \<ge> r1) \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1)"
   and   urep2:"(ub2 \<ge> r2) \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2)"
   and   lrep1:"(lb1 \<le> r1) \<and> (fst ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E lb1)"
   and   lrep2:"(lb2 \<le> r2) \<and> (fst ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E lb2)"
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (1 subgoal):
 1. (\<And>ub1 ub2 lb1 lb2. \<lbrakk>r1 \<le> ub1 \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1); r2 \<le> ub2 \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2); lb1 \<le> r1 \<and> (fst ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E lb1); lb2 \<le> r2 \<and> (fst ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E lb2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using repP_def repU_def repL_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)
?w \<equiv>\<^sub>U ?r \<equiv> \<exists>r'\<ge>?r. ?w \<equiv>\<^sub>E r'
?w \<equiv>\<^sub>L ?r \<equiv> \<exists>r'\<le>?r. ?w \<equiv>\<^sub>E r'

goal (1 subgoal):
 1. (\<And>ub1 ub2 lb1 lb2. \<lbrakk>r1 \<le> ub1 \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1); r2 \<le> ub2 \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2); lb1 \<le> r1 \<and> (fst ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E lb1); lb2 \<le> r2 \<and> (fst ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E lb2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r1 \<le> ub1 \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1)
r2 \<le> ub2 \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2)
lb1 \<le> r1 \<and> (fst ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E lb1)
lb2 \<le> r2 \<and> (fst ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E lb2)

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have lbound:"wmax l1 l2 \<equiv>\<^sub>L max r1 r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wmax l1 l2 \<equiv>\<^sub>L max r1 r2
[PROOF STEP]
by (metis dual_order.trans fst_conv le_cases lrep1 lrep2 lu1 lu2 max_def repL_def wmax.elims)
[PROOF STATE]
proof (state)
this:
wmax l1 l2 \<equiv>\<^sub>L max r1 r2

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have ubound:"wmax u1 u2 \<equiv>\<^sub>U max r1 r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wmax u1 u2 \<equiv>\<^sub>U max r1 r2
[PROOF STEP]
by (metis real_max_mono lu1 lu2 repU_def snd_conv urep1 urep2 wmax_lemma)
[PROOF STATE]
proof (state)
this:
wmax u1 u2 \<equiv>\<^sub>U max r1 r2

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have "([trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmax l1 l2, wmax u1 u2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmax l1 l2, wmax u1 u2)
[PROOF STEP]
using lu1 lu2
[PROOF STATE]
proof (prove)
using this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. ([trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmax l1 l2, wmax u1 u2)
[PROOF STEP]
unfolding wMaxU Let_def
[PROOF STATE]
proof (prove)
using this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. (case [\<theta>\<^sub>1]<>\<nu> of (l1, u1) \<Rightarrow> case [\<theta>\<^sub>2]<>\<nu> of (l2, u2) \<Rightarrow> (wmax l1 l2, wmax u1 u2)) = (wmax l1 l2, wmax u1 u2)
[PROOF STEP]
by (simp)
[PROOF STATE]
proof (state)
this:
([trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmax l1 l2, wmax u1 u2)

goal (4 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 3. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 4. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
([trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmax l1 l2, wmax u1 u2)
[PROOF STEP]
show "[trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2"
[PROOF STATE]
proof (prove)
using this:
([trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmax l1 l2, wmax u1 u2)

goal (1 subgoal):
 1. [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
([trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmax l1 l2, wmax u1 u2)

goal (1 subgoal):
 1. let (w1, w2) = [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> in (w1 \<equiv>\<^sub>L max r1 r2) \<and> (w2 \<equiv>\<^sub>U max r1 r2)
[PROOF STEP]
using lbound ubound lu1 lu2
[PROOF STATE]
proof (prove)
using this:
([trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmax l1 l2, wmax u1 u2)
wmax l1 l2 \<equiv>\<^sub>L max r1 r2
wmax u1 u2 \<equiv>\<^sub>U max r1 r2
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. let (w1, w2) = [trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> in (w1 \<equiv>\<^sub>L max r1 r2) \<and> (w2 \<equiv>\<^sub>U max r1 r2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[trm.Max \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P max r1 r2

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
case rtsem_Min
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1_]\<nu>_ \<down> r1_
[\<theta>\<^sub>2_]\<nu>_ \<down> r2_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>1_]<>\<nu> \<equiv>\<^sub>P r1_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>2_]<>\<nu> \<equiv>\<^sub>P r2_
\<nu> REP \<nu>_

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
fix \<theta>\<^sub>1 :: "trm" and \<nu>' r1 and \<theta>\<^sub>2 :: "trm" and  r2
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval1:"([\<theta>\<^sub>1]\<nu>' \<down> r1)"
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1]\<nu>' \<down> r1

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval2:"([\<theta>\<^sub>2]\<nu>' \<down> r2)"
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>2]\<nu>' \<down> r2

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume rep:"\<nu> REP \<nu>'"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>'

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1)"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
have IH1:"[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (1 subgoal):
 1. [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2)"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
have IH2:"[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (1 subgoal):
 1. [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
obtain l1 u1 l2 u2 where
        lu1:"([\<theta>\<^sub>1]<> \<nu>) = (l1, u1)"
    and lu2:"([\<theta>\<^sub>2]<> \<nu>) = (l2, u2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>l1 u1 l2 u2. \<lbrakk>([\<theta>\<^sub>1]<>\<nu>) = (l1, u1); ([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using IH1 IH2 repP_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)

goal (1 subgoal):
 1. (\<And>l1 u1 l2 u2. \<lbrakk>([\<theta>\<^sub>1]<>\<nu>) = (l1, u1); ([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
from IH1 IH2
[PROOF STATE]
proof (chain)
picking this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
[PROOF STEP]
obtain ub1 ub2 lb1 lb2:: real
   where urep1:"(ub1 \<ge> r1) \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1)"
   and   urep2:"(ub2 \<ge> r2) \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2)"
   and   lrep1:"(lb1 \<le> r1) \<and> (fst ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E lb1)"
   and   lrep2:"(lb2 \<le> r2) \<and> (fst ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E lb2)"
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2

goal (1 subgoal):
 1. (\<And>ub1 ub2 lb1 lb2. \<lbrakk>r1 \<le> ub1 \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1); r2 \<le> ub2 \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2); lb1 \<le> r1 \<and> (fst ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E lb1); lb2 \<le> r2 \<and> (fst ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E lb2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using prod.case_eq_if repP_def  repU_def repL_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1
[\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2
(case ?prod of (x, xa) \<Rightarrow> ?f x xa) = ?f (fst ?prod) (snd ?prod)
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)
?w \<equiv>\<^sub>U ?r \<equiv> \<exists>r'\<ge>?r. ?w \<equiv>\<^sub>E r'
?w \<equiv>\<^sub>L ?r \<equiv> \<exists>r'\<le>?r. ?w \<equiv>\<^sub>E r'

goal (1 subgoal):
 1. (\<And>ub1 ub2 lb1 lb2. \<lbrakk>r1 \<le> ub1 \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1); r2 \<le> ub2 \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2); lb1 \<le> r1 \<and> (fst ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E lb1); lb2 \<le> r2 \<and> (fst ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E lb2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r1 \<le> ub1 \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1)
r2 \<le> ub2 \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2)
lb1 \<le> r1 \<and> (fst ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E lb1)
lb2 \<le> r2 \<and> (fst ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E lb2)

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have lbound:"wmin l1 l2 \<equiv>\<^sub>L min r1 r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wmin l1 l2 \<equiv>\<^sub>L min r1 r2
[PROOF STEP]
by (metis fst_conv lrep1 lrep2 lu1 lu2 min.mono repL_def wmin_lemma)
[PROOF STATE]
proof (state)
this:
wmin l1 l2 \<equiv>\<^sub>L min r1 r2

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have ubound:"wmin u1 u2 \<equiv>\<^sub>U min r1 r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wmin u1 u2 \<equiv>\<^sub>U min r1 r2
[PROOF STEP]
using lu1 lu2 min_le_iff_disj repU_def urep1 urep2
[PROOF STATE]
proof (prove)
using this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)
(min ?x ?y \<le> ?z) = (?x \<le> ?z \<or> ?y \<le> ?z)
?w \<equiv>\<^sub>U ?r \<equiv> \<exists>r'\<ge>?r. ?w \<equiv>\<^sub>E r'
r1 \<le> ub1 \<and> (snd ([\<theta>\<^sub>1]<>\<nu>) \<equiv>\<^sub>E ub1)
r2 \<le> ub2 \<and> (snd ([\<theta>\<^sub>2]<>\<nu>) \<equiv>\<^sub>E ub2)

goal (1 subgoal):
 1. wmin u1 u2 \<equiv>\<^sub>U min r1 r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wmin u1 u2 \<equiv>\<^sub>U min r1 r2

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have "([Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmin l1 l2, wmin u1 u2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmin l1 l2, wmin u1 u2)
[PROOF STEP]
using lu1 lu2
[PROOF STATE]
proof (prove)
using this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. ([trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmin l1 l2, wmin u1 u2)
[PROOF STEP]
unfolding wMinU Let_def
[PROOF STATE]
proof (prove)
using this:
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. (case [\<theta>\<^sub>1]<>\<nu> of (l1, u1) \<Rightarrow> case [\<theta>\<^sub>2]<>\<nu> of (l2, u2) \<Rightarrow> (wmin l1 l2, wmin u1 u2)) = (wmin l1 l2, wmin u1 u2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmin l1 l2, wmin u1 u2)

goal (3 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1 \<theta>\<^sub>2 r2. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; [\<theta>\<^sub>2]\<nu>' \<down> r2; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P r2; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
 2. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 3. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
([trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmin l1 l2, wmin u1 u2)
[PROOF STEP]
show "[Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2"
[PROOF STATE]
proof (prove)
using this:
([trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmin l1 l2, wmin u1 u2)

goal (1 subgoal):
 1. [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2
[PROOF STEP]
unfolding repP_def
[PROOF STATE]
proof (prove)
using this:
([trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmin l1 l2, wmin u1 u2)

goal (1 subgoal):
 1. let (w1, w2) = [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> in (w1 \<equiv>\<^sub>L min r1 r2) \<and> (w2 \<equiv>\<^sub>U min r1 r2)
[PROOF STEP]
using lbound ubound lu1 lu2
[PROOF STATE]
proof (prove)
using this:
([trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu>) = (wmin l1 l2, wmin u1 u2)
wmin l1 l2 \<equiv>\<^sub>L min r1 r2
wmin u1 u2 \<equiv>\<^sub>U min r1 r2
([\<theta>\<^sub>1]<>\<nu>) = (l1, u1)
([\<theta>\<^sub>2]<>\<nu>) = (l2, u2)

goal (1 subgoal):
 1. let (w1, w2) = [trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> in (w1 \<equiv>\<^sub>L min r1 r2) \<and> (w2 \<equiv>\<^sub>U min r1 r2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[trm.Min \<theta>\<^sub>1 \<theta>\<^sub>2]<>\<nu> \<equiv>\<^sub>P min r1 r2

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
case rtsem_Neg
[PROOF STATE]
proof (state)
this:
[\<theta>_]\<nu>_ \<down> r_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>_]<>\<nu> \<equiv>\<^sub>P r_
\<nu> REP \<nu>_

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
fix \<theta> :: "trm" and \<nu>' r
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume eval:"[\<theta>]\<nu>' \<down> r"
[PROOF STATE]
proof (state)
this:
[\<theta>]\<nu>' \<down> r

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume rep:"\<nu> REP \<nu>'"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>'

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r)"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
have IH:"[\<theta>]<>\<nu> \<equiv>\<^sub>P r"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r

goal (1 subgoal):
 1. [\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
obtain l1 u1  where
        lu:"([\<theta>]<> \<nu>) = (l1, u1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>l1 u1. ([\<theta>]<>\<nu>) = (l1, u1) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using IH repP_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)

goal (1 subgoal):
 1. (\<And>l1 u1. ([\<theta>]<>\<nu>) = (l1, u1) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([\<theta>]<>\<nu>) = (l1, u1)

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
from IH
[PROOF STATE]
proof (chain)
picking this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
obtain ub lb:: real
   where urep:"(ub \<ge> r) \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub)"
   and   lrep:"(lb \<le> r) \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)"
[PROOF STATE]
proof (prove)
using this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r

goal (1 subgoal):
 1. (\<And>ub lb. \<lbrakk>r \<le> ub \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub); lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using  repP_def repU_def repL_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)
?w \<equiv>\<^sub>U ?r \<equiv> \<exists>r'\<ge>?r. ?w \<equiv>\<^sub>E r'
?w \<equiv>\<^sub>L ?r \<equiv> \<exists>r'\<le>?r. ?w \<equiv>\<^sub>E r'

goal (1 subgoal):
 1. (\<And>ub lb. \<lbrakk>r \<le> ub \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub); lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r \<le> ub \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub)
lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have ubound:"((wneg u1) \<equiv>\<^sub>L (uminus r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wneg u1 \<equiv>\<^sub>L - r
[PROOF STEP]
by (metis real_minus_le_minus lu repL_def snd_conv urep wneg_lemma)
[PROOF STATE]
proof (state)
this:
wneg u1 \<equiv>\<^sub>L - r

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
have lbound:"((wneg l1) \<equiv>\<^sub>U (uminus r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wneg l1 \<equiv>\<^sub>U - r
[PROOF STEP]
using real_minus_le_minus lu repU_def lrep wneg_lemma
[PROOF STATE]
proof (prove)
using this:
(- ?b \<le> - ?a) = (?a \<le> ?b)
([\<theta>]<>\<nu>) = (l1, u1)
?w \<equiv>\<^sub>U ?r \<equiv> \<exists>r'\<ge>?r. ?w \<equiv>\<^sub>E r'
lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)
?w \<equiv>\<^sub>E ?r \<Longrightarrow> wneg ?w \<equiv>\<^sub>E - ?r

goal (1 subgoal):
 1. wneg l1 \<equiv>\<^sub>U - r
[PROOF STEP]
by (metis fst_conv)
[PROOF STATE]
proof (state)
this:
wneg l1 \<equiv>\<^sub>U - r

goal (2 subgoals):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
 2. \<And>\<theta> \<nu>' r. \<lbrakk>[\<theta>]\<nu>' \<down> r; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
show "[Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r
[PROOF STEP]
unfolding repP_def Let_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. case [Neg \<theta>]<>\<nu> of (w1, w2) \<Rightarrow> (w1 \<equiv>\<^sub>L - r) \<and> (w2 \<equiv>\<^sub>U - r)
[PROOF STEP]
using ubound lbound lu
[PROOF STATE]
proof (prove)
using this:
wneg u1 \<equiv>\<^sub>L - r
wneg l1 \<equiv>\<^sub>U - r
([\<theta>]<>\<nu>) = (l1, u1)

goal (1 subgoal):
 1. case [Neg \<theta>]<>\<nu> of (w1, w2) \<Rightarrow> (w1 \<equiv>\<^sub>L - r) \<and> (w2 \<equiv>\<^sub>U - r)
[PROOF STEP]
by (auto)
[PROOF STATE]
proof (state)
this:
[Neg \<theta>]<>\<nu> \<equiv>\<^sub>P - r

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
case rtsem_Abs
[PROOF STATE]
proof (state)
this:
[\<theta>\<^sub>1_]\<nu>_ \<down> r1_
\<nu> REP \<nu>_ \<Longrightarrow> [\<theta>\<^sub>1_]<>\<nu> \<equiv>\<^sub>P r1_
\<nu> REP \<nu>_

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
fix \<theta> :: "trm" and \<nu>' r
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
assume eval:"[\<theta>]\<nu>' \<down> r"
[PROOF STATE]
proof (state)
this:
[\<theta>]\<nu>' \<down> r

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
assume rep:"\<nu> REP \<nu>'"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>'

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
assume "(\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r)"
[PROOF STATE]
proof (state)
this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
have IH:"[\<theta>]<>\<nu> \<equiv>\<^sub>P r"
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r

goal (1 subgoal):
 1. [\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
using rep
[PROOF STATE]
proof (prove)
using this:
\<nu> REP \<nu>' \<Longrightarrow> [\<theta>]<>\<nu> \<equiv>\<^sub>P r
\<nu> REP \<nu>'

goal (1 subgoal):
 1. [\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
obtain l1 u1  where
        lu:"([\<theta>]<> \<nu>) = (l1, u1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>l1 u1. ([\<theta>]<>\<nu>) = (l1, u1) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using IH repP_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)

goal (1 subgoal):
 1. (\<And>l1 u1. ([\<theta>]<>\<nu>) = (l1, u1) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
([\<theta>]<>\<nu>) = (l1, u1)

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
from IH
[PROOF STATE]
proof (chain)
picking this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r
[PROOF STEP]
obtain ub lb:: real
   where urep:"(ub \<ge> r) \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub)"
   and   lrep:"(lb \<le> r) \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)"
[PROOF STATE]
proof (prove)
using this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r

goal (1 subgoal):
 1. (\<And>ub lb. \<lbrakk>r \<le> ub \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub); lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using prod.case_eq_if repP_def  repU_def repL_def
[PROOF STATE]
proof (prove)
using this:
[\<theta>]<>\<nu> \<equiv>\<^sub>P r
(case ?prod of (x, xa) \<Rightarrow> ?f x xa) = ?f (fst ?prod) (snd ?prod)
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)
?w \<equiv>\<^sub>U ?r \<equiv> \<exists>r'\<ge>?r. ?w \<equiv>\<^sub>E r'
?w \<equiv>\<^sub>L ?r \<equiv> \<exists>r'\<le>?r. ?w \<equiv>\<^sub>E r'

goal (1 subgoal):
 1. (\<And>ub lb. \<lbrakk>r \<le> ub \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub); lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r \<le> ub \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub)
lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
have lbound:"wmax l1 (wneg u1) \<equiv>\<^sub>L (abs r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wmax l1 (wneg u1) \<equiv>\<^sub>L \<bar>r\<bar>
[PROOF STEP]
apply(simp only: repL_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>r'\<le>\<bar>r\<bar>. wmax l1 (wneg u1) \<equiv>\<^sub>E r'
[PROOF STEP]
apply(rule exI[where x="max lb (- ub)"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max lb (- ub) \<le> \<bar>r\<bar> \<and> (wmax l1 (wneg u1) \<equiv>\<^sub>E max lb (- ub))
[PROOF STEP]
apply(rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. max lb (- ub) \<le> \<bar>r\<bar>
 2. wmax l1 (wneg u1) \<equiv>\<^sub>E max lb (- ub)
[PROOF STEP]
using lrep wmax_lemma lu urep wneg_lemma
[PROOF STATE]
proof (prove)
using this:
lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)
\<lbrakk>?w1.0 \<equiv>\<^sub>E ?r1.0; ?w2.0 \<equiv>\<^sub>E ?r2.0\<rbrakk> \<Longrightarrow> wmax ?w1.0 ?w2.0 \<equiv>\<^sub>E max ?r1.0 ?r2.0
([\<theta>]<>\<nu>) = (l1, u1)
r \<le> ub \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub)
?w \<equiv>\<^sub>E ?r \<Longrightarrow> wneg ?w \<equiv>\<^sub>E - ?r

goal (2 subgoals):
 1. max lb (- ub) \<le> \<bar>r\<bar>
 2. wmax l1 (wneg u1) \<equiv>\<^sub>E max lb (- ub)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wmax l1 (wneg u1) \<equiv>\<^sub>L \<bar>r\<bar>

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
have ubound:"(wmax u1 (wneg l1) \<equiv>\<^sub>U (abs r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wmax u1 (wneg l1) \<equiv>\<^sub>U \<bar>r\<bar>
[PROOF STEP]
apply(simp only: repU_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>r'\<ge>\<bar>r\<bar>. wmax u1 (wneg l1) \<equiv>\<^sub>E r'
[PROOF STEP]
apply(rule exI[where x="max ub (- lb)"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>r\<bar> \<le> max ub (- lb) \<and> (wmax u1 (wneg l1) \<equiv>\<^sub>E max ub (- lb))
[PROOF STEP]
using lrep wmax_lemma lu urep wneg_lemma
[PROOF STATE]
proof (prove)
using this:
lb \<le> r \<and> (fst ([\<theta>]<>\<nu>) \<equiv>\<^sub>E lb)
\<lbrakk>?w1.0 \<equiv>\<^sub>E ?r1.0; ?w2.0 \<equiv>\<^sub>E ?r2.0\<rbrakk> \<Longrightarrow> wmax ?w1.0 ?w2.0 \<equiv>\<^sub>E max ?r1.0 ?r2.0
([\<theta>]<>\<nu>) = (l1, u1)
r \<le> ub \<and> (snd ([\<theta>]<>\<nu>) \<equiv>\<^sub>E ub)
?w \<equiv>\<^sub>E ?r \<Longrightarrow> wneg ?w \<equiv>\<^sub>E - ?r

goal (1 subgoal):
 1. \<bar>r\<bar> \<le> max ub (- lb) \<and> (wmax u1 (wneg l1) \<equiv>\<^sub>E max ub (- lb))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wmax u1 (wneg l1) \<equiv>\<^sub>U \<bar>r\<bar>

goal (1 subgoal):
 1. \<And>\<theta>\<^sub>1 \<nu>' r1. \<lbrakk>[\<theta>\<^sub>1]\<nu>' \<down> r1; \<nu> REP \<nu>' \<Longrightarrow> [\<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P r1; \<nu> REP \<nu>'\<rbrakk> \<Longrightarrow> [Abs \<theta>\<^sub>1]<>\<nu> \<equiv>\<^sub>P \<bar>r1\<bar>
[PROOF STEP]
show "[Abs \<theta>]<>\<nu> \<equiv>\<^sub>P abs r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [Abs \<theta>]<>\<nu> \<equiv>\<^sub>P \<bar>r\<bar>
[PROOF STEP]
using repP_def Let_def ubound lbound lu lu wAbsU
[PROOF STATE]
proof (prove)
using this:
?w \<equiv>\<^sub>P ?r \<equiv> let (w1, w2) = ?w in (w1 \<equiv>\<^sub>L ?r) \<and> (w2 \<equiv>\<^sub>U ?r)
Let ?s ?f \<equiv> ?f ?s
wmax u1 (wneg l1) \<equiv>\<^sub>U \<bar>r\<bar>
wmax l1 (wneg u1) \<equiv>\<^sub>L \<bar>r\<bar>
([\<theta>]<>\<nu>) = (l1, u1)
([\<theta>]<>\<nu>) = (l1, u1)
([Abs ?\<theta>\<^sub>1]<>?\<nu>) = (let (l1, u1) = [?\<theta>\<^sub>1]<>?\<nu> in (wmax l1 (wneg u1), wmax u1 (wneg l1)))

goal (1 subgoal):
 1. [Abs \<theta>]<>\<nu> \<equiv>\<^sub>P \<bar>r\<bar>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[Abs \<theta>]<>\<nu> \<equiv>\<^sub>P \<bar>r\<bar>

goal:
No subgoals!
[PROOF STEP]
qed