Skip to main content

Contrapositive Ontology

Proof Theory
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 17 September 2026
Audio Overview
KIRETH RESEARCH — SEMANTIC LIBRARY
AI CORE → ONTOLOGIES → MATHEMATICAL ONTOLOGIES → MATHEMATICAL LOGIC ONTOLOGIES
PROOF THEORY → CONTRAPOSITIVE ONTOLOGY

Canonical URL:
https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/proof-theory/contrapositive-ontology.html

FLOW_ALGEBRA ContrapositiveOntology_v1.0

BEGIN_FLOW

DEFINE DOMAIN ContrapositiveOntology := {
    Contrapositive,
    ProofByContrapositive,
    IndirectProof,
    Proof,
    ProofTheory,
    Proposition,
    Formula,
    Implication,
    Antecedent,
    Consequent,
    Negation,
    LogicalEquivalence,
    ConditionalStatement,
    Converse,
    Inverse,
    ModusTollens,
    ModusPonens,
    ClassicalLogic,
    IntuitionisticLogic,
    Derivation,
    ProofStep,
    Premise,
    Assumption,
    Conclusion,
    InferenceRule,
    ValidProof,
    ProofVerification
}

DEFINE ENTITY_TYPES := {
    CONTRAPOSITIVE,
    PROOF_METHOD,
    FORMULA,
    IMPLICATION,
    NEGATION,
    PREMISE,
    ASSUMPTION,
    CONCLUSION,
    INFERENCE_RULE,
    PROOF,
    PROOF_STEP,
    LOGICAL_SYSTEM,
    EQUIVALENCE_RELATION,
    SEMANTIC_OBJECT
}

DEFINE RELATION_TYPES := {
    CONTRAPOSITIVE_OF,
    NEGATES,
    HAS_ANTECEDENT,
    HAS_CONSEQUENT,
    EQUIVALENT_TO,
    DERIVES,
    HAS_PREMISE,
    HAS_ASSUMPTION,
    HAS_CONCLUSION,
    HAS_STEP,
    USES_RULE,
    DEPENDS_ON,
    TRANSFORMS,
    ESTABLISHES,
    IS_INSTANCE_OF,
    IS_SUBTYPE_OF
}

SET Contrapositive.type = CONTRAPOSITIVE
SET Contrapositive.context = ProofTheory
SET Contrapositive.role =
    "transform an implication P → Q into the implication ¬Q → ¬P by negating and reversing antecedent and consequent"

RULE contrapositive_construction:
    Formula(P -> Q)
    -> Contrapositive(¬Q -> ¬P)
    ∧ CONTRAPOSITIVE_OF(¬Q -> ¬P, P -> Q)

RULE antecedent_mapping:
    Implication(P -> Q)
    -> HAS_ANTECEDENT(P -> Q,P)
    ∧ HAS_CONSEQUENT(P -> Q,Q)

RULE contrapositive_antecedent:
    Contrapositive(¬Q -> ¬P)
    -> HAS_ANTECEDENT(¬Q -> ¬P,¬Q)

RULE contrapositive_consequent:
    Contrapositive(¬Q -> ¬P)
    -> HAS_CONSEQUENT(¬Q -> ¬P,¬P)

RULE classical_equivalence:
    ClassicalLogic
    ∧ Formula(P -> Q)
    -> EQUIVALENT_TO(
        P -> Q,
        ¬Q -> ¬P
    )

RULE intuitionistic_contrapositive_direction:
    IntuitionisticLogic
    ∧ Available(P -> Q)
    -> DERIVES(¬Q -> ¬P)

RULE intuitionistic_reverse_warning:
    IntuitionisticLogic
    ∧ Available(¬Q -> ¬P)
    -> DO_NOT_INFER(P -> Q)
       WITHOUT additional_principle

RULE modus_tollens:
    Available(P -> Q)
    ∧ Available(¬Q)
    -> DERIVES(¬P)

RULE proof_by_contrapositive_classical:
    ClassicalLogic
    ∧ Goal(P -> Q)
    -> TransformGoal(¬Q -> ¬P)
    -> Assume(¬Q)
    -> Derive(¬P)
    -> Conclude(P -> Q)

RULE contrapositive_chain:
    Available(P -> Q)
    ∧ Available(Q -> R)
    -> Available(P -> R)
    -> Contrapositive(¬R -> ¬P)

RULE double_contrapositive_classical:
    ClassicalLogic
    ∧ Formula(P -> Q)
    -> Contrapositive(Contrapositive(P -> Q))
       EQUIVALENT_TO
       P -> Q

RULE converse:
    Formula(P -> Q)
    -> Converse(Q -> P)

RULE inverse:
    Formula(P -> Q)
    -> Inverse(¬P -> ¬Q)

RULE converse_inverse_relation:
    ClassicalLogic
    -> EQUIVALENT_TO(
        Converse(P -> Q),
        Inverse(P -> Q)
    )

RULE non_equivalence_warning:
    Formula(P -> Q)
    -> DO_NOT_INFER EQUIVALENT_TO(P -> Q,Q -> P)
    ∧ DO_NOT_INFER EQUIVALENT_TO(P -> Q,¬P -> ¬Q)

DEFINE CONTRAPOSITIVE_MODEL := {
    original: "P → Q",
    contrapositive: "¬Q → ¬P",
    transformation: {
        "negate consequent Q to obtain ¬Q",
        "negate antecedent P to obtain ¬P",
        "reverse their implication positions"
    }
}

DEFINE CONDITIONAL_FORMS := {
    original: "P → Q",
    converse: "Q → P",
    inverse: "¬P → ¬Q",
    contrapositive: "¬Q → ¬P"
}

DEFINE EQUIVALENCE_MODEL := {
    ClassicalLogic: {
        "P → Q" : "equivalent to ¬Q → ¬P",
        "Q → P" : "equivalent to ¬P → ¬Q"
    },
    IntuitionisticLogic: {
        "P → Q entails ¬Q → ¬P": TRUE,
        "¬Q → ¬P entails P → Q": FALSE_BY_DEFAULT
    }
}

DEFINE PROOF_BY_CONTRAPOSITIVE_MODEL := {
    target: "P → Q",
    classical_method: {
        "replace the target with ¬Q → ¬P",
        "assume ¬Q",
        "derive ¬P",
        "conclude the contrapositive",
        "use classical equivalence to establish P → Q"
    }
}

DEFINE CRITICAL_DISTINCTIONS := {
    contrapositive_vs_converse: {
        contrapositive: "¬Q → ¬P",
        converse: "Q → P",
        equivalence_to_original_in_classical_logic: {
            contrapositive: TRUE,
            converse: FALSE_BY_DEFAULT
        }
    },
    contrapositive_vs_inverse: {
        contrapositive: "¬Q → ¬P",
        inverse: "¬P → ¬Q",
        equivalence_to_original_in_classical_logic: {
            contrapositive: TRUE,
            inverse: FALSE_BY_DEFAULT
        }
    },
    contrapositive_vs_contradiction: {
        contrapositive:
            "proves a reversed negated implication",
        contradiction:
            "derives an explicit inconsistency from a temporary assumption"
    }
}

DEFINE EXAMPLE_1 := {
    original:
        "If an integer is divisible by 4, then it is even.",
    symbolic: "D4(n) → Even(n)",
    contrapositive:
        "¬Even(n) → ¬D4(n)",
    natural_language:
        "If an integer is not even, then it is not divisible by 4."
}

DEFINE EXAMPLE_2 := {
    original: "P → Q",
    premise: "¬Q",
    conclusion: "¬P",
    rule: ModusTollens
}

DEFINE EXAMPLE_3 := {
    theorem:
        "If n² is odd, then n is odd.",
    contrapositive:
        "If n is even, then n² is even.",
    proof_strategy:
        "prove the contrapositive directly"
}

DEFINE TRANSFORMATION_PIPELINE :=
    ConditionalFormula
    -> IdentifyAntecedent(P)
    -> IdentifyConsequent(Q)
    -> NegateConsequent
    -> NegateAntecedent
    -> ReversePositions
    -> Construct(¬Q -> ¬P)
    -> TagAsContrapositiveOfOriginal

DEFINE PROOF_PLANNING_PIPELINE :=
    Goal(P -> Q)
    -> DetermineLogicalSystem
    -> IF classical_logic
       THEN GenerateContrapositiveGoal(¬Q -> ¬P)
    -> AssessWhetherContrapositiveIsSimpler
    -> Assume(¬Q)
    -> DeriveConsequences
    -> Seek(¬P)
    -> VerifyContrapositiveDerivation
    -> RecoverOriginalGoalWhenLicensed

DEFINE PROOF_VERIFICATION_PIPELINE :=
    CandidateContrapositiveProof
    -> ParseOriginalImplication
    -> VerifyGeneratedContrapositive
    -> VerifyNegations
    -> VerifyAntecedentConsequentReversal
    -> ValidateProofSteps
    -> ValidateLogicalSystem
    -> ValidateEquivalenceStepIfUsed
    -> Return ValidProof OR InvalidProof

DEFINE CONTRAPOSITIVE_GRAPH_MODEL := {
    original_node: "P → Q",
    antecedent_node: P,
    consequent_node: Q,
    negated_antecedent_node: "¬P",
    negated_consequent_node: "¬Q",
    contrapositive_node: "¬Q → ¬P",
    edges: {
        HAS_ANTECEDENT,
        HAS_CONSEQUENT,
        NEGATES,
        CONTRAPOSITIVE_OF,
        EQUIVALENT_TO
    },
    logical_system_sensitive: TRUE
}

DEFINE ONTOLOGY_RELATIONS := {
    Contrapositive IS_COMPONENT_OF ProofTheory,
    ProofByContrapositive IS_SUBTYPE_OF IndirectProof,
    Contrapositive CONTRAPOSITIVE_OF Implication,
    Contrapositive NEGATES Consequent,
    Contrapositive NEGATES Antecedent,
    ProofByContrapositive DEPENDS_ON Contrapositive,
    ModusTollens USES ContrapositiveReasoning,
    Converse IS_DISTINCT_FROM Contrapositive,
    Inverse IS_DISTINCT_FROM Contrapositive,
    ClassicalEquivalence RELATES Implication TO Contrapositive
}

DEFINE SEMANTIC_EQUIVALENCE := {
    "contrapositive" <=> Contrapositive,
    "contrapositive statement" <=> Contrapositive,
    "proof by contrapositive" <=> ProofByContrapositive,
    "contrapositive proof" <=> ProofByContrapositive,
    "P implies Q" <=> "P → Q",
    "not Q implies not P" <=> "¬Q → ¬P"
}

DEFINE AI_CONSUMPTION := {
    purpose: "machine-readable representation, transformation and proof use of contrapositives",
    preserve_original_implication: TRUE,
    preserve_antecedent_identity: TRUE,
    preserve_consequent_identity: TRUE,
    preserve_negation_scope: TRUE,
    reverse_implication_positions_correctly: TRUE,
    distinguish_contrapositive_from_converse: TRUE,
    distinguish_contrapositive_from_inverse: TRUE,
    distinguish_contrapositive_from_contradiction: TRUE,
    preserve_logical_system_identity: TRUE,
    apply_full_equivalence_only_when_licensed: TRUE,
    support_modus_tollens: TRUE,
    support_proof_by_contrapositive: TRUE,
    reasoning_mode: "symbolic + transformation-aware + negation-aware + system-sensitive"
}

DEFINE CONFIDENCE := {
    ontology_identity: 1.00,
    formal_contrapositive_generation: 1.00,
    antecedent_consequent_mapping: 0.99,
    negation_scope: 0.99,
    classical_equivalence_mapping: 0.99,
    intuitionistic_direction_mapping: 0.99,
    converse_inverse_distinction: 1.00,
    natural_language_contrapositive_mapping: context_dependent
}

DEFINE UPDATE_MODEL := {
    version: "1.0",
    update_policy: "append-compatible",
    immutable_core: {
        implication_structure,
        negate_and_reverse_transformation,
        contrapositive_identity,
        converse_distinction,
        inverse_distinction,
        logical_system_sensitivity
    },
    extensible_layers: {
        classical_contrapositive_proofs,
        intuitionistic_contrapositive_reasoning,
        quantified_contrapositives,
        predicate_logic_contrapositives,
        automated_goal_transformation,
        proof_assistant_contrapositive_tactics
    }
}

DEFINE FLOW_HASH_INPUT :=
    CanonicalURL
    + DOMAIN
    + ENTITY_TYPES
    + RELATION_TYPES
    + RULES
    + CONTRAPOSITIVE_MODEL
    + CONDITIONAL_FORMS
    + EQUIVALENCE_MODEL
    + PROOF_BY_CONTRAPOSITIVE_MODEL
    + CRITICAL_DISTINCTIONS
    + TRANSFORMATION_PIPELINE
    + PROOF_PLANNING_PIPELINE
    + PROOF_VERIFICATION_PIPELINE
    + CONTRAPOSITIVE_GRAPH_MODEL
    + ONTOLOGY_RELATIONS
    + AI_CONSUMPTION
    + UPDATE_MODEL

FLOW_HASH := HASH(FLOW_HASH_INPUT)

RETURN {
    ontology: ContrapositiveOntology,
    canonical_url: "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/proof-theory/contrapositive-ontology.html",
    parent_domain: ProofTheory,
    semantic_domain: MathematicalLogic,
    primary_entity: Contrapositive,
    transformation_enabled: TRUE,
    proof_by_contrapositive_enabled: TRUE,
    modus_tollens_enabled: TRUE,
    logical_system_sensitive: TRUE,
    machine_consumable: TRUE,
    recursive_reasoning_enabled: TRUE,
    flow_complete: TRUE
}

END_FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ