Zulip Chat Archive
Stream: new members
Topic: Is there a dependent partial function type in mathlib4?
nemo (Aug 06 2025 at 03:34):
I found the independent partial function type PFun in mathlib4, but to my surprise, then failed to find a dependent one. And it seems easy to define (x : \alpha) \to. \beta x to be (x : \alpha) \to Part (\beta x). Is it unnecessary to define it, or is it just to be done?
Aaron Liu (Aug 06 2025 at 10:31):
I guess no one has needed it yet
Weiyi Wang (Aug 06 2025 at 12:03):
Does thia definition allow one to write a function where \beta sometimes can't output a type for certain \alpha?
nemo (Aug 07 2025 at 05:59):
Now I've found it tricky to allow \beta be a Part Type. The problem is \beta x (for x : \alpha) can't be a codomain if it is not garanteed to be a Type
Kenny Lau (Aug 07 2025 at 06:00):
it was a question, you didn't have to follow it
nemo (Aug 07 2025 at 06:17):
I find there to be two ways : (1) let \beta xbe Empty if it doesn' exist (2) let \beta x be Unit instead. (1) makes it to be (x : \alpha) \to (h : (\beta x).Dom) \to (\beta x).get h, and (2) makes (x : \alpha) \to. \beta x to be Empty iff \beta is not total
Robin Arnez (Aug 07 2025 at 08:38):
Hmm I don't feel like \beta being a Part has any purpose
Robin Arnez (Aug 07 2025 at 08:39):
Like, what should that even mean? Empty? Well then you could also just use Empty directly
Last updated: Dec 20 2025 at 21:32 UTC