typecheck def moved to mirror