# HG changeset patch # User Shinji KONO # Date 1651215131 -32400 # Node ID 726b6dac5eaafa6143244902978d65204648e227 # Parent 0687736285ce9c0953eaf97fce3e49850e180ad8 ... diff -r 0687736285ce -r 726b6dac5eaa src/zorn.agda --- a/src/zorn.agda Fri Apr 29 14:49:25 2022 +0900 +++ b/src/zorn.agda Fri Apr 29 15:52:11 2022 +0900 @@ -15,6 +15,10 @@ open import Data.Empty import BAlgbra +open import Data.Nat hiding ( _<_ ; _≤_ ) +open import Data.Nat.Properties +open import nat + open inOrdinal O open OD O @@ -74,39 +78,54 @@ data FClosure (A : HOD) (f : Ordinal → Ordinal ) (s : Ordinal) : Ordinal → Set n where init : odef A s → FClosure A f s s - fsuc : {x : Ordinal} ( p : FClosure A f s x ) → FClosure A f s (f x) - -open import Data.Nat hiding ( _<_ ; _≤_ ) -open import Data.Nat.Properties -open import nat - -fcn : {A : HOD} {s x : Ordinal} {f : Ordinal → Ordinal} → FClosure A f s x → ℕ -fcn (init as) = zero -fcn (fsuc p) = suc ( fcn p ) - -fcn-inject : {A : HOD} {s x y : Ordinal } (f : Ordinal → Ordinal) → (fcx : FClosure A f s x) → (fcy : FClosure A f s y ) → fcn fcx ≡ fcn fcy → x ≡ y -fcn-inject f (init x) (init x₁) refl = refl -fcn-inject f (fsuc fcx) (fsuc fcy) eq = cong f ( fcn-inject f fcx fcy ( cong pred eq )) + fsuc : (x : Ordinal) ( p : FClosure A f s x ) → FClosure A f s (f x) A∋fc : {A : HOD} {s y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) → (fcy : FClosure A f s y ) → odef A y A∋fc {A} {s} {.s} f mf (init as) = as -A∋fc {A} {s} f mf (fsuc {y} fcy) = proj2 (mf y ( A∋fc {A} {s} f mf fcy ) ) +A∋fc {A} {s} f mf (fsuc y fcy) = proj2 (mf y ( A∋fc {A} {s} f mf fcy ) ) + +fcn : {A : HOD} {s x : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) → FClosure A f s x → ℕ +fcn mf (init as) = zero +fcn {A} {s} {x} {f} mf (fsuc y p) with mf y (A∋fc f mf p) +... | ⟪ case1 eq , _ ⟫ = fcn mf p +... | ⟪ case2 y ¬a ¬b c = {!!}