Explicit substitutions for pi-congruences