Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/KBPs/   (Sammlung formaler Beweise Version 2026-5©)  Datei vom 29.4.2026 mit Größe 2 kB image not shown  

Quelle  MapOps.thy

  Sprache: Isabelle
 

(*<*)
(*
 * Knowledgebased programs
  Copyright 2011, Gammie peteg42atgmail.com
 * License: BSD
 *)


theory
imports
beginimports Main
(*>*)

subsection\open mapjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

text

\label{sec:kbps-theory-map-ops}

The algorithm represents an automaton as a pair of maps, which we
capture abstractly with a record and a predicate:

java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67

record Ops
  empty :: "'m"
  lookup 'k 
   :: "<> e\Rightarrow 'm ==>

definition
  MapOps :: "('k ==> 'kabst\Rightarrow('m, 'k, 'e) MapOps ==> bool"
where
  "MapOps α
      ( k y ps
     lookup ops (ate
        \longrightarrow lookup ops (update ke)k
          = (if k' = α Some lookupops M k))
(*<*)

lemma MapOpsI[intro]:
  java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "brackoff" is null

                 lookup (upda ops k e M k
              alpha k' = α \Rightarrow | Some _ ==>
     <> aOs <> d p"
  unfoldingx. (ome

lemma MapOps_emptyD:
  "🚫
  unfolding MapOps_def by simp

lemma MapOps_lookup_updateD:
  "[ α k  d; α k'  d; MapOps α d ops ] ==> lookup ops (update ops k e M) k' = (if α k' = α k then Some e else lookup ops M k')"
  unfolding MapOps_def by simp

(*>*)

text

The function @{term "\<alpha>"} abstracts concrete keys of type @{typ "'k"},
and the parameter @{term "d"} specifies the valid abstract keys.

This approach has the advantage over a locale that we can pass records
to functions, while for a locale we would need to pass the three
functions separately (as in the DFS theory of \S\ref{sec:dfs}).

We use the following function to test for membership in the domain of
the map:

\<close>

definition isSome :: "'a option \<Rightarrow> bool" where
  "isSome opt \<equiv> case opt of None \<Rightarrow> False | Some _ \<Rightarrow> True"
(*<*)

lemma isSome_simps[simp]:
  "x. isSome (Some x)"
  "x. ¬ isSome x x = None"
  unfolding isSome_def by (auto split: option.split)

lemma isSome_eq:
  "isSome x (y. x = Some y)"
  unfolding isSome_def by (auto split: option.split)

lemma isSomeE: "[ isSome x; s. x = Some s ==> Q ] ==> Q"
  unfolding isSome_def by (cases x) auto

end
(*>*)

Messung V0.5 in Prozent
C=85 H=97 G=91
ption.split)


lemma isSomeE: "[ isSome x; s. x = Some s ==> Q ] ==> Q"
  unfolding isSome_def by (cases x) auto

end
(*>*)

Messung V0.5 in Prozent
C=85 H=97 G=91

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© 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 und die Messung sind noch experimentell.