Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate zf.agda @ 72:f39f1a90d154
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 01 Jun 2019 14:43:05 +0900 |
parents | cd9cf8b09610 |
children | dd430a95610f |
rev | line source |
---|---|
3 | 1 module zf where |
2 | |
3 open import Level | |
4 | |
23 | 5 data Bool : Set where |
6 true : Bool | |
7 false : Bool | |
3 | 8 |
9 record _∧_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n ⊔ m) where | |
10 field | |
11 proj1 : A | |
12 proj2 : B | |
13 | |
14 open _∧_ | |
15 | |
16 | |
17 data _∨_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n ⊔ m) where | |
18 case1 : A → A ∨ B | |
19 case2 : B → A ∨ B | |
20 | |
6 | 21 -- open import Relation.Binary.PropositionalEquality |
3 | 22 |
23 _⇔_ : {n : Level } → ( A B : Set n ) → Set n | |
24 _⇔_ A B = ( A → B ) ∧ ( B → A ) | |
25 | |
6 | 26 open import Data.Empty |
27 open import Relation.Nullary | |
28 | |
29 open import Relation.Binary | |
30 open import Relation.Binary.Core | |
31 | |
3 | 32 infixr 130 _∧_ |
33 infixr 140 _∨_ | |
34 infixr 150 _⇔_ | |
35 | |
6 | 36 record IsZF {n m : Level } |
37 (ZFSet : Set n) | |
38 (_∋_ : ( 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
|
39 (_≈_ : Rel ZFSet m) |
6 | 40 (∅ : ZFSet) |
18 | 41 (_,_ : ( A B : ZFSet ) → ZFSet) |
6 | 42 (Union : ( A : ZFSet ) → ZFSet) |
43 (Power : ( A : ZFSet ) → ZFSet) | |
18 | 44 (Select : ZFSet → ( ZFSet → Set m ) → ZFSet ) |
45 (Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet ) | |
6 | 46 (infinite : ZFSet) |
47 : Set (suc (n ⊔ m)) where | |
3 | 48 field |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
23
diff
changeset
|
49 isEquivalence : IsEquivalence {n} {m} {ZFSet} _≈_ |
3 | 50 -- ∀ x ∀ y ∃ z(x ∈ z ∧ y ∈ z) |
18 | 51 pair : ( A B : ZFSet ) → ( (A , B) ∋ A ) ∧ ( (A , B) ∋ B ) |
69 | 52 -- ∀ x ∃ y ∀ z (z ∈ y ⇔ ∃ u ∈ x ∧ (z ∈ u)) |
70 | 53 union-u : ( X z : ZFSet ) → Union X ∋ z → ZFSet |
54 union→ : ( X z u : ZFSet ) → ((Union X ∋ u ) ∧ (u ∋ z )) → Union X ∋ z | |
72 | 55 union← : ( X z : ZFSet ) → (X∋z : Union X ∋ z ) → (X ∋ union-u X z X∋z) ∧ (union-u X z X∋z ∋ z ) |
3 | 56 _∈_ : ( A B : ZFSet ) → Set m |
57 A ∈ B = B ∋ A | |
23 | 58 _⊆_ : ( A B : ZFSet ) → ∀{ x : ZFSet } → Set m |
59 _⊆_ A B {x} = A ∋ x → B ∋ x | |
3 | 60 _∩_ : ( A B : ZFSet ) → ZFSet |
51 | 61 A ∩ B = Select A ( λ x → ( A ∋ x ) ∧ ( B ∋ x ) ) |
3 | 62 _∪_ : ( A B : ZFSet ) → ZFSet |
51 | 63 A ∪ B = Union (A , B) |
3 | 64 infixr 200 _∈_ |
65 infixr 230 _∩_ _∪_ | |
66 infixr 220 _⊆_ | |
67 field | |
4 | 68 empty : ∀( x : ZFSet ) → ¬ ( ∅ ∋ x ) |
3 | 69 -- power : ∀ X ∃ A ∀ t ( t ∈ A ↔ t ⊆ X ) ) |
23 | 70 power→ : ∀( A t : ZFSet ) → Power A ∋ t → ∀ {x} → _⊆_ t A {x} |
71 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
|
72 -- extensionality : ∀ z ( z ∈ x ⇔ z ∈ y ) ⇒ ∀ w ( x ∈ w ⇔ y ∈ w ) |
69 | 73 extensionality : { A B z : ZFSet } → (( A ∋ z ) ⇔ (B ∋ z) ) → A ≈ B |
3 | 74 -- regularity : ∀ x ( x ≠ ∅ → ∃ y ∈ x ( y ∩ x = ∅ ) ) |
37 | 75 minimul : (x : ZFSet ) → ¬ (x ≈ ∅) → ZFSet |
76 regularity : ∀( x : ZFSet ) → (not : ¬ (x ≈ ∅)) → ( minimul x not ∈ x ∧ ( minimul x not ∩ x ≈ ∅ ) ) | |
3 | 77 -- infinity : ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) ) |
78 infinity∅ : ∅ ∈ infinite | |
18 | 79 infinity : ∀( X x : ZFSet ) → x ∈ infinite → ( x ∪ Select X ( λ y → x ≈ y )) ∈ infinite |
54 | 80 selection : { ψ : ZFSet → Set m } → ∀ { X y : ZFSet } → ( ( y ∈ X ) ∧ ψ y ) ⇔ (y ∈ Select X ψ ) |
3 | 81 -- replacement : ∀ x ∀ y ∀ z ( ( ψ ( x , y ) ∧ ψ ( x , z ) ) → y = z ) → ∀ X ∃ A ∀ y ( y ∈ A ↔ ∃ x ∈ X ψ ( x , y ) ) |
18 | 82 replacement : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → ( ψ x ∈ Replace X ψ ) |
3 | 83 |
6 | 84 record ZF {n m : Level } : Set (suc (n ⊔ m)) where |
18 | 85 infixr 210 _,_ |
6 | 86 infixl 200 _∋_ |
87 infixr 220 _≈_ | |
88 field | |
89 ZFSet : Set n | |
90 _∋_ : ( A x : ZFSet ) → Set m | |
91 _≈_ : ( A B : ZFSet ) → Set m | |
92 -- ZF Set constructor | |
93 ∅ : ZFSet | |
18 | 94 _,_ : ( A B : ZFSet ) → ZFSet |
6 | 95 Union : ( A : ZFSet ) → ZFSet |
96 Power : ( A : ZFSet ) → ZFSet | |
18 | 97 Select : ZFSet → ( ZFSet → Set m ) → ZFSet |
98 Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet | |
6 | 99 infinite : ZFSet |
18 | 100 isZF : IsZF ZFSet _∋_ _≈_ ∅ _,_ Union Power Select Replace infinite |
6 | 101 |
10 | 102 module zf-exapmle {n m : Level } ( zf : ZF {m} {n} ) where |
7 | 103 |
10 | 104 _≈_ = ZF._≈_ zf |
105 ZFSet = ZF.ZFSet zf | |
106 Select = ZF.Select zf | |
107 ∅ = ZF.∅ zf | |
108 _∩_ = ( IsZF._∩_ ) (ZF.isZF zf) | |
109 _∋_ = ZF._∋_ zf | |
110 replacement = IsZF.replacement ( ZF.isZF zf ) | |
111 selection = IsZF.selection ( ZF.isZF zf ) | |
112 minimul = IsZF.minimul ( ZF.isZF zf ) | |
113 regularity = IsZF.regularity ( ZF.isZF zf ) | |
7 | 114 |
11 | 115 -- russel : Select ( λ x → x ∋ x ) ≈ ∅ |
116 -- russel with Select ( λ x → x ∋ x ) | |
117 -- ... | s = {!!} | |
7 | 118 |