phanerozoic/Coq-Iris huggingface dataset:
(* iris/bi/extensions.v *)
Class BiPositive (PROP : bi)
:=
  bi_positive (P Q : PROP) : <affine> (P ∗ Q) ⊢ <affine> P ∗ Q.
(* iris/bi/extensions.v *)
(* The class [BiLöb] is required for the [iLöb] tactic. However, for most BI
logics the class [Sbi] should be used, which gives an instance of [BiLöb]
automatically (see [derived_laws_later]). A direct instance of [BiLöb] is useful
when considering a BI logic with a discrete OFE, instead of an OFE that takes
step-indexing of the logic in account.

The internal/"strong" version of Löb [(▷ P → P) ⊢ P] is derivable from [BiLöb].
It is provided by the lemma [löb] in [derived_laws_later]. *)
Class BiLöb (PROP : bi)
:=
  löb_weak (P : PROP) : (▷ P ⊢ P) → (True ⊢ P).
(* iris/bi/extensions.v *)
(* One should not instantiate this class, and instead provide an instance of
[Sbi], from which one gets an instance of [BiLaterContractive] for free. *)
Class BiLaterContractive (PROP : bi)
:=
  #[global] later_contractive :: Contractive (bi_later (PROP:=PROP)).
(* iris/bi/extensions.v *)
(* The class [BiPersistentlyForall] states that universal quantification
commutes with the persistently modality. The reverse direction of the entailment
described by this type class is derivable, so it is not included. *)
Class BiPersistentlyForall (PROP : bi)
:=
  persistently_forall_2 : ∀ {A} (Ψ : A → PROP), (∀ a, <pers> (Ψ a)) ⊢ <pers> (∀ a, Ψ a).
(* iris/bi/extensions.v *)
(* The class [BiPureForall] states that universal quantification commutes with
the embedding of pure propositions. The reverse direction of the entailment
described by this type class is derivable, so it is not included.

An instance of [BiPureForall] itself is derivable if we assume excluded middle
in Coq, see the lemma [bi_pure_forall_em] in [derived_laws]. *)
Class BiPureForall (PROP : bi)
:=
  pure_forall_2 : ∀ {A} (φ : A → Prop), (∀ a, ⌜ φ a ⌝) ⊢@{PROP} ⌜ ∀ a, φ a ⌝.
(* iris/bi/interface.v *)
Notation "'emp'"
:= bi_emp : bi_scope.
(* iris/bi/interface.v *)
Notation "'True'"
:= (bi_pure True) : bi_scope.
(* iris/bi/interface.v *)
Notation "'False'"
:= (bi_pure False) : bi_scope.
(* iris/bi/interface.v *)
Notation "'⌜' φ '⌝'"
:= (bi_pure φ%type%stdpp) : bi_scope.
(* iris/bi/interface.v *)
Notation "∀ x .. y , P"
:=
    (bi_forall _ (λ x, .. (bi_forall _ (λ y, P%I)) ..)) : bi_scope.
(* iris/bi/interface.v *)
Notation "∃ x .. y , P"
:=
    (bi_exist _ (λ x, .. (bi_exist _ (λ y, P%I)) ..)) : bi_scope.
(* iris/bi/interface.v *)
(* The following axioms are satisifed by both affine and linear BIs, and BIs
  that combine both kinds of resources. In particular, we have an "ordered RA"
  model satisfying all these axioms. For this model, we extend RAs with an
  arbitrary partial order, and up-close resources wrt. that order (instead of
  extension order).  We demand composition to be monotone wrt. the order: [x1 ≼
  x2 → x1 ⋅ y ≼ x2 ⋅ y].  We define [emp := λ r, ε ≼ r]; persistently is still
  defined with the core: [persistently P := λ r, P (core r)].  This is uplcosed
  because the core is monotone. *)
Record BiMixin
:= {
    bi_mixin_entails_po : PreOrder bi_entails;
    bi_mixin_equiv_entails P Q : (P ≡ Q) ↔ (P ⊢ Q) ∧ (Q ⊢ P);

    (** Non-expansiveness *)
    bi_mixin_pure_ne n : Proper (iff ==> dist n) bi_pure;
    bi_mixin_and_ne : NonExpansive2 bi_and;
    bi_mixin_or_ne : NonExpansive2 bi_or;
    bi_mixin_impl_ne : NonExpansive2 bi_impl;
    bi_mixin_forall_ne A n :
      Proper (pointwise_relation _ (dist n) ==> dist n) (bi_forall A);
    bi_mixin_exist_ne A n :
      Proper (pointwise_relation _ (dist n) ==> dist n) (bi_exist A);
    bi_mixin_sep_ne : NonExpansive2 bi_sep;
    bi_mixin_wand_ne : NonExpansive2 bi_wand;

    (** Higher-order logic *)
    bi_mixin_pure_intro (φ : Prop) P : φ → P ⊢ ⌜ φ ⌝;
    bi_mixin_pure_elim' (φ : Prop) P : (φ → True ⊢ P) → ⌜ φ ⌝ ⊢ P;

    bi_mixin_and_elim_l P Q : P ∧ Q ⊢ P;
    bi_mixin_and_elim_r P Q : P ∧ Q ⊢ Q;
    bi_mixin_and_intro P Q R : (P ⊢ Q) → (P ⊢ R) → P ⊢ Q ∧ R;

    bi_mixin_or_intro_l P Q : P ⊢ P ∨ Q;
    bi_mixin_or_intro_r P Q : Q ⊢ P ∨ Q;
    bi_mixin_or_elim P Q R : (P ⊢ R) → (Q ⊢ R) → P ∨ Q ⊢ R;

    bi_mixin_impl_intro_r P Q R : (P ∧ Q ⊢ R) → P ⊢ Q → R;
    bi_mixin_impl_elim_l' P Q R : (P ⊢ Q → R) → P ∧ Q ⊢ R;

    bi_mixin_forall_intro {A} P (Ψ : A → PROP) : (∀ a, P ⊢ Ψ a) → P ⊢ ∀ a, Ψ a;
    bi_mixin_forall_elim {A} {Ψ : A → PROP} a : (∀ a, Ψ a) ⊢ Ψ a;

    bi_mixin_exist_intro {A} {Ψ : A → PROP} a : Ψ a ⊢ ∃ a, Ψ a;
    bi_mixin_exist_elim {A} (Φ : A → PROP) Q : (∀ a, Φ a ⊢ Q) → (∃ a, Φ a) ⊢ Q;

    (** BI connectives *)
    bi_mixin_sep_mono P P' Q Q' : (P ⊢ Q) → (P' ⊢ Q') → P ∗ P' ⊢ Q ∗ Q';
    bi_mixin_emp_sep_1 P : P ⊢ emp ∗ P;
    bi_mixin_emp_sep_2 P : emp ∗ P ⊢ P;
    bi_mixin_sep_comm' P Q : P ∗ Q ⊢ Q ∗ P;
    bi_mixin_sep_assoc' P Q R : (P ∗ Q) ∗ R ⊢ P ∗ (Q ∗ R);
    bi_mixin_wand_intro_r P Q R : (P ∗ Q ⊢ R) → P ⊢ Q -∗ R;
    bi_mixin_wand_elim_l' P Q R : (P ⊢ Q -∗ R) → P ∗ Q ⊢ R;
  }.
(* iris/bi/interface.v *)
Notation "'<pers>' P"
:= (bi_persistently P) : bi_scope.
(* iris/bi/interface.v *)
Record BiPersistentlyMixin
:= {
    bi_mixin_persistently_ne : NonExpansive bi_persistently;

    (* In the ordered RA model: Holds without further assumptions. *)
    bi_mixin_persistently_mono P Q : (P ⊢ Q) → <pers> P ⊢ <pers> Q;
    (* In the ordered RA model: `core` is idempotent *)
    bi_mixin_persistently_idemp_2 P : <pers> P ⊢ <pers> <pers> P;

    (* In the ordered RA model: [ε ≼ core x]. *)
    bi_mixin_persistently_emp_2 : emp ⊢ <pers> emp;

    (* The laws of a "frame" (https://ncatlab.org/nlab/show/frame, not to be
    confused with separation logic terminology): commuting with finite
    conjunction and infinite disjunction.
    The null-ary case, [persistently_True : True ⊢ <pers> True], is derivable from the
    other laws. *)
    bi_mixin_persistently_and_2 (P Q : PROP) :
      (<pers> P) ∧ (<pers> Q) ⊢ <pers> (P ∧ Q);
    bi_mixin_persistently_exist_1 {A} (Ψ : A → PROP) :
      <pers> (∃ a, Ψ a) ⊢ ∃ a, <pers> (Ψ a);

    (* In the ordered RA model: [core x ≼ core (x ⋅ y)]. *)
    bi_mixin_persistently_absorbing P Q : <pers> P ∗ Q ⊢ <pers> P;
    (* In the ordered RA model: [x ⋅ core x = x]. *)
    bi_mixin_persistently_and_sep_elim P Q : <pers> P ∧ Q ⊢ P ∗ Q;
  }.
(* iris/bi/interface.v *)
Lemma bi_persistently_mixin_discrete :
    (∀ n (P Q : PROP), P ≡{n}≡ Q → P ≡ Q) →
    (∀ {A} (Φ : A → PROP), (emp ⊢ ∃ x, Φ x) → ∃ x, emp ⊢ Φ x) →
    (∀ P : PROP, (<pers> P)%I = ⌜ emp ⊢ P ⌝%I) →
    BiMixin →
    BiPersistentlyMixin.
Proof.
    intros Hdiscrete Hex Hpers Hbi. pose proof (bi_mixin_entails_po Hbi).
    split.
    - (* [NonExpansive bi_persistently] *)
      intros n P Q [HPQ HQP]%Hdiscrete%(bi_mixin_equiv_entails Hbi).
      rewrite !Hpers. apply (bi_mixin_pure_ne Hbi). split=> ?; by etrans.
    - (*[(P ⊢ Q) → <pers> P ⊢ <pers> Q] *)
      intros P Q HPQ. rewrite !Hpers. apply (bi_mixin_pure_elim' Hbi)=> ?.
      apply (bi_mixin_pure_intro Hbi). by trans P.
    - (* [<pers> P ⊢ <pers> <pers> P] *)
      intros P. rewrite !Hpers. apply (bi_mixin_pure_elim' Hbi)=> ?.
      by do 2 apply (bi_mixin_pure_intro Hbi).
    - (* [emp ⊢ <pers> emp] *)
      rewrite Hpers. by apply (bi_mixin_pure_intro Hbi).
    - (* [<pers> P ∧ <pers> Q ⊢ <pers> (P ∧ Q)] *)
      intros P Q. rewrite !Hpers.
      apply (bi_mixin_impl_elim_l' Hbi). apply (bi_mixin_pure_elim' Hbi)=> ?.
      apply (bi_mixin_impl_intro_r Hbi).
      etrans; [apply (bi_mixin_and_elim_r Hbi)|].
      apply (bi_mixin_pure_elim' Hbi)=> ?.
      apply (bi_mixin_pure_intro Hbi). by apply (bi_mixin_and_intro Hbi).
    - (* [<pers> (∃ a, Ψ a) ⊢ ∃ a, <pers> Ψ a] *)
      intros A Φ. rewrite !Hpers. apply (bi_mixin_pure_elim' Hbi)=> /Hex [x ?].
      etrans; [|apply (bi_mixin_exist_intro Hbi x)]; simpl.
      rewrite Hpers. by apply (bi_mixin_pure_intro Hbi).
    - (* [<pers> P ∗ Q ⊢ <pers> P] *)
      intros P Q. rewrite !Hpers.
      apply (bi_mixin_wand_elim_l' Hbi). apply (bi_mixin_pure_elim' Hbi)=> ?.
      apply (bi_mixin_wand_intro_r Hbi). by apply (bi_mixin_pure_intro Hbi).
    - (* [<pers> P ∧ Q ⊢ P ∗ Q] *)
      intros P Q. rewrite !Hpers.
      apply (bi_mixin_impl_elim_l' Hbi). apply (bi_mixin_pure_elim' Hbi)=> ?.
      apply (bi_mixin_impl_intro_r Hbi).
      etrans; [apply (bi_mixin_and_elim_r Hbi)|].
      etrans; [apply (bi_mixin_emp_sep_1 Hbi)|].
      by apply (bi_mixin_sep_mono Hbi).
  Qed.
(* iris/bi/interface.v *)
Notation "▷ P"
:= (bi_later P) : bi_scope.
(* iris/bi/interface.v *)
Record BiLaterMixin
:= {
    bi_mixin_later_ne : NonExpansive bi_later;

    bi_mixin_later_mono P Q : (P ⊢ Q) → ▷ P ⊢ ▷ Q;
    bi_mixin_later_intro P : P ⊢ ▷ P;

    bi_mixin_later_forall_2 {A} (Φ : A → PROP) : (∀ a, ▷ Φ a) ⊢ ▷ ∀ a, Φ a;
    bi_mixin_later_exist_false {A} (Φ : A → PROP) :
      (▷ ∃ a, Φ a) ⊢ ▷ False ∨ (∃ a, ▷ Φ a);
    bi_mixin_later_sep_1 P Q : ▷ (P ∗ Q) ⊢ ▷ P ∗ ▷ Q;
    bi_mixin_later_sep_2 P Q : ▷ P ∗ ▷ Q ⊢ ▷ (P ∗ Q);
    bi_mixin_later_persistently_1 P : ▷ <pers> P ⊢ <pers> ▷ P;
    bi_mixin_later_persistently_2 P : <pers> ▷ P ⊢ ▷ <pers> P;

    (* In a step-index model, this law allows case distinctions on whether
       the step-index is 0 (expressed as [▷ False] in the logic):
       * If it is 0, the left side is true, and we know nothing about [P].
       * If not, then it is [S n] for some [n], and [P] holds at [n]. By down-
         closure, it also holds at [0]. Thus, we get to use [P], but only if
         the step-index is 0 ([▷ False] is true). *)
    bi_mixin_later_false_em P : ▷ P ⊢ ▷ False ∨ (▷ False → P);
  }.
(* iris/bi/interface.v *)
Lemma bi_later_mixin_id :
    (∀ (P : PROP), (▷ P)%I = P) →
    BiMixin → BiLaterMixin.
Proof.
    intros Hlater Hbi. pose proof (bi_mixin_entails_po Hbi).
    split; repeat intro; rewrite ?Hlater //.
    - apply (bi_mixin_forall_intro Hbi)=> a.
      etrans; [apply (bi_mixin_forall_elim Hbi a)|]. by rewrite Hlater.
    - etrans; [|apply (bi_mixin_or_intro_r Hbi)].
      apply (bi_mixin_exist_elim Hbi)=> a.
      etrans; [|apply (bi_mixin_exist_intro Hbi a)]. by rewrite /= Hlater.
    - etrans; [|apply (bi_mixin_or_intro_r Hbi)].
      apply (bi_mixin_impl_intro_r Hbi), (bi_mixin_and_elim_l Hbi).
  Qed.
(* iris/bi/interface.v *)
Structure bi
:= Bi {
  bi_car :> Type@{Logic};
  bi_dist : Dist bi_car;
  bi_equiv : Equiv bi_car;
  bi_entails : bi_car → bi_car → Prop;
  bi_emp : bi_car;
  bi_pure : Prop → bi_car;
  bi_and : bi_car → bi_car → bi_car;
  bi_or : bi_car → bi_car → bi_car;
  bi_impl : bi_car → bi_car → bi_car;
  bi_forall : ∀ A : Type@{Quant}, (A → bi_car) → bi_car;
  bi_exist : ∀ A : Type@{Quant}, (A → bi_car) → bi_car;
  bi_sep : bi_car → bi_car → bi_car;
  bi_wand : bi_car → bi_car → bi_car;
  bi_persistently : bi_car → bi_car;
  bi_later : bi_car → bi_car;
  bi_ofe_mixin : OfeMixin bi_car;
  bi_cofe_aux : Cofe (Ofe bi_car bi_ofe_mixin);
  bi_bi_mixin : BiMixin bi_entails bi_emp bi_pure bi_and bi_or bi_impl bi_forall
                        bi_exist bi_sep bi_wand;
  bi_bi_persistently_mixin :
    BiPersistentlyMixin bi_entails bi_emp bi_and bi_exist bi_sep bi_persistently;
  bi_bi_later_mixin : BiLaterMixin bi_entails bi_pure bi_or bi_impl
                                   bi_forall bi_exist bi_sep bi_persistently bi_later;
}.
(* iris/bi/interface.v *)
Coercion bi_ofeO (PROP : bi) : ofe
:= Ofe PROP (bi_ofe_mixin PROP).
(* iris/bi/interface.v *)
(* The projection [bi_cofe_aux] is not registered as an instance because it has
the wrong type. Its result type is unfolded, i.e., [Cofe (Ofe PROP ...)], and
thus should never be used. The instance [bi_cofe] has the proper result type
[Cofe (bi_ofeO PROP)]. *)
Instance bi_cofe (PROP : bi) : Cofe PROP
:= bi_cofe_aux PROP.
(* iris/bi/interface.v *)
Instance : Params (@bi_entails) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_emp) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_pure) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_and) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_or) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_impl) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_forall) 2
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_exist) 2
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_sep) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_wand) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_persistently) 1
:= {}.
(* iris/bi/interface.v *)
Instance : Params (@bi_later) 1
:= {}.
(* iris/bi/interface.v *)
(* We set this rewrite relation's cost above the stdlib's
  ([impl], [iff], [eq], ...) and [≡] but below [⊑].
  [eq] (at 100) < [≡] (at 150) < [bi_entails _] (at 170) < [⊑] (at 200) *)
Instance bi_rewrite_relation (PROP : bi) : RewriteRelation (@bi_entails PROP) | 170
:= {}.
(* iris/bi/interface.v *)
Instance bi_inhabited {PROP : bi} : Inhabited PROP
:= populate (bi_pure True).
(* iris/bi/interface.v *)
Notation "'emp'"
:= (bi_emp) : bi_scope.
(* iris/bi/interface.v *)
Notation "(∧)"
:= bi_and (only parsing) : bi_scope.
(* iris/bi/interface.v *)
Notation "(∨)"
:= bi_or (only parsing) : bi_scope.
(* iris/bi/interface.v *)
Notation "¬ P"
:= (P → False)%I : bi_scope.
(* iris/bi/interface.v *)
Notation "(∗)"
:= bi_sep (only parsing) : bi_scope.
(* iris/bi/interface.v *)
Notation "P -∗ Q"
:= (bi_wand P Q) : bi_scope.
(* iris/bi/interface.v *)
Notation "∀ x .. y , P"
:=
  (bi_forall (λ x, .. (bi_forall (λ y, P%I)) ..)) : bi_scope.
(* iris/bi/interface.v *)
Notation "∃ x .. y , P"
:=
  (bi_exist (λ x, .. (bi_exist (λ y, P%I)) ..)) : bi_scope.
(* iris/bi/interface.v *)
Notation "P ⊢ Q"
:= (bi_entails P%I Q%I) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "P '⊢@{' PROP } Q"
:= (bi_entails (PROP:=PROP) P%I Q%I) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "(⊢)"
:= bi_entails (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "'(⊢@{' PROP } )"
:= (bi_entails (PROP:=PROP)) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "P ⊣⊢ Q"
:= (equiv (A:=bi_car _) P%I Q%I) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "P '⊣⊢@{' PROP } Q"
:= (equiv (A:=bi_car PROP) P%I Q%I) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "(⊣⊢)"
:= (equiv (A:=bi_car _)) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "'(⊣⊢@{' PROP } )"
:= (equiv (A:=bi_car PROP)) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "( P ⊣⊢.)"
:= (equiv (A:=bi_car _) P) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "(.⊣⊢ Q )"
:= (λ P, P ≡@{bi_car _} Q) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Definition bi_emp_valid {PROP : bi} (P : PROP) : Prop
:= emp ⊢ P.
(* iris/bi/interface.v *)
Notation "⊢ Q"
:= (bi_emp_valid Q%I) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "'⊢@{' PROP } Q"
:= (bi_emp_valid (PROP:=PROP) Q%I) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
(* Work around parsing issues: see [notation.v] for details. *)
Notation "'(⊢@{' PROP } Q )"
:= (bi_emp_valid (PROP:=PROP) Q%I) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "(.⊢ Q )"
:= (λ P, P ⊢ Q) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "( P ⊢.)"
:= (bi_entails P) (only parsing) : stdpp_scope.
(* iris/bi/interface.v *)
Notation "P -∗ Q"
:= (⊢ P -∗ Q) : stdpp_scope.
(* iris/bi/interface.v *)
(* About the entailment *)
Instance entails_po : PreOrder (@bi_entails PROP).
Proof. eapply bi_mixin_entails_po, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma equiv_entails P Q : P ≡ Q ↔ (P ⊢ Q) ∧ (Q ⊢ P).
Proof. eapply bi_mixin_equiv_entails, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
(* Non-expansiveness *)
Instance pure_ne n : Proper (iff ==> dist n) (@bi_pure PROP).
Proof. eapply bi_mixin_pure_ne, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Instance and_ne : NonExpansive2 (@bi_and PROP).
Proof. eapply bi_mixin_and_ne, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Instance or_ne : NonExpansive2 (@bi_or PROP).
Proof. eapply bi_mixin_or_ne, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Instance impl_ne : NonExpansive2 (@bi_impl PROP).
Proof. eapply bi_mixin_impl_ne, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Instance forall_ne A n :
  Proper (pointwise_relation _ (dist n) ==> dist n) (@bi_forall PROP A).
Proof. eapply bi_mixin_forall_ne, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Instance exist_ne A n :
  Proper (pointwise_relation _ (dist n) ==> dist n) (@bi_exist PROP A).
Proof. eapply bi_mixin_exist_ne, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Instance sep_ne : NonExpansive2 (@bi_sep PROP).
Proof. eapply bi_mixin_sep_ne, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Instance wand_ne : NonExpansive2 (@bi_wand PROP).
Proof. eapply bi_mixin_wand_ne, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Instance persistently_ne : NonExpansive (@bi_persistently PROP).
Proof. eapply bi_mixin_persistently_ne, bi_bi_persistently_mixin. Qed.
(* iris/bi/interface.v *)
(* Higher-order logic *)
Lemma pure_intro (φ : Prop) P : φ → P ⊢ ⌜ φ ⌝.
Proof. eapply bi_mixin_pure_intro, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma pure_elim' (φ : Prop) P : (φ → True ⊢ P) → ⌜ φ ⌝ ⊢ P.
Proof. eapply bi_mixin_pure_elim', bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma and_elim_l P Q : P ∧ Q ⊢ P.
Proof. eapply bi_mixin_and_elim_l, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma and_elim_r P Q : P ∧ Q ⊢ Q.
Proof. eapply bi_mixin_and_elim_r, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma and_intro P Q R : (P ⊢ Q) → (P ⊢ R) → P ⊢ Q ∧ R.
Proof. eapply bi_mixin_and_intro, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma or_intro_l P Q : P ⊢ P ∨ Q.
Proof. eapply bi_mixin_or_intro_l, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma or_intro_r P Q : Q ⊢ P ∨ Q.
Proof. eapply bi_mixin_or_intro_r, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma or_elim P Q R : (P ⊢ R) → (Q ⊢ R) → P ∨ Q ⊢ R.
Proof. eapply bi_mixin_or_elim, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma impl_intro_r P Q R : (P ∧ Q ⊢ R) → P ⊢ Q → R.
Proof. eapply bi_mixin_impl_intro_r, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma impl_elim_l' P Q R : (P ⊢ Q → R) → P ∧ Q ⊢ R.
Proof. eapply bi_mixin_impl_elim_l', bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma forall_intro {A} P (Ψ : A → PROP) : (∀ a, P ⊢ Ψ a) → P ⊢ ∀ a, Ψ a.
Proof. eapply bi_mixin_forall_intro, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma forall_elim {A} {Ψ : A → PROP} a : (∀ a, Ψ a) ⊢ Ψ a.
Proof. eapply (bi_mixin_forall_elim bi_entails), bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma exist_intro {A} {Ψ : A → PROP} a : Ψ a ⊢ ∃ a, Ψ a.
Proof. eapply bi_mixin_exist_intro, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma exist_elim {A} (Φ : A → PROP) Q : (∀ a, Φ a ⊢ Q) → (∃ a, Φ a) ⊢ Q.
Proof. eapply bi_mixin_exist_elim, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
(* BI connectives *)
Lemma sep_mono P P' Q Q' : (P ⊢ Q) → (P' ⊢ Q') → P ∗ P' ⊢ Q ∗ Q'.
Proof. eapply bi_mixin_sep_mono, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma emp_sep_1 P : P ⊢ emp ∗ P.
Proof. eapply bi_mixin_emp_sep_1, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma emp_sep_2 P : emp ∗ P ⊢ P.
Proof. eapply bi_mixin_emp_sep_2, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma sep_comm' P Q : P ∗ Q ⊢ Q ∗ P.
Proof. eapply (bi_mixin_sep_comm' bi_entails), bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma sep_assoc' P Q R : (P ∗ Q) ∗ R ⊢ P ∗ (Q ∗ R).
Proof. eapply bi_mixin_sep_assoc', bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma wand_intro_r P Q R : (P ∗ Q ⊢ R) → P ⊢ Q -∗ R.
Proof. eapply bi_mixin_wand_intro_r, bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
Lemma wand_elim_l' P Q R : (P ⊢ Q -∗ R) → P ∗ Q ⊢ R.
Proof. eapply bi_mixin_wand_elim_l', bi_bi_mixin. Qed.
(* iris/bi/interface.v *)
(* Persistently *)
Lemma persistently_mono P Q : (P ⊢ Q) → <pers> P ⊢ <pers> Q.
Proof. eapply bi_mixin_persistently_mono, bi_bi_persistently_mixin. Qed.
(* iris/bi/interface.v *)
Lemma persistently_idemp_2 P : <pers> P ⊢ <pers> <pers> P.
Proof. eapply bi_mixin_persistently_idemp_2, bi_bi_persistently_mixin. Qed.
(* iris/bi/interface.v *)
Lemma persistently_emp_2 : emp ⊢@{PROP} <pers> emp.
Proof. eapply bi_mixin_persistently_emp_2, bi_bi_persistently_mixin. Qed.
(* iris/bi/interface.v *)
Lemma persistently_and_2 (P Q : PROP) :
  ((<pers> P) ∧ (<pers> Q)) ⊢ <pers> (P ∧ Q).
Proof. eapply bi_mixin_persistently_and_2, bi_bi_persistently_mixin. Qed.
(* iris/bi/interface.v *)
Lemma persistently_exist_1 {A} (Ψ : A → PROP) :
  <pers> (∃ a, Ψ a) ⊢ ∃ a, <pers> (Ψ a).
Proof. eapply bi_mixin_persistently_exist_1, bi_bi_persistently_mixin. Qed.
(* iris/bi/interface.v *)
Lemma persistently_absorbing P Q : <pers> P ∗ Q ⊢ <pers> P.
Proof.
  eapply (bi_mixin_persistently_absorbing bi_entails), bi_bi_persistently_mixin.
Qed.
(* iris/bi/interface.v *)
Lemma persistently_and_sep_elim P Q : <pers> P ∧ Q ⊢ P ∗ Q.
Proof.
  eapply (bi_mixin_persistently_and_sep_elim bi_entails), bi_bi_persistently_mixin.
Qed.
(* iris/bi/interface.v *)
(* Later *)
Instance later_ne : NonExpansive (@bi_later PROP).
Proof. eapply bi_mixin_later_ne, bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_mono P Q : (P ⊢ Q) → ▷ P ⊢ ▷ Q.
Proof. eapply bi_mixin_later_mono, bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_intro P : P ⊢ ▷ P.
Proof. eapply bi_mixin_later_intro, bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_forall_2 {A} (Φ : A → PROP) : (∀ a, ▷ Φ a) ⊢ ▷ ∀ a, Φ a.
Proof. eapply bi_mixin_later_forall_2, bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_exist_false {A} (Φ : A → PROP) :
  (▷ ∃ a, Φ a) ⊢ ▷ False ∨ (∃ a, ▷ Φ a).
Proof. eapply bi_mixin_later_exist_false, bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_sep_1 P Q : ▷ (P ∗ Q) ⊢ ▷ P ∗ ▷ Q.
Proof. eapply bi_mixin_later_sep_1, bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_sep_2 P Q : ▷ P ∗ ▷ Q ⊢ ▷ (P ∗ Q).
Proof. eapply bi_mixin_later_sep_2, bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_persistently_1 P : ▷ <pers> P ⊢ <pers> ▷ P.
Proof. eapply (bi_mixin_later_persistently_1 bi_entails), bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_persistently_2 P : <pers> ▷ P ⊢ ▷ <pers> P.
Proof. eapply (bi_mixin_later_persistently_2 bi_entails), bi_bi_later_mixin. Qed.
(* iris/bi/interface.v *)
Lemma later_false_em P : ▷ P ⊢ ▷ False ∨ (▷ False → P).
Proof. eapply bi_mixin_later_false_em, bi_bi_later_mixin. Qed.
(* iris/bi/internal_eq.v *)
Definition internal_eq `{!Sbi PROP} {A : ofe} (a b : A) : PROP
:=
  <si_pure> siProp_internal_eq a b.
(* iris/bi/internal_eq.v *)
Instance : Params (@internal_eq) 3
:= {}.
(* iris/bi/internal_eq.v *)
Notation "( X ≡.)"
:= (internal_eq X) (only parsing) : bi_scope.
(* iris/bi/internal_eq.v *)
Notation "(.≡ X )"
:= (λ Y, Y ≡ X)%I (only parsing) : bi_scope.
(* iris/bi/internal_eq.v *)
Notation "(≡@{ A } )"
:= (internal_eq (A:=A)) (only parsing) : bi_scope.
(* iris/bi/internal_eq.v *)
(* A smart constructor for [SbiPropExtMixin] that uses the public notion [≡]
instead of the private notion [siProp_internal_eq]. See the documentation about
[SbiPropExtMixin] in [iris.bi.sbi] for more details. *)
Lemma sbi_prop_ext_mixin {PROP : bi} `{!SiEmpValid PROP} :
  (∀ P Q : PROP, <si_emp_valid> (P ∗-∗ Q) ⊢@{siPropI} P ≡ Q) →
  SbiPropExtMixin PROP _.
Proof. done. Qed.
(* iris/bi/internal_eq.v *)
Lemma prop_ext_si_emp_valid_2 P Q : <si_emp_valid> (P ∗-∗ Q) ⊢@{siPropI} P ≡ Q.
Proof. apply sbi_mixin_prop_ext_si_emp_valid_2, sbi_sbi_prop_ext_mixin. Qed.
(* iris/bi/internal_eq.v *)
Instance internal_eq_ne (A : ofe) : NonExpansive2 (@internal_eq PROP _ A).
Proof.
    intros n x x' ? y y' ?. by apply si_pure_ne, siProp_primitive.internal_eq_ne.
  Qed.
(* iris/bi/internal_eq.v *)
Instance internal_eq_proper (A : ofe) :
    Proper ((≡) ==> (≡) ==> (⊣⊢)) (@internal_eq PROP _ A).
Proof. apply (ne_proper_2 _). Qed.
(* iris/bi/internal_eq.v *)
Lemma internal_eq_refl {A : ofe} P (a : A) : P ⊢ a ≡ a.
Proof.
    rewrite (bi.True_intro P) -si_pure_pure.
    apply si_pure_mono, siProp_primitive.internal_eq_refl.
  Qed.
(* iris/bi/internal_eq.v *)
Lemma equiv_internal_eq {A : ofe} P (a b : A) : a ≡ b → P ⊢ a ≡ b.
Proof. intros ->. apply internal_eq_refl. Qed.
(* iris/bi/internal_eq.v *)
Lemma pure_internal_eq {A : ofe} (x y : A) : ⌜x ≡ y⌝ ⊢ x ≡ y.
Proof. apply bi.pure_elim'=> ->. apply internal_eq_refl. Qed.