Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate zf.agda @ 166:ea0e7927637a
use double negation
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 17 Jul 2019 10:52:31 +0900 |
parents | ebac6fa116fa |
children | de3d87b7494f |
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 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 | |
116 | 18 _⇔_ : {n m : Level } → ( A : Set n ) ( B : Set m ) → Set (n ⊔ m) |
77 | 19 _⇔_ A B = ( A → B ) ∧ ( B → A ) |
3 | 20 |
123 | 21 |
6 | 22 open import Relation.Nullary |
23 open import Relation.Binary | |
24 | |
138 | 25 contra-position : {n m : Level } {A : Set n} {B : Set m} → (A → B) → ¬ B → ¬ A |
26 contra-position {n} {m} {A} {B} f ¬b a = ¬b ( f a ) | |
103 | 27 |
166 | 28 double-neg : {n : Level } {A : Set n} → A → ¬ ¬ A |
29 double-neg A notnot = notnot A | |
30 | |
3 | 31 infixr 130 _∧_ |
32 infixr 140 _∨_ | |
33 infixr 150 _⇔_ | |
34 | |
6 | 35 record IsZF {n m : Level } |
36 (ZFSet : Set n) | |
37 (_∋_ : ( 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
|
38 (_≈_ : Rel ZFSet m) |
6 | 39 (∅ : ZFSet) |
18 | 40 (_,_ : ( A B : ZFSet ) → ZFSet) |
6 | 41 (Union : ( A : ZFSet ) → ZFSet) |
42 (Power : ( A : ZFSet ) → ZFSet) | |
115 | 43 (Select : (X : ZFSet ) → ( ψ : (x : ZFSet ) → Set m ) → ZFSet ) |
18 | 44 (Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet ) |
6 | 45 (infinite : ZFSet) |
46 : Set (suc (n ⊔ m)) where | |
3 | 47 field |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
23
diff
changeset
|
48 isEquivalence : IsEquivalence {n} {m} {ZFSet} _≈_ |
3 | 49 -- ∀ x ∀ y ∃ z(x ∈ z ∧ y ∈ z) |
18 | 50 pair : ( A B : ZFSet ) → ( (A , B) ∋ A ) ∧ ( (A , B) ∋ B ) |
69 | 51 -- ∀ x ∃ y ∀ z (z ∈ y ⇔ ∃ u ∈ x ∧ (z ∈ u)) |
73 | 52 union→ : ( X z u : ZFSet ) → ( X ∋ u ) ∧ (u ∋ z ) → Union X ∋ z |
159 | 53 union← : ( X z : ZFSet ) → (X∋z : Union X ∋ z ) → ¬ ( (u : ZFSet ) → ¬ ((X ∋ u) ∧ (u ∋ z ))) |
3 | 54 _∈_ : ( A B : ZFSet ) → Set m |
55 A ∈ B = B ∋ A | |
23 | 56 _⊆_ : ( A B : ZFSet ) → ∀{ x : ZFSet } → Set m |
57 _⊆_ A B {x} = A ∋ x → B ∋ x | |
3 | 58 _∩_ : ( A B : ZFSet ) → ZFSet |
115 | 59 A ∩ B = Select A ( λ x → ( A ∋ x ) ∧ ( B ∋ x ) ) |
3 | 60 _∪_ : ( A B : ZFSet ) → ZFSet |
103 | 61 A ∪ B = Union (A , B) -- Select A ( λ x → ( A ∋ x ) ∨ ( B ∋ x ) ) is easer |
78
9a7a64b2388c
infinite and replacement begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
77
diff
changeset
|
62 {_} : ZFSet → ZFSet |
9a7a64b2388c
infinite and replacement begin
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
77
diff
changeset
|
63 { x } = ( x , x ) |
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 ) ) |
166 | 70 power→ : ∀( A t : ZFSet ) → Power A ∋ t → ∀ {x} → t ∋ x → ¬ ¬ ( A ∋ x ) -- _⊆_ t A {x} |
77 | 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 ) |
76 | 73 extensionality : { A B : ZFSet } → ( (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 | |
160 | 79 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
|
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 ) ) |
130 | 82 replacement← : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → x ∈ X → ψ x ∈ Replace X ψ |
138 | 83 replacement→ : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet ) → ( lt : x ∈ Replace X ψ ) → ¬ ( ∀ (y : ZFSet) → ¬ ( x ≈ ψ y ) ) |
103 | 84 -- -- ∀ z [ ∀ x ( x ∈ z → ¬ ( x ≈ ∅ ) ) ∧ ∀ x ∀ y ( x , y ∈ z ∧ ¬ ( x ≈ y ) → x ∩ y ≈ ∅ ) → ∃ u ∀ x ( x ∈ z → ∃ t ( u ∩ x) ≈ { t }) ] |
85 -- axiom-of-choice : Set (suc n) | |
86 -- axiom-of-choice = ? | |
3 | 87 |
6 | 88 record ZF {n m : Level } : Set (suc (n ⊔ m)) where |
18 | 89 infixr 210 _,_ |
6 | 90 infixl 200 _∋_ |
91 infixr 220 _≈_ | |
92 field | |
93 ZFSet : Set n | |
94 _∋_ : ( A x : ZFSet ) → Set m | |
95 _≈_ : ( A B : ZFSet ) → Set m | |
96 -- ZF Set constructor | |
97 ∅ : ZFSet | |
18 | 98 _,_ : ( A B : ZFSet ) → ZFSet |
6 | 99 Union : ( A : ZFSet ) → ZFSet |
100 Power : ( A : ZFSet ) → ZFSet | |
115 | 101 Select : (X : ZFSet ) → ( ψ : (x : ZFSet ) → Set m ) → ZFSet |
18 | 102 Replace : ZFSet → ( ZFSet → ZFSet ) → ZFSet |
6 | 103 infinite : ZFSet |
18 | 104 isZF : IsZF ZFSet _∋_ _≈_ ∅ _,_ Union Power Select Replace infinite |
6 | 105 |