Lemma. Partial functional extensionality [00K9]

Let f,g\colon A\mathbin {\rightharpoonup } B be two partial functions. We have f=g if and only if for all a:A, f is defined at a if and only if g is defined at a and, moreover, the value of f at a is the same as the value of g at a:

f=g \Longleftrightarrow \forall a:A\mathpunct {.} {\mathopen {}\left ( f{\mathopen {}\left (a\right )\mathclose {}}{\downarrow } \Leftrightarrow g{\mathopen {}\left (a\right )\mathclose {}}{\downarrow } \right )\mathclose {}} \land (f{\mathopen {}\left (a\right )\mathclose {}}{\downarrow }\Rightarrow f{\mathopen {}\left (a\right )\mathclose {}} = g{\mathopen {}\left (a\right )\mathclose {}})