Mercurial > hg > Members > Moririn
comparison hoareBinaryTree1.agda @ 766:bc9063c6fef3
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 06 May 2023 21:33:42 +0900 |
parents | 292aaf8e3b0f |
children | 9cdf272ca38c |
comparison
equal
deleted
inserted
replaced
765:292aaf8e3b0f | 766:bc9063c6fef3 |
---|---|
535 → RBtreeInvariant (node key₁ ⟪ Black , value₁ ⟫ t t₁) 1 | 535 → RBtreeInvariant (node key₁ ⟪ Black , value₁ ⟫ t t₁) 1 |
536 → RBtreeInvariant (node key₁ ⟪ Red , value ⟫ (node key ⟪ Black , value₁ ⟫ t t₁) leaf ) 1 | 536 → RBtreeInvariant (node key₁ ⟪ Red , value ⟫ (node key ⟪ Black , value₁ ⟫ t t₁) leaf ) 1 |
537 rb-left-black : {key key₁ : ℕ} → {value value₁ : A} → {t t₁ : bt (Color ∧ A)} → key < key₁ → {c : Color} | 537 rb-left-black : {key key₁ : ℕ} → {value value₁ : A} → {t t₁ : bt (Color ∧ A)} → key < key₁ → {c : Color} |
538 → RBtreeInvariant (node key₁ ⟪ c , value₁ ⟫ t t₁) 1 | 538 → RBtreeInvariant (node key₁ ⟪ c , value₁ ⟫ t t₁) 1 |
539 → RBtreeInvariant (node key₁ ⟪ Black , value ⟫ (node key ⟪ c , value₁ ⟫ t t₁) leaf) 1 | 539 → RBtreeInvariant (node key₁ ⟪ Black , value ⟫ (node key ⟪ c , value₁ ⟫ t t₁) leaf) 1 |
540 rb-node-red : {key key₁ key₂ : ℕ} → {value value₁ value₂ : A} → {t₁ t₂ t₃ t₄ : bt (Color ∧ A)} → key < key₁ → key₁ < key₂ → {d : ℕ} | 540 rb-node-red : {key key₁ key₂ : ℕ} → {value value₁ value₂ : A} → {t₁ t₂ t₃ t₄ : bt (Color ∧ A)} → key < key₁ → key₁ < key₂ → (d : ℕ) |
541 → RBtreeInvariant (node key ⟪ Black , value ⟫ t₁ t₂) d | 541 → RBtreeInvariant (node key ⟪ Black , value ⟫ t₁ t₂) d |
542 → RBtreeInvariant (node key₂ ⟪ Black , value₂ ⟫ t₃ t₄) d | 542 → RBtreeInvariant (node key₂ ⟪ Black , value₂ ⟫ t₃ t₄) d |
543 → RBtreeInvariant (node key₁ ⟪ Red , value₁ ⟫ (node key ⟪ Black , value ⟫ t₁ t₂) (node key₂ ⟪ Black , value₂ ⟫ t₃ t₄)) d | 543 → RBtreeInvariant (node key₁ ⟪ Red , value₁ ⟫ (node key ⟪ Black , value ⟫ t₁ t₂) (node key₂ ⟪ Black , value₂ ⟫ t₃ t₄)) d |
544 rb-node-black : {key key₁ key₂ : ℕ} → {value value₁ value₂ : A} → {t₁ t₂ t₃ t₄ : bt (Color ∧ A)} → key < key₁ → key₁ < key₂ → {d : ℕ} | 544 rb-node-black : {key key₁ key₂ : ℕ} → {value value₁ value₂ : A} → {t₁ t₂ t₃ t₄ : bt (Color ∧ A)} → key < key₁ → key₁ < key₂ → (d : ℕ) |
545 → {c c₁ : Color} | 545 → {c c₁ : Color} |
546 → RBtreeInvariant (node key ⟪ c , value ⟫ t₁ t₂) d | 546 → RBtreeInvariant (node key ⟪ c , value ⟫ t₁ t₂) d |
547 → RBtreeInvariant (node key₂ ⟪ c₁ , value₂ ⟫ t₃ t₄) d | 547 → RBtreeInvariant (node key₂ ⟪ c₁ , value₂ ⟫ t₃ t₄) d |
548 → RBtreeInvariant (node key₁ ⟪ Black , value₁ ⟫ (node key ⟪ c , value ⟫ t₁ t₂) (node key₂ ⟪ c₁ , value₂ ⟫ t₃ t₄)) (suc d) | 548 → RBtreeInvariant (node key₁ ⟪ Black , value₁ ⟫ (node key ⟪ c , value ⟫ t₁ t₂) (node key₂ ⟪ c₁ , value₂ ⟫ t₃ t₄)) (suc d) |
549 | 549 |
666 → (orig tree rot repl : bt (Color ∧ A)) {d0 : ℕ} | 666 → (orig tree rot repl : bt (Color ∧ A)) {d0 : ℕ} |
667 → RBtreeInvariant orig d0 | 667 → RBtreeInvariant orig d0 |
668 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant repl dr | 668 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant repl dr |
669 → (stack : List (bt (Color ∧ A))) → (si : stackInvariant key tree orig stack ) | 669 → (stack : List (bt (Color ∧ A))) → (si : stackInvariant key tree orig stack ) |
670 → rotatedTree tree rot | 670 → rotatedTree tree rot |
671 → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) repl | 671 → replacedRBTree key value (child-replaced key rot) repl |
672 → (next : {key2 d2 : ℕ} {c2 : Color} | 672 → (next : {key2 d2 : ℕ} {c2 : Color} |
673 → (to tr rot rr : bt (Color ∧ A)) | 673 → (to tr rot rr : bt (Color ∧ A)) |
674 → RBtreeInvariant orig d0 | 674 → RBtreeInvariant orig d0 |
675 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant rr dr | 675 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant rr dr |
676 → (stack1 : List (bt (Color ∧ A))) → stackInvariant key tr to stack1 | 676 → (stack1 : List (bt (Color ∧ A))) → stackInvariant key tr to stack1 |
677 → rotatedTree tr rot | 677 → rotatedTree tr rot |
678 → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) rr | 678 → replacedRBTree key value (child-replaced key rot) rr |
679 → length stack1 < length stack → t ) | 679 → length stack1 < length stack → t ) |
680 → (exit : {k1 d1 : ℕ} {c1 : Color} → (rot repl : bt (Color ∧ A) ) | 680 → (exit : {k1 d1 : ℕ} {c1 : Color} → (rot repl : bt (Color ∧ A) ) |
681 → {d : ℕ} → RBtreeInvariant repl d | 681 → {d : ℕ} → RBtreeInvariant repl d |
682 → (ri : rotatedTree orig rot ) → {c : Color} → replacedTree key ⟪ c , value ⟫ rot repl → t ) → t | 682 → (ri : rotatedTree orig rot ) → replacedRBTree key value rot repl → t ) → t |
683 rotateLeft {n} {m} {A} {t} key value orig tree rot repl rbo rbt rbr stack si ri rr next exit = rotateLeft1 where | 683 rotateLeft {n} {m} {A} {t} key value orig tree rot repl rbo rbt rbr stack si ri rr next exit = rotateLeft1 where |
684 rotateLeft1 : t | 684 rotateLeft1 : t |
685 rotateLeft1 with stackToPG tree orig stack si | 685 rotateLeft1 with stackToPG tree orig stack si |
686 ... | case1 x = exit {!!} {!!} {!!} {!!} rr | 686 ... | case1 x = exit {!!} {!!} {!!} {!!} rr |
687 ... | case2 (case1 x) = {!!} | 687 ... | case2 (case1 x) = {!!} |
692 → (orig tree rot repl : bt (Color ∧ A)) {d0 : ℕ} | 692 → (orig tree rot repl : bt (Color ∧ A)) {d0 : ℕ} |
693 → RBtreeInvariant orig d0 | 693 → RBtreeInvariant orig d0 |
694 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant repl dr | 694 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant repl dr |
695 → (stack : List (bt (Color ∧ A))) → (si : stackInvariant key tree orig stack ) | 695 → (stack : List (bt (Color ∧ A))) → (si : stackInvariant key tree orig stack ) |
696 → rotatedTree tree rot | 696 → rotatedTree tree rot |
697 → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) repl | 697 → replacedRBTree key value (child-replaced key rot) repl |
698 → (next : {key2 d2 : ℕ} {c2 : Color} | 698 → (next : {key2 d2 : ℕ} {c2 : Color} |
699 → (to tr rot rr : bt (Color ∧ A)) | 699 → (to tr rot rr : bt (Color ∧ A)) |
700 → RBtreeInvariant orig d0 | 700 → RBtreeInvariant orig d0 |
701 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant rr dr | 701 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant rr dr |
702 → (stack1 : List (bt (Color ∧ A))) → stackInvariant key tr to stack1 | 702 → (stack1 : List (bt (Color ∧ A))) → stackInvariant key tr to stack1 |
703 → rotatedTree tr rot | 703 → rotatedTree tr rot |
704 → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) rr | 704 → replacedRBTree key value (child-replaced key rot) rr |
705 → length stack1 < length stack → t ) | 705 → length stack1 < length stack → t ) |
706 → (exit : {k1 d1 : ℕ} {c1 : Color} → (rot repl : bt (Color ∧ A) ) | 706 → (exit : {k1 d1 : ℕ} {c1 : Color} → (rot repl : bt (Color ∧ A) ) |
707 → {d : ℕ} → RBtreeInvariant repl d | 707 → {d : ℕ} → RBtreeInvariant repl d |
708 → (ri : rotatedTree orig rot ) → {c : Color} → replacedTree key ⟪ c , value ⟫ rot repl → t ) → t | 708 → (ri : rotatedTree orig rot ) → replacedRBTree key value rot repl → t ) → t |
709 rotateRight {n} {m} {A} {t} key value orig tree rot repl rbo rbt rbr stack si ri rr next exit = rotateRight1 where | 709 rotateRight {n} {m} {A} {t} key value orig tree rot repl rbo rbt rbr stack si ri rr next exit = rotateRight1 where |
710 rotateRight1 : t | 710 rotateRight1 : t |
711 rotateRight1 with stackToPG tree orig stack si | 711 rotateRight1 with stackToPG tree orig stack si |
712 ... | case1 x = {!!} | 712 ... | case1 x = {!!} |
713 ... | case2 (case1 x) = {!!} | 713 ... | case2 (case1 x) = {!!} |
718 → (orig tree rot repl : bt (Color ∧ A)) {d0 : ℕ} | 718 → (orig tree rot repl : bt (Color ∧ A)) {d0 : ℕ} |
719 → RBtreeInvariant orig d0 | 719 → RBtreeInvariant orig d0 |
720 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant repl dr | 720 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant repl dr |
721 → (stack : List (bt (Color ∧ A))) → (si : stackInvariant key tree orig stack ) | 721 → (stack : List (bt (Color ∧ A))) → (si : stackInvariant key tree orig stack ) |
722 → rotatedTree tree rot | 722 → rotatedTree tree rot |
723 → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) repl | 723 → replacedRBTree key value (child-replaced key rot) repl |
724 → (next : {key2 d2 : ℕ} {c2 : Color} | 724 → (next : {key2 d2 : ℕ} {c2 : Color} |
725 → (to tr rot rr : bt (Color ∧ A)) | 725 → (to tr rot rr : bt (Color ∧ A)) |
726 → RBtreeInvariant orig d0 | 726 → RBtreeInvariant orig d0 |
727 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant rr dr | 727 → {d : ℕ} → RBtreeInvariant tree d → {dr : ℕ} → RBtreeInvariant rr dr |
728 → (stack1 : List (bt (Color ∧ A))) → stackInvariant key tr to stack1 | 728 → (stack1 : List (bt (Color ∧ A))) → stackInvariant key tr to stack1 |
729 → rotatedTree tr rot | 729 → rotatedTree tr rot |
730 → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) rr | 730 → replacedRBTree key value (child-replaced key rot) rr |
731 → length stack1 < length stack → t ) | 731 → length stack1 < length stack → t ) |
732 → (exit : {k1 d1 : ℕ} {c1 : Color} → (rot repl : bt (Color ∧ A) ) | 732 → (exit : {k1 d1 : ℕ} {c1 : Color} → (rot repl : bt (Color ∧ A) ) |
733 → {d : ℕ} → RBtreeInvariant repl d | 733 → {d : ℕ} → RBtreeInvariant repl d |
734 → (ri : rotatedTree orig rot ) → {c : Color} → replacedTree key ⟪ c , value ⟫ rot repl → t ) → t | 734 → (ri : rotatedTree orig rot ) → replacedRBTree key value rot repl → t ) → t |
735 insertCase5 {n} {m} {A} {t} key value orig tree rot repl rbo rbt rbr stack si ri rr next exit = insertCase51 where | 735 insertCase5 {n} {m} {A} {t} key value orig tree rot repl rbo rbt rbr stack si ri rr next exit = insertCase51 where |
736 insertCase51 : t | 736 insertCase51 : t |
737 insertCase51 with stackToPG tree orig stack si | 737 insertCase51 with stackToPG tree orig stack si |
738 ... | case1 eq = {!!} | 738 ... | case1 eq = {!!} |
739 ... | case2 (case1 eq ) = {!!} | 739 ... | case2 (case1 eq ) = {!!} |
754 → (to tr rot rr : bt (Color ∧ A)) | 754 → (to tr rot rr : bt (Color ∧ A)) |
755 → {d0 : ℕ} → RBtreeInvariant to d0 | 755 → {d0 : ℕ} → RBtreeInvariant to d0 |
756 → {d : ℕ} → RBtreeInvariant tr d → {dr : ℕ} → RBtreeInvariant rr dr | 756 → {d : ℕ} → RBtreeInvariant tr d → {dr : ℕ} → RBtreeInvariant rr dr |
757 → (stack : List (bt (Color ∧ A))) → stackInvariant key tr to stack | 757 → (stack : List (bt (Color ∧ A))) → stackInvariant key tr to stack |
758 → rotatedTree tr rot | 758 → rotatedTree tr rot |
759 → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) rr | 759 → replacedRBTree key value (child-replaced key rot) rr |
760 → (next : {key2 d2 : ℕ} {c2 : Color} | 760 → (next : {key2 d2 : ℕ} {c2 : Color} |
761 → (to tr rot rr : bt (Color ∧ A)) | 761 → (to tr rot rr : bt (Color ∧ A)) |
762 → RBtreeInvariant to d0 | 762 → RBtreeInvariant to d0 |
763 → {d : ℕ} → RBtreeInvariant tr d → {dr : ℕ} → RBtreeInvariant rr dr | 763 → {d : ℕ} → RBtreeInvariant tr d → {dr : ℕ} → RBtreeInvariant rr dr |
764 → (stack1 : List (bt (Color ∧ A))) → stackInvariant key tr to stack1 | 764 → (stack1 : List (bt (Color ∧ A))) → stackInvariant key tr to stack1 |
765 → rotatedTree tr rot | 765 → rotatedTree tr rot |
766 → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) rr | 766 → replacedRBTree key value (child-replaced key rot) rr |
767 → length stack1 < length stack → t ) | 767 → length stack1 < length stack → t ) |
768 → (exit : (rot repl : bt (Color ∧ A) ) | 768 → (exit : (rot repl : bt (Color ∧ A) ) |
769 → {d : ℕ} → RBtreeInvariant repl d | 769 → {d : ℕ} → RBtreeInvariant repl d |
770 → (ri : rotatedTree to rot ) → {c : Color} → replacedTree key ⟪ c , value ⟫ (child-replaced key rot) repl → t ) → t | 770 → (ri : rotatedTree to rot ) → replacedRBTree key value (child-replaced key rot) repl → t ) → t |
771 replaceRBP {n} {m} {A} {t} key value orig tree rot repl rbio rbit rbir stack si roti {c} ri next exit = ? where | 771 replaceRBP {n} {m} {A} {t} key value orig tree rot repl rbio rbit rbir stack si roti ri next exit = ? where |
772 insertCase2 : (tree parent uncle grand : bt (Color ∧ A)) | 772 insertCase2 : (tree parent uncle grand : bt (Color ∧ A)) |
773 → (stack : List (bt (Color ∧ A))) → (si : stackInvariant key tree orig stack ) | 773 → (stack : List (bt (Color ∧ A))) → (si : stackInvariant key tree orig stack ) |
774 → (pg : ParentGrand tree parent uncle grand ) → t | 774 → (pg : ParentGrand tree parent uncle grand ) → t |
775 insertCase2 tree leaf uncle grand stack si (s2-s1p2 () x₁) | 775 insertCase2 tree leaf uncle grand stack si (s2-s1p2 () x₁) |
776 insertCase2 tree leaf uncle grand stack si (s2-1sp2 () x₁) | 776 insertCase2 tree leaf uncle grand stack si (s2-1sp2 () x₁) |
808 insertCase12 : (to : bt (Color ∧ A)) → {d : ℕ} → RBtreeInvariant to d → to ≡ orig | 808 insertCase12 : (to : bt (Color ∧ A)) → {d : ℕ} → RBtreeInvariant to d → to ≡ orig |
809 → {stack : List (bt (Color ∧ A))} → (si : stackInvariant key tree to stack ) | 809 → {stack : List (bt (Color ∧ A))} → (si : stackInvariant key tree to stack ) |
810 → stack ≡ tree ∷ to ∷ [] → t | 810 → stack ≡ tree ∷ to ∷ [] → t |
811 insertCase12 (node k1 ⟪ Red , v1 ⟫ leaf (node k2 ⟪ Black , v2 ⟫ t1 t2)) (rb-right-red x₁ ro) eq (s-right x s-nil) refl = ? | 811 insertCase12 (node k1 ⟪ Red , v1 ⟫ leaf (node k2 ⟪ Black , v2 ⟫ t1 t2)) (rb-right-red x₁ ro) eq (s-right x s-nil) refl = ? |
812 insertCase12 (node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) leaf) (rb-left-red x₁ ro) eq (s-right x s-nil) refl = ? | 812 insertCase12 (node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) leaf) (rb-left-red x₁ ro) eq (s-right x s-nil) refl = ? |
813 insertCase12 (node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) (node k3 ⟪ Black , v3 ⟫ t3 t4)) (rb-node-red x₁ x₂ ro ro₁) refl (s-right x s-nil) refl = exit rot1 repl1 ? ins13 ins12 where | 813 insertCase12 (node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) (node k3 ⟪ Black , v3 ⟫ t3 t4)) (rb-node-red x₁ x₂ d ro ro₁) refl (s-right x s-nil) refl = exit rot1 repl1 rrb ins13 ins12 where |
814 rot1 : bt (Color ∧ A) | 814 rot1 : bt (Color ∧ A) |
815 rot1 = node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) (node k3 ⟪ Black , v3 ⟫ t3 t4) | 815 rot1 = node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) (node k3 ⟪ Black , v3 ⟫ t3 t4) |
816 repl1 : bt (Color ∧ A) | 816 repl1 : bt (Color ∧ A) |
817 repl1 = ? | 817 repl1 = node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) repl |
818 ins12 : replacedTree key ⟪ ? , value ⟫ (child-replaced key rot1) repl1 | 818 ins12 : replacedRBTree key value (child-replaced key rot1) repl1 |
819 ins12 = ? | 819 ins12 = ? |
820 ins13 : rotatedTree (node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) (node k3 ⟪ Black , v3 ⟫ t3 t4)) rot1 | 820 ins13 : rotatedTree (node k1 ⟪ Red , v1 ⟫ (node k2 ⟪ Black , v2 ⟫ t1 t2) (node k3 ⟪ Black , v3 ⟫ t3 t4)) rot1 |
821 ins13 = rr-node | 821 ins13 = rr-node |
822 rrb : RBtreeInvariant repl1 d | |
823 rrb with repl | rbir | |
824 ... | r1 | r2 = ? | |
825 -- -subst (λ k → RBtreeInvariant k d ) ? (rb-node-red ? ? d ro (subst₂ (λ j k → RBtreeInvariant j k) ? ? rbir )) | |
822 | 826 |
823 -- exit (node k1 ⟪ Red , v1 ⟫ t1 rot) (node k1 ⟪ Black , v1 ⟫ ? ?) (rb-node-black ? ? ? ?) | 827 -- exit (node k1 ⟪ Red , v1 ⟫ t1 rot) (node k1 ⟪ Black , v1 ⟫ ? ?) (rb-node-black ? ? ? ?) |
824 -- (subst₂ (λ j k → rotatedTree j k ) eq ? (rr-right ? rr-node rr-node roti)) | 828 -- (subst₂ (λ j k → rotatedTree j k ) eq ? (rr-right ? rr-node rr-node roti)) |
825 -- (subst (λ k → replacedTree key ⟪ ? , value ⟫ ? ?) ? (r-right ? ri)) | 829 -- (subst (λ k → replacedRBTree key value ? ?) ? (r-right ? ri)) |
826 -- k1 < key | 830 -- k1 < key |
827 -- ⟪ red , k1 ⟫ | 831 -- ⟪ red , k1 ⟫ |
828 -- t1 tree → rot → repl | 832 -- t1 tree → rot → repl |
829 insertCase12 (node k1 ⟪ Black , v1 ⟫ leaf leaf) (rb-single k1 v1) eq (s-right x s-nil) refl = ? | 833 insertCase12 (node k1 ⟪ Black , v1 ⟫ leaf leaf) (rb-single k1 v1) eq (s-right x s-nil) refl = ? |
830 insertCase12 (node k1 ⟪ Black , v1 ⟫ leaf (node _ ⟪ _ , _ ⟫ _ _)) (rb-right-black x₁ ro) eq (s-right x s-nil) refl = ? | 834 insertCase12 (node k1 ⟪ Black , v1 ⟫ leaf (node _ ⟪ _ , _ ⟫ _ _)) (rb-right-black x₁ ro) eq (s-right x s-nil) refl = ? |
831 insertCase12 (node k1 ⟪ Black , v1 ⟫ (node _ ⟪ _ , _ ⟫ _ _) leaf) (rb-left-black x₁ ro) eq (s-right x s-nil) refl = ? | 835 insertCase12 (node k1 ⟪ Black , v1 ⟫ (node _ ⟪ _ , _ ⟫ _ _) leaf) (rb-left-black x₁ ro) eq (s-right x s-nil) refl = ? |
832 insertCase12 (node k1 ⟪ Black , v1 ⟫ (node _ ⟪ _ , _ ⟫ _ _) (node _ ⟪ _ , _ ⟫ _ _)) (rb-node-black x₁ x₂ ro ro₁) eq (s-right x s-nil) refl = ? | 836 insertCase12 (node k1 ⟪ Black , v1 ⟫ (node _ ⟪ _ , _ ⟫ _ _) (node _ ⟪ _ , _ ⟫ _ _)) (rb-node-black x₁ x₂ d1 ro ro₁) eq (s-right x s-nil) refl = ? |
833 insertCase12 (node k1 ⟪ Red , v1 ⟫ leaf (node _ ⟪ Black , _ ⟫ _ _)) (rb-right-red x₁ ro) eq (s-left x s-nil) refl = ? | 837 insertCase12 (node k1 ⟪ Red , v1 ⟫ leaf (node _ ⟪ Black , _ ⟫ _ _)) (rb-right-red x₁ ro) eq (s-left x s-nil) refl = ? |
834 insertCase12 (node k1 ⟪ Red , v1 ⟫ (node _ ⟪ Black , _ ⟫ _ _) leaf) (rb-left-red x₁ ro) eq (s-left x s-nil) refl = ? | 838 insertCase12 (node k1 ⟪ Red , v1 ⟫ (node _ ⟪ Black , _ ⟫ _ _) leaf) (rb-left-red x₁ ro) eq (s-left x s-nil) refl = ? |
835 insertCase12 (node k1 ⟪ Red , v1 ⟫ (node _ ⟪ Black , _ ⟫ _ _) (node _ ⟪ Black , _ ⟫ _ _)) (rb-node-red x₁ x₂ ro ro₁) eq (s-left x s-nil) refl = ? | 839 insertCase12 (node k1 ⟪ Red , v1 ⟫ (node _ ⟪ Black , _ ⟫ _ _) (node _ ⟪ Black , _ ⟫ _ _)) (rb-node-red x₁ x₂ d1 ro ro₁) eq (s-left x s-nil) refl = ? |
836 insertCase12 (node k1 ⟪ Black , v1 ⟫ leaf leaf) (rb-single k1 v1) eq (s-left x s-nil) refl = ? | 840 insertCase12 (node k1 ⟪ Black , v1 ⟫ leaf leaf) (rb-single k1 v1) eq (s-left x s-nil) refl = ? |
837 insertCase12 (node k1 ⟪ Black , v1 ⟫ leaf (node _ ⟪ _ , _ ⟫ _ _)) (rb-right-black x₁ ro) eq (s-left x s-nil) refl = ? | 841 insertCase12 (node k1 ⟪ Black , v1 ⟫ leaf (node _ ⟪ _ , _ ⟫ _ _)) (rb-right-black x₁ ro) eq (s-left x s-nil) refl = ? |
838 insertCase12 (node k1 ⟪ Black , v1 ⟫ (node _ ⟪ _ , _ ⟫ _ _) leaf) (rb-left-black x₁ ro) eq (s-left x s-nil) refl = ? | 842 insertCase12 (node k1 ⟪ Black , v1 ⟫ (node _ ⟪ _ , _ ⟫ _ _) leaf) (rb-left-black x₁ ro) eq (s-left x s-nil) refl = ? |
839 insertCase12 (node k1 ⟪ Black , v1 ⟫ (node _ ⟪ _ , _ ⟫ _ _) (node _ ⟪ _ , _ ⟫ _ _)) (rb-node-black x₁ x₂ ro ro₁) eq (s-left x s-nil) refl = ? | 843 insertCase12 (node k1 ⟪ Black , v1 ⟫ (node _ ⟪ _ , _ ⟫ _ _) (node _ ⟪ _ , _ ⟫ _ _)) (rb-node-black x₁ x₂ d1 ro ro₁) eq (s-left x s-nil) refl = ? |
840 -- exit rot repl rbir ? ? | 844 -- exit rot repl rbir ? ? |
841 ... | case2 (case2 pg) = insertCase2 tree (PG.parent pg) (PG.uncle pg) (PG.grand pg) stack si (PG.pg pg) | 845 ... | case2 (case2 pg) = insertCase2 tree (PG.parent pg) (PG.uncle pg) (PG.grand pg) stack si (PG.pg pg) |
842 | 846 |
843 | 847 |