High school mathematical and chemical formula theorem