comparison src/zorn.agda @ 891:9fb948dac666

u < supf z
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 05 Oct 2022 13:13:35 +0900
parents 3eaf3b8b1009
children f331c8be2425
comparison
equal deleted inserted replaced
890:3eaf3b8b1009 891:9fb948dac666
393 → IsSup A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) b f) → supf b ≡ b 393 → IsSup A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) b f) → supf b ≡ b
394 394
395 asupf : {x : Ordinal } → odef A (supf x) 395 asupf : {x : Ordinal } → odef A (supf x)
396 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y 396 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y
397 supf-< : {x y : Ordinal } → supf x o< supf y → supf x << supf y 397 supf-< : {x y : Ordinal } → supf x o< supf y → supf x << supf y
398 x≤supfx : {x : Ordinal } → x o≤ supf z → x o≤ supf x 398 x≤supfx : {x : Ordinal } → x o≤ z → x o≤ supf x
399 supfmax : {x : Ordinal } → z o< x → supf x ≡ supf z
399 400
400 minsup : {x : Ordinal } → x o≤ z → MinSUP A (UnionCF A f mf ay supf x) 401 minsup : {x : Ordinal } → x o≤ z → MinSUP A (UnionCF A f mf ay supf x)
401 supf-is-sup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ & (SUP.sup (M→S supf (minsup x≤z) )) 402 supf-is-minsup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ MinSUP.sup ( minsup x≤z )
402 csupf : {b : Ordinal } → supf b o< z → odef (UnionCF A f mf ay supf z) (supf b) -- supf z is not an element of this chain 403 csupf : {b : Ordinal } → supf b o< z → odef (UnionCF A f mf ay supf z) (supf b) -- supf z is not an element of this chain
403 404
404 chain : HOD 405 chain : HOD
405 chain = UnionCF A f mf ay supf z 406 chain = UnionCF A f mf ay supf z
406 chain⊆A : chain ⊆' A 407 chain⊆A : chain ⊆' A
407 chain⊆A = λ lt → proj1 lt 408 chain⊆A = λ lt → proj1 lt
408 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) 409 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x)
409 sup {x} x≤z = M→S supf (minsup x≤z) 410 sup {x} x≤z = M→S supf (minsup x≤z)
410 supf-is-minsup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ MinSUP.sup ( minsup x≤z ) 411 -- supf-sup<minsup : {x : Ordinal } → (x≤z : x o≤ z) → & (SUP.sup (M→S supf (minsup x≤z) )) o≤ supf x ... supf-mono
411 supf-is-minsup {x} x≤z = trans (supf-is-sup x≤z) &iso
412 412
413 chain∋init : odef chain y 413 chain∋init : odef chain y
414 chain∋init = ⟪ ay , ch-init (init ay refl) ⟫ 414 chain∋init = ⟪ ay , ch-init (init ay refl) ⟫
415 f-next : {a : Ordinal} → odef chain a → odef chain (f a) 415 f-next : {a : Ordinal} → odef chain a → odef chain (f a)
416 f-next {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫ 416 f-next {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫
440 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) 440 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) )
441 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) 441 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy )
442 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) 442 ... | case2 lt = ⊥-elim ( o<> sx<sy lt )
443 443
444 supf∈A : {b : Ordinal} → b o≤ z → odef A (supf b) 444 supf∈A : {b : Ordinal} → b o≤ z → odef A (supf b)
445 supf∈A {b} b≤z = subst (λ k → odef A k ) (sym (supf-is-sup b≤z)) ( SUP.as ( sup b≤z ) ) 445 supf∈A {b} b≤z = subst (λ k → odef A k ) (sym (supf-is-minsup b≤z)) ( MinSUP.asm ( minsup b≤z ) )
446 446
447 -- supf-idem : {x : Ordinal } → supf x o≤ z → supf (supf x) ≡ supf x 447 -- supf-idem : {x : Ordinal } → supf x o≤ z → supf (supf x) ≡ supf x
448 -- supf-idem {x} sx≤z = sup=u (supf∈A ?) sx≤z ? 448 -- supf-idem {x} sx≤z = sup=u (supf∈A ?) sx≤z ?
449 449
450 fcy<sup : {u w : Ordinal } → u o≤ z → FClosure A f y w → (w ≡ supf u ) ∨ ( w << supf u ) -- different from order because y o< supf 450 fcy<sup : {u w : Ordinal } → u o≤ z → FClosure A f y w → (w ≡ supf u ) ∨ ( w << supf u ) -- different from order because y o< supf
451 fcy<sup {u} {w} u≤z fc with SUP.x<sup (sup u≤z) ⟪ subst (λ k → odef A k ) (sym &iso) (A∋fc {A} y f mf fc) 451 fcy<sup {u} {w} u≤z fc with MinSUP.x<sup (minsup u≤z) ⟪ subst (λ k → odef A k ) (sym &iso) (A∋fc {A} y f mf fc)
452 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫ 452 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫
453 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans (cong (&) eq) (sym (supf-is-sup u≤z ) ) )) 453 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans ? (sym (supf-is-minsup u≤z ) ) ))
454 ... | case2 lt = case2 (subst (λ k → * w < k ) (subst (λ k → k ≡ _ ) *iso (cong (*) (sym (supf-is-sup u≤z ))) ) lt ) 454 ... | case2 lt = case2 ? -- (subst (λ k → * w < k ) ? )-- (subst (λ k → k ≡ _ ) *iso (cong (*) (sym (supf-is-minsup u≤z ))) ) lt )
455 455
456 -- ordering is not proved here but in ZChain1 456 -- ordering is not proved here but in ZChain1
457 457
458 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) 458 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f)
459 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where 459 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where
460 supf = ZChain.supf zc 460 supf = ZChain.supf zc
461 field 461 field
462 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay supf z) a ) → b o< supf z → (ab : odef A b) 462 is-max : {a b : Ordinal } → (ca : odef (UnionCF A f mf ay supf z) a ) → b o< z → (ab : odef A b)
463 → HasPrev A (UnionCF A f mf ay supf z) b f ∨ IsSup A (UnionCF A f mf ay supf z) ab 463 → HasPrev A (UnionCF A f mf ay supf z) b f ∨ IsSup A (UnionCF A f mf ay supf z) ab
464 → * a < * b → odef ((UnionCF A f mf ay supf z)) b 464 → * a < * b → odef ((UnionCF A f mf ay supf z)) b
465 465
466 record Maximal ( A : HOD ) : Set (Level.suc n) where 466 record Maximal ( A : HOD ) : Set (Level.suc n) where
467 field 467 field
597 SZ1 f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where 597 SZ1 f mf {y} ay zc x = TransFinite { λ x → ZChain1 A f mf ay zc x } zc1 x where
598 chain-mono1 : {a b c : Ordinal} → (ZChain.supf zc a) o≤ (ZChain.supf zc b) 598 chain-mono1 : {a b c : Ordinal} → (ZChain.supf zc a) o≤ (ZChain.supf zc b)
599 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c 599 → odef (UnionCF A f mf ay (ZChain.supf zc) a) c → odef (UnionCF A f mf ay (ZChain.supf zc) b) c
600 chain-mono1 {a} {b} {c} a≤b = chain-mono f mf ay (ZChain.supf zc) a≤b 600 chain-mono1 {a} {b} {c} a≤b = chain-mono f mf ay (ZChain.supf zc) a≤b
601 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → 601 is-max-hp : (x : Ordinal) {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a →
602 b o< ZChain.supf zc x → (ab : odef A b) → 602 b o< x → (ab : odef A b) →
603 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) b f → 603 HasPrev A (UnionCF A f mf ay (ZChain.supf zc) x) b f →
604 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b 604 * a < * b → odef (UnionCF A f mf ay (ZChain.supf zc) x) b
605 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev 605 is-max-hp x {a} {b} ua b<x ab has-prev a<b with HasPrev.ay has-prev
606 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫ 606 ... | ⟪ ab0 , ch-init fc ⟫ = ⟪ ab , ch-init ( subst (λ k → FClosure A f y k) (sym (HasPrev.x=fy has-prev)) (fsuc _ fc )) ⟫
607 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab , 607 ... | ⟪ ab0 , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ ab ,
639 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (csupf-fc b<z ss≤sb fc ) 639 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (csupf-fc b<z ss≤sb fc )
640 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ 640 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫
641 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ 641 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫
642 order : {b s z1 : Ordinal} → b o< & A → supf s o< supf b → FClosure A f (supf s) z1 → (z1 ≡ supf b) ∨ (z1 << supf b) 642 order : {b s z1 : Ordinal} → b o< & A → supf s o< supf b → FClosure A f (supf s) z1 → (z1 ≡ supf b) ∨ (z1 << supf b)
643 order {b} {s} {z1} b<z ss<sb fc = zc04 where 643 order {b} {s} {z1} b<z ss<sb fc = zc04 where
644 zc00 : ( * z1 ≡ SUP.sup (ZChain.sup zc (o<→≤ b<z) )) ∨ ( * z1 < SUP.sup ( ZChain.sup zc (o<→≤ b<z) ) ) 644 zc00 : ( z1 ≡ MinSUP.sup (ZChain.minsup zc (o<→≤ b<z) )) ∨ ( z1 << MinSUP.sup ( ZChain.minsup zc (o<→≤ b<z) ) )
645 zc00 = SUP.x<sup (ZChain.sup zc (o<→≤ b<z) ) (csupf-fc (o<→≤ b<z) ss<sb fc ) 645 zc00 = MinSUP.x<sup (ZChain.minsup zc (o<→≤ b<z) ) ? -- (csupf-fc (o<→≤ b<z) ss<sb fc )
646 -- supf (supf b) ≡ supf b 646 -- supf (supf b) ≡ supf b
647 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) 647 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b)
648 zc04 with zc00 648 zc04 with zc00
649 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso (sym (ZChain.supf-is-sup zc (o<→≤ b<z)) ) (cong (&) eq) ) 649 ... | case1 eq = ? -- case1 (subst₂ (λ j k → j ≡ k ) &iso (sym (ZChain.supf-is-minsup zc (o<→≤ b<z)) ) (cong (&) eq) )
650 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) refl (subst₂ (λ j k → j ≡ k ) *iso refl (cong (*) (sym (ZChain.supf-is-sup zc (o<→≤ b<z) ) ))) lt ) 650 ... | case2 lt = ? -- case2 (subst₂ (λ j k → j < k ) refl (subst₂ (λ j k → j ≡ k ) *iso refl (cong (*) (sym (ZChain.supf-is-minsup zc (o<→≤ b<z) ) ))) lt )
651 651
652 zc1 : (x : Ordinal) → ((y₁ : Ordinal) → y₁ o< x → ZChain1 A f mf ay zc y₁) → ZChain1 A f mf ay zc x 652 zc1 : (x : Ordinal) → ((y₁ : Ordinal) → y₁ o< x → ZChain1 A f mf ay zc y₁) → ZChain1 A f mf ay zc x
653 zc1 x prev with Oprev-p x 653 zc1 x prev with Oprev-p x
654 ... | yes op = record { is-max = is-max } where 654 ... | yes op = record { is-max = is-max } where
655 px = Oprev.oprev op 655 px = Oprev.oprev op
656 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px 656 zc-b<x : {b : Ordinal } → b o< x → b o< osuc px
657 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt 657 zc-b<x {b} lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt
658 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a → 658 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay (ZChain.supf zc) x) a →
659 b o< ZChain.supf zc x → (ab : odef A b) → 659 b o< x → (ab : odef A b) →
660 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → 660 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab →
661 * a < * b → odef (UnionCF A f mf ay supf x) b 661 * a < * b → odef (UnionCF A f mf ay supf x) b
662 is-max {a} {b} ua b<x ab P a<b with ODC.or-exclude O P 662 is-max {a} {b} ua b<x ab P a<b with ODC.or-exclude O P
663 is-max {a} {b} ua b<x ab P a<b | case1 has-prev = is-max-hp x {a} {b} ua b<x ab has-prev a<b 663 is-max {a} {b} ua b<x ab P a<b | case1 has-prev = is-max-hp x {a} {b} ua b<x ab has-prev a<b
664 is-max {a} {b} ua b<x ab P a<b | case2 is-sup 664 is-max {a} {b} ua b<x ab P a<b | case2 is-sup
665 = ⟪ ab , ch-is-sup b b<x m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where 665 = ⟪ ab , ch-is-sup b ? m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where
666 b<A : b o< & A 666 b<A : b o< & A
667 b<A = z09 ab 667 b<A = z09 ab
668 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f 668 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) b f
669 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = chain-mono1 ? (HasPrev.ay nhp) 669 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = chain-mono1 ? (HasPrev.ay nhp)
670 ; x=fy = HasPrev.x=fy nhp } ) 670 ; x=fy = HasPrev.x=fy nhp } )
678 m09 {s} {z} s<b fcz = order b<A s<b fcz 678 m09 {s} {z} s<b fcz = order b<A s<b fcz
679 m06 : ChainP A f mf ay supf b 679 m06 : ChainP A f mf ay supf b
680 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 } 680 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 }
681 ... | no lim = record { is-max = is-max } where 681 ... | no lim = record { is-max = is-max } where
682 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → 682 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a →
683 b o< ZChain.supf zc x → (ab : odef A b) → 683 b o< x → (ab : odef A b) →
684 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab → 684 HasPrev A (UnionCF A f mf ay supf x) b f ∨ IsSup A (UnionCF A f mf ay supf x) ab →
685 * a < * b → odef (UnionCF A f mf ay supf x) b 685 * a < * b → odef (UnionCF A f mf ay supf x) b
686 is-max {a} {b} ua b<x ab P a<b with ODC.or-exclude O P 686 is-max {a} {b} ua b<x ab P a<b with ODC.or-exclude O P
687 is-max {a} {b} ua b<x ab P a<b | case1 has-prev = is-max-hp x {a} {b} ua b<x ab has-prev a<b 687 is-max {a} {b} ua b<x ab P a<b | case1 has-prev = is-max-hp x {a} {b} ua b<x ab has-prev a<b
688 is-max {a} {b} ua b<x ab P a<b | case2 is-sup with IsSup.x<sup (proj2 is-sup) (init-uchain A f mf ay ) 688 is-max {a} {b} ua b<x ab P a<b | case2 is-sup with IsSup.x<sup (proj2 is-sup) (init-uchain A f mf ay )
689 ... | case1 b=y = ⟪ subst (λ k → odef A k ) b=y ay , ch-init (subst (λ k → FClosure A f y k ) b=y (init ay refl )) ⟫ 689 ... | case1 b=y = ⟪ subst (λ k → odef A k ) b=y ay , ch-init (subst (λ k → FClosure A f y k ) b=y (init ay refl )) ⟫
690 ... | case2 y<b = chain-mono1 ? 690 ... | case2 y<b = ⟪ ab , ch-is-sup b m10 m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where
691 ⟪ ab , ch-is-sup b ? m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where
692 m09 : b o< & A 691 m09 : b o< & A
693 m09 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) 692 m09 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab))
693 m10 : b o< ZChain.supf zc x
694 m10 = ordtrans<-≤ b<x ( ZChain.x≤supfx zc ? )
694 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b 695 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b
695 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc 696 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc
696 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b 697 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b
697 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b 698 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b
698 m08 {s} {z1} s<b fc = order m09 s<b fc 699 m08 {s} {z1} s<b fc = order m09 s<b fc
711 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) ) 712 fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A f mf as0 (& A) )
712 → f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc )) 713 → f (& (SUP.sup (sp0 f mf as0 zc ))) ≡ & (SUP.sup (sp0 f mf as0 zc ))
713 fixpoint f mf zc = z14 where 714 fixpoint f mf zc = z14 where
714 chain = ZChain.chain zc 715 chain = ZChain.chain zc
715 sp1 = sp0 f mf as0 zc 716 sp1 = sp0 f mf as0 zc
716 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< ZChain.supf zc (& A) → (ab : odef A b ) 717 z10 : {a b : Ordinal } → (ca : odef chain a ) → b o< & A → (ab : odef A b )
717 → HasPrev A chain b f ∨ IsSup A chain {b} ab -- (supO chain (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b ) 718 → HasPrev A chain b f ∨ IsSup A chain {b} ab -- (supO chain (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b )
718 → * a < * b → odef chain b 719 → * a < * b → odef chain b
719 z10 = ZChain1.is-max (SZ1 f mf as0 zc (& A) ) 720 z10 = ZChain1.is-max (SZ1 f mf as0 zc (& A) )
721 z21 : & (SUP.sup sp1) o< & A
722 z21 = c<→o< ( SUP.as sp1)
723 -- ZChain.supf zc (& A) o≤ & (SUP.sup sp1) ( minimality )
720 z11 : & (SUP.sup sp1) o< ZChain.supf zc (& A) 724 z11 : & (SUP.sup sp1) o< ZChain.supf zc (& A)
721 z11 = ? -- c<→o< ( SUP.as sp1) 725 z11 = ? -- c<→o< ( SUP.as sp1)
722 z12 : odef chain (& (SUP.sup sp1)) 726 z12 : odef chain (& (SUP.sup sp1))
723 z12 with o≡? (& s) (& (SUP.sup sp1)) 727 z12 with o≡? (& s) (& (SUP.sup sp1))
724 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc ) 728 ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋init zc )
725 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z11 (SUP.as sp1) 729 ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋init zc ) z21 (SUP.as sp1)
726 (case2 z19 ) z13 where 730 (case2 z19 ) z13 where
727 z13 : * (& s) < * (& (SUP.sup sp1)) 731 z13 : * (& s) < * (& (SUP.sup sp1))
728 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc ) 732 z13 with SUP.x<sup sp1 ( ZChain.chain∋init zc )
729 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) ) 733 ... | case1 eq = ⊥-elim ( ne (cong (&) eq) )
730 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt 734 ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt
852 zc01 {z} (case1 lt) = proj1 lt 856 zc01 {z} (case1 lt) = proj1 lt
853 zc01 {z} (case2 fc) = ( A∋fc px f mf fc ) 857 zc01 {z} (case2 fc) = ( A∋fc px f mf fc )
854 858
855 zc02 : { a b : Ordinal } → odef A a ∧ UChain A f mf ay supf0 (supf0 px) a → FClosure A f px b → a <= b 859 zc02 : { a b : Ordinal } → odef A a ∧ UChain A f mf ay supf0 (supf0 px) a → FClosure A f px b → a <= b
856 zc02 {a} {b} ca fb = zc05 fb where 860 zc02 {a} {b} ca fb = zc05 fb where
857 zc06 : & (SUP.sup (ZChain.sup zc o≤-refl)) ≡ px 861 zc06 : MinSUP.sup (ZChain.minsup zc o≤-refl) ≡ px
858 zc06 = trans (sym ( ZChain.supf-is-sup zc o≤-refl )) (sym sfpx=px) 862 zc06 = trans (sym ( ZChain.supf-is-minsup zc o≤-refl )) (sym sfpx=px)
859 zc05 : {b : Ordinal } → FClosure A f px b → a <= b 863 zc05 : {b : Ordinal } → FClosure A f px b → a <= b
860 zc05 (fsuc b1 fb ) with proj1 ( mf b1 (A∋fc px f mf fb )) 864 zc05 (fsuc b1 fb ) with proj1 ( mf b1 (A∋fc px f mf fb ))
861 ... | case1 eq = subst (λ k → a <= k ) (subst₂ (λ j k → j ≡ k) &iso &iso (cong (&) eq)) (zc05 fb) 865 ... | case1 eq = subst (λ k → a <= k ) (subst₂ (λ j k → j ≡ k) &iso &iso (cong (&) eq)) (zc05 fb)
862 ... | case2 lt = <-ftrans (zc05 fb) (case2 lt) 866 ... | case2 lt = <-ftrans (zc05 fb) (case2 lt)
863 zc05 (init b1 refl) with SUP.x<sup (ZChain.sup zc o≤-refl) 867 zc05 (init b1 refl) with MinSUP.x<sup (ZChain.minsup zc o≤-refl)
864 ? -- (subst (λ k → odef A k ∧ UChain A f mf ay supf0 ? k) (sym &iso) ca ) 868 ? -- (subst (λ k → odef A k ∧ UChain A f mf ay supf0 ? k) (sym &iso) ca )
865 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso zc06 (cong (&) eq)) 869 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso zc06 ? )-- (cong (&) eq))
866 ... | case2 lt = case2 (subst (λ k → (* a) < k ) (trans (sym *iso) (cong (*) zc06)) lt) 870 ... | case2 lt = case2 (subst (λ k → (* a) < k ) ? ? ) -- (trans (sym *iso) (cong (*) zc06)) lt)
867 871
868 ptotal : IsTotalOrderSet pchainpx 872 ptotal : IsTotalOrderSet pchainpx
869 ptotal (case1 a) (case1 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso 873 ptotal (case1 a) (case1 b) = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso
870 (chain-total A f mf ay supf0 (proj2 a) (proj2 b)) 874 (chain-total A f mf ay supf0 (proj2 a) (proj2 b))
871 ptotal {a0} {b0} (case1 a) (case2 b) with zc02 a b 875 ptotal {a0} {b0} (case1 a) (case2 b) with zc02 a b
1081 -- (sf1=sf0 ?) (trans ? sfpx=px ) ss<spx 1085 -- (sf1=sf0 ?) (trans ? sfpx=px ) ss<spx
1082 csupf17 : {z1 : Ordinal } → FClosure A f (supf0 s) z1 → odef (UnionCF A f mf ay supf0 px) z1 1086 csupf17 : {z1 : Ordinal } → FClosure A f (supf0 s) z1 → odef (UnionCF A f mf ay supf0 px) z1
1083 csupf17 (init as refl ) = ZChain.csupf zc sf<px 1087 csupf17 (init as refl ) = ZChain.csupf zc sf<px
1084 csupf17 (fsuc x fc) = ? -- ZChain.f-next zc ? -- (csupf17 fc) 1088 csupf17 (fsuc x fc) = ? -- ZChain.f-next zc ? -- (csupf17 fc)
1085 1089
1086 x≤supfx1 : {z : Ordinal} → z o≤ supf1 x → z o≤ supf1 z 1090 x≤supfx1 : {z : Ordinal} → z o≤ x → z o≤ supf1 z
1087 x≤supfx1 {z} z≤x with trio< z (supf1 z) -- supf1 x o< x → supf1 x o≤ supf1 px → x o< px ∨ supf1 x ≡ supf1 px 1091 x≤supfx1 {z} z≤x with trio< z (supf1 z) -- supf1 x o< x → supf1 x o≤ supf1 px → x o< px ∨ supf1 x ≡ supf1 px
1088 ... | tri< a ¬b ¬c = o<→≤ a 1092 ... | tri< a ¬b ¬c = o<→≤ a
1089 ... | tri≈ ¬a b ¬c = o≤-refl0 b 1093 ... | tri≈ ¬a b ¬c = o≤-refl0 b
1090 ... | tri> ¬a ¬b c with trio< z px 1094 ... | tri> ¬a ¬b c with trio< z px
1091 ... | tri< a ¬b ¬c = ZChain.x≤supfx zc ? 1095 ... | tri< a ¬b ¬c = ZChain.x≤supfx zc ?
1247 supf0 u1 ≡⟨ su=z ⟩ 1251 supf0 u1 ≡⟨ su=z ⟩
1248 z ∎ where open ≡-Reasoning 1252 z ∎ where open ≡-Reasoning
1249 zc13 : odef pchain z 1253 zc13 : odef pchain z
1250 zc13 = subst (λ k → odef pchain k) (trans (sym (HasPrev.x=fy hp)) zc14) ( ZChain.f-next zc (HasPrev.ay hp) ) 1254 zc13 = subst (λ k → odef pchain k) (trans (sym (HasPrev.x=fy hp)) zc14) ( ZChain.f-next zc (HasPrev.ay hp) )
1251 zc20 {.(f w)} (fsuc w fc) = ZChain.f-next zc (zc20 fc) 1255 zc20 {.(f w)} (fsuc w fc) = ZChain.f-next zc (zc20 fc)
1256
1252 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where 1257 record STMP {z : Ordinal} (z≤x : z o≤ x ) : Set (Level.suc n) where
1253 field 1258 field
1254 tsup : SUP A (UnionCF A f mf ay supf0 z) 1259 tsup : MinSUP A (UnionCF A f mf ay supf1 z)
1255 tsup=sup : supf0 z ≡ & (SUP.sup tsup ) 1260 tsup=sup : supf1 z ≡ MinSUP.sup tsup
1261
1256 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x 1262 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x
1257 sup {z} z≤x with trio< z px 1263 sup {z} z≤x with trio< z px
1258 ... | tri< a ¬b ¬c = record { tsup = ZChain.sup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-sup zc (o<→≤ a) } 1264 ... | tri< a ¬b ¬c = ? -- jrecord { tsup = ZChain.minsup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-minsup zc (o<→≤ a) }
1259 ... | tri≈ ¬a b ¬c = record { tsup = ZChain.sup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-sup zc (o≤-refl0 b) } 1265 ... | tri≈ ¬a b ¬c = ? -- record { tsup = ZChain.minsup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-minsup zc (o≤-refl0 b) }
1260 ... | tri> ¬a ¬b px<z = zc35 where 1266 ... | tri> ¬a ¬b px<z = zc35 where
1261 zc30 : z ≡ x 1267 zc30 : z ≡ x
1262 zc30 with osuc-≡< z≤x 1268 zc30 with osuc-≡< z≤x
1263 ... | case1 eq = eq 1269 ... | case1 eq = eq
1264 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) 1270 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ )
1266 zc34 : ¬ (supf0 px ≡ px) → {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32) 1272 zc34 : ¬ (supf0 px ≡ px) → {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32)
1267 zc34 ne {w} lt with zc11 ? ⟪ proj1 lt , ? ⟫ 1273 zc34 ne {w} lt with zc11 ? ⟪ proj1 lt , ? ⟫
1268 ... | case1 lt = SUP.x<sup zc32 lt 1274 ... | case1 lt = SUP.x<sup zc32 lt
1269 ... | case2 ⟪ spx=px , fc ⟫ = ⊥-elim ( ne spx=px ) 1275 ... | case2 ⟪ spx=px , fc ⟫ = ⊥-elim ( ne spx=px )
1270 zc33 : supf0 z ≡ & (SUP.sup zc32) 1276 zc33 : supf0 z ≡ & (SUP.sup zc32)
1271 zc33 = ? -- trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-sup zc o≤-refl ) 1277 zc33 = ? -- trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-minsup zc o≤-refl )
1272 zc36 : ¬ (supf0 px ≡ px) → STMP z≤x 1278 zc36 : ¬ (supf0 px ≡ px) → STMP z≤x
1273 zc36 ne = record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 ne } ; tsup=sup = zc33 } 1279 zc36 ne = ? -- record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 ne } ; tsup=sup = zc33 }
1274 zc35 : STMP z≤x 1280 zc35 : STMP z≤x
1275 zc35 with trio< (supf0 px) px 1281 zc35 with trio< (supf0 px) px
1276 ... | tri< a ¬b ¬c = zc36 ¬b 1282 ... | tri< a ¬b ¬c = zc36 ¬b
1277 ... | tri> ¬a ¬b c = zc36 ¬b 1283 ... | tri> ¬a ¬b c = zc36 ¬b
1278 ... | tri≈ ¬a b ¬c = record { tsup = zc37 ; tsup=sup = ? } where 1284 ... | tri≈ ¬a b ¬c = record { tsup = ? ; tsup=sup = ? } where
1279 zc37 : SUP A (UnionCF A f mf ay supf0 z) 1285 zc37 : MinSUP A (UnionCF A f mf ay supf0 z)
1280 zc37 = record { sup = ? ; as = ? ; x<sup = ? } 1286 zc37 = record { sup = ? ; asm = ? ; x<sup = ? }
1281 sup=u : {b : Ordinal} (ab : odef A b) → 1287 sup=u : {b : Ordinal} (ab : odef A b) →
1282 b o≤ x → IsSup A (UnionCF A f mf ay supf0 b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf0 b) b f ) → supf0 b ≡ b 1288 b o≤ x → IsSup A (UnionCF A f mf ay supf0 b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf0 b) b f ) → supf0 b ≡ b
1283 sup=u {b} ab b≤x is-sup with trio< b px 1289 sup=u {b} ab b≤x is-sup with trio< b px
1284 ... | tri< a ¬b ¬c = ZChain.sup=u zc ab (o<→≤ a) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫ 1290 ... | tri< a ¬b ¬c = ZChain.sup=u zc ab (o<→≤ a) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫
1285 ... | tri≈ ¬a b ¬c = ZChain.sup=u zc ab (o≤-refl0 b) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫ 1291 ... | tri≈ ¬a b ¬c = ZChain.sup=u zc ab (o≤-refl0 b) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫
1378 ... | tri≈ ¬a b ¬c = {!!} 1384 ... | tri≈ ¬a b ¬c = {!!}
1379 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) 1385 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x ))
1380 sis : {z : Ordinal} (x≤z : z o≤ x) → supf1 z ≡ & (SUP.sup (sup {!!})) 1386 sis : {z : Ordinal} (x≤z : z o≤ x) → supf1 z ≡ & (SUP.sup (sup {!!}))
1381 sis {z} z≤x with trio< z x 1387 sis {z} z≤x with trio< z x
1382 ... | tri< a ¬b ¬c = {!!} where 1388 ... | tri< a ¬b ¬c = {!!} where
1383 zc8 = ZChain.supf-is-sup (pzc z a) {!!} 1389 zc8 = ZChain.supf-is-minsup (pzc z a) {!!}
1384 ... | tri≈ ¬a b ¬c = {!!} 1390 ... | tri≈ ¬a b ¬c = {!!}
1385 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x )) 1391 ... | tri> ¬a ¬b x<z = ⊥-elim (o<¬≡ refl (ordtrans<-≤ x<z z≤x ))
1386 sup=u : {b : Ordinal} (ab : odef A b) → b o≤ x → IsSup A (UnionCF A f mf ay supf1 b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf1 b) b f ) → supf1 b ≡ b 1392 sup=u : {b : Ordinal} (ab : odef A b) → b o≤ x → IsSup A (UnionCF A f mf ay supf1 b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf1 b) b f ) → supf1 b ≡ b
1387 sup=u {z} ab z≤x is-sup with trio< z x 1393 sup=u {z} ab z≤x is-sup with trio< z x
1388 ... | tri< a ¬b ¬c = ? -- ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab {!!} record { x<sup = {!!} } 1394 ... | tri< a ¬b ¬c = ? -- ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab {!!} record { x<sup = {!!} }