annotate zf.agda @ 352:e27769992399

next-is-limit
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 14 Jul 2020 11:12:09 +0900
parents fbabb20f222e
children 17adeeee0c2a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 module zf where
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 open import Level
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
213
22d435172d1a separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 209
diff changeset
5 open import logic
123
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 116
diff changeset
6
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
7 open import Relation.Nullary
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
8 open import Relation.Binary
188
1f2c8b094908 axiom of choice → p ∨ ¬ p
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 186
diff changeset
9 open import Data.Empty
1f2c8b094908 axiom of choice → p ∨ ¬ p
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 186
diff changeset
10
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
11 record IsZF {n m : Level }
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
12 (ZFSet : Set n)
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
13 (_∋_ : ( A x : ZFSet ) → Set m)
9
5ed16e2d8eb7 try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
14 (_≈_ : Rel ZFSet m)
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
15 (∅ : ZFSet)
18
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
16 (_,_ : ( A B : ZFSet ) → ZFSet)
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
17 (Union : ( A : ZFSet ) → ZFSet)
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
18 (Power : ( A : ZFSet ) → ZFSet)
115
277c2f3b8acb Select declaration
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
19 (Select : (X : ZFSet ) → ( ψ : (x : ZFSet ) → Set m ) → ZFSet )
18
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
20 (Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet )
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
21 (infinite : ZFSet)
274
29a85a427ed2 ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 269
diff changeset
22 : Set (suc (n ⊔ suc m)) where
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 field
29
fce60b99dc55 posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
24 isEquivalence : IsEquivalence {n} {m} {ZFSet} _≈_
247
d09437fcfc7c fix pair
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 236
diff changeset
25 -- ∀ x ∀ y ∃ z ∀ t ( z ∋ t → t ≈ x ∨ t ≈ y)
d09437fcfc7c fix pair
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 236
diff changeset
26 pair→ : ( x y t : ZFSet ) → (x , y) ∋ t → ( t ≈ x ) ∨ ( t ≈ y )
d09437fcfc7c fix pair
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 236
diff changeset
27 pair← : ( x y t : ZFSet ) → ( t ≈ x ) ∨ ( t ≈ y ) → (x , y) ∋ t
69
93abc0133b8a union continue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 65
diff changeset
28 -- ∀ x ∃ y ∀ z (z ∈ y ⇔ ∃ u ∈ x ∧ (z ∈ u))
73
dd430a95610f fix ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
29 union→ : ( X z u : ZFSet ) → ( X ∋ u ) ∧ (u ∋ z ) → Union X ∋ z
159
3675bd617ac8 infinite continue...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 140
diff changeset
30 union← : ( X z : ZFSet ) → (X∋z : Union X ∋ z ) → ¬ ( (u : ZFSet ) → ¬ ((X ∋ u) ∧ (u ∋ z )))
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 _∈_ : ( A B : ZFSet ) → Set m
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 A ∈ B = B ∋ A
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
33 _⊆_ : ( A B : ZFSet ) → ∀{ x : ZFSet } → Set m
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
34 _⊆_ A B {x} = A ∋ x → B ∋ x
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 _∩_ : ( A B : ZFSet ) → ZFSet
115
277c2f3b8acb Select declaration
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
36 A ∩ B = Select A ( λ x → ( A ∋ x ) ∧ ( B ∋ x ) )
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 _∪_ : ( A B : ZFSet ) → ZFSet
269
30e419a2be24 disjunction and conjunction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 258
diff changeset
38 A ∪ B = Union (A , B)
78
9a7a64b2388c infinite and replacement begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
39 {_} : ZFSet → ZFSet
9a7a64b2388c infinite and replacement begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
40 { x } = ( x , x )
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 infixr 200 _∈_
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 infixr 230 _∩_ _∪_
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 infixr 220 _⊆_
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 field
4
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
45 empty : ∀( x : ZFSet ) → ¬ ( ∅ ∋ x )
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 -- power : ∀ X ∃ A ∀ t ( t ∈ A ↔ t ⊆ X ) )
166
ea0e7927637a use double negation
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 160
diff changeset
47 power→ : ∀( A t : ZFSet ) → Power A ∋ t → ∀ {x} → t ∋ x → ¬ ¬ ( A ∋ x ) -- _⊆_ t A {x}
77
75ba8cf64707 Power Set on going ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 76
diff changeset
48 power← : ∀( A t : ZFSet ) → ( ∀ {x} → _⊆_ t A {x}) → Power A ∋ t
65
164ad5a703d8 ¬∅=→∅∈ : {n : Level} → { x : OD {suc n} } → ¬ ( x == od∅ {suc n} ) → x ∋ od∅ {suc n}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 54
diff changeset
49 -- extensionality : ∀ z ( z ∈ x ⇔ z ∈ y ) ⇒ ∀ w ( x ∈ w ⇔ y ∈ w )
186
914cc522c53a fix extensionality
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 183
diff changeset
50 extensionality : { A B w : ZFSet } → ( (z : ZFSet) → ( A ∋ z ) ⇔ (B ∋ z) ) → ( A ∈ w ⇔ B ∈ w )
276
6f10c47e4e7a separate choice
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 274
diff changeset
51 -- regularity without minimum
324
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 276
diff changeset
52 ε-induction : { ψ : ZFSet → Set m}
274
29a85a427ed2 ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 269
diff changeset
53 → ( {x : ZFSet } → ({ y : ZFSet } → x ∋ y → ψ y ) → ψ x )
29a85a427ed2 ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 269
diff changeset
54 → (x : ZFSet ) → ψ x
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 -- infinity : ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) )
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 infinity∅ : ∅ ∈ infinite
160
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 159
diff changeset
57 infinity : ∀( x : ZFSet ) → x ∈ infinite → ( x ∪ { x }) ∈ infinite
140
312e27aa3cb5 remove otrans again. start over
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
58 selection : { ψ : ZFSet → Set m } → ∀ { X y : ZFSet } → ( ( y ∈ X ) ∧ ψ y ) ⇔ (y ∈ Select X ψ )
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 -- replacement : ∀ x ∀ y ∀ z ( ( ψ ( x , y ) ∧ ψ ( x , z ) ) → y = z ) → ∀ X ∃ A ∀ y ( y ∈ A ↔ ∃ x ∈ X ψ ( x , y ) )
130
3849614bef18 new replacement axiom
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 123
diff changeset
60 replacement← : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → x ∈ X → ψ x ∈ Replace X ψ
138
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 133
diff changeset
61 replacement→ : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → ( lt : x ∈ Replace X ψ ) → ¬ ( ∀ (y : ZFSet) → ¬ ( x ≈ ψ y ) )
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
274
29a85a427ed2 ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 269
diff changeset
63 record ZF {n m : Level } : Set (suc (n ⊔ suc m)) where
18
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
64 infixr 210 _,_
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
65 infixl 200 _∋_
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
66 infixr 220 _≈_
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
67 field
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
68 ZFSet : Set n
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
69 _∋_ : ( A x : ZFSet ) → Set m
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
70 _≈_ : ( A B : ZFSet ) → Set m
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
71 -- ZF Set constructor
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
72 ∅ : ZFSet
18
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
73 _,_ : ( A B : ZFSet ) → ZFSet
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
74 Union : ( A : ZFSet ) → ZFSet
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
75 Power : ( A : ZFSet ) → ZFSet
115
277c2f3b8acb Select declaration
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 111
diff changeset
76 Select : (X : ZFSet ) → ( ψ : (x : ZFSet ) → Set m ) → ZFSet
18
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
77 Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
78 infinite : ZFSet
18
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
79 isZF : IsZF ZFSet _∋_ _≈_ ∅ _,_ Union Power Select Replace infinite
6
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
80