lemma fun_rep_map_of[code]: 🍋‹original def is too slow› "fun_rep ps = (%x. case map_of ps x of None ==>⊤ | Some a ==> a)" by(induction ps rule: fun_rep.induct) auto
lift_definition less_eq_st :: "'a st ==> 'a st ==> bool"is less_eq_st_rep by(auto simp add: eq_st_def less_eq_st_rep_iff)
definition less_st where"F < (G::'a st) = (F ≤ G ∧¬ G ≤ F)"
instance proof (standard, goal_cases) case 1 show ?caseby(rule less_st_def) next case 2 show ?caseby transfer (auto simp: less_eq_st_rep_def) next case 3 thus ?caseby transfer (metis less_eq_st_rep_iff order_trans) next case 4 thus ?case by transfer (metis less_eq_st_rep_iff eq_st_def fun_eq_iff antisym) qed
end
lemma le_st_iff: "(F ≤ G) = (∀x. fun F x ≤ fun G x)" by transfer (rule less_eq_st_rep_iff)
fun map2_st_rep :: "('a::top ==> 'a ==> 'a) ==> 'a st_rep ==> 'a st_rep ==> 'a st_rep"where "map2_st_rep f [] ps2 = map (%(x,y). (x, f ⊤ y)) ps2" | "map2_st_rep f ((x,y)#ps1) ps2 = (let y2 = fun_rep ps2 x in (x,f y y2) # map2_st_rep f ps1 ps2)"
instantiation st :: (semilattice_sup_top) semilattice_sup_top begin
lift_definition sup_st :: "'a st ==> 'a st ==> 'a st"is"map2_st_rep (⊔)" by (simp add: eq_st_def)
lift_definition top_st :: "'a st"is"[]" .
instance proof (standard, goal_cases) case 1 show ?caseby transfer (simp add:less_eq_st_rep_iff) next case 2 show ?caseby transfer (simp add:less_eq_st_rep_iff) next case 3 thus ?caseby transfer (simp add:less_eq_st_rep_iff) next case 4 show ?caseby transfer (simp add:less_eq_st_rep_iff fun_rep_map_of) qed
end
lemma fun_top: "fun ⊤ = (λx. ⊤)" by transfer simp
lemma mono_update[simp]: "a1 ≤ a2 ==> S1 ≤ S2 ==> update S1 x a1 ≤ update S2 x a2" by transfer (auto simp add: less_eq_st_rep_def)
lemma mono_fun: "S1 ≤ S2 ==> fun S1 x ≤ fun S2 x" by transfer (simp add: less_eq_st_rep_iff)
locale Gamma_semilattice = Val_semilattice where γ=γ for γ :: "'av::semilattice_sup_top ==> val set" begin
abbreviation γ🪙s :: "'av st ==> state set" where"γ🪙s == γ_st γ"
abbreviation γ🪙o :: "'av st option ==> state set" where"γ🪙o == γ_option γ🪙s"
abbreviation γ🪙c :: "'av st option acom ==> state set acom" where"γ🪙c == map_acom γ🪙o"
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.