changeset 854:35373c440257

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 31 Mar 2024 15:16:34 +0900
parents a333ecf93107
children 189ab9e59035
files hoareBinaryTree1.agda
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hoareBinaryTree1.agda	Sat Mar 30 12:28:06 2024 +0900
+++ b/hoareBinaryTree1.agda	Sun Mar 31 15:16:34 2024 +0900
@@ -1087,7 +1087,12 @@
         rr00 = RB-repl→ti> _ _ _ _ _ trb (<-trans x₂ lt) x₆
         rr02 : treeInvariant (node key₃ ⟪ Red , c3 ⟫ t₂ t₄)
         rr02 = RB-repl→ti _ _ _ _ ti₁ (rbr-right lt trb)
-RB-repl→ti .(node _ ⟪ Black , _ ⟫ (node _ ⟪ Red , _ ⟫ _ _) _) .(node _ ⟪ Black , _ ⟫ _ (node _ ⟪ Red , _ ⟫ _ _)) key value ti (rbr-rotate-ll x trb) = ?
+RB-repl→ti {_} {A} (node k1 ⟪ Black , c1 ⟫ (node k2 ⟪ Red , c2 ⟫ t t₁) leaf) (node _ ⟪ Black , _ ⟫ (node key₁ value₁ t₂ t₃) (node _ ⟪ Red , _ ⟫ t₁ leaf)) key value ti₁@(t-left _ _ x₁ x₂ x₃ ti) (rbr-rotate-ll x trb) = t-node ? _ _ ? ? ? ? ? tt ? (rr03 t₁ refl ti) where
+        rr03 : (tr : bt (Color ∧ A)) → tr ≡ t₁  → (tir : treeInvariant (node k2 ⟪ Red , c2 ⟫ t tr))  → treeInvariant (node k1 ⟪ Red , c1 ⟫ tr leaf) 
+        rr03 leaf eq tri = RTtoTI0 _ _ _ _ (treeRightDown _ _ tri) r-leaf
+        rr03 (node key₃ value₃ tr tr₁) refl tri = RTtoTI0 _ _ _ _ (t-left _ _ (proj1 x₃) (proj1 (proj2 x₃)) (proj2 (proj2 x₃)) (treeRightDown _ _ tri) ) 
+            (r-left (proj1 x₃) r-node) 
+RB-repl→ti .(node _ ⟪ Black , _ ⟫ (node _ ⟪ Red , _ ⟫ _ _) (node key₂ _ _ _)) .(node _ ⟪ Black , _ ⟫ _ (node _ ⟪ Red , _ ⟫ _ (node key₂ _ _ _))) key value (t-node _ _ key₂ x₁ x₂ x₃ x₄ x₅ x₆ ti ti₁) (rbr-rotate-ll x trb) = ?
 RB-repl→ti .(node _ ⟪ Black , _ ⟫ _ (node _ ⟪ Red , _ ⟫ _ _)) .(node _ ⟪ Black , _ ⟫ (node _ ⟪ Red , _ ⟫ _ _) _) key value ti (rbr-rotate-rr x trb) = ?
 RB-repl→ti .(node kg ⟪ Black , _ ⟫ (node kp ⟪ Red , _ ⟫ _ _) _) .(node kn ⟪ Black , _ ⟫ (node kp ⟪ Red , _ ⟫ _ t₂) (node kg ⟪ Red , _ ⟫ t₃ _)) key value ti (rbr-rotate-lr t₂ t₃ kg kp kn trb) = ?
 RB-repl→ti .(node kg ⟪ Black , _ ⟫ _ (node kp ⟪ Red , _ ⟫ _ _)) .(node kn ⟪ Black , _ ⟫ (node kg ⟪ Red , _ ⟫ _ t₂) (node kp ⟪ Red , _ ⟫ t₃ _)) key value ti (rbr-rotate-rl t₂ t₃ kg kp kn trb) = ?