Restrictions of smooth functions to a closed subset