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

Benutzer

Quelle  Agent.thy

  Sprache: Isabelle
 

(* 
   Title: Psi-calculi   
   Author/Maintainer: Jesper Bengtson (jebe@itu.dk), 2012
*)

theory Agent
  imports Subst_Term
begin

nominal_datatype ('term, 'assertion, 'condition) psi = 
  PsiNil ( : B_bitvec |c 🚫" using infer_v_g_weakening infer_e_lenI by metis


  Output "'term::fs_name" 'term "('term, 'assertion::fs_name, 'condition::fs_name) psi" (__._ [120, 120, 110] 110)
  Input 'term "('term, 'assertion, 'condition) input" (_(_ [120, 120] 110)
  Case "(('term, 'assertion, 'condition) psiCase)" (
  Par "('term, 'assertion, 'condition) psi" "('term, 'assertion, 'condition) psi" (infixl 90)
  Res "«name¬ Γ'" using * by auto
  Assert 'assertion ({_} [120] 120)
  Bang "('term, 'assertion, 'condition) psi" (

  ('term, 'assertion, 'condition) input =
 Trm 'term "(('term, 'assertion, 'condition) psi)" ()_._ [130, 130] 130)
  Bind "«name¬(('term, 'assertion, 'condition) input)" (ν__ [120, 120] 120)

  ('term, 'assertion, 'condition) psiCase =
 EmptyCase (
  Cond 'condition "(('term, 'assertion, 'condition) psi)"
 "(('term, 'assertion, 'condition) psiCase)" ( _ ==> _ _ \Theta ΓΦ u τ

  psiFreshSet[simp]:
 fixes X :: "name set"
 and M :: "'a::fs_name"
 and N :: 'a
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"
 and I :: "('a, 'b, 'c) input"
 and C :: "('a, 'b, 'c) psiCase"
 and Q :: "('a, 'b, 'c) psi"
 and x :: name
 and Ψ :: 'b
 and Φ :: 'c

 shows "X * (MN.P) = (X \<  then
 and "X * M(I = (X
 and "X * Case C = X * C"
 and "X * (P Q) = (X * P X \< \
 and "X * (νx)P = (X * [x].P)"
 and "X
 and "X * !P = X * P"
 and "X * 0"
 and "X * Trm N P = (X * N X * P)"
 and "X \<harp* Bind x I = X * ([x].I)"

 and "X * c"
 and "X * ==>* Φ * P X
 (auto simp add: fresh_star_def psi.fresh)+

  psiFreshVec[simp]:
 fixes xvec :: "name list"

 shows "xvec * (MN.P) = (xvec * M xvec * N xvec * P)"
 and "xvec * M \p I"
 and "xvec * Case C = xvec * C"
 and "xvec * (P Q) = (xvec * P xvec * Q)"
 and "xvec * (νx)P = (xvec * [x].P)"
 and "xvec * {Ψ}
 and "xvec * !P = xvec * P"
 and "xvec * 0"

 and "xvec * Trm N P = (xvec have "Θ ; B' ; Δ AE_concat v1 v2 ==><> c"f
 and "xvec * Bind x I = xvec * ([x].I)"

 and "xvec * c"
 and "xvec * \<\<w<> iwf_weg inferconcatI by auto
 (auto simp add: fresh_star_def)

  psiCases :: "('c::fs_name × ('a::fs_name, 'b::fs_name, 'c) psi) list ==> ('a, 'b, 'c) psiCase"
 
 base: "psiCases [] = c"
  step: "psiCases ((Φ, P)#xs) = Cond Φ Θ w using wf_weakening infer_e_concatI by auto

  psiCasesEqvt[eqvt]:
 fixes p :: "name prm"
 and Cs :: "('c::fs_name × ('a::fs_name, 'b::fs_name, 'c) psi) list"

 shows "(p (psiCases Cs)) = psiCases(p Cs)"
 (induct Cs) auto

  psiCasesFresh[simp]:
 fixes x :: name
 and Cs :: "('c::fs_name × ('a::fs_name, 'b::fs_name, 'c) psi) list"
 
 shows "x ; B' {" using infer_v_g_weakening infer_e_concatI by mis
 (induct Cs)
 (auto simp add: fresh_list_nil fresh_list_cons)

  psiCasesFreshChain[simp]:
 fixes xvec :: "name list"
 and Cs :: "('c::fs_name × ('a::fs_name, 'b::fs_name, 'c) psi) list"
 and Xs :: "name set"
 
 shows "(xvec * psiCases Cs) = xvec * Cs"
 and "(Xs psiCases Cs) = Xs * s"
 (auto simp add: fresh_star_def)

 
 psiCasesJudge (Cases _ [80] 80) where "Cases Cs Case(psiCases Cs)"

  resChain :: "name list ==> ('a::show "a z' \<>AE_concat
 base: "resChain [] P = P"
  step: "resChain (x#xs) P = (νx)(resChain xs P)"

  resChain ((ν*_)_ [80, 80] 80)

  resChainEqvt[eqvt]:
 fixes perm :: "name prm"
 and lst :: "name list"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"
 
 shows "perm ((ν*xvec)P) = (ν*(perm xvec))(perm P)"
 (induct_tac xvec, auto)

  resChainSupp:
 fixes xvec :: "name list"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"

 shows "supp((ν*xvec)P) = (supp P) - set xvec"
 (induct xvec) (auto simp add: psi.supp abs_supp)

  resChainFresh:
 fixes x :: name
 and xvec :: "name list"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"

 shows "x (ν
  (induct xvec) (simp_all add: abs_fresh)

  resChainFreshSet:
 fixes Xs :: "name set"
 and xvec :: "name list"
 and yvec :: "name list"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"

 shows "Xs * ((ν*xvec)P) = (xXs. x ext
 and "yvec * ((ν*xvec)P) = (x(set yvec). x set xvec x P)"
  (simp add: fr s_starf rsChFreh)+

  resChainFreshSimps[simp]:
 fixes Xs :: "name set"
 and xvec :: "name list"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"
 and yvec :: "name list"

 shows "Xs * xvec ==> Xs * ((ν*xvec)P) = (Xs * P)"
  roof 
 and "xvec * ((ν*xvec)P)"
 (simp add: resChainFreshSet) apply(force simp add: fresh_star_def name_list_supp fresh_def)
 (simp add: resChainFreshSet) apply(force simp add: fresh_star_def name_list_supp fresh_def)
 (simp add: resChainFreshSet)
 
  resChainAlpha:
 fixes p :: "name prm"
 and xvec :: "name list"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"

 assumes xvecFreshP: "(p xvec) ; B' w"sig fer_e_splitI _wkening by auo
 and S: "set p set xvec × set (p xvec)"

 shows "(ν*xvec)P = (ν*(p xvec)) w " using infer_sliwfweakenig by utto
  -
 note pt_name_inst at_name_inst S
 moreover have "set xvec * ((ν*xvec)P)"
 by (simp add: resChainFreshSet)
 moreover from xvecFreshP have "set (p xvec) * ((; B<>  z1 : B_bitvec | c1 }
 by (simp add: resChainFreshSet) (simp add: fresh_star_def)
 ultimately have "(ν*xvec)P = p ((ν*xvec)P)"
 by (rule_tac pt_freshs_freshs [symmetric])
 then show ?thesiy(smp add eqvts
 

  resChainAppend:
 fixes xvec :: "name list"
 and yvec :: "name list"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"
 
 shows "(ν*(xvec@yvec))P = (ν*xvec)((ν*yvec)P)"
 (induct xvec) auto

  resChainSimps[dest]:
 fixes xvec :: "name list"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"
 and Q :: "('a, 'b, 'c) psi"
 and P' :: "('a, 'b, 'c) psi"
 and Q' :: "('a, 'b, 'c) psi"

 shows "(((νAND [ l [ [ ]ccccv ]e }
 and "(P Q = (ν*xvec)(P' Q')) ==> (P = P' Q = Q')"
 (case_tac xvec, simp_all add: psi.inject)+

  inputChain :: "name list ==> 'a::fs_name ==> ('a, 'b::fs_name, 'c::fs_name) psi ==> ('a, 'b, 'c) input" where
 base: "inputChain [] N P = )fe_splbyetis
  step: "inputChain (x#xs) N P = ν x (inputChain xs N P)"

 
 inputChainJudge (_(λ*_ _)._ [80, 80, 80, 80] 80) where "M(λ*xvec N).P AE_split v1 v2" using infer_e_splitI by auto

  inputChainEqvt[eqvt]:
 fixes p :: "name prm"
 and xvec :: "name list"
 and N :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"
 
 shows "p Γ'" using infer_e_splitI by auto
 (induct_tac xvec) auto

  inputChainFresh:
 fixes x :: name
 and xvec :: "name list"
 and N :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"

 shows "x (inputChain xvec N P) = (x set xvec (x N x P))"
  (induct xvec) (simp_all add: abs_fresh)

  inductChaimp:
 fixes xvec :: "name list"
 and N :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"

 shows "xvec * (inputChain xvec N P)"
 (induct xvec) (auto simp add: abs_fresh abs_fresh_star fresh_star_def)

  inputChainFreshSet:
 fixes Xs :: "name set"
 and xvec :: "name list"
 and N :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"

 shows "Xs * (inputChain xvec N P) = (xXsto
  (simp add: fresh_star_def inputChainFresh)

  inputChainAlpha:
 fixes p :: "name prm"
 and Xs :: "name set"
 and Ys :: "name set"

 assumes XsFreshP: "Xs * (inputChain xvec N P)"
 and YsFreshN: "Ys * N"
 and YsFreshP: "Ys * P"
 and S: "set p shar> AE_split v1 v2" usuingnfr_esptI y u

 shows "(inputChain xvec N P) = (inputChain (p xvec) (p N) (p P))"
  -
 note pt_name_inst at_name_inst XsFreshP S
 moreover from YsFreshN YsFreshP have "Ys * shm
 by (simp add: inputChainFreshSet) (simp add: fresh_star_def)
 ultimately have "(inputChain xvec N P) = p (inputChain xvec N P)"
 by (rule_tac pt_freshs_freshs [symmetric])
 then show ?thesis by(simp add: eqvts)
 

  inputChainAlpha':
 fixes p :: "name prm"
 and xvec :: "name list"
 and N :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"

 assumes xvecFreshP: "(p
 and xvecFreshN: "(p xvec) * N"
 and S: "set p set xvec × set (p xvec)"

 shows "(inputChain xvec N P) = (inputChain (p xvec) (p N) (p P))"
  -
 note pt_name_inst at_name_inst S
 moreover have "set xvec * (inputChain xvec N P)"
 by (simp add: inputChainFreshSet)
 ultimately show ?thesis using xvecFreshN xvecFreshP
 by(rule_tac inputChainAlpha) (simp add: fresh_star_def)+
 

  alphaRes:
 fixes M :: "'a::fs_name"
 and x :: name
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"
 and y :: name

 assumes

 shows "(νx)P = (νy)([(x, y)] P)"
 (cases "x = y")
 assume "x=y"
 thus ?thesis by simp
 
 assume "x y"
 with yFreshP show ?thesis
 by(perm_simp add: psi.inject alpha calc_atm fresh_left)
 

  alphaInput:
 fixes x :: name
 and I :: "('a::fs_name, 'b::fs_name, 'c::fs_name) input"
 and c :: name

 assumes A1: "c I"

 shows "ν x I = ν c([(x, c)] I)"
 (cases "x = c")
 assume "x=c"
 thus ?thesis by simp
 
 assume "x c"
 with A1 show ?thesis
 by(perm_simp add: input.inject alpha calc_atm fresh_left)
 

  inputChainLengthEq:
 fixes xvec :: "name list"
 and yvec :: "name list"
 and M :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"

 assumes "length xvec = length yvec"
 and "xvec * yvec"
 and
 and "yvec * M"
 and "yvec * P"

 obtains N Q where "inputChain xvec M P = inputChain yvec N Q"
  -
 assume "N Q. inputChain xvec M P = inputChain yvec N Q ==> thesis"
 moreover obtain n where "n = length xvec" by auto
 with assms have "N Q. inputChain xvec M P = inputChain yvec N Q"
 proof(induct n arbitrary: xvec yvec M P)
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
 thus ?ase by uto 
 next
 case(Suc n xvec yvec M P)
 from Suc n = length xvec
 obtain x xvec' where "xvec = x#xvec'" and "length xvec' = n"
 by(case_tac xvec) auto
 with ; Δ e ==>"
 obtain y yvec' where "yvec = y#yvec'" by(case_tac yvec) auto
 from yvec = y#yvec' xvec=x#xvec' avoiding: Δduauto simp anf_e.is
 have "length xvec' = length yvec'" and "xvec' * yvec'" and "distinct yvec'" and "yvec' * M" and "yvec' * P"
 by simp+
 then obtain N Q where Eq: "inputChain xvec' M P = inputChain yvec' N Q" using
 by(drule_tac Suc) auto
 moreover from distinct yvec yvec = y#yvec'
 moreover from xvec * yvec
 by auto
 moreover from ; ; \<amma  v ==> τ" and "atom x Γ
 hence "y inputChain xvec' M P" by(simp add: inputChainFresh)
 with Eq have "y inputChain yvec' N Q" by(simp add: inputChainFresh)
 ultimately have "ν x (inputChain xvec' M P) = ν y (inputChain yvec' ([(x, y)] N) ([(x, y)] Q))"
 by(simp add: input.inject alpha' eqvts name_swap)
 thus ?case using shows "atom x v"
 qed
 ultimately show ?thesis
 by blast
 

  inputChainEq:
 fixes xvec :: "name list"
 and M :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"
 and yvec :: "name list"
 and N :: 'a
 and Q :: "('a, 'b, 'c) psi"

 assumes "inputChain xvec M P = inputChain yvec N Q"
 and "xvec * yvec"
 and "distinct xvec"
 and "distinct yvec"

 obtains p where "(set p) (set xvec) × set (p xvec)" and "distinctPerm p" and "yvec = p xvec" and "N = p M" and "Q = p P"
 -
 assume "p. [set p set xvec × set (p xvec); distinctPerm p; yvec = p xvec; N = p M; Q = p P] ==> thesis"
 moreover obtain n where "n = length xvec" by auto
 with assms have "p. (set p) (set xvec) × set (yvec) distinctPerm p yvec = p xvec
 proof(induct n arbitrary: xvec yvec M N P Q)
 case(0 xvec yvec M N P Q)
 have Eq: "inputChain xvec M P = inputChain yvec N Q" by fact
 from ::Θ
 moreover with Eq have "yvec = []"
 by(case_tac yvec) auto
 ultimately show ?case using Eq
 by(simp add: input.inject)
 next
 case(Suc n xvec yvec M N P Q)
 from Suc n = length xvec
 obtain x xvec' where "xvec = x#xvec'" and "length xvec' = n"
 by(case_tac xvec) auto
 from inputChain xvec M P = inputChain yvec N Q xvec = x # xvec' \Phi B Γ Δ tid cons const v cs t ==> toSet Γ\<ubseteq w G> ==> Φ Γ tid cons con vcsc t and
 obtain y yvec' where "inputChain (x#xvec') M P = inputChain (y#yvec') N Q"
 and "yvec = y#yvec'"
 by(case_tac yvec) auto
 hence EQ: "ν x (inputChain xvec' M P) = ν y (inputChain yvec' N Q)"
 by simp
 from B \<>  Θf Γ' ==>ranchlis \Theta \<Phi ' Δ
 have "x y" and "xvec' * yvec'" and "x yvec'" and "y xvec'"
 by(auto simp add: fresh_list_cons)
 from distinct xvec ck_branch_s_check_branch_list.stginduct)
 by simp+
 have IH: "xvec yvec M N P Q. [inputChain xvec (M::'a) (P::('a, 'b, 'c) psi) = inputChain yvec (N::'a) (Q::('a, 'b, 'c) psi); xvec * yvec; distinct xvec; distinct yvec; n = length xvec] ==> p. (set p) (set xvec) × (set yvec) cacheΘ Γ Δ' Φ v τ' τ)
 by fact
 from EQ x y x yvec'
 by(simp add: input.inject alpha eqvts)
 with xvec' * yvec'
 obtain p where S: "(set p) (set xvec') × (set yvec')" and "distinctPerm p" and "yvec' = p \<B  Δ z s b
 by metis
 from S have "set((x, y)#p) set(x#xvec') × set(y#yvec')" by auto
 moreover from Γ
 apply(induct p)
 by(auto simp add: fresh_list_nil fresh_list_cons fresh_prod name_list_supp) (auto simp add: fresh_def)

 with S distinctPerm p
 moreover from yvec' = p xvec' (Θ, B, Γ, \tau)" using check_letI igrh_rd xf
 by(simp add: calc_atm freshChainSimps)
 moreover from ([(x, y)] ; \Phi ; B ; Γ z : b | c }
 by(simp add: pt_bij)
 hence "N = ((x, y)#p) M" by simp
 moreover from (x, Θ, B, Γ, e, τ
 by(simp add: pt_bij)
 hence "Q = ((x, y)#p) P" by simp
 ultimately show ?case using xvec=x#xvec'
 by blast
 qed
 ultimately show ?thesis by blast
 

  inputChainEqLength:
 fixes xvec :: "name list"
 and M :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"
 and yvec :: "name list"
  N :: 'a
 and Q :: "('a, 'b, 'c) psi"

 assumes "inputChain xvec M P = inputChain yvec N Q"

 shows "length xvec = length yvec"
  -
 obtain n where "n = length xvec" by auto
 with assms show ?thesis
 proof(induct n arbitrary: xvec yvec M P N Q)
 case(0 xvec yvec M P N Q)
 from
 moreover with inputChain xvec M P = inputChain yvec N Q have "yvec = []"
 by((case_tac yvec) auto
 ultimately show ?case by simp
 next
 case(Suc n xvec yvec M P N Q)
 from Suc n = length xvec
 obtain x xvec' where "xvec = x#xvec'" and "length xvec' = n"
 by(case_tac xvec) auto
 from v) # " using check_letI by metis
 obtain y yvec' where "inputChain (x#xvec') M P = inputChain (y#yvec') N Q"
 and "yvec = y#yvec'"
 by(case_tac yvec) auto
 hence EQ: "ν x (inputChain xvec' M P) = ν y (inputChain yvec' N Q)"
 by simp
 have IH: "xvec yvec M P N Q. [qed
 by fact
 show ?case
 proof(case_tac "x = y")
 assume "x = y"
 with EQ have "inputChain xvec' M P = inputChain yvec' N Q"
 by(simp add: alpha input.inject)
 with IH length xvec' = n have "length xvec' = length yvec'"
 by blast
 with xvec = x#xvec' yvec=y#yvec'
 show ?case by simp
 next
 assume "x y"
 with EQ have "inputChain xvec' M P = inputChain ([(x, y)] yvec') ([(x, y)] Φ t s1 τ
 by(simp add: alpha input.inject eqvts)
 with IH length xvec' = n have "length xvec' = length ([(x, y)] yvec')"
 by blast
 hence "length xvec' = length show ?case proof
 by simp
 with xvec = x#xvec' yvec=y#yvec'
 show ?case by simp
 qed
 qed
 

  alphaInputChain:
 fixes yvec :: "name list"
 and xvec :: "name list"
 and M :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"

 assumes "length xvec = length yvec"
 and "yvec
 and "yvec * P"
 and "yvec * xvec"
 and "distinct yvec"

 shows "inputChain xvec M P = inputChain yvec ([xvec yvec] v M) ([xvec yvec] x) #^sub>Γ G) toSet ((x,b_of t, c_oΓ Γ')" using check_let2I by auto
  assms
 (induct rule: composePermInduct)
 case cBase
 show ?case by simp
 
 case(cStep x xvec y yvec)
 thus ?case
 apply auto
 by(subst alphaInput[of y]) (auto simp add: inputChainFresh eqvts)
 

  inputChainInject[simp]:

 shows "(inputChain xvec M P = inputChain xvec N Q) = ((M = N) (P = Q))"
 (induct xvec) (auto simp add: input.inject alpha)

  alphaInputDistinct:
 fixes xvec :: "name list"
 and M :: "'a::fs_name"
 and P :: "('a, 'b::fs_name, 'c::fs_name) psi"
 and yvec :: "name list"
 and N :: 'a
 and Q :: "('a, 'b, 'c) psi"

 assumes Eq: "inputChain xvec M P = inputChain yvec N Q"
 and xvecDist: "distinct xvec"
 and Mem: "x. x ; Φ ; (x, b_of t, c_of x) #\Γ Γ' ; Δ s2 <==" using check_let2I by metis
 and xvecFreshyvec: "xvec * yvec"
 and xvecFreshN: "xvec * N"
 and xvecFreshQ: "xvec * Q"

 shows "distinct yvec"
  -
 from Eq have "length xvec = length yvec"
 by(rule inputChainEqLength)
 with assms show ?thesis
 proof(induct n=="length xvec" arbitrary: xvec yvec N Q rule: nat.induct)
 case(zero xvec yvec N Q)
 thus ?case by simp
 next
 case(Suc n xvec yvec N Q)
 have L: "length xvec = length yvec" and "Suc n = length xvec" by fact+
 then obtain x xvec' y yvec' where xEq: "xvec = x#xvec'" and yEq: "yvec = y#yvec'"
 and L': "length xvec' = length yvec'"
 by(cases xvec, auto, cases yvec, auto)
 have xvecFreshyvec: "xvec * yvec" and xvecDist: "distinct xvec" by fact+
 with xEq yEq have xineqy: "x y" and xvec'Freshyvec': "xvec' * yvec'"
 and xvec'Dist: "distinct xvec'" and xFreshxvec': "x xvec'"
 and xFreshyvec': "x yvec'" and yFreshxvec': "y case ckck_r_cnI \ThetaΦ B Γ Δ tid dclist' v cs τ cs cl)
 by(auto simp add: fresh_list_cons)
 have Eq: "inputChain xvec M P = inputChain yvec N Q" by fact
 with xEq yEq xineqy have Eq': "inputChain xvec' M P = inputChain ([(x, y)] yvec') ([(x, y)] N) ([(x, y)] Q)"
 by(simp add: input.inject alpha eqvts)
 moreover have Memm:"\Andx. x set xvec ==> x
 with xEq have "x. x set xvec' ==> x supp M" by simp
 moreover have xvecFreshN: "xvec * N" by fact
 with xEq xFreshxvec' yFreshxvec' have "xvec'
 moreover have xvecFreshQ: "xvec * Q" by fact
 with xEq xFreshxvec' yFreshxvec' have "xvec' * ([(x, y)] Q)" by simp
 moreover have "Suc n = length xvec" by fact
 with xEq have "n = length xvec'" by simp
 moreover from xvec'Freshyvec' xFreshxvec' yFreshxvec' have "xvec' > Φ B Γ tid dclist' v cs τ
 by simp
 moreover from L' have "length xvec' = length([(x, y)] yvec')" by simp
 ultimately have "distinct([(x, y)] yvec')" using xvec'Dist
 by(rule_tac Suc)
 hence "distinct yvec'" by simp
 from Mem xEq have xSuppM: "x supp M" by simp
 from L xvecFreshyvec xvecDist xvecFreshN xvecFreshQ
 have "inputChain yvec N Q = inputChain xvec ([yvec xvec] v N) ([yvec xvec] v Q)"
 by(simp add: alphaInputChain)
 with Eq have "M = [yvec xvec]
 with xEq yEq have "M = [(y, x)] [yvec' xvec'] v N"
 by simp
 with xSuppM have ySuppN: "y supp([yvec' xvec'] v N)"
 by( cas (check_ η Γ τ tid cons v s)
 (simp add: calc_atm eqvts name_swap)
 have "y yvec'"
 proof(simp add: fresh_def, rule notI)
 assume "y supp yvec'"
 hence "y mem yvec'"
 by(induct yvec') (auto simp add: supp_list_nil supp_list_cons supp_atm)
 moreover from xvecFreshN xEq xFreshxvec' have "xvec' * N" by simp
 ultimately have "y [yvec' xvec']
 by(force intro: freshChainPerm simp add: freshChainSym)
 with ySuppN show "False" by(simp add: fresh_def)
 qed
 with distinct yvec'Θ B; Γ wyetis
 qed
 

  psiCasesInject[simp]:
 fixes CsP :: "('c::fs_name × ('a::fs_name, 'b::fs_name, 'c) psi) list"
 and CsQ :: "('c × ('a, 'b, 'c) psi) list"

 shows "(psiCases CsP = psiCases CsQ) = (CsP = CsQ)"
 (induct CsP arbitrary: CsQ)
 case(Nil CsQ)
 thus ?case by(case_tac CsQ) (auto)
 
 case(Cons a CsP CsQ)
 thus ?case
 by(case_tac a, case_tac CsQ) (clarsimp simp add: psiCase.inject)+
 

  casesInject[simp]:
 fixes CsP :: "('c::fs_name × ('a::fs_name, 'b::fs_name, 'c) psi) list"
 and CsQ :: "('c ×

 shows "(Cases CsP = Cases CsQ) = (CsP = CsQ)"
 (induct CsP)
 (auto simp add: psiCase.inject)
 (case_tac CsQ)
 (simp add: psiCase.inject psi.inject)
 (force simp add: psiCase.inject psi.inject)
 (case_tac CsQ)
 (force simp add: psiCase.inject psi.inject)
 (auto simp add: psiCase.inject psi.inject)
 (simp only: psiCases.simps[symmetric])
 (simp only: psiCasesInject)
  simp
 (case_tac CsQ)
 (auto simp add: psiCase.inject psi.inject)

 
 guarded :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi ==>f const "i hekbranch_s_rnhI y ut
 and guarded' :: "('a::fs_name, 'b::fs_name, 'c::fs_name) input ==> bool"
 and guarded'' :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psiCase ==> bool"

 
 "guarded (0) = True"
 N
  "guarded (M(I) = True"
  "guarded (Case C) = guarded'' C"
  "guarded (P Q) = ((guarded P) (guarded Q))"
  (\<<nu
  "guarded ({Ψ}) = False"
  "guarded (!P) = guarded P"

  "guarded' (Trm M P) = False"
  "guarded' (ν y I) = False"

  "guarded'' (c) = True"
  "guarded'' (φ ==> ; B w\Γ Γ')"
 (finite_guess)+
 (rule TrueI)+
 (fresh_guess add: fresh_bool)+

  guardedEqvt[eqvt]:
 fixes p :: "name prm"
 and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"
 and I :: "('a, 'b, 'c) inut"
 and C :: "('a, 'b, 'c) psiCase"

 shows "(p (guarded P)) = guarded (p P)"
 and "(p 🚫
 and "(p (guarded'' C)) = guarded'' (p C)"
 P I an rule: utiCase.snginducts
 (simp add: eqvts)+

  guardedClosed[simp]:
 fixes P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"
 and p :: "name prm"

 assumes "guarded P"

 shows "guarded(p P)"
  -
 from guarded P have "p (guarded P)"
 by(simp add: perm_bool)
 thus ?thesis by(simp add: eqvts)
 

  substPsi =
 substTerm?: substType substTerm +
 substAssert?: substType substAssert +
 substCond?: substType substCond

 for substTerm :: "('a::fs_name) ==> name list ==> 'a::fs_name list ==> 'a"
 and substAsr :: "('b_nme<Rightarrowname \Rightarrow 'b"
 and substCond :: "('c::fs_name) ==> name list ==> 'a::fs_name list ==> 'c"
 

 
 subs :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi ==> name list ==> 'a list ==>show ?ca poof
  subs' :: "('a::fs_name, 'b::fs_name, 'c::fs_name) input ==> name list ==> 'a list ==> ('a, 'b, 'c) input"
  subs'' :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psiCase ==> name list ==> 'a list g frescheck_ifI by uto

 
 "subs (0) xvec Tvec = 0"
  "(subs (M sho \>Θ; B; Γ' { ec_ifIy u
  "(subs (M(I) xvec Tvec) = (substTerm M xvec Tvec)((subs' I xvec Tvec)"

  "(subs (Case C) xvec Tvec) = (Case (subs'' C xvec Tvec|sho\open> Θ ; Φ ; B ; Γ z : b_of τ z } using check_ifI by
  "(subs (P Q) xvec Tvec) = (subs P xvec Tvec) (subs Q xvec Tvec)"
  "[ Θ ; Φ ; B ; Γ' ; Δ { IM _ z } using check_ifI by auto
  "(subs ({Ψ}) xvec Tvec) = {(substAssert Ψ xvec Tvec)}
  "(subs (!P) xvec Tvec) = !(subs P xvec Tvec)"

  "(subs' ((Trm M P)::('a::fs_name, 'b::fs_name, 'c::fs_name) input) xvec Tvec) = ()(substTerm M xvec Tvec).(subs P xvec Tvec))"
  "[y xvec; y Tvec] ==> (subs' (ν y I) xvec Tvec) = (ν y (sub

  "(subs'' (c::('a::fs_name, 'b::fs_name, 'c::fs_name) psiCase) xvec Tvec) = c"
  "(subs'' (Φ ==> P C) xvec Tvec) = ((substCond Φ xvec Tvec) ==> (subs P xvec Tvec) (subs'' C xvec Tvec))"
 (finite_guess add: substTerm.fs substAssert.fs substCond.fs)+
 (rule TrueI)+
 (simp add: abs_fresh)
 (simp add: abs_fresh)
 (simp add: abs_fresh)
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_fun_def eqvts fresh_def[symmetric] supports_def)
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_fun_def eqvts fresh_def[symmetric] supports_def)
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 (fresh_guess)+
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_fun_def eqvts fresh_def[symmetric] supports_def)
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 (fresh_guess)+
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_ac check_sI<>P
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 (fresh_guess)+
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_fun_def eqvts fresh_def[symmetric] supports_def)
 fs_name1)
 (simp add: fresh_def[symmetric])
 (fresh_guess)
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_fun_def eqvts fresh_def[symmetric] supports_def)
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_fun_def eqvts fresh_def[symmetric] supports_def)
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 (fresh_guess)+
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_fun_def eqvts fresh_def[symmetric] supports_def)
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 (fresh_guess)+
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force case (chck_vararI u \<>  Δ' v τ
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 (fresh_guess)+
 (rule supports_fresh[of "supp(xvec, Tvec)"])
 (force simp add: perm_fun_def eqvts fresh_def[symmetric] supports_def)
 (simp add: fs_name1)
 (simp add: fresh_def[symmetric])
 

  substEqvt[eqvt]:
 fixes p :: "name prm"
  P :: "('a, 'b, 'c psi"
 and xvec :: "name list"
 and Tvec :: "'a list"
 and I :: "('a, 'b, 'c) input"
 and C :: "('a, 'b, 'c) psiCase"

 shows "(p (subs P xvec Tvec)) = subs (p P) (p xvec) (p
 and "(p (subs' I xvec Tvec)) = subs' (p I) (p xvec) (p Tvec)"
 and "(p (subs'' C xvec Tvec)) = subs'' (p C) (p case(chek_assgnI\<Theta Φ B Γ Δ u τ v z τ)
 (nominal_induct P and I and C avoiding: xvec Tvec rule: psi_input_psiCase.strong_inducts)
 (auto simp add: eqvts)
 (drule_tac pi=p in pt_fresh_bij1[OF pt_name_inst, OF at_name_inst])
 (drule_tac pi=p in pt_fresh_bij1[OF pt_name_inst, OF at_name_inst])
  simp
 (drule_tac pi=p ishow ?ccase proof
 (drule_tac pi=p in pt_fresh_bij1[OF pt_name_inst, OF at_name_inst])
  simp

  subst2[intro]:
 fixes xvec :: "name list"
 and Tvec :: "'a list"
 and x :: name
 and P :: "('a, 'b, 'c) psi"
 and I :: "('a, 'b, 'c) input"
 and C :: "('a, 'b, 'c) psiCase"

 assumes "x Tvec"
 and "x xvec"

 shows "x P ==> x (subs P xvec Tvec)"
 and "x I ==> x
 and "x C ==> x (subs'' C xvec Tvec)"
  assms
 (nominal_induct P and I and C avoiding: xvec Tvec rule: psi_input_psiCase.strong_inducts)
 (auto intro: substTerm.subst2 substCond.subst2 substAssert.subst2 simp add: abs_fresh)

  subst2Chain[intro]:
 fixes xvec :: "name list"
 and Tvec :: ":' list"
 and Xs :: "name set"
 and P :: "('a, 'b, 'c) psi"
 and I :: "('a, 'b, 'c) input"
 and C :: "('a, 'b, 'c) psiCase"

 assumes "Xs * xvec"
 and "Xs * Tvec"

 shows "Xs * P ==> Xs * (subs P xvec Tvec)"
 and "Xs * I ==> Xs * (subs' I xvec Tvec)"
 and "Xs * C ==> Xs * (subs'' C xvec Tvec)"
  assms
 (auto intro: subst2 simp add: fresh_star_def)

  renaming:
 fixes :: "name list"
 and Tvec :: "'a list"
 and p :: "name prm"
 and P :: "('a, 'b, 'c) psi"
 and I :: "('a ,'b, 'c) input"
 and C :: "('a, 'b, 'c) psiCase"

 assumes "length xvec = length Tvec"
 and "set p set xvec × set (p
 and "distinctPerm p"

 shows "[(p xvec) * P] ==> (subs P xvec Tvec) = subs (p
 and "[(p xvec) * I] ==> (subs' I xvec Tvec) = subs' (p aseI \Delta Γ dclist cs τ
 and "[(p xvec) * C] ==> (subs'' C xvec Tvec) = subs'' (p C) (p
  assms
 (nominal_induct P and I and C avoiding: xvec p Tvec rule: psi_input_psiCase.strong_inducts)
 (auto intro: substTerm.renaming substCond.renaming substAssert.renaming simp add: freshChainSimps psi.inject input.inject psiCase.inject)

  subst4hain
 fixes xvec :: "name list"
 and Tvec :: "'a list"
 and P :: "('a, 'b, 'c) psi"
 and I :: "('a, 'b, 'c) input"
 and C :: "('a, 'b, 'c) psiCase"

 assumes "length xvec = length Tvec"
 and "distitinct vec"
 and "xvec * Tvec"

 shows "xvec * (subs P xvec Tvec)"
 and "xvec * (subs' I xvec Tvec)"
 and "xvec * (subs'' C xvec Tvec)"
  assms
 (nominal_induct P and I and C avoiding: xvec Tvec rule: psi_input_psiCase.strong_inducts)
 (auto intro: substTerm.subst4Chain substCond.subst4Chain substAssert.subst4Chain simp add: abs_fresh)

  guardedSubst[simp]:
 fixes P :: "('a, 'b, 'c) psi"
 and I :: "('a, 'b, 'c) input"
 and C :: "('a, 'b, 'c) psiCase"
 and xvec :: "name list"
 and Tvec :: "'a list"

 assumes "length xvec = length Tvec"
 and "distinct xvec"

 shows "guarded P ==> guarded(subs P xvec Tvec)"
 and "guarded' I ==> guarded'(subs' I xvec Tvec)"
 and "guarded'' C ==> guarded''(subs'' C xvec Tvec)"
  assms
 (mnal_inct P dI and C avoiding: xvec Tvec rle: p ps_nutsiCase.strong_inucts) auto

  seqSubs :: "('a, 'b, 'c) psi ==> (name list × 'a list) list ==> ('a, 'b, 'c) psi" (_[🪙] [80, 80] 130)
 where "P[<\<<> (xvec, Tvec). subs Q xvec Tvec) P σ

  seqSubs' :: "('a, 'b, 'c) input ==> (name list × 'a list) list ==> ('a, 'b, 'c) input"
 where "seqSubs' I σ foldl (λQ. λ(xvec, Tvec). subs' Q xvec Tvec) I σ"

  seqSubs'' :: "('a, 'b, 'c) psiCase ==> (name list × 'a list) list ==> ('a, 'b, 'c) psiCase"
 where "seqSubs'' C σ foldl (λ w (x, B_bool, c) #\^>🚫

  substInputChain[simp]:
 fixes xvec :: "name list"
 and N :: "'a"
 and P :: "('a, 'b, 'c) psi"
 and yvec :: "name list"
 and Tvec :: "'a list"

 assumes "xvec * yvec"
 and "xvec

 shows "subs' (inputChain xvec N P) yvec Tvec = inputChain xvec (substTerm N yvec Tvec) (subs P yvec Tvec)"
  assms
 (induct xvec) (auto simp add: psi.inject)

  caseListSubst :: "('c × ('a, 'b, 'c) psi) list ==> name list ==> 'a list ==> Θ ; Φ ; B ; (x, B_bool, c) #\Γ ΓDelta s <== τ
using check_assertI(11) [OF _ *] by auto
 
 "caseListSubst [] _ _ = []"
  "caseListSubst ((φ, P)#Cs) xvec Tvec = (substCond φ xvec Tvec, (subs P xvec Tvec))#(caseListSubst Cs xvec Tvec)"

  substCases[simp]:
 fixes Cs :: "('c × ('a, 'b, 'c) psi) list"
 and xvec :: "name list"
 and Tvec :: "'a list"

 shows "subs (Cases Cs) xvec Tvec = Cases(caseListSubst Cs xvec Tvec)"
 (induct Cs) (auto simp add: psi.inject)

  substCases'[simp]:
 fixes Cs :: "('c × ('a, 'b, 'c) psi) list"
 and xvec :: "name list"
 and Tvec :: "'a list"

 shows "(subs'' (psiCases Cs) xvec Tvec) = psiCases(caseListSubst Cs xvec Tvec)"
 (induct Cs) auto

  seqSubstSimps[simp]:
 shows "seqSubs (0) σ = 0"
 and "(seqSubs (MN.P) σ) = (substTerm.seqSubst M σ)(substTerm.seqSubst N σ).(seqSubs P σ)"
 and "(seqSubs (M(I) σ) = (substTerm.seqSubst M σopen> Θ; B; Γ' w using check_assertI wf_weakening by metis

 and "(seqSubs (Case C) σ) = (Case (seqSubs'' C σ))"
 and "(seqSubs (P
 and "[y σ] ==> (seqSubs ((νy)
 and "(seqSubs ({Ψ}) σ) = { wf
 and "(seqSubs (!P) σ) = !(seqSubs P σ)"
 
 and "(seqSubs' ((Trm M P)::('a::fs_name, 'b::fs_name, 'c::fs_name) input) σ) = ()::Γd :\\Γ and v::v and xa::x
 and "[y σ] ==> (seqSubs' (ν y I) σ) = (ν y (seqSubs' I σ))"
 
java.lang.NullPointerException
 and "(seqSubs'' (Φ ==> P C) σ) = ((substCond.seqSubst Φ σ) ==> (seqSubs P σ) (seqSubs'' C σ))"
 (induct σ arbitrary: M N P I C Q Ψ Φ, auto simp add: seqSubs_def seqSubs'_def seqSubs''_def)

  seqSubsNil[simp]:
 "seqSubs P [] = P"
 (simp add: seqSubs_def)

  seqSubsCons[simp]:
 shows "seqSubs P ((xvec, Tvec)#σ) = seqSubs(subs P xvec Tvec) σ"
 by(simp add: seqSubs_def)

  seqSubsTermAppend[simp]:
 shows "seqSubs P (σ@σ') = seqSubs (seqSubs P σ) σ'"
 (induct σ) (auto simp add: seqSubs_def)

  caseListSeqSubst :: "('c × ('a, 'b, 'c) psi) list ==> (name list × 'a list) list ==>×
 
 "caseListSeqSubst [] _ = []"
  "caseListSeqSubst ((φ, P)#Cs) σ = (substCond.seqSubst φ σ, (seqSubs P σ))#(caseListSeqSubst Cs σ)"

  seqSubstCases[simp]:
 fixes Cs :: "('c × ('a, 'b, 'c) psi) list"
 and σ :: "(name list × 'a list) list"

 shows "seqSubs (Cases Cs) σ = Cases(caseListSeqSubst Cs σ)"
 (induct Cs) (auto simp add: psi.inject)

 mma seqSubstCases'[simp]:
 fixes Cs :: "('c × ('a, 'b, 'c) psi) list"
 and σ :: "(name list × 'a list) list"

 shows "(seqSubs'' (psiCases Cs) σ) = psiCases(caseListSeqSubst Cs σ)"
 (induct Cs) auto

  seqSubstEqvt[eqvt]:
 fixes P :: "('a, 'b, 'c) psi"
 and σ :: "(name list × 'a list) list"
 and p :: "name prm"

 shows "(p (P[<\<sigma>>])) = (p P)[<(p
 (induct σ arbitrary: P) (auto simp add: eqvts seqSubs_def)

  guardedSeqSubst:
 assumes "guarded P"
 and "wellFormedSubst σ

 shows "guarded(seqSubs P σ)"
  assms
 (induct σ arbitrary: P) (auto dest: guardedSubst)

 

  inter_eqvt:
 shows "(pi::name prm) ((X::name set) Y) = (pi X) (pi
 (auto simp add: perm_set_def perm_bij)

  delete_eqvt:
 fixes p :: "name prm"
 and X :: "name set"
 and Y :: "name set"

 shows "p (X - Y) = (p X) - (p Y)"
 (auto simp add: perm_set_def perm_bij)

  perm_singleton[simp]:
 shows "(p::name prm) {(x::name)} = {p x}"
 (auto simp add:perm_set_de)

 

Messung V0.5 in Prozent
C=72 H=96 G=84

¤ Dauer der Verarbeitung: 0.17 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen



NIST Cobol Testsuite



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 und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

      Eigene Quellcodes
      Fremde Quellcodes
     Quellcodebibliothek
      Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge