@azelfius
He's not necessarily dumb, just highly biased. Not to mention there is no way for anybody else to know the true extent of her experience since, ya know, she has 400 years of being next to a dozen emperors, I would be more worried if she wasn't smarter than everyone else just due to the sheer time she spent learning from what I assume would be the best tutors of their times.
Hell, if I spent 400 years next to generations of the smartest scientists and came back in time even I, a average person, would have enough knowledge to be considered a genius scientist.
@Kanika
In the original raws he didn't criticize her actual lineage, he said "you are nothing more than a duchess", essentially revealing he was criticizing her gender more than anything else (and the rumors surrounding her were actually all negative, so he would have had no way to know about her swordsmanship or knowledge since she purposefully got a honorary knighthood to conceal her true skills) . Plus, his comments on the prince was when he was incredibly angry and unable to control himself- he likely regretted saying that based on his expression afterwards since, as you said, a prince is a prince regardless of how unassuming.