Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Isabelle/HOL/Data_Structures/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 586 B image not shown  

Quelle  Lookup2.thy   Sprache: Isabelle

 
(* Author: Tobias Nipkow *)

section \<open>Function \textit{lookup} for Tree2\<close>

theory Lookup2
imports
  Tree2
  Cmp
  Map_Specs
begin

fun lookup :: "(('a::linorder * 'b) * 'c) tree \ 'a \ 'b option" where
"lookup Leaf x = None" |
"lookup (Node l ((a,b), _) r) x =
  (case cmp x a of LT \<Rightarrow> lookup l x | GT \<Rightarrow> lookup r x | EQ \<Rightarrow> Some b)"

lemma lookup_map_of:
  "sorted1(inorder t) \ lookup t x = map_of (inorder t) x"
by(induction t rule: tree2_induct) (auto simp: map_of_simps split: option.split)

end

100%


¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.