Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5ec2bfd
add mathlib dependency, update lean version, todo: fix build errors
alexanderlhicks Aug 7, 2025
7b500b0
update README
quangvdao Aug 7, 2025
dc2a964
Merge branch 'master' of https://github.com/Verified-zkEVM/iris-lean …
quangvdao Aug 7, 2025
55f0cce
pin mathlib to v4.21.0
quangvdao Aug 7, 2025
5c1d7a0
add sync upstream workflow
quangvdao Aug 7, 2025
2e405eb
add AI review workflow
quangvdao Aug 7, 2025
db00e96
add review python file and requirements text file
quangvdao Aug 7, 2025
cba37b5
Merge pull request #1 from Verified-zkEVM/update_lean
quangvdao Aug 7, 2025
572cc3b
port over bluebell stuff from VCV-io (#2)
quangvdao Aug 7, 2025
f3bf259
feat: add original paper (#3)
quangvdao Sep 5, 2025
d864c9b
feat: refactor of `Basic.lean` (#4)
quangvdao Sep 6, 2025
7367460
fixes
quangvdao Sep 6, 2025
35b2689
pr summary workflow
alexanderlhicks Sep 16, 2025
4d7f21d
clean up lingering issues experiment
alexanderlhicks Sep 16, 2025
f1958c2
Merge pull request #239 from Verified-zkEVM/pr_workflow
alexanderlhicks Sep 17, 2025
146745b
Merge remote-tracking branch 'leanprover-community/master'
alexanderlhicks Oct 29, 2025
291ceea
rm repeated header in readme
alexanderlhicks Oct 29, 2025
077d7e8
bump mathlib dependency to 4.24
alexanderlhicks Oct 29, 2025
906d01e
update lakefile / mathlib dependency format
alexanderlhicks Oct 29, 2025
b0808a9
forgot manifest, oops
alexanderlhicks Oct 29, 2025
55b500b
Prove wp conseq (#241)
pirapira Nov 27, 2025
d4bea19
Prove wp_frame theorem (#242)
pirapira Dec 5, 2025
3abb282
Prove measurableSet_bot_iff_empty_or_univ (#245)
pirapira Dec 5, 2025
3a02660
Prove bot_sum and sum_bot (#246)
pirapira Dec 5, 2025
c3c7798
Prove IndependentProduct.symm and indepProduct_isSome_comm (#158, #15…
pirapira Dec 7, 2025
3fcb418
Add Bluebell to default build targets (#250)
pirapira Dec 7, 2025
5de52e5
Add UCMRA instance for resource algebra using PermissionRat (#251)
pirapira Dec 7, 2025
844e741
Merge leanprover-community/master into Verified-zkEVM/master
alexanderlhicks Dec 25, 2025
acdc023
update mathlib to 4.26
alexanderlhicks Dec 25, 2025
031e805
Port Ownership.lean to IndexedPSpPmRat
pirapira Dec 25, 2025
b8c217b
Port JointCondition.lean to IndexedPSpPmRat
pirapira Dec 25, 2025
120af0c
Add proof of indepMul_assoc
pirapira Dec 25, 2025
00a625f
More robust proof
pirapira Dec 25, 2025
40d02dc
Partial progress by Sonnet-4.5
pirapira Dec 25, 2025
eb1d3dc
More comments
pirapira Dec 25, 2025
6b484d3
Proof of isIrrelevant_compl_relevantIndices found by Opus-4.5
pirapira Dec 25, 2025
0007f94
Move lemmas
pirapira Dec 25, 2025
a8833e4
Replace local PR summary and review workflows with external actions (…
alexanderlhicks Jan 5, 2026
4b61348
Fix jointCondition upward closure and resolve LE/CMRA ambiguity
alexanderlhicks Jan 5, 2026
caa80ae
Merge pull request #256 from Verified-zkEVM/port-ownership
pirapira Jan 5, 2026
8a3045a
Merge pull request #257 from Verified-zkEVM/indepMul_assoc
pirapira Jan 5, 2026
8610fcc
Merge pull request #258 from Verified-zkEVM/sep_of_and
pirapira Jan 5, 2026
2c63965
add contributing.md
alexanderlhicks Jan 5, 2026
9426c3e
add importgraph dep
alexanderlhicks Jan 5, 2026
624546f
Update README with active development notice
alexanderlhicks Jan 8, 2026
c0f92df
Prove sep_of_and_assertTrue (#260)
pirapira Jan 20, 2026
9ed58e6
feat(148): proof for IsCoupling.symm
FawadHa1der Feb 10, 2026
815548e
feat: proofs for probabilitytheory/coupling
FawadHa1der Feb 11, 2026
41dec87
refactor: optimize coupling proofs
pirapira Feb 11, 2026
0d254ae
refactor: simplify coupling proofs by inlining compositions and using…
pirapira Feb 11, 2026
3e7b73f
Replace a congr with rfl
pirapira Feb 11, 2026
798d660
refactor: simplify extensionality proofs to rfl in coupling
pirapira Feb 11, 2026
515a090
Merge pull request #263 from FawadHa1der/coupling-proofs
pirapira Feb 11, 2026
c793b92
Sync upstream leanprover-community/iris-lean and bump to Lean 4.28.0
quangvdao Feb 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ on:
workflow_dispatch:

jobs:
cancel:
name: "Cancel Previous Runs"
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.12.1
with:
all_but_latest: true
access_token: ${{ github.token }}

build:
runs-on: ubuntu-latest

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/check-imports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check Imports

on:
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
check-imports:
name: Check Library File Imports
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Update Bluebell.lean
run: ./scripts/update-lib.sh

- name: Check that all files are imported
run: git diff --exit-code src/Bluebell.lean
21 changes: 21 additions & 0 deletions .github/workflows/pr-summary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'PR Summary'

on:
pull_request:
types: [opened, synchronize]

permissions:
contents: read
pull-requests: write

jobs:
summarize:
runs-on: ubuntu-latest
steps:
- name: Generate PR Summary
uses: alexanderlhicks/lean-summary-workflow@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
github_repository: ${{ github.repository }}
pr_number: ${{ github.event.pull_request.number }}
29 changes: 29 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: AI Code Review for Lean PRs

on:
issue_comment:
types: [created]
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request Number'
required: true
type: string

jobs:
ai_review_lean:
if: |
(github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/review') && (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER')) ||
(github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Run AI Code Review Action
uses: alexanderlhicks/lean-review-workflow@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
pr_number: ${{ github.event.issue.number || inputs.pr_number }}
150 changes: 150 additions & 0 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: Sync with Upstream

on:
schedule:
- cron: "0 9 */14 * *" # Every 14 days at 09:00 AM UTC
workflow_dispatch: # Allow manual triggering

jobs:
sync_upstream:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Add upstream remote
run: |
git remote add upstream https://github.com/leanprover-community/iris-lean.git || true
git fetch upstream

- name: Create sync branch
id: sync
run: |
BRANCH_NAME="sync-upstream-$(date +%Y-%m-%d)"
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT

# Check if there are any differences between our master and upstream master
UPSTREAM_COMMITS=$(git rev-list --count HEAD..upstream/master 2>/dev/null || echo "0")
echo "upstream_commits=$UPSTREAM_COMMITS" >> $GITHUB_OUTPUT

if [ "$UPSTREAM_COMMITS" -eq "0" ]; then
echo "No new commits from upstream. Skipping sync."
echo "needs_sync=false" >> $GITHUB_OUTPUT
exit 0
fi

echo "needs_sync=true" >> $GITHUB_OUTPUT
echo "Found $UPSTREAM_COMMITS new commits from upstream"

# Create and switch to sync branch
git checkout -b "$BRANCH_NAME"

# Attempt to merge upstream changes
if git merge upstream/master --no-edit; then
echo "merge_success=true" >> $GITHUB_OUTPUT
echo "Upstream changes merged successfully"
else
echo "merge_success=false" >> $GITHUB_OUTPUT
echo "Merge conflicts detected"
# Add all files (including conflicted ones) and commit
git add .
git commit -m "WIP: Sync with upstream - merge conflicts need resolution"
fi

- name: Push sync branch
if: steps.sync.outputs.needs_sync == 'true'
run: |
git push origin ${{ steps.sync.outputs.branch_name }}

- name: Create Pull Request
if: steps.sync.outputs.needs_sync == 'true'
uses: actions/github-script@v7
with:
script: |
const branchName = '${{ steps.sync.outputs.branch_name }}';
const mergeSuccess = '${{ steps.sync.outputs.merge_success }}' === 'true';
const upstreamCommits = '${{ steps.sync.outputs.upstream_commits }}';

let title, body;

if (mergeSuccess) {
title = `🔄 Sync with upstream (${upstreamCommits} commits)`;
body = `## Upstream Sync

This PR automatically syncs changes from \`leanprover-community/iris-lean\`.

### Changes
- **${upstreamCommits}** new commits from upstream
- No merge conflicts detected ✅

### Next Steps
- Review the changes
- Run tests to ensure compatibility
- Merge when ready

---
*This PR was created automatically by the sync-upstream workflow.*`;
} else {
title = `⚠️ Sync with upstream (${upstreamCommits} commits) - Conflicts Need Resolution`;
body = `## Upstream Sync - Manual Resolution Required

This PR automatically syncs changes from \`leanprover-community/iris-lean\`, but **merge conflicts were detected** and need manual resolution.

### Changes
- **${upstreamCommits}** new commits from upstream
- ⚠️ Merge conflicts detected - manual resolution required

### Next Steps
1. Check out this branch locally: \`git checkout ${branchName}\`
2. Resolve merge conflicts in the affected files
3. Commit the resolved changes
4. Push the updates: \`git push origin ${branchName}\`
5. Review and merge this PR

### Commands to resolve locally:
\`\`\`bash
git checkout ${branchName}
# Resolve conflicts in your editor
git add .
git commit -m "Resolve merge conflicts from upstream sync"
git push origin ${branchName}
\`\`\`

---
*This PR was created automatically by the sync-upstream workflow.*`;
}

const { data: pr } = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: title,
head: branchName,
base: 'master',
body: body
});

console.log(`Created PR #${pr.number}: ${pr.html_url}`);

// Add labels based on merge status
const labels = ['upstream-sync'];
if (!mergeSuccess) {
labels.push('merge-conflicts');
}

await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: labels
});
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
/.lake
/.claude
/.cursor

# LaTeX compilation files
*.aux
*.bbl
*.blg
*.fdb_latexmk
*.fls
*.log
*.out
*.synctex.gz
*.synctex(busy)

# Generated paper PDF
paper/paper.pdf

.DS_Store.gemini_tmp/
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing to Iris-Lean

We enthusiastically welcome contributions to this fork of Iris-Lean!

This project aims to develop the [Bluebell](https://arxiv.org/abs/2402.18708) program logic on top of Iris. Whether you are fixing bugs, improving documentation, or adding new formalizations, your input is valuable. We particularly encourage contributions that address:

* **Active formalizations:** Please see the [Bluebell paper](https://arxiv.org/abs/2402.18708) for the theoretical foundations and goals of this project.
* **Open Issues:** Please see the list of open issues for bugs, requested features, and specific formalization tasks. Issues tagged as `good first issue` or `help wanted` are great places to start.
* **Documentation:** Documentation is actively being worked on.

If you are interested in contributing but unsure where to begin, please get in touch via the [Iris-Lean Zulip channel](https://leanprover.zulipchat.com/#narrow/channel/490604-iris-lean).

### Large Contributions

For substantial contributions, such as formalizing a new section of the Bluebell logic, we strongly encourage aligning with the paper first.

* **Bluebell Paper:** The [Bluebell paper](https://arxiv.org/abs/2402.18708) acts as the primary specification (or "blueprint") for this project.
* It outlines the definitions, theorems, and logical rules we aim to formalize.
* Please verify that your contributions match the definitions and theorems presented in the paper.
* **Process:** Please open a new discussion or issue to propose your planned contribution and discuss how it fits into the existing formalization before starting implementation.

### Style Guide

Iris-Lean aims to align closely with the established conventions of the Lean community, particularly those used in `mathlib`.
Please follow the [mathlib Style Guide](https://github.com/leanprover-community/mathlib4/blob/master/CONTRIBUTING.md#style-guide-and-conventions).
This covers naming conventions, proof style, formatting, and more.

Adhering to this style guide ensures consistency across the library, making it easier for everyone to read, understand, and maintain the code. Please ensure your code compiles and follows these standards.

#### Citation Standards

When referencing papers in Lean docstrings:

* **Use citation keys in text**: Reference papers with citation keys (e.g., `[Bluebell24]`) rather than full titles or URLs.

* **Include a References section**: Each file that cites papers should have a `## References` section in its docstring header.

## Code of Conduct

To ensure a welcoming and collaborative environment, this project follows the principles outlined in the [mathlib Code of Conduct](https://github.com/leanprover-community/mathlib4/blob/master/CODE_OF_CONDUCT.md).

By participating in this project (e.g., contributing code, opening issues, commenting in discussions), you agree to abide by its terms. Please treat fellow contributors with respect. Unacceptable behavior can be reported to the project maintainers.

## Licensing

This project is licensed under the terms of the Apache License 2.0 license. The full license text can be found in the [LICENSE](LICENSE) file.

By contributing to Iris-Lean, you agree that your contributions will be licensed under this same license. Ensure you are comfortable with these terms before submitting contributions.
Loading
Loading