lean4-htt/src/library/tactic
Leonardo de Moura 5cef84709f refactor(library): avoid auxiliary definitions such as add/mul/le/etc
See Section "Other goodies" at
https://github.com/leanprover/lean/wiki/Refactoring-structures

This commit also improves the support for projections in the
unifier/matcher.

Now, we consider the extra case-split for projections.
Given a projection `proj`, and the constraint `proj s =?= proj t`, we need to try first `s =?= t` and if it fails, then try to reduce.
This is needed in the standard library because we now have constraints such as:
```
@has_le.le ?A ?s ?a ?b  =?=  @has_le.le nat nat.has_add x y
```
If we reduce the right hand side, we get the unsolvable constraint
```
@has_le.le ?A ?s ?a ?b  =?=  nat.le x y
```
Before this change, the constraint was `@le ?A ?s ?a ?b  =?=  @le nat nat.has_add x y`, and we already perform a case-split in this case.
Moreover, projections were eagerly reduced whenever possible.
The extra case-split generates a performance problem in several tests. For example `fib 8 = 34` was timing out.
I worked around this issue by performing the case-split only when the constraint contains meta-variables.
There are also minor issues. Example. `<` is notation for `has_lt.lt`, but `>` is for `gt`.
2017-05-01 08:52:19 -07:00
..
backward chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
smt refactor(library): avoid auxiliary definitions such as add/mul/le/etc 2017-05-01 08:52:19 -07:00
ac_tactics.cpp fix(library/tactic/ac_tactics): allow nested ac_app macros in perm_ac macro 2017-03-08 13:46:49 -08:00
ac_tactics.h fix(library/module): deadlock? 2016-12-29 17:56:50 -08:00
app_builder_tactics.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
app_builder_tactics.h
apply_tactic.cpp chore(library/tactic): make sure "pattern" is the first argument of is_def_eq 2017-04-25 09:59:04 -07:00
apply_tactic.h
assert_tactic.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
assert_tactic.h feat(library/init/meta/smt_tactic): add assert/assertv/define/definev/pose/note for smt_tactic 2017-01-03 17:12:00 -08:00
cases_tactic.cpp fix(library/tactic): we should preserve names when using the revert/do_something/intro idiom 2017-03-11 12:20:39 -08:00
cases_tactic.h fix(library/equations_compiler/elim_match): skip nonvar + inaccessible 2017-03-21 08:08:36 -07:00
change_tactic.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
change_tactic.h feat(library/init/meta): smt_tactic skeleton 2016-12-31 18:22:23 -08:00
clear_tactic.cpp fix(library/tactic/subst_tactic): fixes #1467 2017-03-17 19:54:35 -07:00
clear_tactic.h
CMakeLists.txt fix(library/tactic): fixes #1513 2017-04-15 11:34:24 -07:00
congr_lemma_tactics.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
congr_lemma_tactics.h
destruct_tactic.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
destruct_tactic.h feat(library/tactic): add destruct tactic that is similar to cases, but does not use revert/intro/clear 2016-12-30 17:05:24 -08:00
dsimplify.cpp feat(library/tactic/dsimplify): replace assigned metavariables 2017-04-02 12:49:29 -07:00
dsimplify.h feat(library/tactic/dsimplify): replace assigned metavariables 2017-04-02 12:49:29 -07:00
elaborate.cpp feat(library/tactic/elaborator_exception): show context of failed placeholders 2017-03-27 13:42:08 -07:00
elaborate.h feat(library/tactic): store name of current declaration in tactic_state 2017-01-28 08:27:19 +01:00
elaborator_exception.cpp feat(library/tactic/elaborator_exception): show context of failed placeholders 2017-03-27 13:42:08 -07:00
elaborator_exception.h feat(library/tactic/elaborator_exception): show context of failed placeholders 2017-03-27 13:42:08 -07:00
eqn_lemmas.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
eqn_lemmas.h feat(library/tactic/smt/smt_state): add tactic for adding equational lemmas for a definition 2017-01-05 15:47:58 -08:00
eval.cpp fix(library/tactic/eval,kernel/kernel_exception): hide internal definition name on eval_expr type error 2017-03-27 13:42:08 -07:00
eval.h
exact_tactic.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
exact_tactic.h
fun_info_tactics.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
fun_info_tactics.h
generalize_tactic.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
generalize_tactic.h
gexpr.cpp
gexpr.h
hsubstitution.cpp
hsubstitution.h
induction_tactic.cpp fix(library/type_context): fixes #1500 2017-03-31 19:19:44 -07:00
induction_tactic.h
init_module.cpp fix(library/tactic): fixes #1513 2017-04-15 11:34:24 -07:00
init_module.h
intro_tactic.cpp fix(library/tactic): we should preserve names when using the revert/do_something/intro idiom 2017-03-11 12:20:39 -08:00
intro_tactic.h fix(library/tactic): we should preserve names when using the revert/do_something/intro idiom 2017-03-11 12:20:39 -08:00
kabstract.cpp feat(library/tactic): add options trace.rewrite and trace.kabstract for debugging rewrite tactic 2017-03-27 18:18:20 -07:00
kabstract.h
match_tactic.cpp feat(library/tactic/match_tactic): return also assignments for universe meta-variables 2017-02-17 20:08:09 -08:00
match_tactic.h
norm_num_tactic.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
norm_num_tactic.h
occurrences.cpp
occurrences.h
revert_tactic.cpp fix(library/type_context): fixes #1500 2017-03-31 19:19:44 -07:00
revert_tactic.h fix(library/type_context): fixes #1500 2017-03-31 19:19:44 -07:00
rewrite_tactic.cpp feat(library): instances are not reducible by default anymore 2017-04-26 14:10:11 -07:00
rewrite_tactic.h
simp_lemmas.cpp feat(library): instances are not reducible by default anymore 2017-04-26 14:10:11 -07:00
simp_lemmas.h feat(library/init/meta/smt_tactic): allow user to select simp attribute to be used during SMT preprocessing, use preprocessing at intros too 2017-01-01 22:26:26 -08:00
simp_result.cpp
simp_result.h
simplify.cpp feat(library): process explicit arguments before implicit 2017-04-25 17:16:06 -07:00
simplify.h feat(library/tactic/simplify): add eta := tt to simp 2017-03-27 17:38:40 -07:00
subst_tactic.cpp fix(library/type_context): fixes #1500 2017-03-31 19:19:44 -07:00
subst_tactic.h feat(inductive_compiler): generate injectivity lemmas 2017-03-10 22:27:18 -08:00
tactic_state.cpp feat(library/vm/process): add basic process support 2017-03-28 18:08:06 -07:00
tactic_state.h chore(util,kernel,library): clang warnings 2017-02-17 20:01:34 -08:00
unfold_tactic.cpp chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
unfold_tactic.h refactor(library/tactic/unfold_tactic): add dunfold C++ function 2017-02-04 16:33:12 -08:00
user_attribute.cpp refactor(frontends/lean/{elaborator,structure_cmd}): compile structure inheritance to nested fields 2017-04-24 19:35:15 +02:00
user_attribute.h feat(library/init/meta/smt_tactic): allow user to select simp attribute to be used during SMT preprocessing, use preprocessing at intros too 2017-01-01 22:26:26 -08:00
vm_monitor.cpp fix(library/tactic/vm_monitor): compilation warning 2017-03-22 07:40:16 -07:00
vm_monitor.h