lean4-htt/library/init
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
..
algebra refactor(library): avoid auxiliary definitions such as add/mul/le/etc 2017-05-01 08:52:19 -07:00
category feat(library): instances are not reducible by default anymore 2017-04-26 14:10:11 -07:00
data refactor(library): avoid auxiliary definitions such as add/mul/le/etc 2017-05-01 08:52:19 -07:00
meta refactor(library): avoid auxiliary definitions such as add/mul/le/etc 2017-05-01 08:52:19 -07:00
native refactor(frontends/lean/{elaborator,structure_cmd}): compile structure inheritance to nested fields 2017-04-24 19:35:15 +02:00
.gdb_history chore(library, tests): switch to new attribute declaration syntax 2016-08-12 15:36:12 -07:00
cc_lemmas.lean feat(frontends/lean): use . for field access 2017-03-28 15:29:54 -07:00
classical.lean feat(frontends/lean): add support for t.<id> and t.<idx> when t is a composite term 2017-03-28 17:47:49 -07:00
coe.lean refactor(library/init/data/subtype/basic): rename subtype constructor and projections 2017-03-08 19:31:27 -08:00
core.lean refactor(library): avoid auxiliary definitions such as add/mul/le/etc 2017-05-01 08:52:19 -07:00
default.lean refactor(library/tactic/user_attribute): use attribute for registering attributes. naturally. 2017-03-15 14:06:34 -07:00
function.lean chore(library/init): remove reducible annotations for id, const, etc, and move $ notation to core.lean 2017-03-11 11:34:16 -08:00
funext.lean chore(library/init/data/quot): use Sort instead of Type 2017-03-07 14:29:57 -08:00
init.md chore(*.md): fix/remove broken links 2016-02-23 10:11:24 -08:00
logic.lean feat(library/init/logic): generalize implies_true_iff 2017-03-28 18:44:56 -07:00
propext.lean feat(frontends/lean): add support for t.<id> and t.<idx> when t is a composite term 2017-03-28 17:47:49 -07:00
relator.lean feat(frontends/lean): add support for t.<id> and t.<idx> when t is a composite term 2017-03-28 17:47:49 -07:00
util.lean feat(init/util): tactic.trace-like trace_val function 2017-04-11 17:07:28 -07:00
wf.lean refactor(library): avoid auxiliary definitions such as add/mul/le/etc 2017-05-01 08:52:19 -07:00