Rigidity in automorphic representations and local systems