What would happen if you also feed it a book or two on logic, and some books on mathematics and physics?
LLMs are fed a lot of data, and there are many patterns in there, including reasoning and some logic. Adding a little domain specific data will not immediately learn that domain, but it will also not be limited to only that data in its reasoning.
The discovery that reinforcement learning allows next-token prediction to extrapolate beyond its pretrained data set is harder to explain than the discovery of fire or the wheel or electricity, but it's up there on that level.