Crystallization, replacement, and redox pathways governing rare earth carbonate and phosphate formation | Synapse