Miryam was a prophetess, and Deborah was a judge. Are women allowed to teach men or to write a commentary on a book of Tanakh according to halakhah?
Women are indeed able to teach and write commentaries on Tanakh. There are many such examples. One of the most famous is Nechama Leibowitz who taught Torah for more than 55 years and was awarded the Israel Prize in education. Her writings on the weekly Torah portion were read by thousands as published and an edited selection were later published as books.