Daniel Fabian
ab0ef229ac
feat: add getBelowIndices.
2021-05-19 07:28:14 -07:00
Daniel Fabian
91ecbb5b5c
feat: Add withMkMatcherInput.
...
This is the inverse function to `mkMatcher`, i.e. a way to turn a matcher into an input.
2021-05-19 07:28:14 -07:00
Daniel Fabian
cf030a1634
refactor: Add MkMatcherInput.
...
Since we are going to make `mkMatcher` reversible, it's quite useful to have the input be a `structure`. This way we make sure, that the inverse function always returns the same type as `mkMatcher` needs as input.
2021-05-19 07:28:14 -07:00
Sebastian Ullrich
23f0c1051c
feat: improve ToString/Quote Name
2021-05-19 09:34:01 +02:00
Leonardo de Moura
62ee8cfcea
feat: add MonadBacktrack instance for SimpM
2021-05-16 12:49:33 -07:00
Leonardo de Moura
ac90052139
feat: add option for controlling how deep we go when trying to discharge simp theorem hypotheses
2021-05-16 12:32:05 -07:00
Leonardo de Moura
4b69193442
feat: generalize withPPInaccessibleNames
2021-05-15 18:58:06 -07:00
Leonardo de Moura
051ac3aef3
fix: casesRec
2021-05-14 18:05:04 -07:00
Leonardo de Moura
0f43a338e6
feat: improve error message
2021-05-14 18:05:04 -07:00
Leonardo de Moura
05147fd352
fix: do not generate injectivity theorems for unsafe inductive datatypes
2021-05-14 18:05:04 -07:00
Leonardo de Moura
175311b2f0
feat: avoid trivial injectivity theorems
2021-05-14 18:05:04 -07:00
Leonardo de Moura
112bb0ed79
fix: injectivity theorem for constructors with dependent fields
2021-05-14 18:05:04 -07:00
Leonardo de Moura
2a7ec9dd8c
feat: add splitAnd and applyRefl helper methods
2021-05-14 18:05:04 -07:00
Leonardo de Moura
77b9dbf9a9
feat: add casesRec
2021-05-14 18:05:04 -07:00
Leonardo de Moura
eb4df90c93
feat: add helper methods
2021-05-14 18:05:04 -07:00
Leonardo de Moura
f850820029
feat: add mkInjectiveTheorems
2021-05-13 22:09:50 -07:00
Leonardo de Moura
ea45d3bd40
fix: fixes #457
2021-05-12 20:45:54 -07:00
Leonardo de Moura
c9db8619f1
fix: fixes #456
2021-05-11 21:07:21 -07:00
Leonardo de Moura
0e1f645b07
fix: fixes #450
2021-05-10 13:55:06 -07:00
Leonardo de Moura
4675817a9e
fix: projection of string literals
2021-05-07 14:38:21 -07:00
Leonardo de Moura
5fcd08326f
fix: bug at reduceRec
2021-05-07 14:21:37 -07:00
Sebastian Ullrich
9ed8db4bc3
feat: add constructor tactic
2021-05-06 10:40:56 -07:00
Leonardo de Moura
b4a7d28cff
fix: inconsistent inaccessible annotations
2021-05-05 10:45:38 -07:00
Leonardo de Moura
660c49840f
fix: another instance of the binder cache issue
...
See issue #439
2021-05-05 10:45:38 -07:00
Leonardo de Moura
8102f407b6
fix: take binder information into account when caching results
2021-05-03 21:02:23 -07:00
Leonardo de Moura
eaa7582e60
feat: add toPattern
2021-05-03 11:44:40 -07:00
Leonardo de Moura
6efb058e2c
refactor: add Name.modifyBase
2021-05-03 10:06:20 -07:00
Leonardo de Moura
0f8c6ca797
fix: cache issue at instantiateBetaRevRange
2021-05-02 17:00:35 -07:00
Leonardo de Moura
663a5124f4
chore: naming convention
2021-05-01 21:29:06 -07:00
Daniel Fabian
d54c964a51
fix: improve the tactic for brecOn for inductive predicates.
2021-04-29 17:19:09 -07:00
Daniel Fabian
0238bf8c33
refactor: use Ordering inside of rbmap instead of lt.
2021-04-27 07:58:58 -07:00
Daniel Fabian
1f05f5bf11
chore: rename ProofBelow to below.
2021-04-26 20:33:21 +02:00
Daniel Fabian
eda4bdd337
test: extend inductive_pred.lean with tests using the new construction.
2021-04-25 20:02:22 -07:00
Daniel Fabian
371504e9cf
feat: add ProofBelow construction for inductive predicates.
...
This construction allows us to define `brecOn` for inductive predicates.
2021-04-25 20:02:22 -07:00
Leonardo de Moura
675bebb446
fix: isLevelDefEq missing case
2021-04-25 10:27:14 -07:00
Leonardo de Moura
d68d1f0841
fix: fixes #423
2021-04-25 10:00:38 -07:00
Leonardo de Moura
030f53fa43
fix: closes #421
...
The unifier used to implement the `cases` tactic should not discard
equations of the form `x = t` and `t = x` using proof irrelanvance.
The new test demonstrates the issue. The unifier was reaching the
state
```
x : Conw Con.nil
|- x = Conw.nilw -> x = Conw.nilw
```
and discarding the equality instead of substituting `x`
because `x` and `Conw.nilw` are definionally equal due to
proof irrelevance.
@javra Do you have more complicated examples that were being
affected by this issue?
2021-04-23 12:27:39 -07:00
Leonardo de Moura
3a80e87793
chore: #405 step 1
2021-04-22 20:03:48 -07:00
Leonardo de Moura
157ef80c5a
feat: match auto generalization
2021-04-16 21:48:38 -07:00
Leonardo de Moura
aaa072cf21
feat: add withNewBinderInfos
2021-04-16 09:59:40 -07:00
Daniel Fabian
cb18af6184
feat: add withLocalDecls and withLocalDeclsD
...
They are array versions of `withLocalDecl` and `withLocalDeclD`, respectively. They are useful when you need to create variables dynamically.
2021-04-16 07:54:04 -07:00
Leonardo de Moura
555b978d67
refactor: add GeneralizeVars.lean
...
Helper methods for performing auto generalization.
2021-04-15 21:37:48 -07:00
Leonardo de Moura
dbc84c502c
chore: make sure we don't lift methods over binders
2021-04-15 12:06:46 -07:00
Leonardo de Moura
484a3a4e7c
fix: should only cache inferred type when there are no metavars
2021-04-11 19:10:41 -07:00
Leonardo de Moura
2694e7798a
refactor: add MonadBacktrack
...
The new class specifies an interface for saving and restoring the
backtrackable part of the state.
This commit also fixes a few issues.
- `commitWhen` at `LevelDefEq` was defining a checkpoint for
the `isDefEq` methods, and it affects how postponed universe
constraints are handled. However, the name suggests it is
similar to `commitWhenSome?`, and consequently it was used
in other places that had nothing to do with `isDefEq`.
So, I renamed it, and provided the generic `commitWhen` at the new
`MonadBacktrack.lean` file.
- We were restoring more state then needed in a few places.
For example, we were discarding all caches.
- At `SyntheticMVars.lean`, we were using the `Meta.commitWhenSome?`
method which does not restore the `Term.State`.
2021-04-11 19:10:41 -07:00
Leonardo de Moura
e56bf66d8d
chore: rename option hygienicIntro ==> tactic.hygienic
...
It is easier to find.
2021-04-10 16:09:04 -07:00
Leonardo de Moura
6dbf227cf2
fix: issues #387 part 2
...
see #387
2021-04-10 15:51:07 -07:00
Leonardo de Moura
91cb4aad2a
refactor: simplify and document SimpLemma encoding
2021-04-10 15:03:04 -07:00
Leonardo de Moura
4f09390b8e
feat: create SimpLemmas.Proof.abst at the simp tactic frontend
2021-04-10 14:17:43 -07:00
Leonardo de Moura
8be9a13679
feat: support for SimpLemma.Proof.abst
2021-04-10 12:46:48 -07:00