Using ferroelectric polarization to regulate and preserve the valley polarization in a HfN2/CrI3/In2Se3 heterotrilayer