lemma 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 ♯* (M⟨N⟩.P) = (X ♯* M ∧ X ♯* N ∧ X ♯* P)" and"X ♯* M(I = (X ♯* M ∧ X ♯* I)" and"X ♯* Case C = X ♯* C" and"X ♯* (P ∥ Q) = (X ♯* P ∧ X ♯* Q)" and"X ♯* (νx)P = (X ♯* [x].P)" and"X ♯* {Ψ} = X ♯* Ψ" and"X ♯* !P = X ♯* P" and"X ♯* 0" and"X ♯* Trm N P = (X ♯* N ∧ X ♯* P)" and"X ♯* Bind x I = X ♯* ([x].I)"
and"X ♯* ⊥c" and"X ♯* ◻ Φ ==> P C = (X ♯* Φ ∧ X ♯* P ∧ X ♯* C)" by(auto simp add: fresh_star_def psi.fresh)+
lemma resChainFresh: fixes x :: name and xvec :: "name list" and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi"
shows"x ♯(ν*xvec)P = (x ∈ set xvec ∨ x ♯ P)" by (induct xvec) (simp_all add: abs_fresh)
lemma 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) = (∀x∈Xs. x ∈ set xvec ∨ x ♯ P)" and"yvec ♯* ((ν*xvec)P) = (∀x∈(set yvec). x ∈ set xvec ∨ x ♯ P)" by (simp add: fresh_star_def resChainFresh)+
lemma 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"
lemma 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) = (∀x∈Xs. x ∈ set xvec ∨ (x ♯ N ∧ x ♯ P))" by (simp add: fresh_star_def inputChainFresh)
lemma 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 ⊆ Xs × Ys"
shows"(inputChain xvec N P) = (inputChain (p ∙ xvec) (p ∙ N) (p ∙ P))" proof - note pt_name_inst at_name_inst XsFreshP S moreoverfrom YsFreshN YsFreshP have"Ys ♯* (inputChain xvec N P)" by (simp add: inputChainFreshSet) (simp add: fresh_star_def) ultimatelyhave"(inputChain xvec N P) = p ∙ (inputChain xvec N P)" by (rule_tac pt_freshs_freshs [symmetric]) thenshow ?thesis by(simp add: eqvts) qed
lemma 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 ∙ xvec) ♯* 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))" proof - note pt_name_inst at_name_inst S moreoverhave"set xvec ♯* (inputChain xvec N P)" by (simp add: inputChainFreshSet) ultimatelyshow ?thesis using xvecFreshN xvecFreshP by(rule_tac inputChainAlpha) (simp add: fresh_star_def)+ qed
lemma alphaRes: fixes M :: "'a::fs_name" and x :: name and P :: "('a, 'b::fs_name, 'c::fs_name) psi" and y :: name
assumes yFreshP: "y ♯ P"
shows"(νx)P = (νy)([(x, y)] ∙ P)" proof(cases "x = y") assume"x=y" thus ?thesis by simp next assume"x ≠ y" with yFreshP show ?thesis by(perm_simp add: psi.inject alpha calc_atm fresh_left) qed
lemma 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)" proof(cases "x = c") assume"x=c" thus ?thesis by simp next assume"x ≠ c" with A1 show ?thesis by(perm_simp add: input.inject alpha calc_atm fresh_left) qed
lemma inputChainLengthEq: fixes xvec :: "name list" and yvec :: "name list" and M :: "'a::fs_name" and P :: "('a, 'b::fs_name, 'c::fs_name) psi"
obtains N Q where"inputChain xvec M P = inputChain yvec N Q" proof - assume"∧N Q. inputChain xvec M P = inputChain yvec N Q ==> thesis" moreoverobtain 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) case0 thus ?caseby auto 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‹length xvec = length yvec› obtain y yvec' where"yvec = y#yvec'"by(case_tac yvec) auto from‹yvec = y#yvec'›‹xvec=x#xvec'›‹xvec ♯* yvec›‹distinct yvec›‹length xvec = length yvec›‹yvec ♯* M›‹yvec ♯* P› have"length xvec' = length yvec'"and"xvec' ♯* yvec'"and"distinct yvec'"and"yvec'♯* M"and"yvec' ♯* P" by simp+ thenobtain N Q where Eq: "inputChain xvec' M P = inputChain yvec' N Q"using‹length xvec' = n› by(drule_tac Suc) auto moreoverfrom‹distinct yvec›‹yvec = y#yvec'›have"y ♯ yvec'"by auto moreoverfrom‹xvec ♯* yvec›‹xvec = x#xvec'›‹yvec=y#yvec'›have"x ≠ y"and"x ♯ yvec'" by auto moreoverfrom‹yvec ♯* M›‹yvec ♯* P›‹yvec = y#yvec'›have"y ♯ M"and"y ♯ P"by auto hence"y ♯ inputChain xvec' M P"by(simp add: inputChainFresh) with Eq have"y ♯ inputChain yvec' N Q"by(simp add: inputChainFresh) ultimatelyhave"ν x (inputChain xvec' M P) = ν y (inputChain yvec' ([(x, y)] ∙ N) ([(x, y)] ∙ Q))" by(simp add: input.inject alpha' eqvts name_swap) thus ?caseusing‹xvec = x#xvec'›‹yvec=y#yvec'›by force qed ultimatelyshow ?thesis by blast qed
lemma 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" proof - assume"∧p. [set p ⊆ set xvec × set (p ∙ xvec); distinctPerm p; yvec = p ∙ xvec; N = p ∙ M; Q = p ∙ P]==> thesis" moreoverobtain n where"n = length xvec"by auto with assms have"∃p. (set p) ⊆ (set xvec) × set (yvec) ∧ distinctPerm p ∧ yvec = p∙ xvec ∧ N = p ∙ M ∧ Q = p ∙ P" 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‹0 = length xvec›have"xvec = []"by auto moreoverwith Eq have"yvec = []" by(case_tac yvec) auto ultimatelyshow ?caseusing 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'› 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‹xvec = x#xvec'›‹yvec=y#yvec'›‹xvec ♯* yvec› have"x ≠ y"and"xvec' ♯* yvec'"and"x ♯ yvec'"and"y ♯ xvec'" by(auto simp add: fresh_list_cons) from‹distinct xvec›‹distinct yvec›‹xvec=x#xvec'›‹yvec=y#yvec'›have"x ♯ xvec'"and"y ♯ yvec'"and"distinct xvec'"and"distinct yvec'" 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) ∧ distinctPerm p ∧ yvec = p ∙ xvec ∧ N = p ∙ M ∧ Q = p ∙ P" by fact from EQ ‹x ≠ y›‹x ♯ yvec'›‹y ♯ yvec'›have"inputChain xvec' M P = inputChain yvec' ([(x, y)] ∙ N) ([(x, y)] ∙ Q)" by(simp add: input.inject alpha eqvts) with‹xvec' ♯* yvec'›‹distinct xvec'›‹distinct yvec'›‹length xvec' = n› IH obtain p where S: "(set p) ⊆ (set xvec') × (set yvec')"and"distinctPerm p"and"yvec' = p ∙ xvec'"and"([(x, y)] ∙ N) = p ∙ M"and"([(x, y)] ∙ Q) = p ∙ P" by metis from S have"set((x, y)#p) ⊆ set(x#xvec') × set(y#yvec')"by auto moreoverfrom‹x ♯ xvec'›‹x ♯ yvec'›‹y ♯ xvec'›‹y ♯ yvec'› S have"x ♯ p"and"y ♯p" 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›‹x ≠ y›have"distinctPerm((x, y)#p)"by auto moreoverfrom‹yvec' = p ∙ xvec'›‹x ♯ p›‹y ♯ p›‹x ♯ xvec'›‹y ♯ xvec'›have"(y#yvec') = ((x, y)#p) ∙ (x#xvec')" by(simp add: calc_atm freshChainSimps) moreoverfrom‹([(x, y)] ∙ N) = p ∙ M›have"([(x, y)] ∙ [(x, y)] ∙ N) = [(x, y)] ∙ p ∙ M" by(simp add: pt_bij) hence"N = ((x, y)#p) ∙ M"by simp moreoverfrom‹([(x, y)] ∙ Q) = p ∙ P›have"([(x, y)] ∙ [(x, y)] ∙ Q) = [(x, y)] ∙ p ∙ P" by(simp add: pt_bij) hence"Q = ((x, y)#p) ∙ P"by simp ultimatelyshow ?caseusing‹xvec=x#xvec'›‹yvec=y#yvec'› by blast qed ultimatelyshow ?thesis by blast qed
lemma inputChainEqLength: 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"
shows"length xvec = length yvec" proof - 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‹0 = length xvec›have"xvec = []"by auto moreoverwith‹inputChain xvec M P = inputChain yvec N Q›have"yvec = []" by(case_tac yvec) auto ultimatelyshow ?caseby 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‹inputChain xvec M P = inputChain yvec N Q›‹xvec = x # xvec'› 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. [inputChain xvec (M::'a) (P::('a, 'b, 'c) psi) = inputChain yvec N Q; n = length xvec]==> length xvec = length yvec" 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 ?caseby simp next assume"x ≠ y" with EQ have"inputChain xvec' M P = inputChain ([(x, y)] ∙ yvec') ([(x, y)] ∙ N) ([(x, y)] ∙ Q)" 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 yvec'" by simp with‹xvec = x#xvec'›‹yvec=y#yvec'› show ?caseby simp qed qed qed
lemma alphaInputChain: fixes yvec :: "name list" and xvec :: "name list" and M :: "'a::fs_name" and P :: "('a, 'b::fs_name, 'c::fs_name) psi"
shows"inputChain xvec M P = inputChain yvec ([xvec yvec] ∙v M) ([xvec yvec] ∙v P)" using assms proof(induct rule: composePermInduct) case cBase show ?caseby simp next case(cStep x xvec y yvec) thus ?case apply auto by(subst alphaInput[of y]) (auto simp add: inputChainFresh eqvts) qed
lemma inputChainInject[simp]:
shows"(inputChain xvec M P = inputChain xvec N Q) = ((M = N) ∧ (P = Q))" by(induct xvec) (auto simp add: input.inject alpha)
lemma 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 ∈ set xvec ==> x ∈ supp M" and xvecFreshyvec: "xvec ♯* yvec" and xvecFreshN: "xvec ♯* N" and xvecFreshQ: "xvec ♯* Q"
shows"distinct yvec" proof - 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 ?caseby simp next case(Suc n xvec yvec N Q) have L: "length xvec = length yvec"and"Suc n = length xvec"by fact+ thenobtain 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 ♯ xvec'" 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) moreoverhave Mem:"∧x. x ∈ set xvec ==> x ∈ supp M"by fact with xEq have"∧x. x ∈ set xvec' ==> x ∈ supp M"by simp moreoverhave xvecFreshN: "xvec ♯* N"by fact with xEq xFreshxvec' yFreshxvec' have"xvec' ♯* ([(x, y)] ∙ N)"by simp moreoverhave xvecFreshQ: "xvec ♯* Q"by fact with xEq xFreshxvec' yFreshxvec' have"xvec' ♯* ([(x, y)] ∙ Q)"by simp moreoverhave"Suc n = length xvec"by fact with xEq have"n = length xvec'"by simp moreoverfrom xvec'Freshyvec' xFreshxvec' yFreshxvec' have"xvec' ♯* ([(x, y)] ∙ yvec')" by simp moreoverfrom L' have"length xvec' = length([(x, y)] ∙ yvec')"by simp ultimatelyhave"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] ∙v N"by auto with xEq yEq have"M = [(y, x)] ∙ [yvec' xvec'] ∙v N" by simp with xSuppM have ySuppN: "y ∈ supp([yvec' xvec'] ∙v N)" by(drule_tac pi="[(x, y)]"in pt_set_bij2[OF pt_name_inst, OF at_name_inst])
(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) moreoverfrom xvecFreshN xEq xFreshxvec' have"xvec' ♯* N"by simp ultimatelyhave"y ♯ [yvec' xvec'] ∙v N"using L' xvec'Freshyvec' xvec'Dist by(force intro: freshChainPerm simp add: freshChainSym) with ySuppN show"False"by(simp add: fresh_def) qed with‹distinct yvec'› yEq show ?caseby simp qed qed
| "guarded' (Trm M P) = False"
| "guarded' (ν y I) = False"
| "guarded'' (⊥c) = True"
| "guarded'' (◻φ ==> P C) = (guarded P ∧ guarded'' C)" apply(finite_guess)+ apply(rule TrueI)+ by(fresh_guess add: fresh_bool)+
lemma guardedEqvt[eqvt]: fixes p :: "name prm" and P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi" and I :: "('a, 'b, 'c) input" and C :: "('a, 'b, 'c) psiCase"
shows"(p ∙ (guarded P)) = guarded (p ∙ P)" and"(p ∙ (guarded' I)) = guarded' (p ∙ I)" and"(p ∙ (guarded'' C)) = guarded'' (p ∙ C)" by(nominal_induct P and I and C rule: psi_input_psiCase.strong_inducts)
(simp add: eqvts)+
lemma guardedClosed[simp]: fixes P :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi" and p :: "name prm"
for substTerm :: "('a::fs_name) ==> name list ==> 'a::fs_name list ==> 'a" and substAssert :: "('b::fs_name) ==> name list ==> 'a::fs_name list ==> 'b" and substCond :: "('c::fs_name) ==> name list ==> 'a::fs_name list ==> 'c" begin
nominal_primrec
subs :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psi ==> name list ==> 'a list ==> ('a, 'b, 'c) psi" and subs' :: "('a::fs_name, 'b::fs_name, 'c::fs_name) input ==> name list ==> 'a list ==> ('a, 'b, 'c) input" and subs'' :: "('a::fs_name, 'b::fs_name, 'c::fs_name) psiCase ==> name list ==> 'a list ==> ('a, 'b, 'c) psiCase"
where "subs (0) xvec Tvec = 0"
| "(subs (M⟨N⟩.P) xvec Tvec) = (substTerm M xvec Tvec)⟨(substTerm N xvec Tvec)⟩.(subs P xvec Tvec)"
| "(subs (M(I) xvec Tvec) = (substTerm M xvec Tvec)((subs' I xvec Tvec)"
lemma substEqvt[eqvt]: fixes p :: "name prm" and 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 ∙ Tvec)" and"(p ∙ (subs' I xvec Tvec)) = subs' (p ∙ I) (p ∙ xvec) (p ∙ Tvec)" and"(p ∙ (subs'' C xvec Tvec)) = subs'' (p ∙ C) (p ∙ xvec) (p ∙ Tvec)" apply(nominal_induct P and I and C avoiding: xvec Tvec rule: psi_input_psiCase.strong_inducts) apply(auto simp add: eqvts) apply(drule_tac pi=p in pt_fresh_bij1[OF pt_name_inst, OF at_name_inst]) apply(drule_tac pi=p in pt_fresh_bij1[OF pt_name_inst, OF at_name_inst]) apply simp apply(drule_tac pi=p in pt_fresh_bij1[OF pt_name_inst, OF at_name_inst]) apply(drule_tac pi=p in pt_fresh_bij1[OF pt_name_inst, OF at_name_inst]) by simp
lemma 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 ♯ (subs' I xvec Tvec)" and"x ♯ C ==> x ♯ (subs'' C xvec Tvec)" using assms by(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)
lemma subst2Chain[intro]: fixes xvec :: "name list" and Tvec :: "'a 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)" using assms by(auto intro: subst2 simp add: fresh_star_def)
lemma renaming: fixes xvec :: "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 ∙ xvec)" and"distinctPerm p"
shows"[(p ∙ xvec) ♯* P]==> (subs P xvec Tvec) = subs (p ∙ P) (p ∙ xvec) Tvec" and"[(p ∙ xvec) ♯* I]==> (subs' I xvec Tvec) = subs' (p ∙ I) (p ∙ xvec) Tvec" and"[(p ∙ xvec) ♯* C]==> (subs'' C xvec Tvec) = subs'' (p ∙ C) (p ∙ xvec) Tvec" using assms by(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)
lemma subst4Chain: 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"
shows"xvec ♯* (subs P xvec Tvec)" and"xvec ♯* (subs' I xvec Tvec)" and"xvec ♯* (subs'' C xvec Tvec)" using assms by(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)
lemma 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"
shows"guarded P ==> guarded(subs P xvec Tvec)" and"guarded' I ==> guarded'(subs' I xvec Tvec)" and"guarded'' C ==> guarded''(subs'' C xvec Tvec)" using assms by(nominal_induct P and I and C avoiding: xvec Tvec rule: psi_input_psiCase.strong_inducts) auto
definition seqSubs :: "('a, 'b, 'c) psi ==> (name list × 'a list) list ==> ('a, 'b, 'c) psi" (‹_[🪙]› [80, 80] 130) where"P[<σ>] ≡ foldl (λQ. λ(xvec, Tvec). subs Q xvec Tvec) P σ"
definition 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 σ"
definition seqSubs'' :: "('a, 'b, 'c) psiCase ==> (name list × 'a list) list ==> ('a, 'b, 'c) psiCase" where"seqSubs'' C σ ≡ foldl (λQ. λ(xvec, Tvec). subs'' Q xvec Tvec) C σ"
lemma 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 ♯* Tvec"
shows"subs' (inputChain xvec N P) yvec Tvec = inputChain xvec (substTerm N yvec Tvec) (subs P yvec Tvec)" using assms by(induct xvec) (auto simp add: psi.inject)
fun caseListSubst :: "('c × ('a, 'b, 'c) psi) list ==> name list ==> 'a list ==> ('c × ('a, 'b, 'c) psi) list" where "caseListSubst [] _ _ = []"
| "caseListSubst ((φ, P)#Cs) xvec Tvec = (substCond φ xvec Tvec, (subs P xvec Tvec))#(caseListSubst Cs xvec Tvec)"
lemma seqSubstSimps[simp]: shows"seqSubs (0) σ = 0" and"(seqSubs (M⟨N⟩.P) σ) = (substTerm.seqSubst M σ)⟨(substTerm.seqSubst N σ)⟩.(seqSubs P σ)" and"(seqSubs (M(I) σ) = (substTerm.seqSubst M σ)((seqSubs' I σ)"
and"(seqSubs (Case C) σ) = (Case (seqSubs'' C σ))" and"(seqSubs (P ∥ Q) σ) = (seqSubs P σ) ∥ (seqSubs Q σ)" and"[y ♯ σ]==> (seqSubs ((νy)P) σ) = (νy)(seqSubs P σ)" and"(seqSubs ({Ψ}) σ) = {(substAssert.seqSubst Ψ σ)}" and"(seqSubs (!P) σ) = !(seqSubs P σ)"
and"(seqSubs' ((Trm M P)::('a::fs_name, 'b::fs_name, 'c::fs_name) input) σ) = ()(substTerm.seqSubst M σ).(seqSubs P σ))" and"[y ♯ σ]==> (seqSubs' (ν y I) σ) = (ν y (seqSubs' I σ))"
and"(seqSubs'' (⊥c::('a::fs_name, 'b::fs_name, 'c::fs_name) psiCase) σ) = ⊥c" and"(seqSubs'' (◻Φ ==> P C) σ) = (◻(substCond.seqSubst Φ σ) ==> (seqSubs P σ) (seqSubs'' C σ))" by(induct σ arbitrary: M N P I C Q Ψ Φ, auto simp add: seqSubs_def seqSubs'_def seqSubs''_def)
lemma seqSubsNil[simp]: "seqSubs P [] = P" by(simp add: seqSubs_def)
lemma seqSubsCons[simp]: shows"seqSubs P ((xvec, Tvec)#σ) = seqSubs(subs P xvec Tvec) σ" by(simp add: seqSubs_def)
lemma seqSubsTermAppend[simp]: shows"seqSubs P (σ@σ') = seqSubs (seqSubs P σ) σ'" by(induct σ) (auto simp add: seqSubs_def)
fun caseListSeqSubst :: "('c × ('a, 'b, 'c) psi) list ==> (name list × 'a list) list ==> ('c × ('a, 'b, 'c) psi) list" where "caseListSeqSubst [] _ = []"
| "caseListSeqSubst ((φ, P)#Cs) σ = (substCond.seqSubst φ σ, (seqSubs P σ))#(caseListSeqSubst Cs σ)"
lemma seqSubstCases[simp]: fixes Cs :: "('c × ('a, 'b, 'c) psi) list" and σ :: "(name list × 'a list) list"
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.