Leonardo de Moura
993ec54db6
chore: avoid hack that may introduce unnecessary dependencies
2022-02-15 12:17:40 -08:00
Leonardo de Moura
e07823bb12
chore: remove unnecessary partial
...
TODO: we should generate an error/warning when `partial` is not necessary
2022-02-15 12:16:49 -08:00
Leonardo de Moura
a2613a36a4
fix: incorrect dependencies due to assigned variables
2022-02-15 12:15:45 -08:00
Leonardo de Moura
df584567f5
feat: (generalizing := true) is the default behavior for match-expressions
...
closes #1018
2022-02-15 11:12:04 -08:00
Sebastian Ullrich
54522006f4
refactor: List.get: take Fin to align with Array.get
...
/cc @leodemoura
2022-02-15 18:41:22 +01:00
Leonardo de Moura
d1e5e4166a
feat: use sorry instead of trying to synthesize Inhabited at error recovery
2022-02-15 09:15:18 -08:00
Leonardo de Moura
f75fdcb19b
feat: when Lean cannot prove termination, then report error and add definition as partial, and if it fails add as axiom
2022-02-15 07:44:27 -08:00
Sebastian Ullrich
4b03666ecc
chore: include orphan file
2022-02-15 09:44:19 +01:00
Leonardo de Moura
c67ee9fdf4
feat: add pp annotation for match parser
2022-02-14 15:46:52 -08:00
Leonardo de Moura
ffca6975f2
chore: remove bootstrapping workarounds
2022-02-14 15:39:21 -08:00
Leonardo de Moura
42c80c7483
feat: remove whitespace sensitivity at match discriminants
2022-02-14 15:37:40 -08:00
Leonardo de Moura
93b5b74b36
feat: modify notation for providing motive in "match" expressions
2022-02-14 15:36:14 -08:00
Leonardo de Moura
aa63fda835
fix: mark auxiliary noConfusion declarations for enumeration types as [reducible]
...
closes #1016
2022-02-14 12:03:49 -08:00
Leonardo de Moura
93d5351fba
feat: display reducibility status at #print
2022-02-14 11:52:41 -08:00
Leonardo de Moura
82bce7ebec
fix: declare local instaces occurring in patterns
2022-02-12 12:01:08 -08:00
Leonardo de Moura
32dd3c6b29
feat: use at least default transparency at toCtorWhenK
...
Improves the effectiveness of `simp` when reducing `match`-expr.
2022-02-12 07:56:45 -08:00
Leonardo de Moura
0649e5fa8a
feat: Basic model-based solver for linear arithmetic
2022-02-11 18:38:33 -08:00
Leonardo de Moura
37afafad6e
feat: missing Rat functions
2022-02-11 18:24:18 -08:00
Leonardo de Moura
e8c23cdf7e
feat: add cache at Lean/Elab/PreDefinition/WF/PackDomain.lean
2022-02-11 09:52:14 -08:00
Leonardo de Moura
123e0f42e9
feat: support partial and over applications at WF/PackDomain.lean
...
closes #1013
2022-02-11 09:28:17 -08:00
Sebastian Ullrich
2390691116
chore: remove obsolete workaround
2022-02-11 18:19:59 +01:00
Sebastian Ullrich
894dc0e1b8
fix: pretty-printing match dependent on let
2022-02-10 10:19:04 +01:00
Leonardo de Moura
9fe0d28107
fix: do not split on if-then-else terms when generating equation theorems
...
Reason: avoid unnecessary case-analysis explosion
It is also unnecessary since we only refine the `below` and `F`
arguments over `match`-expressions.
This fixes the last case at issue #998
```
attribute [simp] BinaryHeap.heapifyDown
```
closes #998
2022-02-09 17:43:35 -08:00
Leonardo de Moura
c685a2d9ed
feat: add splitIte flag to splitTarget? tactic
2022-02-09 17:38:04 -08:00
Leonardo de Moura
7fc12014da
fix: make sure splitTarget? skips match expressions that produce type errors at splitMatch
...
We can now generate the equation theorem for
```
attribute [simp] Array.heapSort.loop
```
see #998
2022-02-09 17:07:10 -08:00
Leonardo de Moura
e574c5373f
feat: improve delta? method
...
Use zeta reduction to create new opportunities of beta-reduction.
This issue fixes on the problems that were affecting the generation of
equation theorems for `Array.heapSort.loop` (see issue: #998 ).
After this fix, the equation theorem generation fails at `splitMatch`.
2022-02-09 13:31:55 -08:00
Leonardo de Moura
8fbe7062fa
fix: preserve unused let-decls at Meta.transform
2022-02-09 10:13:52 -08:00
Leonardo de Moura
3b67c7db81
fix: handling of letrec declarations in the well-founded recursion module
2022-02-09 10:13:52 -08:00
Leonardo de Moura
471ef75345
feat: improve test at packDomain
2022-02-09 10:13:52 -08:00
Leonardo de Moura
e66575d4fc
refactor: move and generalize ensureNoRecFn
2022-02-09 10:13:52 -08:00
Leonardo de Moura
1cfe403edf
chore: style
2022-02-09 10:13:52 -08:00
Leonardo de Moura
2ef0146140
fix: avoid unnecessary matcheApp.addArgs at BRecOn and Fix
...
It fixes the following two cases from #998
```
attribute [simp] Lean.Export.exportName
attribute [simp] Lean.Export.exportLevel
```
2022-02-08 15:06:14 -08:00
Leonardo de Moura
8692225432
fix: saveEqn at Lean/Elab/PreDefinition/Eqns.lean
...
see #998
2022-02-08 13:44:49 -08:00
Leonardo de Moura
33ed496661
feat: improve contradiction
2022-02-08 13:26:05 -08:00
Leonardo de Moura
3367f0b06a
feat: use splitTarget? when proving equation theorems for recursive definitions
2022-02-08 12:53:09 -08:00
Leonardo de Moura
afb5cb16ee
chore: simplify option names
...
see #1011
2022-02-08 12:23:24 -08:00
Leonardo de Moura
59acf01bc9
feat: relax auto-implicit restrictions
...
The new options `relaxedAutoBoundImplicitLocal` can be used to
disable this feature.
closes #1011
2022-02-08 12:17:42 -08:00
Leonardo de Moura
c486203481
fix: use simpTargetStar when proving equation theorems for recursive definitions
...
Add `take` function reported at Zulip.
2022-02-08 11:43:45 -08:00
Leonardo de Moura
c1777c17e3
feat: add simpTargetStar
2022-02-08 11:43:45 -08:00
Leonardo de Moura
824d0aa8a5
chore: remove leftover
2022-02-08 11:43:45 -08:00
Leonardo de Moura
a9bb646d4f
chore: cleanup
2022-02-07 17:35:07 -08:00
Leonardo de Moura
8d7f0ea2f2
feat: add removeUnnecessaryCasts
...
see #988
2022-02-07 17:24:32 -08:00
Leonardo de Moura
9d34d9bc5a
feat: cache and optimize mkCongrSimp? at simp
...
see #988
2022-02-07 17:01:21 -08:00
Leonardo de Moura
007f0e1d71
feat: use mkCongrSimp? at simp
...
TODO: cache auto generated congr theorems, and `removeUnnecessaryCasts`
see #988
2022-02-07 16:45:01 -08:00
Leonardo de Moura
93bd4a7f88
chore: lemma => thm
2022-02-07 13:55:23 -08:00
Leonardo de Moura
5baac1905f
fix: use private names for theorems that are created on demand
...
closes #1006
2022-02-07 13:16:22 -08:00
Leonardo de Moura
eff63632b3
feat: improve error message when max heartbeats is reached during TC
...
see #1007
2022-02-07 11:23:48 -08:00
Gabriel Ebner
f8b43630a6
fix: refs to copied subobjects in diamond extension
2022-02-07 10:54:32 -08:00
Leonardo de Moura
9c2942c36d
chore: "simp lemma" => "simp theorem"
2022-02-06 09:15:39 -08:00
Leonardo de Moura
d6dc077c86
refactor: CongrLemma => SimpCongrTheorem
2022-02-06 09:15:39 -08:00