סימן ר סעיף ו
מֻתָּר לְלַוּוֹת אֶת הַמֵּת בְּיוֹם טוֹב רִאשׁוֹן בְּתוֹךְ הַתְּחוּם, וּבְיוֹם טוֹב שֵׁנִי אֲפִלּוּ חוּץ לַתְּחוּם, וּמֻתָּרִין גַּם כֵּן לַחֲזוֹר לְבֵיתָם בּוֹ בַיּוֹם. אֲבָל אָסוּר לִרְכֹּב עַל גַּבֵּי בְהֵמָה כְּדֵי לְלַוּוֹת אֶת הַמֵּת בְּיוֹם טוֹב, אֲפִלּוּ בְּיוֹם טוֹב שֵׁנִי, וַאֲפִלּוּ הָאֲבֵלִים. אֲבָל הַקַּבְּרָנִים, אִם אִי אֶפְשָׁר לָהֶם לֵילֵךְ בְּרַגְלֵיהֶם, מֻתָּרִים לִרְכֹּב בְּיוֹם טוֹב שֵׁנִי. וּמִכָּל מָקוֹם לֹא יִרְכְּבוּ בְּתוֹךְ הָעִיר.
It is permitted to accompany the deceased within the t'chum, on the first day of Yom Tov, and on the second day of Yom Tov, even outside the t'chum. It is also permitted to return home on that very day. However, it is forbidden to ride upon an animal in order to accompany the dead on Yom Tov, even on the second day of Yom Tov. Even the mourners are not permitted. If it is impossible for the gravediggers to go by foot, they are permitted to ride on an animal on the second day of Yom Tov. Nevertheless, they should not ride in the city.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)