Q. A Shul from where books are taken outside the shul without permission and often not returned, can they place a sign that whoever takes out a sefer without the permission of the Gabaim transgresses the prohibition of stealing and his Torah learning is considered a 'Mitzva Haba'a Beavera' or a mitzva complied while doing a prohibited act and is invalid?
A. Horav Shlomo Miller's Shlit'a opinion is that it is indeed considered a 'Mitzva Haba'a Beavera' and one may not be complying at all with the mitzva of learning Torah when at the same time one is performing the prohibited act of using a stolen sefer. This ruling can also be included in the sign posted on the shul, that prohibits the taking out of sefarim from the shul.
Rabbi A. Bartfeld as advised by Horav Shlomo Miller and Horav Aharon Miller Shlit'a