blob: 431e1035e6d2e4b6984d2276b8a9b7a7ce9b86a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
(*
Title: Coprod.thy
Author: Joshua Chen
Date: 2018
Coproduct type
*)
theory Coprod
imports HoTT_Base
begin
axiomatization
Coprod :: "[t, t] ⇒ t" (infixr "+" 50) and
inl :: "t ⇒ t" and
inr :: "t ⇒ t" and
indCoprod :: "[t ⇒ t, t ⇒ t, t] ⇒ t" ("(1ind⇩+)")
where
Coprod_form: "⟦A: U i; B: U i⟧ ⟹ A + B: U i" and
Coprod_intro_inl: "⟦a: A; B: U i⟧ ⟹ inl a: A + B" and
Coprod_intro_inr: "⟦b: B; A: U i⟧ ⟹ inr b: A + B" and
Coprod_elim: "⟦
u: A + B;
C: A + B ⟶ U i;
⋀x. x: A ⟹ c x: C (inl x);
⋀y. y: B ⟹ d y: C (inr y) ⟧ ⟹ ind⇩+ (λ x. c x) (λy. d y) u: C u" and
Coprod_comp_inl: "⟦
a: A;
C: A + B ⟶ U i;
⋀x. x: A ⟹ c x: C (inl x);
⋀y. y: B ⟹ d y: C (inr y) ⟧ ⟹ ind⇩+ (λx. c x) (λy. d y) (inl a) ≡ c a" and
Coprod_comp_inr: "⟦
b: B;
C: A + B ⟶ U i;
⋀x. x: A ⟹ c x: C (inl x);
⋀y. y: B ⟹ d y: C (inr y) ⟧ ⟹ ind⇩+ (λx. c x) (λy. d y) (inr b) ≡ 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
end
|