Localist LLMs -- A Mathematical Framework for Dynamic Locality Control