---
title: "U5003: Solver missing or version mismatch"
url: https://una-lang.org/en/docs/errors/U5003/
release: v0.4.0
source: https://github.com/una-lang/una/blob/v0.4.0/crates/una-explain/explain/U5003.md
---

# U5003: Solver missing or version mismatch

U5003 says that the solver could not run, and its message says why.

## Why Una rejects it

Tier 1 runs the Z3 solver built into `una`, at the exact version that `verification.lock` pins, so that every proof can be reproduced (`spec/12 §5`, ADR 0003, ADR 0124). `una` never looks for a `z3` program on the path: each query runs in a confined child process of `una` itself.

When the solver could not run, `una check` stops before discharging any obligation that the proof cache does not hold, and points at the `solver_version` of the lock. `una check --tier 0` checks everything else without a solver.

## How to fix it

The repair depends on the reason the message gives:

- **Another version.** "verification.lock pins z3 4.8.12, and this una (0.4.0) has z3 5.1.0 built in": set `solver_version` to the version this `una` has, which `una --version` prints, or use a `una` whose built-in Z3 is the pinned one.
- **No solver built in.** "this development build has no solver built in": the `una` was built from source without the Z3 library. Run `eval "$(scripts/z3-library.sh --export)"` in the checkout, which sets `UNA_Z3_LIB`, then build `una` again (`compiler/testing.md §3`).
- **Not confined.** "the solver could not be confined", followed by the reason, such as "the solver must not run as root": run `una` as an ordinary user, in a container too (`docker run --user 1000:1000 ...`).
- **No handshake.** The child could not be started, broke its confinement, or did not answer as this `una`.

## The repair at a glance

`verification.lock`

```diff
  encoding_version = "una-smt-1"
  solver           = "z3"
- solver_version   = "4.8.12"
+ solver_version   = "5.1.0"
  logic            = "QF_UFLIA"
  step_budget      = 5000000
  random_seed      = 0
```

## Failing example

`verification.lock`

```toml
encoding_version = "una-smt-1"
solver           = "z3"
solver_version   = "4.8.12"
logic            = "QF_UFLIA"
step_budget      = 5000000
random_seed      = 0
```

`src/demo.una`

```una
module demo

pub kind Seats = Int in 0..5000

pub book(seats: Seats) -> Int = seats

pub first() -> Int = book(1)
```

## Fixed example

`verification.lock`

```toml
encoding_version = "una-smt-1"
solver           = "z3"
solver_version   = "5.1.0"
logic            = "QF_UFLIA"
step_budget      = 5000000
random_seed      = 0
```

`src/demo.una`

```una
module demo

pub kind Seats = Int in 0..5000

pub book(seats: Seats) -> Int = seats

pub first() -> Int = book(1)
```
