When did Aristotle discover mathematical logic?

With the Prior Analytics, Aristotle is credited with the earliest study of formal logic, and his conception of it was the dominant form of Western logic until 19th century advances in mathematical logic.