From what I looked up about Mai, she has within her the "Nameless Grimoire", a 'blank-slate' Grimoire that can accept all-kinds of Ars-Magus formulas for differing corresponding effects (Fire Formula = Fire Ars Magus, Water Formula = Water Ars Magus, etc.), and even has the potential to turn into a BlazBlue / Azure Grimoire.
Also one of the requirement for wielding the "Nameless Grimoire" is that the holder needs to be female, which is why/how Mai was originally a guy. I look forward to your "Wait, WHAT!" reaction. :]
This information and storyline comes from the BlazBlue: Remix Heart manga.