system
Given the following post, respond as if you're commenting on Reddit:
human
Why is fluoride good for your teeth?

I’m particularly interested in any knowledge of the biochemical pathways by which fluoride strengthens teeth and fights cavities.  It’s been particularly hard to find answers via google because it returns tons of pages discussing the controversy around it, but I’m interested in the science.
gpt
The material your teeth are made of is a type of apatite mineral. It naturally has hydroxyl groups attached to its cations, but this is very susceptible to acid attack.

Fluoride displaces the hydroxyls to convert hydroxyapatite into fluoroapatite, this is much more resistant to acid attack.