summaryrefslogtreecommitdiff
path: root/AvlVerification/Specifications.lean
diff options
context:
space:
mode:
authorRaito Bezarius2024-04-04 17:31:19 +0200
committerRaito Bezarius2024-04-05 18:33:47 +0200
commit50be416e22a39eaf59f7edba81b919e1f114a0ae (patch)
tree255447dcbbf7d26233b2caa092dc1af9ce188f2b /AvlVerification/Specifications.lean
parent22a499f5d4d231bef3193405983f9ade6da116db (diff)
feat: close the BST proof modulo unbundling
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Diffstat (limited to 'AvlVerification/Specifications.lean')
-rw-r--r--AvlVerification/Specifications.lean10
1 files changed, 10 insertions, 0 deletions
diff --git a/AvlVerification/Specifications.lean b/AvlVerification/Specifications.lean
index 94fdd5f..247fd00 100644
--- a/AvlVerification/Specifications.lean
+++ b/AvlVerification/Specifications.lean
@@ -67,4 +67,14 @@ def ordOfOrdSpec (H: avl_verification.Ord T) (spec: OrdSpec H): Ord T where
simp only
)
+theorem ltOfRustOrder {Spec: OrdSpec H}:
+ haveI O := ordOfOrdSpec H Spec
+ haveI := @ltOfOrd _ O
+ ∀ a b, H.cmp a b = .ret .Less -> a < b := by
+ intros a b
+ intro Hcmp
+ change ((Spec.cmp a b).get? _ == .lt)
+ simp [Hcmp, map, avl_verification.Ordering.toLeanOrdering]
+ simp [get?]
+ rfl
end Specifications