changeset 858:60f27ddfd0f4

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 01 Apr 2024 10:04:59 +0900
parents 022481623aea
children 6a081059aa7c
files hoareBinaryTree1.agda
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hoareBinaryTree1.agda	Mon Apr 01 08:59:45 2024 +0900
+++ b/hoareBinaryTree1.agda	Mon Apr 01 10:04:59 2024 +0900
@@ -1090,9 +1090,11 @@
 RB-repl→ti {_} {A} (node k1 ⟪ Black , c1 ⟫ (node k2 ⟪ Red , c2 ⟫ .leaf .leaf) leaf) (node _ ⟪ Black , _ ⟫ (node key₁ value₁ t₂ t₃) (node _ ⟪ Red , _ ⟫ .leaf leaf)) key value (t-left _ _ x₁ x₂ x₃ (t-single .k2 .(⟪ Red , c2 ⟫))) (rbr-rotate-ll x trb) = t-node ? _ _ ? ? ? ? ? tt (RB-repl→ti _ _ _ _ ? trb) ?
 RB-repl→ti {_} {A} (node k1 ⟪ Black , c1 ⟫ (node k2 ⟪ Red , c2 ⟫ .leaf .(node key₂ _ _ _)) leaf) (node _ ⟪ Black , _ ⟫ (node key₁ value₁ t₂ t₃) (node _ ⟪ Red , _ ⟫ .(node key₂ _ _ _) leaf)) key value (t-left _ _ x₁ x₂ x₃ (t-right .k2 key₂ x₄ x₅ x₆ ti)) (rbr-rotate-ll x trb) = t-node ? _ _ ? ? ? ? ? tt ? ?
 RB-repl→ti {_} {A} (node k1 ⟪ Black , c1 ⟫ (node k2 ⟪ Red , c2 ⟫ .(node key₂ _ _ _) .leaf) leaf) (node _ ⟪ Black , _ ⟫ (node key₁ value₁ t₂ t₃) (node _ ⟪ Red , _ ⟫ .leaf leaf)) key value (t-left _ _ x₁ x₂ x₃ (t-left key₂ .k2 x₄ x₅ x₆ ti)) (rbr-rotate-ll x trb) = t-node ? _ _ ? ? ? ? ? tt (RB-repl→ti _ _ _ _ ? trb) ?
-RB-repl→ti {_} {A} (node k1 ⟪ Black , c1 ⟫ (node k2 ⟪ Red , c2 ⟫ (node key₂ value₃ left right) (node key₃ value₂ t₄ t₅)) leaf) (node _ ⟪ Black , _ ⟫ (node key₁ value₁ t₂ t₃) (node _ ⟪ Red , _ ⟫ .(node key₃ _ _ _) leaf)) key value (t-left _ _ x₁ x₂ x₃ (t-node key₂ .k2 key₃ x₄ x₅ x₆ x₇ x₈ x₉ ti ti₁)) (rbr-rotate-ll x trb) = t-node _ _ _ ? x₁ ? ? ⟪ x₅ , ⟪ x₈ ,  x₉ ⟫ ⟫ tt rr05 rr04 where
-        rr03 : (key₁ < k1) ∧ tr< k1 t₂ ∧ tr< k1 t₃
-        rr03 = RB-repl→ti< _ _ _ _ _ trb ? x₂
+RB-repl→ti {_} {A} (node k1 ⟪ Black , c1 ⟫ (node k2 ⟪ Red , c2 ⟫ (node key₂ value₃ left right) (node key₃ value₂ t₄ t₅)) leaf) (node _ ⟪ Black , _ ⟫ (node key₁ value₁ t₂ t₃) (node _ ⟪ Red , _ ⟫ .(node key₃ _ _ _) leaf)) key value (t-left _ _ x₁ x₂ x₃ (t-node key₂ .k2 key₃ x₄ x₅ x₆ x₇ x₈ x₉ ti ti₁)) (rbr-rotate-ll x trb) = t-node _ _ _ (proj1 rr10) x₁ (proj1 (proj2 rr10))  (proj2 (proj2 rr10))  ⟪ x₅ , ⟪ x₈ ,  x₉ ⟫ ⟫ tt rr05 rr04 where
+        rr06 : key < k2
+        rr06 = ?
+        rr10 : (key₁ < k2) ∧ tr< k2 t₂ ∧ tr< k2 t₃
+        rr10 = RB-repl→ti< _ _ _ _ _ trb rr06 ⟪ x₄ , ⟪ x₆ , x₇ ⟫ ⟫
         rr04 : treeInvariant (node k1 ⟪ Red , c1 ⟫ (node key₃ value₂ t₄ t₅) leaf)
         rr04 = RTtoTI0 _ _ _ _ (t-left _ _ (proj1 x₃) (proj1 (proj2 x₃)) (proj2 (proj2 x₃)) ti₁ ) (r-left (proj1 x₃) r-node) 
         rr05 : treeInvariant (node key₁ value₁ t₂ t₃)