leanprover-community / iris-lean Goto Github PK
View Code? Open in Web Editor NEWLean 4 port of Iris, a higher-order concurrent separation logic framework
License: Apache License 2.0
Lean 4 port of Iris, a higher-order concurrent separation logic framework
License: Apache License 2.0
Currently, the proof that the length of the hypothesis mask is equal to the length of the spatial context in the implementation of isplit
(Tactics.lean) is required to be assigned to a separate variable first. If the proof is inlined at $h_length_eq
, the error unknown free variable
is shown.
This workaround should be removed as soon as lean4/#1415 is fixed.
let h_length_eq ← ``(by show $(quote mask.length) = $(quote lₛ) ; decide)
try evalTactic (← `(tactic|
first
| refine tac_sep_split $(quote mask) $h_length_eq _ ?Sep.left ?Sep.right
| fail
))
Currently, the bidirectional entailment ⊣⊢
is defined as equality in order to use Lean's rw
tactic to rewrite with bidirectional entailments in proofs inside the framework (e.g. in proofs of the derived laws).
https://github.com/larsk21/iris-lean/blob/bde762e5d24b2f3777b8c950dc5857b2e8f4f9c6/src/Iris/BI/DerivedConnectives.lean#L7
This requires the axiom equiv_entails
, stating that equality is equal to entailments in both directions, which is used to resolve a bidirectional entailment (using an instance of AntiSymm
).
https://github.com/larsk21/iris-lean/blob/bde762e5d24b2f3777b8c950dc5857b2e8f4f9c6/src/Iris/BI/Interface.lean#L108-L111
The axiom is however not true for all separation logics, which is why setoids and quotient types need to be used to instantiate the separation logic interface with such logics (see readme). This is, however, not a viable solution, since Lean's Setoid
type does not support parameterized equivalances, such as ={n}=
from the Iris separation logic.
There are at least two possible solutions:
=
to an equivalence ≡
and rewrite with that.rw'
included in this project (currently used for rewriting with preorders, such as ⊢
) to support equivalences as well. This is less prefered, since it would probably require a backtracking search and should really be part of a general solution for generalized rewriting outside of this project. Also, rw'
should be replaced with Lean's generalized rewriting in the future.see also Rewriting congruent relations
The tactic implementations need to destruct expressions (Expr
), which is currently done by hand, i.e. using methods like isAppOf
and getAppArgs
in Iris/Std/Expr.lean
. Using expression quotations would presumably simplify this process. One package to check out is quote4.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.