Rigidity in Dynamics and Geometry