Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
03aab1e
feat: coPset, gset, and namespace infrastructure for invariant masks
hxrts Jan 29, 2026
0a93484
Add FiniteMap interface
lzy0505 Jan 25, 2026
38be6cf
Clean up list lemmas
lzy0505 Jan 25, 2026
3f8c3c9
Add code
lzy0505 Jan 26, 2026
401e1b2
Clean up BigOpL
lzy0505 Jan 26, 2026
1ec8d51
Fix build
lzy0505 Jan 26, 2026
25c725a
Clean up BigOpM
lzy0505 Jan 26, 2026
fc35915
feat: Add BI-level big separating conjunction
hxrts Jan 29, 2026
81756e0
feat: Auth CMRA with updates and functors
hxrts Jan 29, 2026
828880c
feat: Complete Heap and HeapView functor proofs
hxrts Jan 29, 2026
f98261d
feat: Add world satisfaction (wsat) stubs
hxrts Jan 29, 2026
0e60997
feat: Complete world satisfaction (wsat) proofs
hxrts Jan 30, 2026
9d54264
feat: Add fancy update modality (fupd) stubs
hxrts Jan 30, 2026
cdf133b
feat: Complete fancy update modality (fupd) proofs
hxrts Jan 30, 2026
ab53ff7
feat: Add invariants stubs
hxrts Jan 30, 2026
5561b96
feat: Complete invariants proofs (inv_alloc, inv_acc, inv_alter, inv_…
hxrts Jan 30, 2026
f6e84a6
feat: Add cancelable invariants stubs
hxrts Jan 30, 2026
0392175
Complete cancelable invariants
hxrts Jan 31, 2026
2b4e836
Mark cancelable invariants ported
hxrts Jan 31, 2026
6c3584e
Complete cancelable invariant lemmas
hxrts Jan 31, 2026
9c0065d
feat: Add weakest precondition stubs (PR H)
hxrts Jan 31, 2026
f1816ae
Complete WP and language port
hxrts Jan 31, 2026
e671462
feat: Complete weakest precondition proofs (PR H)
hxrts Feb 1, 2026
8801d16
feat: Add evaluation context language stubs (PR I)
hxrts Feb 1, 2026
bd5525f
feat: Complete evaluation context language proofs (PR I)
hxrts Feb 1, 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
51 changes: 25 additions & 26 deletions PORTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [ ] `agree.v`
- [x] CMRA
- [x] Functors
- [ ] `auth.v`
- [ ] CMRA
- [ ] Updates
- [ ] Functors
- [ ] `big_op.v`
- TBD (Zongyuan?)
- [x] `auth.v`
- [x] CMRA
- [x] Updates
- [x] Functors
- [x] `big_op.v`
- [x] `bigOpL`, `bigOpM` definitions and lemmas
- [ ] `cmra.v`
- [x] Lemmas
- [ ] Total CMRA construction
Expand All @@ -33,8 +33,8 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [x] Isomorphisms
- [ ] `cmra_big_op.v`
- [ ] `coPset.v`
- [ ] coPset definition
- [ ] CMRA
- [x] coPset definition
- [x] CMRA
- [x] `cofe_solver.v`
- [ ] `csum.v`
- [ ] CMRA
Expand All @@ -54,15 +54,15 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [ ] `functions.v` (nb. contained in `CMRA.lean`)
- [x] CMRA
- [ ] Updates
- [ ] `gmap.v` (nb. generalized in `Heap.lean`)
- [x] `gmap.v` (nb. generalized in `Heap.lean`)
- [x] CMRA
- [ ] Updates
- [ ] Functors
- [x] Functors
- [ ] `gmultiset.v`
- [ ] CMRA
- [ ] Updates
- [ ] `gset.v`
- [ ] CMRA
- [x] CMRA
- [ ] Updates
- [ ] `list.v`
- Is this an instance of the `Heap` CMRA?
Expand All @@ -72,7 +72,7 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [ ] `max_prefix_list.v`
- [ ] Lemmas
- [ ] Functors
- [ ] `monoid.v`
- [x] `monoid.v`
- [ ] `mra.v`
- [x] `numbers.v`
- [ ] `ofe.v`
Expand Down Expand Up @@ -111,10 +111,10 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [ ] `vector.v`
- [ ] CMRA
- [ ] Functors
- [ ] `view.v`
- [x] `view.v`
- [x] CMRA
- [x] Updates
- [ ] Functors
- [x] Functors
- [ ] `lib/dfrac_agree.v`
- [ ] Lemmas
- [ ] Updates
Expand All @@ -126,10 +126,10 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [ ] Lemmas
- [ ] Updates
- [ ] Functors
- [ ] `lib/gmap_view.v` (nb. generalized in `HeapView.lean`)
- [x] `lib/gmap_view.v` (nb. generalized in `HeapView.lean`)
- [x] CMRA
- [x] Updates
- [ ] Functors
- [x] Functors
- [ ] `lib/gset_bij.v`
- [ ] `lib/mono_Z.v` (nb. generalize to `MonoNumbers.lean`)
- [ ] `lib/mono_list.v`
Expand Down Expand Up @@ -163,18 +163,18 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [x] Later lemmas
- [x] Update lemmas
- [ ] `lib/boxes.v`
- [ ] `lib/cancelable_invariants.v`
- [x] `lib/cancelable_invariants.v`
- [ ] `lib/fancy_updates.v`
- [ ] FUpd instance
- [ ] Soundness
- [x] FUpd instance
- [x] Soundness
- [ ] ProofMode instances
- [ ] `lib/fancy_updates_from_vs.v`
- [ ] `lib/gen_heap.v`
- [ ] `lib/gen_inv_heap.v`
- [ ] `lib/ghost_map.v`
- [ ] `lib/ghost_var.v`
- [ ] `lib/gset_bij.v`
- [ ] `lib/invariants.v`
- [x] `lib/invariants.v`
- [ ] `lib/iprop.v`
- [x] Definition
- [ ] subG
Expand All @@ -192,14 +192,15 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [ ] `lib/proph_map.v`
- [ ] `lib/saved_prop.v`
- [ ] `lib/token.v`
- [ ] `lib/wsat.v`
- [x] `lib/wsat.v`

## BI

- [ ] `algebra.v`
- `ascii.v`
- [x] `bi.v`
- [ ] `big_op.v`
- [x] `big_op.v`
- [x] `big_sepL`, `big_sepM` definitions and lemmas
- [ ] `cmra.v`
- [x] `derived_connectives.v`
- [ ] `derived_laws.v`
Expand Down Expand Up @@ -231,7 +232,7 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p
- [ ] `updates.v`
- [x] FUpd class
- [ ] Big op lemmas
- [ ] `weakestpre.v`
- [x] `weakestpre.v`
- [ ] `lib/atomic.v`
- [ ] `lib/core.v`
- [ ] `lib/counterexamples.v`
Expand Down Expand Up @@ -422,8 +423,6 @@ Some porting tasks will require other tasks as dependencies, the GitHub issues p

- Program Logic
- Final decisions about what to port from this folder have not been made yet.
- [ ] `language.v`
- [x] `language.v`
- [ ] `ectx_language.v`
- [ ] `ectxi_language.v`


42 changes: 42 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
description = "Iris - Separation logic in Lean 4";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };

nativeBuildInputs = with pkgs; [
elan
];

buildInputs =
with pkgs;
lib.optionals stdenv.isDarwin [
libiconv
];

in
{
devShells.default = pkgs.mkShell {
inherit nativeBuildInputs buildInputs;

shellHook = ''
echo "Iris development environment"
echo "Lean: $(elan show 2>/dev/null | head -1 || echo 'not configured')"
'';
};
}
);
}
4 changes: 4 additions & 0 deletions src/Iris/Algebra.lean
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Iris.Algebra.Agree
import Iris.Algebra.CMRA
import Iris.Algebra.COFESolver
import Iris.Algebra.CoPset
import Iris.Algebra.DFrac
import Iris.Algebra.Excl
import Iris.Algebra.Frac
Expand All @@ -13,3 +14,6 @@ import Iris.Algebra.UPred
import Iris.Algebra.Heap
import Iris.Algebra.View
import Iris.Algebra.HeapView
import Iris.Algebra.Auth
import Iris.Algebra.Monoid
import Iris.Algebra.BigOp
6 changes: 3 additions & 3 deletions src/Iris/Algebra/Agree.lean
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/-
Copyright (c) 2025 Leo Stefanesco. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leo Stefanesco
Authors: Leo Stefanesco, Puming Liu
-/

import Iris.Algebra.CMRA
Expand Down Expand Up @@ -349,7 +349,7 @@ section agree_map

variable {α β} [OFE α] [OFE β] {f : α → β} [hne : OFE.NonExpansive f]

local instance : OFE.NonExpansive (Agree.map' f) where
instance : OFE.NonExpansive (Agree.map' f) where
ne := by
intro n x₁ x₂ h
simp only [Agree.map', Agree.dist_def, Agree.dist, List.mem_map, forall_exists_index, and_imp,
Expand Down Expand Up @@ -411,7 +411,7 @@ abbrev AgreeRF (F : COFE.OFunctorPre) : COFE.OFunctorPre :=

instance {F} [COFE.OFunctor F] : RFunctor (AgreeRF F) where
map f g := Agree.map (COFE.OFunctor.map f g)
map_ne.ne _ _ _ Hx _ _ Hy _ := Agree.map_ne <| COFE.OFunctor.map_ne.ne Hx Hy
map_ne.ne _ _ _ Hx _ _ Hy _ := Agree.map_ne <| COFE.OFunctor.map_ne.ne Hx Hy
map_id x := by
conv=> right; rw [<- (Agree.map_id x)]
exact (Agree.map_id x) ▸ Agree.agree_map_ext COFE.OFunctor.map_id
Expand Down
Loading