lean4-htt/src/Init/Data/Array
Joachim Breitner e2983e44ef
perf: use with_reducible in special-purpose decreasing_trivial macros (#3991)
Because of the last-added-tried-first rule for macros, all the special
purpose `decreasing_trivial` rules are tried for most recursive
definitions out there, and because they use `apply` and `assumption`
with default transparency may cause some definitoins to be unfolded over
and over again.

A quick test with one of the functions in the leansat project shows that
elaboration time goes down from 600ms to 375ms when using
```
decreasing_by all_goals decreasing_with with_reducible decreasing_trivial
```
instead of
```
decreasing_by all_goals decreasing_with decreasing_trivial
```

This change uses `with_reducible` in most of these macros.

This means that these tactics will no longer work when the
relations/definitions they look for is hidden behind a definition.
This affected in particular `Array.sizeOf_get`, which now has a
companion `sizeOf_getElem`.

In addition, there were three tactics using `apply` to apply Nat-related
lemmas
that we now expect `omega` to solve. We still need them when building
`Init` modules
that don’t have access to `omega`, but they now live in
`decreasing_trivial_pre_omega`,
meant to be only used internally.
2024-04-29 15:12:27 +00:00
..
Subarray feat: show diffs when #guard_msgs fails (#3912) 2024-04-18 15:09:44 +00:00
Basic.lean perf: use with_reducible in special-purpose decreasing_trivial macros (#3991) 2024-04-29 15:12:27 +00:00
BasicAux.lean perf: use with_reducible in special-purpose decreasing_trivial macros (#3991) 2024-04-29 15:12:27 +00:00
BinSearch.lean chore: remove [Inhabited A] from binSearch / binInsert 2022-11-13 15:00:26 -08:00
DecidableEq.lean perf: use with_reducible in special-purpose decreasing_trivial macros (#3991) 2024-04-29 15:12:27 +00:00
InsertionSort.lean feat: use sepBy1Indent for tactic blocks 2022-09-18 16:43:23 -07:00
Lemmas.lean perf: use with_reducible in special-purpose decreasing_trivial macros (#3991) 2024-04-29 15:12:27 +00:00
Mem.lean perf: use with_reducible in special-purpose decreasing_trivial macros (#3991) 2024-04-29 15:12:27 +00:00
QSort.lean perf: use with_reducible in special-purpose decreasing_trivial macros (#3991) 2024-04-29 15:12:27 +00:00
Subarray.lean feat: show diffs when #guard_msgs fails (#3912) 2024-04-18 15:09:44 +00:00