Up to index of Isabelle/HOL/HOL-Complex/CSP-Prover
theory Conditional = CSP_semantics:(*-------------------------------------------* | CSP-Prover | | December 2004 | | Yoshinao Isobe (AIST JAPAN) | *-------------------------------------------*) theory Conditional = CSP_semantics: (* The following simplification rules are deleted in this theory file *) (* because they unexpectly rewrite UnionT and InterT. *) (* disj_not1: (~ P | Q) = (P --> Q) *) declare disj_not1 [simp del] (* The following simplification is sometimes unexpected. *) (* *) (* not_None_eq: (x ~= None) = (EX y. x = Some y) *) declare not_None_eq [simp del] (********************************************************* Dom_T *********************************************************) (*** Conditional_memT ***) lemma Conditional_memT: "(t :t [[IF b THEN P ELSE Q]]T ev) = (if b then t :t [[P]]T ev else t :t [[Q]]T ev)" by (simp add: evalT_def) (********************************************************* Dom_F *********************************************************) (*** Conditional_memF ***) lemma Conditional_memF: "(f :f [[IF b THEN P ELSE Q]]F ev) = (if b then f :f [[P]]F ev else f :f [[Q]]F ev)" by (simp add: evalF_def) lemmas Conditional_mem = Conditional_memT Conditional_memF (******************************* domSF *******************************) (* T2 *) lemma Conditional_T2 : "[| ([[P]]T ev, [[P]]F ev) : domSF ; ([[Q]]T ev, [[Q]]F ev) : domSF |] ==> HC_T2 ([[IF b THEN P ELSE Q]]T ev, [[IF b THEN P ELSE Q]]F ev)" by (simp add: HC_T2_def Conditional_mem domSF_def) (* F3 *) lemma Conditional_F3 : "[| ([[P]]T ev, [[P]]F ev) : domSF ; ([[Q]]T ev, [[Q]]F ev) : domSF |] ==> HC_F3 ([[IF b THEN P ELSE Q]]T ev, [[IF b THEN P ELSE Q]]F ev)" by (simp add: HC_F3_def Conditional_mem domSF_def) (* T3_F4 *) lemma Conditional_T3_F4 : "[| ([[P]]T ev, [[P]]F ev) : domSF ; ([[Q]]T ev, [[Q]]F ev) : domSF |] ==> HC_T3_F4 ([[IF b THEN P ELSE Q]]T ev, [[IF b THEN P ELSE Q]]F ev)" by (simp add: HC_T3_F4_def Conditional_mem domSF_iff) (*** Conditional_domSF ***) lemma Conditional_domSF : "[| ([[P]]T ev, [[P]]F ev) : domSF ; ([[Q]]T ev, [[Q]]F ev) : domSF |] ==> ([[IF b THEN P ELSE Q]]T ev, [[IF b THEN P ELSE Q]]F ev) : domSF" apply (simp (no_asm) add: domSF_iff) apply (simp add: Conditional_T2) apply (simp add: Conditional_F3) apply (simp add: Conditional_T3_F4) done (********************************************************* mono *********************************************************) (*** T ***) lemma Conditional_evalT_mono: "[| [[P1]]T ev1 <= [[P2]]T ev2 ; [[Q1]]T ev1 <= [[Q2]]T ev2 |] ==> [[IF b THEN P1 ELSE Q1]]T ev1 <= [[IF b THEN P2 ELSE Q2]]T ev2" apply (simp add: subsetT_iff) apply (intro allI impI) by (simp add: Conditional_memT) (*** F ***) lemma Conditional_evalF_mono: "[| [[P1]]F ev1 <= [[P2]]F ev2 ; [[Q1]]F ev1 <= [[Q2]]F ev2 |] ==> [[IF b THEN P1 ELSE Q1]]F ev1 <= [[IF b THEN P2 ELSE Q2]]F ev2" apply (simp add: subsetF_iff) apply (intro allI impI) by (simp add: Conditional_memF) (****************** to add them again ******************) declare disj_not1 [simp] declare not_None_eq [simp] end
lemma Conditional_memT:
(t :t [[IF b THEN P ELSE Q]]T ev) = (if b then t :t [[P]]T ev else t :t [[Q]]T ev)
lemma Conditional_memF:
(f :f [[IF b THEN P ELSE Q]]F ev) = (if b then f :f [[P]]F ev else f :f [[Q]]F ev)
lemmas Conditional_mem:
(t :t [[IF b THEN P ELSE Q]]T ev) = (if b then t :t [[P]]T ev else t :t [[Q]]T ev)
(f :f [[IF b THEN P ELSE Q]]F ev) = (if b then f :f [[P]]F ev else f :f [[Q]]F ev)
lemma Conditional_T2:
[| ([[P]]T ev, [[P]]F ev) ∈ domSF; ([[Q]]T ev, [[Q]]F ev) ∈ domSF |] ==> HC_T2 ([[IF b THEN P ELSE Q]]T ev, [[IF b THEN P ELSE Q]]F ev)
lemma Conditional_F3:
[| ([[P]]T ev, [[P]]F ev) ∈ domSF; ([[Q]]T ev, [[Q]]F ev) ∈ domSF |] ==> HC_F3 ([[IF b THEN P ELSE Q]]T ev, [[IF b THEN P ELSE Q]]F ev)
lemma Conditional_T3_F4:
[| ([[P]]T ev, [[P]]F ev) ∈ domSF; ([[Q]]T ev, [[Q]]F ev) ∈ domSF |] ==> HC_T3_F4 ([[IF b THEN P ELSE Q]]T ev, [[IF b THEN P ELSE Q]]F ev)
lemma Conditional_domSF:
[| ([[P]]T ev, [[P]]F ev) ∈ domSF; ([[Q]]T ev, [[Q]]F ev) ∈ domSF |] ==> ([[IF b THEN P ELSE Q]]T ev, [[IF b THEN P ELSE Q]]F ev) ∈ domSF
lemma Conditional_evalT_mono:
[| [[P1]]T ev1 ≤ [[P2]]T ev2; [[Q1]]T ev1 ≤ [[Q2]]T ev2 |] ==> [[IF b THEN P1 ELSE Q1]]T ev1 ≤ [[IF b THEN P2 ELSE Q2]]T ev2
lemma Conditional_evalF_mono:
[| [[P1]]F ev1 ≤ [[P2]]F ev2; [[Q1]]F ev1 ≤ [[Q2]]F ev2 |] ==> [[IF b THEN P1 ELSE Q1]]F ev1 ≤ [[IF b THEN P2 ELSE Q2]]F ev2