Sci-fi author Philip K. Dick predicted this in his anti-abortion short story, “The Pre-Persons,” i.e., that the same logic behind Roe v. Wade would eventually be extended to children (with the ability to do algebra as the dividing line between “persons” with a right to life and “pre-persons” who could be killed by their parents).
In Medieval England, the age of viability was 6 years old based on how much work the child could do. Before that, it was legal to infanticide your own child.
Interesting story; I suppose in that scenario math class became the most popular room in school.