annotate zf-in-agda.ind @ 1324:1eefc6600354

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 11 Jun 2023 18:49:13 +0900
parents f7d66c84bc26
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 -title: Constructing ZF Set Theory in Agda
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 --author: Shinji KONO
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
279
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
5 --ZF in Agda
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
6
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
7 zf.agda axiom of ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
8 zfc.agda axiom of choice
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
9 Ordinals.agda axiom of Ordinals
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
10 ordinal.agda countable model of Ordinals
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
11 OD.agda model of ZF based on Ordinal Definable Set with assumptions
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
12 ODC.agda Law of exclude middle from axiom of choice assumptions
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
13 LEMC.agda model of choice with assumption of the Law of exclude middle
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
14 OPair.agda ordered pair on OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
15
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
16 BAlgbra.agda Boolean algebra on OD (not yet done)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
17 filter.agda Filter on OD (not yet done)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
18 cardinal.agda Caedinal number on OD (not yet done)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
19
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
20 logic.agda some basics on logic
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
21 nat.agda some basics on Nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
22
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 --Programming Mathematics
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 Programming is processing data structure with λ terms.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 We are going to handle Mathematics in intuitionistic logic with λ terms.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 Mathematics is a functional programming which values are proofs.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 Programming ZF Set Theory in Agda
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 --Target
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 Describe ZF axioms in Agda
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 Construction a Model of ZF Set Theory in Agda
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 Show necessary assumptions for the model
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 Show validities of ZF axioms on the model
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 This shows consistency of Set Theory (with some assumptions),
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 without circulating ZF Theory assumption.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 <a href="https://github.com/shinji-kono/zf-in-agda">
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 ZF in Agda https://github.com/shinji-kono/zf-in-agda
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 </a>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 --Why Set Theory
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 If we can formulate Set theory, it suppose to work on any mathematical theory.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 Set Theory is a difficult point for beginners especially axiom of choice.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 It has some amount of difficulty and self circulating discussion.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 I'm planning to do it in my old age, but I'm enough age now.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
57 if you familier with Agda, you can skip to
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
58 <a href="#set-theory">
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
59 there
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
60 </a>
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 --Agda and Intuitionistic Logic
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 Curry Howard Isomorphism
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 Proposition : Proof ⇔ Type : Value
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 which means
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70   constructing a typed lambda calculus which corresponds a logic
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 Typed lambda calculus which allows complex type as a value of a variable (System FC)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74   First class Type / Dependent Type
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 Agda is a such a programming language which has similar syntax of Haskell
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 Coq is specialized in proof assistance such as command and tactics .
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 --Introduction of Agda
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 A length of a list of type A.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 length : {A : Set } → List A → Nat
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 length [] = zero
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 length (_ ∷ t) = suc ( length t )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 Simple functional programming language. Type declaration is mandatory.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 A colon means type, an equal means value. Indentation based.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 Set is a base type (which may have a level ).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 {} means implicit variable which can be omitted if Agda infers its value.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 --data ( Sum type )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 A data type which as exclusive multiple constructors. A similar one as
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 union in C or case class in Scala.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 It has a similar syntax as Haskell but it has a slight difference.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 data List (A : Set ) : Set where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 [] : List A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 _∷_ : A → List A → List A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 _∷_ means infix operator. If use explicit _, it can be used in a normal function
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 syntax.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 Natural number can be defined as a usual way.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 data Nat : Set where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 zero : Nat
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 suc : Nat → Nat
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 -- A → B means "A implies B"
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 In Agda, a type can be a value of a variable, which is usually called dependent type.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 Type has a name Set in Agda.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 ex3 : {A B : Set} → Set
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 ex3 {A}{B} = A → B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 ex3 is a type : A → B, which is a value of Set. It also means a formula : A implies B.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 A type is a formula, the value is the proof
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 A value of A → B can be interpreted as an inference from the formula A to the formula B, which
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 can be a function from a proof of A to a proof of B.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 --introduction と elimination
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 For a logical operator, there are two types of inference, an introduction and an elimination.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 intro creating symbol / constructor / introduction
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 elim using symbolic / accessors / elimination
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 In Natural deduction, this can be written in proof schema.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 :
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 B A A → B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 ------------- →intro ------------------ →elim
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 A → B B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 In Agda, this is a pair of type and value as follows. Introduction of → uses λ.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 →intro : {A B : Set } → A → B → ( A → B )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 →intro _ b = λ x → b
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 →elim : {A B : Set } → A → ( A → B ) → B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 →elim a f = f a
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 Important
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 {A B : Set } → A → B → ( A → B )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 is
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 {A B : Set } → ( A → ( B → ( A → B ) ))
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 This makes currying of function easy.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 -- To prove A → B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 Make a left type as an argument. (intros in Coq)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 ex5 : {A B C : Set } → A → B → C → ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 ex5 a b c = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 ? is called a hole, which is unspecified part. Agda tell us which kind type is required for the Hole.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 We are going to fill the holes, and if we have no warnings nor errors such as type conflict (Red),
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 insufficient proof or instance (Yellow), Non-termination, the proof is completed.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 -- A ∧ B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
176
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 Well known conjunction's introduction and elimination is as follow.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
178
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 A B A ∧ B A ∧ B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 ------------- ----------- proj1 ---------- proj2
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 A ∧ B A B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
182
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 We can introduce a corresponding structure in our functional programming language.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
184
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 -- record
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
186
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 record _∧_ A B : Set
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 proj1 : A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 proj2 : B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
191
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 _∧_ means infix operator. _∧_ A B can be written as A ∧ B (Haskell uses (∧) )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
193
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 This a type which constructed from type A and type B. You may think this as an object
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 or struct.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
196
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 record { proj1 = x ; proj2 = y }
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
198
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 is a constructor of _∧_.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
200
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 ex3 : {A B : Set} → A → B → ( A ∧ B )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 ex3 a b = record { proj1 = a ; proj2 = b }
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
203
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 ex1 : {A B : Set} → ( A ∧ B ) → A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 ex1 a∧b = proj1 a∧b
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
206
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 a∧b is a variable name. If we have no spaces in a string, it is a word even if we have symbols
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 except parenthesis or colons. A symbol requires space separation such as a type defining colon.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 Defining record can be recursively, but we don't use the recursion here.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
211
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 -- Mathematical structure
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
213
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 We have types of elements and the relationship in a mathematical structure.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
215
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 logical relation has no ordering
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 there is a natural ordering in arguments and a value in a function
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
218
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 So we have typical definition style of mathematical structure with records.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
220
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 record IsOrdinals {n : Level} (ord : Set n)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 (_o<_ : ord → ord → Set n) : Set (suc (suc n)) where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 Otrans : {x y z : ord } → x o< y → y o< z → x o< z
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
225
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 record Ordinals {n : Level} : Set (suc (suc n)) where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 ord : Set n
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 _o<_ : ord → ord → Set n
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 isOrdinal : IsOrdinals ord _o<_
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
231
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
232 In IsOrdinals, axioms are written in flat way. In Ordinal, we may have
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 inputs and outputs are put in the field including IsOrdinal.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
234
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 Fields of Ordinal is existential objects in the mathematical structure.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
236
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
237 -- Limit Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
238
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
239 If an ordinal is not a succesor of other, it is called limit ordinal. We need predicate to decide it.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
240
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
241 not-limit-p : ( x : ord ) → Dec ( ¬ ((y : ord) → ¬ (x ≡ osuc y) ))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
242
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
243 An ordinal may have an imeditate limit ordinal, we call it next x. Axiom of nrext is this.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
244
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
245 record IsNext {n : Level } (ord : Set n) (o∅ : ord ) (osuc : ord → ord )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
246 (_o<_ : ord → ord → Set n) (next : ord → ord ) : Set (suc (suc n)) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
247 field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
248 x<nx : { y : ord } → (y o< next y )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
249 osuc<nx : { x y : ord } → x o< next y → osuc x o< next y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
250 ¬nx<nx : {x y : ord} → y o< x → x o< next y → ¬ ((z : ord) → ¬ (x ≡ osuc z))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
251
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
252 We show some intresting lemma.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
253
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
254 next< : {x y z : Ordinal} → x o< next z → y o< next x → y o< next z
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
255 nexto=n : {x y : Ordinal} → x o< next (osuc y) → x o< next y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
256 nexto≡ : {x : Ordinal} → next x ≡ next (osuc x)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
257 next-is-limit : {x y : Ordinal} → ¬ (next x ≡ osuc y)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
258
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
259 These are proved from the axiom. Our countable ordinal satisfies these.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
260
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
261 -- A Model and a theory
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
262
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 Agda record is a type, so we can write it in the argument, but is it really exists?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
264
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 If we have a value of the record, it simply exists, that is, we need to create all the existence
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 in the record satisfies all the axioms (= field of IsOrdinal) should be valid.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
267
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 type of record = theory
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 value of record = model
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
270
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 We call the value of the record as a model. If mathematical structure has a
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 model, it exists. Pretty Obvious.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 -- postulate と module
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
275
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 Agda proofs are separated by modules, which are large records.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
277
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 postulates are assumptions. We can assume a type without proofs.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
279
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 postulate
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 sup-o : ( Ordinal → Ordinal ) → Ordinal
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 sup-o< : { ψ : Ordinal → Ordinal } → ∀ {x : Ordinal } → ψ x o< sup-o ψ
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
283
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 sup-o is an example of upper bound of a function and sup-o< assumes it actually
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 satisfies all the value is less than upper bound.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
286
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
287 Writing some type in a module argument is the same as postulating a type, but
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
288 postulate can be written the middle of a proof.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
289
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 postulate can be constructive.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
291
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
292 postulate can be inconsistent, which result everything has a proof. Actualy this assumption
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
293 doesnot work for Ordinals, we discuss this later.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
294
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 -- A ∨ B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
296
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 data _∨_ (A B : Set) : Set where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 case1 : A → A ∨ B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 case2 : B → A ∨ B
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
300
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 As Haskell, case1/case2 are patterns.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
302
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 ex3 : {A B : Set} → ( A ∨ A ) → A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 ex3 = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
305
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 In a case statement, Agda command C-C C-C generates possible cases in the head.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
307
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 ex3 : {A B : Set} → ( A ∨ A ) → A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 ex3 (case1 x) = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 ex3 (case2 x) = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
311
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 Proof schema of ∨ is omit due to the complexity.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
313
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 -- Negation
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
315
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
316
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 ------------- ⊥-elim
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
319
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 Anything can be derived from bottom, in this case a Set A. There is no introduction rule
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 in ⊥, which can be implemented as data which has no constructor.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
322
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 data ⊥ : Set where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
324
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
325 ⊥-elim can be proved like this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
326
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
327 ⊥-elim : {A : Set } -> ⊥ -> A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 ⊥-elim ()
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
329
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 () means no match argument nor value.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
331
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 A negation can be defined using ⊥ like this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
333
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 ¬_ : Set → Set
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 ¬ A = A → ⊥
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
336
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 --Equality
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
338
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
339 All the value in Agda are terms. If we have the same normalized form, two terms are equal.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 If we have variables in the terms, we will perform an unification. unifiable terms are equal.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 We don't go further on the unification.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
342
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
343 { x : A } x ≡ y f x y
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
344 --------------- ≡-intro --------------------- ≡-elim
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 x ≡ x f x x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
346
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 equality _≡_ can be defined as a data.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
348
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
349 data _≡_ {A : Set } : A → A → Set where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 refl : {x : A} → x ≡ x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
351
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 The elimination of equality is a substitution in a term.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
353
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
354 subst : {A : Set } → { x y : A } → ( f : A → Set ) → x ≡ y → f x → f y
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
355 subst {A} {x} {y} f refl fx = fx
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
356
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
357 ex5 : {A : Set} {x y z : A } → x ≡ y → y ≡ z → x ≡ z
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 ex5 {A} {x} {y} {z} x≡y y≡z = subst ( λ k → x ≡ k ) y≡z x≡y
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
359
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
360
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 --Equivalence relation
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
362
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 refl' : {A : Set} {x : A } → x ≡ x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 refl' = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 sym : {A : Set} {x y : A } → x ≡ y → y ≡ x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 sym = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 trans : {A : Set} {x y z : A } → x ≡ y → y ≡ z → x ≡ z
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 trans = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 cong : {A B : Set} {x y : A } { f : A → B } → x ≡ y → f x ≡ f y
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
370 cong = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
371
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
372 --Ordering
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
373
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
374 Relation is a predicate on two value which has a same type.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
375
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
376 A → A → Set
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
377
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
378 Defining order is the definition of this type with predicate or a data.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
379
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
380 data _≤_ : Rel ℕ 0ℓ where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
381 z≤n : ∀ {n} → zero ≤ n
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
382 s≤s : ∀ {m n} (m≤n : m ≤ n) → suc m ≤ suc n
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
383
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
384
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 --Quantifier
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
386
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
387 Handling quantifier in an intuitionistic logic requires special cares.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
388
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 In the input of a function, there are no restriction on it, that is, it has
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 a universal quantifier. (If we explicitly write ∀, Agda gives us a type inference on it)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
391
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
392 There is no ∃ in agda, the one way is using negation like this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
393
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
394  ∃ (x : A ) → p x = ¬ ( ( x : A ) → ¬ ( p x ) )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
395
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
396 On the another way, f : A can be used like this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
397
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
398 p f
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
399
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
400 If we use a function which can be defined globally which has stronger meaning the
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
401 usage of ∃ x in a logical expression.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
402
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
403
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
404 --Can we do math in this way?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
405
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
406 Yes, we can. Actually we have Principia Mathematica by Russell and Whitehead (with out computer support).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
407
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
408 In some sense, this story is a reprinting of the work, (but Principia Mathematica has a different formulation than ZF).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
409
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
410 define mathematical structure as a record
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
411 program inferences as if we have proofs in variables
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
412
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 --Things which Agda cannot prove
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
414
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
415 The infamous Internal Parametricity is a limitation of Agda, it cannot prove so called Free Theorem, which
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
416 leads uniqueness of a functor in Category Theory.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
417
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
418 Functional extensionality cannot be proved.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
419 (∀ x → f x ≡ g x) → f ≡ g
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
420
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
421 Agda has no law of exclude middle.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
422
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
423 a ∨ ( ¬ a )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
424
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
425 For example, (A → B) → ¬ B → ¬ A can be proved but, ( ¬ B → ¬ A ) → A → B cannot.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
426
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
427 It also other problems such as termination, type inference or unification which we may overcome with
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
428 efforts or devices or may not.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
429
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
430 If we cannot prove something, we can safely postulate it unless it leads a contradiction.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
431
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
432 --Classical story of ZF Set Theory
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
433
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
434 <a name="set-theory">
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
435 Assuming ZF, constructing a model of ZF is a flow of classical Set Theory, which leads
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
436 a relative consistency proof of the Set Theory.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
437 Ordinal number is used in the flow.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
438
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
439 In Agda, first we defines Ordinal numbers (Ordinals), then introduce Ordinal Definable Set (OD).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
440 We need some non constructive assumptions in the construction. A model of Set theory is
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
441 constructed based on these assumptions.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
442
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
443 <center><img src="fig/set-theory.svg"></center>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
444
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
445 --Ordinals
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
446
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
447 Ordinals are our intuition of infinite things, which has ∅ and orders on the things.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
448 It also has a successor osuc.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
449
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
450 record Ordinals {n : Level} : Set (suc (suc n)) where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
451 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
452 ord : Set n
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
453 o∅ : ord
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
454 osuc : ord → ord
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
455 _o<_ : ord → ord → Set n
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
456 isOrdinal : IsOrdinals ord o∅ osuc _o<_
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
457
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
458 It is different from natural numbers in way. The order of Ordinals is not defined in terms
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
459 of successor. It is given from outside, which make it possible to have higher order infinity.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
460
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
461 --Axiom of Ordinals
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
462
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
463 Properties of infinite things. We request a transfinite induction, which states that if
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
464 some properties are satisfied below all possible ordinals, the properties are true on all
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
465 ordinals.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
466
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
467 Successor osuc has no ordinal between osuc and the base ordinal. There are some ordinals
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
468 which is not a successor of any ordinals. It is called limit ordinal.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
469
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
470 Any two ordinal can be compared, that is less, equal or more, that is total order.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
471
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
472 record IsOrdinals {n : Level} (ord : Set n) (o∅ : ord )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
473 (osuc : ord → ord )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
474 (_o<_ : ord → ord → Set n) : Set (suc (suc n)) where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
475 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
476 Otrans : {x y z : ord } → x o< y → y o< z → x o< z
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
477 OTri : Trichotomous {n} _≡_ _o<_
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
478 ¬x<0 : { x : ord } → ¬ ( x o< o∅ )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
479 <-osuc : { x : ord } → x o< osuc x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
480 osuc-≡< : { a x : ord } → x o< osuc a → (x ≡ a ) ∨ (x o< a)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
481 TransFinite : { ψ : ord → Set (suc n) }
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
482 → ( (x : ord) → ( (y : ord ) → y o< x → ψ y ) → ψ x )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
483 → ∀ (x : ord) → ψ x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
484
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
485 --Concrete Ordinals or Countable Ordinals
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
486
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
487 We can define a list like structure with level, which is a kind of two dimensional infinite array.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
488
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
489 data OrdinalD {n : Level} : (lv : Nat) → Set n where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
490 Φ : (lv : Nat) → OrdinalD lv
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
491 OSuc : (lv : Nat) → OrdinalD {n} lv → OrdinalD lv
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
492
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
493 The order of the OrdinalD can be defined in this way.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
494
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
495 data _d<_ {n : Level} : {lx ly : Nat} → OrdinalD {n} lx → OrdinalD {n} ly → Set n where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
496 Φ< : {lx : Nat} → {x : OrdinalD {n} lx} → Φ lx d< OSuc lx x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
497 s< : {lx : Nat} → {x y : OrdinalD {n} lx} → x d< y → OSuc lx x d< OSuc lx y
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
498
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
499 This is a simple data structure, it has no abstract assumptions, and it is countable many data
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
500 structure.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
501
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
502 Φ 0
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
503 OSuc 2 ( Osuc 2 ( Osuc 2 (Φ 2)))
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
504 Osuc 0 (Φ 0) d< Φ 1
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
505
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
506 --Model of Ordinals
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
507
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
508 It is easy to show OrdinalD and its order satisfies the axioms of Ordinals.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
509
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
510 So our Ordinals has a mode. This means axiom of Ordinals are consistent.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
511
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
512 --Debugging axioms using Model
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
513
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
514 Whether axiom is correct or not can be checked by a validity on a mode.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
515
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
516 If not, we may fix the axioms or the model, such as the definitions of the order.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
517
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
518 We can also ask whether the inputs exist.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
519
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
520 --Countable Ordinals can contains uncountable set?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
521
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
522 Yes, the ordinals contains any level of infinite Set in the axioms.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
523
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
524 If we handle real-number in the model, only countable number of real-number is used.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
525
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
526 from the outside view point, it is countable
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
527 from the internal view point, it is uncountable
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
528
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
529 The definition of countable/uncountable is the same, but the properties are different
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
530 depending on the context.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
531
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
532 We don't show the definition of cardinal number here.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
533
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
534 --What is Set
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
535
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
536 The word Set in Agda is not a Set of ZF Set, but it is a type (why it is named Set?).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
537
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
538 From naive point view, a set i a list, but in Agda, elements have all the same type.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
539 A set in ZF may contain other Sets in ZF, which not easy to implement it as a list.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
540
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
541 Finite set may be written in finite series of ∨, but ...
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
542
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
543 --We don't ask the contents of Set. It can be anything.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
544
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
545 From empty set φ, we can think a set contains a φ, and a pair of φ and the set, and so on,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
546 and all of them, and again we repeat this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
547
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
548 φ {φ} {φ,{φ}}, {φ,{φ},...}
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
549
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
550 It is called V.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
551
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
552 This operation can be performed within a ZF Set theory. Classical Set Theory assumes
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
553 ZF, so this kind of thing is allowed.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
554
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
555 But in our case, we have no ZF theory, so we are going to use Ordinals.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
556
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
557 The idea is to use an ordinal as a pointer to a record which defines a Set.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
558 If the recored defines a series of Ordinals which is a pointer to the Set.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
559 This record looks like a Set.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
560
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
561 --Ordinal Definable Set
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
562
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
563 We can define a sbuset of Ordinals using predicates. What is a subset?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
564
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
565 a predicate has an Ordinal argument
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
566
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
567 is an Ordinal Definable Set (OD). In Agda, OD is defined as follows.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
568
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
569 record OD : Set (suc n ) where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
570 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
571 def : (x : Ordinal ) → Set n
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
572
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
573 Ordinals itself is not a set in a ZF Set theory but a class. In OD,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
574
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
575 data One : Set n where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
576 OneObj : One
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
577
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
578 record { def = λ x → One }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
579
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
580 means it accepets all Ordinals, i.e. this is Ordinals itself, so ODs are larger than ZF Set.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
581 You can say OD is a class in ZF Set Theory term.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
582
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
583
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
584 --OD is not ZF Set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
585
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
586 If we have 1 to 1 mapping between an OD and an Ordinal, OD contains several ODs and OD looks like
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
587 a Set. The idea is to use an ordinal as a pointer to OD.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
588 Unfortunately this scheme does not work well. As we saw OD includes all Ordinals,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
589 which is a maximum of OD, but Ordinals has no maximum at all. So we have a contradction like
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
590
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
591 ¬OD-order : ( & : OD → Ordinal )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
592 → ( * : Ordinal → OD ) → ( { x y : OD } → def y ( & x ) → & x o< & y) → ⊥
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
593 ¬OD-order & * c<→o< = ?
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
594
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
595 Actualy we can prove this contrdction, so we need some restrctions on OD.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
596
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
597 This is a kind of Russel paradox, that is if OD contains everything, what happens if it contains itself.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
598
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
599 -- HOD : Hereditarily Ordinal Definable
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
600
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
601 What we need is a bounded OD, the containment is limited by an ordinal.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
602
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
603 record HOD : Set (suc n) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
604 field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
605 od : OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
606 odmax : Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
607 <odmax : {y : Ordinal} → def od y → y o< odmax
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
608
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
609 In classical Set Theory, HOD stands for Hereditarily Ordinal Definable, which means
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
610
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
611 HOD = { x | TC x ⊆ OD }
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
612
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
613 TC x is all transitive closure of x, that is elements of x and following all elements of them are all OD. But
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
614 what is x? In this case, x is an Set which we don't have yet. In our case, HOD is a bounded OD.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
615
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
616 --1 to 1 mapping between an HOD and an Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
617
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
618 HOD is a predicate on Ordinals and the solution is bounded by some ordinal. If we have a mapping
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
619
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
620 & : HOD → Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
621 * : Ordinal → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
622 oiso : {x : HOD } → * ( & x ) ≡ x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
623 diso : {x : Ordinal } → & ( * x ) ≡ x
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
624
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
625 we can check an HOD is an element of the OD using def.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
626
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
627 A ∋ x can be define as follows.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
628
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
629 _∋_ : ( A x : HOD ) → Set n
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
630 _∋_ A x = def (od A) ( & x )
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
631
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
632 In ψ : Ordinal → Set, if A is a record { def = λ x → ψ x } , then
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
633
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
634 A x = def A ( & x ) = ψ (& x)
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
635
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
636 They say the existing of the mappings can be proved in Classical Set Theory, but we
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
637 simply assumes these non constructively.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
638
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
639 <center><img src="fig/ord-od-mapping.svg"></center>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
640
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
641 --Order preserving in the mapping of OD and Ordinal
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
642
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
643 Ordinals have the order and HOD has a natural order based on inclusion ( def / ∋ ).
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
644
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
645 def (od y) ( & x )
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
646
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
647 An elements of HOD should be defined before the HOD, that is, an ordinal corresponding an elements
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
648 have to be smaller than the corresponding ordinal of the containing OD.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
649 We also assumes subset is always smaller. This is necessary to make a limit of Power Set.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
650
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
651 c<→o< : {x y : HOD } → def (od y) ( & x ) → & x o< & y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
652 ⊆→o≤ : {y z : HOD } → ({x : Ordinal} → def (od y) x → def (od z) x ) → & y o< osuc (& z)
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
653
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
654 If wa assumes reverse order preservation,
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
655
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
656 o<→c< : {n : Level} {x y : Ordinal } → x o< y → def (* y) x
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
657
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
658 ∀ x ∋ ∅ becomes true, which manes all OD becomes Ordinals in the model.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
659
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
660 <center><img src="fig/ODandOrdinals.svg"></center>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
661
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
662 --Various Sets
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
663
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
664 In classical Set Theory, there is a hierarchy call L, which can be defined by a predicate.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
665
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
666 Ordinal / things satisfies axiom of Ordinal / extension of natural number
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
667 V / hierarchical construction of Set from φ
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
668 L / hierarchical predicate definable construction of Set from φ
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
669 HOD / Hereditarily Ordinal Definable
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
670 OD / equational formula on Ordinals
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
671 Agda Set / Type / it also has a level
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
672
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
673
361
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
674 --Fixing ZF axom to fit intuitionistic logic
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
675
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
676 We use ODs as Sets in ZF, and defines record ZF, that is, we have to define
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
677 ZF axioms in Agda.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
678
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
679 It may not valid in our model. We have to debug it.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
680
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
681 Fixes are depends on axioms.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
682
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
683 <center><img src="fig/axiom-type.svg"></center>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
684
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
685 <a href="fig/zf-record.html">
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
686 ZFのrecord
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
687 </a>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
688
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
689 --Pure logical axioms
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
690
279
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
691 empty, pair, select, ε-induction??infinity
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
692
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
693 These are logical relations among OD.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
694
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
695 empty : ∀( x : ZFSet ) → ¬ ( ∅ ∋ x )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
696 pair→ : ( x y t : ZFSet ) → (x , y) ∋ t → ( t ≈ x ) ∨ ( t ≈ y )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
697 pair← : ( x y t : ZFSet ) → ( t ≈ x ) ∨ ( t ≈ y ) → (x , y) ∋ t
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
698 selection : { ψ : ZFSet → Set m } → ∀ { X y : ZFSet } → ( ( y ∈ X ) ∧ ψ y ) ⇔ (y ∈ Select X ψ )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
699 infinity∅ : ∅ ∈ infinite
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
700 infinity : ∀( x : ZFSet ) → x ∈ infinite → ( x ∪ ( x , x ) ) ∈ infinite
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
701 ε-induction : { ψ : OD → Set (suc n)}
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
702 → ( {x : OD } → ({ y : OD } → x ∋ y → ψ y ) → ψ x )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
703 → (x : OD ) → ψ x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
704
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
705 finitely can be define by Agda data.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
706
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
707 data infinite-d : ( x : Ordinal ) → Set n where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
708 iφ : infinite-d o∅
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
709 isuc : {x : Ordinal } → infinite-d x →
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
710 infinite-d (& ( Union (* x , (* x , * x ) ) ))
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
711
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
712 Union (x , ( x , x )) should be an direct successor of x, but we cannot prove it in our model.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
713
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
714 --Axiom of Pair
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
715
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
716 In the Tanaka's book, axiom of pair is as follows.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
717
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
718 ∀ x ∀ y ∃ z ∀ t ( z ∋ t ↔ t ≈ x ∨ t ≈ y)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
719
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
720 We have fix ∃ z, a function (x , y) is defined, which is _,_ .
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
721
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
722 _,_ : ( A B : ZFSet ) → ZFSet
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
723
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
724 using this, we can define two directions in separates axioms, like this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
725
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
726 pair→ : ( x y t : ZFSet ) → (x , y) ∋ t → ( t ≈ x ) ∨ ( t ≈ y )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
727 pair← : ( x y t : ZFSet ) → ( t ≈ x ) ∨ ( t ≈ y ) → (x , y) ∋ t
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
728
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
729 This is already written in Agda, so we use these as axioms. All inputs have ∀.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
730
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
731 --pair in OD
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
732
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
733 OD is an equation on Ordinals, we can simply write axiom of pair in the OD.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
734
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
735 _,_ : HOD → HOD → HOD
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
736 x , y = record { od = record { def = λ t → (t ≡ & x ) ∨ ( t ≡ & y ) } ; odmax = ? ; <odmax = ? }
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
737
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
738 It is easy to find out odmax from odmax of x and y.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
739
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
740 ≡ is an equality of λ terms, but please not that this is equality on Ordinals.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
741
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
742 --Validity of Axiom of Pair
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
743
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
744 Assuming ZFSet is OD, we are going to prove pair→ .
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
745
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
746 pair→ : ( x y t : OD ) → (x , y) ∋ t → ( t == x ) ∨ ( t == y )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
747 pair→ x y t p = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
748
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
749 In this program, type of p is ( x , y ) ∋ t , that is
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
750 def ( x , y ) that is, (t ≡ & x ) ∨ ( t ≡ & y ) .
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
751
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
752 Since _∨_ is a data, it can be developed as (C-c C-c : agda2-make-case ).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
753
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
754 pair→ x y t (case1 t≡x ) = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
755 pair→ x y t (case2 t≡y ) = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
756
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
757 The type of the ? is ( t == x ) ∨ ( t == y ), again it is data _∨_ .
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
758
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
759 pair→ x y t (case1 t≡x ) = case1 ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
760 pair→ x y t (case2 t≡y ) = case2 ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
761
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
762 The ? in case1 is t == x, so we have to create this from t≡x, which is a name of a variable
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
763 which type is
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
764
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
765 t≡x : & t ≡ & x
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
766
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
767 which is shown by an Agda command (C-C C-E : agda2-show-context ).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
768
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
769 But we haven't defined == yet.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
770
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
771 --Equality of OD and Axiom of Extensionality
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
772
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
773 OD is defined by a predicates, if we compares normal form of the predicates, even if
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
774 it contains the same elements, it may be different, which is no good as an equality of
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
775 Sets.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
776
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
777 Axiom of Extensionality requires sets having the same elements are handled in the same way
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
778 each other.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
779
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
780 ∀ z ( z ∈ x ⇔ z ∈ y ) ⇒ ∀ w ( x ∈ w ⇔ y ∈ w )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
781
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
782 We can write this axiom in Agda as follows.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
783
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
784 extensionality : { A B w : ZFSet } → ( (z : ZFSet) → ( A ∋ z ) ⇔ (B ∋ z) ) → ( A ∈ w ⇔ B ∈ w )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
785
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
786 So we use ( A ∋ z ) ⇔ (B ∋ z) as an equality (_==_) of our model. We have to show
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
787 A ∈ w ⇔ B ∈ w from A == B.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
788
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
789 x == y can be defined in this way.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
790
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
791 record _==_ ( a b : OD ) : Set n where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
792 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
793 eq→ : ∀ { x : Ordinal } → def a x → def b x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
794 eq← : ∀ { x : Ordinal } → def b x → def a x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
795
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
796 Actually, (z : HOD) → (A ∋ z) ⇔ (B ∋ z) implies od A == od B.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
797
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
798 extensionality0 : {A B : HOD } → ((z : HOD) → (A ∋ z) ⇔ (B ∋ z)) → od A == od B
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
799 eq→ (extensionality0 {A} {B} eq ) {x} d = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
800 eq← (extensionality0 {A} {B} eq ) {x} d = ?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
801
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
802 ? are def B x and def A x and these are generated from eq : (z : OD) → (A ∋ z) ⇔ (B ∋ z) .
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
803
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
804 Actual proof is rather complicated.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
805
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
806 eq→ (extensionality0 {A} {B} eq ) {x} d = odef-iso {A} {B} (sym diso) (proj1 (eq (* x))) d
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
807 eq← (extensionality0 {A} {B} eq ) {x} d = odef-iso {B} {A} (sym diso) (proj2 (eq (* x))) d
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
808
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
809 where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
810
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
811 odef-iso : {A B : HOD } {x y : Ordinal } → x ≡ y → (def A (od y) → def (od B) y) → def (od A) x → def (od B) x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
812 odef-iso refl t = t
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
813
363
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
814 --The uniqueness of HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
815
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
816 To prove extensionality or other we need ==→o≡.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
817
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
818 Since we have ==→o≡ , so odmax have to be unique. We should have odmaxmin in HOD.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
819 We can calculate the minimum using sup if we have bound but it is tedius.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
820 Only Select has non minimum odmax.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
821 We have the same problem on 'def' itself, but we leave it, that is we assume the
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
822 assumption of predicates of Agda have a unique form, it is something like the
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
823 functional extensionality assumption.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 361
diff changeset
824
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
825 --Validity of Axiom of Extensionality
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
826
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
827 If we can derive (w ∋ A) ⇔ (w ∋ B) from od A == od B, the axiom becomes valid, but it seems impossible,
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
828 so we assumes
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
829
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
830 ==→o≡ : { x y : HOD } → (od x == od y) → x ≡ y
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
831
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
832 Using this, we have
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
833
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
834 extensionality : {A B w : HOD } → ((z : HOD ) → (A ∋ z) ⇔ (B ∋ z)) → (w ∋ A) ⇔ (w ∋ B)
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
835 proj1 (extensionality {A} {B} {w} eq ) d = subst (λ k → w ∋ k) ( ==→o≡ (extensionality0 {A} {B} eq) ) d
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
836 proj2 (extensionality {A} {B} {w} eq ) d = subst (λ k → w ∋ k) (sym ( ==→o≡ (extensionality0 {A} {B} eq) )) d
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
837
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
838 --Axiom of infinity
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
839
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
840 It means it has ω as a ZF Set. It is ususally written like this.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
841
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
842 ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
843
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
844 x ∪ { x } is Union (x , (x , x)) in our notation. It contains existential quantifier, so we introduce a function
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
845
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
846 infinite : ZFSet
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
847 infinity∅ : ∅ ∈ infinite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
848 infinity : ∀( x : ZFSet ) → x ∈ infinite → ( x ∪ { x }) ∈ infinite
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
849
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
850 --ω in HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
851
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
852 To define an OD which arrows & (Union (x , (x , x))) as a predicate, we can use Agda data structure.
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
853
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
854 data infinite-d : ( x : Ordinal ) → Set n where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
855 iφ : infinite-d o∅
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
856 isuc : {x : Ordinal } → infinite-d x →
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
857 infinite-d (& ( Union (* x , (* x , * x ) ) ))
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
858
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
859 It has simular structure as Data.Nat in Agda, and it defines a correspendence of HOD and the data structure. Now
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
860 we can define HOD like this.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
861
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
862 infinite : HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
863 infinite = record { od = record { def = λ x → infinite-d x } ; odmax = ? ; <odmax = ? }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
864
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
865 So what is the bound of ω? Analyzing the definition, it depends on the value of & (x , x), which
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
866 cannot know the aboslute value. This is because we don't have constructive definition of & : HOD → Ordinal.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
867
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
868 --HOD and Agda data structure
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
869
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
870 We may have
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
871
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
872 a HOD <=> Agda Data Strucure
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
873
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
874 as a data in Agda. Ex.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
875
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
876 data ord-pair : (p : Ordinal) → Set n where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
877 pair : (x y : Ordinal ) → ord-pair ( & ( < * x , * y > ) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
878
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
879 ZFProduct : OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
880 ZFProduct = record { def = λ x → ord-pair x }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
881
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
882 pi1 : { p : Ordinal } → ord-pair p → Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
883 pi1 ( pair x y) = x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
884
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
885 π1 : { p : HOD } → def ZFProduct (& p) → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
886 π1 lt = * (pi1 lt )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
887
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
888 p-iso : { x : HOD } → (p : def ZFProduct (& x) ) → < π1 p , π2 p > ≡ x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
889 p-iso {x} p = ord≡→≡ (op-iso p)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
890
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
891
361
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
892 --HOD Ordrinal mapping
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
893
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
894 We have large freedom on HOD. We reqest no minimality on odmax, so it may arbitrary larger.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
895 The address of HOD can be larger at least it have to be larger than the content's address.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
896 We only have a relative ordering such as
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
897
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
898 pair-xx<xy : {x y : HOD} → & (x , x) o< osuc (& (x , y) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
899 pair<y : {x y : HOD } → y ∋ x → & (x , x) o< osuc (& y)
361
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
900
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
901 Basicaly, we cannot know the concrete address of HOD other than empty set.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
902
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
903 <center><img src="fig/address-of-HOD.svg"></center>
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
904
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
905 --Possible restriction on HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
906
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
907 We need some restriction on the HOD-Ordinal mapping. Simple one is this.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
908
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
909 ωmax : Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
910 <ωmax : {y : Ordinal} → infinite-d y → y o< ωmax
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
911
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
912 It depends on infinite-d and put no assuption on the other similar construction. A more general one may be
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
913
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
914 hod-ord< : {x : HOD } → Set n
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
915 hod-ord< {x} = & x o< next (odmax x)
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
916
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
917 next : Ordinal → Ordinal means imediate next limit ordinal of x. It supress unecessary space between address of HOD and
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
918 its bound.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
919
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
920 In other words, the space between address of HOD and its bound is arbitrary, it is possible to assume ω has no bound.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
921 This is the reason of necessity of Axiom of infinite.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
922
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
923 --increment pase of address of HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
924
361
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
925 Assuming, hod-ord< , we have
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
926
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
927 pair-ord< : {x : HOD } → ( {y : HOD } → & y o< next (odmax y) ) → & ( x , x ) o< next (& x)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
928 pair-ord< {x} ho< = subst (λ k → & (x , x) o< k ) lemmab0 lemmab1 where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
929 lemmab0 : next (odmax (x , x)) ≡ next (& x)
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
930
361
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
931 So the address of ( x , x) and Union (x , (x , x)) is restricted in the limit ordinal. This makes ω bound. We can prove
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 359
diff changeset
932
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
933 infinite-bound : ({x : HOD} → & x o< next (odmax x)) → {y : Ordinal} → infinite-d y → y o< next o∅
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
934
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
935 We also notice that if we have & (x , x) ≡ osuc (& x), c<→o< can be drived from ⊆→o≤ .
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
936
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
937 ⊆→o≤→c<→o< : ({x : HOD} → & (x , x) ≡ osuc (& x) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
938 → ({y z : HOD } → ({x : Ordinal} → def (od y) x → def (od z) x ) → & y o< osuc (& z) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
939 → {x y : HOD } → def (od y) ( & x ) → & x o< & y
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
940
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
941 --Non constructive assumptions so far
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
942
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
943 & : HOD → Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
944 * : Ordinal → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
945 c<→o< : {x y : HOD } → def (od y) ( & x ) → & x o< & y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
946 ⊆→o≤ : {y z : HOD } → ({x : Ordinal} → def (od y) x → def (od z) x ) → & y o< osuc (& z)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
947 oiso : {x : HOD } → * ( & x ) ≡ x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
948 diso : {x : Ordinal } → & ( * x ) ≡ x
336
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
949 ==→o≡ : {x y : HOD } → (od x == od y) → x ≡ y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
950 sup-o : (A : HOD) → ( ( x : Ordinal ) → def (od A) x → Ordinal ) → Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 279
diff changeset
951 sup-o< : (A : HOD) → { ψ : ( x : Ordinal ) → def (od A) x → Ordinal } → ∀ {x : Ordinal } → (lt : def (od A) x ) → ψ x lt o< sup-o A ψ
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
952
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
953 --Axiom which have negation form
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
954
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
955 Union, Selection
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
956
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
957 These axioms contains ∃ x as a logical relation, which can be described in ¬ ( ∀ x ( ¬ p )).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
958
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
959 Axiom of replacement uses upper bound of function on Ordinals, which makes it non-constructive.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
960
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
961 Power Set axiom requires double negation,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
962
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
963 power→ : ∀( A t : ZFSet ) → Power A ∋ t → ∀ {x} → t ∋ x → ¬ ¬ ( A ∋ x )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
964 power← : ∀( A t : ZFSet ) → t ⊆_ A → Power A ∋ t
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
965
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
966 If we have an assumption of law of exclude middle, we can recover the original A ∋ x form.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
967
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
968 --Union
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
969
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
970 The original form of the Axiom of Union is
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
971
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
972 ∀ x ∃ y ∀ z (z ∈ y ⇔ ∃ u ∈ x ∧ (z ∈ u))
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
973
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
974 Union requires the existence of b in a ⊇ ∃ b ∋ x . We will use negation form of ∃.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
975
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
976 union→ : ( X z u : ZFSet ) → ( X ∋ u ) ∧ (u ∋ z ) → Union X ∋ z
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
977 union← : ( X z : ZFSet ) → (X∋z : Union X ∋ z ) → ¬ ( (u : ZFSet ) → ¬ ((X ∋ u) ∧ (u ∋ z )))
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
978
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
979 The definition of Union in HOD is like this.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
980
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
981 Union : HOD → HOD
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
982 Union U = record { od = record { def = λ x → ¬ (∀ (u : Ordinal ) → ¬ ((odef U u) ∧ (odef (* u) x))) }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
983 ; odmax = osuc (& U) ; <odmax = ? }
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
984
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
985 The bound of Union is evident, but its proof is rather complicated.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
986
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
987 Proof of validity is straight forward.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
988
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
989 union→ : (X z u : HOD) → (X ∋ u) ∧ (u ∋ z) → Union X ∋ z
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
990 union→ X z u xx not = ⊥-elim ( not (& u) ( record { proj1 = proj1 xx
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
991 ; proj2 = subst ( λ k → odef k (& z)) (sym oiso) (proj2 xx) } ))
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
992 union← : (X z : HOD) (X∋z : Union X ∋ z) → ¬ ( (u : HOD ) → ¬ ((X ∋ u) ∧ (u ∋ z )))
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
993 union← X z UX∋z = FExists _ lemma UX∋z where
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
994 lemma : {y : Ordinal} → odef X y ∧ odef (* y) (& z) → ¬ ((u : HOD) → ¬ (X ∋ u) ∧ (u ∋ z))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
995 lemma {y} xx not = not (* y) record { proj1 = subst ( λ k → odef X k ) (sym diso) (proj1 xx ) ; proj2 = proj2 xx }
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
996
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
997 where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
998
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
999 FExists : {m l : Level} → ( ψ : Ordinal → Set m )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1000 → {p : Set l} ( P : { y : Ordinal } → ψ y → ¬ p )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1001 → (exists : ¬ (∀ y → ¬ ( ψ y ) ))
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1002 → ¬ p
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1003 FExists {m} {l} ψ {p} P = contra-position ( λ p y ψy → P {y} ψy p )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1004
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1005 which checks existence using contra-position.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1006
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1007 --Axiom of replacement
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1008
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1009 We can replace the elements of a set by a function and it becomes a set. From the book,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1010
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1011 ∀ x ∀ y ∀ z ( ( ψ ( x , y ) ∧ ψ ( x , z ) ) → y = z ) → ∀ X ∃ A ∀ y ( y ∈ A ↔ ∃ x ∈ X ψ ( x , y ) )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1012
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1013 The existential quantifier can be related by a function,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1014
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1015 Replace : HOD → (HOD → HOD ) → HOD
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1016
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1017 The axioms becomes as follows.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1018
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1019 replacement← : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → x ∈ X → ψ x ∈ Replace X ψ
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1020 replacement→ : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → ( lt : x ∈ Replace X ψ ) → ¬ ( ∀ (y : ZFSet) → ¬ ( x ≈ ψ y ) )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1021
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1022 In the axiom, the existence of the original elements is necessary. In order to do that we use OD which has
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1023 negation form of existential quantifier in the definition.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1024
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1025 in-codomain : (X : OD ) → ( ψ : OD → OD ) → OD
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1026 in-codomain X ψ = record { def = λ x → ¬ ( (y : Ordinal ) → ¬ ( def X y ∧ ( x ≡ & (ψ (* y ))))) }
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1027
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1028 in-codomain is a logical relation-ship, and it is written in OD.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1029
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1030 Replace : HOD → (HOD → HOD) → HOD
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1031 Replace X ψ = record { od = record { def = λ x → (x o< sup-o X (λ y X∋y → & (ψ (* y)))) ∧ def (in-codomain X ψ) x }
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1032 ; odmax = rmax ; <odmax = rmax<} where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1033 rmax : Ordinal
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1034 rmax = sup-o X (λ y X∋y → & (ψ (* y)))
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1035 rmax< : {y : Ordinal} → (y o< rmax) ∧ def (in-codomain X ψ) y → y o< rmax
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1036 rmax< lt = proj1 lt
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1037
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1038 The bbound of Replace is defined by supremum, that is, it is not limited in a limit ordinal of original ZF Set.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1039
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1040 Once we have a bound, validity of the axiom is an easy task to check the logical relation-ship.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1041
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1042 --Validity of Power Set Axiom
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1043
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1044 The original Power Set Axiom is this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1045
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1046 ∀ X ∃ A ∀ t ( t ∈ A ↔ t ⊆ X ) )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1047
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1048 The existential quantifier is replaced by a function
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1049
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1050 Power : ( A : OD ) → OD
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1051
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1052 t ⊆ X is a record like this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1053
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1054 record _⊆_ ( A B : OD ) : Set (suc n) where
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1055 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1056 incl : { x : OD } → A ∋ x → B ∋ x
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1057
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1058 Axiom becomes likes this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1059
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1060 power→ : ( A t : OD) → Power A ∋ t → {x : OD} → t ∋ x → ¬ ¬ (A ∋ x)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1061 power← : (A t : OD) → ({x : OD} → (t ∋ x → A ∋ x)) → Power A ∋ t
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1062
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1063 The validity of the axioms are slight complicated, we have to define set of all subset. We define
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1064 subset in a different form.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1065
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1066 ZFSubset : (A x : HOD ) → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1067 ZFSubset A x = record { od = record { def = λ y → odef A y ∧ odef x y } ; odmax = omin (odmax A) (odmax x) ; <odmax = lemma } where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1068 lemma : {y : Ordinal} → def (od A) y ∧ def (od x) y → y o< omin (odmax A) (odmax x)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1069 lemma {y} and = min1 (<odmax A (proj1 and)) (<odmax x (proj2 and))
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1070
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1071 We can prove,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1072
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1073 ( {y : HOD } → x ∋ y → ZFSubset A x ∋ y ) ⇔ ( x ⊆ A )
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1074
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1075 We only have upper bound as an ordinal, but we have an obvious OD based on the order of Ordinals,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1076 which is an Ordinals with our Model.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1077
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1078 Ord : ( a : Ordinal ) → OD
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1079 Ord a = record { def = λ y → y o< a }
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1080
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1081 Def : (A : OD ) → OD
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1082 Def A = Ord ( sup-o ( λ x → & ( ZFSubset A (* x )) ) )
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1083
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1084 This is slight larger than Power A, so we replace all elements x by A ∩ x (some of them may empty).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1085
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1086 Power : OD → OD
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1087 Power A = Replace (Def (Ord (& A))) ( λ x → A ∩ x )
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1088
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1089 Creating Power Set of Ordinals is rather easy, then we use replacement axiom on A ∩ x since we have this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1090
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1091 ∩-≡ : { a b : HOD } → ({x : HOD } → (a ∋ x → b ∋ x)) → od a == od ( b ∩ a )
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1092
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1093 In case of Ord a intro of Power Set axiom becomes valid.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1094
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1095 ord-power← : (a : Ordinal ) (t : HOD) → ({x : HOD} → (t ∋ x → (Ord a) ∋ x)) → OPwr (Ord a) ∋ t
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1096
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1097 Using this, we can prove,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1098
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1099 power→ : ( A t : HOD) → Power A ∋ t → {x : HOD} → t ∋ x → ¬ ¬ (A ∋ x)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1100 power← : (A t : HOD) → ({x : HOD} → (t ∋ x → A ∋ x)) → Power A ∋ t
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1101
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1102
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1103 --Axiom of regularity, Axiom of choice, ε-induction
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1104
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1105 Axiom of regularity requires non self intersectable elements (which is called minimum), if we
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1106 replace it by a function, it becomes a choice function. It makes axiom of choice valid.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1107
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1108 This means we cannot prove axiom regularity form our model, and if we postulate this, axiom of
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1109 choice also becomes valid.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1110
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1111 minimal : (x : HOD ) → ¬ (x == od∅ )→ OD
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1112 x∋minimal : (x : HOD ) → ( ne : ¬ (x == od∅ ) ) → def x ( & ( minimal x ne ) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1113 minimal-1 : (x : HOD ) → ( ne : ¬ (x == od∅ ) ) → (y : HOD ) → ¬ ( def (minimal x ne) (& y)) ∧ (def x (& y) )
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1114
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1115 We can avoid this using ε-induction (a predicate is valid on all set if the predicate is true on some element of set).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1116 Assuming law of exclude middle, they say axiom of regularity will be proved, but we haven't check it yet.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1117
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1118 ε-induction : { ψ : HOD → Set (suc n)}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1119 → ( {x : HOD } → ({ y : HOD } → x ∋ y → ψ y ) → ψ x )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1120 → (x : HOD ) → ψ x
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1121
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1122 In our model, we assumes the mapping between Ordinals and OD, this is actually the TransFinite induction in Ordinals.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1123
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1124 The axiom of choice in the book is complicated using any pair in a set, so we use use a form in the Wikipedia.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1125
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1126 ∀ X [ ∅ ∉ X → (∃ f : X → ⋃ X ) → ∀ A ∈ X ( f ( A ) ∈ A ) ]
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1127
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1128 We can formulate like this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1129
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1130 choice-func : (X : ZFSet ) → {x : ZFSet } → ¬ ( x ≈ ∅ ) → ( X ∋ x ) → ZFSet
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1131 choice : (X : ZFSet ) → {A : ZFSet } → ( X∋A : X ∋ A ) → (not : ¬ ( A ≈ ∅ )) → A ∋ choice-func X not X∋A
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1132
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1133 It does not requires ∅ ∉ X .
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1134
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1135 --Axiom of choice and Law of Excluded Middle
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1136
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1137 In our model, since HOD has a mapping to Ordinals, it has evident order, which means well ordering theorem is valid,
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1138 but it don't have correct form of the axiom yet. They say well ordering axiom is equivalent to the axiom of choice,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1139 but it requires law of the exclude middle.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1140
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1141 Actually, it is well known to prove law of the exclude middle from axiom of choice in intuitionistic logic, and we can
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1142 perform the proof in our mode. Using the definition like this, predicates and ODs are related and we can ask the
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1143 set is empty or not if we have an axiom of choice, so we have the law of the exclude middle p ∨ ( ¬ p ) .
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1144
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1145 ppp : { p : Set n } { a : HOD } → record { def = λ x → p } ∋ a → p
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1146 ppp {p} {a} d = d
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1147
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1148 We can prove axiom of choice from law excluded middle since we have TransFinite induction. So Axiom of choice
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1149 and Law of Excluded Middle is equivalent in our mode.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1150
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1151 --Relation-ship among ZF axiom
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1152
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1153 <center><img src="fig/axiom-dependency.svg"></center>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1154
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1155 --Non constructive assumption in our model
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1156
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1157 mapping between HOD and Ordinals
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1158
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1159 & : HOD → Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1160 * : Ordinal → OD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1161 oiso : {x : HOD } → * ( & x ) ≡ x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1162 diso : {x : Ordinal } → & ( * x ) ≡ x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1163 c<→o< : {x y : HOD } → def y ( & x ) → & x o< & y
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1164 ⊆→o≤ : {y z : HOD } → ({x : Ordinal} → def (od y) x → def (od z) x ) → & y o< osuc (& z)
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1165
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1166 Equivalence on OD
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1167
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1168 ==→o≡ : { x y : HOD } → (od x == od y) → x ≡ y
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1169
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1170 Upper bound
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1171
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1172 sup-o : (A : HOD) → ( ( x : Ordinal ) → def (od A) x → Ordinal ) → Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1173 sup-o< : (A : HOD) → { ψ : ( x : Ordinal ) → def (od A) x → Ordinal } → ∀ {x : Ordinal } → (lt : def (od A) x ) → ψ x lt o< sup-o A ψ
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1174
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1175 In order to have bounded ω,
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1176
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1177 hod-ord< : {x : HOD} → & x o< next (odmax x)
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1178
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1179 Axiom of choice and strong axiom of regularity.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1180
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1181 minimal : (x : HOD ) → ¬ (x =h= od∅ )→ HOD
425
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1182 x∋minimal : (x : HOD ) → ( ne : ¬ (x =h= od∅ ) ) → odef x ( & ( minimal x ne ) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1183 minimal-1 : (x : HOD ) → ( ne : ¬ (x =h= od∅ ) ) → (y : HOD ) → ¬ ( odef (minimal x ne) (& y)) ∧ (odef x (& y) )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1184
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1185 --V
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1186
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1187 The cumulative hierarchy
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1188 V 0 := ∅
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1189 V α + 1 := P ( V α )
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1190 V α := ⋃ { V β | β < α }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1191
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1192 Using TransFinite induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1193
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1194 V : ( β : Ordinal ) → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1195 V β = TransFinite V1 β where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1196 V1 : (x : Ordinal ) → ( ( y : Ordinal) → y o< x → HOD ) → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1197 V1 x V0 with trio< x o∅
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1198 V1 x V0 | tri< a ¬b ¬c = ⊥-elim ( ¬x<0 a)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1199 V1 x V0 | tri≈ ¬a refl ¬c = Ord o∅
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1200 V1 x V0 | tri> ¬a ¬b c with Oprev-p x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1201 V1 x V0 | tri> ¬a ¬b c | yes p = Power ( V0 (Oprev.oprev p ) (subst (λ k → _ o< k) (Oprev.oprev=x p) <-osuc ))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1202 V1 x V0 | tri> ¬a ¬b c | no ¬p =
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1203 record { od = record { def = λ y → (y o< x ) ∧ ((lt : y o< x ) → odef (V0 y lt) x ) } ;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1204 odmax = x; <odmax = λ {x} lt → proj1 lt }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1205
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1206 In our system, clearly V ⊆ HOD。
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1208 --L
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1209
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1210 The constructible Sets
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1211 L 0 := ∅
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1212 L α + 1 := Df (L α) -- Definable Power Set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1213 V α := ⋃ { L β | β < α }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1214
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1215 What is Df? In our system, Power x is definable by Sup.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1216
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1217 record Definitions : Set (suc n) where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1218 field
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1219 Definition : HOD → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1220
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1221 open Definitions
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1222
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1223 Df : Definitions → (x : HOD) → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1224 Df D x = Power x ∩ Definition D x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1225
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1226 --L
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1227
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1228 L : ( β : Ordinal ) → Definitions → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1229 L β D = TransFinite L1 β where
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1230 L1 : (x : Ordinal ) → ( ( y : Ordinal) → y o< x → HOD ) → HOD
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1231 L1 x L0 with trio< x o∅
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1232 L1 x L0 | tri< a ¬b ¬c = ⊥-elim ( ¬x<0 a)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1233 L1 x L0 | tri≈ ¬a refl ¬c = Ord o∅
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1234 L1 x L0 | tri> ¬a ¬b c with Oprev-p x
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1235 L1 x L0 | tri> ¬a ¬b c | yes p = Df D ( L0 (Oprev.oprev p ) (subst (λ k → _ o< k) (Oprev.oprev=x p) <-osuc ))
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1236 L1 x L0 | tri> ¬a ¬b c | no ¬p =
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1237 record { od = record { def = λ y → (y o< x ) ∧ ((lt : y o< x ) → odef (L0 y lt) x ) } ;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1238 odmax = x; <odmax = λ {x} lt → proj1 lt }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1239
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1240 --V=L
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1241
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1242 V=L0 : Set (suc n)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1243 V=L0 = (x : Ordinal) → V x ≡ L x record { Definition = λ y → y }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1244
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1245 is obvious. Definitions should have some restrictions, such as it includes Nat.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1246
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 363
diff changeset
1247 --Some other ...
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1248
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1249 --So it this correct?
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1250
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1251 Our axiom are syntactically the same in the text book, but negations are slightly different.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1252
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1253 If we assumes excluded middle, these are exactly same.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1254
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1255 Even if we assumes excluded middle, intuitionistic logic itself remains consistent, but we cannot prove it.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1256
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1257 Except the upper bound, axioms are simple logical relation.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1258
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1259 Proof of existence of mapping between HOD and Ordinals are not obvious. We don't know we prove it or not.
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1260
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1261 Existence of the Upper bounds is a pure assumption, if we have not limit on Ordinals, it may contradicts,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1262 but we don't have explicit upper limit on Ordinals.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1263
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1264 Several inference on our model or our axioms are basically parallel to the set theory text book, so it looks like correct.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1265
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1266 --How to use Agda Set Theory
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1267
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1268 Assuming record ZF, classical set theory can be developed. If necessary, axiom of choice can be
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1269 postulated or assuming law of excluded middle.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1270
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1271 Instead, simply assumes non constructive assumption, various theory can be developed. We haven't check
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1272 these assumptions are proved in record ZF, so we are not sure, these development is a result of ZF Set theory.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1274 ZF record itself is not necessary, for example, topology theory without ZF can be possible.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1275
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1276 --Topos and Set Theory
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1277
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1278 Topos is a mathematical structure in Category Theory, which is a Cartesian closed category which has a
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1279 sub-object classifier.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1280
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1281 Topos itself is model of intuitionistic logic.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1282
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1283 Transitive Sets are objects of Cartesian closed category.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1284 It is possible to introduce Power Set Functor on it
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1285
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1286 We can use replacement A ∩ x for each element in Transitive Set,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1287 in the similar way of our power set axiom. I
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1288
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1289 A model of ZF Set theory can be constructed on top of the Topos which is shown in Oisus.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1290
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1291 Our Agda model is a proof theoretic version of it.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1292
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1293 --Cardinal number and Continuum hypothesis
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1294
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1295 Axiom of choice is required to define cardinal number
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1296
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1297 definition of cardinal number is not yet done
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1298
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1299 definition of filter is not yet done
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1300
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1301 we may have a model without axiom of choice or without continuum hypothesis
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1302
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1303 Possible representation of continuum hypothesis is this.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1304
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1305 continuum-hyphotheis : (a : Ordinal) → Power (Ord a) ⊆ Ord (osuc a)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1306
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1307 --Filter
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1308
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1309 filter is a dual of ideal on boolean algebra or lattice. Existence on natural number
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1310 is depends on axiom of choice.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1311
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1312 record Filter ( L : HOD ) : Set (suc n) where
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1313 field
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1314 filter : OD
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1315 proper : ¬ ( filter ∋ od∅ )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1316 inL : filter ⊆ L
359
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1317 filter1 : { p q : HOD } → q ⊆ L → filter ∋ p → p ⊆ q → filter ∋ q
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 336
diff changeset
1318 filter2 : { p q : HOD } → filter ∋ p → filter ∋ q → filter ∋ (p ∩ q)
273
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1319
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1320 We may construct a model of non standard analysis or set theory.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1321
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1322 This may be simpler than classical forcing theory ( not yet done).
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1323
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1324 --Programming Mathematics
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1325
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1326 Mathematics is a functional programming in Agda where proof is a value of a variable. The mathematical
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1327 structure are
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1328
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1329 record and data
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1330
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1331 Proof is check by type consistency not by the computation, but it may include some normalization.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1332
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1333 Type inference and termination is not so clear in multi recursions.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1334
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1335 Defining Agda record is a good way to understand mathematical theory, for examples,
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1336
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1337 Category theory ( Yoneda lemma, Floyd Adjunction functor theorem, Applicative functor )
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1338 Automaton ( Subset construction、Language containment)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1339
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1340 are proved in Agda.
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1341
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1342 --link
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1343
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1344 Summer school of foundation of mathematics (in Japanese)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1345 <br> <a href="https://www.sci.shizuoka.ac.jp/~math/yorioka/ss2019/">
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1346 https://www.sci.shizuoka.ac.jp/~math/yorioka/ss2019/
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1347 </a>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1348
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1349 Foundation of axiomatic set theory (in Japanese)
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1350 <br> <a href="https://www.sci.shizuoka.ac.jp/~math/yorioka/ss2019/sakai0.pdf">
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1351 https://www.sci.shizuoka.ac.jp/~math/yorioka/ss2019/sakai0.pdf
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1352 </a>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1353
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1354 Agda
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1355 <br> <a href="https://agda.readthedocs.io/en/v2.6.0.1/">
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1356 https://agda.readthedocs.io/en/v2.6.0.1/
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1357 </a>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1358
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1359 ZF-in-Agda source
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1360 <br> <a href="https://github.com/shinji-kono/zf-in-agda.git">
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1361 https://github.com/shinji-kono/zf-in-agda.git
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1362 </a>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1363
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1364 Category theory in Agda source
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1365 <br> <a href="https://github.com/shinji-kono/category-exercise-in-agda">
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1366 https://github.com/shinji-kono/category-exercise-in-agda
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1367 </a>
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1368
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1369
9ccf8514c323 add documents
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1370