theory Relations imports Var begin
default_sort type
text‹Unifying Theories of Programming (UTP) is a semantic framework based on
alphabetized relational calculus. An alphabetized predicate is a pair (alphabet, predicate)
the free variables appearing in the predicate are all in the alphabet.›
text‹An alphabetized relation is an alphabetized predicate where the alphabet is
of input (undecorated) and output (dashed) variables. In this case the
describes a relation between input and output variables.›
subsection‹Definitions›
text‹In this section, the definitions of predicates, relations and
operators are given.›
text‹All useful proved lemmas over predicates and relations are presented here.
, we introduce the most important lemmas that will be used by automatic tools to simplify
. In the second part, other lemmas are proved using these basic ones.›
subsubsection‹Setup of automated tools›
lemma true_intro: "true x"by (simp add: utp_defs) lemma false_elim: "false x ==> C"by (simp add: utp_defs) lemma true_elim: "true x ==> C ==> C"by (simp add: utp_defs)
lemma not_intro: "(P x ==> false x) ==> (¬ P) x"by (auto simp add: utp_defs) lemma not_elim: "(¬ P) x ==> P x ==> C"by (auto simp add: utp_defs) lemma not_dest: "(¬ P) x ==>¬ P x"by (auto simp add: utp_defs)
lemma conj_intro: "P x ==> Q x ==> (P ∧ Q) x"by (auto simp add: utp_defs) lemma conj_elim: "(P ∧ Q) x ==> (P x ==> Q x ==> C) ==> C"by (auto simp add: utp_defs)
lemma disj_introC: "(¬ Q x ==> P x) ==> (P ∨ Q) x"by (auto simp add: utp_defs) lemma disj_elim: "(P ∨ Q) x ==> (P x ==> C) ==> (Q x ==> C) ==> C"by (auto simp add: utp_defs)
lemma impl_intro: "(P x ==> Q x) ==> (P ⟶ Q) x"by (auto simp add: utp_defs) lemma impl_elimC: "(P ⟶ Q) x ==> (¬ P x ==> R) ==> (Q x ==> R) ==> R "by (auto simp add: utp_defs)
lemma iff_intro: "(P x ==> Q x) ==> (Q x ==> P x) ==> (P ⟷ Q) x"by (auto simp add: utp_defs) lemma iff_elimC: "(P ⟷ Q) x ==> (P x ==> Q x ==> R) ==> (¬ P x ==>¬ Q x ==> R) ==> R"by (auto simp add: utp_defs)
lemma all_intro: "(∧a. P a x) ==> (\<forall>a. P a) x"by (auto simp add: utp_defs) lemma all_elim: "(\<forall>a. P a) x ==> (P a x ==> R) ==> R"by (auto simp add: utp_defs)
lemma ex_intro: "P a x ==> (\<exists>a. P a) x"by (auto simp add: utp_defs) lemma ex_elim: "(\<exists>a. P a) x ==> (∧a. P a x ==> Q) ==> Q"by (auto simp add: utp_defs)
lemma comp_intro: "P (a, b) ==> Q (b, c) ==> (P ;; Q) (a, c)" by (auto simp add: comp_def)
lemma comp_elim: "(P ;; Q) ac ==> (∧a b c. ac = (a, c) ==> P (a, b) ==> Q (b, c) ==> C) ==> C" by (auto simp add: comp_def)
declare not_def [simp]
declare iff_intro [intro!] and not_intro [intro!] and impl_intro [intro!] and disj_introC [intro!] and conj_intro [intro!] and true_intro [intro!] and comp_intro [intro]
declare not_dest [dest!] and iff_elimC [elim!] and false_elim [elim!] and impl_elimC [elim!] and disj_elim [elim!] and conj_elim [elim!] and comp_elim [elim!] and true_elim [elim!]
declare all_intro [intro!] and ex_intro [intro] declare ex_elim [elim!] and all_elim [elim]
lemma conj_comp: "(∧ a b c. P (a, b) = P (a, c)) ==> (P ∧ (Q ;; R)) = ((P ∧ Q) ;; R)" by (rule ext) blast
lemma comp_cond_left_distr: assumes"∧x y z. b (x, y) = b (x, z)" shows"((P ◃ b ▹ Q) ;; R) = ((P ;; R) ◃ b ▹ (Q ;; R))" using assms by (auto simp: fun_eq_iff utp_defs)
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.