Mathlib v3 is deprecated. Go to Mathlib v4

Commit 2019-02-18 09:48 9a2c13ab

View on Github →

feat(data/alist,data/finmap): always insert key-value pair (#722)

  • Change {alist,finmap}.insert to always insert the key-value pair instead of doing nothing if the inserted key is found. This allows for useful theorems such as lookup_insert.
  • Add list.keys and used key membership instead of exists/forall. This makes proofs easier in some places.
  • Add a few other useful theorems such as lookup_eq_none, lookup_erase, lookup_erase_ne.

Estimated changes

added theorem alist.insert_entries
modified theorem alist.insert_entries_of_neg
deleted theorem alist.insert_of_pos
modified def alist.keys
modified theorem alist.keys_insert
added theorem alist.lookup_eq_none
added theorem alist.lookup_erase
added theorem alist.lookup_erase_ne
added theorem alist.lookup_insert
added theorem alist.lookup_insert_ne
deleted theorem alist.mem_def
modified theorem alist.mem_insert
modified theorem alist.mem_keys
modified theorem alist.not_mem_empty
modified theorem alist.perm_insert
added theorem list.exists_of_kerase
added theorem list.kerase_cons_eq
added theorem list.kerase_cons_ne
deleted theorem list.kerase_map_fst
added theorem list.kerase_nil
added def list.keys
added theorem list.keys_cons
added theorem list.keys_kerase
added theorem list.keys_kreplace
added theorem list.keys_nil
added def list.kinsert
added theorem list.kinsert_def
added theorem list.kinsert_nodupkeys
deleted theorem list.kreplace_map_fst
added theorem list.lookup_kerase
added theorem list.lookup_kerase_ne
added theorem list.lookup_kinsert
added theorem list.lookup_kinsert_ne
added theorem list.mem_keys
added theorem list.mem_keys_kinsert
added theorem list.mem_keys_of_mem
added theorem list.mem_lookup
modified theorem list.nodupkeys_cons
added theorem list.not_eq_key
added theorem list.not_mem_keys
added theorem list.perm_kinsert