blob: 99ff268248134a6e4471775f8f228413e55e2471 (
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
51
52
|
(*
Title: Equal.thy
Author: Joshua Chen
Date: 2018
Equality type
*)
theory Equal
imports HoTT_Base
begin
section ‹Basic definitions›
axiomatization
Equal :: "[t, t, t] ⇒ t" and
refl :: "t ⇒ t" and
indEqual :: "[t ⇒ t, t] ⇒ t" ("(1ind⇩=)")
syntax
"_equal" :: "[t, t, t] ⇒ t" ("(3_ =⇩_/ _)" [101, 0, 101] 100)
"_equal_ascii" :: "[t, t, t] ⇒ t" ("(3_ =[_]/ _)" [101, 0, 101] 100)
translations
"a =[A] b" ⇌ "CONST Equal A a b"
"a =⇩A b" ⇀ "CONST Equal A a b"
axiomatization where
Equal_form: "⟦A: U i; a: A; b: A⟧ ⟹ a =⇩A b : U i" and
Equal_intro: "a : A ⟹ (refl a): a =⇩A a" and
Equal_elim: "⟦
p: x =⇩A y;
x: A;
y: A;
⋀x. x: A ⟹ f x: C x x (refl x);
⋀x y. ⟦x: A; y: A⟧ ⟹ C x y: x =⇩A y ⟶ U i ⟧ ⟹ ind⇩= f p : C x y p" and
Equal_comp: "⟦
a: A;
⋀x. x: A ⟹ f x: C x x (refl x);
⋀x y. ⟦x: A; y: A⟧ ⟹ C x y: x =⇩A y ⟶ U i ⟧ ⟹ ind⇩= f (refl a) ≡ f a"
lemmas Equal_form [form]
lemmas Equal_routine [intro] = Equal_form Equal_intro Equal_elim
lemmas Equal_comp [comp]
end
|