While reading a cryptography textbook, i find the definition of a function that is hard on the average.(More precisely, it is 'hard on the average but easy with auxiliary input', but i omit latter for simplicity.)
Definition : Hard on the average :
$h:\{0,1\}^*\to \{0,1\}^* $ is hard on the average if there exists a probabilistic polynomial-time algorithm $G$ such that
for every probabilistic polynomial-time algorithm $A'$ every positive polynomial $p(\cdot)$, and all sufficiently large $n$'s, Pr$[A'(X_n)=h(X_n)]<\frac{1}{p(n)}$where $X_n := G(1^n)$ is a random variable assigned the output of $G$.
My question is why the statement of the existence of qualified algorithm G is sufficient?
In other words, why the above definition gives a formal definition of 'hardness on the average' instead of following definition, which is more intuitive(?) to understand and more strict. Why is the above definition sufficient?
( Now I'm thinking that problem might occur when $G$ has only polynomial number of possible outputs, but if so, let's replace 'for any $G$' with 'for any $G$ which have exponentially many possible outputs' in following definition.)
(strong?) Def : Hard on the average :
$h:\{0,1\}^*\to \{0,1\}^* $ is hard on the average if for any probabilistic polynomial-time algorithm $G$ and for every probabilistic polynomial-time algorithm $A'$ every positive polynomial $p(\cdot)$, and all sufficiently large $n$'s, Pr$[A'(X_n)=h(X_n)]<\frac{1}{p(n)}$
where $X_n := G(1^n)$ is a random variable assigned the output of $G$.
Another question is that whether a following simpler definition is equivalent to original definition or not?
(simple) Def : Hard on the average :
$h:\{0,1\}^*\to \{0,1\}^* $ is hard on the average if for every probabilistic polynomial-time algorithm $A'$ every positive polynomial $p(\cdot)$, and all sufficiently large $n$'s, Pr$[A'(U_n)=h(U_n)]<\frac{1}{p(n)}$
where $U_n$ is a random variable uniformly distributed over $\{0,1\}^n$.