# HG changeset patch # User Shinji KONO # Date 1657633840 -32400 # Node ID 0278f0d151f28798a6692ce368803c687e1edbb3 # Parent 3837fa940cd9d138599af66a15f5292f6b3e1133 one pass diff -r 3837fa940cd9 -r 0278f0d151f2 src/zorn.agda --- a/src/zorn.agda Tue Jul 12 15:29:41 2022 +0900 +++ b/src/zorn.agda Tue Jul 12 22:50:40 2022 +0900 @@ -278,16 +278,12 @@ UnionCF A f mf ay supf x = record { od = record { def = λ z → odef A z ∧ UChain A f mf ay supf x z } ; odmax = & A ; ¬a ¬b c = ⊥-elim (¬x<0 c ) - ... | tri≈ ¬a b ¬c = record { supf = λ _ → y } - ... | tri< 0 ¬a ¬b c = x - ... | case2 ¬x=sup = no-ext - ... | no ¬ox = sc4 where - pzc : (z : Ordinal) → z o< x → ZChain1 A f mf ay z - pzc z z ¬a ¬b c = o∅ - UZ : HOD - UZ = UnionCF A f mf ay psupf x - total-UZ : IsTotalOrderSet UZ - total-UZ {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where - uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) - uz01 = chain-total A f mf ay psupf (UChain.chain∋z (proj2 ca)) (UChain.chain∋z (proj2 cb)) - usup : SUP A UZ - usup = supP UZ (λ lt → proj1 lt) total-UZ - spu = & (SUP.sup usup) - sc4 : ZChain1 A f mf ay x - sc4 = record { supf = psup1 } where - psup1 : Ordinal → Ordinal - psup1 z with trio< z x - ... | tri< a ¬b ¬c = ZChain1.supf (pzc z a) z - ... | tri≈ ¬a b ¬c = spu - ... | tri> ¬a ¬b c = spu - ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) - → (zc0 : (x : Ordinal) → ZChain1 A f mf ay x) - → ((z : Ordinal) → z o< x → ZChain A f mf ay zc0 z) → ZChain A f mf ay zc0 x - ind f mf {y} ay x zc0 prev with trio< o∅ x - ... | tri> ¬a ¬b c = ⊥-elim (¬x<0 c ) - ... | tri≈ ¬a refl ¬c = record { initial = initial1 } where - initial1 : {z : Ordinal} → odef (UnionCF A f mf ay (ZChain1.supf (zc0 (& A))) (& A)) z → * y ≤ * z - initial1 {z} uz = ? where - zc01 : odef A z ∧ UChain A f mf ay (ZChain1.supf (zc0 (& A))) (& A) z - zc01 = uz + → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x + ind f mf {y} ay x prev with trio< y x + ... | tri> ¬a ¬b c = ? + ... | tri≈ ¬a refl ¬c = ? ... | tri< 0 ¬a ¬b c = x pchain⊆A : {y : Ordinal} → odef pchain y → odef A y pchain⊆A {y} ny = proj1 ny pnext : {a : Ordinal} → odef pchain a → odef pchain (f a) - pnext {a} ⟪ aa , ua ⟫ = ⟪ afa , record { u = UChain.u ua ; u ¬a ¬b c = o∅ UZ : HOD - UZ = UnionCF A f mf ay (ZChain1.supf (zc0 (& A))) x - zc5 : ZChain A f mf ay zc0 x + UZ = UnionCF A f mf ay psupf0 x + total-UZ : IsTotalOrderSet UZ + total-UZ {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where + uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) + uz01 = chain-total A f mf ay psupf0 (UChain.chain∋z (proj2 ca)) (UChain.chain∋z (proj2 cb)) + usup : SUP A UZ + usup = supP UZ (λ lt → proj1 lt) total-UZ + spu = & (SUP.sup usup) + psupf : Ordinal → Ordinal + psupf z with trio< z x + ... | tri< a ¬b ¬c = ZChain.supf (pzc z a) z + ... | tri≈ ¬a b ¬c = spu + ... | tri> ¬a ¬b c = spu + zc5 : ZChain A f mf ay x zc5 with ODC.∋-p O A (* x) ... | no noax = {!!} where -- ¬ A ∋ p, just skip ... | yes ax with ODC.p∨¬p O ( HasPrev A UZ ax f ) - -- we have to check adding x preserve is-max ZChain A y f mf zc0 x + -- we have to check adding x preserve is-max ZChain A y f mf x ... | case1 pr = {!!} where -- we have previous A ∋ z < x , f z ≡ x, so chain ∋ f z ≡ x because of f-next ... | case2 ¬fy