Our teacher, the Beit Yosef, wrote in section 2: If a gentile or a minor casts water upon it himself, if he did not intend to permit it, it is permitted, even if he asked why they do not slaughter it and they answered him incidentally that it is forbidden to slaughter it until a mum falls upon it. However, if he intended to permit it—for example, after seeing that they permitted it through this, he does so to others—it is forbidden. Thus far his words. And this is a Mishnah (35a): It happened that a kasedor saw an old male and said, "What is its nature?" and they said to him, "It is a bekhor and is not slaughtered without a mum." He took a branch and slit its ear, and the sages permitted it. And after they permitted it, he went and slit the ears of other bekhorot, and the sages forbade them. See there. And even though it appears explicitly that the first one also acted with intent—for since they told him that it is not permitted without a mum, he did so—nevertheless, Rashi explained, and this is his wording: For it cannot be said that he intended to permit it, for he did not know that through a mum that he makes in it, it would be slaughtered, unless it fell on its own. Thus far his words. The explanation of his words is that the Israelites told him that it is not permitted unless there was a mum in it, which implies that the mum falls on its own, and consequently he did not intend to permit it; and that which he slit its ear, it can be said that he did so out of anger and not for the intent of permission. And even if there is a doubt regarding his intent, our teacher, the Rema, wrote: If it is a doubt whether he intended to permit it or not, we follow the lenient view. Thus far his words. And the reason is simple, for in this time it is a rabbinic doubt. And in any case, we have learned from the approach of Rashi, of blessed memory, that if the gentile acted with the intent of permission, even if not at the request of the Israelite, it is forbidden to slaughter based on this mum.
כתב רבינו הב"י בסעי' ב' אם עכו"ם או תנוק מטיל בו מים בעצמו אם לא כיון להתירו מותר אפילו אם שאל למה אין שוחטין אותו והשיבו לו לפי תומם שאסור לשוחטו עד שיפול בו מום אבל אם כיון להתירו כגון לאחר שרואה שהתירוהו ע"י כך עושה כן לאחרים אסור עכ"ל וזהו משנה (ל"ה.) מעשה בקסדור שראה זכר זקן ואמר מה טיבו ואמרו לו בכור הוא ואינו נשחט בלא מום נטל פיגם וצרם אזנו והתירו חכמים ואחר שהתירו הלך וצרם אזני בכורות אחרים ואסרו חכמים ע"ש ואע"ג דנראה להדיא דגם הראשון עשה בכוונה שהרי מפני שאמרו לו שאינו ניתר בלא מום עשה כן מ"מ פרש"י וז"ל דאין לומר שלהתירו נתכוין שהרי אינו יודע שע"י מום שיעשה בו ישחוט אא"כ נפל מאליו עכ"ל ביאור דבריו שהרי הישראל אמרו לו דאינו ניתר אא"כ היה בו מום דהמשמעות שיפול המום מאליו וממילא דלא כיון להתירו וזה שצרם אזנו י"ל שעשה מפני הכעס ולא לכוונת היתר ואפילו אם יש ספק בכוונתו כתב רבינו הרמ"א ספק אם כיון להתירו או לא אזלינן לקולא עכ"ל והטעם פשוט דבזמן הזה הוא ספיקא דרבנן ועכ"פ למדנו משיטת רש"י ז"ל דאם העכו"ם עשה בכוונת היתר אפילו שלא לבקשת הישראל אסור לשחוט על מום זה.