Commit graph

1748 commits

Author SHA1 Message Date
Leonardo de Moura
22a6b7f1c3 feat(library/blast/congruence_closure): add blast.cc.heq option 2016-01-10 00:15:52 -08:00
Leonardo de Moura
42cdda227a feat(library/congr_lemma_manager): add heterogeneous equality congruence lemmas 2016-01-09 15:41:08 -08:00
Leonardo de Moura
3ca785b0e7 refactor(library/fun_info_manager): remove dead code 2016-01-06 17:29:02 -08:00
Leonardo de Moura
ba392f504f feat(kernel/expr,library/blast/blast,frontends/lean/decl_cmds): add workaround for allowing users to use blast inside of recursive equations 2016-01-03 21:53:31 -08:00
Leonardo de Moura
1fc7bbceb2 chore(frontends/lean/builtin_cmds): handle FixedNoParam in the front-end 2016-01-03 15:18:26 -08:00
Leonardo de Moura
5feef27c2b feat(frontends/lean/notation_cmd): relax restriction on user defined tokens
Before this commit, Lean would forbid new tokens containing '(' or ')'.
We relax this restriction. Now, we just forbid new tokens starting with '(' or ending with ')'.
2016-01-02 13:58:46 -08:00
Leonardo de Moura
4eb2690c32 feat(library/scoped_ext): store set of opened namespaces 2016-01-02 13:35:08 -08:00
Leonardo de Moura
155df48665 feat(library): remove decl_stats
We are not using (and will not use) this module in the blast proof procedures
2016-01-02 13:00:43 -08:00
Leonardo de Moura
54f2c0f254 feat(library/blast/forward): inst_simp should use the left-hand-side as a pattern (if none is provided by the user)
The motivation is to reduce the number of instances generated by ematching.

For example, given

   inv_inv:  forall a, (a⁻¹)⁻¹ = a

the new heuristic uses ((a⁻¹)⁻¹) as the pattern.
This matches the intuition that inv_inv should be used a simplification
rule.

The default pattern inference procedure would use (a⁻¹). This is bad
because it generates an infinite chain of instances whenever there is a
term (a⁻¹) in the proof state.
By using (a⁻¹), we get
   (a⁻¹)⁻¹ = a
Now that we have (a⁻¹)⁻¹, we can match again and generate
   ((a⁻¹)⁻¹)⁻¹ = a⁻¹
and so on
2015-12-31 20:20:39 -08:00
Leonardo de Moura
8c87f90a29 feat(frontends/lean/elaborator): avoid redudant "don't know how to synthesize placeholder" when using flycheck 2015-12-29 18:00:19 -08:00
Leonardo de Moura
b92416d66c refactor(library/error_handling): move error_handling to library main dir 2015-12-29 15:31:40 -08:00
Leonardo de Moura
b117a10f82 refactor(library/blast/simplifier): use priority_queue to store simp/congr lemmas, use name convention used at forward/backward lemmas, normalize lemmas when blast starts, cache get_simp_lemmas 2015-12-28 17:52:57 -08:00
Leonardo de Moura
079a25f770 refactor(library/blast/forward): make sure backward and forward modules use same naming convention 2015-12-28 12:37:16 -08:00
Leonardo de Moura
c8b9c98eb6 refactor(library/blast/backward): use priority_queue, make sure head is normalized when building index 2015-12-28 12:26:06 -08:00
Leonardo de Moura
26d0a62052 refactor(*): make sure we use LEAN_DEFAULT_PRIORITY
We recently implemented the attribute manager.
2015-12-28 10:47:56 -08:00
Leonardo de Moura
f177082c3b refactor(*): normalize metaclass names
@avigad and @fpvandoorn, I changed the metaclasses names. They
were not uniform:
- The plural was used in some cases (e.g., [coercions]).
- In other cases a cryptic name was used (e.g., [brs]).

Now, I tried to use the attribute name as the metaclass name whenever
possible. For example, we write

   definition foo [coercion] ...
   definition bla [forward] ...

and

  open [coercion] nat
  open [forward] nat

It is easier to remember and is uniform.
2015-12-28 10:39:15 -08:00
Leonardo de Moura
96bec8b4f9 fix(frontends/lean/builtin_cmds): allow token and metaclass to have the same name 2015-12-28 09:57:45 -08:00
Leonardo de Moura
f679ce0da9 refactor(frontends/lean): move 'print_cmd' to separate module 2015-12-28 09:08:18 -08:00
Leonardo de Moura
cac10aa728 fix(frontends/lean/parser): allow '...' token to be used in imports
Before this commit, we could not write

           import ...foo.b

We had to write

          import .. .foo.b

or

          import . ..foo.b
2015-12-28 09:08:18 -08:00
Leonardo de Moura
9a6bd96d6b chore(frontends/lean/decl_attributes): style 2015-12-17 22:50:01 -08:00
Leonardo de Moura
40b7cf3ad4 chore(frontends/lean): remove unnecessary tokens 2015-12-17 22:35:12 -08:00
Leonardo de Moura
128b557d37 refactor(frontends/lean): use attribute_manager to simplify decl_attributes 2015-12-17 22:28:53 -08:00
Leonardo de Moura
d81b2d0f29 feat(library/attribute_manager, frontends/lean/builtin_cmds): use attribute manager information when pretty print definitions 2015-12-17 21:16:31 -08:00
Leonardo de Moura
45dbf76df9 refactor(library): add attribute manager 2015-12-17 20:58:15 -08:00
Leonardo de Moura
61ecf018e9 feat(frontends/lean,library/tactic): add easy tactic parsing support for at ... and with ... 2015-12-17 12:18:32 -08:00
Leonardo de Moura
2502039a5c fix(frontends/lean/parser): tactic notation that may take numerical parameters 2015-12-17 11:27:31 -08:00
Sebastian Ullrich
2185ee7e95 feat(library/tactic): make let tactic transparent, introduce new opaque note tactic
The new let tactic is semantically equivalent to let terms, while `note`
preserves its old opaque behavior.
2015-12-14 10:14:02 -08:00
Leonardo de Moura
e3a35ba4fd feat(frontends/lean): add 'with_attributes' tactical
closes #494
2015-12-13 18:27:44 -08:00
Leonardo de Moura
727a4f5a3a feat(library/tactic/intros_tactic): use '_' to say that some names are irrelevant in the intro tactic
See #695
2015-12-13 16:47:31 -08:00
Leonardo de Moura
ce622e9179 feat(frontends/lean): add auto-include for structures and inductive decls 2015-12-13 13:39:34 -08:00
Leonardo de Moura
20de22a8ad feat(frontends/lean): automatically include anonymous instance implicit variables/parameters (whenever their parameters have been included) 2015-12-13 13:20:54 -08:00
Leonardo de Moura
9a4a12899a fix(frontends/lean/pp): make sure pp doesn't group [] arguments 2015-12-13 12:23:22 -08:00
Leonardo de Moura
a9b567296c feat(frontends/lean/parser): add anonymous inst implicit name generator 2015-12-13 11:46:48 -08:00
Leonardo de Moura
d26a83da02 feat(frontends/lean/parser): allow anonymous instance implicit arguments 2015-12-13 11:46:48 -08:00
Leonardo de Moura
7f1800962a feat(frontends/lean/pp): allow user to override pp.all setting
see #922
2015-12-11 10:40:48 -08:00
Leonardo de Moura
ac0bd539b0 feat(frontends/lean/notation_cmd): allow 'abstract ... end' to be used in notation declarations
helps #825
2015-12-11 09:55:27 -08:00
Daniel Selsam
2b1e7e7759 feat(frontends/lean/pp): all disables numerals 2015-12-10 23:31:40 -08:00
Leonardo de Moura
cf61adc5d5 feat(frontends/lean): identifiers starting with '_' are now reserved 2015-12-10 22:32:03 -08:00
Leonardo de Moura
1abaa9eb71 fix(frontends/lean/parser): fixes #858 2015-12-10 10:31:14 -08:00
Leonardo de Moura
725101c777 chore(frontends/lean): cleaup 2015-12-09 12:43:44 -08:00
Floris van Doorn
46739c8b70 feat(hott/algebra): port abstract structures 2015-12-09 12:34:06 -08:00
Leonardo de Moura
3f9549485f feat(frontends/lean/parser): restore config options in the end of sections/namespaces 2015-12-09 11:24:37 -08:00
Leonardo de Moura
cbc3c0cf4f feat(frontends/lean): suppress profiling information for declarations that take less than 0.01 secs to be processed 2015-12-09 10:48:36 -08:00
Leonardo de Moura
0acdcd487b feat(frontends/lean): add 'print aliases' command 2015-12-09 10:39:40 -08:00
Leonardo de Moura
34b944a71e refactor(frontends/lean): remove broken 'migrate' command 2015-12-08 15:40:49 -08:00
Leonardo de Moura
7da64a768f refactor(library/type_context): with the new tracing infrastructure, type_context doesn't need an io_state 2015-12-08 14:58:08 -08:00
Leonardo de Moura
e5a6bc5b85 feat(library/blast/simplifier/simplifier): move to new tracing framework 2015-12-08 12:59:30 -08:00
Leonardo de Moura
6b1469264d feat(library/trace): add new tracing infrastructure 2015-12-08 11:58:03 -08:00
Leonardo de Moura
50df6b5698 feat(frontends/lean): rename '[intro]' ==> '[intro!]' and '[backward]' ==> '[intro]' 2015-12-07 21:33:35 -08:00
Leonardo de Moura
295b1d21f5 feat(frontends/lean): add '[intro]' and '[elim]' annotations 2015-12-07 18:43:15 -08:00