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

Quelle  XVcgEx.thy

  Sprache: Isabelle
 

(*
    Author:      Norbert Schirmer
    Maintainer:  Norbert Schirmer, norbert.schirmer at web de

Copyright (C) 2006-2008 Norbert Schirmer
*)


section "Examples for Parallel Assignments"

theory XVcgEx
imports "../XVcg"

begin

record "globals" =
  "G_'"::"nat"
  "H_'"::"nat"

record 'g vars = "'g state" +
  A_' :: nat
  B_' :: nat
  C_' :: nat
  I_' :: nat
  M_' :: nat
  N_' :: nat
  R_' :: nat
  S_' :: nat
  Arr_' :: "nat list"
  Abr_':: string

term "BASIC
         πŸ‹A :== x,
         πŸ‹B :== y
      END"

term "BASIC
         πŸ‹G :== πŸ‹H,
         πŸ‹H :== πŸ‹G
      END"

term "BASIC
        LET (x,y) = (πŸ‹A,b);
            z = πŸ‹B
        IN πŸ‹A :== x,
           πŸ‹G :== πŸ‹A + y + z
      END"


lemma βЍ {πŸ‹A = 0}
      {πŸ‹A < 0} ⟼ BASIC
       LET (a,b,c) = foo πŸ‹A
       IN
            πŸ‹A :== a,
            πŸ‹B :== b,
            πŸ‹C :== c
      END
      {πŸ‹A = x ∧ πŸ‹B = y ∧ πŸ‹C = c}"
apply vcg
oops

lemma βЍ {πŸ‹A = 0}
      {πŸ‹A < 0} ⟼ BASIC
       LET (a,b,c) = foo πŸ‹A
       IN
            πŸ‹A :== a,
            πŸ‹G :== b + πŸ‹B,
            πŸ‹H :== c
      END
      {πŸ‹A = x ∧ πŸ‹G = y ∧ πŸ‹H = c}"
apply vcg
oops

definition foo:: "nat ==> (nat Γ— nat Γ— nat)"
  where "foo n = (n,n+1,n+2)"

lemma βЍ {πŸ‹A = 0}
      {πŸ‹A < 0} ⟼ BASIC
       LET (a,b,c) = foo πŸ‹A
       IN
            πŸ‹A :== a,
            πŸ‹G :== b + πŸ‹B,
            πŸ‹H :== c
      END
      {πŸ‹A = x ∧ πŸ‹G = y ∧ πŸ‹H = c}"
apply (vcg add: foo_def snd_conv fst_conv)
oops

end

Messung V0.5 in Prozent
C=95 H=98 G=96

Β€ 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.