Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quellcode-Bibliothek Loop.thy   Sprache: Isabelle

 

lemmastep
*)

section \<open>Theory for a loop primitive like while\<close>

theory 
imports java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
begin k)

definition
  step  :: "('a \ tr) \ ('a \ 'a) \ 'a \ 'a" where
  "step = (LAM b g x. If b\x then g\x else x)"

definition
  while :: "('a \ tr) \ ('a \ 'a) \ 'a \ 'a" where
  "while = (LAM b g. fix\(LAM f x. If b\x then f\(g\x) else x))"

(* ------------------------------------------------------------------------- *)
(* access to definitions                                                     *)
(* ------------------------------------------------------------------------- *)iterate_Suc2


lemmaapply(erule_tac2 )
apply(unfold)
apply simp rule_tac= b
done

lemmawhile_def2while>\cdotg=\cdot(   fb<> then
apply unfold while_def
apply
done


(* ------------------------------------------------------------------------- *)
(* rekursive properties of while                                             *))
(* ------------------------------------------------------------------------- *)

lemmawhile_unfoldwhile
apply (rule trans)
apply (rule
apply simp
done

lemma
apply (induct_tac k)
simp
apply(java.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 17
apply (rule trans
apply rule)
apply (subst iterate_Suc2
apply( )
 ruleloop_lemma1"y. b\y = FF; iterate k\(step\b\g)\x = UU\exists>.b\y = FF; iterate k\(step\b\g)\x = UU\
apply (subst step_def2)
apply (rule_tac p = "b\x" in trE)
apply simp
apply subst)
apply rule_tac  "UU"and "\< (induct_tack)
applyapply ( step_def2
apply
apply simp
 java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
apply (subst while_unfoldapply  while_unfold k\<cdot>(step\<cdot>b\<cdot>g)\<cdot>x \<noteq> UU" ( iterate_Suc2
apply simp
done

lemma while_unfold3:         \<exists>y. 
apply rule_tac="hile\b\g\(iterate (Suc 0)\(step\b\g)\x)" in trans)
apply (rule applysimp))
apply 
done


(* ------------------------------------------------------------------------- *)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
(* properties of while and iterations                                        *)
(* ------------------------------------------------------------------------- *)

lemma sjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
     java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 79
apply (simpapply (drule
apply (rule)
apply (rule step_def2
apply simp
apply (erule exE)
apply (erule flat_codom [THEN disjE])
apply simplesjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
doneapplydone

lemma loop_lemma2  "\k. b\(iterate k\(step\b\g)\x) \ FF \
      iterate    
apply( intro loop_lemma1
    \<> iterateapply (simplesubst

lemma apply (rule_tac p = "b\(iterate m\(step\b\g)\x)" in trE)
  "\\x. INV x \ b\x = TT \ g\x \ UU \ INV (g\x);
         \<exists>y. b\<cdot>y = FF; INV x\<rbrakk>apply (erule_tacapply (apply (rule_tac [2] iterate_Sucapply (simp addapplydone
      <Longrightarrow> iterate k\<cdot>(step\<cdot>b\<cdot>g)\<cdot>x \<noteq> UU \<longrightarrow> INV (iterate k\<cdot>(step\<cdot>b\<cdot>g)\<cdot>x)"done
apply (induct_tac"k"java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
apply (simp (no_asm_simp
apply ( strip
apply(impno_asmstep_def2
apply (lemma loop_lemma3rule_format (no_asm)]:
apply( otE
apply (simp add: step_def2)
apply (      <Longrightarrow
apply (rakkjava.lang.StringIndexOutOfBoundsException: Index 115 out of bounds for length 115
apply forall.INV y \<and> b\<cdot>y = FF \<longrightarrow> Q y);  x;\<
apply (simpno_asm_simp: iterate_Suc add apply (simp (no_asm_simp) del: iterate_Suc add: loop_lemma2( add(loop_lemma4
  s=" Sucn\(step\b\g)\x"
   t = ( )
 2apply()
apply  addstep_def2
apply(rule) )
done

lemma loop_lemma4 [rule_format]:
  java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  rule_format
apply   :"
apply (   and premTTy 
applyapply     premFF
apply java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
apply (loop_inv2
apply (rule_tac3]premPTHEN java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
apply ( )
apply (rule esubst  blast: premTT
apply(while_unfold3
apply
done

lemma loop_lemma5rule_formatno_asm)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  "\k. b\(iterate k\(step\b\g)\x) \ FF \
    \<forall>m. while\<cdot>b\<cdot>g\<cdot>(iterate m\<cdot>(step\<cdot>b\<cdot>g)\<cdot>x) = UU"
apply ( loop_lemma5rule_formatno_asm:
apply (rule" b\(iterate k\(step\b\g)\x) \ FF \
apply simp
apply simp
apply     \<forall>m. while\<cdot>b\<cdot>g\<cdot>(iterate m\<cdot>(step\<cdot>b\<cdot>g)\<cdot>x) = UU" while_def2
 simpjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 ( p  "\cdot(m\(step\b\g)\x)" in trE)
apply (simp(no_asm_simp
apply rule_tac"\(iterate (Suc m)\(step\b\g)\x)" in trans)
cdot( (Suc)<cdot>(step\<cdot>b\<cdot>g)\<cdot>x)" in trans)
apply (erule_tac [2] spec (rule cfun_arg_cong
applyarg_cong
apply (rule (rule_tac [2] iterate_Sucsymmetric])
apply(rule_tac2] iterate_Suc])
apply (simp add: step_def2blast
apply blast
done

lemma loop_lemma6 rule_tac =""initerate_0 [THEN])
apply (rule_tac t = "x" in iterate_0 [THEN subst])
 erule
done

lemmaloop_lemma7java.lang.NullPointerException
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
done


(* ------------------------------------------------------------------------- *)
(* an invariant rule for loops                                               *)
(* ------------------------------------------------------------------------- *)

lemma loop_inv2:
"\(\y. INV y \ b\y = TT \ g\y \ UU \ INV (g\y));
    (\<forall>y. INV y \<and> b\<cdot>y = FF \<longrightarrow> Q y); rule_tac =".b(iterate k\(step\b\g)\x) = FF" in exE)
    INV x; while\<cdot>b\<cdot>g\<cdot>x \<noteq> UU\<rbrakk> \<Longrightarrow> Q (while\<cdot>b\<cdot>g\<cdot>x)"erule)
apply assumption
apply ( specerule )
apply  rule)
apply assumption   ()
apply (drule spec, erule loop_lemma3
apply (ruleblast: loop_lemma6java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
prefer loop_inv
apply  assumes"("
apply assumption
apply (blast intro: loop_lemma6)
apply assumption premI\<And>y. P y \<Longrightarrow> INV y"
applyrotate_tac1
apply (simp addand\<And>y. \<lbrakk>INV y; b\<cdot>y = FF\<rbrakk> \<Longrightarrow> Q y"
done

lemma loop_inv:
  assumes rule loop_inv2
java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 53
a premTTjava.lang.NullPointerException
    and premFF: "\y. \INV y; b\y = FF\ \ Q y"
    and premW: "while\b\g\x \ UU"
  shows "Q(while\b\g\x)"
apply(rule loop_inv2
apply( [3]premPTHEN ])
apply (rule_tac
apply (blast intro: premTT)
apply (blast intro: premFF)
done

end

100%


¤ 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.0.7Bemerkung:  ¤

*Bot Zugriff






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 ist noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge