vero-python-pitfalls

Detect Python-to-Lean 4 translation pitfalls like integer division and mutability.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers identify and mitigate common pitfalls when translating Python code to Lean 4, ensuring a smoother transition and reducing errors.

Core Features & Use Cases

  • Identify Python→Lean Pitfalls: Detects issues like integer division, range semantics, mutability, and more.
  • Benchmark-quality Baseline: Ensures code remains semantically equivalent after translation.
  • Use Case: Before translating a Python function to Lean 4, use this Skill to review potential issues and ensure correct translation.

Quick Start

Load the vero-python-pitfalls skill before translating any Python item to Lean 4.

Frequently Asked Questions about vero-python-pitfalls

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

FAQPage Schema
What are the common pitfalls when translating Python code to Lean 4?

Translating Python to Lean 4 introduces pitfalls like integer division mismatches, range semantics differences, and mutability constraints. This Skill detects these issues to help maintain semantic equivalence during code migration.

How do I ensure semantic equivalence when migrating Python functions to Lean 4?

To ensure semantic equivalence when migrating Python to Lean 4, use this Skill to review potential issues like integer division and mutability before translating, establishing a benchmark-quality baseline for your code.

Do I need to know both Python and Lean 4 syntax to use this code migration tool?

Yes, you need knowledge of both Python and Lean 4 syntax and semantics to effectively use this Skill. It identifies translation pitfalls but requires foundational understanding of both languages to apply the mitigations correctly.

How does Lean 4 handle mutability differently from Python during translation?

Lean 4 handles mutability differently from Python by enforcing a strictly immutable paradigm by default. This Skill identifies mutability-related pitfalls to watch for when translating mutable Python variables into Lean 4.

Why does integer division cause issues when moving Python code to Lean 4?

Integer division causes issues when moving Python to Lean 4 because Python dynamically handles numeric types while Lean 4 enforces strict static typing. This Skill detects these semantic mismatches to prevent calculation errors.