I want to construct a function $f(x,y)$ ($x$ and $y$ are positive integers) which satisfies the following properties:
1) For each fixed $y$,
(a) $f(x,y)<f(x+1,y)$ when $x<y$
(b) $f(x,y)>f(x+1,y)$ when $x>y$
2) $f(x,y) = f(y,x)$
3) $f(x+1,y+1)>f(x,y)$
4) there exists a function $g(x)$ such that $f(x,y)$ can be decomposed as $f(x,y)=g(x) \times g(y)$.
Currently, I have found a function $f(x,y)=\frac{xy}{x^2+y^2}$ which satisfies the first three properties except the last one.
Any help will be much appreciated.
I think you're going to struggle to find such a function. If we have $f(x, y) = g(x)g(y)$, then condition 1a becomes $$g(x)g(y) < g(x + 1)g(y) \text{ when } x < y.$$ Similarly, condition 1b becomes $$g(x)g(y) > g(x + 1)g(y) \text{ when } x > y.$$ One thing that's clear is that $g(y) \neq 0$ for all $y$, otherwise we get equality instead of strict inequality.
Suppose $n \in \Bbb{Z}$. We have $g(n) > 0$ or $g(n) < 0$. If $g(n) > 0$, then \begin{align*} x < n &\implies g(x)g(n) < g(x + 1)g(n) \implies g(x) < g(x + 1) \\ x > n &\implies g(x)g(n) > g(x + 1)g(n) \implies g(x) > g(x + 1) \end{align*} That is, $g$ achieves its maximum at $n$, when restricted to the integers. A similar argument reveals that, if $g(n) < 0$, then $g$ achieves its minimum at $n$, over the integers. Moreover, these extrema are unique, given the strict inequalities.
But, this violates the pigeonhole principle. There must be infinitely many $n$ such that $g(n)$ has the same sign. That is, there either are infinitely many maxima or infinitely many minima. In either case, strict inequality does not hold.
There is no such function $g$.