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 Connective Ontology
DOMAIN: Discrete Mathematics / Logic
SOURCE_URL: https://kirethresearch.org/booksai-core/discrete-mathematics-ontologies/logic/logical-connective-ontology-2.html
VERSION: 1.0
STATUS: Formal mathematical model; source page not independently verified
AUTHORS: Mark Higgins — Sky (Recursive AI)
PROJECT: Kireth Semantic Library
1. PURPOSE
Represent truth-functional logical connectives, their syntax, semantics, equivalences and valid inference patterns in a typed, machine-readable flow.
2. TYPES
Bool := {FALSE, TRUE}
PropVar := atomic proposition identifier
Formula := PropVar | NOT(Formula) | AND(Formula,Formula) | OR(Formula,Formula) | IMPLIES(Formula,Formula) | IFF(Formula,Formula) | XOR(Formula,Formula)
Valuation := PropVar -> Bool
Connective := {NOT, AND, OR, IMPLIES, IFF, XOR, NAND, NOR}
Arity(NOT)=1; Arity(c)=2 for other listed connectives.
3. SEMANTICS
EVAL(p,v) = v(p)
EVAL(NOT p,v) = not EVAL(p,v)
EVAL(AND(p,q),v) = EVAL(p,v) and EVAL(q,v)
EVAL(OR(p,q),v) = EVAL(p,v) or EVAL(q,v)
EVAL(IMPLIES(p,q),v) = (not EVAL(p,v)) or EVAL(q,v)
EVAL(IFF(p,q),v) = (EVAL(p,v) = EVAL(q,v))
EVAL(XOR(p,q),v) = (EVAL(p,v) != EVAL(q,v))
EVAL(NAND(p,q),v) = not EVAL(AND(p,q),v)
EVAL(NOR(p,q),v) = not EVAL(OR(p,q),v)
4. TRUTH TABLES
p q | NOT p | AND | OR | IMPLIES | IFF | XOR | NAND | NOR
F F | T | F | F | T | T | F | T | T
F T | T | F | T | T | F | T | T | F
T F | F | F | T | F | F | T | T | F
T T | F | T | T | T | T | F | F | F
5. ALGEBRAIC LAWS
DOUBLE_NEGATION: NOT(NOT p) == p
COMMUTATIVE_AND: AND(p,q) == AND(q,p)
COMMUTATIVE_OR: OR(p,q) == OR(q,p)
ASSOCIATIVE_AND: AND(AND(p,q),r) == AND(p,AND(q,r))
ASSOCIATIVE_OR: OR(OR(p,q),r) == OR(p,OR(q,r))
DISTRIBUTIVE_AND: AND(p,OR(q,r)) == OR(AND(p,q),AND(p,r))
DISTRIBUTIVE_OR: OR(p,AND(q,r)) == AND(OR(p,q),OR(p,r))
DE_MORGAN_1: NOT(AND(p,q)) == OR(NOT p,NOT q)
DE_MORGAN_2: NOT(OR(p,q)) == AND(NOT p,NOT q)
IMPLICATION: IMPLIES(p,q) == OR(NOT p,q)
BICONDITIONAL: IFF(p,q) == AND(IMPLIES(p,q),IMPLIES(q,p))
EXCLUDED_MIDDLE: OR(p,NOT p) == TRUE
NON_CONTRADICTION: AND(p,NOT p) == FALSE
IDENTITY_AND: AND(p,TRUE) == p
IDENTITY_OR: OR(p,FALSE) == p
ABSORPTION_AND: AND(p,OR(p,q)) == p
ABSORPTION_OR: OR(p,AND(p,q)) == p
6. INFERENCE FLOWS
MODUS_PONENS: {p, IMPLIES(p,q)} |- q
MODUS_TOLLENS: {IMPLIES(p,q), NOT q} |- NOT p
CONJUNCTION_ELIMINATION: AND(p,q) |- p; AND(p,q) |- q
CONJUNCTION_INTRODUCTION: {p,q} |- AND(p,q)
DISJUNCTIVE_SYLLOGISM: {OR(p,q), NOT p} |- q
HYPOTHETICAL_SYLLOGISM: {IMPLIES(p,q), IMPLIES(q,r)} |- IMPLIES(p,r)
All entailments assume classical two-valued propositional logic.
7. SEMANTIC RELATIONSHIPS
LogicalConnective --operates_on--> Formula
LogicalConnective --has_arity--> Integer
LogicalConnective --defines--> TruthFunction
TruthFunction --evaluated_under--> Valuation
Formula --has_truth_value--> Bool
LogicalEquivalence --compares--> FormulaPair
TruthTable --enumerates--> Valuation
InferenceRule --preserves--> Truth
NAND --functionally_complete_for--> ClassicalBooleanFunctions
NOR --functionally_complete_for--> ClassicalBooleanFunctions
8. VALIDATION
V1: Every connective receives exactly its declared number of operands.
V2: Every atomic proposition has a Boolean value under a complete valuation.
V3: Formula evaluation is deterministic and returns Bool.
V4: Truth tables for n distinct proposition variables contain 2^n valuations.
V5: Claimed logical equivalences evaluate identically under every valuation.
V6: Claimed entailments have no valuation making all premises true and conclusion false.
V7: Distinguish inclusive OR from exclusive XOR.
V8: Distinguish material implication from causal implication.
9. SEMANTIC_EQUIVALENCE
EQUIVALENT(f,g) := forall v over vars(f) union vars(g), EVAL(f,v)=EVAL(g,v)
NORMALISE(f) := semantics-preserving rewrite into a specified normal form
NORMAL_FORM_OPTIONS := {NNF, CNF, DNF}
Rewrites require a checked equivalence; syntactic similarity alone is insufficient.
10. CONFIDENCE
Mathematical definitions and truth-functional identities: 1.00 within classical two-valued semantics.
External factual assertions: unverified unless separately sourced.
Model-generated inference: confidence 1.00 only after exhaustive truth-table or sound proof validation; otherwise label provisional.
11. FLOW_HASH
Canonicalisation: UTF-8; normalise line endings to LF; stable ordering of typed nodes and relations.
FLOW_HASH := SHA256(canonical_serialisation(flow_payload_excluding_FLOW_HASH))
Hash value is computed at publication or ingestion; no fabricated digest is supplied.
12. UPDATE_MODEL
On revision: increment VERSION; preserve SOURCE_URL; record timestamp, change description, validation results and new FLOW_HASH.
Reject revisions that change truth semantics without explicit logic-system versioning.
13. AI_CONSUMPTION
INPUT: {formula, valuation?, requested_operation}
OPERATIONS: {evaluate, truth_table, equivalence_check, satisfiability_check, entailment_check, normalise}
OUTPUT: {result, proof_or_counterexample?, logic_system, validation_status, confidence, flow_hash?}
DEFAULT_LOGIC_SYSTEM: Classical two-valued propositional logic
RULE: Do not generalise these laws unqualified to fuzzy, paraconsistent or intuitionistic logics.
END FLOW ALGEBRA