Skip to content
Snippets Groups Projects
Verified Commit 590f19bb authored by Lennard Gäher's avatar Lennard Gäher
Browse files

adjust name + use new stdpp lemma

parent 588ebc4b
No related branches found
No related tags found
1 merge request!38Add lemmas used by RefinedRust
Pipeline #106214 passed
...@@ -122,7 +122,7 @@ Module Type lifetime_sig. ...@@ -122,7 +122,7 @@ Module Type lifetime_sig.
such that [m ⊓ κ'] is syntactically different from [κ]. such that [m ⊓ κ'] is syntactically different from [κ].
This is useful in conjunction with [lft_create_strong] to generate This is useful in conjunction with [lft_create_strong] to generate
fresh lifetimes when using lifetimes as keys to index into a map. *) fresh lifetimes when using lifetimes as keys to index into a map. *)
Parameter lft_fresh_strong : κ κ', i : positive, Parameter lft_fresh : κ κ', i : positive,
m : positive, (i < m)%positive (positive_to_lft m) κ' κ. m : positive, (i < m)%positive (positive_to_lft m) κ' κ.
Parameter bor_create : E κ P, Parameter bor_create : E κ P,
......
...@@ -185,21 +185,11 @@ Proof. ...@@ -185,21 +185,11 @@ Proof.
+ iRight. iFrame. iPureIntro. by apply lft_dead_in_insert_false. + iRight. iFrame. iPureIntro. by apply lft_dead_in_insert_false.
Qed. Qed.
(* TODO: remove once stdpp!562 is merged *) Lemma lft_fresh κ κ' :
Lemma lower_bound_exists `{FinSet A C} R `{!Transitive R,
x y, Decision (R x y)} `{!Inhabited A} (X : C) :
x, minimal R x X.
Proof.
destruct (set_choose_or_empty X) as [ (y & Ha) | Hne].
- edestruct (minimal_exists R X) as (x & Hel & Hmin); first set_solver.
exists x. done.
- exists inhabitant. intros y Hel. set_solver.
Qed.
Lemma lft_fresh_strong κ κ' :
i : positive, m : positive, (i < m)%positive (positive_to_lft m) κ' κ. i : positive, m : positive, (i < m)%positive (positive_to_lft m) κ' κ.
Proof. Proof.
unfold meet, lft_intersect. unfold meet, lft_intersect.
destruct (lower_bound_exists (flip Pos.le) (dom κ)) as (i & Ha). destruct (minimal_exists (flip Pos.le) (dom κ)) as (i & Ha).
exists (i + 1)%positive. exists (i + 1)%positive.
intros k Hik Heq. subst κ. intros k Hik Heq. subst κ.
ospecialize (Ha k _ _); simpl in *; [ | lia..]. ospecialize (Ha k _ _); simpl in *; [ | lia..].
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment