propositions.operators module

Syntactic conversion of propositional formulas to use only specific sets of operators.

propositions.operators.to_not_and_or(formula)

Syntactically converts the given formula to an equivalent formula that contains no constants or operators beyond '~', '&', and '|'.

Parameters

formula (Formula) – formula to convert.

Return type

Formula

Returns

A formula that has the same truth table as the given formula, but contains no constants or operators beyond '~', '&', and '|'.

propositions.operators.to_not_and(formula)

Syntactically converts the given formula to an equivalent formula that contains no constants or operators beyond '~' and '&'.

Parameters

formula (Formula) – formula to convert.

Return type

Formula

Returns

A formula that has the same truth table as the given formula, but contains no constants or operators beyond '~' and '&'.

propositions.operators.to_nand(formula)

Syntactically converts the given formula to an equivalent formula that contains no constants or operators beyond '-&'.

Parameters

formula (Formula) – formula to convert.

Return type

Formula

Returns

A formula that has the same truth table as the given formula, but contains no constants or operators beyond '-&'.

propositions.operators.to_implies_not(formula)

Syntactically converts the given formula to an equivalent formula that contains no constants or operators beyond '->' and '~'.

Parameters

formula (Formula) – formula to convert.

Return type

Formula

Returns

A formula that has the same truth table as the given formula, but contains no constants or operators beyond '->' and '~'.

propositions.operators.to_implies_false(formula)

Syntactically converts the given formula to an equivalent formula that contains no constants or operators beyond '->' and 'F'.

Parameters

formula (Formula) – formula to convert.

Return type

Formula

Returns

A formula that has the same truth table as the given formula, but contains no constants or operators beyond '->' and 'F'.