propositions.deduction module¶
Useful proof manipulation maneuvers in Propositional Logic.
-
propositions.deduction.prove_corollary(antecedent_proof, consequent, conditional)¶ Converts the given proof of a formula
antecedentto a proof of the given formulaconsequentby using the given assumptionless inference rule of which'(antecedent->consequent)'is a specialization.- Parameters
antecedent_proof (
Proof) – valid proof ofantecedent.consequent (
Formula) – formula to prove.conditional (
InferenceRule) – assumptionless inference rule of which the assumptionless inference rule with conclusion'(antecedent->consequent)'is a specialization.
- Return type
- Returns
A valid proof of
consequentfrom the same assumptions as the given proof, via the same inference rules as the given proof and in additionMPandconditional.
-
propositions.deduction.combine_proofs(antecedent1_proof, antecedent2_proof, consequent, double_conditional)¶ Combines the given proofs of two formulas
antecedent1andantecedent2into a proof of the given formulaconsequentby using the given assumptionless inference rule of which'(antecedent1->(antecedent2->consequent))'is a specialization.- Parameters
antecedent1_proof (
Proof) – valid proof ofantecedent1.antecedent2_proof (
Proof) – valid proof ofantecedent2from the same assumptions and inference rules asantecedent1_proof.consequent (
Formula) – formula to prove.double_conditional (
InferenceRule) – assumptionless inference rule of which the assumptionless inference rule with conclusion'(antecedent1->(antecedent2->consequent))'is a specialization.
- Return type
- Returns
A valid proof of
consequentfrom the same assumptions as the given proofs, via the same inference rules as the given proofs and in additionMPanddouble_conditional.
-
propositions.deduction.remove_assumption(proof)¶ Converts the given proof of some
conclusionformula, the last assumption of which is an assumptionassumption, to a proof of'(assumption->conclusion)'from the same assumptions exceptassumption.- Parameters
proof (
Proof) – valid proof to convert, with at least one assumption, via some set of inference rules all of which have no assumptions except perhapsMP.- Return type
- Returns
A valid proof of
'(assumption->conclusion)'from the same assumptions as the given proof except the last one, via the same inference rules as the given proof and in additionMP,I0,I1, andD.
-
propositions.deduction.prove_from_opposites(proof_of_affirmation, proof_of_negation, conclusion)¶ Combines the given proofs of a formula
affirmationand its negation'~affirmation'into a proof of the given formula.
-
propositions.deduction.prove_by_way_of_contradiction(proof)¶ Converts the given proof of
'~(p->p)', the last assumption of which is an assumption'~formula', to a proof offormulafrom the same assumptions except'~formula'.- Parameters
proof (
Proof) – valid proof of'~(p->p)'to convert, the last assumption of which is of the form'~formula', via some set of inference rules all of which have no assumptions except perhapsMP.- Return type
- Returns
A valid proof of
formulafrom the same assumptions as the given proof except the last one, via the same inference rules as the given proof and in additionMP,I0,I1,D, andN.