Title: A treatise on universal algebra, with applications