Step

class pqp.refutation.Step(name)

Bases: object

Human-interpretable notes on how a result was derived

Subroutes in the library should use this class to record the steps taken to derive a result. This class is not intended to be used by end-users.

Parameters:

name (str) – the name of the step

Methods Summary

assume(assumption)

Add an assumption to the derivation

explain([pad])

Print an explanation of the derivation of the result

result(key, value)

Record the value derived during the step

substep(name)

Add a substep to the derivation

write(msg)

Add a note about the derivation

Methods Documentation

assume(assumption)

Add an assumption to the derivation

Parameters:

assumption (Assumption or str) – the assumption to add

Returns:

None

explain(pad=True)

Print an explanation of the derivation of the result

result(key, value)

Record the value derived during the step

Parameters:
  • key (str) – the name of the derived value

  • value (Any) – the derived value

Returns:

None

substep(name)

Add a substep to the derivation

Parameters:

name (str) – the name of the substep

Returns:

the substep

Return type:

Step

write(msg)

Add a note about the derivation

Parameters:

msg (str) – the message to add

Returns:

None