Skip to main content

Epistemic Logic Ontology

Modal Logic
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 17 September 2026
Audio Overview
FLOW_ALGEBRA EpistemicLogicOntology v1.0

TARGET_URL := "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/modal-logic/epistemic-logic-ontology.html"
LANGUAGE := "en-GB"
DOMAIN := MathematicalOntologies > MathematicalLogicOntologies > ModalLogic > EpistemicLogicOntology

BEGIN_FLOW

ENTITY EpistemicLogic {
    TYPE := ModalLogicalSystem
    DEFINITION := "A family of formal logics for representing and reasoning about knowledge, information and related epistemic attitudes of one or more agents."
}

ENTITY Agent {
    TYPE := EpistemicReasoner
}

ENTITY KnowledgeOperator {
    TYPE := AgentIndexedModalOperator
    FORM := K_a(P)
    READING := "agent a knows that P"
}

RELATIONSHIP EpistemicLogic --specialises--> ModalLogic
RELATIONSHIP EpistemicLogic --reasons_about--> Knowledge
RELATIONSHIP EpistemicLogic --contains--> Agent
RELATIONSHIP KnowledgeOperator --indexed_by--> Agent
RELATIONSHIP EpistemicLogic --is_interpreted_by--> EpistemicKripkeModel
RELATIONSHIP Agent --has--> EpistemicAccessibilityRelation

ENTITY EpistemicKripkeModel {
    FORM := (W,{R_a | a ∈ Agents},V)
    W := EpistemicallyPossibleWorlds
    R_a := AccessibilityRelationForAgent_a
    V := Valuation
}

ENTITY EpistemicallyPossibleWorld {
    TYPE := PossibleWorld
    INTERPRETATION := state_considered_possible_under_epistemic_model
}

ENTITY EpistemicAccessibilityRelation {
    TYPE := AgentIndexedBinaryRelation
    SIGNATURE := R_a ⊆ W × W
}

SYNTAX {
    Formula :=
        AtomicProposition
        | ¬Formula
        | (Formula ∧ Formula)
        | (Formula ∨ Formula)
        | (Formula → Formula)
        | K_a Formula
}

KNOWLEDGE_SEMANTICS {
    M,w ⊨ K_a P
    IFF
        FOR_ALL v:
            R_a(w,v) -> M,v ⊨ P
}

KNOWS_AT(Model M, Agent a, World w, Formula P) {
    alternatives := {v | R_a(w,v)}

    FOR_EACH v IN alternatives {
        IF M,v ⊭ P
            RETURN {
                value := FALSE,
                counterexample_world := v
            }
    }

    RETURN {
        value := TRUE,
        counterexample_world := NONE
    }
}

EPISTEMIC_POSSIBILITY {
    M,w ⊨ M_a P
    IFF
        EXISTS v:
            R_a(w,v)
            AND M,v ⊨ P

    DUALITY :=
        M_a P ≡ ¬K_a¬P
}

NOT_KNOWN {
    ¬K_a P
    ≡
    M_a ¬P

    INTERPRETATION :=
        there is an a-accessible epistemic alternative where P is false
}

AGENT_RELATIVE_WORLD_SET {
    POSSIBLE_FOR(a,w) :=
        {v ∈ W | R_a(w,v)}
}

KNOWLEDGE_COUNTEREXAMPLE {
    IF M,w ⊭ K_a P
    THEN
        EXISTS v ∈ POSSIBLE_FOR(a,w):
            M,v ⊭ P

    v := epistemic_counterexample_world
}

EPISTEMIC_WITNESS {
    IF M,w ⊨ M_a P
    THEN
        EXISTS v ∈ POSSIBLE_FOR(a,w):
            M,v ⊨ P

    v := epistemic_possibility_witness
}

DISTRIBUTION_AXIOM_K {
    K_a(P -> Q)
        ->
    (K_a P -> K_a Q)
}

NECESSITATION_PATTERN {
    IF theorem(P)
    THEN theorem(K_a P)
    under normal epistemic modal proof systems
}

FACTIVITY_AXIOM_T {
    K_a P -> P

    FRAME_PROPERTY :=
        Reflexive(R_a)

    INTERPRETATION :=
        knowledge is factive in systems adopting T
}

POSITIVE_INTROSPECTION_AXIOM_4 {
    K_a P -> K_a K_a P

    FRAME_PROPERTY :=
        Transitive(R_a)
}

NEGATIVE_INTROSPECTION_AXIOM_5 {
    ¬K_a P -> K_a ¬K_a P

    FRAME_PROPERTY :=
        Euclidean(R_a)
}

EPISTEMIC_SYSTEM_K {
    FRAME_CLASS :=
        arbitrary_agent_accessibility_relations
}

EPISTEMIC_SYSTEM_T {
    EXTENDS := K
    ADD := Factivity
    FRAME_PROPERTY := Reflexive
}

EPISTEMIC_SYSTEM_S4 {
    EXTENDS := T
    ADD := PositiveIntrospection
    FRAME_PROPERTIES := {Reflexive,Transitive}
}

EPISTEMIC_SYSTEM_S5 {
    EXTENDS := S4_style_knowledge
    ADD := NegativeIntrospection
    STANDARD_FRAME_STYLE :=
        equivalence_relation_for_each_agent
}

EQUIVALENCE_RELATION {
    PROPERTIES := {
        Reflexive,
        Symmetric,
        Transitive
    }
}

INDISTINGUISHABILITY_INTERPRETATION {
    IF R_a is equivalence_relation
    THEN
        R_a(w,v)
        MAY be interpreted as
        "agent a cannot distinguish w from v"
}

INFORMATION_CELL {
    CELL_a(w) :=
        equivalence_class_of_w_under_R_a
        WHEN R_a is equivalence_relation

    K_a P HOLDS
    IFF
        P is true throughout CELL_a(w)
}

MULTI_AGENT_MODEL {
    AGENTS := {a1,...,an}

    FOR_EACH agent a_i:
        DEFINE R_ai

    SAME world set W
    SAME valuation V
    DISTINCT epistemic relations permitted
}

NESTED_KNOWLEDGE {
    K_a K_b P :=
        "agent a knows that agent b knows P"

    SEMANTICS :=
        nested traversal through R_a then R_b
}

SELF_KNOWLEDGE {
    K_a K_a P :=
        agent_a_knows_that_agent_a_knows_P

    RELATIONSHIP_TO_POSITIVE_INTROSPECTION :=
        K_a P -> K_a K_a P
        in systems validating axiom 4
}

EVERYONE_KNOWS {
    E_G P :=
        AND over agents a ∈ G:
            K_a P
}

ITERATED_EVERYONE_KNOWS {
    E_G^1 P := E_G P
    E_G^(n+1) P := E_G(E_G^n P)
}

COMMON_KNOWLEDGE {
    C_G P :=
        P is true at every world reachable
        by any finite sequence of accessibility steps
        using relations of agents in group G

    FIXED_POINT_INTUITION :=
        C_G P ≈ P ∧ E_G(C_G P)
}

RELATIONSHIP CommonKnowledge --extends--> IteratedKnowledge

DISTRIBUTED_KNOWLEDGE {
    D_G P :=
        P holds at every world in the intersection
        of the epistemic alternatives of agents in G
        under standard distributed-knowledge semantics
}

GROUP_RELATION {
    EVERYONE_RELATION :=
        union_of_agent_relations

    COMMON_KNOWLEDGE_REACHABILITY :=
        reflexive_transitive_closure(
            union_of_agent_relations
        )

    DISTRIBUTED_RELATION :=
        intersection_of_agent_relations
        under standard relational semantics
}

COMMON_KNOWLEDGE_MODEL_CHECK(Model M, Group G, World w, Formula P) {
    relation :=
        reflexive_transitive_closure(
            union({R_a | a ∈ G})
        )

    FOR_EACH v reachable_from w USING relation {
        IF M,v ⊭ P
            RETURN FALSE
    }

    RETURN TRUE
}

EVERYONE_KNOWS_MODEL_CHECK(Model M, Group G, World w, Formula P) {
    FOR_EACH agent a IN G {
        IF M,w ⊭ K_a P
            RETURN FALSE
    }

    RETURN TRUE
}

DISTRIBUTED_KNOWLEDGE_MODEL_CHECK(Model M, Group G, World w, Formula P) {
    candidate_worlds :=
        intersection(
            POSSIBLE_FOR(a,w)
            FOR a IN G
        )

    FOR_EACH v IN candidate_worlds {
        IF M,v ⊭ P
            RETURN FALSE
    }

    RETURN TRUE
}

KNOWLEDGE_VS_BELIEF {
    KNOWLEDGE :=
        commonly modelled with factivity

    BELIEF :=
        may use non-reflexive accessibility
        and need not imply truth

    CONSTRAINT :=
        K_a MUST NOT automatically be interpreted as belief unless declared
}

BELIEF_LOGIC_RELATIONSHIP {
    EpistemicLogic --relates_to--> DoxasticLogic

    BELIEF_OPERATOR :=
        B_a P
}

KNOWLEDGE_VS_TRUTH {
    IN factive epistemic systems:
        K_a P -> P

    CONVERSE:
        P -> K_a P
        NOT valid in general
}

KNOWLEDGE_VS_CERTAINTY {
    CONSTRAINT :=
        formal knowledge operator semantics MUST NOT be replaced by informal psychological certainty
}

OMNISCIENCE_NOTE {
    NORMAL_MODAL_CLOSURE :=
        idealised logical agents may inherit strong closure properties

    WARNING :=
        formal epistemic logic may idealise reasoning beyond human cognitive limitations
}

PUBLIC_ANNOUNCEMENT_RELATIONSHIP {
    EpistemicLogic --extends_to--> DynamicEpistemicLogic

    PUBLIC_ANNOUNCEMENT(P) :=
        restrict model to worlds where P is true
        under standard public-announcement semantics
}

MODEL_UPDATE_BY_ANNOUNCEMENT(Model M, Formula P) {
    W' := {w ∈ W | M,w ⊨ P}
    R'_a := R_a restricted_to W'
    V' := V restricted_to W'

    RETURN M' := (W',{R'_a},V')
}

PRIVATE_INFORMATION_RELATIONSHIP {
    DynamicEpistemicExtensions
        MAY model
        private announcements,
        observations,
        actions,
        information-changing events
}

EPISTEMIC_MODEL_CHECK(Model M, World w, Formula F) {
    IF atomic:
        RETURN valuation_at(w,F)

    IF BooleanFormula:
        EVALUATE recursively

    IF F=K_a P:
        FOR_ALL v WHERE R_a(w,v):
            REQUIRE EPISTEMIC_MODEL_CHECK(M,v,P)

    IF F=M_a P:
        EXISTS v WHERE R_a(w,v):
            REQUIRE EPISTEMIC_MODEL_CHECK(M,v,P)

    IF F=E_G P:
        CHECK K_a P for every a in G

    IF F=C_G P:
        CHECK P across group-reachable closure

    IF F=D_G P:
        CHECK P across intersection_of_agent_alternatives

    RETURN BooleanTruthValue
}

BISIMULATION_RELATIONSHIP {
    EpistemicModels
        --support--> AgentIndexedBisimulation

    REQUIRE :=
        atomic harmony
        AND forth/back for each relevant agent relation
}

AGENT_INDEXED_FORTH {
    IF Z(w,v)
       AND R_a(w,w1)
    THEN
        EXISTS v1:
            R'_a(v,v1)
            AND Z(w1,v1)
}

AGENT_INDEXED_BACK {
    IF Z(w,v)
       AND R'_a(v,v1)
    THEN
        EXISTS w1:
            R_a(w,w1)
            AND Z(w1,v1)
}

EPISTEMIC_BISIMULATION_INVARIANCE {
    bisimilar pointed epistemic models
        satisfy the same formulae
        of the corresponding basic epistemic language
}

APPLICATION_RELATIONSHIPS {
    EpistemicLogic --supports--> KnowledgeRepresentation
    EpistemicLogic --supports--> MultiAgentSystems
    EpistemicLogic --supports--> DistributedSystems
    EpistemicLogic --supports--> ProtocolAnalysis
    EpistemicLogic --supports--> GameTheory
    EpistemicLogic --supports--> ArtificialIntelligence
    EpistemicLogic --supports--> SecurityReasoning
    EpistemicLogic --supports--> InformationFlowReasoning
    EpistemicLogic --supports--> PhilosophicalLogic
    EpistemicLogic --supports--> DynamicEpistemicReasoning
}

ONTOLOGY_LINKS {
    PARENT := ModalLogicOntology

    RELATED := {
        NecessityOntology,
        PossibilityOntology,
        PossibleWorldsOntology,
        DynamicLogicOntology,
        TemporalLogicOntology,
        DoxasticLogicOntology,
        KnowledgeOntology,
        CommonKnowledgeOntology,
        DistributedKnowledgeOntology,
        MultiAgentSystemOntology,
        KripkeModelOntology,
        AccessibilityRelationOntology,
        ModelCheckingOntology
    }
}

SEMANTIC_EQUIVALENCE {
    K_a P ≈ AgentAKnows(P)
    M_a P ≈ EpistemicallyPossibleForAgentA(P)
    M_a P ≈ ¬K_a¬P

    EpistemicallyPossibleWorld ≈ AgentAccessibleWorld
        WHEN context=EpistemicKripkeSemantics

    EpistemicAccessibilityRelation ≈ IndistinguishabilityRelation
        WHEN relation_is_equivalence_and_that_interpretation_is_selected
}

CONSTRAINTS {
    C1 :=
        every epistemic operator MUST identify its agent or group where required

    C2 :=
        K_a P under relational semantics MUST quantify over all R_a-accessible worlds

    C3 :=
        factivity K_a P -> P MUST only be assumed in systems validating reflexivity/T

    C4 :=
        positive introspection MUST only be assumed when the selected system validates axiom 4

    C5 :=
        negative introspection MUST only be assumed when the selected system validates axiom 5

    C6 :=
        knowledge MUST NOT automatically be conflated with belief

    C7 :=
        formal knowledge MUST NOT be inferred solely from truth of P

    C8 :=
        common knowledge MUST use the appropriate group reachability closure

    C9 :=
        distributed knowledge MUST use the explicitly selected group semantics

    C10 :=
        public-announcement updates MUST restrict worlds and relations consistently

    C11 :=
        epistemic possibility MUST NOT be interpreted as numerical probability

    C12 :=
        all epistemic inferences MUST preserve the selected accessibility assumptions
}

REASONING_CHAIN Query Q {
    IDENTIFY epistemic_logic_system
    IDENTIFY agent_or_group
    IDENTIFY formula P
    IDENTIFY current_world w
    IDENTIFY epistemic_model

    PARSE epistemic_formula
    RESOLVE agent_indices
    RESOLVE K/M duality

    IF K_a_requested {
        COMPUTE POSSIBLE_FOR(a,w)
        CHECK P at every a-accessible world
        RETURN counterexample_world IF found
    }

    IF M_a_requested {
        SEARCH a-accessible worlds
        RETURN witness_world IF P holds
    }

    IF everyone_knows_requested
        THEN EVERYONE_KNOWS_MODEL_CHECK

    IF common_knowledge_requested
        THEN COMMON_KNOWLEDGE_MODEL_CHECK

    IF distributed_knowledge_requested
        THEN DISTRIBUTED_KNOWLEDGE_MODEL_CHECK

    IF nested_knowledge_requested
        THEN recursively traverse indexed_relations

    IF public_announcement_requested
        THEN MODEL_UPDATE_BY_ANNOUNCEMENT

    IF frame_properties_provided {
        CHECK Reflexivity
        CHECK Transitivity
        CHECK EuclideanProperty
        CHECK Symmetry
    }

    IF bisimulation_requested
        THEN CHECK agent_indexed_atomic_harmony_forth_back

    VALIDATE constraints
    RETURN result WITH derivation
}

CONFIDENCE {
    CORE_EPISTEMIC_SEMANTICS := 1.00
    AGENT_INDEXED_KRIPKE_MODEL := 1.00
    KNOWLEDGE_POSSIBILITY_DUALITY := 1.00
    STANDARD_S5_KNOWLEDGE_MODEL := 0.99
    GROUP_KNOWLEDGE_SEMANTICS := 0.99

    MODEL_CHECKING :=
        IF complete_epistemic_model_given THEN 1.00
        ELSE REQUIRE missing_information

    INFORMAL_AGENT_INTERPRETATION :=
        REQUIRE explicit_context
}

UPDATE_MODEL {
    IMMUTABLE_CORE := {
        AgentIndexedKnowledgeOperators,
        EpistemicAccessibility,
        KnowledgeKripkeSemantics,
        EpistemicPossibilityDuality
    }

    EXTENSIBLE := {
        EpistemicSystems,
        GroupKnowledgeOperators,
        DynamicEpistemicUpdates,
        BeliefLogics,
        AgentModels,
        ApplicationDomains,
        RelatedOntologies
    }

    ON_NEW_KNOWLEDGE {
        IDENTIFY epistemic_system
        VALIDATE agent_index
        VALIDATE accessibility_relation
        VALIDATE valuation
        CHECK frame_properties
        CHECK group_semantics
        CHECK semantic_consistency
        ADD relationship IF non_contradictory
        UPDATE confidence
    }
}

AI_CONSUMPTION {
    MACHINE_READABLE := TRUE
    HUMAN_INTERPRETABLE := TRUE
    RECURSIVE_REASONING := TRUE
    ENTITY_RESOLUTION := TRUE
    AGENT_RESOLUTION := TRUE
    SYMBOL_RESOLUTION := TRUE
    RELATIONSHIP_TRAVERSAL := TRUE
    EPISTEMIC_ACCESSIBILITY_REASONING := TRUE
    KNOWLEDGE_EVALUATION := TRUE
    EPISTEMIC_POSSIBILITY_REASONING := TRUE
    NESTED_KNOWLEDGE_REASONING := TRUE
    GROUP_KNOWLEDGE_REASONING := TRUE
    MODEL_UPDATE_REASONING := TRUE
    BISIMULATION_REASONING := TRUE
    VALIDATION_REQUIRED := TRUE
}

FLOW_HASH {
    TARGET := TARGET_URL
    SUBJECT := "Epistemic Logic Ontology"
    VERSION := "1.0"
    CANONICAL_SIGNATURE :=
        HASH(TARGET + SUBJECT + DOMAIN + VERSION)
}

OUTPUT {
    PRIMARY_ENTITY := EpistemicLogic

    INTERPRETATION :=
        "Epistemic logic applies modal semantics to knowledge and information. Agent-indexed accessibility relations represent the worlds each agent considers epistemically possible, so K_a P holds when P is true throughout agent a's accessible alternatives. Multi-agent extensions support nested knowledge, everyone-knows, common-knowledge and distributed-knowledge reasoning."
}

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