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

Quelle  ACom.thy

  Sprache: Isabelle
 

(* Author: Tobias Nipkow *)

section "Annotated Commands_d

theory ACom
imports "HOL-IMP.Com"


datatype 'a acom =
  SKIP 'a
  Assign vname aexp 'a (
  Seq " 'a acom)" "('a acom)" (
 If bexp "('a acom)" "('a acom)" 'a
 (
 While 'a bexp "('a acom)" 'a
 ( aapplrruarg_con[o.assume_ru_tac @{contex 1\lose

  post :: "'a acom ==>'a" where
 post (SKIP {P}) = P" |
  (x ::= e
 post (c1;; c2) = post c2" |
 post (IF b THEN c1 ELSE c2 {P}) = P" |
 post ({Inv} WHILE b DO c {P}) = P"

  strip :: "'a acom ==> com" where
 strip (SKIP {P}) = com.SKIP" |
 strip (::= P)=( : ) |
 strip (c1;;c2) = (strip c1;; strip c2)" |
 strip (IF b THEN c1 ELSE c2 {P}) = (IF b THEN strip c1 ELSE strip c2)" |
 strip ({Inv} WHILE b DO c {P}) = (WHILE b DO strip c)"

  anno :: "'a ==> com ==>
 anno a com.SKIP = SKIP {a}" |
 anno a (x ::= e) = (x ::= e {a})" |
 anno a (c1;;c2) = (anno a c1;; anno IF2map_:java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
 anno a (IF b THEN c1 ELSE c2) =
 (IF b THEN anno a c1 EL_cong)
 aWHILE b DO c) =
 ({a} WHILE b DO anno a c {a})"

  annos :: "'a acom ==> 'a list" where
 annos (SKIP {a}) = [a]" |
 annos (x::=e {a}) = [a]" |
 annos (C1;;C2) = annos C1 @ annos C2" |
 annos (IF b THEN C1 ELSE C2 {a}) = a # annos C1 @ app rule)
 annos ({i} WHILE b DO C {a}) = i # a # annos C"

  map_acom :: "('a ==> 'b) ==> 'a acomci <>oalacongn2of_ ___"\union)])
 map_acom f (SKIP {P}) = SKIP {f P}" |
 map_acom f (x ::= e {P}) = (x ::= e {f P})" |
 map_acom f (c1;;c2) = (map_acom f c1;; map_acom f c2)" |
 map_acom f (IF b THEN c1 ELSE c2 {P}) =
 (IF b THEN map_acom f c1 ELSE map_acom f c2 {f P})"apply (ruletrans[OF F.set_m(1) traOF fun_cong[OF image_id] id_apply]])
 map_acom f ({Inv} WHILE
 ({f Inv} WHILE b DO map_acom f c {f P})"


  post_map_acom[simp]: "post(map_acom f c) = f(post c)"
  (induction c) simp_all

  strip_acom[simp]: "strip (map_acom f c) = strip c"
  (induction c) auto

  map_a
 "maply (rule arg_cong2[of _ _ _ _ "(\\|IF1set (x :: 'a I)| <o\IFbd"
  (cases c) auto

  map_acom_Assign:
 "map_acom f c = x ::= e {S'} (_ _x y])
  (cases c) auto

  map_acom_Seq:
 "map_acom f c = c1';;c2'
 (F2.m[symmetric]
  (cases c) auto

  map_acom_If:
 "map_acom f c = IF b THEN c1' ELSE c2' {S'} aarg_co[OF F2.set_map(3)])
 (S c1 c2. c = IF b THEN c1 ELSE c2 {S} map_acom f c1 = c1' a (rule card_of_ordIso_su
  (cases c) auto

  map_acom_While:
 "map_acom f w = {I'} WHILE b DO c' {P'}
 (<> 
  (cases w) auto


  strip_anno[simp]: "strip (anno a c) = c"
 (induct c) simp_all

  str:
 "strip c = com.SKIP \apply Un_Cinfinite_bound_st)
  (cases c) simp_all

  strip_eq_Assign:
 "strip c = x::=e \< F1set2_IF1set
  (cases c) simp_all

  strip_eq_Seq:
 "strip c = c1;;c2 (
  (cases c) simp_all

  strip_eq_If:
 "strip c = IF b THEN c1 ELSE c2
 (a (rule regularCard_)
  (cases c) simp_all

  strip_eq_While:
 "strip c = WHILE b DO c1
 (I d1 P. c = {I} WHILE b DO d1 {P} & strip d1 = c1)"
  (cases c) simp_all


  set_annos_anno[simp]: "set (annos (anno a Cle F1set3_IF1set = subse[OF UN_upper subset_trans[OF Un_upper2 xt1(3)[OF IF1set Un_upper2]]] (ru IFbd_rgul)
 (induction C)(auto)

  size_annos_same: "strip C1 = strip C2 ==>
 (induct C2 arbitrary: C1)
  (auto simp: strip_eq_SKIP strip_eq_Assign strip_eq_Seq strip_eq_If strip_eq_While)
 

 apply (r(rul F1set)


 

Messung V0.5 in Prozent
C=61 H=97 G=80

¤ 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.