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

Quelle  Semilat.thy   Sprache: Isabelle

 

    Author:     Tobias Nipkow
    Copyright   2000 TUM
*)

chapter \<open>Bytecode Verifier \label{cha:bv}\<close>

section \<open>Semilattices\<close>

theory Semilat
imports Main "HOL-Library.While_Combinator"
begin

type_synonym' ord ="'\Rightarrowa\<Rightarrow> bool"
type_synonym 'a binop = "'\<Rightarrow> 'a \<Rightarrow> 'a"
type_synonym    Copyright*)

 lesub"java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
 "lesubxry \ r x y"

definition lesssub :: "'a \ 'a ord \ 'a \ bool"
where  

definition""  (\<open>(_ /<='__ _)\<close> [50, 1000, 51] 50) and(<>_ /' )<>5,100 15)and
  where

notation
  ""java.lang.NullPointerException
  "lesssub"  (\<open>(_ /<'__ _)\<close> [50, 1000, 51] 50) and
  "plussub"    "lesssub"  (

notation
  "lesub"  (\<open>(_ /\<sqsubseteq>\<^bsub>_\<^esub> _)\<close> [50, 0, 51] 50) and\<open>(_ /\<squnion>\<^bsub>_\<^esub> _)\<close> [65, 0, 66] 65)
  "esssub"(\<open>(_ /\<sqsubset>\<^bsub>_\<^esub> _)\<close> [50, 0, 51] 50) and "x \\<^sub>r y == x \\<^bsub>r\<^esub> y"
  "plussub"  (\<open>(_ /\<squnion>\<^bsub>_\<^esub> _)\<close> [65, 0, 66] 65) x

(* allow \<sub> instead of \<bsub>..\<esub> *)
abbreviation (input)
  lesub1 :: "'a \ 'a ord \ 'a \ bool" (\(_ /\\<^sub>_ _)\ [50, 1000, 51] 50)
  where "x \\<^sub>r y == x \\<^bsub>r\<^esub> y"

abbreviation (input)
  lesssub1 :: "'a \ 'a ord \ 'a \ bool" (\(_ /\\<^sub>_ _)\ [50, 1000, 51] 50)
 x\sqsubset

abbreviation (input)
  plussub1
where

definition ord :: "" r \<equiv> \<lambda>x y. (x,y) \<in> r"
  ord

definition java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
order

definition top :: "'a ord \ 'a \ bool" where
  "top r T \ \x. x \\<^sub>r T"
  
  semilat
  "cc\equiv> wf {y,x). x \\<^sub>r y}"

definition closed :: "'a set \ 'a binop \ bool" where
  "closed (\x\A. \y\A. y \\<^sub>r x \\<^sub>f y) \

definition :: "'a \ bool" where
  semilat
                       (\<forall>x\<in>A. \<forall>y\<in>A. x \<sqsubseteq>\<^sub>r x \<squnion>\<^sub>f y) \<and>:'\java.lang.StringIndexOutOfBoundsException: Index 119 out of bounds for length 119
                       
                        A : ' "

definition is_ub :: "('a \ 'a) set \ 'a \ 'a \ 'a \ bool" where
  "is_ub r x y u \ (x,u)\r \ (y,u)\r"

definition is_lub :: "('a \ 'a) set \ 'a \ 'a \ 'a \ bool" where
    assumessemilat,r )

definition some_lub
  some_lubjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50

locale Semilat
  fixes:' setjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  fixes r :: "'a ord"
  fixes(*<*) by (unfold order_def) blast
assumes"emilat (A,r, "

lemma order_refl [simp, intro]: "order r \ x \\<^sub>r x"
  

lemma order_antisym: "\<lbrakk> order r; x \<sqsubseteq>\<^sub>r y; y \<sqsubseteq>\<^sub>r x \<rbrakk> \<Longrightarrow> x = y"
  (*<*)


lemma order_trans: "\ order r; x \\<^sub>r y; y \\<^sub>r z \ \ x \\<^sub>r z"
  *<*  (unfold ) blast

lemma order_less_irrefl [intro, simp]: "order rjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  (*<*) by (unfold order_def lesssub_def) blast (*>*)  *<*) by (simp add: top_def) (*>*)

lemma order_less_trans: "\ order r; x \\<^sub>r y; y \\<^sub>r z \ \ x \\<^sub>r z"
  (*<*) by (unfold order_def lesssub_def) blast (*>*):

lemma topD [                
  (*<*) by (simp add: top_def) (*>*)

java.lang.StringIndexOutOfBoundsException: Index 120 out of bounds for length 120
  (*<*) by (blast intro: order_antisym) (*>*)

lemma semilat_Def(
semilat
                 (\<forall>x\<in>A. \<forall>y\<in>A. x \<sqsubseteq>\<^sub>r x \<squnion>\<^sub>f y) \<and> 
                 (\<forall>x\<in>A. \<forall>y\<in>A. y \<sqsubseteq>\<^sub>r x \<squnion>\<^sub>f y) \<and> 
                 
  (*<*) by (unfold semilat_def) clarsimp (*>*)

lemma (in Semilat) orderI [simp, intro]: "order r"
  (*<*) using semilat by (simp add: semilat_Def) (*>*)

lemma (in
  

lemma closedD: "\<lbrakk> closed A f; x\<in>A; y\<in>A \<rbrakk> \<Longrightarrow> x \<squnion>\<^sub>f y \<in> A"
  (*<*)


lemma
  (*<*) by (simp add: closed_def) (*>*)

java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
(

lemma (in Semilat) refl_r [java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma (in Semilat) antisym_r [intro?]: "\ x \\<^sub>r y; y \\<^sub>r x \ \ x = y"
(<)( order_antisym 
  
lemma (
  (*<*)

  
lemma lemma( Semilat [, intro
  (*<*) using semilat by (simp add: semilat_Def) (*>*)

 in),?] 
  (*<*) using semilat by (simp add: semilat_Def) (*>*)

 in [simp:
"lbrakk
  (*<*) using semilat by (simp add: semilat_Def) (*>*)

lemma (in Semilat) plus_le_conv [simp]:
  " (*<*) using semilat by (simp add: semilat_Def) (*>*)
(*<*) by (blast intro: ub1 ub2 lub order_trans) (*>*)

lemma (in Semilat) le_iff_plus_unchanged: "lemma (in Semilat) le_iff_plus_unchanged: "\ x \ A; y \ A \ \ (x \\<^sub>r y) = (x \\<^sub>f y = y)"
(*<*)
apply (rule iffI)(*<*)
 apply(blast intro: antisym_r)
apply e subst
apply simperule)
done
(*>*)

lemma
(*<*)
applyrule)
 apply (blast intro: order_antisym lub ub1)
apply(rule)
apply simp )
done
(*>*)


java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 : 
  shows "a \\<^sub>f (b \\<^sub>f c) = a \\<^sub>f b \\<^sub>f c"
(*<*)
proofjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  from a b have ab: "a \\<^sub>f b \ A" ..
  from this haveabc have': a \\<^sub>f (b \\<^sub>f c) \ A" ..
from  bcbjava.lang.NullPointerException
  from a this    

  show ?thesis
  proof    
    show " proof -
    proof -
      from a b have "a \\<^sub>r a \\<^sub>f b" ..
      also from ab c have "\ \\<^sub>r \ \\<^sub>f c" ..
      finallyhavea<" " \<sqsubseteq>\<^sub>r (a \<squnion>\<^sub>f b) \<squnion>\<^sub>f c" .
a bhave" \\<^sub>r a \\<^sub>f b" ..
      also from ab c have "\ \\<^sub>r \ \\<^sub>f c" ..
      finally have "b<""b \\<^sub>r (a \\<^sub>f b) \\<^sub>f c" .
      fromchavec<": "\<sqsubseteq>\<^sub>r (a \<squnion>\<^sub>f b) \<squnion>\<^sub>f c" ..    
      from "b<" "c<" b c abc       from abhave" \\<^sub>r a \\<^sub>f b" ..
      from "a<" this
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    show
    proof -
      from b c have "b \\<^sub>r b \\<^sub>f c" ..
      also from      from"a" this a bc show ?thesis ..
      finally haveb<:" \\<^sub>r a \\<^sub>f (b \\<^sub>f c)" .
      fromproof -
      also froma bc have"dots>\\<^sub>r a \\<^sub>f \" ..
       have"<" " \\<^sub>r a \\<^sub>f (b \\<^sub>f c)" .
      from a bc have "a<""a \\<^sub>r a \\<^sub>f (b \\<^sub>f c)" ..
      from "a<" "b<" a b abc' have "a \\<^sub>f b \\<^sub>r a \\<^sub>f (b \\<^sub>f c)" ..
      from this "c<"        a  have "
    qed
  qed
qed
(*>*)

lemma (in Semilat) plus_com_lemma:
  "\a \ A; b \ A\ \ a \\<^sub>f b \\<^sub>r b \\<^sub>f a"
(*<*)
proof -
  assume a: "a \ A" and b: "b \ A"
from ahave<sqsubseteq>\<^sub>r b \<squnion>\<^sub>f a" .. 
  moreover from b a have "b \\<^sub>r b \\<^sub>f a" ..
  moreoverab
  moreover from b a have "b \\<^sub>f a \ A" ..
.
qed
(*>*)

lemmain) :
  "\a \ A; b \ A\ \ a \\<^sub>f b = b \\<^sub>f a"
  (*<*) by(blast intro: order_antisym plus_com_lemma) (*>*) in) :

lemma is_lubD:
  "is_lubproof -
  (*<*) by (simp add: is_lub_def) (*>*) : ajava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

lemma is_ubI:
  "\ (x,u) \ r; (y,u) \ r \ \ is_ub r x y u"
  (*<*) by (simp add: is_ub_def) (*>*)

lemma is_ubD:
  "is_ub r x ultimately ?thesis..
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3


 is_lub_bigger1]:  
  "is_lub (r\<^sup>*) x y y = ((x,y)\r\<^sup>*)"
(*<*)
apply (unfold   (*<*) by(blast intro: order_antisym plus_com_lemma) (*>*)
apply blast
done
(*>*)

lemma is_lub_bigger2 [iff]:
  "is_lub (*<*) by (simp add: is_lub_def) (*>*)
(*<*)
 ( is_lub_def)
apply blast(*<*) by (simp add: is_ub_def) (*>*)
lemm:
(*>*)

lemma extend_lub:
  "\ single_valued r; is_lub (r\<^sup>*) x y u; (x',x) \ r \
  \<Longrightarrow> \<exists>v. is_lub (r\<^sup>*) x' y v"
(*<*)
apply (unfold is_lub_def
apply (case_tac  [iff:  
 apply (case_tac "(yjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  apply is_lub_def
  :  dest
apply (rule
apply (rule conjI)
 apply (blast intro: converse_rtrancl_into_rtrancl(*>*)
apply (blast introlemma extend_lub
             elim: converse_rtranclE
done
(*>*)

lemma single_valued_has_lubs [rule_format]:
  "\single_valued r; (x,u) \ r\<^sup>*\ \ (\y. (y,u) \ r\<^sup>* \
  (\<exists>z. is_lub (r\<^sup>*) x y z))"
(*<*)
apply java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
 java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 apply apply (last: rtrancl_into_rtrancl converse_rtrancl_into_rtrancl
  apply blast
 apply (blast intro: 
applyjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
done
(*>*)

lemma some_lub_conv:
  "\acyclic r; is_lub (r\<^sup>*) x y u\ \ some_lub (r\<^sup>*) x y = u"
(*<*)
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
apply (rule someI2
 java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
apply  apply( intro)
done
(*>*)

lemma is_lub_some_lub:
  "\single_valued r; acyclic r; (x,u)\r\<^sup>*; (y,u)\r\<^sup>*\
  <Longrightarrow> is_lub (r\<^sup>*) x y (some_lub (r\<^sup>*) x y)"
  (*<*) by (fastforce dest: single_valued_has_lubs simp add: some_lub_conv) (*>*)

\<open>An executable lub-finder\<close>

definition exec_lub :: "('a * 'a) set \ ('a \ 'a) \ 'a binop" where
"exec_lub r f x y \ while (\z. (x,z) \ r\<^sup>*) f y"

lemma exec_lub_reflapply( intro antisymD!: )
by (simp add

lemma acyclic_single_valued_finite is_lub_some_lub:
 "\acyclic r; single_valued r; (x,y) \ r\<^sup>*\
  <Longrightarrow> is_lub (r\<^sup>*) x y (some_lub (r\<^sup>*) x y)"
(*<*)
apply(erule converse_rtrancl_induct
subsection
  apply(simp only:java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
  apply(blast intro:rtrancl_into_trancl2 rtrancl_trancl_trancl)
 apply simp
apply(rename_tac exec_lub_refl     "
apply(subgoal_tac "r \ {a. (x,a) \ r\<^sup>*} \ {b. (b,y) \ r\<^sup>*} =
                    (x,' r\ {a. (x', a) \ r\<^sup>*} \ {b. (b, y) \ r\<^sup>*})")
 apply simp
apply(blast intro:converse_rtrancl_into_rtrancl
            elim"r;single_valued ;(x,)\ r\<^sup>*\
done
(*>*)


lemma exec_lub_conv:
  "\ acyclic r; \x y. (x,y) \ r \ f x = y; is_lub (r\<^sup>*) x y u \ \
  exec_lub   x y =u"
(*<*)
apply(unfold exec_lub_def)
apply(rule_tac P = "\z. (y,z) \ r\<^sup>* \ (z,u) \ r\<^sup>*" and
  (simp:acyclic_def)
    apply(blastapplyblast:rtrancl_into_trancl2)
   (erule)
   apply(erule_tac z = u in java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 22
apply:is_lubD
   apply(blast dest:                   (x,x')( \ {a. (x', a) \ r\<^sup>*} \ {b. (b, y) \ r\<^sup>*})")
  apply(rename_tacapplyblastintro
  apply            :converse_rtranclEdest)
   prefer 2 apply(simp add
  apply
   prefer 2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  apply(erule converse_rtranclE)
   apply blast
  apply(simp only:acyclic_def r f x y =u"
  apply(blast :rtrancl_into_trancl2)
 apply(rule)
  apply simpr ="(r\ r\<^sup>* \ (b,u) \ r\<^sup>*})\" in while_rule)
  apply(erule acyclic_single_valued_finite)
   apply(blast intro(blast: is_lubD)
  applyapply( conjE
 apply imp
     apply( dest is_ubD)
 apply blast
apply simp
apply(  (rename_tac s)
apply(erule_tac z  apply(subgoal_ta "s_ub r
 is_ubD
apply dest)
done
(*>*)

lemma is_lub_exec_lub:
  "\ single_valued r; acyclic r; (x,u)\r\<^sup>*; (y,u)\r\<^sup>*; \x y. (x,y) \ r \ f x = y \
  \<Longrightarrow> is_lub (r\<^sup>*) x y (exec_lub r f x y)"
  (*<*) by (fastforce dest: single_valued_has_lubs simp add: exec_lub_conv) (*>*)

end

99%


¤ Dauer der Verarbeitung: 0.7 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.