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

Quelle  Even.thy

  Sprache: Isabelle
 

(*  Title:       A Definitional Encoding of TLA in Isabelle/HOL
    Authors:     Gudmund Grov <ggrov at inf.ed.ac.uk>
                 Stephan Merz <Stephan.Merz at loria.fr>
    Year:        2011
    Maintainer:  Gudmund Grov <ggrov at inf.ed.ac.uk>
*)


section A simple illustrative example

theory Even
imports State 
begin

text
 A trivial example illustrating invariant proofs in the logic, and how
 Isabelle/HOL can help with specification. It proves that x is
 always even in a program where x is initialized as 0 and
 always incremented by 2.
 


inductive_set
  Even :: "nat set"
where
  even_zero: "0 Even"
| even_step: "n Even ==> Suc (Suc n) Even"

locale Program =
  fixes x :: "state ==> nat"
  and init :: "temporal"
  and act :: "temporal"
  and phi :: "temporal"
  defines "init TEMP $x = # 0"
  and "act TEMP x` = Suc<Suc<$x>>"
  and "phi TEMP init [act]_x"

lemma (in Program) stutinvprog: "STUTINV phi"
  by (auto simp: phi_def init_def act_def stutinvs nstutinvs)

lemma  (in Program) inveven: " phi ($x # Even)"
  unfolding phi_def
proof (rule invmono)
  show " init $x #Even"
    by (auto simp: init_def even_zero)
next
  show "|~ $x #Even [act]_x ($x #Even)"
    by (auto simp: act_def even_step tla_defs)
qed


end

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

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© 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.