Generic big operators that are no longer tied to CMRAs.
Instead, I have introduced a type class `Monoid` that is used by the big operators: Class Monoid {M : ofeT} (o : M → M → M) := { monoid_unit : M; monoid_ne : NonExpansive2 o; monoid_assoc : Assoc (≡) o; monoid_comm : Comm (≡) o; monoid_left_id : LeftId (≡) monoid_unit o; monoid_right_id : RightId (≡) monoid_unit o; }. Note that the operation is an argument because we want to have multiple monoids over the same type (for example, on `uPred`s we have monoids for `∗`, `∧`, and `∨`). However, we do bundle the unit because: - If we would not, the unit would appear explicitly in an implicit argument of the big operators, which confuses rewrite. By bundling the unit in the `Monoid` class it is hidden, and hence rewrite won't even see it. - The unit is unique. We could in principle have big ops over setoids instead of OFEs. However, since we do not have a canonical structure for bundled setoids, I did not go that way.
Showing
- _CoqProject 2 additions, 1 deletion_CoqProject
- theories/algebra/auth.v 2 additions, 1 deletiontheories/algebra/auth.v
- theories/algebra/big_op.v 493 additions, 0 deletionstheories/algebra/big_op.v
- theories/algebra/cmra.v 5 additions, 38 deletionstheories/algebra/cmra.v
- theories/algebra/cmra_big_op.v 8 additions, 564 deletionstheories/algebra/cmra_big_op.v
- theories/algebra/cmra_tactics.v 0 additions, 67 deletionstheories/algebra/cmra_tactics.v
- theories/algebra/csum.v 0 additions, 5 deletionstheories/algebra/csum.v
- theories/algebra/gmap.v 3 additions, 6 deletionstheories/algebra/gmap.v
- theories/algebra/list.v 60 additions, 0 deletionstheories/algebra/list.v
- theories/algebra/monoid.v 47 additions, 0 deletionstheories/algebra/monoid.v
- theories/base_logic/big_op.v 48 additions, 183 deletionstheories/base_logic/big_op.v
- theories/base_logic/derived.v 59 additions, 0 deletionstheories/base_logic/derived.v
- theories/base_logic/lib/auth.v 3 additions, 2 deletionstheories/base_logic/lib/auth.v
- theories/base_logic/lib/own.v 5 additions, 2 deletionstheories/base_logic/lib/own.v
- theories/program_logic/ectx_lifting.v 2 additions, 3 deletionstheories/program_logic/ectx_lifting.v
- theories/program_logic/ownp.v 2 additions, 2 deletionstheories/program_logic/ownp.v
Loading
Please register or sign in to comment