{"id":42434193,"url":"https://github.com/fraware/lean-uprove","last_synced_at":"2026-01-28T05:03:16.408Z","repository":{"id":316327825,"uuid":"1055186585","full_name":"fraware/lean-uprove","owner":"fraware","description":"A Lean 4 tactic for automating proofs involving universal properties in category theory","archived":false,"fork":false,"pushed_at":"2025-09-23T23:29:36.000Z","size":94,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-24T01:19:43.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fraware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-11T22:42:02.000Z","updated_at":"2025-09-23T23:29:40.000Z","dependencies_parsed_at":"2025-09-24T01:19:53.054Z","dependency_job_id":"24ccfc0b-1d84-40ed-a710-e76c7706c418","html_url":"https://github.com/fraware/lean-uprove","commit_stats":null,"previous_names":["fraware/lean-uprove"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fraware/lean-uprove","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Flean-uprove","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Flean-uprove/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Flean-uprove/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Flean-uprove/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fraware","download_url":"https://codeload.github.com/fraware/lean-uprove/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fraware%2Flean-uprove/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28840016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T02:10:51.810Z","status":"ssl_error","status_checked_at":"2026-01-28T02:10:50.806Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-28T05:03:13.455Z","updated_at":"2026-01-28T05:03:16.402Z","avatar_url":"https://github.com/fraware.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# lean-uprove\n\n[![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)](https://github.com/fraware/lean-uprove/actions)\n[![Lean 4](https://img.shields.io/badge/Lean%204-4.0.0-blue.svg)](https://leanprover.github.io/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Performance](https://img.shields.io/badge/Performance-P50%20≤150ms-brightgreen.svg)](https://github.com/fraware/lean-uprove)\n[![Memory](https://img.shields.io/badge/Memory-≤256MB-lightblue.svg)](https://github.com/fraware/lean-uprove)\n\n**A Lean 4 tactic for automating proofs involving universal properties in category theory**\n\n[Quick Start](#quick-start) • [Documentation](#documentation) • [Examples](#examples) • [API Reference](#api-reference) • [Contributing](#contributing)\n\n\u003c/div\u003e\n\n---\n\n## Features\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### **Universal Properties**\n- Automatically proves goals involving limits, colimits, exponentials\n- Handles (co)equalizers, (co)products, pullbacks/pushouts\n- Supports initial/terminal objects\n\n### **High Performance**\n- **P50 ≤ 150ms** per call\n- **P95 ≤ 800ms** per call\n- **≤ 256MB** memory usage\n- **≥ 40%** reduction in overall proof time\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### **Deterministic \u0026 Configurable**\n- Predictable time and search depth\n- Configurable timeouts and step limits\n- Multiple fallback strategies\n\n### **Explainer Mode**\n- `uprove?` prints exact proof steps\n- Full auditability and transparency\n- Human-readable proof plans\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## How It Works\n\n```mermaid\ngraph TD\n    A[Goal: Universal Property] --\u003e B{Pattern Matching}\n    B --\u003e|Match Found| C[Generate Proof Plan]\n    B --\u003e|No Match| D[Fallback Tactics]\n    C --\u003e E[Execute Proof Steps]\n    E --\u003e F{Success?}\n    F --\u003e|Yes| G[Proof Complete]\n    F --\u003e|No| H[Try Alternative Strategy]\n    H --\u003e I{Max Steps?}\n    I --\u003e|No| C\n    I --\u003e|Yes| D\n    D --\u003e J[Fallback Success]\n    \n    style A fill:#e1f5fe\n    style G fill:#c8e6c9\n    style J fill:#c8e6c9\n    style C fill:#fff3e0\n    style E fill:#fff3e0\n```\n\n## Quick Start\n\nGet up and running with lean-uprove in under 10 minutes!\n\n### One-Command Installation\n\n**Docker (Recommended):**\n```bash\ndocker run --rm ghcr.io/fraware/lean-uprove:latest --help\n```\n\n**Installation Script:**\n```bash\n# Linux/macOS\ncurl -fsSL https://raw.githubusercontent.com/fraware/lean-uprove/main/scripts/install.sh | bash\n\n# Windows\ncurl -fsSL https://raw.githubusercontent.com/fraware/lean-uprove/main/scripts/install.bat -o install.bat\ninstall.bat\n```\n\n**From Source:**\n```bash\ngit clone https://github.com/fraware/lean-uprove.git\ncd lean-uprove\nmake dev \u0026\u0026 make run\n```\n\n### Quick Test\n\n```bash\n# Test installation\nlean-uprove validate\n\n# Run examples\nlean-uprove examples\n\n# Run benchmarks\nlean-uprove benchmark\n```\n\n### Basic Usage\n\n```lean\nimport Uprove\n\n-- Simple universal property proof\ntheorem my_proof : IsLimit (limitCone (pair X Y)) := by uprove\n\n-- With explainer mode\ntheorem explained_proof : IsLimit (limitCone (pair X Y)) := by uprove?\n\n-- With custom configuration\ntheorem configured_proof : IsLimit (limitCone (pair X Y)) := by uprove [maxSteps := 32]\n```\n\n### Add to Your Project\n\nAdd to your `lakefile.lean`:\n\n```lean\nrequire uprove from git \"https://github.com/fraware/lean-uprove.git\"\n```\n\n## Documentation\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"33%\"\u003e\n\n### **Guides**\n- [**Quickstart**](docs/Quickstart.md) - Get up and running in 90 seconds\n- [**Cookbook**](docs/Cookbook.md) - 20 common patterns and examples\n- [**Troubleshooting**](docs/Troubleshooting.md) - Common issues and solutions\n\n\u003c/td\u003e\n\u003ctd width=\"33%\"\u003e\n\n### **Development**\n- [**CI/CD**](docs/CI-CD.md) - Continuous integration setup\n- [**Contributing**](CONTRIBUTING.md) - How to contribute\n- [**Code of Conduct**](CODE_OF_CONDUCT.md) - Community guidelines\n\n\u003c/td\u003e\n\u003ctd width=\"33%\"\u003e\n\n### **Performance**\n- **Benchmarks** - Performance metrics and comparisons\n- **Profiling** - Memory and time analysis\n- **Optimization** - Best practices for speed\n- **Architecture** - [System design and components](docs/architecture.md)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Examples\n\n### Basic Usage\n\n```lean\nimport Uprove\n\n-- Simple limit proof\ntheorem product_limit : IsLimit (limitCone (pair X Y)) := by uprove\n\n-- Colimit proof\ntheorem coproduct_colimit : IsColimit (colimitCocone (copair X Y)) := by uprove\n```\n\n### Advanced Features\n\n```lean\n-- With explainer mode (shows proof steps)\ntheorem explained_proof : IsLimit (limitCone (pair X Y)) := by uprove?\n\n-- With custom configuration\ntheorem configured_proof : IsLimit (limitCone (pair X Y)) := by \n  uprove [maxSteps := 32, timeout := 1000]\n\n-- Multiple universal properties\ntheorem multiple_goals : \n  IsLimit (limitCone (pair X Y)) ∧ IsColimit (colimitCocone (copair X Y)) := by\n  constructor\n  · uprove\n  · uprove\n```\n\n### Real-World Example\n\n```lean\n-- Complex category theory proof\ntheorem pullback_preserves_limits {C : Type*} [Category C] \n  (F : C ⥤ C) (preserves_limits : PreservesLimits F) :\n  IsLimit (F.mapCone (limitCone (pair X Y))) := by uprove\n```\n\n## API Reference\n\n### Core Tactics\n\n| Tactic | Description | Example |\n|--------|-------------|---------|\n| `by uprove` | Closes or reduces universal property goals | `theorem p : IsLimit c := by uprove` |\n| `by uprove?` | Same as above, plus human-readable proof plan | `theorem p : IsLimit c := by uprove?` |\n| `uprove [cfg]` | Interactive form with configuration options | `uprove [maxSteps := 32]` |\n\n### Attributes\n\n| Attribute | Purpose | Usage |\n|-----------|---------|-------|\n| `@[uprove]` | Register universal property lemmas | `@[uprove] theorem my_lemma : ...` |\n| `@[uprove.iso]` | Register canonical isomorphisms | `@[uprove.iso] def my_iso : ...` |\n\n### Configuration Options\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `uprove.maxSteps` | 64 | Maximum proof steps |\n| `uprove.timeout` | 2000ms | Timeout in milliseconds |\n| `uprove.simpSet` | - | Named simplification set |\n| `uprove.trace` | false | Enable tracing |\n| `uprove.strict` | false | Fail instead of fallback |\n| `uprove.fallback` | `[\"simp\", \"aesop\"]` | Fallback tactics |\n\n## Performance\n\n\u003cdiv align=\"center\"\u003e\n\n| Metric | Value | Description |\n|--------|-------|-------------|\n| **P50 Latency** | ≤ 150ms | Median response time |\n| **P95 Latency** | ≤ 800ms | 95th percentile response time |\n| **Memory Usage** | ≤ 256MB | Peak memory per process |\n| **Efficiency Gain** | ≥ 40% | Reduction in overall proof time |\n\n\u003c/div\u003e\n\n### Benchmark Results\n\n```lean\n-- Example benchmark output\nBenchmark Suite: Universal Properties\n├── Product Limits: 142ms (P50), 756ms (P95)\n├── Coproduct Colimits: 138ms (P50), 723ms (P95)\n├── Equalizers: 156ms (P50), 812ms (P95)\n└── Pullbacks: 149ms (P50), 789ms (P95)\n```\n\n## Installation\n\n### Option 1: Docker (Recommended)\n\n```bash\n# Run directly\ndocker run --rm ghcr.io/fraware/lean-uprove:latest --help\n\n# Pull and run locally\ndocker pull ghcr.io/fraware/lean-uprove:latest\ndocker run --rm ghcr.io/fraware/lean-uprove:latest test\n```\n\n### Option 2: Installation Script\n\n**Linux/macOS:**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/fraware/lean-uprove/main/scripts/install.sh | bash\n```\n\n**Windows:**\n```powershell\nInvoke-WebRequest -Uri \"https://raw.githubusercontent.com/fraware/lean-uprove/main/scripts/install.bat\" -OutFile \"install.bat\"\n.\\install.bat\n```\n\n### Option 3: From Source\n\n```bash\ngit clone https://github.com/fraware/lean-uprove.git\ncd lean-uprove\nmake dev \u0026\u0026 make run\n```\n\n### Option 4: As Dependency\n\nAdd to your `lakefile.lean`:\n\n```lean\nrequire uprove from git \"https://github.com/fraware/lean-uprove.git\"\n```\n\n### Verification\n\nAfter installation, verify everything works:\n\n```bash\n# Test installation\nlean-uprove validate\n\n# Run examples\nlean-uprove examples\n\n# Run benchmarks\nlean-uprove benchmark\n```\n\n## Development\n\n### Quick Setup\n\n```bash\n# Clone and build\ngit clone https://github.com/fraware/lean-uprove.git\ncd lean-uprove\nlake build\n\n# Run tests\nlake test\nlake exe uprove-test\n\n# Run benchmarks\nlake exe uprove-benchmark\n\n# Build documentation\nlake build docs\n```\n\n### Test Suites\n\n| Suite | Command | Description |\n|-------|---------|-------------|\n| **Core Tests** | `lake exe uprove-test-simple` | Basic functionality |\n| **Production Tests** | `lake exe uprove-test-production` | Full integration |\n| **Performance Tests** | `lake exe uprove-performance-validation` | Speed benchmarks |\n| **Real Tests** | `lake exe uprove-test-real` | Real-world scenarios |\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Quick Contribution Checklist\n\n- [ ] Fork the repository\n- [ ] Create a feature branch\n- [ ] Add tests for new functionality\n- [ ] Ensure all tests pass\n- [ ] Submit a pull request\n\n## License\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.\n\n## Support \u0026 Community\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"50%\"\u003e\n\n### **Bug Reports**\n- [GitHub Issues](https://github.com/fraware/lean-uprove/issues)\n- Include reproduction steps\n- Attach relevant logs\n\n\u003c/td\u003e\n\u003ctd width=\"50%\"\u003e\n\n### **Discussions**\n- [GitHub Discussions](https://github.com/fraware/lean-uprove/discussions)\n- Ask questions\n- Share ideas\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for detailed version history and breaking changes.\n\n## Acknowledgments\n\n\u003cdiv align=\"center\"\u003e\n\n**Built with dedication by the Lean community**\n\nBuilt on top of [**Mathlib4**](https://github.com/leanprover-community/mathlib4) • \nInspired by the **Lean 4 community** • \nThanks to all **contributors and users**\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[Back to Top](#lean-uprove)**\n\nMade with dedication for the Lean community\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraware%2Flean-uprove","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffraware%2Flean-uprove","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraware%2Flean-uprove/lists"}