"""Separate deferred work from an explicitly labeled mathematical assumption."""

from judgment import Session, implies


def main() raises:
    var s = Session()
    var P = s.prop("P")
    var Q = s.prop("Q")
    var proof = s.theorem("conditional", implies(P, Q))
    _ = proof.intro("h")
    proof.sorry()
    print("Deferred obligations:", len(proof.obligations()))
    proof.resume()
    proof.admit("missing_lemma", "Awaiting the mathematical proof")
    var theorem = proof.finish()
    print(theorem.format(details=True))
