Skip to content

Feature/claude pipeline integration#118

Open
bizid777 wants to merge 28 commits intomainfrom
feature/claude-pipeline-integration
Open

Feature/claude pipeline integration#118
bizid777 wants to merge 28 commits intomainfrom
feature/claude-pipeline-integration

Conversation

@bizid777
Copy link
Copy Markdown
Collaborator

No description provided.

alok and others added 28 commits June 30, 2025 09:48
- Created DafnySpecs directory for clean Dafny-to-Lean port
- Moved all .dfy reference files to DafnySpecs/dafny/
- Implemented NpAdd.lean with multiple approaches:
  - Runtime size checking via hypotheses
  - Compile-time checking with Vector types
  - Polymorphic and refinement type variants
  - MPL-style specification comments for future verification
- Includes theorems for commutativity, associativity, and identity
- Implement direct product using fold
- Add range-based product matching Dafny's ProdArray specification
- Include tail-recursive implementation for efficiency
- Add MPL-style specifications for future verification
- Provide vector and polymorphic approaches
- Include properties like product of ones, zero handling
- Add parallel product and zero-check optimizations
- Provide Option-based API for safer empty array handling
- Add comprehensive examples and test coverage

The implementation follows the established patterns from NpAdd.lean
and NpSum.lean, providing multiple approaches (runtime constraints,
compile-time constraints, refinement types) for array product computation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add LeanExplore to .mcp.json configuration alongside lean-lsp-mcp
- Add MCP setup commands to Justfile (install-mcp-tools, setup-mcp, verify-mcp)
- Update setup workflow to include MCP configuration for both CI and local dev
- Add automatic installation for lean-lsp-mcp (via uv) and leanexplore (from GitHub)
- Include MCP verification in main verify-setup command
- Handle optional jq dependency gracefully in MCP commands

The MCP tools enable better IDE integration for Lean 4 development:
- lean-lsp-mcp: Provides LSP features via Model Context Protocol
- leanexplore: Search engine for Lean 4 declarations with AI integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update .mcp.json to use correct CLI command: 'leanexplore mcp serve --backend local'
- Add demo script showing local search works without API keys
- Update documentation with successful local search example
- Fix Justfile to use correct MCP command syntax
- Ensure data fetch is included in setup process

The setup now runs entirely locally:
- No API keys required
- All searches performed against local database
- Privacy-preserving (no external API calls)

Demo shows successful search for 'qsort' finding Array.qsort and related functions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Implement arange function with runtime size checking via hypotheses
- Add tail-recursive variant for efficiency
- Include vector approach with compile-time size calculation
- Provide safe Option-based API for invalid parameters
- Add specification theorems for first element, consecutive differences, and bounds
- Support floating-point ranges with arangeFloat
- Include polymorphic version for generic numeric types
- Add helper functions like arangeSimple, arangeDefault, and range
- Document MPL-style specifications for future verification

The implementation follows patterns established in NpAdd, NpSum, and NpMax modules.
Port Dafny np_equal.dfy specification to idiomatic Lean 4:
- Element-wise equality comparison returning Array Bool
- Runtime size checking via hypotheses matching Dafny requires
- Vector-based approach with compile-time size constraints
- Polymorphic version for any type with decidable equality
- Properties: reflexivity, symmetry, transitivity helpers
- MPL-style specifications for future verification
- Comprehensive examples and edge case handling

Follows established patterns from NpAdd and NpAbs implementations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Port np_greater.dfy and np_less.dfy to idiomatic Lean 4 with:
- Element-wise comparison operations for arrays with size constraints
- Vector-based implementations for compile-time size checking
- Polymorphic versions for ordered types with DecidableRel
- Properties about ordering (irreflexivity, transitivity)
- MPL-style specifications for future verification
- Count functions for filtering comparisons

Both modules follow established patterns from NpEqual.lean and other DafnySpecs modules.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants