The logic of children