(* VDM to Isabelle Translation @2022-02-27T12:37:28.757194Z
   Copyright 2021, Leo Freitas, leo.freitas@newcastle.ac.uk

in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 33:7
files = [./src/test/resources/Examples/Alarm/alarm.vdmsl]
*)
theory alarm_PO
imports alarm
  keywords "print_vdmset" :: diag
begin

\<comment>\<open>VDM source: Expert = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 33:7\<close>
theorem Expert_TOTAL_PO1:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (ex :: Expert)  . (((inv_Expert ex)) \<longrightarrow> isTest ((inv_Expert ex)) (inv_bool))))"

	by simp

\<comment>\<open>VDM source: Expert = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 31:3\<close>
theorem Expert_INV_SATISFIABILITY_PO2:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<exists> (ex :: Expert)  . (((inv_Expert ex)) \<longrightarrow> ((quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t ex) \<noteq> {}))))"

	using inv_Expert_def by presburger

\<comment>\<open>VDM source: Schedule = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 36:7\<close>
theorem Schedule_TOTAL_PO3:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (sch :: (Period \<rightharpoonup> Expert VDMSet))  . ((((inv_Map ((inv_VDMToken' (inv_VDMSeq' (inv_VDMChar)))) (inv_VDMSet' inv_Expert ) sch))) \<longrightarrow> isTest ((inv_Schedule sch)) (inv_bool))))"

	by simp

\<comment>\<open>VDM source: Schedule = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 35:3\<close>
theorem Schedule_INV_SATISFIABILITY_PO4:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<exists> (sch :: (Period \<rightharpoonup> Expert VDMSet))  . ((((inv_Map ((inv_VDMToken' (inv_VDMSeq' (inv_VDMChar)))) (inv_VDMSet' inv_Expert ) sch))) \<longrightarrow> (\<forall> exs \<in> (rng sch)  . ((exs \<noteq> {}) \<and> (\<forall> ex1 \<in> exs  . (\<forall> ex2 \<in> exs  . ((ex1 \<noteq> ex2) \<longrightarrow> ((expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t ex1) \<noteq> (expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t ex2))))))))))"

	by (metis empty_iff ran_empty rng_def)

\<comment>\<open>VDM source: Plant = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 54:7\<close>
theorem Plant_TOTAL_PO5:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (dummy0 :: Plant)  . (((inv_Plant dummy0)) \<longrightarrow> (let schedule = (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0); alarms = (alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0) in isTest ((inv_Plant \<lparr>schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t = schedule, alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t = alarms\<rparr>)) (inv_bool)))))"

	by fastforce

\<comment>\<open>VDM source: Plant = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 57:26\<close>
theorem Plant_MAP_APPLY_PO6:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (dummy0 :: Plant)  . (((inv_Plant dummy0)) \<longrightarrow> (let schedule = (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0); alarms = (alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0) in (\<forall> a \<in> alarms  . (\<forall> peri \<in> (dom schedule)  . (peri \<in> (dom schedule))))))))"

	by metis

\<comment>\<open>VDM source: Plant = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 52:3\<close>
theorem Plant_INV_SATISFIABILITY_PO7:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<exists> (dummy0 :: Plant)  . (((inv_Plant dummy0)) \<longrightarrow> (let schedule = (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0); alarms = (alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0) in (\<forall> a \<in> alarms  . (\<forall> peri \<in> (dom schedule)  . (QualificationOK ((the(schedule peri)))   (quali\<^sub>A\<^sub>l\<^sub>a\<^sub>r\<^sub>m a))))))))"

  using inv_Plant_def by presburger

\<comment>\<open>VDM source: NumberOfExperts = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 63:10\<close>
theorem NumberOfExperts_MAP_APPLY_PO8:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (peri :: Period)   (plant :: Plant)  . ((((inv_Period peri)))  \<and>  ((inv_Plant plant)) \<longrightarrow> ((peri \<in> (dom (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t plant))) \<longrightarrow> (peri \<in> (dom (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t plant)))))))"

	by meson

\<comment>\<open>VDM source: ExpertIsOnDuty = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 68:44\<close>
theorem ExpertIsOnDuty_MAP_APPLY_PO9:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (ex :: Expert)   (dummy0 :: Plant)  . (((inv_Expert ex))  \<and>  ((inv_Plant dummy0)) \<longrightarrow> (let sch = (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0); dollarany1 = (alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0) in (\<forall> peri \<in> (dom sch)  . (peri \<in> (dom sch)))))))"

	by simp

\<comment>\<open>VDM source: ExpertToPage = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 71:38\<close>
theorem ExpertToPage_TOTAL_PO10:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (a :: Alarm)   (peri :: Period)   (plant :: Plant)  . (((inv_Alarm a))  \<and>  (((inv_Period peri)))  \<and>  ((inv_Plant plant)) \<longrightarrow> isTest ((pre_ExpertToPage a   peri   plant)) (inv_bool))))"

	by simp

\<comment>\<open>VDM source: ExpertToPage = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 73:17\<close>
theorem ExpertToPage_MAP_APPLY_PO11:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (a :: Alarm)   (peri :: Period)   (plant :: Plant)  . (((inv_Alarm a))  \<and>  (((inv_Period peri)))  \<and>  ((inv_Plant plant)) \<longrightarrow> (((peri \<in> (dom (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t plant))) \<and> (a \<in> (alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t plant))) \<longrightarrow> (\<forall> (r :: Expert)  . (((inv_Expert r)) \<longrightarrow> (peri \<in> (dom (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t plant)))))))))"
	by simp

\<comment>\<open>VDM source: ExpertToPage = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 70:3\<close>
theorem ExpertToPage_FUNC_SATISFIABILITY_PO12:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (a :: Alarm)   (peri :: Period)   (plant :: Plant)  . (((inv_Alarm a))  \<and>  (((inv_Period peri)))  \<and>  ((inv_Plant plant)) \<longrightarrow> ((pre_ExpertToPage a   peri   plant) \<longrightarrow> (\<exists> (r :: Expert)  . (((inv_Expert r)) \<longrightarrow> (post_ExpertToPage a   peri   plant   r)))))))"

	by (meson Expert.select_convs(2) inv_Expert_def)

named_theorems Typ_defs and Fcns_defs

lemmas [Typ_defs] = inv_Plant_def inv_Schedule_def inv_Qualification_def inv_Expert_def inv_Period_def inv_ExpertId_def
lemmas [Fcns_defs] = Let_def QualificationOK_def

\<comment>\<open>VDM source: ChangeExpert = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 79:32\<close>
theorem ChangeExpert_MAP_APPLY_PO13:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (dummy0 :: Plant)   (v11 :: Expert)   (v22 :: Expert)   (peri :: Period)  . (((inv_Plant dummy0))  \<and>  ((inv_Expert v11))  \<and>  ((inv_Expert v22))  \<and>  (((inv_Period peri))) \<longrightarrow> (let plan = (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0); alarms = (alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0) in  (peri \<in> (dom plan))))))"
	apply (simp add: Typ_defs Fcns_defs, safe?)+
  apply (simp add: VDM_map, safe?)+
  apply (simp add: VDM_basic_defs VDM_seq_defs VDM_set_defs Typ_defs, safe?)+
  unfolding VDM_basic_defs VDM_seq_defs VDM_set_defs Typ_defs apply (simp?, safe?)
	oops

\<comment>\<open>VDM source: ChangeExpert = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 79:19\<close>
theorem ChangeExpert_SUB_TYPE_PO14:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (dummy0 :: Plant)   (v11 :: Expert)   (v22 :: Expert)   (peri :: Period)  . (((inv_Plant dummy0))  \<and>  ((inv_Expert v11))  \<and>  ((inv_Expert v22))  \<and>  (((inv_Period peri))) \<longrightarrow> (let plan = (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0); alarms = (alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0) in  ((inv_Schedule (plan \<dagger> [peri\<mapsto>((((the(plan peri))) - {v11}) \<union> {v22})])) \<and> isTest ((plan \<dagger> [peri\<mapsto>((((the(plan peri))) - {v11}) \<union> {v22})])) (inv_Map ((inv_VDMToken' (inv_VDMSeq' (inv_VDMChar)))) (inv_VDMSet' inv_Expert )))))))"

	oops

\<comment>\<open>VDM source: ChangeExpert = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 79:5\<close>
theorem ChangeExpert_SUB_TYPE_PO15:
	\<comment>\<open>Implicitly defined type invariant checks for quantified type binds\<close>
	"((\<forall> (dummy0 :: Plant)   (v11 :: Expert)   (v22 :: Expert)   (peri :: Period)  . (((inv_Plant dummy0))  \<and>  ((inv_Expert v11))  \<and>  ((inv_Expert v22))  \<and>  (((inv_Period peri))) \<longrightarrow> (let plan = (schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0); alarms = (alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t dummy0) in  ((inv_Plant \<lparr>schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t = (plan \<dagger> [peri\<mapsto>((((the(plan peri))) - {v11}) \<union> {v22})]), alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t = alarms\<rparr>) \<and> ((inv_Schedule (plan \<dagger> [peri\<mapsto>((((the(plan peri))) - {v11}) \<union> {v22})])) \<and> isTest ((plan \<dagger> [peri\<mapsto>((((the(plan peri))) - {v11}) \<union> {v22})])) (inv_Map ((inv_VDMToken' (inv_VDMSeq' (inv_VDMChar)))) (inv_VDMSet' inv_Expert ))))))))"

	oops

\<comment>\<open>VDM source: e1 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 99:15\<close>
theorem e1_SUB_TYPE_PO16:
	"((inv_Expert \<lparr>expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = eid1, quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = {Qualification.U_Elec }\<rparr>))"
	unfolding inv_Expert_defs by simp

\<comment>\<open>VDM source: e2 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 100:15\<close>
theorem e2_SUB_TYPE_PO17:
	"((inv_Expert \<lparr>expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = eid2, quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = {Qualification.U_Mech  , Qualification.U_Chem }\<rparr>))"
	unfolding inv_Expert_defs by simp

\<comment>\<open>VDM source: e3 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 101:15\<close>
theorem e3_SUB_TYPE_PO18:
	"((inv_Expert \<lparr>expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = eid3, quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = {Qualification.U_Bio  , Qualification.U_Chem  , Qualification.U_Elec }\<rparr>))"
	unfolding inv_Expert_defs by simp

\<comment>\<open>VDM source: e4 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 102:15\<close>
theorem e4_SUB_TYPE_PO19:
	"((inv_Expert \<lparr>expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = eid4, quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = {Qualification.U_Bio }\<rparr>))"
	unfolding inv_Expert_defs by simp

\<comment>\<open>VDM source: e5 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 103:15\<close>
theorem e5_SUB_TYPE_PO20:
	"((inv_Expert \<lparr>expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = eid5, quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = {Qualification.U_Chem  , Qualification.U_Bio }\<rparr>))"
	unfolding inv_Expert_defs by simp

\<comment>\<open>VDM source: e6 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 104:15\<close>
theorem e6_SUB_TYPE_PO21:
	"((inv_Expert \<lparr>expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = eid6, quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = {Qualification.U_Elec  , Qualification.U_Chem  , Qualification.U_Bio  , Qualification.U_Mech }\<rparr>))"
	unfolding inv_Expert_defs by simp

\<comment>\<open>VDM source: e7 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 105:15\<close>
theorem e7_SUB_TYPE_PO22:
	"((inv_Expert \<lparr>expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = eid7, quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = {Qualification.U_Elec  , Qualification.U_Mech }\<rparr>))"
	unfolding inv_Expert_defs by simp

\<comment>\<open>VDM source: e8 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 106:15\<close>
theorem e8_SUB_TYPE_PO23:
	"((inv_Expert \<lparr>expertid\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = eid8, quali\<^sub>E\<^sub>x\<^sub>p\<^sub>e\<^sub>r\<^sub>t = {Qualification.U_Mech  , Qualification.U_Bio }\<rparr>))"
	unfolding inv_Expert_defs by simp

\<comment>\<open>VDM source: s = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 110:8\<close>
theorem s_MAP_SEQ_OF_COMPATIBLE_PO24:
	"((\<forall> m1 \<in> {[p1\<mapsto>{e7 , e5 , e1}] , [p2\<mapsto>{e6}] , [p3\<mapsto>{e1 , e3 , e8}] , [p4\<mapsto>{e6}]}  . (\<forall> m2 \<in> {[p1\<mapsto>{e7 , e5 , e1}] , [p2\<mapsto>{e6}] , [p3\<mapsto>{e1 , e3 , e8}] , [p4\<mapsto>{e6}]}  . (\<forall> d3 \<in> (dom m1)  . (\<forall> d4 \<in> (dom m2)  . ((d3 = d4) \<longrightarrow> (((the(m1 d3))) = ((the(m2 d4))))))))))"

	oops

\<comment>\<open>VDM source: plant1 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 121:29\<close>
theorem plant1_SUB_TYPE_PO25:
	"(((inv_Schedule s) \<and> isTest (s) (inv_Map ((inv_VDMToken' (inv_VDMSeq' (inv_VDMChar)))) (inv_VDMSet' inv_Expert ))))"

	oops

\<comment>\<open>VDM source: plant1 = ?\<close>
\<comment>\<open>in 'alarm' (./src/test/resources/Examples/Alarm/alarm.vdmsl) at line 121:20\<close>
theorem plant1_SUB_TYPE_PO26:
	"(((inv_Plant \<lparr>schedule\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t = s, alarms\<^sub>P\<^sub>l\<^sub>a\<^sub>n\<^sub>t = {a1 , a2 , a3}\<rparr>) \<and> ((inv_Schedule s) \<and> isTest (s) (inv_Map ((inv_VDMToken' (inv_VDMSeq' (inv_VDMChar)))) (inv_VDMSet' inv_Expert )))))"
	unfolding inv_Plant_defs inv_Schedule_defs QualificationOK_def by simp

\<comment>\<open>Processing VDM exports as Isabelle hidden declarations\<close>

\<comment> \<open>@LF 13 sledgehammered, 10 by simplified expansion, 3 missing on expected function\<close>

end


theory Prelude_Either
imports "$HETS_ISABELLE_LIB/MainHC"
uses "$HETS_ISABELLE_LIB/prelude"
begin

setup "Header.initialize
       [\"NotFalse\", \"NotTrue\", \"AndFalse\", \"AndTrue\", \"AndSym\",
        \"OrDef\", \"OtherwiseDef\", \"NotFalse1\", \"NotTrue1\",
        \"notNot1\", \"notNot2\", \"EqualTDef\", \"EqualSymDef\",
        \"EqualReflex\", \"EqualTransT\", \"DiffDef\", \"DiffSymDef\",
        \"DiffTDef\", \"DiffFDef\", \"TE1\", \"TE2\", \"TE3\", \"TE4\",
        \"IUE1\", \"IUE2\", \"IBE1\", \"IBE2\", \"IBE3\", \"IBE4\",
        \"IBE5\", \"IBE6\", \"IBE7\", \"IBE8\", \"IOE01\", \"IOE02\",
        \"IOE03\", \"IOE04\", \"IOE05\", \"IOE06\", \"IOE07\", \"IOE08\",
        \"IOE09\", \"LeIrreflexivity\", \"LeTAsymmetry\",
        \"LeTTransitive\", \"LeTTotal\", \"GeDef\", \"GeIrreflexivity\",
        \"GeTAsymmetry\", \"GeTTransitive\", \"GeTTotal\", \"LeqDef\",
        \"LeqReflexivity\", \"LeqTTransitive\", \"LeqTTotal\", \"GeqDef\",
        \"GeqReflexivity\", \"GeqTTransitive\", \"GeqTTotal\",
        \"EqTSOrdRel\", \"EqFSOrdRel\", \"EqTOrdRel\", \"EqFOrdRel\",
        \"EqTOrdTSubstE\", \"EqTOrdFSubstE\", \"EqTOrdTSubstD\",
        \"EqTOrdFSubstD\", \"LeTGeFEqFRel\", \"LeFGeTEqTRel\",
        \"LeTGeTRel\", \"LeFGeFRel\", \"LeqTGetTRel\", \"LeqFGetFRel\",
        \"GeTLeTRel\", \"GeFLeFRel\", \"GeqTLeqTRel\", \"GeqFLeqFRel\",
        \"LeqTGeFRel\", \"LeqFGeTRel\", \"GeTLeFEqFRel\", \"GeFLeTEqTRel\",
        \"GeqTLeFRel\", \"GeqFLeTRel\", \"LeqTLeTEqTRel\",
        \"LeqFLeFEqFRel\", \"GeqTGeTEqTRel\", \"GeqFGeFEqFRel\",
        \"LeTGeqFRel\", \"GeTLeqFRel\", \"LeLeqDiff\", \"CmpLTDef\",
        \"CmpEQDef\", \"CmpGTDef\", \"MaxYDef\", \"MaxXDef\", \"MinXDef\",
        \"MinYDef\", \"MaxSym\", \"MinSym\", \"TO1\", \"TO3\", \"TO4\",
        \"TO5\", \"TO6\", \"IUO01\", \"IUO02\", \"IUO03\", \"IUO04\",
        \"IUO05\", \"IUO06\", \"IUO07\", \"IOO13\", \"IOO14\", \"IOO15\",
        \"IOO16\", \"IOO17\", \"IOO18\", \"IOO19\", \"IOO20\", \"IOO21\",
        \"IOO22\", \"IOO23\", \"IOO24\", \"IOO25\", \"IOO26\", \"IOO27\",
        \"IOO28\", \"IOO29\", \"IOO30\", \"IOO31\", \"IOO32\", \"IOO33\",
        \"IBO5\", \"IBO6\", \"IBO7\", \"IBO8\", \"IBO9\", \"IBO10\",
        \"IBO11\", \"IBO12\", \"EitherLeftDef\", \"EitherRightDef\",
        \"IEE01\", \"IEE02\", \"IEE03\", \"IEO01\", \"IEO02\", \"IEO03\",
        \"IEO04\", \"IEO05\", \"IEO06\", \"IEO07\", \"IEO08\", \"IEO09\",
        \"IEO10\", \"IEO11\", \"IEO12\", \"IEO13\"]"

typedecl Bool
typedecl Unit
typedecl X_Nat

datatype Ordering = EQ | GT | LT
datatype ('a, 'b) Either = X_Left "'a partial" ("Left''/'(_')" [3] 999) |
                           X_Right "'b partial" ("Right''/'(_')" [3] 999)

consts
X__XAmpXAmp__X :: "bool => bool => bool" ("(_/ &&/ _)" [54,54] 52)
X__XEqXEq__X :: "'a partial => 'a partial => bool" ("(_/ ==''/ _)" [54,54] 52)
X__XGtXEq__X :: "'a partial => 'a partial => bool" ("(_/ >=''/ _)" [54,54] 52)
X__XGt__X :: "'a partial => 'a partial => bool" ("(_/ >''/ _)" [54,54] 52)
X__XLtXEq__X :: "'a partial => 'a partial => bool" ("(_/ <=''/ _)" [54,54] 52)
X__XLt__X :: "'a partial => 'a partial => bool" ("(_/ <''/ _)" [54,54] 52)
X__XSlashXEq__X :: "'a partial => 'a partial => bool" ("(_/ '/=/ _)" [54,54] 52)
X__XVBarXVBar__X :: "bool => bool => bool" ("(_/ ||/ _)" [54,54] 52)
X_max :: "'a partial => 'a partial => 'a partial"
X_min :: "'a partial => 'a partial => 'a partial"
compare :: "'a partial => 'a partial => Ordering partial"
either :: "('a partial => 'c partial) => ('b partial => 'c partial) => ('a, 'b) Either partial => 'c partial"
notH__X :: "bool => bool" ("(notH/ _)" [56] 56)
otherwiseH :: "bool"

axioms
NotFalse [rule_format] : "notH False"

NotTrue [rule_format] : "~ notH True"

AndFalse [rule_format] : "ALL (x :: bool). ~ False && x"

AndTrue [rule_format] : "ALL (x :: bool). True && x = x"

AndSym [rule_format] :
"ALL (x :: bool). ALL (y :: bool). x && y = y && x"

OrDef [rule_format] :
"ALL (x :: bool).
 ALL (y :: bool). x || y = notH (notH x && notH y)"

OtherwiseDef [rule_format] : "otherwiseH"

NotFalse1 [rule_format] : "ALL (x :: bool). notH x = (~ x)"

NotTrue1 [rule_format] : "ALL (x :: bool). ~ notH x = x"

notNot1 [rule_format] : "ALL (x :: bool). (~ x) = notH x"

notNot2 [rule_format] : "ALL (x :: bool). (~ ~ x) = (~ notH x)"

EqualTDef [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x = y --> x ==' y"

EqualSymDef [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x ==' y = y ==' x"

EqualReflex [rule_format] : "ALL (x :: 'a partial). x ==' x"

EqualTransT [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). x ==' y & y ==' z --> x ==' z"

DiffDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x /= y = notH (x ==' y)"

DiffSymDef [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x /= y = y /= x"

DiffTDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x /= y = notH (x ==' y)"

DiffFDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x /= y) = x ==' y"

TE1 [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). ~ x ==' y --> ~ x = y"

TE2 [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). notH (x ==' y) = (~ x ==' y)"

TE3 [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ notH (x ==' y)) = x ==' y"

TE4 [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x ==' y) = (~ x ==' y)"

IUE1 [rule_format] : "makePartial () ==' makePartial ()"

IUE2 [rule_format] : "~ makePartial () /= makePartial ()"

IBE1 [rule_format] : "makePartial () ==' makePartial ()"

IBE2 [rule_format] : "undefinedOp ==' undefinedOp"

IBE3 [rule_format] : "~ undefinedOp ==' makePartial ()"

IBE4 [rule_format] : "~ makePartial () ==' undefinedOp"

IBE5 [rule_format] : "makePartial () /= undefinedOp"

IBE6 [rule_format] : "undefinedOp /= makePartial ()"

IBE7 [rule_format] : "notH (makePartial () ==' undefinedOp)"

IBE8 [rule_format] : "~ notH notH (makePartial () ==' undefinedOp)"

IOE01 [rule_format] : "makePartial LT ==' makePartial LT"

IOE02 [rule_format] : "makePartial EQ ==' makePartial EQ"

IOE03 [rule_format] : "makePartial GT ==' makePartial GT"

IOE04 [rule_format] : "~ makePartial LT ==' makePartial EQ"

IOE05 [rule_format] : "~ makePartial LT ==' makePartial GT"

IOE06 [rule_format] : "~ makePartial EQ ==' makePartial GT"

IOE07 [rule_format] : "makePartial LT /= makePartial EQ"

IOE08 [rule_format] : "makePartial LT /= makePartial GT"

IOE09 [rule_format] : "makePartial EQ /= makePartial GT"

LeIrreflexivity [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x ==' y --> ~ x <' y"

LeTAsymmetry [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x <' y --> ~ y <' x"

LeTTransitive [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). x <' y & y <' z --> x <' z"

LeTTotal [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (x <' y | y <' x) | x ==' y"

GeDef [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x >' y = y <' x"

GeIrreflexivity [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x ==' y --> ~ x >' y"

GeTAsymmetry [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x >' y --> ~ y >' x"

GeTTransitive [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). (x >' y) && (y >' z) --> x >' z"

GeTTotal [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). ((x >' y) || (y >' x)) || (x ==' y)"

LeqDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x <=' y = (x <' y) || (x ==' y)"

LeqReflexivity [rule_format] : "ALL (x :: 'a partial). x <=' x"

LeqTTransitive [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). (x <=' y) && (y <=' z) --> x <=' z"

LeqTTotal [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (x <=' y) && (y <=' x) = x ==' y"

GeqDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x >=' y = (x >' y) || (x ==' y)"

GeqReflexivity [rule_format] : "ALL (x :: 'a partial). x >=' x"

GeqTTransitive [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). (x >=' y) && (y >=' z) --> x >=' z"

GeqTTotal [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (x >=' y) && (y >=' x) = x ==' y"

EqTSOrdRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x ==' y = (~ x <' y & ~ x >' y)"

EqFSOrdRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x ==' y) = (x <' y | x >' y)"

EqTOrdRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x ==' y = (x <=' y & x >=' y)"

EqFOrdRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x ==' y) = (x <=' y | x >=' y)"

EqTOrdTSubstE [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). x ==' y & y <' z --> x <' z"

EqTOrdFSubstE [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). x ==' y & ~ y <' z --> ~ x <' z"

EqTOrdTSubstD [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). x ==' y & z <' y --> z <' x"

EqTOrdFSubstD [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). x ==' y & ~ z <' y --> ~ z <' x"

LeTGeFEqFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x <' y = (~ x >' y & ~ x ==' y)"

LeFGeTEqTRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x <' y) = (x >' y | x ==' y)"

LeTGeTRel [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x <' y = y >' x"

LeFGeFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x <' y) = (~ y >' x)"

LeqTGetTRel [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x <=' y = y >=' x"

LeqFGetFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x <=' y) = (~ y >=' x)"

GeTLeTRel [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x >' y = y <' x"

GeFLeFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x >' y) = (~ y <' x)"

GeqTLeqTRel [rule_format] :
"ALL (x :: 'a partial). ALL (y :: 'a partial). x >=' y = y <=' x"

GeqFLeqFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x >=' y) = (~ y <=' x)"

LeqTGeFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x <=' y = (~ x >' y)"

LeqFGeTRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x <=' y) = x >' y"

GeTLeFEqFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x >' y = (~ x <' y & ~ x ==' y)"

GeFLeTEqTRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x >' y) = (x <' y | x ==' y)"

GeqTLeFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x >=' y = (~ x <' y)"

GeqFLeTRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x >=' y) = x <' y"

LeqTLeTEqTRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x <=' y = (x <' y | x ==' y)"

LeqFLeFEqFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x <=' y) = (~ x <' y & ~ x ==' y)"

GeqTGeTEqTRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x >=' y = (x >' y | x ==' y)"

GeqFGeFEqFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (~ x >=' y) = (~ x >' y & ~ x ==' y)"

LeTGeqFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x <' y = (~ x >=' y)"

GeTLeqFRel [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x >' y = (~ x <=' y)"

LeLeqDiff [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x <' y = (x <=' y) && (x /= y)"

CmpLTDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). compare x y ==' makePartial LT = x <' y"

CmpEQDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). compare x y ==' makePartial EQ = x ==' y"

CmpGTDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). compare x y ==' makePartial GT = x >' y"

MaxYDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). X_max x y ==' y = x <=' y"

MaxXDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). X_max x y ==' x = y <=' x"

MinXDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). X_min x y ==' x = x <=' y"

MinYDef [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). X_min x y ==' y = y <=' x"

MaxSym [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). X_max x y ==' y = X_max y x ==' y"

MinSym [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). X_min x y ==' y = X_min y x ==' y"

TO1 [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). (x ==' y | x <' y) = x <=' y"

TO3 [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). notH notH (x <' y) | notH (x <' y)"

TO4 [rule_format] :
"ALL (x :: 'a partial).
 ALL (y :: 'a partial). x <' y --> notH (x ==' y)"

TO5 [rule_format] :
"ALL (w :: 'a partial).
 ALL (x :: 'a partial).
 ALL (y :: 'a partial).
 ALL (z :: 'a partial). (x <' y & y <' z) & z <' w --> x <' w"

TO6 [rule_format] :
"ALL (x :: 'a partial).
 ALL (z :: 'a partial). z <' x --> notH (x <' z)"

IUO01 [rule_format] : "makePartial () <=' makePartial ()"

IUO02 [rule_format] : "~ makePartial () <' makePartial ()"

IUO03 [rule_format] : "makePartial () >=' makePartial ()"

IUO04 [rule_format] : "~ makePartial () >' makePartial ()"

IUO05 [rule_format] :
"X_max (makePartial ()) (makePartial ()) ==' makePartial ()"

IUO06 [rule_format] :
"X_min (makePartial ()) (makePartial ()) ==' makePartial ()"

IUO07 [rule_format] :
"compare (makePartial ()) (makePartial ()) ==' makePartial EQ"

IOO13 [rule_format] : "makePartial LT <' makePartial EQ"

IOO14 [rule_format] : "makePartial EQ <' makePartial GT"

IOO15 [rule_format] : "makePartial LT <' makePartial GT"

IOO16 [rule_format] : "makePartial LT <=' makePartial EQ"

IOO17 [rule_format] : "makePartial EQ <=' makePartial GT"

IOO18 [rule_format] : "makePartial LT <=' makePartial GT"

IOO19 [rule_format] : "makePartial EQ >=' makePartial LT"

IOO20 [rule_format] : "makePartial GT >=' makePartial EQ"

IOO21 [rule_format] : "makePartial GT >=' makePartial LT"

IOO22 [rule_format] : "makePartial EQ >' makePartial LT"

IOO23 [rule_format] : "makePartial GT >' makePartial EQ"

IOO24 [rule_format] : "makePartial GT >' makePartial LT"

IOO25 [rule_format] :
"X_max (makePartial LT) (makePartial EQ) ==' makePartial EQ"

IOO26 [rule_format] :
"X_max (makePartial EQ) (makePartial GT) ==' makePartial GT"

IOO27 [rule_format] :
"X_max (makePartial LT) (makePartial GT) ==' makePartial GT"

IOO28 [rule_format] :
"X_min (makePartial LT) (makePartial EQ) ==' makePartial LT"

IOO29 [rule_format] :
"X_min (makePartial EQ) (makePartial GT) ==' makePartial EQ"

IOO30 [rule_format] :
"X_min (makePartial LT) (makePartial GT) ==' makePartial LT"

IOO31 [rule_format] :
"compare (makePartial LT) (makePartial LT) ==' makePartial EQ"

IOO32 [rule_format] :
"compare (makePartial EQ) (makePartial EQ) ==' makePartial EQ"

IOO33 [rule_format] :
"compare (makePartial GT) (makePartial GT) ==' makePartial EQ"

IBO5 [rule_format] : "undefinedOp <' makePartial ()"

IBO6 [rule_format] : "~ undefinedOp >=' makePartial ()"

IBO7 [rule_format] : "makePartial () >=' undefinedOp"

IBO8 [rule_format] : "~ makePartial () <' undefinedOp"

IBO9 [rule_format] :
"X_max undefinedOp (makePartial ()) ==' makePartial ()"

IBO10 [rule_format] :
"X_min undefinedOp (makePartial ()) ==' undefinedOp"

IBO11 [rule_format] :
"compare (makePartial ()) (makePartial ()) ==' makePartial EQ"

IBO12 [rule_format] :
"compare undefinedOp undefinedOp ==' makePartial EQ"

EitherLeftDef [rule_format] :
"ALL (f :: 'a partial => 'c partial).
 ALL (g :: 'b partial => 'c partial).
 ALL (x :: 'a partial). either f g (makePartial (Left'(x))) = f x"

EitherRightDef [rule_format] :
"ALL (f :: 'a partial => 'c partial).
 ALL (g :: 'b partial => 'c partial).
 ALL (y :: 'b partial). either f g (makePartial (Right'(y))) = g y"

IEE01 [rule_format] :
"ALL (x :: 'e partial).
 ALL (y :: 'e partial).
 makePartial (Left'(x)) ==' makePartial (Left'(y)) = x ==' y"

IEE02 [rule_format] :
"ALL (w :: 'ee partial).
 ALL (z :: 'ee partial).
 makePartial (Right'(z)) ==' makePartial (Right'(w)) = z ==' w"

IEE03 [rule_format] :
"ALL (x :: 'e partial).
 ALL (z :: 'ee partial).
 ~ makePartial (Left'(x)) ==' makePartial (Right'(z))"

IEO01 [rule_format] :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 makePartial (Left'(x)) <' makePartial (Right'(z))"

IEO02 [rule_format] :
"ALL (x :: 'o partial).
 ALL (y :: 'o partial).
 makePartial (Left'(x)) <' makePartial (Left'(y)) = x <' y"

IEO03 [rule_format] :
"ALL (w :: 'oo partial).
 ALL (z :: 'oo partial).
 makePartial (Right'(z)) <' makePartial (Right'(w)) = z <' w"

declare NotFalse [simp]
declare NotTrue [simp]
declare AndFalse [simp]
declare AndTrue [simp]
declare OtherwiseDef [simp]
declare NotTrue1 [simp]
declare EqualReflex [simp]
declare IUE1 [simp]
declare IUE2 [simp]
declare IBE1 [simp]
declare IBE2 [simp]
declare IBE3 [simp]
declare IBE4 [simp]
declare IBE5 [simp]
declare IBE6 [simp]
declare IBE7 [simp]
declare IBE8 [simp]
declare IOE01 [simp]
declare IOE02 [simp]
declare IOE03 [simp]
declare IOE04 [simp]
declare IOE05 [simp]
declare IOE06 [simp]
declare IOE07 [simp]
declare IOE08 [simp]
declare IOE09 [simp]
declare LeIrreflexivity [simp]
declare LeTAsymmetry [simp]
declare GeIrreflexivity [simp]
declare GeTAsymmetry [simp]
declare GeTTransitive [simp]
declare GeTTotal [simp]
declare LeqReflexivity [simp]
declare LeqTTransitive [simp]
declare LeqTTotal [simp]
declare GeqReflexivity [simp]
declare GeqTTransitive [simp]
declare GeqTTotal [simp]
declare CmpLTDef [simp]
declare CmpEQDef [simp]
declare CmpGTDef [simp]
declare MaxYDef [simp]
declare MaxXDef [simp]
declare MinXDef [simp]
declare MinYDef [simp]
declare TO4 [simp]
declare TO6 [simp]
declare IUO01 [simp]
declare IUO02 [simp]
declare IUO03 [simp]
declare IUO04 [simp]
declare IUO05 [simp]
declare IUO06 [simp]
declare IUO07 [simp]
declare IOO13 [simp]
declare IOO14 [simp]
declare IOO15 [simp]
declare IOO16 [simp]
declare IOO17 [simp]
declare IOO18 [simp]
declare IOO19 [simp]
declare IOO20 [simp]
declare IOO21 [simp]
declare IOO22 [simp]
declare IOO23 [simp]
declare IOO24 [simp]
declare IOO25 [simp]
declare IOO26 [simp]
declare IOO27 [simp]
declare IOO28 [simp]
declare IOO29 [simp]
declare IOO30 [simp]
declare IOO31 [simp]
declare IOO32 [simp]
declare IOO33 [simp]
declare IBO5 [simp]
declare IBO6 [simp]
declare IBO7 [simp]
declare IBO8 [simp]
declare IBO9 [simp]
declare IBO10 [simp]
declare IBO11 [simp]
declare IBO12 [simp]
declare EitherLeftDef [simp]
declare EitherRightDef [simp]
declare IEE01 [simp]
declare IEE02 [simp]
declare IEE03 [simp]
declare IEO01 [simp]
declare IEO02 [simp]
declare IEO03 [simp]

theorem IEO04 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 ~ makePartial (Left'(x)) >=' makePartial (Right'(z))"
apply(rule allI)+
apply(simp only: GeqDef)
apply(simp only: OrDef GeDef)
apply(case_tac "makePartial (Right'(z)) <' makePartial (Left'(x))")
apply(simp)
apply(case_tac "makePartial (Left'(x)) ==' makePartial (Right'(z))")
by auto

setup "Header.record \"IEO04\""

theorem IEO05 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 makePartial (Right'(z)) >=' makePartial (Left'(x))"
apply(rule allI)+
apply(simp only: GeqDef)
apply(simp only: OrDef GeDef)
apply(case_tac "makePartial (Left'(x)) <' makePartial (Right'(z))")
apply(simp)
apply(case_tac "makePartial (Right'(z)) ==' makePartial (Left'(x))")
by auto

setup "Header.record \"IEO05\""

theorem IEO06 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 ~ makePartial (Right'(z)) <' makePartial (Left'(x))"
by (auto)

setup "Header.record \"IEO06\""

theorem IEO07 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 compare (makePartial (Left'(x))) (makePartial (Right'(z))) =='
 makePartial EQ =
 makePartial (Left'(x)) ==' makePartial (Right'(z))"
by auto

setup "Header.record \"IEO07\""

theorem IEO08 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 compare (makePartial (Left'(x))) (makePartial (Right'(z))) =='
 makePartial LT =
 makePartial (Left'(x)) <' makePartial (Right'(z))"
by auto

setup "Header.record \"IEO08\""

theorem IEO09 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 compare (makePartial (Left'(x))) (makePartial (Right'(z))) =='
 makePartial GT =
 makePartial (Left'(x)) >' makePartial (Right'(z))"
apply(rule allI)+
apply(simp add: GeDef)
done

setup "Header.record \"IEO09\""

theorem IEO10 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 makePartial (Left'(x)) <=' makePartial (Right'(z)) =
 X_max (makePartial (Left'(x))) (makePartial (Right'(z))) =='
 makePartial (Right'(z))"
apply(rule allI)+
apply(simp add: LeqDef)
done

setup "Header.record \"IEO10\""

theorem IEO11 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 makePartial (Right'(z)) <=' makePartial (Left'(x)) =
 X_max (makePartial (Left'(x))) (makePartial (Right'(z))) =='
 makePartial (Left'(x))"
apply(rule allI)+
apply(simp add: LeqDef)
done

setup "Header.record \"IEO11\""

theorem IEO12 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 makePartial (Left'(x)) <=' makePartial (Right'(z)) =
 X_min (makePartial (Left'(x))) (makePartial (Right'(z))) =='
 makePartial (Left'(x))"
apply(rule allI)+
apply(simp add: LeqDef)
done

setup "Header.record \"IEO12\""

theorem IEO13 :
"ALL (x :: 'o partial).
 ALL (z :: 'oo partial).
 makePartial (Right'(z)) <=' makePartial (Left'(x)) =
 X_min (makePartial (Left'(x))) (makePartial (Right'(z))) =='
 makePartial (Right'(z))"
apply(rule allI)+
apply(simp add: LeqDef)
done

setup "Header.record \"IEO13\""

end