Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/Psi_Calculi/   (Sammlung formaler Beweise Version 2026-5©)  Datei vom 31.4.2026 mit Größe 5 kB image not shown  

Quelle  Sum.thy

  Sprache: Isabelle
 

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

theory Sum
  imports Semantics Close_Subst
begin

context env
begin

abbreviation sumAssertJudge (_ _ _ [1505050150
  where "(P::('a, 'b, 'c) psi) \<phi> Q Cases [(φ, P), (φ, Q)]"

lemma SumAssert1:
  fixes Ψ :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"

  assumes  P Rs"
  and      φ"
  and     "guarded P"

  shows  P \<phi> Q Rs"
proof -
  note Ψ P Rs
  moreover have "(φ, P) mem [(φ, P), (φ, Q)]" by simp
  ultimately show ?thesis using Ψ φ guarded P
    by(rule Case)
qed

lemma SumAssert2:
  fixes Ψ :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"

  assumes  Q Rs"
  and      φ"
  and     "guarded Q"

  shows  P \<phi> Q Rs"
proof -
  note Ψ Q Rs
  moreover have "(φ, Q) mem [(φ, P), (φ, Q)]" by simp
  ultimately show ?thesis using Ψ φ guarded Q
    by(rule Case)
qed

lemma sumAssertCases[consumes 2, case_names cSum1 cSum2]:
  fixes Ψ :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"
  and   φ :: 'c

  assumes  P \<phi> Q Rs"
  and      φ"
  and     rSum1: "[Ψ P Rs; guarded P] ==> Prop"
  and     rSum2: "[Ψ Q Rs; guarded Q] ==> Prop"

  shows Prop
proof -
  from Ψ P \φ Q Rs show ?thesis
  proof(induct rule: caseCases)
    case(cCase φ' P')
    from (φ', P') mem [(φ, P), (φ, Q)]
    have "φ = φ'" and D: "P = P' Q = P'" by auto
    from D show ?thesis
    proof(rule disjE)
      assume "P = P'"
      with Ψ P' Rs guarded P' show ?case by(rule_tac rSum1) auto
    next
      assume "Q = P'"
      with Ψ P' Rs guarded P' show ?case by(rule_tac rSum2) auto
    qed
  qed
qed

lemma sumElim[dest]:
  fixes Ψ :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"
  and   φ :: 'c

  assumes  P \<phi> Q Rs"
  and     "¬ φ)"

  shows False
using assms
by(induct rule: caseCases) auto

end

locale sum = env +
  fixes T :: 'c

  assumes Top:  T"
  and     TopEqvt[eqvt]: "((p::name prm) T) = T"
  and     TopSubst[simp]: "substCond T xvec Tvec = T"
begin

abbreviation topJudge ( 150where " T"
abbreviation sumJudge (infixr  80where "P Q P \<top> Q"

lemma topSeqSubst[simp]:
  shows "(substCond.seqSubst T σ) = T"
by(induct σ) auto

lemma suppTop:
  shows "((supp())::name set) = {}"
by(auto simp add: supp_def eqvts)

lemma freshTop[simp]:
  fixes x    :: name
  and   xvec :: "name list"
  and   Xs   :: "name set"

  shows "x " and "xvec * " and "Xs * "
by(auto simp add: fresh_def fresh_star_def suppTop)

lemma sumSubst[simp]:
  fixes P    :: "('a, 'b, 'c) psi"
  and   Q    :: "('a, 'b, 'c) psi"
  and   xvec :: "name list"
  and   Tvec :: "'a list"

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

  shows "(P Q)[xvec::=Tvec] = (P[xvec::=Tvec] Q[xvec::=Tvec])"
by auto

lemma sumSeqSubst[simp]:
  fixes P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"
  and   σ :: "(name list × 'a list) list"

  assumes "wellFormedSubst σ"

  shows "(P Q)[<σ>] = ((P[<σ>]) (Q[<σ>]))"
using assms
by(induct σ arbitrary: P Q) auto

lemma Sum1:
  fixes Ψ :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"

  assumes  P Rs"
  and     "guarded P"

  shows  P Q Rs"
proof -
  have  " by(rule Top)
  with Ψ P Rs show ?thesis using guarded P
    by(rule SumAssert1)
qed

lemma Sum2:
  fixes Ψ :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"

  assumes  Q Rs"
  and     "guarded Q"

  shows  P Q Rs"
proof -
  have  " by(rule Top)
  with Ψ Q Rs show ?thesis using guarded Q
    by(rule SumAssert2)
qed

lemma sumCases[consumes 1, case_names cSum1 cSum2]:
  fixes Ψ :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"

  assumes  P Q Rs"
  and     rSum1: "[Ψ P Rs; guarded P] ==> Prop"
  and     rSum2: "[Ψ Q Rs; guarded Q] ==> Prop"

  shows Prop
proof -
  have  " by(rule Top)
  with Ψ P Q Rs show ?thesis
  proof(induct rule: sumAssertCases)
    case cSum1
    thus ?case by (rule rSum1)
  next
    case cSum2
    thus ?case by(rule rSum2)
  qed
qed

end

end


Messung V0.5 in Prozent
C=69 H=90 G=80

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-10) ¤

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