# HG changeset patch # User Shinji KONO # Date 1671849570 -32400 # Node ID 40345abc0949f33f9c767338ccff10078adf188e # Parent 55ab5de1ae02b522b0743148271e8c4d2a05c805 add README diff -r 55ab5de1ae02 -r 40345abc0949 src/NSet.agda --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/NSet.agda Sat Dec 24 11:39:30 2022 +0900 @@ -0,0 +1,105 @@ +open import Level +module NSet (n : Level) where + +open import logic +open import nat +open import Data.Nat hiding (suc ; zero) +open import Data.Nat.Properties +open import Relation.Binary hiding (_⇔_) +open import Relation.Binary.PropositionalEquality hiding ( [_] ) + +-- +-- Primitive Set on ℕ +-- + +record NSet : Set (suc zero) where + field + def : ℕ → Set + +-- +-- Set as an equation on ℕ +-- +eqa1 : NSet +eqa1 = record { def = λ x → x * x + 6 ≡ 5 * x } + +open NSet + +_∋_ : NSet → ℕ → Set +S ∋ x = def S x + +eq1∋2 : eqa1 ∋ 2 +eq1∋2 = refl + +eq1∋3 : eqa1 ∋ 3 +eq1∋3 = refl + +-- +-- The solution +-- + +eqa2 : NSet +eqa2 = record { def = λ x → (x ≡ 2) ∨ ( x ≡ 3 ) } + +eq2∋3 : eqa2 ∋ 3 +eq2∋3 = case2 refl + +record _==_ ( a b : NSet ) : Set where + field + eq→ : ∀ { x : ℕ } → def a x → def b x + eq← : ∀ { x : ℕ } → def b x → def a x + +_⊆_ : (a b : NSet ) → Set +_⊆_ a b = ∀ {x : ℕ} → def a x → def b x + +eq2⊆eq1 : eqa2 ⊆ eqa1 +eq2⊆eq1 {2} (case1 refl) = refl +eq2⊆eq1 {3} (case2 refl) = refl + +-- the other way is slightly difficut + +data ⊥ : Set where + +⊥-elim : {A : Set } → ⊥ → A +⊥-elim () + +¬_ : Set → Set +¬ A = A → ⊥ + +n∅ : NSet +n∅ = record { def = λ y → y < 0 } + +¬n∅∋x : {x : ℕ } → ¬ ( n∅ ∋ x ) +¬n∅∋x () + +¬n∅∋x' : {x : ℕ } → ¬ ( n∅ ∋ x ) +¬n∅∋x' {x} nx = ⊥-elim ( n1 nx ) where + n1 : x < 0 → ⊥ + n1 () + +-- +-- Set of subset of ℕ +-- + +record NSetSet : Set (suc zero) where + field + ndef : NSet → Set + +open NSetSet + +record _=n=_ ( a b : NSetSet ) : Set (suc zero) where + field + eq→ : ∀ { x : NSet } → ndef a x → ndef b x + eq← : ∀ { x : NSet } → ndef b x → ndef a x + +eqa3 : NSetSet +eqa3 = record { ndef = λ x → x == eqa2 } + +-- +-- Can we defined hierarchy of Set in monothic and consitent way? +-- equations on Ordinal is an solution (Ordinal Definable Set) +-- but we need some axioms to achive ZF Set Theory +-- + + + + diff -r 55ab5de1ae02 -r 40345abc0949 src/OD.agda --- a/src/OD.agda Fri Dec 23 12:54:05 2022 +0900 +++ b/src/OD.agda Sat Dec 24 11:39:30 2022 +0900 @@ -99,9 +99,9 @@ *iso : {x : HOD } → * ( & x ) ≡ x &iso : {x : Ordinal } → & ( * x ) ≡ x ==→o≡ : {x y : HOD } → (od x == od y) → x ≡ y - sup-o : (A : HOD) → ( ( x : Ordinal ) → def (od A) x → Ordinal ) → Ordinal + sup-o : (A : HOD) → ( ( x : Ordinal ) → def (od A) x → Ordinal ) → Ordinal -- required in Replace sup-o≤ : (A : HOD) → { ψ : ( x : Ordinal ) → def (od A) x → Ordinal } → ∀ {x : Ordinal } → (lt : def (od A) x ) → ψ x lt o≤ sup-o A ψ --- possible order restriction +-- possible order restriction (required in the axiom of infinite ) ho< : {x : HOD} → & x o< next (odmax x) @@ -402,12 +402,7 @@ -- This means that many of OD may not be HODs because of the & mapping divergence. -- We should have some axioms to prevent this such as & x o< next (odmax x). -- --- postulate --- ωmax : Ordinal --- <ωmax : {y : Ordinal} → infinite-d y → y o< ωmax --- --- infinite : HOD --- infinite = record { od = record { def = λ x → infinite-d x } ; odmax = ωmax ; sx ¬a ¬b b z48 b ( @@ -398,6 +403,9 @@ ... | tri> ¬a ¬b sb ( IsMinSUP.minsup (is-minsup a≤z) asupf (λ {z} uza → IsMinSUP.x≤sup (is-minsup b≤z) (subst (λ k → odef k z) ua=ub uza)) ) sb ¬a ¬b s