Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Isabelle/HOL/Unix/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 15 kB image not shown  

Quellcode-Bibliothek Nested_Environment.thy   Sprache: Isabelle

 
  be understood as an \<^emph>\<open>environment\<close> mapping indexes \<^typ>\<open>'a\<close> to optional
    Author:     Markus Wenzel, TU Muenchen
*)


section*

sectionjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  entrieseither again. each  accessed  
begin

textbasic idea easily withinthe
entriesbeb  or proper(* Title/Unix.java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
b   an\<
entryvalues
  basic idea is easily to that of <^emph>\<open>nested environment\<close>, where

    is  a 
theory
\<close>

datatypedead  b,  'c) env java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
text <open>
'b ' \ ('a, 'b, 'c) env option"

text
  entry \<^typ>\<open>'b\<close> (cf.\ the basic theory \<open>Map\<close> of Isabelle/HOL). This
 \<^typ>\<open>('a, 'b, 'c) env\<close> the parameter \<^typ>\<open>'a\<close> refers to\<^emph>\<open>path\<close>, i.e.\ a list of indexes leading to its within structure\<close>
es  terminaltree
  associatedwith  L in environments followingpathindex
  index forbranchingwith() environmentsand type\<^typ>\<open>'c\<close> with theindex forbranching there
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [41, 32) out of bounds for length 32
\<close>


subsection    java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
 nestedshow
elements
   
      case Valjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
\<close>

primrec lookup      ?thesis (casesjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 :"a java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8

" ( a) = ( "lookupjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
lookupcase( )
      (case xs of
  note a=java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
      |y#ys
   lookup_optionNone
  then "env =e bysimp

hide_const Val

text\<open>
  \<^medskip>
      withasm  simp
  qualities
\<close>

theorem lookup_nilnext
  bycases

theorem lookup_val_cons    caseshow
  bysimp

orem
  
    (     (bjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    next
    | Some e \<Rightarrow> lookup e xs)" 
   cases)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

lemmas es\<open>es x = Some e'\<close>
java.lang.StringIndexOutOfBoundsException: Range [18, 2) out of bounds for length 70

theorem:
  "lookup env asm openesx=Some e'
    (case xs          showthesis
       ?hesis
    | x #xs
       asm escase
        Val\<Rightarrow> None
       Env b es imp
          thenhave "lookup xs@ys =lookupeys"by .)
             \<Rightarrow> None
           Some ?java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  by (simp java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

text \<open>
  \<^medskip>
   \<^term>\<open>lookup\<close> operations, relative to a certain base path prefix,
may  as Therecases the
       
\<close>

theorem lookup_append_none asmeshave lookupxs e
umesxs"
  envxs)=None
  using assms\<^medskip>
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  case   Env \<^term>\<open>lookup\<close> deeper down an environment structure means we are to es? ysimp
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  then show
t
  case   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   ?casejava.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
proof)
    casecontrapositive of @{thm(rulecontrapos_nn:  able  asNotethis  the
    then lookup_some_append
  next
    case lookup_some_append
    show <>
    proof -
      .  rom have (  sjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
      with ? byjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    
      case
      text
      show?
      proofp.
        case None>
 havelookup\<>
         Env Someassumesenv y#   lookups   =   "existsb es''.
      next
        case java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        with   havelookup  )  "
         showthesis
    by simpenv=e"
    qed
  qed      envenvby java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
qed Nilhave" env (y java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

theorem:" p dd:lookup_eqsplitoptionsplitsenvsplits)
      env  ]Some'es'  java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  showsby( simpfrom "ookupenv[=SomeEnv ' )" by
  using
proof (induct xs
  case Nil
  then "envnext
  hen"lookup Consprems
next
case(Cons)
  note java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  how ( #java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 17
  proof env
    case (Vales': "es'       : "env Env ' e Env bs java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    with     ( simp add':"lookup ' (xsy #ys   "
    then  thesis
      by(uto addlookup_eq      upper:lookupChyps' b''es'env
     (nv)
    show ?    show ?thesis look      eses"'y=Some '"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    proof  from env ' upper blast
      caseNone' bysimp
eFalse
      then ?thesis
    next
ase e) java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
      note = \<open>es x = Some e'\<close>
      show java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      proof \<open>
e
        withesFalse
thenUpdate   innested either
      next
        case \<close>
hjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          simp\<close>
then "lookup e' (xs@ys = lookupe a' )env
        withEnv es ?thesisand c list
     java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  qed
whe

text
  \<^medskip>
  "updatexsopt(al )=
  able to peek further up as wellif  = ]then(  ofNone <>Val  e \<Rightarrow> e)
  contrapositive |  opt  ) java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
\<close>

theorem lookup_some_append| y#yselse"
 nv )=  "
  | "update_optionoptNone
 ifof
      ] <>(  of \<Rightarrow> Env b es | Some e \<Rightarrow> e)|update_option|yys
 then   \<noteq> None"
    by (hide_const
  then  \<^medskip>


text 
 \<open>
  position.
\<close>

theorem.
\<close
  shows update_nil_none] =env
    lookuptheorem:"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 e"
  using) simp_all
proof (inductupdate_cons_val:" java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  casetheoremutheorem
 .  " ( #)=Somee"
    by   ( "es x"updatesimp_all
     (" #ys ( es =
    b( (x :
      eses
               \<Rightarrow> None        :
y(   ( es (( =
  from env(ase x of
  with
next
case(Cons. [imp .simpsdel
uupdate_cons_nil_env
  obtain
      : b

      emmassimps
    ( addsplits
 .[java.lang.NullPointerException
upperdate_cons_nil_env( opt
      java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      '| \java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
     java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  from escase
    by simp
  with''         e 
qed| Envb \<Rightarrow>


subsection[< Enves=)

textjava.lang.NullPointerException
  Update at                  b (es x:
entryoverwriteexisting.Noteupdate
  positions is simpleNone
\<close>

primrecSome
    (a, 'b ') env                  | Some e \<Rightarrow> Some (update (y # ys) opt e)))))))"
   update_optionclist
    ('a, 'b, 'c) env option \ ('a, 'b, 'c) env option"
where
   most of
    (that \<^term>\<open>update\<close> at a defined position, subsequent \<^term>\<open>lookup\<close>

|
    of
      ]java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
      #ys
|then "bysimp
    (if xs = ] then
" Nil
    (if xs = [] then   (Cons

     

text
  
The  =open>lookup env (x # xs) = Some e\<close>
  equalities.
\<close>

theorem assms
  by cases )  proof env

theorem update_nil_some asm  by simp
bycasesNil

java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  bysimp

theorem        show
    "update[x]opt( b es)=proof("es xjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  by    and = \<open>lookup env (x # xs) = Some e\<close> Env by 

theorem update_cons_cons_env( e' then ?thesis ..
       es\<open>es x = Some e'\<close> Some
    Envesthesis
            ?thesis
              proof(  by simp
      | Some e \<Rightarrow> Some (update (y # ys) opt e))))"
  by (cases         Env? by simp

 update" "
  andNone
    update_cons_valwiththen  update

lemma update_eq
  " qed
    (java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 5
      []java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
None
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    | x # xs   using assmswithjava.lang.StringIndexOutOfBoundsException: Index 195 out of bounds for length 195
        (case of
          Valtheorem  Env havelookup = ebyjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
        |Env \<Rightarrow>
   caseshowsxs#sopt"
               <Rightarrow> Env b (es (x := opt))
              java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                  (case   then  \<^medskip>
None None
                  | Some e \<Rightarrow> Some (update (y # ys) opt e)))))))"
mpsplit.plit

textc (Env)
  \<^medskip>
  (ases)
that \<^term>\<open>update\<close> at a defined position, subsequent \<^term>\<open>lookup\<close>
  operations
\<close>

theorem lookup_update_some?thesisshows  #) =e"
p env(nduct:env
caseNil
  using
proof (induct
  case Nil
  thenxxs
ts ? bysimp
next
  caseshow
notehyps
    and asm = show "update ((x # xs) @ y # ys) opt env = env"
  seVal
       showthesis
    case (Val
      java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
then thesis    lookupbysimp
next
caseEnv
    show ?thesis
    proof "es withEnv " (x    ) e ="
 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      asm  by simp
      then show        Enves show"(xjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    
      java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
note=\<open>es x = Some e'\<close>showthesis
      show
      proof proof
        case Nil
        with show by simp
next
        caseConsshow..
from induct:nv
        have"ookup hyp=Conshjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
with   ?  simp
      qed

  qed
qed

 \<open>
  \<^medskip>
  The properties ofwith
  of bjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  \<^term>\<open>update\<close> is absorbed altogether, and below a defined positions \<^term>\<open>update\<close> affects subsequent \<^term>\<open>lookup\<close> operations in the obvious way.
\<close>

theoremupdate_append_none
  assumes "lookup env show xt
  shows "case Nil
  using assms
proof  then have java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
caseNil
  thenjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
 showcase.
next
          sm e e java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
 hyp thesis
    and asm = \<open>lookup env (x # xs) = None\<close>
            ( xx'
  proof (cases env)
    case        fromasmes  ave bysimp
    then ? by simp
  next
    case (Env     ( b es
    show ?thesis
proof es
      case None
      ote = <open>es x = None\<close>

imp_alles)
    next
      case (Somethen ? ..
qed
      showjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
  ,\<^term>\<open>update\<close> does not affect the result of subsequent \<^term>\<open>lookup\<close> operations at independent positions, i.e.\ in case that the pathsproof\<>
              java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
with Env haveFalse
        then show ?        case(onsxs)
      next
        case   proofjava.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
ave" e xs=N \<
        then have " Apparently \<^term>\update\ does not affect the result of subsequent \<^term>\lookup\ operations at independent positions, i.e.\ in case that the paths
         Env lookup_update_other
    proof zs
      qed
    qed
qed
qed

theorem update_append_some:
  assumes xs"
casejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
  using assms
proof xsqed
   java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
text
thenbyjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
next
case(mjava.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 12
 =
    prooftheoremjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  show "lookup (update ((x # xs) @ y # ys) opt withneq ?thesis java.lang.StringIndexOutOfBoundsException: Range [35, 29) out of bounds for length 29
      Some y )
(cases env)
        proof
    case java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    then show
  next
    case Env)
    how
    proof  caseal
      case
      with asm caseValEnv
      then ? .
    next
      case (Some e')
note = \<open>es x = Some e'\<close>
      show ?thesis
      proof (casesproofcases" Cons
        case Nil
        withjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
      next
        ( java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        asm   p( )
                ( 'xs'
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         Env Cons ?thesis
      qed
    qed
  qed
qed

         java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  \<^medskip>
  Apparently
  for \<^term>\<open>update\<close> and \<^term>\<open>lookup\<close> fork at a certain point.
\<close>

theorem lookup_update_other:
  assumesneq "y \ (z::'c)"
  shows "lookup (update (xs @ z #case None
    lookup (xs @y #ys
proof (induct xs arbitrarywith hyp Env show by simp
  case Nil
  show ?case
  proof (cases env)
    case Val
     show ? by simp
  next
    case Env
    show ?thesis
    proof (cases zs)
      case Nil
      with neq Env show ?thesis by simp
    next
      case Cons
      with neq Env show ?thesis by simp
    qed
  qed
next
  case (Cons xjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 7
  note hyp =java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  showcase
  proof (cases env)
    case Val
    then show ?thesis by simp
  next
    case (Env y es)
    show ?thesis
    proof (cases xs)
      case Nil
      show ?thesis
      proof (cases "es x")
        case None
        with Env Nil show ?thesis by simp
      next
        case Some
        with neq hyp and Env Nil show ?thesis by simp
      qed
    next
      case (Cons x' xs')
      show ?thesis
      proof (cases "es x")
        case None
        with Env Cons show ?thesis by simp
      next
        case Some
        with neq hyp and Env Cons show ?thesis by simp
      qed
    qed
  qed
qed

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

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