Siman 156 codifies the laws of unfair competition and encroachment on another's livelihood (hasagat gvul), the primary halakhic category under which Acharonim analyze the right of authors and publishers to exclusive reproduction of their works.
כופין בני מבוי זה את זה שלא להושיב ביניהם לא חייט ולא בורסי ולא אחד מבעלי אומניות היה שם במבוי אחד מבני מבוי אומן ולא מיחו בו או שהיתה שם מרחץ או חנות או רחים ובא חבירו ועשה מרחץ אחרת כנגדו אינו יכול למנעו ולומר לו אתה פוסק חיי ואפילו היה מבני מבוי אחר אינם יכולים למונעו שהרי יש ביניהם אותה אומנות: הגה ורבים האומרים דבני החצר או המבוי שאינו מפולש אפילו בכי האי גוונא יכולים למחות אלא דבעל האומן אינו יכול למחות ולומר אתה פוסק חיי (בית יוסף בשם הרבה פוסקים) אבל גר ממדינה אחרת שבא לעשות חנות בצד חנותו של זה או מרחץ בצד מרחצו של זה יש להם למונעו ואם היה נותן עמהם מנת המלך אינם יכולים למנעו: הגה ורבים האומרים דאפ"ה אין לו רשות ליכנס למבוי שיש שם בני אומנתו דבעל האומנות יכול לעכב עליו שלא ליכנס למבוי שלו הואיל והוא מעיר אחרת אבל במבוי אחר אינו יכול למחות בו הואיל ונותן מס (טור והמגיד פ"י דשכנים וב"י בשם רש"י ותוס') ובני העיר יכולין למחות בכל ענין ויכולין לומר אין אנו יכולין לישן מקול הנכנסים אע"פ שיש בהן כבר אומנות ואם לא נתן מס עד עכשיו ובא לעסוק במלאכתו ולתת מס י"א דבר אומנותו יכול לעכב עליו עד שישכיר לו בית ויהיה כבני העיר (תה"ד סי' שמ"ב) וי"א דלא מקרי נתינת מס במה שנותן מנת המלך אלא עד שיתן מס שלו למושל העיר הזאת דשייך לגבול שלהן (ב"י בשם רש"י) ואין חילוק בכל זה בין תלמיד חכם לאחר דאין חילוק אלא ברוכלין כמו שיתבאר בסמוך (טור) וי"א דאם בני העיר צריכין לתורתו אינם יכולין למחות בידו אף ע"פ שיש ת"ח אחר בעיר דקנאת סופרים תרבה חכמה (ב"י בשם הגהות אשירי) ת"ח המביא סחורה לעיר חייבין למנוע לכל אדם למכור עד שהוא ימכור שלו (טור) ואי איכא עובדי כוכבים דמזבני דליכא רווחא לת"ח מותר כל אדם למכור (טור בשם הרמ"ה) ועיין ביו"ד סי' רמ"ג אדם שיש לו עובד כוכבים מערופי"א יש מקומות שדנין שאסור לאחרים לירד לחיותו ולעסוק עם העובדי כוכבים ההוא ויש מקומות שאין דנין ויש מתירין לישראל אחר לילך לעכו"ם ההוא להלוות לו ולעסוק עמו ולשחודיה ליה ולאפוקי מניה דנכסי עובדי כוכבים הם כהפקר וכל הקודם זכה ויש אוסרין (כל זה במרדכי פ' לא יחפור והגהות מיימוני פ"ו דשכנים וע' לקמן סי' שע"ו) ואפילו ישראל שעושה מלאכה אצל עכו"ם ורגיל בכך אסור לישראל אחר ליכנס שם ולהוזיל המלאכה ואם רוצה לעשותו גוערין בו מיהו אם עבר ועשה אין מוציאין מידו (ב"י בשם הרשב"א) וע' לקמן סי' רכ"ז שני בני אדם הדרים ביחד והאחד רוצה להוזיל בהלוואת הרבית לעובדי כוכבים אין חבירו יכול למחות בו (רבי' ירוחם נ' כ"א ח"ו) וה"ה בכל כיוצא בזה ועיין לקמן סימן רכ"ח סעי"ח:
Members of an alleyway may force each other not to have among them a tailor, tanner or any other craftsman. If there was such a craftsman in the alleyway and no one objected, or if there was a bathhouse, store or mill and another member came and made another one opposite the existing one, the current owner cannot stop him and say he is cutting of his livelihood. Even if the new individual is from another alleyway, they cannot stop him because they already have that craftsman among them. There are many that say that in the case of a courtyard or an alleyway that is not open, they would be able to object, even in such a case. The craftsman himself, however, would not be able to object and say you are cutting off my livelihood. If one who lives in another country and wants to set up a store next to this store or a bathhouse next to this bathhouse, however, the members would be able to prevent him. If he pays government taxes with them, they would not be able to stop him. There are many who say that even in such a case he has no right to enter any alleyway that has people from his trade, because a member of that trade has the right to prevent him from entering since he is from another city. In the case of another alleyway, however, he cannot object because the new individual pays taxes. The people of the city have the right to object in all cases and say we cannot sleep because of the sound of people entering, notwithstanding the fact that they already have such a craftsman. If one did not yet pay taxes and now he wants to work and will pay taxes, there are those who say his fellow craftsman can stop him until he rents a house and becomes like a member of the city. There are those that say that one who gives the “king’s gift” is not considered to have paid taxes, until he gives taxes to the ruler of this particular city that has jurisdiction over them. In all these cases, there is no distinction between a scholar and others, other than in the case of peddlers which will be discussed shorty. There are those that say that if the people of the city need the scholar’s Torah, they cannot object, even if there is another scholar in the city because “the jealousy of scholars creates an increase in wisdom.” If a scholar brings his merchandise to the city, everyone is required to refrain from selling until the scholar sells his wares. If there is a gentile who is selling, so there will be no gain to the scholar, everyone is permitted to sell. See Yoreh Deah Siman 243. If one has a business arrangement with a gentile, there are those places that rule that others are prohibited from interfering with his livelihood and doing business with that gentile, and there are some places that do not rule that way. There are those who permit another Jew to go to that gentile to lend him, do business with him, bribe him and take property from him because a gentile’s property is considered ownerless. There are those who prohibit it. Even where a Jew regularly does work with a gentile, it would be prohibited for another Jew to compete and do the work at a cheaper price. If he wants to do it, we would rebuke him. Nevertheless, if he violated and did the work we would not remove the money from him. See later Siman 227. If two individuals live together and one wants to lend with interest to a gentile, the other cannot object. The same applies to anything similar. See later 228:18.