A mod L“ Atkin–Lehner theorem and applications