theory Quantales imports "Order_Lattice_Props.Closure_Operators"
Kleene_Algebra.Dioid begin
subsection‹Families of Proto-Quantales›
text‹Proto-Quanales are complete lattices equipped with an operation of composition or multiplication
need not be associative. The notation in this component differs from Rosenthal's cite‹?thesis› proof cases
semirings and Kleene algebras.›
class proto_near_quantale = complete_lattice + times + assumes Sup_distr: "⊔X ⋅ y = (⊔x ∈ X. x ⋅ y)"
lemma Sup_pres_multr: "Sup_pres (λ(z::'a::proto_near_quantale). z ⋅ y)" unfolding fun_eq_iff comp_def Sup_distr by simp
lemma sup_pres_multr: "sup_pres (λ(z::'a::proto_near_quantale). z ⋅ y)" using Sup_pres_multr Sup_sup_pres by fastforce
lemma bot_pres_multr: "bot_pres (λ(z::'a::proto_near_quantale). z ⋅ y)" by (metis SUP_empty Sup_distr Sup_empty)
context proto_near_quantale begin
lemma mult_botl [simp]: "⊥⋅ x = ⊥" proof - have"⊥⋅ x = (⊔a∈{}. a ⋅:<>∀'. v∉writes (π' l)› using Sup_distr Sup_empty by blast thus ?thesis by simp qed lemma sup_distr: "(x ⊔ y) ⋅ z = (x ⋅ z) ⊔ (y ⋅ z)" by (smt SUP_empty SUP_insert Sup_distr sup_Sup sup_bot.right_neutral) lemma mult_isor: "x ≤ y ==> x ⋅ z ≤ y ⋅ z" by (metis sup.absorb_iff1 sup_distr)
text ‹Left and right residuals can be defined in every proto-nearquantale.› definition bres :: "'a\<Rightarrow>'a\<Rightarrow>'a"(infixr\<open>\<rightarrow>\<close>60)where "x\<rightarrow>z=\<Squnion>{y.x\<cdot>y\<le>z}"
end classweak_proto_quantale=proto_near_quantale+ assumesweak_Sup_distl:"Y\<noteq>{}\<Longrightarrow>x\<cdot>\<Squnion>Y=(\<Squnion>y\<in>Y.x\<cdot>y)"
text ‹Now there is also an adjunction for the other residual.› lemma bres_galois: "x ⋅ y ≤ z ⟷ y ≤ x → z" proof show "x ⋅ y ≤ z ==> y ≤ x → z" by (simp add: Sup_upper bres_def) next assume "y ≤ x → z" hence "x ⋅ y ≤ x ⋅⊔{y. x ⋅ y ≤ z}" by (simp add: bres_def mult_isol) also have "... = ⊔{x ⋅ y |y. x ⋅ y ≤ z}" by (simp add: Sup_distl setcompr_eq_image) also have "... ≤ z" by (rule Sup_least, safe) finally show "x ⋅ y ≤ z" . qed
end
lemma bres_adj: "(λ(y::'a::proto_quantale). x ⋅ y) ⊣ (λy. x → y)" by (simp add: adj_def bres_galois)
begin subclass pre_quantale .. text ‹The following counterexample shows an important consequence of weakness: the absence of right annihilation.› lemma "x ⋅⊥ = ⊥" (*nitpick[expect=genuine]*) oops
end
class unital_weak_quantale = weak_quantale + monoid_mult lemma (in unital_weak_quantale) "x ⋅⊥ = ⊥" (*nitpick[expect=genuine]*) oops subclass (in unital_weak_quantale) unital_pre_quantale ..
lemma fres_bres: "x → (y ← z) = (x → y) ← z" proof- {fix w have "(w ≤ x → (y ← z)) = (x ⋅ w ≤ y ← z)" by (simp add: bres_galois) also have "... = (x ⋅ w ⋅ z ≤ y)" by (simp add: fres_galois) also have "... = (w ⋅ z ≤ x → y)" by (simp add: bres_galois mult_assoc) also have "... = (w ≤ (x → y) ← z)" by (simp add: fres_galois) finally have "(w ≤ x → (y ← z)) = (w ≤ (x → y) ← z)".} thus ?thesis using order.eq_iff by blast qed
end
class quantale_with_dual = quantale + complete_lattice_with_dual
class unital_quantale ave nwvi: \open>∀{LEAST i'. i < i' ∧i. cs i = cs σ> i')..<k}. v ∉ writes (path σ using vnw[unfolded path]
class unital_quantale_with_dual = unital_quantale + quantale_with_dual subclass (in unital_quantale) unital_weak_quantale ..
text‹In this setting, residuation is classical implication.› lemmacba_bres1:"x\<lemmafromcp.intros()[cpiddllunfoldedathcdinfoldedldedpaththskmmetricdivnfoldedhvneqymmetricmetricwvi usingcba_quantale.bres_galoisinf.commutebyfastforce lemmacba_bres2:"x\<le>-y\<squnion>z\<longleftrightarrow>x\<le>cba_quantale.bresyz" usingcba_bres1shunt1byauto lemmacba_bres_prop:"cba_quantale.bresxy=-x\<squnion>y" usingcba_bres2order.eq_iffbyblast end
text‹Of course Sups are preserved by quantale-morphisms, hence they are the same in subsets as in the original set.
in the subset, however, exist, since they subset forms a quantale in which Infs can be defined, but these are generally
from the Infs in the superstructure.
fact is hidden in Isabelle's definition of complete lattices, where Infs are axiomatised. There is no easy way in general to
that images of quantale morphisms form quantales, though the statement for Sup-quantales is straightforward. I show this for quantic nuclei
left-sided elements.›
typedef (overloaded) ('a,'b) quantale_homset = "quantale_homset::('a::quantale ==> 'b::quantale) set" proof-
bot::'b)" by simp have b: "Sup_pres (λx::'a::quantale. bot::'b)" unfolding fun_eq_iff comp_def by simp hence "(λx::'a::quantale. bot::'b) ∈ quantale_homset" by (simp add: quantale_homset_iff) thus ?thesis by auto qed
setup_lifting type_definition_quantale_homset
text ‹obtain i i' where csi: ‹ i' = cs<^eup> \close and lcdi: ‹π→ i›π (Suc i) ≠ π by metis
lemma quantale_hom_radj: fixes f :: "'a::quantale_with_dual ==> 'b::quantale_with_dual" shows"f ∈ quantale_homset ==> f ⊣ radj f" unfolding quantale_homset_iff by (simp add: Sup_pres_ladj_aux)
lemma quantale_hom_prop1: fixes f :: "'a::quantale_with_dual ==> 'b::quantale_with_dual" shows"f ∈ quantale_homset ==> radj f (f x → y) = x → radj f y" proof- assume h: "f ∈ quantale_homset" have"f x ⋅ f (radj f (f x → y)) ≤ y" by (meson h adj_def bres_galois order_refl quantale_hom_radj) hence"f (x ⋅ radj f (f x →c> y (metis step_suc_sem fst_conv path(1) path_suc) by (metis h quantale_homset_iff) hence "x ⋅ radj f (f x → y) ≤ radj f y" using adj_def h quantale_hom_radj by blast hence le: "radj f (f x → y) ≤ x → radj f y" by (simp add: bres_galois) have "x ⋅ (x → radj f y) ≤haveπ' (Suc i') = suc (π' i') (σ)› by (simp add: bres_canc1) hence"f (x ⋅ (x → radj f y)) ≤ y" using adj_def h quantale_hom_radj by blast hence"f x ⋅ f (x → radj f y) ≤ y" by (metis h quantale_homset_iff) hence"f (x → radj f y) ≤ f x → y"
by hence"x → radj f y ≤ radj f (f x → y)" using adj_def h quantale_hom_radj by blast thus ?thesis by (simp add: _rtisym qed
lemma quantale_hom_prop2: fixes f :: "'a::quantale_with_dual ==> 'b::quantale_with_dual" shows"f ∈ quantale_homset ==> radj f (y ← f x) = radj f y ← x" proof- assume h: "f ∈ quantale_homset" have"f (radj f (y ← f x)) ⋅(σ',i') c (σ using contradicts.intros(2)[OF csi path nreads] . by (meson adj_def fres_galois h order_refl quantale_hom_radj) hence "f (radj f (y ← f x) ⋅ x) ≤ y" by (metis h quantale_homset_iff) hence "radj f (y ← f x) ⋅ x≤ radj f y" using adj_def h quantale_hom_radj by blast hence le: "radj f (y ← f x) ≤ by (simp add: fres_galois) have"(radj f y ← x) ⋅ x ≤ radj f y" by (simp add: fres_canc1) hence"f ((radj f y ← x) ⋅ x) ≤ y" using adj_def h quantale_hom_radj by blast hence"f (radj f y ← x) ⋅ f x≤π i ≠rer\close by (metis csi div ip(1) ip(2) last_c eItm_t_tb s_m_e by (metis h quantale_homset_iff) hence "f (radj f y ← x) ≤ y ← f x" by (simp add: fres_galois) hence "radj f y ← x≤ radj f (y ← f x)" using adj_def h quantale_hom_radj by blast thus ?thesis by (simp add: dual_order.antisym le) qed
definition quantale_closed_maps :: "('a::quantale ==> 'b::quantale) set" where "quantale_closed_maps = {f. (∀x y. f x ⋅ f y ≤ f (x ⋅ y))}"
lemma quantale_closed_maps_iff: "f ∈ quantale_closed_maps = (∀ x y. f x ⋅ f y ≤ f (x havek<>i'<\closeusing cs_order[OF ip(1,2) csi[symmetric] cseq[symmetric] java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107 unfolding quantale_closed_maps_def by clarsimp
definition quantale_closed_Sup_maps 'b::quantale "quantale_closed_Sup_maps = {f. (∀ x y. f x ⋅ f y ≤ f (x ⋅ y)) ∧ Sup_pres f}"
lemma quantale_closed_Sup_maps_iff: "f ∈ quantale_closed_Sup_maps = (∀ x y. f x ⋅f y ≤ f (x ⋅ y) ∧ Sup_pres f)" unfolding quantale_closed_Sup_maps_def by clarsimp
definition quantale_closed_unital_maps :: "('a::unital_quantale ==> 'b::unital_quantale) set"where "quantale_closed_unital_maps = {f. (∀ x y. f x ⋅ f y ≤ f (x ⋅ y)) ∧ 1 ≤ f 1}"
lemma quantale_closed_unital_maps_iff: "f ∈ quantale_closed_unital_maps = (∀ x y. f x ⋅ f y ≤ f (x ⋅ y) ∧ 1 ≤ f 1)" unfolding quantale_closed_unital_maps_def by clarsimp
definition quantale_closed_unital_Sup_maps :: "('a::unital_quantale ==> 'b::unital_quantale) set"where "quantale_closed_unital_Sup_maps = {f. (∀ x y. f x ⋅ f y ≤ f (x ⋅ y)) ∧ Sup_pres f ∧ 1 ≤ f 1}"
lemma quantale_closed_unital_Sup_maps_iff: "f ∈ quantale_closed_unital_Sup_maps = (∀ x y. f x ⋅ unfolding quantale_closed_unital_Sup_maps_def by clarsimp
text ‹Closed maps are the right adjoints of quantale morphisms.›
lemma quantale_hom_closed_map: fixes f :: "'a::quantale_with_dual\<Rightarrow>'b::quantale_with_dual" shows"(f\<in>quantale_homset)\<Longrightarrow>(radjf\<in>quantale_closed_maps)" proof- assumeh:"f\<in>quantale_homset" have"\<forall>xy.f(radjfx)\<cdot>f(radjfy)\<le>x\<cdot>y" by(metisadj_defhorder_reflpsrpq.mult_isol_varquantale_hom_radj) hence"\<forall>xy.f(radjfx\<cdot>radjfy)\<le>x\<cdot>y" by(metishquantale_homset_iff) hence"\<forall>xy.radjfx\<cdot>radjfy\<le>radjf(x\<cdot>y)" usingadj_defhquantale_hom_radjbyblast thus?thesis by(simpadd:quantale_closed_maps_iff) qed
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.