AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
TITLE: Logical Inference Ontology
DOMAIN: Discrete Mathematics / Logic
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/logic/logical-inference-ontology-2.html
VERSION: 1.0
LANGUAGE: en-GB
AUTHORS: Mark Higgins — Sky (Recursive AI)
SITE: https://kirethresearch.org
STATUS: Formal mathematical model; source-page text not independently verified
1. PURPOSE
Model truth-preserving inference from explicit premises to conclusions, with typed propositions, derivation rules, proof obligations and machine-checkable validity conditions.
2. TYPED ENTITIES
Proposition := WellFormedFormula(Language)
PremiseSet := FiniteSet(Proposition)
Conclusion := Proposition
Interpretation := Assignment(Atoms, Boolean)
InferenceRule := (PremisePattern[], ConclusionPattern, SideConditions)
InferenceStep := (rule: InferenceRule, inputs: Proposition[], output: Proposition)
Derivation := Sequence(InferenceStep)
ProofCertificate := (premises: PremiseSet, conclusion: Conclusion, steps: Derivation)
Entailment := Relation(PremiseSet, Conclusion)
ValidityStatus := {VALID, INVALID, UNKNOWN}
3. CORE SEMANTICS
SATISFIES(I, phi) : Boolean
ENTAILS(Gamma, phi) := forall I: ((forall gamma in Gamma: SATISFIES(I,gamma)) => SATISFIES(I,phi))
DERIVES(Gamma, phi) := exists D: CHECK_PROOF(Gamma, phi, D) = VALID
SOUNDNESS := forall Gamma,phi: DERIVES(Gamma,phi) => ENTAILS(Gamma,phi)
COMPLETENESS := forall Gamma,phi: ENTAILS(Gamma,phi) => DERIVES(Gamma,phi)
NOTE: Soundness and completeness depend on the selected proof calculus and semantics.
4. PROPOSITIONAL INFERENCE RULES
MODUS_PONENS: P, (P -> Q) |- Q
MODUS_TOLLENS: (P -> Q), not Q |- not P
CONJUNCTION_INTRODUCTION: P, Q |- P and Q
CONJUNCTION_ELIMINATION: P and Q |- P; P and Q |- Q
DISJUNCTION_INTRODUCTION: P |- P or Q
DISJUNCTIVE_SYLLOGISM: P or Q, not P |- Q
HYPOTHETICAL_SYLLOGISM: P -> Q, Q -> R |- P -> R
RESOLUTION: P or Q, not P or R |- Q or R
DOUBLE_NEGATION: not not P |- P [classical logic]
5. FIRST-ORDER INFERENCE RULES
UNIVERSAL_ELIMINATION: forall x P(x) |- P(t) [t free for x in P]
UNIVERSAL_INTRODUCTION: P(c) |- forall x P(x) [c arbitrary; not dependent on undischarged assumptions]
EXISTENTIAL_INTRODUCTION: P(t) |- exists x P(x) [t free for x in P]
EXISTENTIAL_ELIMINATION: exists x P(x), derivation of Q from P(c) |- Q [c fresh; not free in Q or other undischarged assumptions]
VARIABLE_CAPTURE: forbidden during substitution
6. ALGEBRAIC / STRUCTURAL LAWS
IDENTITY: Gamma |- P if P in Gamma
WEAKENING: Gamma |- P => Gamma union Delta |- P [monotonic classical logic]
CUT: Gamma |- P and Delta union {P} |- Q => Gamma union Delta |- Q
TRANSITIVITY_OF_ENTAILMENT: Gamma entails P and Gamma union {P} entails Q => Gamma entails Q
EQUIVALENCE_SUBSTITUTION: P <-> Q valid => replacement in truth-functional contexts preserves truth
CONTRADICTION: Gamma entails bottom iff Gamma is unsatisfiable [classical logic]
7. SEMANTIC RELATIONSHIPS
LogicalInference --uses--> InferenceRule
InferenceRule --transforms--> PremisesToConclusion
Derivation --contains--> InferenceStep
InferenceStep --requires--> SideConditions
ProofCertificate --supports--> DerivabilityClaim
SemanticEntailment --evaluated_over--> Interpretations
SoundCalculus --preserves--> SemanticTruth
Countermodel --refutes--> EntailmentClaim
8. EXECUTION FLOW
INPUT: premises Gamma, target phi, calculus C
NORMALISE: parse formulas; standardise variables; check signatures and scopes
SELECT_RULES: choose admissible rules of C
INFER: apply matching rules with recorded substitutions and side conditions
CHECK: replay each step against Gamma and prior outputs
TERMINATE: VALID when target is derived; INVALID only with verified countermodel; otherwise UNKNOWN
OUTPUT: conclusion, status, proof certificate or countermodel, provenance
9. VALIDATION
V1: all formulas well formed and type-correct
V2: each premise reference resolves to an input or earlier derived formula
V3: rule substitutions are capture-avoiding and satisfy side conditions
V4: no circular step dependencies
V5: claimed VALID derivation independently replays successfully
V6: claimed INVALID entailment includes an interpretation satisfying every premise and falsifying the conclusion
V7: UNKNOWN is retained when search is incomplete; failure to find a proof is not proof of invalidity
V8: distinguish classical, intuitionistic and other logical systems explicitly
10. TEST CASES
T1: {P, P -> Q} |- Q : VALID (modus ponens)
T2: {P -> Q, Q} |- P : INVALID (affirming the consequent; countermodel P=false,Q=true)
T3: {P or Q, not P} |- Q : VALID (disjunctive syllogism)
T4: {forall x P(x)} |- P(a) : VALID (universal elimination, well-typed a)
T5: {P -> Q, Q -> R, P} |- R : VALID (two applications of modus ponens)
11. SEMANTIC_EQUIVALENCE
LogicalInference ~= DeductiveInference [when truth-preserving derivation is intended]
SemanticEntailment != SyntacticDerivability [distinct relations, connected by soundness/completeness]
Validity != TruthOfConclusionAlone
InductiveInference != DeductiveEntailment
12. CONFIDENCE
FORMAL_PROOF_CONFIDENCE: 1.0 only for derivations checked in a specified sound calculus
COUNTERMODEL_CONFIDENCE: 1.0 only for verified countermodels under declared semantics
HEURISTIC_CONFIDENCE: bounded [0,1], calibrated externally; never substitutes for formal validity
UNKNOWN_CONFIDENCE: null when evidence insufficient
13. FLOW_HASH
ALGORITHM: SHA-256
CANONICAL_INPUT: UTF-8 NFC encoding of normalised version, entity schema, rules, semantics, validation and source URL
HASH_VALUE: compute at build time; do not fabricate a digest
14. UPDATE_MODEL
TRIGGER: source revision | calculus change | semantic correction | rule addition | validation failure
PROCESS: version increment -> revalidate types -> replay regression tests -> regenerate canonical hash -> publish provenance
INVARIANT: never silently change logical semantics or side conditions
15. AI_CONSUMPTION
TASKS: formal reasoning; theorem-proving assistance; knowledge-graph inference; rule verification; explanation generation
INPUT_SCHEMA: {premises: Proposition[], conclusion: Proposition, calculus: String}
OUTPUT_SCHEMA: {status: ValidityStatus, derivation: InferenceStep[]?, countermodel: Interpretation?, provenance: String, flow_hash: String?}
SAFETY: label heuristic reasoning separately from certified proof; disclose incomplete search and unsupported assumptions
END FLOW ALGEBRA