vero-dafny-pitfalls

Translate Dafny constructs like ghost variables and maps to Lean 4.

2|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/sunblaze-ucb/vero --skill vero-dafny-pitfalls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vero-dafny-pitfalls
Source: https://github.com/sunblaze-ucb/vero/tree/main/.claude/skills/vero-dafny-pitfalls
Command: npx skills add https://github.com/sunblaze-ucb/vero --skill vero-dafny-pitfalls

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps mitigate common translation pitfalls when converting Dafny code to Lean 4, ensuring more reliable code generation.

Core Features & Use Cases

  • Identify Dafny to Lean 4 Issues: Highlights common mismatches and potential pitfalls.
  • Optimize Dafny Code: Provides translations and best practices for specific Dafny constructs.
  • Use Case: When translating a complex Dafny algorithm into Lean 4, this Skill offers guidelines on mapping specific constructs and pitfalls like handling 'ghost' functions correctly.

Quick Start

Run the vero-dafny-pitfalls skill to get a comprehensive guide on translating Dafny to Lean 4 and avoid common mistakes.

Frequently Asked Questions about vero-dafny-pitfalls

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

FAQPage Schema
How do I translate Dafny ghost variables to Lean 4 correctly?

Translating Dafny ghost variables to Lean 4 requires mapping them to specific Lean constructs to maintain formal verification integrity. This Skill identifies known translation pitfalls and provides best practices for handling ghost functions correctly during code migration.

What are common pitfalls when translating Dafny sequences to Lean 4?

Common pitfalls translating Dafny sequences to Lean 4 involve structural mismatches in formal verification constructs. This Skill highlights these potential translation issues and offers optimized code generation guidelines for sequences and maps.

How does formal verification code migration from Dafny to Lean 4 work?

Formal verification code migration from Dafny to Lean 4 involves mapping Dafny-specific constructs like methods and sequences to Lean 4 equivalents. This Skill provides comprehensive guidelines to ensure correct and efficient code generation while avoiding common mistakes.

Can I use this to fix Dafny to Lean 4 translation issues for complex algorithms?

Yes, you can use this Skill to fix Dafny to Lean 4 translation issues for complex algorithms. It provides targeted guidelines on mapping specific constructs and mitigating known pitfalls to ensure reliable code generation.

Why does my Dafny to Lean 4 code translation fail formal verification?

Dafny to Lean 4 code translation may fail formal verification due to unmapped constructs like ghost variables or methods. This Skill addresses known translation pitfalls and provides best practices to ensure correct and efficient code generation.