Shevuot (Oaths) 29 - Vain Oaths
What is called an oath given in vain? It is if one swore to contradict something which is well known to people. For example, if he said about a stone column that it is made of gold, or about a man that he is a woman, or about a woman that she is a man.
Another example of a vain oath is when he swore about something that is impossible for him to do, or which is prohibited by the Torah, and in this sense impossible. Thus, if he knew a testimony and swore not to say it, it is a vain oath, since he is obligated by the Torah to testify if he knows a favorable testimony about someone. Similarly, it is a vain oath not to put on tefillin.
For vain oaths one is liable to lashes if the violation is willful, and is completely exempt if he did it by mistake.
Art: Edward Pritchett - A View Of St Mark's Column, And The Doge's Palace, Venice