Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate zf.agda @ 51:83b13f1f4f42
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 27 May 2019 15:00:45 +0900 |
parents | f10ceee99d00 |
children | 33fb8228ace9 |
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 ) |
3 | 52 -- ∀ X ∃ A∀ t(t ∈ A ⇔ ∃ x ∈ X(t ∈ x)) |
53 union→ : ( X x y : ZFSet ) → X ∋ x → x ∋ y → Union X ∋ y | |
54 union← : ( X x y : ZFSet ) → Union X ∋ y → X ∋ x → x ∋ y | |
55 _∈_ : ( A B : ZFSet ) → Set m | |
56 A ∈ B = B ∋ A | |
23 | 57 _⊆_ : ( A B : ZFSet ) → ∀{ x : ZFSet } → Set m |
58 _⊆_ A B {x} = A ∋ x → B ∋ x | |
3 | 59 _∩_ : ( A B : ZFSet ) → ZFSet |
51 | 60 A ∩ B = Select A ( λ x → ( A ∋ x ) ∧ ( B ∋ x ) ) |
3 | 61 _∪_ : ( A B : ZFSet ) → ZFSet |
51 | 62 A ∪ B = Union (A , B) |
3 | 63 infixr 200 _∈_ |
64 infixr 230 _∩_ _∪_ | |
65 infixr 220 _⊆_ | |
66 field | |
4 | 67 empty : ∀( x : ZFSet ) → ¬ ( ∅ ∋ x ) |
3 | 68 -- power : ∀ X ∃ A ∀ t ( t ∈ A ↔ t ⊆ X ) ) |
23 | 69 power→ : ∀( A t : ZFSet ) → Power A ∋ t → ∀ {x} → _⊆_ t A {x} |
70 power← : ∀( A t : ZFSet ) → ∀ {x} → _⊆_ t A {x} → Power A ∋ t | |
3 | 71 -- extentionality : ∀ z ( z ∈ x ⇔ z ∈ y ) ⇒ ∀ w ( x ∈ w ⇔ y ∈ w ) |
6 | 72 extentionality : ( A B z : ZFSet ) → (( A ∋ z ) ⇔ (B ∋ z) ) → A ≈ B |
3 | 73 -- regularity : ∀ x ( x ≠ ∅ → ∃ y ∈ x ( y ∩ x = ∅ ) ) |
37 | 74 minimul : (x : ZFSet ) → ¬ (x ≈ ∅) → ZFSet |
75 regularity : ∀( x : ZFSet ) → (not : ¬ (x ≈ ∅)) → ( minimul x not ∈ x ∧ ( minimul x not ∩ x ≈ ∅ ) ) | |
3 | 76 -- infinity : ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) ) |
77 infinity∅ : ∅ ∈ infinite | |
18 | 78 infinity : ∀( X x : ZFSet ) → x ∈ infinite → ( x ∪ Select X ( λ y → x ≈ y )) ∈ infinite |
79 selection : { ψ : ZFSet → Set m } → ∀ ( X y : ZFSet ) → ( y ∈ Select X ψ ) → ψ y | |
3 | 80 -- replacement : ∀ x ∀ y ∀ z ( ( ψ ( x , y ) ∧ ψ ( x , z ) ) → y = z ) → ∀ X ∃ A ∀ y ( y ∈ A ↔ ∃ x ∈ X ψ ( x , y ) ) |
18 | 81 replacement : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → ( ψ x ∈ Replace X ψ ) |
3 | 82 |
6 | 83 record ZF {n m : Level } : Set (suc (n ⊔ m)) where |
18 | 84 infixr 210 _,_ |
6 | 85 infixl 200 _∋_ |
86 infixr 220 _≈_ | |
87 field | |
88 ZFSet : Set n | |
89 _∋_ : ( A x : ZFSet ) → Set m | |
90 _≈_ : ( A B : ZFSet ) → Set m | |
91 -- ZF Set constructor | |
92 ∅ : ZFSet | |
18 | 93 _,_ : ( A B : ZFSet ) → ZFSet |
6 | 94 Union : ( A : ZFSet ) → ZFSet |
95 Power : ( A : ZFSet ) → ZFSet | |
18 | 96 Select : ZFSet → ( ZFSet → Set m ) → ZFSet |
97 Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet | |
6 | 98 infinite : ZFSet |
18 | 99 isZF : IsZF ZFSet _∋_ _≈_ ∅ _,_ Union Power Select Replace infinite |
6 | 100 |
10 | 101 module zf-exapmle {n m : Level } ( zf : ZF {m} {n} ) where |
7 | 102 |
10 | 103 _≈_ = ZF._≈_ zf |
104 ZFSet = ZF.ZFSet zf | |
105 Select = ZF.Select zf | |
106 ∅ = ZF.∅ zf | |
107 _∩_ = ( IsZF._∩_ ) (ZF.isZF zf) | |
108 _∋_ = ZF._∋_ zf | |
109 replacement = IsZF.replacement ( ZF.isZF zf ) | |
110 selection = IsZF.selection ( ZF.isZF zf ) | |
111 minimul = IsZF.minimul ( ZF.isZF zf ) | |
112 regularity = IsZF.regularity ( ZF.isZF zf ) | |
7 | 113 |
11 | 114 -- russel : Select ( λ x → x ∋ x ) ≈ ∅ |
115 -- russel with Select ( λ x → x ∋ x ) | |
116 -- ... | s = {!!} | |
7 | 117 |