Let $S$ is a finite set with $n$ elements. We divided $AS$ to $m$ disjoint parts such that if $A$, $B$, $A \cup B$ are in the same part, then $A=B.$ Find the minimum value of $m$.
1. **Define the Set \( S \) and the Problem:**
   Let \( S \) be a finite set with \( n \) elements. We need to divide the power set \( \mathcal{P}(S) \) into \( m \) disjoint parts such that if \( A \), \( B \), and \( A \cup B \) are in the same part, then \( A = B \). We aim to find the minimum value of \( m \).

2. **Assume Without Loss of Generality:**
   Without loss of generality, let \( S = \{1, 2, \dots, n\} \).

3. **Lemma:**
   If \( B \) is a subset of \( A \) and \( B \neq A \), then \( A \) and \( B \) must be in different parts. This is because if \( B \subseteq A \) and \( B \neq A \), then \( A \cup B = A \), and if they were in the same part, it would contradict the condition that \( A = B \).

4. **Consider Specific Subsets:**
   Consider the \( n+1 \) subsets:
   \[
   \{\}, \{1\}, \{1, 2\}, \{1, 2, 3\}, \dots, \{1, 2, \dots, n\}
   \]
   According to the lemma, any two of these subsets must be in different parts. Therefore, we need at least \( n+1 \) parts to accommodate these subsets.

5. **Constructing the Partition:**
   For \( m = n+1 \), we can construct the partition as follows:
   - \( S_0 = \{\{\}\} \)
   - \( S_i \) is the set of all \( i \)-element subsets of \( S \) for \( i = 1, 2, \dots, n \).

   This construction ensures that each subset is in a different part, satisfying the condition that if \( A \), \( B \), and \( A \cup B \) are in the same part, then \( A = B \).

6. **Conclusion:**
   Therefore, the minimum value of \( m \) is \( n+1 \).

The final answer is \( \boxed{n+1} \).