Given positive integers $m$, $a$, $b$, $(a,b)=1$. $A$ is a non-empty subset of the set of all positive integers, so that for every positive integer $n$ there is $an \in A$ and $bn \in A$. For all $A$ that satisfy the above condition, find the minimum of the value of $\left| A \cap \{ 1,2, \cdots,m \} \right|$
1. **Understanding the Problem:**
   We are given positive integers \( m \), \( a \), and \( b \) such that \((a, b) = 1\). We need to find the minimum size of the set \( A \cap \{1, 2, \ldots, m\} \) where \( A \) is a subset of positive integers such that for every positive integer \( n \), both \( an \) and \( bn \) are in \( A \).

2. **Initial Assumptions:**
   Let \( a < b \). We can assume that \( A \) contains all integers greater than \( m \). This is because if \( x > \frac{m}{b} \), then \( bx > m \) and \( ax > m \), so the condition is trivially satisfied.

3. **Defining the Set \( H \):**
   Let \( H \) be the set of all elements less than \( \frac{m}{b} \) that are divisible by an even power of \( b \) (i.e., either not divisible by \( b \) or divisible by \( b^2 \) but not \( b^3 \), and so on). For each \( x \in H \), either \( ax \) or \( bx \) must be in \( A \).

4. **Ensuring the Condition:**
   We need to ensure that for each \( x \in H \), either \( ax \) or \( bx \) is in \( A \). Moreover, we cannot have \( ax = by \) for \( x, y \in H \) because the powers of \( b \) in \( x \) and \( y \) would differ by 1, making one of them odd.

5. **Counting Elements in \( H \):**
   The size of \( H \) can be computed as follows:
   \[
   |H| = \left\lfloor \frac{m}{b} \right\rfloor - \left\lfloor \frac{m}{b^2} \right\rfloor + \left\lfloor \frac{m}{b^3} \right\rfloor - \left\lfloor \frac{m}{b^4} \right\rfloor + \ldots
   \]
   This series continues until the terms become zero.

6. **Constructing the Set \( A \):**
   We can construct \( A \) as follows:
   \[
   A = bH \cup \{m+1, m+2, \ldots\}
   \]
   This ensures that for any \( x \leq \frac{m}{b} \), if \( x \in H \), then \( bx \in A \). Otherwise, \( \frac{ax}{b} \in H \), so \( ax \in A \).

7. **Conclusion:**
   The minimum value of \( |A \cap \{1, 2, \ldots, m\}| \) is given by the size of \( H \), which is:
   \[
   \left\lfloor \frac{m}{b} \right\rfloor - \left\lfloor \frac{m}{b^2} \right\rfloor + \left\lfloor \frac{m}{b^3} \right\rfloor - \left\lfloor \frac{m}{b^4} \right\rfloor + \ldots
   \]

The final answer is \( \boxed{ \left\lfloor \frac{m}{b} \right\rfloor - \left\lfloor \frac{m}{b^2} \right\rfloor + \left\lfloor \frac{m}{b^3} \right\rfloor - \left\lfloor \frac{m}{b^4} \right\rfloor + \ldots } \)