Theory Conditional_cpo

Up to index of Isabelle/HOL/HOL-Complex/CSP-Prover

theory Conditional_cpo = Conditional + Domain_SF_prod_cpo:

           (*-------------------------------------------*
            |                CSP-Prover                 |
            |               February 2005               |
            |        Yoshinao Isobe (AIST JAPAN)        |
            *-------------------------------------------*)

theory Conditional_cpo = Conditional + Domain_SF_prod_cpo:

(*  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]

(*  The following simplification rules are deleted in this theory file *)
(*  because they unexpectly rewrite UnionT and InterT.                 *)
(*                  Union (B ` A) = (UN x:A. B x)                      *)
(*                  Inter (B ` A) = (INT x:A. B x)                     *)
(*                  disj_not1: (~ P | Q) = (P --> Q)                   *)

declare Union_image_eq [simp del]
declare Inter_image_eq [simp del]

(*****************************************************************

         1. [[IF b THEN P ELSE Q]]T : continuous
         2. [[IF b THEN P ELSE Q]]F : continuous
         3. 
         4. 

 *****************************************************************)

(*** Conditional_evalT_continuous ***)

lemma Conditional_evalT_continuous:
 "[| continuous [[P]]T ; continuous [[Q]]T |]
  ==> continuous [[IF b THEN P ELSE Q]]T"
apply (simp add: continuous_iff)
apply (intro allI impI)
apply (drule_tac x="X" in spec, simp)
apply (drule_tac x="X" in spec, simp)
apply (elim conjE exE)
apply (case_tac "b")
 apply (simp add: evalT_def)
 apply (rule_tac x="x" in exI, simp)
 apply (simp add: evalT_def)
 apply (rule_tac x="xa" in exI, simp)
done

(*** Conditional_evalF_continuous ***)

lemma Conditional_evalF_continuous:
 "[| continuous [[P]]F ; continuous [[Q]]F |]
  ==> continuous [[IF b THEN P ELSE Q]]F"
apply (simp add: continuous_iff)
apply (intro allI impI)
apply (drule_tac x="X" in spec, simp)
apply (drule_tac x="X" in spec, simp)
apply (elim conjE exE)
apply (case_tac "b")
 apply (simp add: evalF_def)
 apply (rule_tac x="x" in exI, simp)
 apply (simp add: evalF_def)
 apply (rule_tac x="xa" in exI, simp)
done

(****************** to add them again ******************)

declare Union_image_eq [simp]
declare Inter_image_eq [simp]
declare disj_not1      [simp]
declare not_None_eq    [simp]

end

lemma Conditional_evalT_continuous:

  [| continuous [[P]]T; continuous [[Q]]T |]
  ==> continuous [[IF b THEN P ELSE Q]]T

lemma Conditional_evalF_continuous:

  [| continuous [[P]]F; continuous [[Q]]F |]
  ==> continuous [[IF b THEN P ELSE Q]]F