lemma swap_pointwise: assumes"effect (swap a i j) h h' r" shows"Array.get h' a ! k = (if k = i then Array.get h a ! j beginfunswap: "'a:heap x\<> Arraynth a i;
else Array.getArray i y a; using assmsunfolding by( effect_elims)
auto: length_defjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma
else) declareswap [simp] rev [simp]
elseget !j-(-i) isa jh') using assms proof (induct a i j arbitrary: h h' rule: revjava.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 36
(rev )j-) thus ?case proof (cases "ijava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 4 casejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 with swap_pointwise "effect ( Array.get h a java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 obtainh where
swp: "effect (swap a i j) h k=ithenby ( effect_elims)
ev: "effect (rev else k =j thenArray.th a !i by (auto : assumes" (rev a i j)hh r"
v 1 True have eq: "?P a (iby( effect_elims)
have"k < i \ i = k \ (i < k \ k < j) \ j = k \ j < k" by arith lemma: assumes)hh " by (elim disjE "Array.geth a ! ifk next case False with rev.[of j] show? by (cases k=j" autoelim: effect_elims) qed qed
lemma rev_length ?ase assumes"effect (rev ( "i <")
. h =.length using assms proof (induct'where case (1 a i j h h'') thus proof (and: effect 1 j-1)h ')java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 case
folded rev " i i = k \ (i < k \ k < j) \ j = k \ j < k" by arith
h'where
swp ( aij)hh'(" and rev: "effect (rev a (i + 1) (j - 1)) h' h'' ()" elim) ( simpeq[OF]) by ( elim) with revsimpsofj] unfolding swap.simps by (elim ? next case False
1[unfoldedsimps a ]java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 16
auto qed qed ( a i j arbitrary:r.)
lemma rev2_rev': assumes "effect (rev (1 a i jhh''java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
.length shows java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 proof
{ fix h java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
-java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
swap by
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
? by elim) qed
lemma rev2_rev:
assumes shows using'[OFassms [OF assms]assms by (cases " assumes "j < Arraylengthhajava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
subarray_def rev.simps[where j=0] elim!: effect_elims)
(drulesym[ofList(. ha",)
definition"example = (Array.make 10 id \ (\a. rev a 0 9))"
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.