"""Complete a goal-first proof by composing checked facts directly."""

from judgment import Session, implies


def main():
    s = Session()
    P = s.prop("P")
    Q = s.prop("Q")

    proof = s.theorem("swap", implies(P & Q, Q & P))
    h = proof.intro("h")
    proof.exact(proof.conjoin(proof.right(h), proof.left(h)))
    theorem = proof.finish()
    print(theorem)


if __name__ == "__main__":
    main()
