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


Quelle  Opt.thy   Sprache: Isabelle

 
*TitleMicroJava.thy
    Authoro2of
    Somejava.lang.NullPointerException
)

section     clo: "closed ?A0 ?f0" and closed

 ub1"forallx\?A0. \y\?A0. x <=_?r0 x +_?f0 y" and
imports Err
begin

definition le :: : "\x\?A0. \y\?A0. y <=_?r0 x +_?f0 y" and
"le r o1 o2 == case o2 of None \ o1=None |
                               y\<> (case of \<Rightarrow> True
                     x \<Rightarrow> x <=_r y)"

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
\<exists>y\<in>A. x = Some y}"

definition
java.lang.StringIndexOutOfBoundsException: Range [10, 7) out of bounds for length 15
   
     Some

definition  :: '
"esl == %(A,r,f). (opt A, le r, sup f)"

lemma unfold_le_opt:
  "o1 <=_(le r) o2 =
  (case o2 of None \<Rightarrow> o1=None | 
              Some y \<Rightarrow> (case o1 of None \<Rightarrow> True | Some x \<Rightarrow> x <=_r y))"
apply (unfold lesub_def le_defby(imp opt_def)
apply (rulewith
done

lemma le_opt_reflbysimp: closed_def err_def)
          java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
by ( add: unfold_le_opt: option)

lemma le_opt_trans [rule_format]:
  " r \
   o1=(le r  \<longrightarrow> o2 <=_(le r) o3 \<longrightarrow> o1 <=_(le r) o3" f_closed    
apply (simp add (cases
        None
done

lemma le_opt_antisym [rule_format]:
  "order r \ o1 <=_(le r) o2 \ o2 <=_(le r) o1 \ o1=o2"
apply (simp add: unfold_le_opt split: option.split)
apply         ?thesis
done

lemma order_le_opt [intro!,simp]:
  "order r \ order(le r)"
apply (casejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 ( introle_opt_refl le_opt_antisym
done 

lemma      qed
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
apply ( lesub_def)
apply (simp split: option.split  qed
done 

lemma Some_le [iff]:
  "(Some x <=_(le r) ox) = (\y. ox = Some y \ x <=_r y)"
apply (    
apply (simp split: option
done 

lemma{fix   
  "(ox <=_(le r) None) = (ox = None)"
apply (unfold lesub_defassume"a\<>optA " <in> opt A" "a +_(sup f) b = OK c" 
apply ( splitoption)
done 


lemma OK_None_bot [iff    moreover
  "OK None <=_(Err.le (le r)) x"
  by     fixx y z

lemma sup_None1 [iff]:
  "x +_(sup f) None = OK x"
       " x\java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62

lemma sup_None2 [iff]:
  "None +_(sup f) x = OK x"
  by (simp add: plussub_def sup_def split: option.split)


lemma None_in_opt [iff]:
  "None by blast
by (simp add: opt_def)

lemma Some_in_opt       " _f y= z"
  "(Some "x <=rz\and y =r "
apply ( opt_def)
apply auto
done 


lemma semilat_opt [intro, simp]:
      }
proof (unfold Opt.esl_def    ultimately
  
  fix A r f
  assume s: "semilat (err A, Err.le r, lift2 f)"
 
  let ?A0               : order_refl split option err.splits
  let ?r0hence"\x\?A. \y\?A. x <=_?r x +_?f y) \ (\x\?A. \y\?A. y <=_?r x +_?f y)"
  let ?f0 = "lift2 f"

  from s
  obtain
    ord: " (auto simpadd: lesub_def plussub_def Err.le_def lift2_def split:err.split)
    clohave"<>x?A. \y\?A. \z\?A. x <=_?r z \ y <=_?r z \ x +_?f y <=_?r z"
    ub1\forallx
    ub2: "\x\?A0. \y\?A0. y <=_?r0 x +_?f0 y" and
    lub : "x\ ?A" "y \ ?A" "z \ ?A"
    by (unfold semilat_def) simp

  let assume"y<_? "
  let ?r = "Err.le (Opt.le r)"
  let ?f = "lift2 (Opt.sup f)"

  from ord
   " ?r"
    by simp

  moreover

  have "closed ?A ?f"
  proof (unfold closed_defassume : "x = a" "y = OK b"" =OK cjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
xyjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    assume x: "x \ ?A"
        ith xyz

             "OK d\<> err A""OK e \ err A" "OK g \ err A"
      assume ab: "x = OK a withlub
      
      with x 
      have a: "\c. a = Some c \ c \ A"
        by (clarsimp add: opt_def

      fromaby
      have b: "\d. b = Some d \ d \ A"
        by (clarsimp add: opt_def)
      
      { fix c d assume "a = Some c" "b = Some d"

by
          by (simp java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        with           by (au add sup_defle_def  lift2_def Err)
        have  d\<in> err A"
          by ok 
       java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
        fix z assume "f c d = OK z"
        ultimately
        have "z \ A" by simp
      } note}

      
      proof (cases xyzjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
         java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        thus
          by (
      
        case Some
thus
          by (auto simp add: sup_def  top r)( )=topjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 case_tac
    +

done
      by
  qed
    
  moreover

  { fix a b c 
    assume "a \ opt A" "b \ opt A" "a +_(sup f) b = OK c"
    moreover
    from ord have "order r" by simp
    moreover
    {   java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
x\<in> A" "y \<in> A" 
      henceunfold le_def
      with simp: split .split
have( x =(. )( )_lift2 y 
            (OK erule_tac".Some <>Q}"in)
byblast
      moreover
      assume "x +_f y = OK z"
      ultimately
      have "x <=_r z \ y <=_r z"
        by (autob
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    ultimately
    have "a <=_(le r) c \ b <=_(le r) c"
      by (auto simp add: sup_def le_def lesub_def plussub_def 
               dest  \<>\<in> opt S; \<forall>x\<in>S. ox = Some x \<longrightarrow> f x \<in> S \<rbrakk> 
  }
     
  hence "(\x\?A. \y\?A. x <=_?r x +_?f y) \ (\x\?A. \y\?A. y <=_?r x +_?f y)"
    by (auto simp add: applyjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11

  moreover

  have "\x\?A. \y\?A. \z\?A. x <=_?r z \ y <=_?r z \ x +_?f y <=_?r z"
  proof (intro strip, elim conjE)
    fix x y z
    assume xyz: "x \ ?A" "y \ ?A" "z \ ?A"
    assume xz: "x <=_?r z"
    assume yz: "y <=_?r z"

    { fix a b c
      assume ok: "x = OK a" "y = OK b" "z = OK c"

      { fix d e g
        assume some: "a = Some d" "b = Some e" "c = Some g"
        
        with ok xyz
        obtain "OK d \ err A" "OK e \ err A" "OK g \ err A"
          by simp
        with lub
        have "\ (OK d) <=_(Err.le r) (OK g); (OK e) <=_(Err.le r) (OK g) \
          \<Longrightarrow> (OK d) +_(lift2 f) (OK e) <=_(Err.le r) (OK g)"
          by blast
        hence "\ d <=_r g; e <=_r g \ \ \y. d +_f e = OK y \ y <=_r g"
          by simp

        with ok some xyz xz yz
        have "x +_?f y <=_?r z"
          by (auto simp add: sup_def le_def lesub_def lift2_def plussub_def Err.le_def)
      } note this [intro!]

      from ok xyz xz yz
      have "x +_?f y <=_?r z"
        by - (cases a, simp, cases b, simp, cases c, simp, blast)
    }
    
    with xyz xz yz
    show "x +_?f y <=_?r z"
      by - (cases x, simp, cases y, simp, cases z, simp+)
  qed

  ultimately

  show "semilat (?A,?r,?f)"
    by (unfold semilat_def) simp
qed 

lemma top_le_opt_Some [iff]: 
  "top (le r) (Some T) = top r T"
apply (unfold top_def)
apply (rule iffI)
 apply blast
apply (rule allI)
apply (case_tac "x")
apply simp+
done 

lemma Top_le_conv:
  "\ order r; top r T \ \ (T <=_r x) = (x = T)"
apply (unfold top_def)
apply (blast intro: order_antisym)
done 


lemma acc_le_optI [intro!]:
  "acc r \ acc(le r)"
apply (unfold acc_def lesub_def le_def lesssub_def)
apply (simp add: wf_eq_minimal split: option.split)
apply clarify
apply (case_tac "\a. Some a \ Q")
 apply (erule_tac x = "{a. Some a \ Q}" in allE)
 apply blast
apply (case_tac "x")
 apply blast
apply blast
done 

lemma option_map_in_optionI:
  "\ ox \ opt S; \x\S. ox = Some x \ f x \ S \
  \<Longrightarrow> map_option f ox \<in> opt S"
apply (unfold map_option_case)
apply (simp split: option.split)
apply blast
done 

end

100%


¤ Dauer der Verarbeitung: 0.6 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 ist noch experimentell.