Logic of minimal separation in causal networks