Commit 2024-07-08 16:00 31d24779

View on Github →

chore: Added namespace Mathlib around Vector defs (#13407) This PR puts Mathlib.Data.Vector's Vector type into the namespace Mathlib. This will help ensure that users of Mathlib and Batteries can use this Vector type and Batteries' upcoming Array based Vector type without name conflicts. Tasks:

  • Put all Vector definitions, currently all of which are inside Mathlib/Data/Vector into the namespace Mathlib. - [x] Add deprecation aliases for all defs, theorems and lemmas thus namespaced. NOTE : This is not possible because alias simply reintroduces naming conflicts. See the linked zulip discussion
  • Fix breakages within Mathlib Discussion in Zulip topic

Estimated changes

added theorem Mathlib.Vector.ext
added theorem Mathlib.Vector.get_map
added theorem Mathlib.Vector.map_id
deleted theorem Vector.append_nil
deleted def Vector.casesOn
deleted def Vector.casesOn₂
deleted def Vector.casesOn₃
deleted theorem Vector.cons_val
deleted theorem Vector.empty_toList_eq_ff
deleted theorem Vector.eq_cons_iff
deleted theorem Vector.eraseIdx_insertNth
deleted theorem Vector.eraseIdx_val
deleted theorem Vector.exists_eq_cons
deleted theorem Vector.ext
deleted theorem Vector.get_cons_nil
deleted theorem Vector.get_cons_succ
deleted theorem Vector.get_cons_zero
deleted theorem Vector.get_eq_get
deleted theorem Vector.get_map
deleted theorem Vector.get_map₂
deleted theorem Vector.get_ofFn
deleted theorem Vector.get_replicate
deleted theorem Vector.get_set_eq_if
deleted theorem Vector.get_set_of_ne
deleted theorem Vector.get_set_same
deleted theorem Vector.get_tail
deleted theorem Vector.get_tail_succ
deleted theorem Vector.get_zero
deleted theorem Vector.head?_toList
deleted theorem Vector.head_map
deleted theorem Vector.head_ofFn
deleted def Vector.inductionOn
deleted theorem Vector.inductionOn_cons
deleted theorem Vector.inductionOn_nil
deleted def Vector.insertNth
deleted theorem Vector.insertNth_comm
deleted theorem Vector.insertNth_val
deleted def Vector.last
deleted theorem Vector.last_def
deleted theorem Vector.length_val
deleted def Vector.mOfFn
deleted theorem Vector.mOfFn_pure
deleted theorem Vector.mapAccumr_cons
deleted theorem Vector.mapAccumr₂_cons
deleted theorem Vector.map_id
deleted theorem Vector.map₂_cons
deleted theorem Vector.map₂_nil
deleted theorem Vector.mk_toList
deleted def Vector.mmap
deleted theorem Vector.mmap_cons
deleted theorem Vector.mmap_nil
deleted theorem Vector.ne_cons_iff
deleted theorem Vector.not_empty_toList
deleted theorem Vector.ofFn_get
deleted theorem Vector.prod_set'
deleted theorem Vector.prod_set
deleted theorem Vector.replicate_succ
deleted def Vector.reverse
deleted theorem Vector.reverse_get_zero
deleted theorem Vector.reverse_reverse
deleted def Vector.scanl
deleted theorem Vector.scanl_cons
deleted theorem Vector.scanl_get
deleted theorem Vector.scanl_head
deleted theorem Vector.scanl_nil
deleted theorem Vector.scanl_singleton
deleted theorem Vector.scanl_val
deleted def Vector.set
deleted theorem Vector.singleton_tail
deleted theorem Vector.tail_map
deleted theorem Vector.tail_nil
deleted theorem Vector.tail_ofFn
deleted theorem Vector.tail_val
deleted def Vector.toArray
deleted theorem Vector.toList_empty
deleted theorem Vector.toList_injective
deleted theorem Vector.toList_map
deleted theorem Vector.toList_ofFn
deleted theorem Vector.toList_reverse
deleted theorem Vector.toList_scanl
deleted theorem Vector.toList_set
deleted theorem Vector.toList_singleton
added theorem Mathlib.Vector.map_nil
added def Mathlib.Vector
deleted def Vector.append
deleted def Vector.cons
deleted theorem Vector.cons_head_tail
deleted def Vector.drop
deleted def Vector.elim
deleted def Vector.eraseIdx
deleted def Vector.get
deleted def Vector.head
deleted theorem Vector.head_cons
deleted def Vector.length
deleted def Vector.map
deleted def Vector.mapAccumr
deleted def Vector.mapAccumr₂
deleted theorem Vector.map_cons
deleted theorem Vector.map_nil
deleted def Vector.map₂
deleted def Vector.nil
deleted def Vector.ofFn
deleted def Vector.replicate
deleted def Vector.tail
deleted theorem Vector.tail_cons
deleted def Vector.take
deleted def Vector.toList
deleted theorem Vector.toList_append
deleted theorem Vector.toList_cons
deleted theorem Vector.toList_drop
deleted theorem Vector.toList_length
deleted theorem Vector.toList_mk
deleted theorem Vector.toList_nil
deleted theorem Vector.toList_take
deleted def Vector
added theorem Mathlib.Vector.map_map
deleted theorem Vector.mapAccumr_bisim
deleted theorem Vector.mapAccumr_eq_map
deleted theorem Vector.mapAccumr_map
deleted theorem Vector.mapAccumr₂_bisim
deleted theorem Vector.mapAccumr₂_comm
deleted theorem Vector.mapAccumr₂_flip
deleted theorem Vector.map_map
deleted theorem Vector.map_mapAccumr
deleted theorem Vector.map_map₂
deleted theorem Vector.map₂_comm
deleted theorem Vector.map₂_flip
deleted theorem Vector.map₂_map_left
deleted theorem Vector.map₂_map_right