סימן קנב סעיף טו
מִי שֶׁגֵרַשׁ אֶת אִשְׁתּוֹ מִן הַנִּשׂוּאִין, לֹא תָדוּר עִמּוֹ בֶּחָצֵר. וְאִם הוּא כֹּהֵן, וְכֵן אֲפִלּוּ אִם הוּא יִשְֹרָאֵל, וְהִיא נִשֵּׁאת לְאַחֵר וְנִתְגָּרְשָׁה גַם מִמֶּנוּ, וְכֵן מִי שֶׁגֵּרַשׁ אֶת אִשְׁתּוֹ מִשׁוּם שֶׁהִיא אֲסוּרָה לוֹ, כָּל אֵלּוּ צְרִיכִין הַרְחָקָה יְתֵרָה, וְלֹא תָדוּר עִמּוֹ בְמָבוֹי, אִם הוּא מָבוֹי סָתוּם. אֲבָל בְּמָבוֹי מְפֻלָּשׁ שֶׁדֶּרֶךְ הָרַבִּים עוֹבֵר בֵּינֵיהֶם, מֻתָּרִים לָדוּר. וּגְרוּשָׁה שֶׁנִשׂאת וְדָרָה עִם בַּעְלָהּ הַשֵנִי, אֵלּוּ צְרִיכִין עוֹד הַרְחָקָה יְתֵרָה, וְלֹא תָדוּר עִם בַּעְלָהּ הָרִאשׁוֹן בְכָל הַשְׁכוּנָה. בְּכָל אֵלּוּ הַהַרְחָקוֹת, הִיא נִדְחֵית מִפָּנָיו. אַךְ אִם הָיְתָה הֶחָצֵר שֶׁלָּהּ, הוּא נִדְחֶה מִפָּנֶיהָ.
If you divorced the wife you married, she may not reside in the same courtyard as you do. If you are a kohein, or even a Yisroeil, but she has since married another man, and was divorced from him too; or if you divorced her because she was forbidden to you; all of these require a greater measure of separation. And subsequently, she may not reside with you in the same alley if it comes to a dead-end. But if it is an open alley, through which there is traffic, they are permitted to live there. A divorced woman who remarried and lives with her second husband, they [she and her first husband] require an even greater measure of separation, and she may not dwell with her first husband in the same neighborhood. In all these cases of separation, the woman must move away from him. But if the courtyard belongs to her, he must move away from her.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)