Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate zf.agda @ 9:5ed16e2d8eb7
try to fix axiom of replacement
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 12 May 2019 21:18:38 +0900 |
parents | cb014a103467 |
children | 8022e14fce74 |
rev | line source |
---|---|
3 | 1 module zf where |
2 | |
3 open import Level | |
4 | |
5 | |
6 record _∧_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n ⊔ m) where | |
7 field | |
8 proj1 : A | |
9 proj2 : B | |
10 | |
11 open _∧_ | |
12 | |
13 | |
14 data _∨_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n ⊔ m) where | |
15 case1 : A → A ∨ B | |
16 case2 : B → A ∨ B | |
17 | |
6 | 18 -- open import Relation.Binary.PropositionalEquality |
3 | 19 |
20 _⇔_ : {n : Level } → ( A B : Set n ) → Set n | |
21 _⇔_ A B = ( A → B ) ∧ ( B → A ) | |
22 | |
6 | 23 open import Data.Empty |
24 open import Relation.Nullary | |
25 | |
26 open import Relation.Binary | |
27 open import Relation.Binary.Core | |
28 | |
3 | 29 infixr 130 _∧_ |
30 infixr 140 _∨_ | |
31 infixr 150 _⇔_ | |
32 | |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
33 record Func {n m : Level } (ZFSet : Set n) (_≈_ : Rel ZFSet m) : Set (n ⊔ suc m) where |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
34 field |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
35 Restrict : ZFSet |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
36 rel : Rel ZFSet m |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
37 dom : ( y : ZFSet ) → ∀ { x : ZFSet } → rel x y |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
38 fun-eq : { x y z : ZFSet } → ( rel x y ∧ rel x z ) → y ≈ z |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
39 |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
40 open Func |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
41 |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
42 |
6 | 43 record IsZF {n m : Level } |
44 (ZFSet : Set n) | |
45 (_∋_ : ( 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
|
46 (_≈_ : Rel ZFSet m) |
6 | 47 (∅ : ZFSet) |
48 (_×_ : ( A B : ZFSet ) → ZFSet) | |
49 (Union : ( A : ZFSet ) → ZFSet) | |
50 (Power : ( A : ZFSet ) → ZFSet) | |
51 (infinite : ZFSet) | |
52 : Set (suc (n ⊔ m)) where | |
3 | 53 field |
6 | 54 isEquivalence : {A B : ZFSet} → IsEquivalence {n} {m} {ZFSet} _≈_ |
3 | 55 -- ∀ x ∀ y ∃ z(x ∈ z ∧ y ∈ z) |
6 | 56 pair : ( A B : ZFSet ) → ( (A × B) ∋ A ) ∧ ( (A × B) ∋ B ) |
3 | 57 -- ∀ X ∃ A∀ t(t ∈ A ⇔ ∃ x ∈ X(t ∈ x)) |
58 union→ : ( X x y : ZFSet ) → X ∋ x → x ∋ y → Union X ∋ y | |
59 union← : ( X x y : ZFSet ) → Union X ∋ y → X ∋ x → x ∋ y | |
60 _∈_ : ( A B : ZFSet ) → Set m | |
61 A ∈ B = B ∋ A | |
7 | 62 _⊆_ : ( A B : ZFSet ) → ∀{ x : ZFSet } → ∀{ A∋x : Set m } → Set m |
3 | 63 _⊆_ A B {x} {A∋x} = B ∋ x |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
64 Repl : ( ψ : ZFSet → Set m ) → Func ZFSet _≈_ |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
65 Repl ψ = record { Restrict = {!!} ; rel = {!!} ; dom = {!!} ; fun-eq = {!!} } |
3 | 66 _∩_ : ( A B : ZFSet ) → ZFSet |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
67 A ∩ B = Restrict ( Repl ( λ x → ( A ∋ x ) ∧ ( B ∋ x ) ) ) |
3 | 68 _∪_ : ( A B : ZFSet ) → ZFSet |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
69 A ∪ B = Restrict ( Repl ( λ x → ( A ∋ x ) ∨ ( B ∋ x ) ) ) |
3 | 70 infixr 200 _∈_ |
71 infixr 230 _∩_ _∪_ | |
72 infixr 220 _⊆_ | |
73 field | |
4 | 74 empty : ∀( x : ZFSet ) → ¬ ( ∅ ∋ x ) |
3 | 75 -- power : ∀ X ∃ A ∀ t ( t ∈ A ↔ t ⊆ X ) ) |
8 | 76 power→ : ∀( A t : ZFSet ) → Power A ∋ t → ∀ {x} {y} → _⊆_ t A {x} {y} |
77 power← : ∀( A t : ZFSet ) → ∀ {x} {y} → _⊆_ t A {x} {y} → Power A ∋ t | |
3 | 78 -- extentionality : ∀ z ( z ∈ x ⇔ z ∈ y ) ⇒ ∀ w ( x ∈ w ⇔ y ∈ w ) |
6 | 79 extentionality : ( A B z : ZFSet ) → (( A ∋ z ) ⇔ (B ∋ z) ) → A ≈ B |
3 | 80 -- regularity : ∀ x ( x ≠ ∅ → ∃ y ∈ x ( y ∩ x = ∅ ) ) |
7 | 81 smaller : ZFSet → ZFSet |
8 | 82 regularity : ∀( x : ZFSet ) → ¬ (x ≈ ∅) → ( smaller x ∈ x ∧ ( smaller x ∩ x ≈ ∅ ) ) |
3 | 83 -- infinity : ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) ) |
84 infinity∅ : ∅ ∈ infinite | |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
85 infinity : ∀( x : ZFSet ) → x ∈ infinite → ( x ∪ Restrict ( Repl ( λ y → x ≈ y ))) ∈ infinite |
3 | 86 -- replacement : ∀ x ∀ y ∀ z ( ( ψ ( x , y ) ∧ ψ ( x , z ) ) → y = z ) → ∀ X ∃ A ∀ y ( y ∈ A ↔ ∃ x ∈ X ψ ( x , y ) ) |
8 | 87 -- this form looks like specification |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
88 replacement : ( ψ : Func ZFSet _≈_ ) → ∀ ( y : ZFSet ) → ( y ∈ Restrict ψ ) → {!!} -- dom ψ y |
3 | 89 |
6 | 90 record ZF {n m : Level } : Set (suc (n ⊔ m)) where |
91 infixr 210 _×_ | |
92 infixl 200 _∋_ | |
93 infixr 220 _≈_ | |
94 field | |
95 ZFSet : Set n | |
96 _∋_ : ( A x : ZFSet ) → Set m | |
97 _≈_ : ( A B : ZFSet ) → Set m | |
98 -- ZF Set constructor | |
99 ∅ : ZFSet | |
100 _×_ : ( A B : ZFSet ) → ZFSet | |
101 Union : ( A : ZFSet ) → ZFSet | |
102 Power : ( A : ZFSet ) → ZFSet | |
103 infinite : ZFSet | |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
104 isZF : IsZF ZFSet _∋_ _≈_ ∅ _×_ Union Power infinite |
6 | 105 |
7 | 106 module reguraliry-m {n m : Level } ( zf : ZF {m} {n} ) where |
107 | |
108 open import Relation.Nullary | |
109 open import Data.Empty | |
110 open import Relation.Binary.PropositionalEquality | |
111 | |
112 _≈_ = ZF._≈_ zf | |
113 ZFSet = ZF.ZFSet | |
114 ∅ = ZF.∅ zf | |
115 _∩_ = ( IsZF._∩_ ) (ZF.isZF zf) | |
116 _∋_ = ZF._∋_ zf | |
117 replacement = IsZF.replacement ( ZF.isZF zf ) | |
118 | |
9
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
119 -- russel : ( x : ZFSet zf ) → x ≈ Restrict ( λ x → ¬ ( x ∋ x ) ) → ⊥ |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
120 -- russel x eq with x ∋ x |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
121 -- ... | x∋x with replacement ( λ x → ¬ ( x ∋ x )) x {!!} |
5ed16e2d8eb7
try to fix axiom of replacement
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
122 -- ... | r1 = {!!} |
7 | 123 |
124 | |
125 | |
126 | |
127 data Nat : Set zero where | |
128 Zero : Nat | |
129 Suc : Nat → Nat | |
130 | |
131 prev : Nat → Nat | |
132 prev (Suc n) = n | |
133 prev Zero = Zero | |
134 | |
135 open import Relation.Binary.PropositionalEquality | |
136 | |
137 | |
8 | 138 data Transtive {n : Level } : ( lv : Nat) → Set n where |
139 Φ : {lv : Nat} → lv ≡ Zero → Transtive lv | |
140 T-suc : {lv : Nat} → lv ≡ Zero → Transtive {n} lv → Transtive lv | |
141 ℵ : {lv : Nat} → Transtive {n} lv → Transtive (Suc lv) | |
7 | 142 |
143 | |
144 | |
145 |