def Dequiv(mas, agents, states):
    """
    Return the set of states of mas that are equivalent to some state in states
    w.r.t. distributed knowledge of agents.
    
    mas -- a multi-agent system;
    agents -- a set of agents;
    states -- a subset of states of mas.
    """
    return mas.equivalent_states(states, {agents}) & mas.reachable_states
