Set Hint Mode for all classes in `base.v`.
This provides significant robustness against looping type class search. As a consequence, at many places throughout the library we had to add additional typing information to lemmas. This was to be expected, since most of the old lemmas were ambiguous. For example: Section fin_collection. Context `{FinCollection A C}. size_singleton (x : A) : size {[ x ]} = 1. In this case, the lemma does not tell us which `FinCollection` with elements `A` we are talking about. So, `{[ x ]}` could not only refer to the singleton operation of the `FinCollection A C` in the section, but also to any other `FinCollection` in the development. To make this lemma unambigious, it should be written as: Lemma size_singleton (x : A) : size ({[ x ]} : C) = 1. In similar spirit, lemmas like the one below were also ambiguous: Lemma lookup_alter_None {A} (f : A → A) m i j : alter f i m !! j = Nonem !! j = None. It is not clear which finite map implementation we are talking about. To make this lemma unambigious, it should be written as: Lemma lookup_alter_None {A} (f : A → A) (m : M A) i j : alter f i m !! j = None m !! j = None. That is, we have to specify the type of `m`.
Showing
- theories/base.v 42 additions, 1 deletiontheories/base.v
- theories/coPset.v 1 addition, 1 deletiontheories/coPset.v
- theories/collections.v 58 additions, 50 deletionstheories/collections.v
- theories/fin_collections.v 5 additions, 5 deletionstheories/fin_collections.v
- theories/fin_map_dom.v 6 additions, 5 deletionstheories/fin_map_dom.v
- theories/fin_maps.v 90 additions, 73 deletionstheories/fin_maps.v
- theories/gmap.v 5 additions, 3 deletionstheories/gmap.v
- theories/gmultiset.v 9 additions, 30 deletionstheories/gmultiset.v
- theories/hashset.v 10 additions, 27 deletionstheories/hashset.v
- theories/list.v 16 additions, 15 deletionstheories/list.v
- theories/listset.v 12 additions, 28 deletionstheories/listset.v
- theories/mapset.v 12 additions, 29 deletionstheories/mapset.v
- theories/option.v 5 additions, 3 deletionstheories/option.v
- theories/set.v 2 additions, 2 deletionstheories/set.v
Loading
Please register or sign in to comment