@janno and I found that the new support for existential instantiation in iFrame (from !1017 (merged)) can sometimes instantiate existential quantifiers too eagerly for persistent facts.
Reproducing example:
RequireImportiris.bi.interface.RequireImportiris.proofmode.proofmode.Goal∀(PROP:bi)(P:nat->PROP),□P0⊢P0∗(∀n:nat,Pn-∗∃n,Pn∗⌜n=1⌝).Proof.iIntros(??)"#$".(* PROP : bi P : nat → PROP ============================ _ : P 0 --------------------------------------□ ∀ x : nat, P x -∗ ⌜0 = 1⌝ *)Abort.
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
We are still porting code. We have covered about 250 out of 2000 iFrame calls and only encountered this problem once, so far.
I think the general pattern is very common in atomic updates and related concepts. You give away resources, get them back, and then show that you still have them but with possibly changed parameters. Sometimes there are view shifts in the way when ghost state is changed in this way.
This pattern definitely appears in our specifications but not many of those ever have iFrame called on them. Our own automation's support for instantiating existentials stops at ∀ and -∗ exactly because it made goals unprovable.
IIRC iFrame lacks support for limiting how often something is framed (and where exactly), especially for pure hypotheses. For that reason I would argue for it being more careful under magic wands and ∀ instead of just leaving it.
Okay... so then it sounds like the Frame typeclass needs a new parameter to indicate whether it is below an ∃ ?
below a ∀* but that seems to be the easiest solution. It's a somewhat invasive change though.
I guess we could also do something like
ClassFrameCanInstantiateEx:Prop:=frame_can_instantiate_ex:True.ClassFrameNoInstantiateEx:Prop:=frame_no_instantiate_ex:True.HintExtern4FrameCanInstantiateEx=>lazymatchgoalwith|_:FrameNoInstantiateEx|-_=>fail||-_=>exactIend:typeclass_instances.(* The frame instance for ∃ should also require a [FrameCanInstantiateEx] instance *)GlobalInstanceframe_exist...:FrameCanInstantiateEx→...→FramepP(∃a,Φa)....(* The frame instance for ∀, -∗ and → should introduce a [FrameNoInstantiateEx] into the context *)GlobalInstanceframe_wandpPLRQ:(FrameNoInstantiateEx→FramepPRQ)→FramepP(L-∗R)(L-∗Q).