# HG changeset patch # User Shinji KONO # Date 1565341078 -32400 # Node ID 2e1f19c949dcc78d4b789973f0e2b300576ecec0 # Parent 59771eb07df0ddc668c9bbfa73c2a4accd2a5bf0 sepration of ordinal from OD diff -r 59771eb07df0 -r 2e1f19c949dc OD.agda --- a/OD.agda Fri Aug 09 16:54:30 2019 +0900 +++ b/OD.agda Fri Aug 09 17:57:58 2019 +0900 @@ -1,8 +1,8 @@ open import Level -module OD where +open import Ordinals +module OD {n : Level } (O : Ordinals {n} ) where open import zf -open import ordinal open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) open import Relation.Binary.PropositionalEquality open import Data.Nat.Properties @@ -14,248 +14,223 @@ open import logic open import nat +open inOrdinal O + -- Ordinal Definable Set -record OD {n : Level} : Set (suc n) where +record OD : Set (suc n ) where field - def : (x : Ordinal {n} ) → Set n + def : (x : Ordinal ) → Set n open OD -open Ordinal open _∧_ open _∨_ open Bool -record _==_ {n : Level} ( a b : OD {n} ) : Set n where +record _==_ ( a b : OD ) : Set n where field - eq→ : ∀ { x : Ordinal {n} } → def a x → def b x - eq← : ∀ { x : Ordinal {n} } → def b x → def a x + eq→ : ∀ { x : Ordinal } → def a x → def b x + eq← : ∀ { x : Ordinal } → def b x → def a x id : {n : Level} {A : Set n} → A → A id x = x -eq-refl : {n : Level} { x : OD {n} } → x == x -eq-refl {n} {x} = record { eq→ = id ; eq← = id } +eq-refl : { x : OD } → x == x +eq-refl {x} = record { eq→ = id ; eq← = id } open _==_ -eq-sym : {n : Level} { x y : OD {n} } → x == y → y == x +eq-sym : { x y : OD } → x == y → y == x eq-sym eq = record { eq→ = eq← eq ; eq← = eq→ eq } -eq-trans : {n : Level} { x y z : OD {n} } → x == y → y == z → x == z +eq-trans : { x y z : OD } → x == y → y == z → x == z eq-trans x=y y=z = record { eq→ = λ t → eq→ y=z ( eq→ x=y t) ; eq← = λ t → eq← x=y ( eq← y=z t) } -⇔→== : {n : Level} { x y : OD {suc n} } → ( {z : Ordinal {suc n}} → def x z ⇔ def y z) → x == y -eq→ ( ⇔→== {n} {x} {y} eq ) {z} m = proj1 eq m -eq← ( ⇔→== {n} {x} {y} eq ) {z} m = proj2 eq m +⇔→== : { x y : OD } → ( {z : Ordinal } → def x z ⇔ def y z) → x == y +eq→ ( ⇔→== {x} {y} eq ) {z} m = proj1 eq m +eq← ( ⇔→== {x} {y} eq ) {z} m = proj2 eq m -- Ordinal in OD ( and ZFSet ) Transitive Set -Ord : { n : Level } → ( a : Ordinal {n} ) → OD {n} -Ord {n} a = record { def = λ y → y o< a } +Ord : ( a : Ordinal ) → OD +Ord a = record { def = λ y → y o< a } -od∅ : {n : Level} → OD {n} -od∅ {n} = Ord o∅ +od∅ : OD +od∅ = Ord o∅ postulate -- OD can be iso to a subset of Ordinal ( by means of Godel Set ) - od→ord : {n : Level} → OD {n} → Ordinal {n} - ord→od : {n : Level} → Ordinal {n} → OD {n} - c<→o< : {n : Level} {x y : OD {n} } → def y ( od→ord x ) → od→ord x o< od→ord y - oiso : {n : Level} {x : OD {n}} → ord→od ( od→ord x ) ≡ x - diso : {n : Level} {x : Ordinal {n}} → od→ord ( ord→od x ) ≡ x + od→ord : OD → Ordinal + ord→od : Ordinal → OD + c<→o< : {x y : OD } → def y ( od→ord x ) → od→ord x o< od→ord y + oiso : {x : OD } → ord→od ( od→ord x ) ≡ x + diso : {x : Ordinal } → od→ord ( ord→od x ) ≡ x -- we should prove this in agda, but simply put here - ==→o≡ : {n : Level} → { x y : OD {suc n} } → (x == y) → x ≡ y + ==→o≡ : { x y : OD } → (x == y) → x ≡ y -- next assumption causes ∀ x ∋ ∅ . It menas only an ordinal becomes a set - -- o<→c< : {n : Level} {x y : Ordinal {n} } → x o< y → def (ord→od y) x + -- o<→c< : {n : Level} {x y : Ordinal } → x o< y → def (ord→od y) x -- ord→od x ≡ Ord x results the same -- supermum as Replacement Axiom - sup-o : {n : Level } → ( Ordinal {n} → Ordinal {n}) → Ordinal {n} - sup-o< : {n : Level } → { ψ : Ordinal {n} → Ordinal {n}} → ∀ {x : Ordinal {n}} → ψ x o< sup-o ψ + sup-o : ( Ordinal → Ordinal ) → Ordinal + sup-o< : { ψ : Ordinal → Ordinal } → ∀ {x : Ordinal } → ψ x o< sup-o ψ -- contra-position of mimimulity of supermum required in Power Set Axiom - -- sup-x : {n : Level } → ( Ordinal {n} → Ordinal {n}) → Ordinal {n} - -- sup-lb : {n : Level } → { ψ : Ordinal {n} → Ordinal {n}} → {z : Ordinal {n}} → z o< sup-o ψ → z o< osuc (ψ (sup-x ψ)) + -- sup-x : {n : Level } → ( Ordinal → Ordinal ) → Ordinal + -- sup-lb : {n : Level } → { ψ : Ordinal → Ordinal } → {z : Ordinal } → z o< sup-o ψ → z o< osuc (ψ (sup-x ψ)) -- mimimul and x∋minimul is an Axiom of choice - minimul : {n : Level } → (x : OD {suc n} ) → ¬ (x == od∅ )→ OD {suc n} + minimul : (x : OD ) → ¬ (x == od∅ )→ OD -- this should be ¬ (x == od∅ )→ ∃ ox → x ∋ Ord ox ( minimum of x ) - x∋minimul : {n : Level } → (x : OD {suc n} ) → ( ne : ¬ (x == od∅ ) ) → def x ( od→ord ( minimul x ne ) ) + x∋minimul : (x : OD ) → ( ne : ¬ (x == od∅ ) ) → def x ( od→ord ( minimul x ne ) ) -- minimulity (may proved by ε-induction ) - minimul-1 : {n : Level } → (x : OD {suc n} ) → ( ne : ¬ (x == od∅ ) ) → (y : OD {suc n}) → ¬ ( def (minimul x ne) (od→ord y)) ∧ (def x (od→ord y) ) + minimul-1 : (x : OD ) → ( ne : ¬ (x == od∅ ) ) → (y : OD ) → ¬ ( def (minimul x ne) (od→ord y)) ∧ (def x (od→ord y) ) -_∋_ : { n : Level } → ( a x : OD {n} ) → Set n -_∋_ {n} a x = def a ( od→ord x ) +_∋_ : ( a x : OD ) → Set n +_∋_ a x = def a ( od→ord x ) -_c<_ : { n : Level } → ( x a : OD {n} ) → Set n +_c<_ : ( x a : OD ) → Set n x c< a = a ∋ x -_c≤_ : {n : Level} → OD {n} → OD {n} → Set (suc n) +_c≤_ : OD → OD → Set (suc n) a c≤ b = (a ≡ b) ∨ ( b ∋ a ) -cseq : {n : Level} → OD {n} → OD {n} +cseq : {n : Level} → OD → OD cseq x = record { def = λ y → def x (osuc y) } where -def-subst : {n : Level } {Z : OD {n}} {X : Ordinal {n} }{z : OD {n}} {x : Ordinal {n} }→ def Z X → Z ≡ z → X ≡ x → def z x +def-subst : {Z : OD } {X : Ordinal }{z : OD } {x : Ordinal }→ def Z X → Z ≡ z → X ≡ x → def z x def-subst df refl refl = df -sup-od : {n : Level } → ( OD {n} → OD {n}) → OD {n} +sup-od : ( OD → OD ) → OD sup-od ψ = Ord ( sup-o ( λ x → od→ord (ψ (ord→od x ))) ) -sup-c< : {n : Level } → ( ψ : OD {n} → OD {n}) → ∀ {x : OD {n}} → def ( sup-od ψ ) (od→ord ( ψ x )) -sup-c< {n} ψ {x} = def-subst {n} {_} {_} {Ord ( sup-o ( λ x → od→ord (ψ (ord→od x ))) )} {od→ord ( ψ x )} +sup-c< : ( ψ : OD → OD ) → ∀ {x : OD } → def ( sup-od ψ ) (od→ord ( ψ x )) +sup-c< ψ {x} = def-subst {_} {_} {Ord ( sup-o ( λ x → od→ord (ψ (ord→od x ))) )} {od→ord ( ψ x )} lemma refl (cong ( λ k → od→ord (ψ k) ) oiso) where lemma : od→ord (ψ (ord→od (od→ord x))) o< sup-o (λ x → od→ord (ψ (ord→od x))) lemma = subst₂ (λ j k → j o< k ) refl diso (o<-subst sup-o< refl (sym diso) ) -otrans : {n : Level} {a x y : Ordinal {n} } → def (Ord a) x → def (Ord x) y → def (Ord a) y +otrans : {n : Level} {a x y : Ordinal } → def (Ord a) x → def (Ord x) y → def (Ord a) y otrans x ¬a ¬b c = no ¬b -ppp : { n : Level } → { p : Set (suc n) } { a : OD {suc n} } → record { def = λ x → p } ∋ a → p -ppp {n} {p} {a} d = d +ppp : { p : Set n } { a : OD } → record { def = λ x → p } ∋ a → p +ppp {p} {a} d = d -- -- Axiom of choice in intutionistic logic implies the exclude middle -- https://plato.stanford.edu/entries/axiom-choice/#AxiChoLog -- -p∨¬p : { n : Level } → ( p : Set (suc n) ) → p ∨ ( ¬ p ) -- assuming axiom of choice -p∨¬p {n} p with is-o∅ ( od→ord ( record { def = λ x → p } )) -p∨¬p {n} p | yes eq = case2 (¬p eq) where +p∨¬p : ( p : Set n ) → p ∨ ( ¬ p ) -- assuming axiom of choice +p∨¬p p with is-o∅ ( od→ord ( record { def = λ x → p } )) +p∨¬p p | yes eq = case2 (¬p eq) where ps = record { def = λ x → p } lemma : ps == od∅ → p → ⊥ - lemma eq p0 = ¬x<0 {n} {od→ord ps} (eq→ eq p0 ) + lemma eq p0 = ¬x<0 {od→ord ps} (eq→ eq p0 ) ¬p : (od→ord ps ≡ o∅) → p → ⊥ ¬p eq = lemma ( subst₂ (λ j k → j == k ) oiso o∅≡od∅ ( o≡→== eq )) -p∨¬p {n} p | no ¬p = case1 (ppp {n} {p} {minimul ps (λ eq → ¬p (eqo∅ eq))} lemma) where +p∨¬p p | no ¬p = case1 (ppp {p} {minimul ps (λ eq → ¬p (eqo∅ eq))} lemma) where ps = record { def = λ x → p } - eqo∅ : ps == od∅ {suc n} → od→ord ps ≡ o∅ {suc n} + eqo∅ : ps == od∅ → od→ord ps ≡ o∅ eqo∅ eq = subst (λ k → od→ord ps ≡ k) ord-od∅ ( cong (λ k → od→ord k ) (==→o≡ eq)) lemma : ps ∋ minimul ps (λ eq → ¬p (eqo∅ eq)) lemma = x∋minimul ps (λ eq → ¬p (eqo∅ eq)) -∋-p : { n : Level } → ( p : Set (suc n) ) → Dec p -- assuming axiom of choice -∋-p {n} p with p∨¬p p -∋-p {n} p | case1 x = yes x -∋-p {n} p | case2 x = no x +∋-p : ( p : Set n ) → Dec p -- assuming axiom of choice +∋-p p with p∨¬p p +∋-p p | case1 x = yes x +∋-p p | case2 x = no x -double-neg-eilm : {n : Level } {A : Set (suc n)} → ¬ ¬ A → A -- we don't have this in intutionistic logic -double-neg-eilm {n} {A} notnot with ∋-p A -- assuming axiom of choice +double-neg-eilm : {A : Set n} → ¬ ¬ A → A -- we don't have this in intutionistic logic +double-neg-eilm {A} notnot with ∋-p A -- assuming axiom of choice ... | yes p = p ... | no ¬p = ⊥-elim ( notnot ¬p ) -OrdP : {n : Level} → ( x : Ordinal {suc n} ) ( y : OD {suc n} ) → Dec ( Ord x ∋ y ) -OrdP {n} x y with trio< x (od→ord y) -OrdP {n} x y | tri< a ¬b ¬c = no ¬c -OrdP {n} x y | tri≈ ¬a refl ¬c = no ( o<¬≡ refl ) -OrdP {n} x y | tri> ¬a ¬b c = yes c +OrdP : ( x : Ordinal ) ( y : OD ) → Dec ( Ord x ∋ y ) +OrdP x y with trio< x (od→ord y) +OrdP x y | tri< a ¬b ¬c = no ¬c +OrdP x y | tri≈ ¬a refl ¬c = no ( o<¬≡ refl ) +OrdP x y | tri> ¬a ¬b c = yes c -- open import Relation.Binary.HeterogeneousEquality as HE using (_≅_ ) --- postulate f-extensionality : { n : Level} → Relation.Binary.PropositionalEquality.Extensionality (suc n) (suc (suc n)) +-- postulate f-extensionality : { n : Level} → Relation.Binary.PropositionalEquality.Extensionality n (suc n) -in-codomain : {n : Level} → (X : OD {suc n} ) → ( ψ : OD {suc n} → OD {suc n} ) → OD {suc n} -in-codomain {n} X ψ = record { def = λ x → ¬ ( (y : Ordinal {suc n}) → ¬ ( def X y ∧ ( x ≡ od→ord (ψ (ord→od y ))))) } +in-codomain : (X : OD ) → ( ψ : OD → OD ) → OD +in-codomain X ψ = record { def = λ x → ¬ ( (y : Ordinal ) → ¬ ( def X y ∧ ( x ≡ od→ord (ψ (ord→od y ))))) } -- Power Set of X ( or constructible by λ y → def X (od→ord y ) -ZFSubset : {n : Level} → (A x : OD {suc n} ) → OD {suc n} +ZFSubset : (A x : OD ) → OD ZFSubset A x = record { def = λ y → def A y ∧ def x y } -- roughly x = A → Set -Def : {n : Level} → (A : OD {suc n}) → OD {suc n} -Def {n} A = Ord ( sup-o ( λ x → od→ord ( ZFSubset A (ord→od x )) ) ) +Def : (A : OD ) → OD +Def A = Ord ( sup-o ( λ x → od→ord ( ZFSubset A (ord→od x )) ) ) -_⊆_ : {n : Level} ( A B : OD {suc n} ) → ∀{ x : OD {suc n} } → Set (suc n) +_⊆_ : ( A B : OD ) → ∀{ x : OD } → Set n _⊆_ A B {x} = A ∋ x → B ∋ x infixr 220 _⊆_ -subset-lemma : {n : Level} → {A x y : OD {suc n} } → ( x ∋ y → ZFSubset A x ∋ y ) ⇔ ( _⊆_ x A {y} ) -subset-lemma {n} {A} {x} {y} = record { +subset-lemma : {A x y : OD } → ( x ∋ y → ZFSubset A x ∋ y ) ⇔ ( _⊆_ x A {y} ) +subset-lemma {A} {x} {y} = record { proj1 = λ z lt → proj1 (z lt) ; proj2 = λ x⊆A lt → record { proj1 = x⊆A lt ; proj2 = lt } } @@ -265,18 +240,18 @@ -- L (Φ 0) = Φ -- L (OSuc lv n) = { Def ( L n ) } -- L (Φ (Suc n)) = Union (L α) (α < Φ (Suc n) ) -L : {n : Level} → (α : Ordinal {suc n}) → OD {suc n} -L {n} record { lv = Zero ; ord = (Φ .0) } = od∅ -L {n} record { lv = lx ; ord = (OSuc lv ox) } = Def ( L {n} ( record { lv = lx ; ord = ox } ) ) -L {n} record { lv = (Suc lx) ; ord = (Φ (Suc lx)) } = -- Union ( L α ) - cseq ( Ord (od→ord (L {n} (record { lv = lx ; ord = Φ lx })))) +-- L : {n : Level} → (α : Ordinal ) → OD +-- L record { lv = Zero ; ord = (Φ .0) } = od∅ +-- L record { lv = lx ; ord = (OSuc lv ox) } = Def ( L ( record { lv = lx ; ord = ox } ) ) +-- L record { lv = (Suc lx) ; ord = (Φ (Suc lx)) } = -- Union ( L α ) +-- cseq ( Ord (od→ord (L (record { lv = lx ; ord = Φ lx })))) --- L0 : {n : Level} → (α : Ordinal {suc n}) → L (osuc α) ∋ L α --- L1 : {n : Level} → (α β : Ordinal {suc n}) → α o< β → ∀ (x : OD {suc n}) → L α ∋ x → L β ∋ x +-- L0 : {n : Level} → (α : Ordinal ) → L (osuc α) ∋ L α +-- L1 : {n : Level} → (α β : Ordinal ) → α o< β → ∀ (x : OD ) → L α ∋ x → L β ∋ x -OD→ZF : {n : Level} → ZF {suc (suc n)} {suc n} -OD→ZF {n} = record { - ZFSet = OD {suc n} +OD→ZF : ZF +OD→ZF = record { + ZFSet = OD ; _∋_ = _∋_ ; _≈_ = _==_ ; ∅ = od∅ @@ -288,35 +263,35 @@ ; infinite = infinite ; isZF = isZF } where - ZFSet = OD {suc n} - Select : (X : OD {suc n} ) → ((x : OD {suc n} ) → Set (suc n) ) → OD {suc n} + ZFSet = OD + Select : (X : OD ) → ((x : OD ) → Set n ) → OD Select X ψ = record { def = λ x → ( def X x ∧ ψ ( ord→od x )) } - Replace : OD {suc n} → (OD {suc n} → OD {suc n} ) → OD {suc n} + Replace : OD → (OD → OD ) → OD Replace X ψ = record { def = λ x → (x o< sup-o ( λ x → od→ord (ψ (ord→od x )))) ∧ def (in-codomain X ψ) x } - _,_ : OD {suc n} → OD {suc n} → OD {suc n} + _,_ : OD → OD → OD x , y = Ord (omax (od→ord x) (od→ord y)) _∩_ : ( A B : ZFSet ) → ZFSet A ∩ B = record { def = λ x → def A x ∧ def B x } - Union : OD {suc n} → OD {suc n} + Union : OD → OD Union U = record { def = λ x → ¬ (∀ (u : Ordinal ) → ¬ ((def U u) ∧ (def (ord→od u) x))) } - _∈_ : ( A B : ZFSet ) → Set (suc n) + _∈_ : ( A B : ZFSet ) → Set n A ∈ B = B ∋ A - Power : OD {suc n} → OD {suc n} + Power : OD → OD Power A = Replace (Def (Ord (od→ord A))) ( λ x → A ∩ x ) {_} : ZFSet → ZFSet { x } = ( x , x ) - data infinite-d : ( x : Ordinal {suc n} ) → Set (suc n) where + data infinite-d : ( x : Ordinal ) → Set n where iφ : infinite-d o∅ - isuc : {x : Ordinal {suc n} } → infinite-d x → + isuc : {x : Ordinal } → infinite-d x → infinite-d (od→ord ( Union (ord→od x , (ord→od x , ord→od x ) ) )) - infinite : OD {suc n} + infinite : OD infinite = record { def = λ x → infinite-d x } infixr 200 _∈_ -- infixr 230 _∩_ _∪_ - isZF : IsZF (OD {suc n}) _∋_ _==_ od∅ _,_ Union Power Select Replace infinite + isZF : IsZF (OD ) _∋_ _==_ od∅ _,_ Union Power Select Replace infinite isZF = record { isEquivalence = record { refl = eq-refl ; sym = eq-sym; trans = eq-trans } ; pair = pair @@ -326,7 +301,7 @@ ; power→ = power→ ; power← = power← ; extensionality = λ {A} {B} {w} → extensionality {A} {B} {w} - ; ε-induction = ε-induction + -- ; ε-induction = {!!} ; infinity∅ = infinity∅ ; infinity = infinity ; selection = λ {X} {ψ} {y} → selection {X} {ψ} {y} @@ -336,18 +311,17 @@ ; choice = choice } where - pair : (A B : OD {suc n} ) → ((A , B) ∋ A) ∧ ((A , B) ∋ B) - proj1 (pair A B ) = omax-x {n} (od→ord A) (od→ord B) - proj2 (pair A B ) = omax-y {n} (od→ord A) (od→ord B) + pair : (A B : OD ) → ((A , B) ∋ A) ∧ ((A , B) ∋ B) + proj1 (pair A B ) = omax-x (od→ord A) (od→ord B) + proj2 (pair A B ) = omax-y (od→ord A) (od→ord B) - empty : {n : Level } (x : OD {suc n} ) → ¬ (od∅ ∋ x) - empty x (case1 ()) - empty x (case2 ()) + empty : (x : OD ) → ¬ (od∅ ∋ x) + empty x = ¬x<0 - o<→c< : {x y : Ordinal {suc n}} {z : OD {suc n}}→ x o< y → _⊆_ (Ord x) (Ord y) {z} + o<→c< : {x y : Ordinal } {z : OD }→ x o< y → _⊆_ (Ord x) (Ord y) {z} o<→c< lt lt1 = ordtrans lt1 lt - ⊆→o< : {x y : Ordinal {suc n}} → (∀ (z : OD) → _⊆_ (Ord x) (Ord y) {z} ) → x o< osuc y + ⊆→o< : {x y : Ordinal } → (∀ (z : OD) → _⊆_ (Ord x) (Ord y) {z} ) → x o< osuc y ⊆→o< {x} {y} lt with trio< x y ⊆→o< {x} {y} lt | tri< a ¬b ¬c = ordtrans a <-osuc ⊆→o< {x} {y} lt | tri≈ ¬a b ¬c = subst ( λ k → k o< osuc y) (sym b) <-osuc @@ -362,9 +336,9 @@ lemma : {y : Ordinal} → def X y ∧ def (ord→od y) (od→ord z) → ¬ ((u : OD) → ¬ (X ∋ u) ∧ (u ∋ z)) lemma {y} xx not = not (ord→od y) record { proj1 = subst ( λ k → def X k ) (sym diso) (proj1 xx ) ; proj2 = proj2 xx } - ψiso : {ψ : OD {suc n} → Set (suc n)} {x y : OD {suc n}} → ψ x → x ≡ y → ψ y + ψiso : {ψ : OD → Set n} {x y : OD } → ψ x → x ≡ y → ψ y ψiso {ψ} t refl = t - selection : {ψ : OD → Set (suc n)} {X y : OD} → ((X ∋ y) ∧ ψ y) ⇔ (Select X ψ ∋ y) + selection : {ψ : OD → Set n} {X y : OD} → ((X ∋ y) ∧ ψ y) ⇔ (Select X ψ ∋ y) selection {ψ} {X} {y} = record { proj1 = λ cond → record { proj1 = proj1 cond ; proj2 = ψiso {ψ} (proj2 cond) (sym oiso) } ; proj2 = λ select → record { proj1 = proj1 select ; proj2 = ψiso {ψ} (proj2 select) oiso } @@ -392,26 +366,26 @@ --- Power X = ord→od ( sup-o ( λ x → od→ord ( ZFSubset A (ord→od x )) ) ) Power X is a sup of all subset of A -- -- - ∩-≡ : { a b : OD {suc n} } → ({x : OD {suc n} } → (a ∋ x → b ∋ x)) → a == ( b ∩ a ) + ∩-≡ : { a b : OD } → ({x : OD } → (a ∋ x → b ∋ x)) → a == ( b ∩ a ) ∩-≡ {a} {b} inc = record { eq→ = λ {x} x ¬a ¬b c = -- lz(a) - subst (λ k → ψ k ) oiso (ε-induction-ord lx (Φ lx) {_} {ord (od→ord z)} (case1 (<-trans lz ¬a ¬b c with d<→lv lz=ly -- lz(b) - ... | eq = subst (λ k → ψ k ) oiso - (ε-induction-ord lx (Φ lx) {_} {ord (od→ord z)} (case1 (subst (λ k → k < lx ) (trans (sym lemma1)(sym eq) ) c ))) - lemma z lt | case2 lz=ly | tri≈ ¬a lx=ly ¬c with d<→lv lz=ly -- lz(c) - ... | eq = lemma6 {ly} {Φ lx} {oy} lx=ly (sym (subst (λ k → lv (od→ord z) ≡ k) lemma1 eq)) where - lemma5 : (ox : OrdinalD lx) → (lv (od→ord z) < lx) ∨ (ord (od→ord z) d< ox) → ψ z - lemma5 ox lt = subst (λ k → ψ k ) oiso (ε-induction-ord lx ox lt ) - lemma6 : { ly : Nat } { ox : OrdinalD {suc n} lx } { oy : OrdinalD {suc n} ly } → - lx ≡ ly → ly ≡ lv (od→ord z) → ψ z - lemma6 {ly} {ox} {oy} refl refl = lemma5 (OSuc lx (ord (od→ord z)) ) (case2 s axiom of choice - --- - record choiced {n : Level} ( X : OD {suc n}) : Set (suc (suc n)) where - field - a-choice : OD {suc n} - is-in : X ∋ a-choice - choice-func' : (X : OD {suc n} ) → (p∨¬p : { n : Level } → ( p : Set (suc n) ) → p ∨ ( ¬ p )) → ¬ ( X == od∅ ) → choiced X - choice-func' X p∨¬p not = have_to_find - where - ψ : ( ox : Ordinal {suc n}) → Set (suc (suc n)) - ψ ox = (( x : Ordinal {suc n}) → x o< ox → ( ¬ def X x )) ∨ choiced X - lemma-ord : ( ox : Ordinal {suc n} ) → ψ ox - lemma-ord ox = TransFinite {n} {suc (suc n)} {ψ} caseΦ caseOSuc ox where - ∋-p' : (A x : OD {suc n} ) → Dec ( A ∋ x ) - ∋-p' A x with p∨¬p ( A ∋ x ) - ∋-p' A x | case1 t = yes t - ∋-p' A x | case2 t = no t - ∀-imply-or : {n : Level} {A : Ordinal {suc n} → Set (suc n) } {B : Set (suc (suc n)) } - → ((x : Ordinal {suc n}) → A x ∨ B) → ((x : Ordinal {suc n}) → A x) ∨ B - ∀-imply-or {n} {A} {B} ∀AB with p∨¬p ((x : Ordinal {suc n}) → A x) - ∀-imply-or {n} {A} {B} ∀AB | case1 t = case1 t - ∀-imply-or {n} {A} {B} ∀AB | case2 x = case2 (lemma x) where - lemma : ¬ ((x : Ordinal {suc n}) → A x) → B - lemma not with p∨¬p B - lemma not | case1 b = b - lemma not | case2 ¬b = ⊥-elim (not (λ x → dont-orb (∀AB x) ¬b )) - caseΦ : (lx : Nat) → ( (x : Ordinal {suc n} ) → x o< ordinal lx (Φ lx) → ψ x) → ψ (ordinal lx (Φ lx) ) - caseΦ lx prev with ∋-p' X ( ord→od (ordinal lx (Φ lx) )) - caseΦ lx prev | yes p = case2 ( record { a-choice = ord→od (ordinal lx (Φ lx)) ; is-in = p } ) - caseΦ lx prev | no ¬p = lemma where - lemma1 : (x : Ordinal) → (((Suc (lv x) ≤ lx) ∨ (ord x d< Φ lx) → def X x → ⊥) ∨ choiced X) - lemma1 x with trio< x (ordinal lx (Φ lx)) - lemma1 x | tri< a ¬b ¬c with prev (osuc x) (lemma2 a) where - lemma2 : x o< (ordinal lx (Φ lx)) → osuc x o< ordinal lx (Φ lx) - lemma2 (case1 lt) = case1 lt - lemma1 x | tri< a ¬b ¬c | case2 found = case2 found - lemma1 x | tri< a ¬b ¬c | case1 not_found = case1 ( λ lt df → not_found x <-osuc df ) - lemma1 x | tri≈ ¬a refl ¬c = case1 ( λ lt → ⊥-elim (o<¬≡ refl lt )) - lemma1 x | tri> ¬a ¬b c = case1 ( λ lt → ⊥-elim (o<> lt c )) - lemma : ((x : Ordinal) → (Suc (lv x) ≤ lx) ∨ (ord x d< Φ lx) → def X x → ⊥) ∨ choiced X - lemma = ∀-imply-or lemma1 - caseOSuc : (lx : Nat) (x : OrdinalD lx) → ψ ( ordinal lx x ) → ψ ( ordinal lx (OSuc lx x) ) - caseOSuc lx x prev with ∋-p' X (ord→od record { lv = lx ; ord = x } ) - caseOSuc lx x prev | yes p = case2 (record { a-choice = ord→od record { lv = lx ; ord = x } ; is-in = p }) - caseOSuc lx x (case1 not_found) | no ¬p = case1 lemma where - lemma : (y : Ordinal) → (Suc (lv y) ≤ lx) ∨ (ord y d< OSuc lx x) → def X y → ⊥ - lemma y lt with trio< y (ordinal lx x ) - lemma y lt | tri< a ¬b ¬c = not_found y a - lemma y lt | tri≈ ¬a refl ¬c = subst (λ k → def X k → ⊥ ) diso ¬p - lemma y lt | tri> ¬a ¬b c with osuc-≡< lt - lemma y lt | tri> ¬a ¬b c | case1 refl = ⊥-elim ( ¬b refl ) - lemma y lt | tri> ¬a ¬b c | case2 lt1 = ⊥-elim (o<> c lt1 ) - caseOSuc lx x (case2 found) | no ¬p = case2 found - have_to_find : choiced X - have_to_find with lemma-ord (od→ord X ) - have_to_find | t = dont-or t ¬¬X∋x where - ¬¬X∋x : ¬ ((x : Ordinal) → (Suc (lv x) ≤ lv (od→ord X)) ∨ (ord x d< ord (od→ord X)) → def X x → ⊥) - ¬¬X∋x nn = not record { - eq→ = λ {x} lt → ⊥-elim (nn x (def→o< lt) lt) - ; eq← = λ {x} lt → ⊥-elim ( ¬x<0 lt ) - } - diff -r 59771eb07df0 -r 2e1f19c949dc zf.agda --- a/zf.agda Fri Aug 09 16:54:30 2019 +0900 +++ b/zf.agda Fri Aug 09 17:57:58 2019 +0900 @@ -52,9 +52,9 @@ -- minimul : (x : ZFSet ) → ¬ (x ≈ ∅) → ZFSet -- regularity : ∀( x : ZFSet ) → (not : ¬ (x ≈ ∅)) → ( minimul x not ∈ x ∧ ( minimul x not ∩ x ≈ ∅ ) ) -- another form of regularity - ε-induction : { ψ : ZFSet → Set m} - → ( {x : ZFSet } → ({ y : ZFSet } → x ∋ y → ψ y ) → ψ x ) - → (x : ZFSet ) → ψ x + -- ε-induction : { ψ : ZFSet → Set m} + -- → ( {x : ZFSet } → ({ y : ZFSet } → x ∋ y → ψ y ) → ψ x ) + -- → (x : ZFSet ) → ψ x -- infinity : ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) ) infinity∅ : ∅ ∈ infinite infinity : ∀( x : ZFSet ) → x ∈ infinite → ( x ∪ { x }) ∈ infinite