Inference and necessity