# SynaLemma: reasoning done by a logic engine, not by the model · SynaLinks

> https://synalinks.com/en/synalemma/

SynaLemma

# Reasoning you can truly audit, because the model does not do it

Other agent systems rely on the language model to reason. SynaLemma is a logic layer built the other way around: the model translates your question into a rule, and a logic engine does the reasoning. It verifies the rule formally, derives the answer in the database you already run, and keeps the rule, so every step can be read and replayed.

[Book a demo](https://calendar.app.google/RMMAPbHYroAgiokb7)

01.Architecture

## The model proposes, the logic engine reasons

Most agent systems put the language model in the middle and let it reason its way to an answer. SynaLemma puts it at the edge. The model proposes a rule, and the engine performs every join, recursion and total. Nothing reaches your data or your answer without going through the engine.

The usual setup

1.  Your question

3.  Language model

5.  SQL it guessed

7.  Your database

9.  Language model

11.  A plausible answer

The model reasons in text. Its “explanation” is written after the fact and is not a record of how the answer was computed, so there is nothing to replay. A log of the agent's actions is a record, not a proof. [What the research shows →](#trace)

Outside SynaLemma

SynaLemma · the logic layer

**Language model** Local or hosted. It proposes rules; the engine decides.

 **Synalinks** The agentDrives the model step by step and traces everything.

 **Synalog** The logic engine

*   verifies every rule
*   does the reasoning
*   compiles the rule to SQL
*   checks the result

 **Ontology** The knowledgeYour ontology: entities, relationships and rules, as files in git.

**Your teams and agents** The app, Slack or Teams, and MCP.

**Your database** Runs the SQL. Queried in place.

**Your git repository** History, review, audit, restore.

Language model ⇄ Synalinks proposal constrained request

Synalinks ⇄ Synalog rule to verify refusal and its reason, or rows

Synalog ⇄ Ontology rule kept rule reused

Synalinks ⇄ Your teams and agents the answer and its rule question

Synalog ⇄ Your database verified SQL rows

Ontology ⇄ Your git repository every change is a commit

The model translates your question into a rule and words the answer. Every inference in between is the engine's, and can be replayed.

*   Part of SynaLemma
*   Outside, connected to it
*   What is passed, in the direction of the arrow

Traces and proofs

## A trace is a record, not a proof

A language model's written reasoning is more text it generated, and research keeps finding that it can leave out what actually drove the answer.

Logging an agent's actions has the same limit: the log says which tools were called, not whether the answer holds, and running the same question again can take another path.

SynaLemma does keep a trace, but only for debugging. The proof is the logic code: a Synalog rule that passed the formal verifier before it ran, that anyone can read, and that gives the same rows when rerun on the same data.

### What the research shows

1.  [Post-Hoc Reasoning in Chain of Thought: Decoding and Steering Pre-Committed Answers](https://arxiv.org/abs/2603.01437) Cox et al., 2026 · preprint
2.  [Two Regimes of Chain-of-Thought Unfaithfulness: Metric-Based Detection Fails Where Models Are Wrong](https://arxiv.org/abs/2607.23458) Angdembay et al., 2026 · preprint
3.  [Reasoning Models Don't Always Say What They Think](https://arxiv.org/abs/2505.05410) Chen et al., Anthropic, 2025
4.  [From Agent Traces to Trust: A Survey of Evidence Tracing and Execution Provenance in LLM Agents](https://arxiv.org/abs/2606.04990) Wang et al., 2026 · preprint

02.Anatomy

## Two engines and one product, all written by us

Each layer has one job and passes the next layer something it can check. Two of them are open source; the third is the product that assembles them.

### The product

1.  **SynaLemma** The logic layer
    
    What your team uses: Lemma, the assistant; tables, entities and rules you can read and edit; the graph of what depends on what; roles, history, and the channels you already talk in.
    

### Open source · Apache-2.0

1.  **Synalinks** The agent
    
    Drives the model step by step: searches existing definitions, decomposes the question, writes rules, calls tools. Outputs are held to a schema, the model can be swapped, and every step is traced.
    
2.  **Synalog** The logic
    
    Verifies each rule before any SQL exists, compiles it to the SQL dialect of your database, and checks what its result must satisfy against your data.
    

### Outside SynaLemma

*   **Your database** tables unchanged, real names, nothing copied
    
*   **Your model** local or hosted, replaceable
    

*   Part of SynaLemma
*   Outside, connected to it

03.The product

## What your team sees

[![The conversation](/screenshots/conversation.png)](/screenshots/conversation.png "Open the screenshot at full size")

**The conversation** A question about payment routing, the answer, and the rule it cites, next to the memory.

[![Lineage](/screenshots/knowledge-graph.png)](/screenshots/knowledge-graph.png "Open the screenshot at full size")

**Lineage** What a result is computed from, step by step: from the Bitcoin tables to the entity, up to the rule and its assertions.

[![The rules](/screenshots/rules.png)](/screenshots/rules.png "Open the screenshot at full size")

**The rules** Each rule as a flowchart, with its assertions and its result: here Bitcoin funds followed hop by hop, by recursion.

[![The entities](/screenshots/concepts.png)](/screenshots/concepts.png "Open the screenshot at full size")

**The entities** An entity defined once on your tables: each merchant, with its account type, capture delay and merchant category code.

[![The tables](/screenshots/tables.png)](/screenshots/tables.png "Open the screenshot at full size")

**The tables** Your data, imported or queried in place.

[![Memory](/screenshots/memory.png)](/screenshots/memory.png "Open the screenshot at full size")

**Memory** The graph of what depends on what: tables, entities, rules.

[![The assertions](/screenshots/assertions.png)](/screenshots/assertions.png "Open the screenshot at full size")

**The assertions** What a result must satisfy to be consistent, stated in logic: one row per transaction, at least one origin, and the same scope as the neighbouring rule.

[![The rows that break it](/screenshots/counterexamples.png)](/screenshots/counterexamples.png "Open the screenshot at full size")

**The rows that break it** A broken assertion names its counterexamples: the two merchants whose payments go through a country none of their banks operates in.

←

→

04.The loop

## What happens between your question and the answer

 **Search** Synalinks

Found?

yes  → Run

no

 **Write** Synalinks

 **Verify** Synalog

Valid?

no: refused, with the reason  → Write

yes

 **Run** Synalog

 **Answer** Synalinks

 **Keep** SynaLemma

the next question starts here  → Search

*   Next step
*   Goes back
*   Decision

*   ###  Search
    
    The agent searches the layer for a definition that already answers the question. A layer of thousands of definitions never goes into the model's context whole: only what matches does.
    
*   ###  Write
    
    If none fits, it writes one, building on the entities already there instead of starting from raw tables.
    
*   ###  Verify
    
    The rule goes through the formal verifier. If it does not check, it is refused with the reason, and nothing is saved unless the whole layer still holds together.
    
*   ###  Run
    
    The verified rule is compiled to SQL and executed in your database. Its assertions are checked on the same data.
    
*   ###  Answer
    
    Only then does the assistant answer, quoting the rows the run returned and citing the rule, which you can open.
    
*   ###  Keep
    
    The rule is committed to the layer with its author and date. The next question starts from it.
    

05.Verified by logic

## Two checks, neither done by a model

Asking a second model to check the first one only adds another opinion. SynaLemma checks with logic instead. It is the first and only AI system that writes its own rules, verifies them formally, and checks their results against mathematical statements.

 **The rule** written by the agent

before it runs

Verified?

no

**Refused** never saved, never run

yes

 **Runs** as SQL, on your database

against your data

Counterexample?

yes

**Answer given** rule flagged, with the rows

 **Data or rule?** the agent works out which is wrong

no

**Holds** no counterexample in this data

*   Next step
*   Decision
*   Check passed
*   Stopped
*   Its own process

### The definition, before it runs

Synalog's formal verifier examines every rule before any SQL is generated, with no database involved: variables that are never bound, unsafe negation and aggregation, negation through recursion, recursion without a base case or a bound, unknown columns, functions and predicates. More than fifteen classes of error, all reported at once. A rule that does not check is never saved and never run.

### Its result, against your data

An assertion states what a result must satisfy, independently of how it is computed: a payment is counted once, a rate stays between 0 and 1, disputes never exceed payments. It is written in first-order logic (∀, ∃, →, sums and comparisons) as a Lean proposition, the notation of the Lean theorem prover. Synalog compiles a search for counterexamples to SQL and runs it on your database. In SynaLemma a broken assertion shows on the rule, with the rows that break it one click away.

A violated assertion names what breaks it: here, two suppliers under the agreed service level

counterexamples Copy

```
✗ OnTimeDelivery.meets_service_level is violated:
  ∀ s r d t, OnTimeDelivery s r d t → t ≥ 0.6
  2 counterexamples:
+-------------------+------+----+-------+
| s                 | r    | d  | t     |
+-------------------+------+----+-------+
| Shenzhen VoltPack | high | 34 | 0.588 |
| Hsinchu Controls  | high | 47 | 0.553 |
+-------------------+------+----+-------+
```

### What the checks do not cover

An assertion that holds has no counterexample in the data it ran on: it is a check, repeated every time, not a proof about data it has not seen. And no check says a definition is the one your business means: that remains yours to decide, once, in a file everyone can read.

06.Deterministic

## Same rule, same SQL

Ask a language model for the same query twice and the SQL can differ. In SynaLemma the model never writes SQL: the engine compiles it from a rule. Once a definition exists, every question that uses it gets the same query, whoever asks.

01

### Compiled, not generated

Synalog compiles each rule to the SQL dialect of your database. The same rule gives the same query on every run, in every channel, for every person and agent.

02

### Reused before written

The agent searches the layer before writing anything. A question an existing definition covers is answered by that definition, not by a new attempt.

03

### Locked when settled

Once your team agrees on a definition, lock it and no agent can change it. Replay any answer from its rule and get the same rows from the same data.

What can vary: how the assistant words the answer, and the rule it proposes for a question no definition covers yet. That rule is verified and shown to you, and once kept, it is fixed.

07.Governed

## Every access scoped, every change on record

Auditing an AI usually means reading logs of what a model said. In SynaLemma you audit two exact records: the derivation, made by the logic engine, and the history of the rules, kept in git, the tool software teams already use to track every change. And no one, person or agent, reaches your data except through those rules, with the rights of their role.

01

### From the answer to the rows

Each figure cites its rule and the row it came from. Each rule names the entities it builds on, and each entity the tables it reads. Follow the chain, or run any link of it again.

02

### From the rule to its history

Your ontology is a git repository: one file per table, entity and rule. Every change is a commit attributed to its author, whether a person, Lemma or another agent, with the difference and a way back.

03

### Scoped, and reviewed like code

Four roles and per-person permissions, and Lemma only gets the tools of the person asking. What was this definition on the day that figure was reported? Who changed it, and when? Compare two versions, restore one, or put a change through the same review as any other code.

The history records your definitions and how they changed, not your data: the rows stay in your database.

08.Your existing systems

## Works on the systems you already run

A classic semantic layer is a modelling project that takes months and is out of date soon after delivery. SynaLemma writes the layer as questions are asked, on top of your existing databases.

### No ETL, no second warehouse

Rules compile to SQL and run where the data is. On a database you operate, SynaLemma declares the tables you choose and never changes them: it writes only in a schema of its own, synalog\_home.

### Tables as they are

Old schemas keep their real table and column names, spaces and accents included. The layer gives them a meaning without touching them.

### A knowledge graph, without a graph database

Entities and relationships are modelled over your relational tables. The graph is virtual: it compiles to SQL.

### Questions SQL makes hard

The most valuable information lives in the relations: money followed through every hop, ownership chains, “which transactions received funds from an illicit one”. Recursion to a depth you declare, so it always terminates, and reasoning over time.

Databases SynaLemma connects to

*    PostgreSQL
*    MySQL
*    ClickHouse
*    BigQuery
*    Databricks
*    Trino
*    Presto
*    DuckDB
*    SQLite

And your files: CSV, Excel, JSON, JSONL, Parquet.

09.In the product

## Everything your team gets

The layer belongs to you. Anything the assistant writes can be read, corrected and locked by a person.

Lemma, the assistant

### Ask

*   Every figure cited with a clickable mention, down to the row it came from.
*   You watch her work, step by step: what she searched, wrote and ran.
*   Suggested questions drawn from your own layer.
*   Voice messages, transcribed on your server.
*   She proposes before acting on an open request, and asks when a question is ambiguous.
*   “Explain” and “Fix” on any rule, in one click.

Tables

### Your data

*   Import CSV, Excel, JSON, JSONL, Parquet and SQLite files, by drag and drop.
*   Connect a database and choose which tables to expose.
*   Copy tables from another database in one go, writing nothing on the source.
*   A spreadsheet editor with typed columns, sort, search, undo and redo.
*   Export any table or result to CSV or Excel.
*   Lock a table's rows, or protect its structure.

Entities, Rules, Memory

### Your knowledge

*   Each rule shown as a flowchart for those who do not read code, and as code for those who do.
*   Edit a rule in place: it is verified on save, and a refusal says why.
*   Validated, not validated, locked: the state of every definition is visible.
*   Memory: the graph of what depends on what, across tables, entities and rules.
*   Assertions with their status, and the rows that break them.
*   History with differences, and a restore to any version.

Reusable knowledge

### Layers

*   Install a ready-made layer from a git repository or a zip. Nothing is kept unless it verifies against your database.
*   Work across several layers at once.
*   Export a layer as plain files: no connection, no secrets, no rows.
*   A layer is a folder that runs with the open-source Synalog tooling, with or without us.

Beyond the app

### Agents and automation

*   An MCP server lets Claude Code, Codex, Cursor, VS Code Copilot or Windsurf search and run your verified rules.
*   Slack, Microsoft Teams, Discord, Telegram or WhatsApp, through a bot you own.
*   Loops: the same question on a schedule, a Monday shortage review or a daily quality check, posted to a chat.
*   A plugin SDK to add your own pages and features.

Control

### Administration

*   Four roles (admin, editor, analyst, viewer) and per-person permissions. Lemma is only given the tools the asking person's role allows.
*   Organisations, each with its own storage.
*   Pick the model from a catalogue, test the connection, switch at will. Local models: no API key, no per-token cost.
*   Every agent step, tool call and model call traced, on your side.
*   Credentials and tokens stored encrypted.
*   Interface in English, French, Dutch, Italian and Spanish.

Sovereignty

## Sovereign by construction, not by contract

Most sovereignty promises are a hosting location. SynaLemma's is its architecture: the layer is built so a small open model is enough, so the whole system, from the model to the definitions, runs inside your walls. If you choose a hosted model instead, your questions and the data excerpts needed to answer them go to that provider, and nowhere else.

### Your model

An open model on your own hardware (Ollama, vLLM, LM Studio). The model only proposes rules: the engine reasons, a refusal says exactly what to fix and the context stays small, so a small model is enough. General-purpose agent harnesses are tuned for the largest proprietary models.

### Your data

Queried in place, through an account that writes only in SynaLemma's own schema: no copy, no pipeline, no cloud in between. Credentials are stored encrypted, and voice messages are transcribed on your server.

### Your rules

Plain files in an open language, in your own git repository. They also run with the open-source tooling alone: if you stop working with us, your definitions stay with you.

### Your stack

Engines published under Apache-2.0, written by a team based in the European Union, and deployed by certified partners on your infrastructure.

Frequently asked

## What we get asked first

We have no AI expertise in house. Is that a problem?

No. SynaLemma is deployed by certified partners: integrators and consultancies whose engineers work alongside your team to install it, connect your data, and write and verify your definitions with your experts. Your own team can also be certified.

Is the model not still reasoning when it writes the rule?

It decides what to ask the engine: which entities to combine, and how. That decision is written down as a rule you can read, and the engine, not the model, derives every row from it. If the decision is wrong, it is wrong in a place you can see, correct once, and lock.

Is SynaLemma open source?

The two engines it is built on (Synalinks, Synalog) are open source under Apache-2.0. SynaLemma itself, the product that assembles them, is proprietary and sold under a commercial licence. Your rules are files in the open format, so they are never locked in.

Which databases does it work with?

PostgreSQL, MySQL, ClickHouse, BigQuery, Databricks, Trino, Presto, DuckDB and SQLite, queried in place: your tables stay where they are. And files: CSV, Excel, JSON, JSONL and Parquet. One rule compiles to the SQL dialect of whichever engine it runs on.

Which language models?

Any model that supports tool calling, chosen from a catalogue in the settings: open models served locally through Ollama, vLLM or LM Studio, or hosted providers such as Mistral, Anthropic, OpenAI or Google. Changing model does not change the rules. Everything except the conversation itself works with no model at all.

What if the model writes a wrong rule?

A structurally wrong rule is refused by the verifier. A rule that contradicts an assertion is flagged with the rows that break it. And because the rule is readable, the person who owns the number can see it and correct it. That is not possible when the answer is a paragraph of prose.

Does it replace our dashboards?

No. SynaLemma draws no charts: answers are numbers, tables and the rules behind them. It gives the definitions behind your dashboards one place to live, and lets people and agents ask questions in plain language against them.

See it run

## Bring a question your teams disagree on

In a free thirty-minute demo, we show you SynaLemma's answer and the rule it used.

[Book a demo](https://calendar.app.google/RMMAPbHYroAgiokb7)
