<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>International Workshop on Nonmonotonic Reasoning, November</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>The KLM Representation Theorem for System C, Formally</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jonathan Walther</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kai Sauerwald</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jesse Heyninck</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Open Universiteit</institution>
          ,
          <country country="NL">the Netherlands</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Cape Town and CAIR</institution>
          ,
          <addr-line>Cape Town</addr-line>
          ,
          <country country="ZA">South Africa</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Hagen</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <volume>1</volume>
      <fpage>1</fpage>
      <lpage>13</lpage>
      <abstract>
        <p>We present a formalization of the proof of the correspondence between cumulative non-monotonic reasoning and System C in a proof assistant. Reasoning based on System C is the cornerstone of non-monotonic reasoning and was given a semantics via cumulative models by Kraus, Lehmann and Magidor. Our proof is inspired by the original proof and written in the proof system Rocq and focuses on propositional logic. Due to the features of Rocq, the proof implicitly yields a verified implementation of System C reasoning.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>Let Σ = {, , , . . .} be a finite set of propositional atoms, and let ℒ be a propositional language over
Σ (including implication and bi-implication). The set of propositional interpretations over Σ is denoted
by Ω and |= is the usual model relation. The set of models of  is denoted by Mod() . Classical
propositional entailment is denoted by |= and is defined by  |=  if Mod() ⊆ Mod().</p>
      <p>
        Any relation |∼ ⊆ ℒ × ℒ will be denoted here as a consequence relation. A central notion
for consequence relations is monotonicity, stating that if  |∼  , then also  ∧  |∼  . The
propositional entailment relation |= from above satisfies monotonicity. Consequence relations that
violate monotonicity are denoted as non-monotonic. In the seminal work by Gabbay [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], the following
properties for non-monotonic reasoning systems are given, which are collectively known as System C:
 |∼   |∼
      </p>
      <p>∧  |∼ 
|=  ↔   |∼ 
 |∼ 
(Ref)  |∼ 
(Reflexivity) (CM)
(Cautious Monotonicity)
(RW) |=  →   |∼  (Right Weakening) (LLE) (Left Logical Equivalence)
 |∼ 
(Cut)  ∧  |∼   |∼</p>
      <p>|∼ 
(Ref) is a basic property of consequence relations. (LLE) ensures that consequences respect classical
equivalence, (RW) provides classical conclusions, (Cut) provides plausible conclusions, and (CM) is a
restricted form of monotonicity. The System C postulates are widely accepted as the minimal
requirements for good rational non-monotonic reasoning. A consequence relation |∼ is called cumulative
if System C is satisfied by |∼ . When we axiomatically claim that a consequence  |∼ should hold,
we call  |∼ a conditional assertion. For a set of conditional assertions K, we write K |=  |∼ if
there is a proof for  |∼ via the System C when assuming the assertions in K. For every cumulative
consequence relation |∼, there is a set K that gives rise to |∼.</p>
      <p>
        In the following, we present a general semantic approach to System C that goes back to Kraus,
Lehmann and Magidor [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Intuitively, in the semantics we will define below, each System C consequence
relation can be represented by a state space of sets of interpretations that is endowed with an order ≺ .
Formally, a state-order model is a triple O = ⟨, ℓ, ≺⟩ such that
•  is set, whose elements are called states,
• ℓ :  → (Ω) assigns to each state a set of interpretations and is called a labelling function, and
• ≺ ⊆  ×  is a relation on the states.
      </p>
      <p>Reasoning over O is then implemented by considering only minimal elements with respect to ≺ . For a
strict partial order ≺ ⊆  ×  on a set  and a subset  ⊆  , an element  ∈  is called minimal in 
with respect to ≺ if for each  ∈  holds  ̸≺  . Then, min(, ≺) is the set of all  ∈  that are minimal
in  with respect to ≺ . In the context of a state-order model, we let () = { ∈  | ℓ() ⊆ Mod()} .
Definition 1. For a state-order model O = ⟨, ℓ, ≺⟩, we let  |∼
O  if min((), ≺) ⊆ ().</p>
      <p>To fully capture cumulative reasoning, one has to guarantee that minimal elements exist. A set  ⊆ 
is called smooth with respect to ≺ if for all  ∈ , either  ∈ min(, ≺) or there exist  ∈ min(, ≺)
such that  ≺ . We say a relation ≺ is smooth if () is smooth for all formulas  ∈ ℒ.</p>
      <p>Definition 2. A cumulative model is a state-order model W = ⟨, ℓ, ≺⟩ where ≺ is smooth.</p>
      <p>
        Note that in the context of this paper, where we restrict our investigations to propositional logic, it is
suficient to consider only cumulative models where  is finite [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. In such finite models, smoothness is
automatically satisfied. Nonetheless, we will encounter models with infinite state sets within proofs.
      </p>
      <p>
        Kraus, Lehmann and Magidor establish a fundamental correspondence between cumulative
consequence relations and consequence relations based on cumulative models [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Theorem 1 ([
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]). A consequence relation |∼ is cumulative if and only if there exists a cumulative model W
such that |∼ = |∼ W .
      </p>
      <p>In the following, we give an outline of the proof of Theorem 1 by Kraus, Lehmann and Magidor.
[Soundness.] The soundness direction proves that cumulative models satisfy all System C rules.
The proof treats each System C postulate individually, with particular attention to Cut and Cautious
Monotonicity. For Cut, if all minimal elements of () satisfy  and all minimal elements of ( ∧ )
satisfy  , then any minimal element of () satisfies  and therefore  ∧  . Since it is minimal in ()
and ( ∧ ) ⊆ () , it is also minimal in ( ∧ ) . For Cautious Monotonicity, assume  |∼ W 
and  |∼ W  , then prove  ∧  |∼ W  . Take any state  minimal in ( ∧ ) ; since  ∈ () , by the
smoothness condition, either  is minimal in () or there exists ′ minimal in () such that ′ ≺  .
If ′ exists, then ′ |=  (by  |∼ W  ), so ′ ∈ () ∩ () , making ′ ∈ ( ∧ ) , contradicting the
minimality of . Therefore,  is minimal in (), and since  |∼ W , we conclude  |= .
[Completeness.] The completeness direction constructs a canonical model based on the cumulative
consequence relation |∼ that induces the same consequence relation. A model  ∈ Mod() of  is
normal for  if for all  ∈  with  |∼  holds  |=  . For two formulas  and  , we write  ∼  if
 |∼  and  |∼ . The canonical model W = (, ℓ, ≺) for |∼ is defined by:</p>
      <p>= ℒ/ ∼
ℓ([] ∼ ) = { ∈ Ω |  is normal for }
(states are ∼ equivalence classes)</p>
      <p>(labels are all normal world)
[] ∼ ≺ []
∼ if [] ∼ ̸= [] ∼ and there is  ∈ [] ∼
with  |∼ 
The proof is then by showing two central insights:
(A) A normal world  for  satisfies  if and only if  |∼ .
(B) For every formula , the state []</p>
      <p>∼ is the unique minimal element in min((), ≺).</p>
      <p>Because of (B) and ℓ([] ∼ ) = { ∈ Ω |  is normal for } , it holds  |∼ W  if and only if all normal
worlds for  satisfy  . Because of (A), the latter is equivalent to stating that  |∼  holds. In summary,
we obtain that  |∼  if and only if  |∼ W .</p>
    </sec>
    <sec id="sec-3">
      <title>3. Rocq as Proof Assistant</title>
      <p>
        Rocq is an interactive theorem prover based on the Calculus of Inductive Constructions (CIC) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Unlike
automatic theorem provers that either succeed or fail without human intervention, Rocq combines
human intuition with machine precision through interactive proving. Users guide the proof strategy by
providing high-level proof ideas, while Rocq verifies the correctness of each individual step and ensures
logical consistency.
      </p>
      <p>The fundamental principle of interactive proving consists of a dialogue between a human and a
machine. Proofs are constructed step-by-step using tactics, which are commands that transform proof
goals. The proof state consists of a context (available hypotheses and definitions) and goals (statements
to be proven). Common tactics essential for our formalization include:
• intros: Introduces hypotheses and variables from implications and quantifications
• apply: Applies existing theorems or hypotheses to transform goals
• induction: Performs structural induction over inductively defined types
• destruct: Performs case analysis on data structures or logical connectives
• split: Splits conjunctive goals into separate subgoals
• unfold: Expands definitions to reveal underlying structure
This interactive approach provides significant advantages over both manual proofs and fully automatic
systems. Manual proofs may contain errors or use implicit assumptions, while automatic provers often
fail on complex problems and provide little insight when they do fail. Interactive proving ensures
absolute correctness while maintaining human control over proof strategies.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Formalizing Consequence Relations</title>
      <p>
        Here we present our implementations of cumulative reasoning and reasoning based on cumulative
models in Rocq. Instead of implementing propositional logic, we use an existing library by Dakai Guo
and Wensheng Yu [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Notably, the type Formula is provided, which stands for propositional formula,
and Ensemble Formula, which stands for sets of formulas. This allows us to focus primarily on the
actual formalization of the KLM theorem.
      </p>
      <sec id="sec-4-1">
        <title>4.1. Inductive Definition of Cumulative Consequences</title>
        <p>Cumulative consequences are based on finite inferences via System C from some set of conditional
assertions K. We define conditional assertions as formula pairs through ConditionalAssertion
and use InKB to check membership in knowledge bases. Cumulative consequences K |=  |∼ 
are implemented as an application of the System C rules as derivation steps in the following type
CumulCons:</p>
        <p>The type CumulCons takes four parameters. First, KnowledgeBase K that contains the conditional
assertions, an Ensemble Formula Γ , which represents a set of formulas, and formulas p and q
representing premise and conclusion. The return type Prop indicates that this is a logical property. The
set of formulas Γ is here for technical reasons, and it is meant to explicitly represent the valid formulas
of propositional logic. Lines 3-4 implement Ref through universal quantification, using parameter p
twice for reflexivity. Lines 5-8 define LLE with line 6 requiring the equivalence of formulas and line
7 using recursive CumulCons calls. The RW constructor (lines 9-12) follows a similar structure, but
with implication instead of equivalence. Both Cut (lines 13-16) and CM (lines 17-20) use two recursive
premises, where Cut removes conjunctions from premises while Cautious Monotonicity introduces
them. Lines 21-23 implement a query to the set of conditional assertions K. Our implementation also
employs Rocq’s ability to introduce intuitive notation for better readability:</p>
        <p>Notation "K ⊕ Γ ⊢ p |∼ q" := (CumulCons K Γ p q) (at level 80).</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Modeling Cumulative Models</title>
        <p>For formalizing cumulative models (Definition 1), we use a record type, which provides advantages over
separate definitions or inductive types through bundled related components with automatic projection:</p>
        <p>For the states States (line 2), we define them as abstract Type, which allows us to instantiate them with
arbitrary objects (as the original definition). The function Labeling (line 3) represents a direct mapping
of the labeling function from the KLM definition, where State (defined in line 7) is a function that
assigns truth values to formulas. This represents a functional implementation, giving each state directly
an interpretation function. The implemented labeling function is also adapted to propositional logic and
simplified, since each world corresponds exactly to one truth value assignment. The preference relation
PreferenceRel (line 4) is implemented as a binary relation of type Prop. The record type initially
contains no restrictions in the definition – properties like the smoothness condition are formulated
later as separate axioms, maintaining separation between structures and properties for modular proof
construction.</p>
        <p>For formalizing minimal elements, we additionally introduce the definition of MinimalElements:
Definition MinimalElements (model : CumulModel)
(formula : Formula) : Ensemble (States model) :=
fun state =&gt;
entails (Labeling model state) formula /\
~ exists state’,
entails (Labeling model state’) formula /\</p>
        <p>PreferenceRel model state’ state.
With forall state (line 3), we ensure that the inference relation must hold in all minimal states, and
with the implication (line 4), we ensure that only minimal states are considered. In Lines 7-8, we define
a short notation for semantic consequence relations in cumulative models.</p>
        <p>The function MinimalElements (lines 1-2) implements min((), ≺) as a function with parameters
model and formula, returning an ensemble of states (a set of states). The implementation first checks
that the formula holds in the state (line 4), and second, that no preferred state exists in which the formula
also holds (lines 5-7). This corresponds directly to the mathematical definition given in Section 2.</p>
        <sec id="sec-4-2-1">
          <title>4.2.1. Definition of Model-based Consequence Relation</title>
          <p>We implementing consequences |∼ W from a cumulative model W as function SemanticEntails.
For that, we employ the implementation MinimalElements for checking whether a conclusion
conclusion holds in all minimal states from premise premise:</p>
          <p>Definition SemanticEntails (model : CumulModel)
(premise conclusion : Formula) : Prop :=
forall state,
In (States model) (MinimalElements model premise) state -&gt;
entails (Labeling model state) conclusion.</p>
          <p>Notation "model : premise |w∼ conclusion" :=
(SemanticEntails model premise conclusion) (at level 80).</p>
        </sec>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. The Smoothness Condition Formalized in Rocq</title>
        <p>
          Since we consider only finite logical languages, it is suficient to consider finite cumulative models [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
In such models, smoothness is always satisfied. Because of that, we implement smoothness as an axiom:
Axiom smoothness : forall model formula state,
entails (Labeling model state) formula -&gt;
exists minimal_state,
entails (Labeling model minimal_state) formula /\
(PreferenceRel model minimal_state state \/
minimal_state = state) /\
        </p>
        <p>In (States model) (MinimalElements model formula) minimal_state.</p>
        <p>As a premise, we set with entails (line 2) that the formula holds in the current state. Then we declare
the existence of a minimal state via the existential quantifier (line 3). We construct the properties of
the minimal state: ensuring the formula also holds in the minimal state (line 4), the disjunction (lines
5-6) stating the minimal state is preferred or identical to the original state, and finally (line 6) that this
minimal state is an element of MinimalElements for the given formula.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Formalization of the Representation Theorem</title>
      <p>In this section, we present our formalization of Theorem 1 in Rocq. The implementation of the final
theorem is given in the following:</p>
      <p>Line 4-9 state the theorem, and the remaining lines represent the proof, which is separated into subproofs
for soundness and completeness. In the remainder of this section, we present the implementation of
these proofs.</p>
      <sec id="sec-5-1">
        <title>5.1. Soundness Proof</title>
        <p>The soundness proof shows that all consequence relations that a cumulative model induces satisfy
System C. This proof is formalized as a named soundness_klm, which calls subproofs for each System C
rule. We implement a separate lemma for each rule of System C that proves that semantic consequences
satisfy the corresponding postulate. Due to space limitations, we consider here only the implementation
of some System C properties.</p>
        <sec id="sec-5-1-1">
          <title>5.1.1. Reflexivity Rule</title>
          <p>The lemma soundness_reflexivity shows that each consequence relation induced from a
cumulative model satisfies reflexivity (Ref). Technically, (Ref) holds if a formula  holds in all minimal states
of  , i.e., min((), ≺) ⊆ () . In our Rocq formalization, this corresponds to the statement model :
formula |∼w formula.</p>
          <p>Lemma soundness_reflexivity :
forall (model : CumulModel) (formula : Formula),</p>
          <p>// SemanticEntails model premise conclusion</p>
          <p>Lines 1-3 claim that reflexivity is satisfied by |∼ W , while lines 4-8 develop the corresponding proof. The
proof starts by making the components of the goals available to the prover by unfolding definitions. In
Line 5, we unfold the definitions of “ model : formula |∼ formula ” (SemanticEntails) from
Line 3 and then unfold MinimalElements (which appears implicitly by unfolding SemanticEntails).
In Line 6, we fill the variables in unfolded definitions with elements from our assumption provided in
Line 2. We obtain a proof goal entails (Labeling model state) formula, which corresponds
to stating that the minimal states of formula in the cumulative model satisfy formula. With exact
H_satisfies tells the prover to check the truth of the last goal by employing unification.</p>
        </sec>
        <sec id="sec-5-1-2">
          <title>5.1.2. Right Weakening Rule</title>
          <p>In lemma soundness_RW is for proving satisfaction of Right Weakening (RW). The proof uses the
implication property H_imp to directly derive that the conclusion also holds in minimal states. Our
proof goal is to show that when model : r |∼w p and p -&gt; q hold, then model : r |∼w q also
holds, demonstrating that an implication is preserved in the minimal state for r.
1 Lemma soundness_RW :
2 forall (model : CumulModel) (p q r : Formula),
3 (forall state, entails (Labeling model state) p -&gt;
4 entails (Labeling model state) q) -&gt;
5 model : r |w∼ p -&gt;
6 model : r |w∼ q.
7 Proof.
8 unfold SemanticEntails, MinimalElements.
9 intros model p q r H_imp H_entails state H_minimal.
10 apply H_imp.
11 apply H_entails; assumption.
12 Qed.</p>
          <p>We first unfold the definition of SemanticEntails and MinimalElements (line 8). After
introducing all necessary variables and hypotheses (line 9), hypothesis H_imp states that p implies q, H_entails
is the hypothesis that p typically follows from r, and H_minimal states that state is minimal for r.</p>
          <p>Our proof goal is entails (Labeling model state) q. We first apply hypothesis H_imp (line
10) to change our proof goal to entails (Labeling model state) p. We then show that p holds in
state by applying hypothesis H_entails to H_minimal (line 11). Since we already have H_minimal
that corresponds exactly to this condition, we can directly solve the proof goal with assumption and
complete the proof.
5.1.3. Cut Rule
The proof for Cut is formalized in lemma soundness_Cut. The challenge here lies in showing that p
|∼  r holds when both p |∼  q and p ∧ q |∼  r hold. We want to show that in minimal states
where p holds, q also holds, to then prove that r must also hold in these states.</p>
          <p>We unfold the definitions of SemanticEntails and MinimalElements (line 7) and introduce
variables and hypotheses (lines 8-9). We first assert that q holds in state and prove this by applying
hypothesis H_p_entails_q (lines 10-11), showing that in minimal states where p holds, q also holds.</p>
          <p>We then apply the conjunction assumption H_conj_entails (line 12), requiring proof that state
is minimal for (p ∧ q). We use split (line 13) to split into two subgoals. For the first subgoal, we
use lemma entails_conjunction with rewrite (line 14) to resolve the conjunction. For the second
subgoal, we prove minimality through contradiction (lines 16-22). From the fact that (p ∧ q) holds in
state’, it follows that p also holds in state’, contradicting the assumption that state is minimal
for p. This demonstrates a transitivity property of the cumulative consequence relation.</p>
        </sec>
        <sec id="sec-5-1-3">
          <title>5.1.4. Structural Induction for Soundness</title>
          <p>The main soundness theorem combines all individual lemmas through structural induction over the
inductive type CumulCons:</p>
          <p>Theorem soundness_klm :
forall (K : KnowledgeBase) (Γ : Ensemble Formula) (p q : Formula),
K ⊕ Γ ⊢ p |∼ q -&gt; K ⊕ Γ |= p |w∼ q.</p>
          <p>Proof.
intros K Γ p q H_cons.
unfold CumulativeModelEntails.
intros model H_satisfies.
induction H_cons.
- apply soundness_reflexivity.
- apply soundness_LLE with p.
+ intros state.
unfold SatisfiesKnowledgeBases in H_satisfies.
destruct H_satisfies as [_ H_classical].</p>
          <p>unfold SatisfiesClassicalKB in H_classical.</p>
          <p>After introducing variables and unfolding CumulativeModelEntails (lines 5-7), we use structural
induction over H_cons (line 9). This creates five separate proof goals corresponding to each System C
rule.</p>
          <p>Reflexivity (line 11) directly applies the proven lemma soundness_reflexivity.</p>
          <p>LLE (lines 13-22) requires transforming the syntactic equivalence from the universe of reference Γ into
semantic equivalence in the model. We extract the equivalence from Γ using SatisfiesClassicalKB
(lines 15-16), use the model’s satisfaction to obtain semantic equivalence (line 18), and apply
entails_equivalence to convert to the form needed by soundness_LLE (line 20).</p>
          <p>RW (lines 24-33) similarly transforms syntactic implication to semantic implication. We extract the
implication from Γ (lines 26-27), apply the model’s respect for classical truths in Γ (line 29), and use
simpl to simplify the entailment definition (line 31).</p>
          <p>Cut and CM (lines 35-41) are simpler since they work purely with cumulative consequence relations
without requiring knowledge base transformations. Both apply the corresponding lemmas with their
respective induction hypotheses (IHH_cons1 and IHH_cons2).</p>
          <p>Base (lines 43-47) handles the crucial new case where conditional assertions are directly used from
the knowledge base K. We unfold SatisfiesKnowledgeBases to access the conditional component
(line 43), extract SatisfiesConditionalKB (line 45), and directly apply it to the conditional assertion
from K (line 46).</p>
          <p>This modular approach demonstrates that each System C rule is individually sound, and their
combination through structural induction establishes the complete soundness of the system. The
theorem proves that syntactic derivability in System C implies semantic validity in all cumulative
models respecting the knowledge base.</p>
        </sec>
      </sec>
      <sec id="sec-5-2">
        <title>5.2. Completeness Proof</title>
        <p>For formalizing completeness of the KLM theorem, we show that every cumulative consequence relation
defined by System C rules is representable by a cumulative model. We prove completeness through
contradiction by constructing a canonical model that serves as a counterexample.</p>
        <p>
          The main challenge lies in constructing a canonical model from syntactic information. The proof is
close to the construction given by Kraus, Lehmann and Magidor [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Central to their proof is to use
states as equivalence classes (see Section 2). However, due to technical reasons, our Rocq proof uses
maximal consistent sets as states, which corresponds logically to equivalence classes.
        </p>
        <sec id="sec-5-2-1">
          <title>5.2.1. Canonical Model Construction</title>
          <p>We construct the canonical model using maximal consistent sets as states:
1</p>
          <p>Definition CanonicalModel : CumulModel :=
{|</p>
          <p>States := CanonicalStates;
Labeling := fun w p =&gt; valuemaxf w p;</p>
          <p>PreferenceRel := CanonicalPreferenceRel
Line 1 defines states as ensembles of formulas (maximal consistent sets). Lines 3-4 implement the
preference relation from Definition 3.21 of Kraus, Lehmann and Magidor: 1 is preferred over 2 if
there exists a formula  that is derivable in 1 but not in 2. Lines 6-11 construct the canonical model
using library function valuemaxf for the labeling function.</p>
        </sec>
        <sec id="sec-5-2-2">
          <title>5.2.2. Axioms for Completeness</title>
          <p>We introduce several axioms to handle the complexity of the canonical model construction. The key
axiom ensures existence of appropriate maximal consistent sets:</p>
          <p>Axiom exists_maximal_consistent : forall K Γ p q,
∼ (CumulCons K Γ p q) -&gt;
exists w,
maximal_consistent_set w /\ Γ ⊆ w /\
p ∈ w /\ ∼ q ∈ w.</p>
          <p>Lines 1-5 formalize the existence of maximal consistent sets: if  is not derivable from  under Γ ,
then there exists a maximal consistent set containing Γ and  but not . This axiom establishes the
bridge between syntactic non-derivability and semantic representation, enabling us to construct a
counterexample in the main proof.</p>
          <p>We also need the axiom canonical_entails to establish semantic interpretation:</p>
          <p>Axiom canonical_entails :
forall (w : CanonicalStates) (p : Formula),
maximal_consistent_set w -&gt;
entails (Labeling CanonicalModel w) p &lt;-&gt; p ∈ w.</p>
          <p>Lines 1-4 establish that in maximal consistent set , formula  holds semantically if and only if  is an
element of . This connects the semantic interpretation in the canonical model with set membership in
maximal consistent sets.</p>
        </sec>
        <sec id="sec-5-2-3">
          <title>5.2.3. Main Completeness Proof</title>
          <p>The main completeness theorem demonstrates that semantic validity implies syntactic derivability
through contradiction:
14 assert (H_satisfies :
15 SatisfiesKnowledgeBase CanonicalModel K )Γ.
16 apply canonical_satisfies_kbs with (w := w); auto.
18 assert (H_minimal : In CanonicalStates
19 (MinimalElements CanonicalModel p) w).
20 apply minimal_elements_canonical; auto.
22 assert (H_entails_q :
23 entails (Labeling CanonicalModel w) q).
24 apply H_sem; auto.
26 assert (H_q_in_w : q ∈ w).
27 apply canonical_entails; auto.
29 contradiction.
30 Qed.</p>
          <p>The proof uses classical logic to case split on whether CumulCons K Γ   holds (line 6). If it holds
(line 7), we are done. Otherwise (lines 8-24), we construct a maximal consistent set  using the axiom
exists_maximal_consistent (lines 11-12), which guarantees that  contains Γ and  but not .</p>
          <p>We then show the canonical model satisfies the knowledge base (lines 14-16) and prove  is minimal
for  (lines 18-20). Next, we apply the semantic validity assumption to derive that  must hold in 
(lines 22-23), since  is a minimal state where  holds and the semantic relation requires  to hold
in all such states. Using the canonical interpretation, we conclude  ∈  (lines 26-27). This directly
contradicts the construction of  where  ∈/  (from line 11), completing the proof by contradiction.
The contradiction shows that our assumption ∼CumulCons Γ   was false, therefore the syntactic
derivability Γ :  |∼  must hold.</p>
          <p>This completeness proof demonstrates that the canonical model construction provides exactly the
counterexample needed to show that every semantically valid inference is syntactically derivable,
completing the second direction of the KLM representation theorem.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Discussion</title>
      <p>The formalization of the KLM representation theorem in Rocq demonstrates both the feasibility and
challenges of mechanizing complex non-monotonic logical systems. Our approach successfully captures
all essential components while revealing important insights about the formal verification of infinite
mathematical structures.</p>
      <p>
        The encoding of System C through inductive types proved highly efective, with each rule naturally
represented as a constructor in CumulCons. This design enables structural induction for soundness
proofs and provides clear correspondence to the mathematical definition by Kraus, Lehmann and
Magidor [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The modular structure with separate lemmas for each rule facilitates understanding and
future extensions. Cumulative models required more complex design decisions. Our choice of record
types, bundling states, labelling functions, and preference relations, provides clean abstraction while
maintaining accessibility. The definition of minimal elements through ensemble-forming functions
integrates well with Rocq’s type system, though it necessitated careful handling of the smoothness
condition. The strategic use of axiomatization emerged as a crucial methodological choice. We
distinguished between theoretically justified axioms and those abstracting complex constructions. The
smoothness condition is axiomatized based on its automatic satisfaction in propositional logic with
ifnite descending chains. The canonical model axioms abstract the infinite construction that would
otherwise require exponentially complex proofs. This approach, inspired by established techniques in
modal logic [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], allows focus on the theorem’s core logical content while maintaining formal rigor.
      </p>
      <p>
        Interactive proving with Rocq revealed both the power and limitations of current proof assistants.
Tactics like induction, apply, and destruct enable elegant proof construction, but type errors and
unclear documentation create significant learning barriers. The external library [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] proved essential for
propositional logic foundations, though its complexity required careful integration.
      </p>
      <p>The restriction to propositional logic serves multiple purposes: it simplifies the smoothness
condition, reduces the complexity of maximal consistent set construction, and focuses attention on the
representation theorem’s essential structure. This limitation is strategic rather than fundamental, as the
modular design supports future extension to predicate logic. Our completeness proof through canonical
model construction follows the approach of Kraus, Lehmann and Magidor while adapting to Rocq’s
constructive foundation. The use of maximal consistent sets as states, rather than equivalence classes,
reflects practical considerations in formal verification while maintaining mathematical equivalence.
The soundness direction proved more straightforward, with each System C rule verified independently
through structural induction. The formalization reveals important connections between diferent areas
of logic and computer science. The use of inductive types for inference systems, record types for
mathematical structures, and axiomatic abstraction for complex constructions provides a methodology
applicable to other logical systems.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>
        The representation theorem for cumulative reasoning by Kraus, Lehmann and Magidor [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] forms the
theoretical foundation of this work, describing the equivalence between syntactic System C rules and
semantic cumulative models. This equivalence is central to non-monotonic reasoning, enabling
knowledge representation with exceptions like “birds fly, but penguins don’t” - essential for AI applications
such as expert systems.
      </p>
      <p>We have achieved our main goal of creating a complete formalization of the KLM theorem in Rocq.
The formalization encompasses all components: System C with its five rules was completely formalized
on the syntactic level, while cumulative models with states, labeling functions, and preference relations
were defined semantically using maximal consistent sets as states. The soundness proof in theorem
soundness_klm demonstrates that every System C derivable consequence is semantically valid, secured
through structural induction over CumulCons with separate lemmas for each rule. The completeness
proof in theorem completeness_klm shows that every semantically valid consequence is syntactically
derivable, using contradiction with a canonical model construction. Both proofs were verified by Rocq,
confirming their correctness.</p>
      <p>Here, we restrict ourselves to propositional logic, which keeps the complexity manageable while
preserving essential aspects of the representation theorem. The modular proof structure facilitates
future extensions, and the axiomatization of complex constructions allows for a focus on core
concepts without losing theoretical rigor. The formalization provides several key insights reflecting the
challenges of mechanizing complex logical systems. The infinite size of the canonical model poses the
central challenge, leading to our axioms that circumvent this complexity. We distinguished between
theoretically justified axioms and those abstracting complex constructions, enabling focus on the KLM
theorem’s core concepts while maintaining formal rigor. The formalization successfully covers the
complete KLM theorem with machine-verified correctness for the propositional case. All five
System C rules are precisely encoded, cumulative models are formally represented, and the bidirectional
equivalence between syntax and semantics is proven. The modular structure enables extensions, while
axiomatization keeps the approach accessible.</p>
      <p>
        Researchers in non-monotonic reasoning have explored automated reasoning approaches before.
Related work includes KLMLean and KLMLean 2.0 by Pozzato [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and Giordano et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], which
implement tableau-based theorem proving for KLM logics in SICStus Prolog using lean tableau methodology.
Very general implementations of the proof theory of conditional logics can be found in the work by, e.g.,
Girlando [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Another line of work involves implementing KLM-style reasoning via translation into
a system based on a diferent logic [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. In our understanding, these works are automated reasoning
systems that permit KLM-style reasoning rather than formal verification of representation theorems
in proof assistants. We are not aware of any formalization attempts of representation theorems for
non-monotonic reasoning approaches in proof assistants.
      </p>
      <p>Note that our formalization creates a verified library for KLM-style reasoning that can be extended
to other systems and applied to practical AI systems through code extraction. The strategic balance
between axiomatic abstraction and constructive proof provides a methodology for similar formalizations,
showing how to handle infinite constructions while maintaining focus on core theoretical concepts.</p>
      <p>
        In future work, we aim to formalize more theorems from knowledge representation and reasoning.
The closest theorem to the work here is the representation theorem by KLM for System P, which is an
extension of System P by one additional rule [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]:
(OR)
 |∼   |∼
      </p>
      <p>
        ∨  |∼ 
This rule states that if  typically follows from both  and , then  also follows from  ∨ . Semantically,
System P requires preferential models with transitive preference relations, unlike System C, which only
involves irreflexivity. The modular approach from this paper allows for the implementation of this
additional rule easily. For that we would add an additional constructor in CumulCons (see Section 4.1:
Many other definitions also require only minor adjustments. A challenge is to implement a semantic
representation of System P. This is by preferential models (which difer from cumulative models). Part
of this challenge is that known canonical constructions for preferential models may produce infinite
objects, even for finite languages [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. We refrain from stating further details here and leave further
investigation open for future work.
We thank the reviewers for their comments, which helped us improve the paper.
      </p>
    </sec>
    <sec id="sec-8">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, the authors used Grammarly in order to: Grammar and spelling
check, Paraphrase and reword. After using this tool/service, the authors reviewed and edited the content
as needed and take full responsibility for the publication’s content.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Kraus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Magidor</surname>
          </string-name>
          ,
          <article-title>Nonmonotonic reasoning, preferential models, and cumulative logics</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>44</volume>
          (
          <year>1990</year>
          )
          <fpage>167</fpage>
          -
          <lpage>207</lpage>
          . doi:
          <volume>10</volume>
          .1016/
          <fpage>0004</fpage>
          -
          <lpage>3702</lpage>
          (
          <issue>90</issue>
          )
          <fpage>90101</fpage>
          -
          <lpage>5</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Gabbay</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. J.</given-names>
            <surname>Hogger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Robinson</surname>
          </string-name>
          ,
          <source>Handbook of Logic in Artificial Intelligence and Logic Programming</source>
          ,
          <source>OXFORD UNIV PR</source>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brewka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Dix</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Konolige</surname>
          </string-name>
          ,
          <source>Nonmonotonic Reasoning: An Overview</source>
          , volume
          <volume>73</volume>
          <source>of CSLI Lecture Notes</source>
          , CSLI Publications, Stanford, CA,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Gabbay</surname>
          </string-name>
          ,
          <article-title>Theoretical foundations for non-monotonic reasoning in expert systems</article-title>
          , in: K. R. Apt (Ed.),
          <source>Proceedings of the conference on Logics and Models of Concurrent Systems - Conference proceedings</source>
          , volume
          <volume>13</volume>
          <source>of NATO ASI Series</source>
          , Springer,
          <year>1984</year>
          , pp.
          <fpage>439</fpage>
          -
          <lpage>457</lpage>
          . doi:
          <volume>10</volume>
          .1007/ 978-3-
          <fpage>642</fpage>
          -82453-1_
          <fpage>15</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Magidor</surname>
          </string-name>
          ,
          <article-title>What does a conditional knowledge base entail?</article-title>
          ,
          <source>Artificial intelligence 55</source>
          (
          <year>1992</year>
          )
          <fpage>1</fpage>
          -
          <lpage>60</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Paulin-Mohring</surname>
          </string-name>
          ,
          <article-title>Introduction to the calculus of inductive constructions</article-title>
          , in: B.
          <string-name>
            <surname>W. Paleo</surname>
          </string-name>
          , D. Delahaye (Eds.),
          <source>All about Proofs, Proofs for All</source>
          , volume
          <volume>55</volume>
          <source>of Studies in Logic (Mathematical Logic and Foundations)</source>
          ,
          <source>College Publications</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <article-title>A comprehensive formalization of propositional logic in coq: Deduction systems, meta-theorems, and automation tactics</article-title>
          ,
          <source>Mathematics</source>
          <volume>11</volume>
          (
          <year>2023</year>
          ). doi:
          <volume>10</volume>
          .3390/math11112504.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>E. N.</given-names>
            <surname>Zalta</surname>
          </string-name>
          ,
          <article-title>Basic concepts in modal logic, Center for the Study of Language and Information (</article-title>
          <year>1995</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Pozzato</surname>
          </string-name>
          ,
          <article-title>Proof methods for conditionaland preferential logics</article-title>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>L.</given-names>
            <surname>Giordano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Gliozzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Pozzato</surname>
          </string-name>
          , KLMLean
          <volume>2</volume>
          .
          <article-title>0: A theorem prover for KLM logics of nonmonotonic reasoning</article-title>
          , in: N.
          <string-name>
            <surname>Olivetti</surname>
          </string-name>
          (Ed.),
          <source>Proceedings of the 16th International Conference on Automated Reasoning with Analytic Tableaux and Related Methods (TABLEAUX</source>
          <year>2007</year>
          ), volume
          <volume>4548</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2007</year>
          , pp.
          <fpage>238</fpage>
          -
          <lpage>244</lpage>
          . doi:
          <volume>10</volume>
          .1007/ 978-3-
          <fpage>540</fpage>
          -73099-6_
          <fpage>19</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Girlando</surname>
          </string-name>
          , L. Straßburger,
          <article-title>MOIN: A nested sequent theorem prover for intuitionistic modal logics (system description)</article-title>
          , in: N.
          <string-name>
            <surname>Peltier</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Sofronie-Stokkermans</surname>
          </string-name>
          (Eds.),
          <source>Proceedings of the 10th International Joint Conference on Automated Reasoning (IJCAR</source>
          <year>2020</year>
          ), volume
          <volume>12167</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2020</year>
          , pp.
          <fpage>398</fpage>
          -
          <lpage>407</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -51054-1_
          <fpage>25</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>X.</given-names>
            <surname>Parent</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Benzmüller</surname>
          </string-name>
          ,
          <article-title>Conditional normative reasoning as a fragment of HOL</article-title>
          ,
          <source>J. Appl. Non Class. Logics</source>
          <volume>34</volume>
          (
          <year>2024</year>
          )
          <fpage>561</fpage>
          -
          <lpage>592</lpage>
          . doi:
          <volume>10</volume>
          .1080/11663081.
          <year>2024</year>
          .
          <volume>2386917</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>