Theory Modal_Quantale
section ‹Modal quantales›
theory Modal_Quantale
imports Quantales.Quantale_Star Modal_Kleene_Algebra_Var KAD.Modal_Kleene_Algebra
begin
subsection ‹Simplified modal semirings and Kleene algebras›
text ‹The previous formalisation of modal Kleene algebra in the AFP adds two compatibility axioms between domain and codomain
when combining an antidomain semiring with an antirange semiring. But these are unnecessary. They are derivable from the other
axioms. Thus I provide a simpler axiomatisation that should eventually replace the one in the AFP.›
class modal_semiring_simp = antidomain_semiring + antirange_semiring
lemma (in modal_semiring_simp) dr_compat [simp]: "d (r x) = r x"
proof-
have a: "ar x ⋅ d (r x) = 0"
using local.ads_d_def local.ars_r_def local.dpdz.dom_weakly_local by auto
have "r x ⋅ d (r x) ⋅ ar x ≤ r x ⋅ ar x"
by (simp add: local.a_subid_aux2 local.ads_d_def local.mult_isor)
hence b: "r x ⋅ d (r x) ⋅ ar x = 0"
by (simp add: local.ardual.am2 local.ars_r_def local.join.bot_unique)
have "d (r x) = (ar x + r x) ⋅ d (r x)"
using local.add_comm local.ardual.ans3 local.ars_r_def local.mult_1_left by presburger
also have "… = ar x ⋅ d (r x) + r x ⋅ d (r x)"
by simp
also have "… = r x ⋅ d (r x)"
by (simp add: a)
also have "… = r x ⋅ d (r x) ⋅ (ar x + r x)"
using local.add_comm local.ardual.ans3 local.ars_r_def by auto
also have "… = r x ⋅ d (r x) ⋅ ar x + r x ⋅ d (r x) ⋅ r x"
by simp
also have "… = r x ⋅ d (r x) ⋅ r x"
using b by auto
also have "… = r x"
by (metis local.ads_d_def local.am3 local.ardual.a_mult_idem local.ars_r_def local.ds.ddual.mult_assoc)
finally show ?thesis
by simp
qed
lemma (in modal_semiring_simp) rd_compat [simp]: "r (d x) = d x"
by (smt (verit) local.a_mult_idem local.ads_d_def local.am2 local.ardual.dpdz.dom_weakly_local local.ars_r_def local.dr_compat local.kat_3_equiv')
subclass (in modal_semiring_simp) modal_semiring
apply unfold_locales by simp_all
class modal_kleene_algebra_simp = modal_semiring_simp + kleene_algebra
subclass (in modal_kleene_algebra_simp) modal_kleene_algebra..
subsection ‹Domain quantales›
class domain_quantale = unital_quantale + domain_op +
assumes dom_absorb: "x ≤ dom x ⋅ x"
and dom_local: "dom (x ⋅ dom y) = dom (x ⋅ y)"
and dom_add: "dom (x ⊔ y) = dom x ⊔ dom y"
and dom_subid: "dom x ≤ 1"
and dom_zero [simp]: "dom ⊥ = ⊥"
text ‹The definition is that of a domain semiring. I cannot extend the quantale class with respect to domain semirings
because of different operations are used for addition/sup. The following sublocale statement brings all those properties into scope.›