comparison zf.agda @ 3:e7990ff544bf

reocrd ZF
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 11 May 2019 10:47:23 +0900
parents
children c12d964a04c0
comparison
equal deleted inserted replaced
2:5c819f837721 3:e7990ff544bf
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
18 open import Relation.Binary.PropositionalEquality
19
20 _⇔_ : {n : Level } → ( A B : Set n ) → Set n
21 _⇔_ A B = ( A → B ) ∧ ( B → A )
22
23 infixr 130 _∧_
24 infixr 140 _∨_
25 infixr 150 _⇔_
26
27 open import Data.Empty
28 open import Relation.Nullary
29
30 record ZF (n m : Level ) : Set (suc (n ⊔ m)) where
31 coinductive
32 field
33 ZFSet : Set n
34 _∋_ : ( A x : ZFSet ) → Set m
35 _≈_ : ( A B : ZFSet ) → Set m
36 -- ZF Set constructor
37 ∅ : ZFSet
38 _×_ : ( A B : ZFSet ) → ZFSet
39 Union : ( A : ZFSet ) → ZFSet
40 Power : ( A : ZFSet ) → ZFSet
41 Restrict : ( ZFSet → Set m ) → ZFSet
42 infixl 200 _∋_
43 infixr 210 _×_
44 infixr 220 _≈_
45 field
46 -- ∀ x ∀ y ∃ z(x ∈ z ∧ y ∈ z)
47 pair : ( A B : ZFSet ) → A × B ∋ A ∧ A × B ∋ B
48 -- ∀ X ∃ A∀ t(t ∈ A ⇔ ∃ x ∈ X(t ∈ x))
49 union→ : ( X x y : ZFSet ) → X ∋ x → x ∋ y → Union X ∋ y
50 union← : ( X x y : ZFSet ) → Union X ∋ y → X ∋ x → x ∋ y
51 _∈_ : ( A B : ZFSet ) → Set m
52 A ∈ B = B ∋ A
53 _⊆_ : ( A B : ZFSet ) → { x : ZFSet } → { A∋x : Set m } → Set m
54 _⊆_ A B {x} {A∋x} = B ∋ x
55 _∩_ : ( A B : ZFSet ) → ZFSet
56 A ∩ B = Restrict ( λ x → ( A ∋ x ) ∧ ( B ∋ x ) )
57 _∪_ : ( A B : ZFSet ) → ZFSet
58 A ∪ B = Restrict ( λ x → ( A ∋ x ) ∨ ( B ∋ x ) )
59 infixr 200 _∈_
60 infixr 230 _∩_ _∪_
61 infixr 220 _⊆_
62 field
63 empty : ( x : ZFSet ) → ¬ ( ∅ ∋ x )
64 -- power : ∀ X ∃ A ∀ t ( t ∈ A ↔ t ⊆ X ) )
65 power→ : ( A X t : ZFSet ) → A ∋ t → ∀ {x} {y} → _⊆_ t X {x} {y}
66 power← : ( A X t : ZFSet ) → ∀ {x} {y} → _⊆_ t X {x} {y} → A ∋ t
67 -- extentionality : ∀ z ( z ∈ x ⇔ z ∈ y ) ⇒ ∀ w ( x ∈ w ⇔ y ∈ w )
68 extentionality : ( A B z : ZFSet ) → A ∋ z ⇔ B ∋ z → A ≈ B
69 -- regularity : ∀ x ( x ≠ ∅ → ∃ y ∈ x ( y ∩ x = ∅ ) )
70 smaller : ZFSet → ZFSet
71 regularity : ( x : ZFSet ) → ¬ (x ≈ ∅) → smaller x ∩ x ≈ ∅
72 -- infinity : ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) )
73 infinite : ZFSet
74 infinity∅ : ∅ ∈ infinite
75 infinity : ( x : ZFSet ) → x ∈ infinite → ( x ∪ Restrict ( λ y → x ≈ y )) ∈ infinite
76 -- replacement : ∀ x ∀ y ∀ z ( ( ψ ( x , y ) ∧ ψ ( x , z ) ) → y = z ) → ∀ X ∃ A ∀ y ( y ∈ A ↔ ∃ x ∈ X ψ ( x , y ) )
77 replacement : ( ψ : ZFSet → Set m ) → ( y : ZFSet ) → y ∈ Restrict ψ → ψ y
78