Correspondence of the Fragment F rules: LaTeX, Coq, Lean, Athena, Prolog

Table of Contents

This note is a companion to A Triple Certified Proof that Core Logic is not Paraconsistent (Arguments section). It places the five rules of the fragment \(\mathcal{F}\) — Table 1 there — beside their encodings, clause by clause, in Coq, Lean 4, Athena and Prolog, so that a reader who doubts the faithfulness of the transcription can check each line against the others. A mismatch, if there were one, would be a finite and exhibitable fact: a single rule whose code says something other than the table.

1. One minimal logic, and a four-rule fragment

Three points fix what is, and what is not, being encoded.

  1. There is only one “minimal logic”. The term denotes Johansson’s Minimalkalkül [1937] — intuitionistic logic without ex falso quodlibet — and nothing else. No rival system competes for the name.
  2. \(\mathcal{F}_{\mathbf{M}}\) is a proper fragment of it, not the whole. The minimal reading uses four rules only — Ax, \(L\lnot\), \(R\to\), \(L\to\) — which is why every underivability established in \(\mathcal{F}_{\mathbf{M}}\) is a statement about that small fragment, not a borrowed theorem of full minimal logic. The Core reading \(\mathcal{F}_{\mathbb{C}}\) adds exactly one further rule, \(R\to_{\mathbb{C}}\), the sole Core-specific rule in the argument.
  3. The four rules are Tennant’s own. They are transcribed in the sequent-calculus format Tennant himself adopts in Core Logic; the label \(R\to_{\mathbb{C}}\) is the only piece of notation that is mine. So the encodings below do not import a foreign presentation of minimal logic: they restate, in four proof languages, rules the Core logician already accepts.

2. What the table lines up

Table 1 of the paper presents fragment F in the usual sequent-rule form. The three certifications encode the same derivability relation, up to three presentation differences, which are encoding conventions and not additional rules:

  1. Contexts are sets (pools), treated extensionally. Ax is not encoded in the literal form A ⊢ A but in its membership form: A ∈ Γ ⟹ Γ ⊢ A. The form A ⊢ A of Table 1 is the instance Γ = {A}. Likewise L¬ locates ¬A in Γ by membership (rather than adjoining it notationally), and L→ shares a single context Γ instead of the junction ∆, Γ. This is the “contexts as available assumptions” convention of §2.1.
  2. R→ is encoded “backwards”. Table 1 writes ∆ ⊢ B / ∆\{A} ⊢ A→B (A subtracted in the conclusion); the encoding adds A to the premiss context (A :: G) and leaves G in the conclusion. It is the same relation read the other way round — “putting A back into the context”, §2.3.
  3. In Athena, derivations are reified. Where Coq and Lean define an inductive Prop with five constructors, Athena declares a datatype Deriv (the proof trees) plus a predicate well-formed defined by biconditionals, and sets derivable f G S ⟺ ∃ d . well-formed d f G S. Each “rule” is thus a clause of well-formed on a constructor of Deriv.

3. Table A — Types and judgments

Notion (paper) Coq Lean Athena
Atom nat (Var : nat→formula) Nat (Var : Nat→Formula) Peano: zero, succ (Var Atom)
Formula A→B, ¬A, atom Impl, Neg, Var Impl, Neg, Var Impl, Neg, Var
Fragment (reading M / C) minimal_F / core_logic minimal_F / core_logic minimal-F / core-logic
Succedent: C / empty option: Some C / None Option: some C / none some-succ C / none-succ
Context ∆ (pool) set formula (list, ext.) List Formula (List Formula)
Membership “∈ ∆” In A G A ∈ G mem A G
Judgment ∆ ⊢ C derivable f G C Derivable f G C derivable f G S (= ∃d. wf d f G S)
Antisequent ∆ ⊬ C derivable f G C -> False Derivable f G C → False ~ (derivable f G S)

4. Table B — The five rules of fragment F

Reading: premisses ⟹ conclusion. Universal binders (forall f G A B / ∀ {f G A B}) are left implicit. In the Athena column, d : f G S abbreviates (well-formed d f G S); each row is the well-formed clause of the indicated constructor of Deriv.

Rule F (sequents, Table 1) Coq (constructor of derivable) Lean (constructor of Derivable) Athena (clause of well-formed)
Ax. A ⊢ A (encoded: A∈Γ ⟹ Γ⊢A) In A G -> derivable f G (Some A) A ∈ G → Derivable f G (some A) ax-rule f G A : mem A GG ⊢ some A
∆ ⊢ A / ¬A, ∆ ⊢ In (Neg A) G -> derivable f G (Some A) -> derivable f G None Neg A ∈ G → Derivable f G (some A) → Derivable f G none l-neg-rule f G A d : mem (Neg A) G & d : f G (some A)G ⊢ none
R→ ∆ ⊢ B / ∆\{A} ⊢ A→B derivable f (A::G) (Some B) -> derivable f G (Some (Impl A B)) Derivable f (A::G) (some B) → Derivable f G (some (Impl A B)) r-arrow-rule f G A B d : d : f (A::G) (some B)G ⊢ some (Impl A B)
L→ ∆ ⊢ A B, Γ ⊢ C / A→B, ∆, Γ ⊢ C In (Impl A B) G -> derivable f G (Some A) -> derivable f (B::G) C -> derivable f G C Impl A B ∈ G → Derivable f G (some A) → Derivable f (B::G) C → Derivable f G C l-arrow-rule f G A B Sc d1 d2 : mem (Impl A B) G & d1 : f G (some A) & d2 : f (B::G) ScG ⊢ Sc
R→C A, ∆ ⊢ / ∆ ⊢ A→B (C-specific) derivable core_logic (A::G) None -> derivable core_logic G (Some (Impl A B)) Derivable core_logic (A::G) none → Derivable core_logic G (some (Impl A B)) r-arrow-core-rule G A B d : d : core-logic (A::G) nonecore-logic G ⊢ some (Impl A B)

The first four rules (Ax, L¬, R→, L→) are parametric in the fragment f: they hold identically under the minimal reading FM and under the Core reading FC. Only R→C is restricted to core_logic: it is the sole C-specific rule, and it is the one that breaks the symmetry between M and C on the fatal sequent.

5. For reference: the source declarations

5.1. Coq (Block A)

Inductive derivable :
  fragment_F -> set formula -> option formula -> Prop :=
| Ax          : forall f G A,     In A G -> derivable f G (Some A)
| L_neg       : forall f G A,     In (Neg A) G -> derivable f G (Some A) -> derivable f G None
| R_arrow     : forall f G A B,   derivable f (A :: G) (Some B) -> derivable f G (Some (Impl A B))
| L_arrow     : forall f G A B C, In (Impl A B) G -> derivable f G (Some A) -> derivable f (B :: G) C -> derivable f G C
| R_arrow_core: forall G A B,     derivable core_logic (A :: G) None -> derivable core_logic G (Some (Impl A B)).

5.2. Lean (Block A)

inductive Derivable : FragmentF → List Formula → Option Formula → Prop
  | Ax           : A ∈ G → Derivable f G (some A)
  | L_neg        : Neg A ∈ G → Derivable f G (some A) → Derivable f G none
  | R_arrow      : Derivable f (A :: G) (some B) → Derivable f G (some (Impl A B))
  | L_arrow      : Impl A B ∈ G → Derivable f G (some A) → Derivable f (B :: G) C → Derivable f G C
  | R_arrow_core : Derivable core_logic (A :: G) none → Derivable core_logic G (some (Impl A B))

5.3. Athena (Block A)

datatype Deriv :=
    (ax-rule Fragment (List Formula) Formula)
  | (l-neg-rule Fragment (List Formula) Formula Deriv)
  | (r-arrow-rule Fragment (List Formula) Formula Formula Deriv)
  | (l-arrow-rule Fragment (List Formula) Formula Formula Succedent Deriv Deriv)
  | (r-arrow-core-rule (List Formula) Formula Formula Deriv)

assert* wf-ax :=
  [((well-formed (ax-rule f G A) f' G' S) <==>
    (f = f' & G = G' & S = (some-succ A) & mem A G))]

assert* wf-l-neg :=
  [((well-formed (l-neg-rule f G A d) f' G' S) <==>
    (f = f' & G = G' & S = none-succ & mem (Neg A) G & (well-formed d f G (some-succ A))))]

assert* wf-r-arrow :=
  [((well-formed (r-arrow-rule f G A B d) f' G' S) <==>
    (f = f' & G = G' & S = (some-succ (Impl A B)) & (well-formed d f (A :: G) (some-succ B))))]

assert* wf-l-arrow :=
  [((well-formed (l-arrow-rule f G A B Sc d1 d2) f' G' S') <==>
    (f = f' & G = G' & Sc = S' & mem (Impl A B) G
     & (well-formed d1 f G (some-succ A)) & (well-formed d2 f (B :: G) Sc)))]

assert* wf-r-arrow-core :=
  [((well-formed (r-arrow-core-rule G A B d) f' G' S) <==>
    (f' = core-logic & G = G' & S = (some-succ (Impl A B))
     & (well-formed d core-logic (A :: G) none-succ)))]

assert* derivable-def :=
  [((derivable f G S) <==> (exists ?d:Deriv . (well-formed ?d f G S)))]

6. The Prolog file

The correspondence extends to core_logic_is_not_paraconsistent.pl. The five rules recur one by one (ax, lneg, rcond, lcond, rcond_core), up to notational conventions: ~A for ¬A, A=>B for A→B, Gamma:A for the sequent.

Rule Athena / Coq / Lean Prolog (permissive mode, rules/3)
Ax. A∈Γ ⟹ Γ⊢A (succedent some A) ax(Gamma:A) :- A \= (_=>_), A \= bot, iso_member(A, Gamma).
empty succedent none rules(lneg, Gamma:bot, Rest:A) :- iso_select(~A, Gamma, Rest).
R→ (A::G) ⊢ some B ⟹ G ⊢ some (A→B) rules(rcond, Gamma:A=>B, [A\vert Gamma]:B) :- B \= bot.
L→ junction by membership rules(lcond, Gamma:C, conj(Rest:A, [B\vert Rest]:C)) :- iso_select(A=>B, Gamma, Rest).
R→C (A::G) ⊢ none ⟹ G ⊢ some (A→B) rules(rcond_core, Gamma:A=>_B, [A\vert Gamma]:bot).

Since the recent cleanup, ax/1 has a single clause, the membership axiom shown above; it is therefore exactly Coq’s In A G -> derivable f G (Some A), Lean’s A ∈ G → … and Athena’s mem A G. (An earlier, unreachable second clause — which fired only on a context literally holding a sequent-term, something the calculus never builds — has been removed; every verdict is unchanged.)

6.1. What Prolog adds: the printed rule is the executed rule

Prolog does not certify as the three assistants do. Its “certification” belongs in scare quotes: it is a logic-programming model that searches for derivations under a fixed SLD strategy, and the antisequents rest on the failure of that search (negation as failure over a bounded search), not on a kernel check. That is corroboration, not certification.

But it adds something the assistants, by construction, cannot. The sequent-calculus derivations the paper displays — the derivations of DNS.1 and DNS.2, and the contradiction square — are printed by the same clauses that compute them: the rules/3 engine builds the proof term, and render_bussproofs/1 emits it as the bussproofs LaTeX that appears in the article. There is thus no separate, hand-copied transcription of a rule into LaTeX that could silently drift from the executed rule: on the Prolog side, the displayed rule and the running rule are literally the same object. Where the doubt about correspondence can always, in principle, be raised against a hand-set table, here it is closed mechanically — the figure is a function of the code.

6.2. Two caveats

  1. Empty succedent vs object constant bot. Where Coq/Lean/Athena represent the empty succedent of L¬ and R→C by None / none / none-succ (no formula on the right), the Prolog file writes Gamma:bot — an object constant in succedent position. The encoded relation is the same, but the representation differs.
  2. Corroboration, not certification. Derivability in Prolog is a bounded proof search (for(Th,0,6), deepening on L→), and the antisequents rest on the failure of that search. No kernel checks the exhaustiveness of the search space. Hence the scare quotes.

6.3. Running the Prolog model online, and the sources

The Prolog corroboration can be run in the browser, with nothing to install, at SWI-Tinker: choose core_logic_is_not_paraconsistent.pl from the drop-down menu and consult the file twice in succession. Its user commands then print, section by section, the bussproofs derivation of each result of the paper.

All four files — the three frozen certifications (.v, .lean, .ath) and this Prolog model (.pl) — are collected in the GitHub repository.

7. Answer to two natural questions

  • Does the correspondence also hold for the Prolog file? Yes, at the level of the five rules: ax, lneg, rcond, lcond, rcond_core correspond one to one to Ax, L¬, R→, L→, R→C, under the two caveats above (the bot constant; corroboration by bounded search).
  • Does any of this require modifying the Coq file? No. This document only reads the existing sources; the three frozen certifications (.v, .lean, .ath) are unchanged and their SHA256 hashes remain identical.

Published: 2026-07-20