The Rambam · Sefer Zemanim
הלכות עירובין ו׳Eruvin 6
Chapter 6 of 8 in Eruvin — 24 halachot
Halacha 1א׳
מִי שֶׁיָּצָא מִן הַמְּדִינָה בְּעֶרֶב שַׁבָּת וְהִנִּיחַ מְזוֹן שְׁתֵּי סְעֻדּוֹת רָחוֹק מִן הַמְּדִינָה בְּתוֹךְ הַתְּחוּם וְקָבַע שְׁבִיתָתוֹ שָׁם. אַף עַל פִּי שֶׁחָזַר לַמְּדִינָה וְלָן בְּבֵיתוֹ נֶחְשָׁב אוֹתוֹ כְּאִלּוּ שָׁבַת בְּמָקוֹם שֶׁהִנִּיחַ בּוֹ שְׁתֵּי הַסְּעֻדּוֹת. וְזֶה הוּא הַנִּקְרָא עֵרוּבֵי תְּחוּמִין:
[In a case of] one who left the city on the eve of Shabbat and left food for two meals [at a] distance from the city within its perimeter and established his resting there: Even though he returned to the city, it is considered as if he rested in that place in which he left his two meals. And that is called eruvei techumin (eruvs of perimeters).
Halacha 2ב׳
וְיֵשׁ לוֹ לְהַלֵּךְ מִמְּקוֹם עֵרוּבוֹ לְמָחָר אַלְפַּיִם אַמָּה לְכָל רוּחַ. לְפִיכָךְ כְּשֶׁהוּא מְהַלֵּךְ מִמְּקוֹם עֵרוּבוֹ לְמָחָר אַלְפַּיִם אַמָּה כְּנֶגֶד הַמְּדִינָה אֵינוֹ מְהַלֵּךְ בַּמְּדִינָה אֶלָּא עַד סוֹף מִדָּתוֹ. וְאִם הָיְתָה הַמְּדִינָה מֻבְלַעַת בְּתוֹךְ מִדָּתוֹ תֵּחָשֵׁב הַמְּדִינָה כֻּלָּהּ כְּאַרְבַּע אַמּוֹת וְיַשְׁלִים מִדָּתוֹ חוּצָה לָהּ:
And on the morrow, he has two thousand ells to walk in every direction from the place of his eruv. Hence when he walks from the place of his eruv towards the city on the morrow, he may only walk in the city up to the end of his allotment. But if the city was subsumed in his allotment, the whole city is considered like four ells, and he completes his allotment beyond it.
Halacha 3ג׳
כֵּיצַד. הֲרֵי שֶׁהִנִּיחַ אֶת עֵרוּבוֹ בְּרִחוּק אֶלֶף אַמָּה מִבֵּיתוֹ שֶׁבַּמְּדִינָה לְרוּחַ מִזְרָח נִמְצָא מְהַלֵּךְ לְמָחָר מִמְּקוֹם עֵרוּבוֹ אַלְפַּיִם אַמָּה לְמִזְרָח. וּמְהַלֵּךְ מִמְּקוֹם עֵרוּבוֹ אַלְפַּיִם אַמָּה לְמַעֲרָב. אֶלֶף שֶׁמִּן הָעֵרוּב עַד בֵּיתוֹ וְאֶלֶף אַמָּה מִבֵּיתוֹ בְּתוֹךְ הַמְּדִינָה. וְאֵינוֹ מְהַלֵּךְ בַּמְּדִינָה אֶלָּא עַד סוֹף הָאֶלֶף. הָיָה מִבֵּיתוֹ עַד סוֹף הַמְּדִינָה פָּחוֹת מֵאֶלֶף אֲפִלּוּ אַמָּה אַחַת שֶׁנִּמְצֵאת מִדָּתוֹ כָּלְתָה חוּץ לַמְּדִינָה תֵּחָשֵׁב הַמְּדִינָה כֻּלָּהּ כְּאַרְבַּע אַמּוֹת וִיהַלֵּךְ חוּצָה לָהּ תְּשַׁע מֵאוֹת שֵׁשׁ וְתִשְׁעִים אַמָּה תַּשְׁלוּם הָאַלְפַּיִם:
How is that? [If] he placed his eruv a distance of a thousand ells towards the east from his house in the city: It comes out that on the morrow, he may walk two thousand ells to the east from the place of his eruv. And he may walk two thousand ells to the west from the place of his eruv — one thousand from his eruv to his house; and one thousand ells from his house, inside the city. But he may only walk in the city to the end of [that] thousand. [However, if] there was even one ell less than a thousand from his house to the end of the city — coming out that his allotment ends outside of the city — the whole city is considered like four ells. So he may walk nine hundred and ninety-six ells outside of it [as the] completion of his two thousand.
Mishneh Torah, Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Edition, tr. R. Francis Nataf, 2019 — CC BY