431
|
1 open import Level
|
|
2 open import Ordinals
|
|
3 open import logic
|
|
4 open import Relation.Nullary
|
|
5 module LEMC {n : Level } (O : Ordinals {n} ) (p∨¬p : ( p : Set n) → p ∨ ( ¬ p )) where
|
|
6
|
|
7 open import zf
|
|
8 open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ )
|
|
9 open import Relation.Binary.PropositionalEquality
|
|
10 open import Data.Nat.Properties
|
|
11 open import Data.Empty
|
|
12 open import Relation.Binary
|
|
13 open import Relation.Binary.Core
|
|
14
|
|
15 open import nat
|
|
16 import OD
|
|
17
|
|
18 open inOrdinal O
|
|
19 open OD O
|
|
20 open OD.OD
|
|
21 open OD._==_
|
|
22 open ODAxiom odAxiom
|
|
23 import OrdUtil
|
|
24 import ODUtil
|
|
25 open Ordinals.Ordinals O
|
|
26 open Ordinals.IsOrdinals isOrdinal
|
|
27 open Ordinals.IsNext isNext
|
|
28 open OrdUtil O
|
|
29 open ODUtil O
|
|
30
|
|
31 open import zfc
|
|
32
|
|
33 open HOD
|
|
34
|
|
35 open _⊆_
|
|
36
|
|
37 decp : ( p : Set n ) → Dec p -- assuming axiom of choice
|
|
38 decp p with p∨¬p p
|
|
39 decp p | case1 x = yes x
|
|
40 decp p | case2 x = no x
|
|
41
|
|
42 ∋-p : (A x : HOD ) → Dec ( A ∋ x )
|
|
43 ∋-p A x with p∨¬p ( A ∋ x) -- LEM
|
|
44 ∋-p A x | case1 t = yes t
|
|
45 ∋-p A x | case2 t = no (λ x → t x)
|
|
46
|
|
47 double-neg-eilm : {A : Set n} → ¬ ¬ A → A -- we don't have this in intutionistic logic
|
|
48 double-neg-eilm {A} notnot with decp A -- assuming axiom of choice
|
|
49 ... | yes p = p
|
|
50 ... | no ¬p = ⊥-elim ( notnot ¬p )
|
|
51
|
|
52 power→⊆ : ( A t : HOD) → Power A ∋ t → t ⊆ A
|
|
53 power→⊆ A t PA∋t = record { incl = λ {x} t∋x → double-neg-eilm (λ not → t1 t∋x (λ x → not x) ) } where
|
|
54 t1 : {x : HOD } → t ∋ x → ¬ ¬ (A ∋ x)
|
|
55 t1 = power→ A t PA∋t
|
|
56
|
|
57 --- With assuption of HOD is ordered, p ∨ ( ¬ p ) <=> axiom of choice
|
|
58 ---
|
|
59 record choiced ( X : Ordinal ) : Set n where
|
|
60 field
|
|
61 a-choice : Ordinal
|
|
62 is-in : odef (* X) a-choice
|
|
63
|
|
64 open choiced
|
|
65
|
|
66 -- ∋→d : ( a : HOD ) { x : HOD } → * (& a) ∋ x → X ∋ * (a-choice (choice-func X not))
|
|
67 -- ∋→d a lt = subst₂ (λ j k → odef j k) *iso (sym &iso) lt
|
|
68
|
|
69 oo∋ : { a : HOD} { x : Ordinal } → odef (* (& a)) x → a ∋ * x
|
|
70 oo∋ lt = subst₂ (λ j k → odef j k) *iso (sym &iso) lt
|
|
71
|
|
72 ∋oo : { a : HOD} { x : Ordinal } → a ∋ * x → odef (* (& a)) x
|
|
73 ∋oo lt = subst₂ (λ j k → odef j k ) (sym *iso) &iso lt
|
|
74
|
|
75 OD→ZFC : ZFC
|
|
76 OD→ZFC = record {
|
|
77 ZFSet = HOD
|
|
78 ; _∋_ = _∋_
|
|
79 ; _≈_ = _=h=_
|
|
80 ; ∅ = od∅
|
|
81 ; Select = Select
|
|
82 ; isZFC = isZFC
|
|
83 } where
|
|
84 -- infixr 200 _∈_
|
|
85 -- infixr 230 _∩_ _∪_
|
|
86 isZFC : IsZFC (HOD ) _∋_ _=h=_ od∅ Select
|
|
87 isZFC = record {
|
|
88 choice-func = λ A {X} not A∋X → * (a-choice (choice-func X not) );
|
|
89 choice = λ A {X} A∋X not → oo∋ (is-in (choice-func X not))
|
|
90 } where
|
|
91 --
|
|
92 -- the axiom choice from LEM and OD ordering
|
|
93 --
|
|
94 choice-func : (X : HOD ) → ¬ ( X =h= od∅ ) → choiced (& X)
|
|
95 choice-func X not = have_to_find where
|
|
96 ψ : ( ox : Ordinal ) → Set n
|
|
97 ψ ox = (( x : Ordinal ) → x o< ox → ( ¬ odef X x )) ∨ choiced (& X)
|
|
98 lemma-ord : ( ox : Ordinal ) → ψ ox
|
|
99 lemma-ord ox = TransFinite0 {ψ} induction ox where
|
|
100 ∀-imply-or : {A : Ordinal → Set n } {B : Set n }
|
|
101 → ((x : Ordinal ) → A x ∨ B) → ((x : Ordinal ) → A x) ∨ B
|
|
102 ∀-imply-or {A} {B} ∀AB with p∨¬p ((x : Ordinal ) → A x) -- LEM
|
|
103 ∀-imply-or {A} {B} ∀AB | case1 t = case1 t
|
|
104 ∀-imply-or {A} {B} ∀AB | case2 x = case2 (lemma (λ not → x not )) where
|
|
105 lemma : ¬ ((x : Ordinal ) → A x) → B
|
|
106 lemma not with p∨¬p B
|
|
107 lemma not | case1 b = b
|
|
108 lemma not | case2 ¬b = ⊥-elim (not (λ x → dont-orb (∀AB x) ¬b ))
|
|
109 induction : (x : Ordinal) → ((y : Ordinal) → y o< x → ψ y) → ψ x
|
|
110 induction x prev with ∋-p X ( * x)
|
|
111 ... | yes p = case2 ( record { a-choice = x ; is-in = ∋oo p } )
|
|
112 ... | no ¬p = lemma where
|
|
113 lemma1 : (y : Ordinal) → (y o< x → odef X y → ⊥) ∨ choiced (& X)
|
|
114 lemma1 y with ∋-p X (* y)
|
|
115 lemma1 y | yes y<X = case2 ( record { a-choice = y ; is-in = ∋oo y<X } )
|
|
116 lemma1 y | no ¬y<X = case1 ( λ lt y<X → ¬y<X (d→∋ X y<X) )
|
|
117 lemma : ((y : Ordinal) → y o< x → odef X y → ⊥) ∨ choiced (& X)
|
|
118 lemma = ∀-imply-or lemma1
|
|
119 odef→o< : {X : HOD } → {x : Ordinal } → odef X x → x o< & X
|
|
120 odef→o< {X} {x} lt = o<-subst {_} {_} {x} {& X} ( c<→o< ( subst₂ (λ j k → odef j k ) (sym *iso) (sym &iso) lt )) &iso &iso
|
|
121 have_to_find : choiced (& X)
|
|
122 have_to_find = dont-or (lemma-ord (& X )) ¬¬X∋x where
|
|
123 ¬¬X∋x : ¬ ((x : Ordinal) → x o< (& X) → odef X x → ⊥)
|
|
124 ¬¬X∋x nn = not record {
|
|
125 eq→ = λ {x} lt → ⊥-elim (nn x (odef→o< lt) lt)
|
|
126 ; eq← = λ {x} lt → ⊥-elim ( ¬x<0 lt )
|
|
127 }
|
|
128
|
|
129 --
|
|
130 -- axiom regurality from ε-induction (using axiom of choice above)
|
|
131 --
|
|
132 -- from https://math.stackexchange.com/questions/2973777/is-it-possible-to-prove-regularity-with-transfinite-induction-only
|
|
133 --
|
|
134 record Minimal (x : HOD) : Set (suc n) where
|
|
135 field
|
|
136 min : HOD
|
|
137 x∋min : x ∋ min
|
|
138 min-empty : (y : HOD ) → ¬ ( min ∋ y) ∧ (x ∋ y)
|
|
139 open Minimal
|
|
140 open _∧_
|
|
141 induction : {x : HOD} → ({y : HOD} → x ∋ y → (u : HOD ) → (u∋x : u ∋ y) → Minimal u )
|
|
142 → (u : HOD ) → (u∋x : u ∋ x) → Minimal u
|
|
143 induction {x} prev u u∋x with p∨¬p ((y : Ordinal ) → ¬ (odef x y) ∧ (odef u y))
|
|
144 ... | case1 P =
|
|
145 record { min = x
|
|
146 ; x∋min = u∋x
|
|
147 ; min-empty = λ y → P (& y)
|
|
148 }
|
|
149 ... | case2 NP = min2 where
|
|
150 p : HOD
|
|
151 p = record { od = record { def = λ y1 → odef x y1 ∧ odef u y1 } ; odmax = omin (odmax x) (odmax u) ; <odmax = lemma } where
|
|
152 lemma : {y : Ordinal} → OD.def (od x) y ∧ OD.def (od u) y → y o< omin (odmax x) (odmax u)
|
|
153 lemma {y} lt = min1 (<odmax x (proj1 lt)) (<odmax u (proj2 lt))
|
|
154 np : ¬ (p =h= od∅)
|
|
155 np p∅ = NP (λ y p∋y → ∅< {p} {_} (d→∋ p p∋y) p∅ )
|
|
156 y1choice : choiced (& p)
|
|
157 y1choice = choice-func p np
|
|
158 y1 : HOD
|
|
159 y1 = * (a-choice y1choice)
|
|
160 y1prop : (x ∋ y1) ∧ (u ∋ y1)
|
|
161 y1prop = oo∋ (is-in y1choice)
|
|
162 min2 : Minimal u
|
|
163 min2 = prev (proj1 y1prop) u (proj2 y1prop)
|
|
164 Min2 : (x : HOD) → (u : HOD ) → (u∋x : u ∋ x) → Minimal u
|
|
165 Min2 x u u∋x = (ε-induction {λ y → (u : HOD ) → (u∋x : u ∋ y) → Minimal u } induction x u u∋x )
|
|
166 cx : {x : HOD} → ¬ (x =h= od∅ ) → choiced (& x )
|
|
167 cx {x} nx = choice-func x nx
|
|
168 minimal : (x : HOD ) → ¬ (x =h= od∅ ) → HOD
|
|
169 minimal x ne = min (Min2 (* (a-choice (cx {x} ne) )) x ( oo∋ (is-in (cx ne))) )
|
|
170 x∋minimal : (x : HOD ) → ( ne : ¬ (x =h= od∅ ) ) → odef x ( & ( minimal x ne ) )
|
|
171 x∋minimal x ne = x∋min (Min2 (* (a-choice (cx {x} ne) )) x ( oo∋ (is-in (cx ne))) )
|
|
172 minimal-1 : (x : HOD ) → ( ne : ¬ (x =h= od∅ ) ) → (y : HOD ) → ¬ ( odef (minimal x ne) (& y)) ∧ (odef x (& y) )
|
|
173 minimal-1 x ne y = min-empty (Min2 (* (a-choice (cx ne) )) x ( oo∋ (is-in (cx ne)))) y
|
|
174
|
|
175
|
|
176
|
|
177
|