x402agent/SolanaOS / skills/solana-formal-verification
qedgen
FlaggedFormally verify programs by writing Lean 4 proofs. Trigger this skill whenever the user wants to formally verify code, generate Lean 4 proofs, prove properties about algorithms or smart contracts, verify invariants, convert program logic into formal specifications, or anything involving Lean 4 and formal verification. Also trigger when the user mentions "qedgen", "lean proof", "formal proof", "verify my code", "prove correctness", "formal verification", or wants mathematical guarantees about their implementation.
crates/qedgen/lean_support/test_lemmas.lean
View on GitHubimport QEDGen.Solana.Account
import QEDGen.Solana.Token
import QEDGen.Solana.State
import QEDGen.Solana.Cpi
import QEDGen.Solana.Authority
open QEDGen.Solana
-- Test 1: trackedTotal_nil works
example : trackedTotal [] = 0 := by
exact trackedTotal_nil
-- Test 2: closes_is_closed works
example (before after : Lifecycle) (h : closes before after) :
after = Lifecycle.closed := by
exact closes_is_closed before after h
-- Test 3: closes_was_open works
example (before after : Lifecycle) (h : closes before after) :
before = Lifecycle.open := by
exact closes_was_open before after h
-- Test 4: findByAuthority is find? by authority
example (accs : List Account) (auth : Pubkey) :
findByAuthority accs auth = accs.find? (fun acc => acc.authority = auth) := by
rfl
-- Test 5: authorized_refl works
example (auth : Pubkey) : QEDGen.Solana.Authority.Authorized auth auth := by
exact QEDGen.Solana.Authority.authorized_refl auth
-- Test 6: CPI construction is pure (rfl)
example : (QEDGen.Solana.Cpi.TransferCpi.mk 0 1 2 3 100).program = TOKEN_PROGRAM_ID := by
rfl
-- Test 7: closed_cannot_close works
example (p_after : Lifecycle) : ¬ closes Lifecycle.closed p_after := by
exact closed_cannot_close p_after
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |