mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
This PR makes `take`/`drop`/`extract` available for each of `List`/`Array`/`Vector`. The simp normal forms differ, however: in `List`, we simplify `extract` to `take+drop`, while in `Array` and `Vector` we simplify `take` and `drop` to `extract`. We also provide `Array/Vector.shrink`, which simplifies to `take`, but is implemented by repeatedly popping. Verification lemmas for `Array/Vector.extract` to follow in a subsequent PR.