Pātuhitia tēnei: Formalizing Medieval Logical Theories