Use `SProp` to obtain better definitional equality for `pmap`, `gmap`, `gset`, `Qp`, and `coPset`
Compare changes
Files
6- Robbert Krebbers authored
1. Improve naming 2. Make `wf_` proofs of `gmap` and `pmap` opaque 3. Avoid `bind` and `fmap` combinators for `SProp` 4. Drop `simpl` tests Items 2-3 are crucial for performance, otherwise each operation checks if the map is still well-formed, which destroys log(n) complexity of map operations. Why 3 is needed is subtle: The `bind` and `fmap` lemmas for `SProp` contain Booleans as implicit arguments, which are eagerly evaluated by `vm_compute`. As a result of 2-3, `simpl` will not normalize proofs to `stt`, and `simpl` tests do not give a desirable result.
+ 227
− 94
@@ -721,77 +721,109 @@ Qed.
@@ -804,56 +836,141 @@ Notation "(<)" := Qp_lt (only parsing) : Qp_scope.
@@ -861,23 +978,31 @@ Proof.
@@ -898,11 +1023,11 @@ Proof.
@@ -931,13 +1056,13 @@ Qed.
@@ -989,7 +1114,7 @@ Proof.
@@ -1004,7 +1129,8 @@ Proof. intros. etrans; [by apply Qp_add_lt_mono_l|by apply Qp_add_lt_mono_r]. Qe
@@ -1013,7 +1139,8 @@ Proof. intros. etrans; [by apply Qp_mul_le_mono_l|by apply Qp_mul_le_mono_r]. Qe
@@ -1022,8 +1149,9 @@ Proof. intros. etrans; [by apply Qp_mul_lt_mono_l|by apply Qp_mul_lt_mono_r]. Qe
@@ -1043,24 +1171,23 @@ Proof. apply Qp_lt_le_incl, Qp_lt_add_r. Qed.
@@ -1232,19 +1359,25 @@ Lemma Qp_min_r_iff q p : q `min` p = p ↔ p ≤ q.