lean4-htt/src/Init/Data/Array
Paul Reichert 2980155f5c
refactor: simplify ToIterator (#11242)
This PR significantly changes the signature of the `ToIterator` type
class. The obtained iterators' state is no longer dependently typed and
is an `outParam` instead of being bundled inside the class. Among other
benefits, `simp` can now rewrite inside of `Slice.toList` and
`Slice.toArray`. The downside is that we lose flexibility. For example,
the former combinator-based implementation of `Subarray`'s iterators is
no longer feasible because the states are dependently typed. Therefore,
this PR provides a hand-written iterator for `Subarray`, which does not
require a dependently typed state and is faster than the previous one.

Converting a family of dependently typed iterators into a simply typed
one using a `Sigma`-state iterator generates forbiddingly bad code, so
that we do provide such a combinator. This PR adds a benchmark for this
problem.
2025-11-22 12:37:18 +00:00
..
Lex feat: add Std.Trichotomous (#10945) 2025-11-18 13:20:53 +00:00
QSort feat: integrate high-level order typeclasses with BEq and Ord (#9908) 2025-08-19 07:54:53 +00:00
Subarray chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Attach.lean chore: remove >6 month old deprecations (#10968) 2025-10-26 10:01:30 +00:00
Basic.lean doc: fix typo in List.finIdxOf? (#11111) 2025-11-10 10:04:07 +00:00
BasicAux.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
BinSearch.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Bootstrap.lean feat: add grind_pattern constraint annotations (#11193) 2025-11-15 19:08:03 +00:00
Count.lean chore: remove >6 month old deprecations (#10968) 2025-10-26 10:01:30 +00:00
DecidableEq.lean feat: allow decidable equality for empty lists and empty arrays (#11269) 2025-11-20 20:19:31 +00:00
Erase.lean chore: remove >6 month old deprecations (#10968) 2025-10-26 10:01:30 +00:00
Extract.lean feat: allow decidable equality for empty lists and empty arrays (#11269) 2025-11-20 20:19:31 +00:00
Find.lean chore: remove >6 month old deprecations (#10968) 2025-10-26 10:01:30 +00:00
FinRange.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
GetLit.lean chore: add deprecations for duplicated theorems (#10967) 2025-10-29 05:26:16 +00:00
InsertIdx.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
InsertionSort.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Lemmas.lean refactor: simplify ToIterator (#11242) 2025-11-22 12:37:18 +00:00
Lex.lean chore: remove public section from end of files (#10684) 2025-10-06 13:30:48 +00:00
MapIdx.lean chore: remove >6 month old deprecations (#10968) 2025-10-26 10:01:30 +00:00
Mem.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Monadic.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
OfFn.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Perm.lean chore: add deprecations for duplicated theorems (#10967) 2025-10-29 05:26:16 +00:00
QSort.lean chore: remove public section from end of files (#10684) 2025-10-06 13:30:48 +00:00
Range.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Set.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Subarray.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
TakeDrop.lean chore: remove redundant imports in core (#10750) 2025-10-16 20:27:46 +00:00
Zip.lean chore: remove >6 month old deprecations (#10968) 2025-10-26 10:01:30 +00:00