Theory utp_theory
section ‹ UTP Theories ›
theory utp_theory
imports utp_rel_laws
begin
text ‹ Here, we mechanise a representation of UTP theories using locales~\<^cite>‹"Ballarin06"›. We also
link them to the HOL-Algebra library~\<^cite>‹"Ballarin17"›, which allows us to import properties from
complete lattices and Galois connections. ›
subsection ‹ Complete lattice of predicates ›
definition upred_lattice :: "('α upred) gorder" (‹𝒫›) where
"upred_lattice = ⦇ carrier = UNIV, eq = (=), le = (⊑) ⦈"
text ‹ @{term "𝒫"} is the complete lattice of alphabetised predicates. All other theories will
be defined relative to it. ›
interpretation upred_lattice: complete_lattice 𝒫
proof (unfold_locales, simp_all add: upred_lattice_def)
fix A :: "'α upred set"
show "∃s. is_lub ⦇carrier = UNIV, eq = (=), le = (⊑)⦈ s A"
apply (rule_tac x="⨆ A" in exI)
apply (rule least_UpperI)
apply (auto intro: Inf_greatest simp add: Inf_lower Upper_def)
done
show "∃i. is_glb ⦇carrier = UNIV, eq = (=), le = (⊑)⦈ i A"
apply (rule_tac x="⨅ A" in exI)
apply (rule greatest_LowerI)
apply (auto intro: Sup_least simp add: Sup_upper Lower_def)
done