From 76ac8ed82317f3f62f26ecc88f412c61004bcffa Mon Sep 17 00:00:00 2001
From: Josh Chen
Date: Mon, 17 Sep 2018 13:13:55 +0200
Subject: Reorganizing theories

---
 Coprod.thy | 64 +++++++++++++++++++++++---------------------------------------
 1 file changed, 24 insertions(+), 40 deletions(-)

(limited to 'Coprod.thy')

diff --git a/Coprod.thy b/Coprod.thy
index 97e0566..d97228e 100644
--- a/Coprod.thy
+++ b/Coprod.thy
@@ -1,65 +1,49 @@
-(*  Title:  HoTT/Coprod.thy
-    Author: Josh Chen
+(*
+Title:  Coprod.thy
+Author: Joshua Chen
+Date:   2018
 
 Coproduct type
 *)
 
 theory Coprod
-  imports HoTT_Base
-begin
+imports HoTT_Base
 
+begin
 
-section \<open>Constants and type rules\<close>
 
 axiomatization
-  Coprod :: "[t, t] \<Rightarrow> t"  (infixr "+" 50) and
-  inl :: "t \<Rightarrow> t" and
-  inr :: "t \<Rightarrow> t" and
+  Coprod    :: "[t, t] \<Rightarrow> t"  (infixr "+" 50) and
+  inl       :: "t \<Rightarrow> t" and
+  inr       :: "t \<Rightarrow> t" and
   indCoprod :: "[t \<Rightarrow> t, t \<Rightarrow> t, t] \<Rightarrow> t"  ("(1ind\<^sub>+)")
 where
-  Coprod_form: "\<lbrakk>A: U i; B: U i\<rbrakk> \<Longrightarrow> A + B: U i"
-and
-  Coprod_intro_inl: "\<lbrakk>a: A; B: U i\<rbrakk> \<Longrightarrow> inl a: A + B"
-and
-  Coprod_intro_inr: "\<lbrakk>b: B; A: U i\<rbrakk> \<Longrightarrow> inr b: A + B"
-and
+  Coprod_form: "\<lbrakk>A: U i; B: U i\<rbrakk> \<Longrightarrow> A + B: U i" and
+
+  Coprod_intro_inl: "\<lbrakk>a: A; B: U i\<rbrakk> \<Longrightarrow> inl a: A + B" and
+
+  Coprod_intro_inr: "\<lbrakk>b: B; A: U i\<rbrakk> \<Longrightarrow> inr b: A + B" and
+
   Coprod_elim: "\<lbrakk>
+    u: A + B;
     C: A + B \<longrightarrow> U i;
     \<And>x. x: A \<Longrightarrow> c x: C (inl x);
-    \<And>y. y: B \<Longrightarrow> d y: C (inr y);
-    u: A + B
-    \<rbrakk> \<Longrightarrow> ind\<^sub>+ c d u: C u"
-and
+    \<And>y. y: B \<Longrightarrow> d y: C (inr y) \<rbrakk> \<Longrightarrow> ind\<^sub>+ (\<lambda> x. c x) (\<lambda>y. d y) u: C u" and
+
   Coprod_comp_inl: "\<lbrakk>
+    a: A;
     C: A + B \<longrightarrow> U i;
     \<And>x. x: A \<Longrightarrow> c x: C (inl x);
-    \<And>y. y: B \<Longrightarrow> d y: C (inr y);
-    a: A
-    \<rbrakk> \<Longrightarrow> ind\<^sub>+ c d (inl a) \<equiv> c a"
-and
+    \<And>y. y: B \<Longrightarrow> d y: C (inr y) \<rbrakk> \<Longrightarrow> ind\<^sub>+ (\<lambda>x. c x) (\<lambda>y. d y) (inl a) \<equiv> c a" and
+
   Coprod_comp_inr: "\<lbrakk>
+    b: B;
     C: A + B \<longrightarrow> U i;
     \<And>x. x: A \<Longrightarrow> c x: C (inl x);
-    \<And>y. y: B \<Longrightarrow> d y: C (inr y);
-    b: B
-    \<rbrakk> \<Longrightarrow> ind\<^sub>+ c d (inr b) \<equiv> d b"
-
-
-text "Admissible formation inference rules:"
-
-axiomatization where
-  Coprod_wellform1: "A + B: U i \<Longrightarrow> A: U i"
-and
-  Coprod_wellform2: "A + B: U i \<Longrightarrow> B: U i"
-
-
-text "Rule attribute declarations:"
-
-lemmas Coprod_intro = Coprod_intro_inl Coprod_intro_inr
+    \<And>y. y: B \<Longrightarrow> d y: C (inr y) \<rbrakk> \<Longrightarrow> ind\<^sub>+ (\<lambda>x. c x) (\<lambda>y. d y) (inr b) \<equiv> d b"
 
+lemmas Coprod_routine [intro] = Coprod_form Coprod_intro_inl Coprod_intro_inr Coprod_elim
 lemmas Coprod_comp [comp] = Coprod_comp_inl Coprod_comp_inr
-lemmas Coprod_wellform [wellform] = Coprod_wellform1 Coprod_wellform2
-lemmas Coprod_routine [intro] = Coprod_form Coprod_intro Coprod_elim
 
 
 end
-- 
cgit v1.2.3


From 6857e783fa5cb91f058be322a18fb9ea583f2aad Mon Sep 17 00:00:00 2001
From: Josh Chen
Date: Tue, 18 Sep 2018 11:38:54 +0200
Subject: Overhaul of the theory presentations. New methods in HoTT_Methods.thy
 for handling universes. Commit for release 0.1.0!

---
 Coprod.thy | 1 +
 1 file changed, 1 insertion(+)

(limited to 'Coprod.thy')

diff --git a/Coprod.thy b/Coprod.thy
index d97228e..431e103 100644
--- a/Coprod.thy
+++ b/Coprod.thy
@@ -42,6 +42,7 @@ where
     \<And>x. x: A \<Longrightarrow> c x: C (inl x);
     \<And>y. y: B \<Longrightarrow> d y: C (inr y) \<rbrakk> \<Longrightarrow> ind\<^sub>+ (\<lambda>x. c x) (\<lambda>y. d y) (inr b) \<equiv> d b"
 
+lemmas Coprod_form [form]
 lemmas Coprod_routine [intro] = Coprod_form Coprod_intro_inl Coprod_intro_inr Coprod_elim
 lemmas Coprod_comp [comp] = Coprod_comp_inl Coprod_comp_inr
 
-- 
cgit v1.2.3

