A Logical Topology of Neural Networks