span.inline-math {
    display:inline;
}

span.display-math, div.display-math {
    display:block;
    text-align:center;
    margin-top:0.2em;
    margin-bottom:0.2em;
}

div.display-math + p {
    margin-top: 0;
}

div.theorem, div.lemma, div.definition, div.corollary, div.proof, div.proposition {
    margin-top: 1em;
    margin-bottom: 1em;
}

div.theorem + div.proof {
    margin-top: -.5em;
}

div.exercise > p:first-child:before {
    content: "Exercise. ";
    font-weight: bold;
}

div.theorem > p:first-child:before {
    content: "Theorem. ";
    font-weight: bold;
}

div.lemma > p:first-child:before {
    content: "Lemma. ";
    font-weight: bold;
}

div.definition > p:first-child:before {
    content: "Definition. ";
    font-weight: bold;
}

div.corollary > p:first-child:before {
    content: "Corollary. ";
    font-weight: bold;
}

div.proposition > p:first-child:before {
    content: "Proposition. ";
    font-weight: bold;
}

div.proof > p:first-child:before {
    content: "Proof. ";
    font-style: italic;
}

div.proof > :last-child:after {
    content: " ∎";
}
