(******** Isabelle/HoTT: Coproduct, unit, and empty types Feb 2019 ********) theory More_Types imports HoTT_Base begin section \Coproduct type\ axiomatization Cprd :: "[t, t] \ t" (infixr "+" 50) and inl :: "[t, t, t] \ t" and inr :: "[t, t, t] \ t" and indCprd :: "[t \ t, t \ t, t \ t, t] \ t" where Cprd_form: "\A: U i; B: U i\ \ A + B: U i" and Cprd_intro_inl: "\a: A; B: U i\ \ inl A B a: A + B" and Cprd_intro_inr: "\b: B; A: U i\ \ inr A B b: A + B" and Cprd_elim: "\ u: A + B; C: A + B \ U i; \x. x: A \ c x: C (inl A B x); \y. y: B \ d y: C (inr A B y) \ \ indCprd C c d u: C u" and Cprd_cmp_inl: "\ a: A; C: A + B \ U i; \x. x: A \ c x: C (inl A B x); \y. y: B \ d y: C (inr A B y) \ \ indCprd C c d (inl A B a) \ c a" and Cprd_cmp_inr: "\ b: B; C: A + B \ U i; \x. x: A \ c x: C (inl A B x); \y. y: B \ d y: C (inr A B y) \ \ indCprd C c d (inr A B b) \ d b" lemmas Cprd_form [form] lemmas Cprd_routine [intro] = Cprd_form Cprd_intro_inl Cprd_intro_inr Cprd_elim lemmas Cprd_comp [comp] = Cprd_cmp_inl Cprd_cmp_inr section \Unit type\ axiomatization Unit :: t and pt :: t and indUnit :: "[t \ t, t, t] \ t" where Unit_form: "Unit: U O" and Unit_intro: "pt: Unit" and Unit_elim: "\x: Unit; c: C pt; C: Unit \ U i\ \ indUnit C c x: C x" and Unit_cmp: "\c: C Unit; C: Unit \ U i\ \ indUnit C c pt \ c" lemmas Unit_form [form] lemmas Unit_routine [intro] = Unit_form Unit_intro Unit_elim lemmas Unit_comp [comp] = Unit_cmp section \Empty type\ axiomatization Null :: t and indNull :: "[t \ t, t] \ t" where Null_form: "Null: U O" and Null_elim: "\z: Null; C: Null \ U i\ \ indNull C z: C z" lemmas Null_form [form] lemmas Null_routine [intro] = Null_form Null_elim end