The logic of induction