Leonardo de Moura
82f3042fa4
fix: equational theorem generation for structural recursion
2021-09-19 08:48:40 -07:00
Leonardo de Moura
233a262c03
feat: improve whnfReducibleLHS?
2021-09-19 08:33:51 -07:00
Leonardo de Moura
c2d33a1a58
fix: bug at addSmartUnfoldingDef
...
The approach using `matcherBelowDep : NameSet` was not correct because
we "reuse" matcher-declarations. For example, in the definition
```
def f : Nat → Bool
| 0 => true
| n + 1 => (match n with
| 0 => true
| _ + 1 => true) && f n
```
we have to `match`-expressions but they can be compiled the same
matcher `f.match_1`. Thus, the set `matcherBelowDep` would contain
`f.match_1` since the first occurence refined the `Nat.below` argument
at `mkBRecOn`. Thus, `addSmartUnfoldingDef` was incorrectly assuming the second
`match` was refined too.
We fixed this issue by simulating `mkBRecOn` behavior.
fixes #445
2021-09-18 19:15:38 -07:00
Leonardo de Moura
c795a75045
feat: modify approach for generating equational theorems
2021-09-18 15:58:31 -07:00
Leonardo de Moura
1ce65672ba
chore: modify strategy for constructing equational theorems
2021-09-18 08:27:07 -07:00
Leonardo de Moura
07bd5ae2b8
chore: remove dead code
2021-09-18 07:36:14 -07:00
Leonardo de Moura
d413aa1dc5
feat: generate proofs for structural (conditional) equality theorems
2021-09-17 18:57:39 -07:00
Leonardo de Moura
1a0badac06
feat: generate conditional structural equation theorem types
...
TODO: proofs
2021-09-17 16:49:30 -07:00
Leonardo de Moura
6ffb3f91f0
feat: save information for generating structural equation theorems later
2021-09-17 14:20:28 -07:00
Leonardo de Moura
94ede53940
chore: use doc string
2021-09-17 14:20:28 -07:00
Leonardo de Moura
d378df47d7
fix: fixes #633
2021-09-16 14:11:34 -07:00
Leonardo de Moura
0a898965a3
chore: use snake_case for user-facing tactic names
2021-09-16 10:23:12 -07:00
Leonardo de Moura
c2a5e37c60
feat: simp discharger
2021-09-16 10:11:27 -07:00
Leonardo de Moura
fd8fb3cf9e
chore: prepare to change simp syntax
2021-09-16 07:41:04 -07:00
Leonardo de Moura
deea3996be
fix: allow renameI to rename shadowed names
2021-09-13 06:43:34 -07:00
Leonardo de Moura
bfa1c86b24
feat: add optional config parser to rewrite tactics
2021-09-12 19:05:15 -07:00
Leonardo de Moura
ea37c64b52
feat: add Meta.Rewrite.Config
2021-09-12 18:44:08 -07:00
Leonardo de Moura
f43ab76641
feat: doc string for syntax abbreviations
2021-09-12 18:26:36 -07:00
Leonardo de Moura
8c82302aca
refactor: add config syntax and macro for boilerplate code
2021-09-12 18:09:19 -07:00
Leonardo de Moura
bbe6d37109
fix: specialize
2021-09-11 19:52:51 -07:00
Leonardo de Moura
de05b0a038
chore: add Eqns.lean entry point
2021-09-11 13:12:09 -07:00
Leonardo de Moura
1fd3cfb19f
feat: pretty print let_fun
2021-09-11 05:15:11 -07:00
Leonardo de Moura
f26c905130
refactor: split Structural.lean into smaller files
2021-09-11 03:40:51 -07:00
Leonardo de Moura
964095ba6e
chore: clean up before refactoring
2021-09-11 02:58:55 -07:00
Leonardo de Moura
c06ae66c53
feat: add withScope
2021-09-10 19:20:25 -07:00
Leonardo de Moura
5154f462f8
feat: add reduce conv tactic
2021-09-09 17:47:10 -07:00
Leonardo de Moura
496cc92ae9
feat: add simpMatch helper conv tactic
2021-09-09 17:29:32 -07:00
Leonardo de Moura
5a7badd69a
feat: add support for erasing keyed attributes
...
This commit addresses any issue described at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Eq.2Endrec.20vs.20Eq.2Erec
2021-09-09 14:28:41 -07:00
Leonardo de Moura
b5b5370181
feat: add delta to conv mode
2021-09-09 13:07:33 -07:00
Leonardo de Moura
4087525cba
feat: add delta tactic
2021-09-09 13:07:33 -07:00
Leonardo de Moura
cd75132378
refactor: add withLocation combinator
2021-09-09 13:07:33 -07:00
Leonardo de Moura
474395aae4
perf: use binary search
2021-09-08 16:54:54 -07:00
Leonardo de Moura
193d4dc9f5
feat: optimized deriving DecidableEq for enumeration types
...
The proof term is liner on the number of constructors, but type
checking is not linear because the reduction engine in the kernel is
not efficient.
2021-09-08 16:21:32 -07:00
Christian Pehle
bd02f16b43
feat: optimized ``deriving BEq`` for enumeration types
2021-09-08 14:57:21 -07:00
Leonardo de Moura
12af1480d6
feat: add specialize tactic
2021-09-08 08:00:02 -07:00
Leonardo de Moura
445cc3085f
refactor: avoid Name, MVarId, and FVarId confusion
2021-09-07 19:06:50 -07:00
Leonardo de Moura
3714cf16ec
refactor: lazy evaluation for <|>
...
see #617
2021-09-07 17:06:10 -07:00
Leonardo de Moura
55f01fb6e1
feat: elaborate binop_lazy%
2021-09-07 13:30:09 -07:00
Leonardo de Moura
5a862a06c6
chore: remove leftover
2021-09-07 12:57:27 -07:00
Leonardo de Moura
f46eedac84
fix: fixes #655
2021-09-07 12:17:28 -07:00
Leonardo de Moura
d43a1c7d9a
chore: move Constructions to Meta
2021-09-06 10:51:11 -07:00
Leonardo de Moura
a8044eb252
feat: improve Match module for patterns containing Fin and UInt literals
2021-09-05 20:43:40 -07:00
Leonardo de Moura
c3bb948009
feat: ignore nested proofs in patterns
2021-09-05 15:46:03 -07:00
Leonardo de Moura
029c5b74a2
feat: ignore implicit arguments at congr conv tactic
2021-09-05 09:44:52 -07:00
Leonardo de Moura
d3c487ddbf
feat: change lhs and rhs conv tactic semantics
...
They can now be applied to non binary applications.
2021-09-05 09:29:40 -07:00
Leonardo de Moura
aedc706e7d
feat: in modifier at conv tactic
...
It is just a macro for `pattern`
2021-09-04 18:20:33 -07:00
Leonardo de Moura
41cfef5bc4
feat: add pattern conv tactic
2021-09-04 18:02:46 -07:00
Leonardo de Moura
53a3831fd5
feat: add apply conv macro
2021-09-03 20:23:15 -07:00
Leonardo de Moura
94bc386fb4
feat: remark goals as conv goals at the end of nested tactic block
2021-09-03 19:52:51 -07:00
Leonardo de Moura
de455a9010
chore: add tactic' => ... which preserves the conv goal annotation
2021-09-03 19:41:39 -07:00