Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate zf.agda @ 324:fbabb20f222e
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 04 Jul 2020 18:18:17 +0900 |
parents | 6f10c47e4e7a |
children | 17adeeee0c2a |
rev | line source |
---|---|
3 | 1 module zf where |
2 | |
3 open import Level | |
4 | |
213
22d435172d1a
separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
209
diff
changeset
|
5 open import logic |
123 | 6 |
6 | 7 open import Relation.Nullary |
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 | 11 record IsZF {n m : Level } |
12 (ZFSet : Set n) | |
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 | 15 (∅ : ZFSet) |
18 | 16 (_,_ : ( A B : ZFSet ) → ZFSet) |
6 | 17 (Union : ( A : ZFSet ) → ZFSet) |
18 (Power : ( A : ZFSet ) → ZFSet) | |
115 | 19 (Select : (X : ZFSet ) → ( ψ : (x : ZFSet ) → Set m ) → ZFSet ) |
18 | 20 (Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet ) |
6 | 21 (infinite : ZFSet) |
274 | 22 : Set (suc (n ⊔ suc m)) where |
3 | 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 | 25 -- ∀ x ∀ y ∃ z ∀ t ( z ∋ t → t ≈ x ∨ t ≈ y) |
26 pair→ : ( x y t : ZFSet ) → (x , y) ∋ t → ( t ≈ x ) ∨ ( t ≈ y ) | |
27 pair← : ( x y t : ZFSet ) → ( t ≈ x ) ∨ ( t ≈ y ) → (x , y) ∋ t | |
69 | 28 -- ∀ x ∃ y ∀ z (z ∈ y ⇔ ∃ u ∈ x ∧ (z ∈ u)) |
73 | 29 union→ : ( X z u : ZFSet ) → ( X ∋ u ) ∧ (u ∋ z ) → Union X ∋ z |
159 | 30 union← : ( X z : ZFSet ) → (X∋z : Union X ∋ z ) → ¬ ( (u : ZFSet ) → ¬ ((X ∋ u) ∧ (u ∋ z ))) |
3 | 31 _∈_ : ( A B : ZFSet ) → Set m |
32 A ∈ B = B ∋ A | |
23 | 33 _⊆_ : ( A B : ZFSet ) → ∀{ x : ZFSet } → Set m |
34 _⊆_ A B {x} = A ∋ x → B ∋ x | |
3 | 35 _∩_ : ( A B : ZFSet ) → ZFSet |
115 | 36 A ∩ B = Select A ( λ x → ( A ∋ x ) ∧ ( B ∋ x ) ) |
3 | 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 | 41 infixr 200 _∈_ |
42 infixr 230 _∩_ _∪_ | |
43 infixr 220 _⊆_ | |
44 field | |
4 | 45 empty : ∀( x : ZFSet ) → ¬ ( ∅ ∋ x ) |
3 | 46 -- power : ∀ X ∃ A ∀ t ( t ∈ A ↔ t ⊆ X ) ) |
166 | 47 power→ : ∀( A t : ZFSet ) → Power A ∋ t → ∀ {x} → t ∋ x → ¬ ¬ ( A ∋ x ) -- _⊆_ t A {x} |
77 | 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 | 50 extensionality : { A B w : ZFSet } → ( (z : ZFSet) → ( A ∋ z ) ⇔ (B ∋ z) ) → ( A ∈ w ⇔ B ∈ w ) |
276 | 51 -- regularity without minimum |
324 | 52 ε-induction : { ψ : ZFSet → Set m} |
274 | 53 → ( {x : ZFSet } → ({ y : ZFSet } → x ∋ y → ψ y ) → ψ x ) |
54 → (x : ZFSet ) → ψ x | |
3 | 55 -- infinity : ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) ) |
56 infinity∅ : ∅ ∈ infinite | |
160 | 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 | 59 -- replacement : ∀ x ∀ y ∀ z ( ( ψ ( x , y ) ∧ ψ ( x , z ) ) → y = z ) → ∀ X ∃ A ∀ y ( y ∈ A ↔ ∃ x ∈ X ψ ( x , y ) ) |
130 | 60 replacement← : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → x ∈ X → ψ x ∈ Replace X ψ |
138 | 61 replacement→ : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → ( lt : x ∈ Replace X ψ ) → ¬ ( ∀ (y : ZFSet) → ¬ ( x ≈ ψ y ) ) |
3 | 62 |
274 | 63 record ZF {n m : Level } : Set (suc (n ⊔ suc m)) where |
18 | 64 infixr 210 _,_ |
6 | 65 infixl 200 _∋_ |
66 infixr 220 _≈_ | |
67 field | |
68 ZFSet : Set n | |
69 _∋_ : ( A x : ZFSet ) → Set m | |
70 _≈_ : ( A B : ZFSet ) → Set m | |
71 -- ZF Set constructor | |
72 ∅ : ZFSet | |
18 | 73 _,_ : ( A B : ZFSet ) → ZFSet |
6 | 74 Union : ( A : ZFSet ) → ZFSet |
75 Power : ( A : ZFSet ) → ZFSet | |
115 | 76 Select : (X : ZFSet ) → ( ψ : (x : ZFSet ) → Set m ) → ZFSet |
18 | 77 Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet |
6 | 78 infinite : ZFSet |
18 | 79 isZF : IsZF ZFSet _∋_ _≈_ ∅ _,_ Union Power Select Replace infinite |
6 | 80 |