qedgen

Convert Solana and Rust code into compilable Lean 4 proofs.

9|5|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/x402agent/SolanaOS --skill qedgen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qedgen
Source: https://github.com/x402agent/SolanaOS/tree/main/skills/solana-formal-verification
Command: npx skills add https://github.com/x402agent/SolanaOS --skill qedgen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables agents to formally verify code using Lean 4 proofs, eliminating ad-hoc reasoning and increasing correctness guarantees for Solana programs and Rust-based logic.

Core Features & Use Cases

  • Writing Lean 4 models and proofs for analyzed codebases
  • Iterating on compile-time errors with Leanstral assistance
  • Verifying properties such as access control, invariants, and CPI correctness
  • Use cases: verify smart contracts, ensure algorithmic correctness, or validate cryptographic flow

Quick Start

Use the qedgen skill to begin converting your program logic into Lean 4 proofs and then run lake build to validate.

Frequently Asked Questions about qedgen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I formally verify Solana programs using Lean 4?

Formal verification for Solana programs using Lean 4 converts Rust code into mathematical models and proofs to check invariants and access control. It generates compilable Lean 4 proofs using Mathlib and Leanstral to validate correctness.

Can I verify cross-program invocation correctness for Solana smart contracts?

Yes, you can verify cross-program invocation (CPI) correctness for Solana smart contracts. The skill translates program logic into Lean 4 proofs to rigorously validate CPI execution flows and ensure smart contract security.

What is the best way to write Lean 4 proofs for Rust codebases?

The best way to write Lean 4 proofs for Rust codebases is to model the algorithms in Lean 4, apply Mathlib frameworks, and iterate on compile-time errors. This skill uses Leanstral assistance to produce valid proofs for your code logic.

How do I build and validate Lean 4 proofs after converting my code?

To build and validate Lean 4 proofs after converting your code, you run the lake build command. This compiles the generated Lean 4 models and proofs to ensure your Solana program logic satisfies formal verification requirements.

What kind of properties can I verify with formal verification for Solana programs?

With formal verification for Solana programs, you can verify properties such as access control, system invariants, and cross-program invocation correctness. This eliminates ad-hoc reasoning by providing rigorous mathematical guarantees for Rust logic.

Does formal verification with Lean 4 support automated proof resolution?

Yes, formal verification with Lean 4 supports automated hard-goal resolution. The skill leverages Leanstral to assist with iterating on compile-time errors and providing optional automated support for complex proof goals.