Commit 2023-01-05 14:40 f0c99391

View on Github →

feat port: Data.List.Basic (#966) cf9386b56953fb40904843af98b7a80757bbe7f9 Notes so far There are various problems with theorems already having been ported. Sometimes there was a change in universe level order, implicit argument order, or explicit arguments order or explicicity of arguments. In these situations I did the following. --Ignore the error and align the old lemma when the difference between the two was just universe. --Align the old lemma with the new lemma but incluce a porting note when the difference was the order of implicit arguments --Make a new lemma with a ' at the end when the difference was to do with explicit arguments. I also added a bunch of definitions that were not imported, possibly with the wrong names. These definitions are repeat, ret, empty, init, last, ilast There is a question to be answered about what to do with list.nth_le, which is discussed on Zulip

Estimated changes

added theorem List.All₂.imp
added theorem List.Sublist.antisymm
added theorem List.Sublist.cons_cons
added theorem List.Sublist.erase
added theorem List.Sublist.filter
added theorem List.Sublist.filterMap
added theorem List.Sublist.map
added theorem List.all₂_cons
added theorem List.all₂_iff_forall
added theorem List.all₂_map_iff
added theorem List.append_concat
added theorem List.attach_eq_nil
added theorem List.attach_map_coe'
added theorem List.attach_map_val'
modified theorem List.attach_map_val
added theorem List.bind_append
added theorem List.bind_assoc
added theorem List.bind_congr
added theorem List.bind_eq_bind
added theorem List.bind_ret_eq_map
added theorem List.bind_singleton'
added theorem List.bind_singleton
added theorem List.choose_mem
added theorem List.choose_property
added theorem List.choose_spec
added theorem List.comp_map
added theorem List.concat_append
added theorem List.concat_cons
added theorem List.concat_eq_append'
added theorem List.concat_ne_nil
added theorem List.concat_nil
added theorem List.cons_diff
added theorem List.cons_diff_of_mem
added theorem List.cons_eq_cons
added theorem List.cons_head!_tail
added theorem List.cons_head?_tail
modified theorem List.cons_injective
added theorem List.diff_append
added theorem List.diff_cons
added theorem List.diff_cons_right
added theorem List.diff_eq_foldl
added theorem List.diff_erase
added theorem List.diff_nil
added theorem List.diff_sublist
added theorem List.diff_subset
added theorem List.doubleton_eq
added theorem List.dropLast_eq_take
added theorem List.dropLast_take
added theorem List.dropSlice_eq
added theorem List.drop_add
added theorem List.drop_append
added theorem List.drop_drop
added theorem List.drop_eq_get_cons
added theorem List.drop_left'
added theorem List.drop_left
added theorem List.drop_length_cons
added theorem List.drop_one
added theorem List.drop_sizeOf_le
added theorem List.drop_take
added theorem List.enumFrom_append
added theorem List.enumFrom_cons
added theorem List.enumFrom_get?
added theorem List.enumFrom_map_snd
added theorem List.enumFrom_nil
added theorem List.enum_append
added theorem List.enum_cons
added theorem List.enum_get?
added theorem List.enum_map_snd
added theorem List.enum_nil
added theorem List.enum_singleton
added theorem List.eq_of_mem_repeat
added theorem List.eq_repeat'
added theorem List.eq_repeat
added theorem List.eq_repeat_of_mem
added theorem List.eq_replicate'
added theorem List.eq_replicate
modified theorem List.exists_mem_cons_of
modified theorem List.exists_of_length_succ
added theorem List.ext_nthLe
added theorem List.filterMap_append
added theorem List.filterMap_cons
added theorem List.filterMap_eq_map
added theorem List.filterMap_filter
added theorem List.filterMap_join
added theorem List.filterMap_map
added theorem List.filterMap_nil
added theorem List.filterMap_some
added theorem List.filter_append
added theorem List.filter_congr'
added theorem List.filter_eq_foldr
added theorem List.filter_eq_nil
added theorem List.filter_eq_self
added theorem List.filter_false
added theorem List.filter_filter
added theorem List.filter_filterMap
added theorem List.filter_nil
added theorem List.filter_singleton
added theorem List.filter_sublist
added theorem List.filter_subset
added theorem List.filter_true
added theorem List.find?_cons_of_neg
added theorem List.find?_cons_of_pos
added theorem List.find?_eq_none
added theorem List.find?_mem
added theorem List.find?_nil
added theorem List.find?_some
added theorem List.foldl1_eq_foldr1
added theorem List.foldlM_cons
added theorem List.foldlM_eq_foldl
added theorem List.foldlM_nil
added def List.foldlRecOn
added theorem List.foldl_assoc
added theorem List.foldl_cons
added theorem List.foldl_eq_foldr'
added theorem List.foldl_eq_foldr
added theorem List.foldl_eq_of_comm'
added theorem List.foldl_ext
added theorem List.foldl_fixed'
added theorem List.foldl_fixed
added theorem List.foldl_hom₂
added theorem List.foldl_join
added theorem List.foldl_map'
added theorem List.foldl_nil
added theorem List.foldl_rec_on_nil
added theorem List.foldrM_eq_foldr
added def List.foldrRecOn
added theorem List.foldr_cons
added theorem List.foldr_eq_of_comm'
added theorem List.foldr_eta
added theorem List.foldr_ext
added theorem List.foldr_fixed'
added theorem List.foldr_fixed
added theorem List.foldr_hom₂
added theorem List.foldr_join
added theorem List.foldr_map'
added theorem List.foldr_nil
added theorem List.foldr_rec_on_cons
added theorem List.foldr_rec_on_nil
added theorem List.get?_drop
added theorem List.get?_eq_some'
modified theorem List.get?_injective
added theorem List.get?_length
added theorem List.get?_pmap
added theorem List.get?_succ_scanl
added theorem List.get?_take
added theorem List.get?_zero_scanl
added theorem List.getD_append
added theorem List.getD_append_right
added theorem List.getD_cons_succ
added theorem List.getD_cons_zero
added theorem List.getD_eq_default
added theorem List.getD_eq_get
added theorem List.getD_eq_getD_get?
added theorem List.getD_eq_nthLe
added theorem List.getD_nil
added theorem List.getI_append
added theorem List.getI_append_right
added theorem List.getI_cons_succ
added theorem List.getI_cons_zero
added theorem List.getI_eq_default
added theorem List.getI_eq_get
added theorem List.getI_eq_iget_get?
added theorem List.getI_eq_nthLe
added theorem List.getI_nil
added theorem List.getLast?_append
added theorem List.getLast?_isNone
added theorem List.getLast?_isSome
added theorem List.getLast_append'
added theorem List.getLast_concat'
added theorem List.getLast_congr
added theorem List.getLast_cons
added theorem List.getLast_cons_cons
added theorem List.getLast_eq_nthLe
added theorem List.getLast_map
added theorem List.getLast_mem
added theorem List.getLast_pmap
added theorem List.getLast_reverse
added theorem List.get_attach
added theorem List.get_drop'
added theorem List.get_drop
added theorem List.get_enum
added theorem List.get_enumFrom
added theorem List.get_eq_iff
added theorem List.get_map_rev
added theorem List.get_pmap
added theorem List.get_reverse'
added theorem List.get_reverse
added theorem List.get_set_of_ne
added theorem List.get_succ_scanl
added theorem List.get_take'
added theorem List.get_take
added theorem List.get_zero_scanl
added theorem List.head!_append
added theorem List.head!_cons
added theorem List.head!_eq_head?
added theorem List.head!_mem_head?
added theorem List.head!_mem_self
added theorem List.head?_append
added theorem List.head?_map
added theorem List.ilast'_mem
added theorem List.indexOf_cons
added theorem List.indexOf_cons_eq
added theorem List.indexOf_cons_ne
added theorem List.indexOf_cons_self
added theorem List.indexOf_eq_length
added theorem List.indexOf_get
added theorem List.indexOf_get?
added theorem List.indexOf_inj
added theorem List.indexOf_le_length
added theorem List.indexOf_lt_length
added theorem List.indexOf_nil
added theorem List.indexOf_nthLe
added theorem List.insertNth_comm
added theorem List.insertNth_zero
added theorem List.insert_neg
added theorem List.insert_pos
added theorem List.intersperse_nil
added theorem List.join_repeat_nil
added theorem List.length_attach
added theorem List.length_concat'
added theorem List.length_dropLast
added theorem List.length_enum
added theorem List.length_enumFrom
added theorem List.length_eq_three
added theorem List.length_eq_two
added theorem List.length_filter_le
modified theorem List.length_injective_iff
added theorem List.length_insertNth
added theorem List.length_lookmap
added theorem List.length_modifyNth
added theorem List.length_pmap
added theorem List.length_repeat
added theorem List.length_scanl
added theorem List.lookmap.go_append
added theorem List.lookmap_congr
added theorem List.lookmap_cons_none
added theorem List.lookmap_cons_some
added theorem List.lookmap_id'
added theorem List.lookmap_map_eq
added theorem List.lookmap_nil
added theorem List.lookmap_none
added theorem List.lookmap_some
added theorem List.map_bind
added theorem List.map_comp_map
added theorem List.map_concat
added theorem List.map_congr
added theorem List.map_const'
added theorem List.map_const
added theorem List.map_diff
added theorem List.map_drop
added theorem List.map_eq_bind
added theorem List.map_eq_foldr
added theorem List.map_eq_map
added theorem List.map_eq_map_iff
added theorem List.map_eq_repeat_iff
added theorem List.map_erase
added theorem List.map_filter
added theorem List.map_filterMap
added theorem List.map_foldl_erase
added theorem List.map_id''
added theorem List.map_id'
added theorem List.map_injective_iff
added theorem List.map_join
added theorem List.map_repeat
added theorem List.map_replicate
added theorem List.map_reverse
added theorem List.map_reverseAux
added theorem List.map_subset_iff
added theorem List.map_tail
added theorem List.map_take
added theorem List.mem_diff_of_mem
added theorem List.mem_enumFrom
added theorem List.mem_filterMap
added theorem List.mem_filter_of_mem
added theorem List.mem_getLast?_cons
added theorem List.mem_iff_nthLe
added theorem List.mem_insertNth
added theorem List.mem_map'
added theorem List.mem_map_swap
added theorem List.mem_of_mem_filter
added theorem List.mem_of_mem_head?
added theorem List.mem_pure
added theorem List.mem_repeat
added theorem List.mem_reverse'
added theorem List.mem_takeWhile_imp
added theorem List.modifyLast_append
added theorem List.modifyNth_eq_set
added theorem List.nil_diff
added theorem List.nil_zipWith
modified theorem List.not_exists_mem_nil
added theorem List.nthLe_append
added theorem List.nthLe_attach
added theorem List.nthLe_cons
added theorem List.nthLe_cons_aux
added theorem List.nthLe_cons_length
added theorem List.nthLe_drop'
added theorem List.nthLe_drop
added theorem List.nthLe_enum
added theorem List.nthLe_enumFrom
added theorem List.nthLe_eq_iff
added theorem List.nthLe_get?
added theorem List.nthLe_map'
added theorem List.nthLe_map
added theorem List.nthLe_map_rev
added theorem List.nthLe_mem
added theorem List.nthLe_of_eq
added theorem List.nthLe_of_mem
added theorem List.nthLe_pmap
added theorem List.nthLe_repeat
added theorem List.nthLe_reverse'
added theorem List.nthLe_reverse
added theorem List.nthLe_set_eq
added theorem List.nthLe_set_of_ne
added theorem List.nthLe_singleton
added theorem List.nthLe_succ_scanl
added theorem List.nthLe_tail
added theorem List.nthLe_take'
added theorem List.nthLe_take
added theorem List.nthLe_zero
added theorem List.nthLe_zero_scanl
added theorem List.nth_take_of_succ
added theorem List.of_mem_filter
added theorem List.pmap_append'
added theorem List.pmap_append
added theorem List.pmap_eq_nil
deleted theorem List.product_spec
added theorem List.reduceOption_map
added theorem List.reduceOption_nil
added theorem List.repeat_add
added theorem List.repeat_left_inj'
added theorem List.repeat_left_inj
added theorem List.repeat_right_inj
added theorem List.repeat_succ
added theorem List.replicate_add
added theorem List.reverse_bijective
added theorem List.reverse_cons'
added theorem List.reverse_eq_iff
added theorem List.reverse_eq_nil
added theorem List.reverse_foldl
added theorem List.reverse_inj
added theorem List.reverse_injective
added theorem List.reverse_repeat
added theorem List.reverse_replicate
added theorem List.reverse_singleton
added theorem List.reverse_take
added theorem List.scanl_cons
added theorem List.scanl_nil
added theorem List.scanr_cons
added theorem List.scanr_nil
added theorem List.set_eq_nil
added theorem List.set_of_mem_cons
added theorem List.singleton_eq
added theorem List.singleton_inj
added theorem List.singleton_sublist
added theorem List.some_nthLe_eq
added theorem List.span_eq_take_drop
added theorem List.splitOnP.go_acc
added theorem List.splitOnP_cons
added theorem List.splitOnP_first
added theorem List.splitOnP_ne_nil
added theorem List.splitOnP_nil
added theorem List.splitOnP_spec
added theorem List.splitOn_nil
added theorem List.surjective_head'
added theorem List.surjective_head
added theorem List.surjective_tail
added theorem List.tail_drop
added theorem List.tail_repeat
added theorem List.tail_replicate
added theorem List.takeD_eq_take
added theorem List.takeD_left'
added theorem List.takeD_left
added theorem List.takeD_length
added theorem List.takeI_eq_take
added theorem List.takeI_left'
added theorem List.takeI_left
added theorem List.takeI_length
added theorem List.takeI_nil
added theorem List.takeWhile_idem
added theorem List.take_add
added theorem List.take_all_of_le
added theorem List.take_append
added theorem List.take_cons
added theorem List.take_eq_nil_iff
added theorem List.take_eq_take
added theorem List.take_left'
added theorem List.take_left
added theorem List.take_nil
added theorem List.take_repeat
added theorem List.take_replicate
added theorem List.take_succ
added theorem List.take_take
added theorem List.take_zero
added theorem List.zipLeft'_cons_nil
added theorem List.zipLeft'_nil_left
added theorem List.zipLeft_cons_cons
added theorem List.zipLeft_cons_nil
added theorem List.zipLeft_nil_left
added theorem List.zipLeft_nil_right
added theorem List.zipRight_nil_cons
added theorem List.zipRight_nil_left
added theorem List.zipWith_flip
added theorem List.zipWith_nil
deleted def List.band
deleted def List.bor
modified def List.findIndex
added def List.getLastI
deleted def List.ilast
deleted def List.init
deleted def List.last
deleted def List.mapWithIndex
deleted def List.map₂
deleted def List.nth
modified def List.nthLe
added theorem List.nthLe_eq
deleted def List.updateNth
modified def List.«repeat»