The implementation of Iris in Lean has a unique class of propositions
called pure. This class arises from the fact that Lean propositions
can be embedded into the logic of Iris. Any Lean proposition φ : Prop
can be turned into an Iris proposition through the pure embedding
⌜φ⌝ : IProp GF. This allows us to piggyback on much of the
functionality and theory developed for the logic of Lean. The
proposition ⌜φ⌝ is thus an Iris proposition, and we can use it as
we would any other Iris proposition.
When stating lemmas that do not depend on generic Iris propositions
mentioning GF, we have to specify the carrier type. The ascription
syntax ⊢@{IProp GF} P records that the entailment lives in the
proposition type IProp GF.
A pure proposition is then any Iris proposition P for which there
exists a Lean proposition φ, such that P ⊣⊢ ⌜φ⌝.
Pure propositions can be introduced using ipureintro. This exits
the Iris Proof Mode (discarding the spatial context) and turns the
goal into a Lean proposition.
To eliminate a pure proposition, we can use the cases pattern %name.
This moves the proposition into the non-spatial Lean context as a Lean
proposition.
It is quite easy to show that the propositions ⌜5 = 5⌝ and
⌜x = y⌝ from above are pure. However, it can become quite
burdensome for more complicated Iris propositions. Fortunately, Iris
has machinery (the IntoPure / FromPure type classes and their
instances) that identifies pure propositions automatically —
ipureintro makes use of them.
The pure embedding allows us to state an important property, namely
soundness: anything proved inside the Iris logic is as true as
anything proved in Lean. In iris-lean this is witnessed by the
soundness theorems for UPred.
⌜_⌝ turns Lean propositions into Iris propositions, while ⊢ _
turns Iris propositions into Lean propositions. These operations are
not inverses, but they are related.