Our Gemara discusses a case of shetar she-katuv bo ribit – a contract or promissory note that has the forbidden interest written into it. We find that according to Rabbi Meir we penalize the lender and do not allow him to collect anything with this note, neither the loan itself nor the interest. The Hakhamim argue, ruling that the lender can still collect the principal of the loan based on this note. The Gemara explains the argument as dependent on whether we penalize the permissible element of the agreement because of the forbidden part; Rabbi Meir believes that we do while the Hakhamim believe that we do not.
In defining the case of shetar she-katuv bo ribit we find a disagreement between the Ramban and Tosafot. According to the Ramban, the note cannot possibly state clearly that this is a loan with forbidden interest, since in that case the note would be invalid according to all opinions. His argument is that witnesses who play a role in a forbidden act are, by definition, invalid witnesses. Without valid witnesses, the note has no legal standing. The Ramban explains that the argument in the Gemara would only be in a case where the interest is included as part of the sum total of money owed, but without stating that part of the money was ribit (forbidden interest). Tosafot argue that the case described by the Ramban could not be considered a legal document, since the hidden ribit might actually be collected. A case where the ribit is clearly included as interest, however, may be a viable note. Tosafot do not assume that witnesses become invalid when they sign a document that includes ribit, since many people do not realize that agreed upon interest is a biblical prohibition, and their lack of knowledge would not disqualify them.