# Define a domain filter of a function

Let $\mathbb{B}, \mathbb{V}$ two sets. I have defined a function $f: \mathbb{B} \rightarrow \mathbb{V}$.

$\mathcal{P}(\mathbb{B})$ means the power set of $\mathbb{B}$, I am looking for a function $g: (\mathbb{B} \rightarrow \mathbb{V}) \times \mathcal{P}(\mathbb{B}) \rightarrow (\mathcal{P}(\mathbb{B}) \rightarrow \mathbb{V})$ which can filter the domain of $f$ by a subset of $\mathbb{B}$, that means $g: (f, \mathbb{S}) \mapsto h$ such that the domain of $h$ is $\mathbb{S}$ and $\forall x \in \mathbb{S}, h(x) = f(x)$.

I am wondering if this kind of function exists already. If not, is there a better way to define it?

Could anyone help?

-
Yes. I read the question wrong, so I deleted my previous answer. @Andres, you should post this as an answer. – Asaf Karagila Feb 23 '13 at 0:44
@AsafKaragila, well I really tried hard to understand your answer...:-) – SoftTimur Feb 23 '13 at 0:49
Timur: I am sorry for wasting your time... I thought that you were looking for a function $h$ such that $h\colon\Bbb{B\to V}$ and for all $x\in\Bbb S$ we have $f(x)=h(x)$; and that if $f'(x)=f(x)$ then $g(f,\Bbb S)=h$ as well. – Asaf Karagila Feb 23 '13 at 0:51
If "$\mathbb{B} \to \mathbb{V}$" means the set of functions from $\mathbb{B}$ to $\mathbb{V}$, which is usually denoted by "$\mathbb{V}^\mathbb{B}$", then $\mathcal{P}(\mathbb{B}) \to \mathbb{V}$ is probably not what you want to consider. I think you mean $\bigcup_{A \in \mathcal{P}({\mathbb{B}})}(A \to \mathbb{V})$. A function on the powerset is not the same as a function on a subset. – Trevor Wilson Feb 23 '13 at 1:15
Let $\mathbb{B}$ be a singleton, $\{*\}$. Then the first set consists of functions from the two-element set $\{\emptyset,\{*\}\}$, the second set consists of functions from the singleton $\{*\}$, together with the empty function, and the third set consists of sets of functions from $\{*\}$. – Trevor Wilson Feb 23 '13 at 1:48

## 1 Answer

What you denote $g(f,\mathbb S)$ is usually called the restriction of $f$ to $\mathbb S$, and denoted $f|\mathbb S$ or $f\upharpoonright \mathbb S$. Sometimes this notation is used even if $\mathbb S$ is not contained in the domain of $f$, in which case it is understood to be $f\upharpoonright A$, where $A=\mathbb S\cap{\rm dom}(f)$.

(And, agreeing with Trevor's comment, the range of $g$ should be $\bigcup_{\mathbb S\in\mathcal P(\mathbb B)}(\mathbb S\to \mathbb V)$ rather than ${\mathcal P}(\mathbb B)\to\mathbb V$. Anyway, I much prefer the notation $A^B$ or ${}^B A$ instead of $B\to A$.)

-