text‹ Adding a maplet to a partial injection requires that we remove any other maplet that points
to the value @{term v}, to preserve injectivity. ›
lift_definition pinj_upd :: "('a, 'b) pinj ==> 'a ==> 'b ==> ('a, 'b) pinj" is"λ f k v. pfun_upd (f ⊳p (- {v})) k v" by (simp add: pfun_inj_rres pfun_inj_upd)
lemma pidom_res_upd: "A ⊲\<rho> f(k ↦ v)\<rho> = (if k ∈ A then (A ⊲\<rho> f)(k ↦ v)\<rho> else A ⊲\<rho> (f ⊳\<rho> (- {v})))" by (transfer, simp, metis pdom_res_swap)
lemma piran_res_upd: "f(x ↦ v)\<rho> ⊳\<rho> A = (if v ∈ A then (f ⊳\<rho> A)(x ↦ v)\<rho> else ((- {x}) ⊲\<rho> f) ⊳\<rho> A)" by (transfer, simp add: inf.commute)
(metis (no_types, opaque_lifting) ComplI Compl_Un double_compl insert_absorb insert_is_Un pdom_res_swap pran_res_twice)
lemma pinj_upd_with_dres_rres: "((-{x}) ⊲\<rho> f ⊳\<rho> (-{y}))(x ↦ y)\<rho> = f(x ↦ y)\<rho>" by (transfer, simp add: pdom_res_swap)
lemma pidres_twice: "A ⊲\<rho> B ⊲\<rho> f = (A ∩ B) ⊲\<rho> f" by (transfer, metis pdom_res_twice)
lemma pidres_commute: "A ⊲\<rho> B ⊲\<rho> f = B ⊲\<rho> A ⊲\<rho> f" by (metis (no_types, opaque_lifting) inf_commute pidres_twice)
lemma pidres_rres_commute: "A ⊲\<rho> (P ⊳\<rho> B) = (A ⊲\<rho> P) ⊳\<rho> B" by (transfer, simp, metis (mono_tags, opaque_lifting) pdres_rres_commute)
lemma pirres_twice: "f ⊳\<rho> A ⊳\<rho> B = f ⊳\<rho> (A ∩ B)" by (transfer, metis (no_types, opaque_lifting) pran_res_twice)
lemma pirres_commute: "f ⊳\<rho> A ⊳\<rho> B = f ⊳\<rho> B ⊳\<rho> A" by (metis inf_commute pirres_twice)
lemma pidom_upd: "pidom (f(k ↦ v)\<rho>) = insert k (pidom (f ⊳\<rho> (- {v})))" by (transfer, simp)
(* FIXME: Properly integrate using a proof strategy for coercion to partial injections *)
¤ 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.0.10Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
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.