It seems the following part in the definition
(pfun_entries (A ∩ pdom(F)) (fun_pfun (λ _. Q)))
(parsed as pfun_entries (A ∩ pdom F) (pfun_app (fun_pfun (λ_. Q))))
causes the issue. To be more specific, there is no code equation for fun_pfun \equiv pfun_entries UNIV.
The part could be simplified to
(pfun_entries (A ∩ pdom(F)) (λ _. Q))
I cannot see a particular reason to use (fun_pfun (λ _. Q)) to transform a total function (λ _. Q) to a partial function, then apply pfun_app to transform the partial function back to a total function.
As discussed in this issue https://github.com/isabelle-utp/Z_Toolkit/issues/2, the problem might be with the definition of the exception operator.
It seems the following part in the definition
(pfun_entries (A ∩ pdom(F)) (fun_pfun (λ _. Q)))
causes the issue. To be more specific, there is no code equation for
fun_pfun \equiv pfun_entries UNIV
.The part could be simplified to
(pfun_entries (A ∩ pdom(F)) (λ _. Q))
I cannot see a particular reason to use
(fun_pfun (λ _. Q))
to transform a total function(λ _. Q)
to a partial function, then applypfun_app
to transform the partial function back to a total function.