Leonardo de Moura
ff9500d7f9
feat(library/exception): add nested_exception
2016-09-06 12:57:06 -07:00
Leonardo de Moura
d8caecff49
refactor(library/exception): avoid throw_generic_exception functions
2016-09-06 12:37:56 -07:00
Leonardo de Moura
a0b8766ffb
refactor(library): merge exception modules
2016-09-06 09:12:26 -07:00
Leonardo de Moura
120bffce25
chore(library/equations_compiler/elim_match): add cases/induction tactic error message to trace
2016-09-04 17:33:26 -07:00
Leonardo de Moura
029766495b
feat(library/equations_compiler/util): try to improve performance of lemma generation
...
There are still performance problems. Lemma generation is fine, but the
kernel is timing out when checking the lemma. We need to provide hints
to the kernel to avoid the performance problem.
2016-09-03 13:24:44 -07:00
Leonardo de Moura
cfbffb41ef
feat(library/equations_compiler): prove equation lemmas that use if-then-else
2016-09-03 13:23:09 -07:00
Leonardo de Moura
4d7c233684
feat(library/equations_compiler/elim_match): use if-then-else when next pattern for every equation is a variable or value
2016-09-03 13:22:25 -07:00
Leonardo de Moura
6dcf0725d7
fix(library/equations_compiler): erase inaccessible annotations
2016-09-02 14:11:03 -07:00
Leonardo de Moura
13f0d4e09a
refactor(library/equations_compiler): new equation lemma generation
...
The idea is to generate a lemma based on the left-hand-side provided by
the user. This feature is essential for supporting the derived inductive
datatype constructors.
2016-09-02 14:04:09 -07:00
Leonardo de Moura
7724fbed93
fix(library/equations_compiler/elim_match): do not use constructor transition for below arguments
2016-09-02 12:51:39 -07:00
Leonardo de Moura
b3d78208be
fix(library/equations_compiler/elim_match): typo
2016-09-02 12:39:21 -07:00
Leonardo de Moura
3e4d8d0f75
fix(library/equations_compiler/elim_match): dead variable
2016-09-02 12:39:05 -07:00
Leonardo de Moura
bf096eb292
chore(library/equations_compiler/structural_rec): "lemmas" ==> "equations"
2016-09-02 11:17:38 -07:00
Leonardo de Moura
691b200244
feat(library/equations_compiler/util): add [eqn_sanitizer] attribute for defeq lemmas that should be automatically applied
2016-09-02 11:06:31 -07:00
Leonardo de Moura
3384139d38
chore(library/tactic/defeq_simplifier): improve error messages
2016-08-31 17:52:36 -07:00
Leonardo de Moura
54fd9adb47
feat(library/equations_compiler): use defeq simplifier to cleanup types of automatically synthesized lemmas
2016-08-31 15:54:03 -07:00
Leonardo de Moura
51a338d9a1
fix(library/equations_compiler/structural_rec): support for reflexive inductive datatypes
2016-08-31 10:46:32 -07:00
Leonardo de Moura
924c98832b
feat(library/equations_compiler/structural_rec): generate eqn lemmas at structural_rec
2016-08-31 09:07:17 -07:00
Leonardo de Moura
33514dd6ea
feat(library/equations_compiler/structural_rec): process aux lemmas
2016-08-30 20:09:57 -07:00
Leonardo de Moura
2fc0e5fa05
feat(library/equations_compiler/structural_rec): add aux definition
2016-08-30 18:33:24 -07:00
Leonardo de Moura
253fcdcc51
fix(library/equations_compiler/elim_match): equation lemma generation
2016-08-30 15:00:43 -07:00
Leonardo de Moura
001991dbeb
feat(frontends/lean): use equations_header
2016-08-30 13:45:59 -07:00
Leonardo de Moura
230db1bc92
feat(library/equations_compiler/structural_rec): generate brec_on-based function
...
We still need to generate lemmas and induction principle.
2016-08-29 15:58:13 -07:00
Leonardo de Moura
f1f45cc2b7
feat(library/equations_compiler/structural_rec): better support for structural recursion (based on brec_on)
...
For example, before this commit, structural_rec would not support the
function to_nat defined below.
```
set_option new_elaborator true
inductive foo : bool → Type
| Z : foo ff
| O : foo ff → foo tt
| E : foo tt → foo ff
definition to_nat : ∀ {b}, foo b → nat
| .ff Z := 0
| .tt (O n) := to_nat n + 1
| .ff (E n) := to_nat n + 1
```
2016-08-29 10:51:09 -07:00
Leonardo de Moura
b08af16d5f
refactor(library/equations_compiler): remove unnecessary abstraction
...
We changed how we are going to process derived inductive datatypes.
2016-08-29 09:25:01 -07:00
Leonardo de Moura
b317d4bc58
refactor(library/tactic): add hsubstitution module
2016-08-29 08:19:05 -07:00
Leonardo de Moura
1a675d69fc
refactor(library/tactic/induction_tactic,library/tactic/cases_tactic): replace name_map<name> with substitutions at induction_tactic
...
This commit also removes dead code from cases_tactic
2016-08-28 14:09:22 -07:00
Leonardo de Moura
f0f9880ece
refactor(library/equations_compiler/elim_match,library/tactic/cases_tactic):
...
new design for elim_match
I still need to fix lemma generation, and refactor induction/subst tactics
2016-08-28 13:15:10 -07:00
Leonardo de Moura
95e8228e8a
refactor(library/tactic/cases_tactic): improve low-level API
2016-08-25 16:34:40 -07:00
Leonardo de Moura
cf15218eea
chore(library/equations_compiler/compiler): add new trace option
2016-08-25 10:45:08 -07:00
Leonardo de Moura
41b6358de6
chore(library/equations_compiler/elim_match): add helper methods
2016-08-25 10:44:50 -07:00
Leonardo de Moura
7851b9c097
fix(frontends/lean/definition_cmds): parameter handling
2016-08-23 21:13:54 -07:00
Leonardo de Moura
a93eada058
feat(library/type_context): improved (and simplified) cache management for type_context
2016-08-23 17:56:58 -07:00
Leonardo de Moura
27e06c80ba
feat(library/equations_compiler/elim_match): generate auxiliary definition and lemmas for match
2016-08-22 17:59:54 -07:00
Leonardo de Moura
d8447b4c53
feat(library/equations_compiler/elim_match): add noequation transition
2016-08-22 13:53:35 -07:00
Leonardo de Moura
714817edd5
fix(library/equations_compiler/util): missing get_constructors_of
2016-08-22 13:42:34 -07:00
Leonardo de Moura
963503838c
fix(library/equations_compiler/util): support for noequation
2016-08-22 13:42:03 -07:00
Leonardo de Moura
9ad64e9176
feat(library/equations_compiler/elim_match): complete transition
2016-08-22 13:23:51 -07:00
Leonardo de Moura
e81d92006b
feat(library/equations_compiler/elim_match): try to use user-provided names in the variable transition
2016-08-21 22:20:31 -07:00
Leonardo de Moura
038a250798
feat(library/equations_compiler/elim_match): add skip transition for inaccessible terms
2016-08-21 22:11:28 -07:00
Leonardo de Moura
9c55ede671
fix(library/equations_compiler/elim_match): constructor transition
2016-08-21 21:49:45 -07:00
Leonardo de Moura
67dc68b24d
feat(library/equations_compiler/elim_match): add variable/constructor transitions
2016-08-21 15:56:32 -07:00
Leonardo de Moura
2d90c73546
chore(library/equations_compiler/util): add helper method
2016-08-21 15:55:56 -07:00
Leonardo de Moura
ab6ea747ad
feat(library/equations_compiler/elim_match): elim_match main recursion skeleton
2016-08-19 09:25:13 -07:00
Leonardo de Moura
ccf0021cff
fix(library/equations_compiler/elim_match): cover more cases in value transition
2016-08-19 07:59:17 -07:00
Leonardo de Moura
9f77ca1ab1
feat(library/equations_compiler/elim_match): add is_value_transition
2016-08-18 22:03:01 -07:00
Leonardo de Moura
06b02e4912
chore(library/equations_compiler): test elim_match on nonrec equations
2016-08-18 21:00:57 -07:00
Leonardo de Moura
e68fbbc12c
chore(library/equations_compiler/elim_match): fix style and test output
2016-08-18 18:09:36 -07:00
Leonardo de Moura
7cbc178a32
feat(library/equations_compiler): add transition classifiers
2016-08-18 17:55:30 -07:00
Leonardo de Moura
ec433a193c
feat(library/equations_compiler/elim_match): add primitive for tracing intermediate states when eliminating dependent pattern matching
2016-08-18 15:36:13 -07:00