From 57d183c7955fb54b3eb6dd431f5aec338131266b Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Fri, 22 Feb 2019 23:45:50 +0100 Subject: Cleanups and reorganization --- More_Types.thy | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 More_Types.thy (limited to 'More_Types.thy') diff --git a/More_Types.thy b/More_Types.thy new file mode 100644 index 0000000..9125aca --- /dev/null +++ b/More_Types.thy @@ -0,0 +1,83 @@ +(******** +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_cmp [comp] + + +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 -- cgit v1.2.3