Let be the extended transition function of a deterministic finite automaton. States are equivalent, or indistinguishable, when
The quotient deterministic finite automaton by indistinguishable states has state set , initial state , accepting states , and transition
Right invariance of makes this well-defined, and the quotient accepts .
To prove minimality, choose for each state of the accessible automaton a word with . Run the same word in any DFA accepting , and assign the class the reached state of . If two distinct classes reached the same state of , every continuation would have the same acceptance result after and . Since and accept the same language, this would make and indistinguishable in , a contradiction. Thus has at least one distinct state for every class in , proving that the quotient is the minimal deterministic finite automaton.
For divisibility by seven, take states , initial state , accepting set , and transitions
After reading a word, the state is its binary value modulo seven, so this binary divisibility automaton accepts exactly the multiples of seven, with leading zeros allowed. Every state is accessible: the three-bit words representing reach the corresponding residues.
For distinct residues , let be the three-bit representation of , chosen in . Since , reading from state ends at
whereas reading it from ends at . Thus distinguishes from . All seven states are pairwise distinguishable, so the DFA is minimal by the Myhill-Nerode theorem.