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

Quelle  Deque.thy

  Sprache: Isabelle
 

section  Double-Ended Queue Specification

theory Deque
imports Main
begin

text Model-oriented specification in terms of an abstraction function to a list.

locale Deque =
fixes empty :: "'q"
fixes enqL :: "'a ==> 'q ==> 'q"
fixes enqR :: "'a ==> 'q ==> 'q"
fixes firstL :: "'q ==> 'a"
fixes firstR :: "'q ==> 'a"
fixes deqL :: "'q ==> 'q"
fixes deqR :: "'q ==> 'q"
fixes is_empty :: "'q ==> bool"
fixes listL :: "'q ==> 'a list"
fixes invar :: "'q ==> bool"

assumes list_empty:
 "listL empty = []"

assumes list_enqL:   
 "invar q ==> listL(enqL x q) = x # listL q"
assumes list_enqR:  
 "invar q ==> rev (listL (enqR x q)) = x # rev (listL q)"
assumes list_deqL:   
 "[invar q; ¬ listL q = []] ==> listL(deqL q) = tl(listL q)"
assumes list_deqR: 
 "[invar q; ¬ rev (listL q) = []] ==> rev (listL (deqR q)) = tl (rev (listL q))"

assumes list_firstL:
 "[invar q; ¬ listL q = []] ==> firstL q = hd(listL q)"
assumes list_firstR:
 "[invar q; ¬ rev (listL q) = []] ==> firstR q = hd(rev(listL q))"

assumes list_is_empty:  
 "invar q ==> is_empty q = (listL q = [])"

assumes invar_empty: 
 "invar empty"

assumes invar_enqL:  
 "invar q ==> invar(enqL x q)"
assumes invar_enqR: 
 "invar q ==> invar(enqR x q)"
assumes invar_deqL: 
 "[invar q; ¬ is_empty q] ==> invar(deqL q)"
assumes invar_deqR: 
 "[invar q; ¬ is_empty q] ==> invar(deqR q)"
begin

abbreviation listR :: "'q ==> 'a list" where
  "listR deque rev (listL deque)"

end



end

Messung V0.5 in Prozent
C=90 H=97 G=93

¤ Dauer der Verarbeitung: 0.1 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.