∀ {F : Type u_4} {R : Type u_2} {A : Type u_3} {B : Type u_1} [inst : CommSemiring R]
  [inst_1 : NonUnitalNonAssocSemiring A] [inst_2 : Module R A] [inst_3 : NonUnitalNonAssocSemiring B]
  [inst_4 : Module R B] [inst_5 : FunLike F A B] [inst_6 : NonUnitalAlgHomClass F R A B] (f : F)
  (S : NonUnitalSubalgebra R B) (hf : ∀ (x : A), f x ∈ S),
  (NonUnitalRingHom.codRestrict (↑f) S.toNonUnitalSubsemiring hf).toFun 0 = 0