<math xmlns='http://www.w3c.org/mathml' version='2.0'>
  <apply> <forall/>
    <condition>
      <apply> <and/>
        <apply> <gt/>
          <ci> a </ci>
          <cn> 0 </cn>
        </apply>
      </apply>
    </condition>
    <apply> <eq/> 
      <apply> <log/> 
        <logbase> <ci> g </ci> </logbase>
        <ci> a </ci>
      </apply>   
      <apply> <divide/>
        <apply> <log/> 
          <logbase> <ci> p </ci> </logbase>
          <ci> a </ci>
        </apply>
        <apply> <log/> 
          <logbase> <ci> p </ci> </logbase>
          <ci> g </ci>
        </apply>
      </apply>
    </apply>
  </apply>
</math>