Solution:
We can also form a direct bijection to show A(n,m)=A(m,n), as follows. Suppose that a=(a1,…,amn) is a sequence satisfying properties 1 and 2. We will define a sequence f(a)=(b1,…,bnm) satisfying the same properties 1 and 2, but with m and n switched.
The bijection f is simple: just define bi, for 1≤i≤nm, to be equal to the number of j with 1≤j≤i such that aj=ai. In other words, to obtain f(a) from a, replace the k-th occurrence of each number with the number k. For example, if n=2 and m=5, then f(1,1,2,1,2,2,1,2,1,2)=(1,2,1,3,2,3,4,4,5,5).
First, it is clear that f(a) satisfies property 1 with m and n switched. Indeed, it follows directly from the definition of f that for each pair (k1,k2) with 1≤k1≤n and 1≤k2≤m, there is exactly one index i for which (ai,bi)=(k1,k2). This implies the desired result.
Second, we show that f(a) satisfies property 2 with m and n switched. For this, suppose that i,j,k are integers with 1≤i≤nm and 1≤j≤k≤m. Then, the number of times that k appears in the sequence (b1,…,bi) is exactly equal to the number of integers ℓ with 1≤ℓ≤n such that ℓ appears at least k times in the sequence (a1,…,ai). Similarly, the number of times that j appears in the sequence (b1,…,bi) is exactly equal to the number of integers ℓ with 1≤ℓ≤n such that ℓ appears at least j times in the sequence (a1,…,ai). In particular, the number j appears in the sequence (b1,…,bi) at least as many times as k does.
Now, we show that f is a bijection. We claim that f is actually an involution; that is, f(f(a))=a. (Note in particular that this implies that f is a bijection, and its inverse is itself.)
Fix an index i with 1≤i≤mn. Let ℓ=ai and k=bi; then, k is the number of times that the term ℓ appears in the sequence (a1,…,ai). It is enough to show that ℓ is the number of times that the term k appears in the sequence (b1,…,bi). First, note that by definition of f, the number of times k appears in the sequence (b1,…,bi) is equal to the number of integers j such that the sequence (a1,…,ai) contains the number j at least k times.
Now, ℓ occurs exactly k times in the sequence (a1,…,ai). So by property 2, each j with j≤ℓ appears at least k times in the sequence (a1,…,ai). Furthermore, each j with j>ℓ appears at most k−1 times in the sequence (a1,…,ai−1) and thus appears at most k−1 times in the sequence (a1,…,ai) as well (because ai=ℓ). Therefore, the number of integers j such that the sequence (a1,…,ai) contains the number j at least k times is exactly equal to ℓ. This shows the desired result.