In Insights you wrote:
>>Why is the Shechitah valid? There is a rule that "Iy Avid Lo Mehani" -- if one performs an act that the Torah prohibits, the act does not take effect. Accordingly, Shechitah performed with a knife of Avodah Zarah should be invalid, since the Torah prohibits such an act!
Therefore, the principle of "Iy Avid Lo Mehani" does not apply to Shechitah, because this principle applies only where the Halachic status comes about through the person himself. When the person sinned, the Halachic status that he otherwise would have caused to take effect does not take effect. With regard to Shechitah, though, the change in Halachic status (the meat becoming permitted) occurs as a result of the act of Shechitah itself and is not related to the person's will or intent. The independent act of Shechitah causes the meat to become permitted, and even though the person did an Aveirah while doing the Shechitah, it is not the *person* making the meat permitted, and therefore the Shechitah remains valid. (See also Insights to Bava Kama 70:2 and 71:2.)<<
My question is that we learned one does need thought of making a shchita to have a valid shchita. If a knife falls from ones hand and happens to effect a "perfect" schita that would be invalid. Therefore Iy Avid Lo Mehani should be the rule.
R' Elchanan further explains his logic in Kovetz He'aros (74:2-3). He analyzes each action in two ways: does the Torah prohibit the action, and does the Torah prohibit the result of that action. For example, the Torah states that a person who rapes and subsequently marries the girl who he raped, is not allowed to divorce his wife, as the Pasuk states "Lo Yuchal Leshalchah Kol Yamav" - "he cannot send her all of his days." R' Elchanan's novel thought is that Iy Avid Lo Mehani refers *not* to the forbidden action, but rather to the *forbidden Halachic result*. Being that the result of divorcing such a wife is that she is sent away from him, and this transgresses the Torah's intent that she cannot be in a status of having been sent away from him, Iy Avid Lo Mehani is applicable. This is the kind of topic which is befitting the Halachah of "Iy Avid Lo Mehani." However, R' Elchanan says, if the Torah forbade the action but not the result of that action, Iy Avid Lo Mehani does not apply. This is what is referred to in our case of Shechitah. The Torah never stated that an animal slaughtered by a knife of Avoda Zarah should not be considered Kosher. It just forbade the action of Shechting with such a knife.
In conclusion, as you stated, a person needs to have the thought of Shechting to create a valid Shechitah. However, because making the meat permitted does not go against the Torah's intent, as the Torah does not say or imply that the *Halachic result* of Shechting with a knife of Avoda Zarah is prohibited, the Shechitah remains valid. This is as opposed to a scenario where the *very Halachic status* which the Torah forbade would come about through the action of his sin (divorcing the wife who is a victim of rape), if it were not for the rule of Iy Avid Lo Mehani. (I suggest looking at the piece of Kovetz He'aros if possible, as Rav Elchanan talks about this concept there at length).
All the best,
Yaakov Montrose