Browse by type
We have just folded space from Ix. Many machines on Ix. New machines.

The Ix platform enables the compilation of Lean 4 programs into zero-knowledge succinct non-interactive arguments of knowledge (zk-SNARKs). This allows the execution and typechecking of any Lean program to be verified by performing a sub-100-millisecond operation against an approximately 1 kilobyte certificate, regardless of the size of the original Lean program. In fact, the correctness of the entire mathlib library of formal mathematics, containing around 2 million lines of code, may be compiled in this way into a single kilobyte sized cryptographic certificate.
We call this technique zero-knowledge proof-carrying code or zkPCC, as an extension of the well-known proof-carrying code paradigm. Instead of a host system verifying formal proofs carried by an application as in proof-carrying code, in zkPCC the host or user verifies a cryptographic zero-knowledge proof generated from the typechecking of that formal proof. This greatly improves the runtime cost of this verification operation (potentially even up to O(1) depending on the specific zk-SNARK protocol used) and minimizes the complexity of locally dependent tooling (e.g. build systems for the formal proof language).
Additionally, while in proof-carrying code an application must reveal the proof artifact that demonstrates some formal property to the user, in zkPCC this proof artifact may be kept private, which opens up new possibilities for economic transactions over proofs.
:warning: This repository is a pre-alpha work in progress and should not be used for any purpose.
The formal Aiur compiler and runtime live in separate Lean and Rust packages
(Aiur/, IxVM/, MultiStark/ and crates/). See
the migration guide for their build commands,
what the Aiur proofs cover and what they trust, and
the controller design for how claims
and their aggregation are proven.
Our expectation is that Ix, and zkPCC in general, will allow applications to frictionlessly ship security guarantees to their users. Some possible use cases could be:
In or around 1637, the mathematician Pierre Fermat conjectured the following:
- It is impossible to separate a cube into two cubes, or a fourth power into two fourth powers, or in general, any power higher than the second, into two like powers.
- I have discovered a truly marvelous proof of this
- which this margin is too narrow to contain.
The first part of this statement famously evaded proof for over 350 years before finally being demonstrated by Andrew Wiles in 1994. Mathematicians and historians of mathematics have also long debated the second part, whether Fermat's claim that he possessed a proof of the first part is credible, which seems unlikely given the complexity and modern mathematical infrastructure used by the Wiles proof of the first part. Rarely discussed, however, is the third part, which is in fact a statement of proof theory, specifically one which proposes an information theoretic lower bound to the size of the proof of a particular proposition.
The specific margin in question is page 85 in the 1621 edition of Diophantus' Arithmetica, which is a folio volume with dimensions 353mm tall by 225mm wide by 40mm deep. Leaving the precise dimensions of the margins as an exercise to the reader, it is trivial to show the proposition is false regardless of margin size, or the size of the proof (up to very large bounds) if one permits the proof to printed in the margin using arbitrarily small text, using microfilm, photolithography, etc. It is more interesting to assume that what Fermat meant was that the margin is too narrow to contain a proof written in Fermat's own handwriting.
Happily, we have an example of text we know would satisfy this constraint, Fermat's margin note itself! In Latin, the note reads:
Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos & generaliter nullam in infinitum ultra quadratum potestatem in duos eiusdem nominis fas est dividere cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet.
At 262 characters, and 8-bits per character, this is 2096 bits, or 262 bytes. This is quite small, but fortunately not quite as small as a Groth16 proof over BN254:
A Groth16 proof has two G1 points and one G2. In the BN254 pairing curve these take 64 and 128 bytes respectively uncompressed totaling 256 bytes for a proof.
So if we can show that a Groth16 proof of a proof of the first part of Fermat's Last Theorem is constructible, we will have clearly - though non-constructively- disproven the third part.
A Lean 4 formalization of Fermat's Last Theorem is in progress, and gives the statement as:
theorem PNat.pow_add_pow_ne_pow
(x y z : ℕ+)
(n : ℕ) (hn : n > 2) :
x^n + y^n ≠ z^n :=
PNat.pow_add_pow_ne_pow_of_FermatLastTheorem FLT.Wiles_Taylor_Wiles x y z n hn
Currently, as the dependencies of this theorem contain sorry holes, we cannot
feed it through ix (which only works over complete program graphs). Once the
formalization is complete, however, you will be able to do
> ix store FLT.lean PNat.pow_add_pow_ne_pow
e53c3d4bad8538e152a89d8bf75be178a3876252744961b9a087fe3973545c20
> ix prove --check e53c3d4bad8538e152a89d8bf75be178a3876252744961b9a087fe3973545c20
b44236ba17ad7445ae3eac48a8ba86ba00f08c069237b08451e311b688146e7e
to generate a multi-STARK proof that the theorem typechecks. With a Groth16 circuit that recursively proves verification of such proofs, i.e. a Groth16 final SNARK, the construction is complete, and we can embed a proof of Fermat's Last Theorem in Fermat's Margin Note.

Ix consists of the following core components:
ixon, the ix object
notation,
which is an alpha-invariant content-addressable serialization or wire format.
The compiler also includes a decompiler to convert ixon objects back into
Lean programs (by preserving the alpha-relevant metadata in a separate ixon
object and re-merging the computationally relevant and irrelevant parts).ixon (including ingress and egress from and to binary data).ixon data between themselves.IxC/Kernel is a type checker for ixon whose acceptance is proved to imply
consistency. It is Ix's own kernel, derived from the verified checker of
con-leche. Its entry,
Ix.Kernel.Admission.checkBytes, takes canonical ixon bytes, and for every
environment it accepts the theorems give a set-theoretic model and no proof of
False, on the standard axioms only. This theorem does not by itself certify
the compiler or IxVM: the compiler has its own theorem,
Ix.Cert.CompileCorrect (see Compiling Lean to Ixon),
and IxVM is outside both. docs/kernel.md states what is
proved, what is trusted and what the gate checks; --with-model also builds
the Mathlib-based model package Models/SetTheory:
lake run check-kernel --with-model
Benchmarks (compiler, kernel, and zk-prover backends) are tracked at
https://bencher.dev/console/projects/ix/plots. ix bench runs the same
cells locally, and !benchmark runs them on a PR — see
docs/benchmarking.md.
Aiur can use multi-stark's first-party CUDA backend. CUDA is opt-in: ordinary
Cargo and Lake builds remain CPU-only and do not require a CUDA toolkit or
runtime. Build ix with IX_CUDA=1 (also accepts true or yes), then
select a device for the proving command:
IX_CUDA=1 lake build ix
lake exe ix compile Benchmarks/Compile/CompileInitStd.lean --out InitStd.ixe
lake exe ix prove --gpu-device 0 --ixe InitStd.ixe Vector.extract_append
CUDA is a build-time selection. At run time --gpu-device N, --lanes or
IX_CUDA=1 requests it (without --gpu-device, the device comes from
MULTI_STARK_CUDA_DEVICE, otherwise zero). Rust consumers can instead
enable the cuda feature on aiur or ix-ffi. The backend requires an NVIDIA
GPU and a CUDA toolkit with nvcc; build and architecture controls are
documented in the multi-stark repository. It keeps the Goldilocks/BLAKE3
protocol and proof format unchanged, and GPU proofs remain verifiable by the CPU
implementation. Proving and aggregating a whole environment across several
GPUs (ix prove --lanes N --gpu-device 0 --ixe E --ixes M) is covered in
the orchestration guide. Dated hardware
measurements belong in BENCHMARKS.md and
docs/benchmarking.md, not this stable overview.
LIBCLANG_PATH per https://rust-lang.github.io/rust-bindgen/requirements.htmllake build and lake testix binary with lake run install, or run with lake exe ix.
The prover runs inside ix; the proving commands export Aiur artifacts in
the checkout ix was built in. An installed copy finds that checkout through
IX_ROOT (or by running inside it), or takes prebuilt artifacts:
--aiur-artifact/IX_AIUR_ARTIFACT, --aggr-artifact/IX_AGGR_ARTIFACT and
--verifier-artifact/IX_VERIFIER_ARTIFACT.ix compile <file>.lean --out <file>.ixe (and ix compile-lean) runs the
certified compiler, Ix.Cert.compileReport, which is proved correct
(Ix.Cert.CompileCorrect), at the default sharing limits. ix prove, ix check
and ix addr-of given a name and no --ixe compile its closure through the
same certified compiler (Ix.CompileM.compileCertified). The uncertified
streamed and Rust compilers have been retired. See
docs/kernel.md for what the theorem covers on these paths.
Lean tests: `la
browse all types & interfaces →