feat: port bi/Algebra - #663
Conversation
| `(tactic| simp only [Iris.SiProp.pure_holds, Iris.SiProp.and_holds, Iris.SiProp.or_holds, | ||
| Iris.SiProp.sep_holds, Iris.SiProp.exists_holds, Iris.SiProp.forall_holds, | ||
| Iris.SiProp.later_holds_zero, Iris.SiProp.later_holds_succ, | ||
| Iris.SiProp.internalEq_holds, Iris.SiProp.cmraValid_holds, Iris.siPure_holds]) |
There was a problem hiding this comment.
Instead of the hard coded simp only list, I would use a custom simp attribute defined with register_simp_attr. This makes it easier to extend this list.
See wp_expr_simp for an example.
(Not sure if this approach also works for sbi_fold. The p parameter might prevent one from using a custom simp attribute there.)
There was a problem hiding this comment.
Yes, I think I might roll sbi_unfold into this PR and just do it properly. Finally an occasion to learn about simpprocs.
| theorem biEntails_of_iff {P Q : SiProp} (h : ∀ n, P.holds n ↔ Q.holds n) : P ⊣⊢ Q := | ||
| ⟨fun n => (h n).mp, fun n => (h n).mpr⟩ | ||
|
|
||
| @[simp] theorem pure_holds {φ : Prop} {n} : (iprop(⌜φ⌝) : SiProp).holds n ↔ φ := .rfl |
There was a problem hiding this comment.
Would it be okay to add those to simpset as well instead of adding a simp attribute?
There was a problem hiding this comment.
Probably a good idea. I'm going to redo the automation around sbi this morning and will re-request after.
|
OK, I changed this PR to use a simp set for the sbi unfolding. It doesn't fully replicate Rocq's |
Description
Finishes
Algebra.v.There are some lightweight tactics for dealing with
sbisimplifications.sbi_unfold.vdoes this in Rocq, I'm not sure I understand what they're doing enough to determine if we should replicate them or ignore them. The tactics here seem to work alright. Polling you guys for your thoughts @Kaptch @MackieLoeffel. By your reading, is it doing anything that asimpset could not?Checklist
authorssection of any appropriate filesGenerative AI Guidelines
AI assistance is permitted when making contributions to Iris-Lean, however, generative AI systems tend to produce code which takes a long time to review.
Please carefully review your code to ensure it meets the following standards.
havestatements that do not aid readability or code reuse should be inlined.In our experience, a good place to begin refactoring is by re-arranging and combining independent tactic invocations.
We also find that pointing generative AI systems to the Mathlib code style guidelines can help them perform some of this refactoring work.