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