Kim Morrison
4cd4bcc9be
chore: List simp fixes ( #5521 )
2024-09-29 13:28:19 +00:00
Kim Morrison
7d26a1604f
chore: restore @[simp] on List.getElem_mem et al ( #5520 )
2024-09-29 13:28:13 +00:00
Kim Morrison
2ace579438
chore: upstream List.fold lemmas ( #5519 )
2024-09-29 07:21:32 +00:00
Kim Morrison
d96b7a7d98
chore: rename List.maximum? to max? ( #5518 )
...
More consistent with other API.
2024-09-29 06:23:24 +00:00
Daniel Weber
3d1ac7cfa2
feat: add lemmas about List.IsPrefix ( #5448 )
...
Add iff version of `List.IsPrefix.getElem`, and `eq_of_length_le`
variants of `List.IsInfix.eq_of_length, List.IsPrefix.eq_of_length,
List.IsSuffix.eq_of_length`
2024-09-26 06:58:40 +00:00
Kim Morrison
5dea30f169
feat: @[simp] lemmas about List.toArray ( #5472 )
...
We make sure that we can pull `List.toArray` out through all operations
(well, for now "most" rather than "all"). As we also push `Array.toList`
inwards, this hopefully has the effect of them cancelling as they meet,
and `simp` naturally rewriting Array operations into List operations
wherever possible.
This is not at all complete yet.
2024-09-26 00:59:13 +00:00
Kim Morrison
c2f6297554
feat: adjust simp attributes on monad lemmas ( #5464 )
2024-09-25 10:21:18 +00:00
Kim Morrison
c7819bd6eb
chore: missing List.set_replicate_self ( #5460 )
2024-09-25 01:15:24 +00:00
Kim Morrison
c825b5a560
chore: reverse direction of List.set_map ( #5405 )
2024-09-23 03:44:11 +00:00
Kim Morrison
0ecf2a030a
feat: List.fold relators ( #5393 )
2024-09-20 00:48:03 +00:00
Kim Morrison
590c725943
feat: lemmas about List.maximum? ( #5394 )
2024-09-19 09:23:11 +00:00
Kim Morrison
9193196208
feat: List.fold / attach lemmas ( #5392 )
2024-09-19 08:26:06 +00:00
Kim Morrison
c3f384d6a5
feat: review of List.erase / List.find lemmas ( #5391 )
2024-09-19 05:37:04 +00:00
Kim Morrison
ddd471223c
chore: cleaning up redundant simp lemmas ( #5381 )
...
Problems reported by the simpNF linter downstream.
2024-09-18 10:06:29 +00:00
Kim Morrison
30e90a4dff
chore: upstream map_mergeSort ( #5377 )
...
This incorporates contributions from @eric-wieser in
https://github.com/leanprover-community/mathlib4/pull/15952 and
@fgdorais in https://github.com/leanprover-community/batteries/pull/579
2024-09-18 08:19:42 +00:00
Kim Morrison
a6a06a620f
chore: modify signature of lemmas about mergeSort ( #5378 )
...
This slightly smooths the interaction with `Prop` based reasoning in
Mathlib. Still not totally happy here.
2024-09-18 01:49:15 +00:00
Kim Morrison
21d71de481
chore: fix name of List.length_mergeSort ( #5373 )
2024-09-17 12:43:39 +00:00
Kim Morrison
45af92fcd1
feat: lemmas about List.tail ( #5360 )
2024-09-16 09:25:24 +00:00
Violeta Hernández
078e9b6d77
doc: add documentation for groupBy.loop ( #5349 )
...
We add some documentation explaining the auxiliary function in the
definition of `groupBy`. This has been moved here from Mathlib PR
[16818](https://github.com/leanprover-community/mathlib4/pull/16818 ) by
request of @semorrison.
---------
Co-authored-by: Kim Morrison <kim@tqft.net>
2024-09-16 05:56:44 +00:00
Kim Morrison
7740a38a71
chore: remove @[simp] from Option.bind_map ( #5354 )
2024-09-16 04:44:38 +00:00
Kim Morrison
9568f305d8
chore: switch primes on List.getElem_take ( #5294 )
...
This will probably have fallout downstream, and as it is a direct name
switch I'm not going to provide any deprecations.
2024-09-16 03:40:42 +00:00
Kim Morrison
b1179d5cc3
chore: fix implicitness of List.getElem_mem ( #5331 )
2024-09-16 03:28:14 +00:00
Kim Morrison
e6145a6937
feat: simp lemmas for LawfulBEq ( #5355 )
2024-09-16 03:21:30 +00:00
Kim Morrison
d47ae99721
feat: List.head_mem_head? ( #5353 )
2024-09-16 03:05:17 +00:00
Kim Morrison
0aac83fe40
feat: List.attachWith lemmas ( #5352 )
2024-09-16 02:24:14 +00:00
Kim Morrison
8c6ac845b1
chore: cleanup after export Bool.and/or/not/xor
2024-09-16 12:45:51 +10:00
Kim Morrison
4e0f6b8b45
feat: export Bool.and/or/not/xor
2024-09-16 12:45:51 +10:00
Kim Morrison
1a2217d47e
feat: cleanup of List.getElem_append variants ( #5303 )
2024-09-16 02:01:37 +00:00
Kim Morrison
3ef67c468a
feat: List.replicate lemmas ( #5350 )
2024-09-15 23:57:04 +00:00
Kim Morrison
da0d309d65
feat: provide mergeSort comparator autoParam ( #5302 )
...
Write `mergeSort xs ys cmp` to provide an explicit comparator, or
otherwise `mergeSort xs ys` falls back to `LE` and `DecidablePred` via
an autoparam.
2024-09-12 01:50:01 +00:00
Kim Morrison
87fdd7809f
feat: List.tail lemma ( #5316 )
2024-09-12 01:09:57 +00:00
Kim Morrison
0b7debe376
chore: fix List.countP lemmas ( #5311 )
2024-09-11 10:09:37 +00:00
Kim Morrison
f5146c6edb
chore: fix List.all/any lemmas ( #5310 )
2024-09-11 10:02:47 +00:00
Kim Morrison
325a058893
feat: more List.findIdx theorems ( #5300 )
2024-09-11 04:53:59 +00:00
Kim Morrison
7a5a08960a
feat: cleanup of List.findIdx / List.take lemmas ( #5293 )
2024-09-10 06:17:38 +00:00
Kim Morrison
e41e305479
chore: rename Array.data to Array.toList
2024-09-10 15:24:23 +10:00
Kim Morrison
7eedf6467f
feat: List.mem_ite_nil_left and analogues ( #5289 )
2024-09-09 14:08:01 +00:00
Kim Morrison
64b35ba555
chore: use boolean predicates in List.filter ( #5287 )
2024-09-09 12:15:04 +00:00
Kim Morrison
ec7ae59473
feat: List.count lemmas ( #5285 )
2024-09-09 07:04:57 +00:00
Kim Morrison
c96fbdda44
chore: remove @[simp] from List.head_mem and similar ( #5271 )
...
These attributes do not seem particularly useful after all.
2024-09-09 06:05:06 +00:00
Kim Morrison
7432a6f01f
feat: more List.attach lemmas ( #5277 )
2024-09-07 05:29:40 +00:00
Kim Morrison
fcfead8cde
feat: lemmas about List.attach ( #5273 )
...
#5272 should be merged first; this contains some material from that PR.
2024-09-06 22:14:56 +00:00
Kim Morrison
e5eea67020
chore: reverse direction of List.tail_map ( #5275 )
2024-09-06 11:55:50 +00:00
Kim Morrison
76ea33c4c6
chore: review of List API ( #5264 )
2024-09-05 13:08:31 +00:00
Kim Morrison
7c364543a3
chore: review of List API ( #5260 )
2024-09-05 06:27:08 +00:00
Kim Morrison
d08051cf0b
chore: variables appearing on both sides of an iff should be implicit ( #5254 )
2024-09-04 08:33:24 +00:00
Kim Morrison
f1b2850aa4
chore: split Init.Data.Array.Lemmas for better bootstrapping ( #5255 )
...
This allows significantly reducing the imports of `Init.Data.List.Impl`.
2024-09-04 08:33:13 +00:00
Kim Morrison
05fe436bda
chore: don't use simp_arith when simp will do ( #5256 )
2024-09-04 07:56:25 +00:00
Kim Morrison
52bc8dcb40
chore: remove redundant simp annotations ( #5251 )
2024-09-04 04:36:09 +00:00
Kim Morrison
744b68358e
chore: cleanup imports of Array.Lemmas ( #5246 )
2024-09-04 01:48:14 +00:00