One-year-old babies may not be able to speak, but they are able to think logically, according to new research that shows the earliest known foundation of our ability to reason.

Legendary psychologist Jean Piaget believed that we didn’t have logical reasoning abilities until we were seven, but scientists scanned the eyes of 48 babies and found that they’re able to reason through the process of elimination. The research was published today in the journal Science.

The type of reasoning in question, process of elimination, is formally called “disjunctive syllogism.” It goes like this: if only A or B can be true, and A is false, then B must be true. So, if the cup is either red or blue, and it is not red, then it is blue. Process of elimination isn’t necessarily the easiest form of reasoning, says Justin Halberda, a psychologist and child development expert at Johns Hopkins University who was not involved in today’s study, but it’s a crucial one for higher thinking. “One of the central pieces that separates human reasoning from all other forms is to negate a premise — you see that if it’s not A, it’s something else,” he says. “That’s quite fancy stuff.”

In today’s study, the babies looked at little animations. They saw two different objects — like a flower and a dinosaur, and then both of them went behind a barrier. An animated cup takes away one of the animations, like the flower. Then, the barrier goes away. Either the dinosaur is left (as would logically be the case), or the flower is, oddly, still there.

By tracking the babies’ eye movements, the scientists found that babies stared longer when the dinosaur was still around, indicating that they were confused. (Researchers working with babies that can’t talk often measure how long they look at something as a way to see if they’re surprised or interested.)

On a practical level, further research in this area could be used as a means of diagnosing cognitive disability. For example, clinicians could track the eyes of babies and see if they were looking in the typical pattern for someone their age, says Halberda. But more importantly, he says, this research is going to open the door for more work into how the youngest babies think and reason. “It’s about launching a whole body of work that’s going to emerge over the coming decade,” says Halberda. “It’s an invitation.”