Make Texan triples persistent - #568
Conversation
|
|
|
I think that a |
|
I implemented the The issue with the term notation is that it requires one to specify the |
|
I rebased the last two commits from your branch onto my branch. |
| meta def wpTexanTripleTerm : Lean.Macro | ||
| | `({{ $P:term }} $wpExpr {{ $[$[$xs]* ,]? RET $pat ; $Q:term }}) => do | ||
|
|
||
| let transform (xs : Array (TSyntax [`Lean.binderIdent, `Lean.Parser.Term.bracketedBinder])) : MacroM <| TSyntaxArray [`ident, `Lean.Parser.Term.hole, `Lean.Parser.Term.bracketedBinder] := |
There was a problem hiding this comment.
Instead of duplicating this code, can we just desugar this to ⊢ {{ ... }} ... {{ ... }} and then continue elaboration there?
There was a problem hiding this comment.
You mean have two separate macros
{{ .. }} .. {{ .. }}=>⊢ term({{ .. }} .. {{ .. }})term({{ ... }} ... {{ ... }})=>∀ Φ, $P -∗ ▷ $k -∗ (WP $wpExpr {{ Φ }}), this one without a□
?
There was a problem hiding this comment.
I don't know if term(iprop(_)) => _ would trigger beforehand, maybe we need to translate the first one into BI.Entails iprop(emp) term({{ .. }} .. {{ .. }}) to prevent this.
There was a problem hiding this comment.
No, my idea idea was
- {{ .. }} .. {{ .. }} => ⊢ iprop({{ .. }} .. {{ .. }})
- iprop({{ ... }} ... {{ ... }}) => □ ∀ Φ, $P -∗ ▷ $k -∗ (WP $wpExpr {{ Φ }})
But this adds the □ also for the term notation. Not sure if there is a way to avoid this.
There was a problem hiding this comment.
Alternatively, we can just extract the shared code to a function that is used by both macros.
Description
Make Texan triples persistent because they really should be.
I have noticed that Rocq Iris defines triples with
□inbi_scope, but without it instdpp_scope. But what is thestdpp_scope?Checklist
authorssection of any appropriate files