Mercurial > hg > Members > Moririn
changeset 643:fbd2adb6d9c5
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 18 Nov 2021 17:16:07 +0900 |
parents | 6e319e44271b |
children | a3fb9ffa3d60 |
files | hoareBinaryTree.agda |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hoareBinaryTree.agda Thu Nov 18 16:24:51 2021 +0900 +++ b/hoareBinaryTree.agda Thu Nov 18 17:16:07 2021 +0900 @@ -241,8 +241,6 @@ replaceP key value tree repl (node key₁ value₁ left right ∷ st) Pre next exit with <-cmp key key₁ ... | tri< a ¬b ¬c = next key value (node key₁ value₁ tree right ) (node key₁ value₁ repl right ) st {!!} ≤-refl ... | tri≈ ¬a b ¬c = exit (node key₁ value₁ left right ) (node key₁ value left right ) ⟪ repl1 , repl3 ⟫ where - Pre1 : treeInvariant tree ∧ stackInvariant repl tree (node key₁ value₁ left right ∷ st) ∧ replacedTree key value tree repl - Pre1 = Pre repleq : repl ≡ node key₁ value₁ left right repleq with si-property1 _ _ _ (proj1 (proj2 Pre)) ... | refl = refl @@ -251,8 +249,20 @@ (subst (λ k → stackInvariant k tree (node key₁ value₁ left right ∷ st)) repleq (proj1 (proj2 Pre))) repl3 : replacedTree key value (node key₁ value₁ left right) (node key₁ value left right) repl3 = subst (λ k → replacedTree k value (node key₁ value₁ left right) (node key₁ value left right) ) (sym b) r-node -... | tri> ¬a ¬b c = next key value (node key₁ value₁ left tree ) (node key₁ value₁ left repl )st {!!} ≤-refl - +... | tri> ¬a ¬b c = next key value (node key₁ value₁ left tree ) (node key₁ value₁ left repl ) st ⟪ repl2 , ⟪ repl4 , repl5 ⟫ ⟫ ≤-refl where + Pre1 : treeInvariant tree ∧ stackInvariant repl tree (node key₁ value₁ left right ∷ st) ∧ replacedTree key value tree repl + Pre1 = Pre + repleq : repl ≡ node key₁ value₁ left right + repleq with si-property1 _ _ _ (proj1 (proj2 Pre)) + ... | refl = refl + repl2 : treeInvariant (node key₁ value₁ left tree) + repl2 = stackTreeInvariant _ _ (node key₁ value₁ left right ∷ st) (proj1 Pre) + (subst (λ k → stackInvariant k tree (node key₁ value₁ left right ∷ st)) {!!} (proj1 (proj2 Pre))) + repl4 : stackInvariant (node key₁ value₁ left repl) (node key₁ value₁ left tree) st + repl4 = ? + repl5 : replacedTree key value (node key₁ value₁ left tree) (node key₁ value₁ left repl) + repl5 with r-left c (proj2 (proj2 Pre)) + ... | t = {!!} open import Relation.Binary.Definitions nat-≤> : { x y : ℕ } → x ≤ y → y < x → ⊥