Commit graph

4791 commits

Author SHA1 Message Date
Leonardo de Moura
88844f6261 chore(src/library/user_recursors): add missing include 2015-06-28 12:53:48 -07:00
Leonardo de Moura
2f75768243 feat(library/tactic/rewrite_tactic): fail when nothing is rewritten
fixes #686
2015-06-28 12:05:00 -07:00
Leonardo de Moura
d1eaa7bcda feat(frontends/lean/parse_rewrite_tactic): accept trailing comman in rewrite tactic
see issue #695
2015-06-28 11:45:30 -07:00
Leonardo de Moura
4a4ef48344 fix(frontends/lean/parse_rewrite_tactic): fixes #691 2015-06-28 11:28:05 -07:00
Leonardo de Moura
869ad261c5 fix(frontends/lean/elaborator): fixes #689 2015-06-27 16:19:38 -07:00
Leonardo de Moura
8616ed096e fix(library/composition_manager): typo 2015-06-27 14:12:26 -07:00
Leonardo de Moura
ca0aa4eb47 feat(library/composition_manager): simplify compositions of the form (mk ... (proj (mk ...)) ...)
closes #666
2015-06-27 14:07:32 -07:00
Leonardo de Moura
3fa1829b22 feat(frontends/lean/migrate_cmd): add profile for migrate command 2015-06-27 14:07:32 -07:00
Leonardo de Moura
3215af3926 feat(frontends/lean): add '[trans-instance]' attribute
see issue #666
2015-06-27 14:07:29 -07:00
Leonardo de Moura
430dc21a28 feat(library/composition_manager): disable conversion optimization for automatically generated compositions
see issue #666
2015-06-27 14:07:22 -07:00
Leonardo de Moura
bd0e9d958d feat(library/tc_multigraph): shorter names for transitive edges
see issue #666
2015-06-27 14:07:15 -07:00
Leonardo de Moura
859ef441a0 feat(library/class): transitive instances
see issue #666
2015-06-27 14:06:56 -07:00
Leonardo de Moura
68785b8bed fix(library/tactic/generalize_tactic): fixes #711 2015-06-26 19:35:30 -07:00
Leonardo de Moura
6da49b1d56 fix(shell/lean): fixes #710 2015-06-26 19:15:47 -07:00
Leonardo de Moura
1886b71c17 fix(library/unifier): fixes #705 2015-06-26 19:10:46 -07:00
Leonardo de Moura
e3e9220ab9 fix(library/tactic/rewrite_tactic): fixes #708 2015-06-26 18:41:08 -07:00
Leonardo de Moura
c61e6f6595 feat(library/unifier): add new rule for constraints of the form (pr ...) =?= t, where (pr ...) is a "stuck" projection application 2015-06-26 17:18:29 -07:00
Leonardo de Moura
0b7859f387 feat(library,frontends/lean): add support for projections in the elaborator
The idea is to simulate the computation rules such as

    pr1 (mk a b) ==> a

in the elaborator
2015-06-26 17:18:29 -07:00
Leonardo de Moura
31a4ee2ac3 fix(library/inductive_unifier_plugin): avoid potential assertion violation 2015-06-26 17:18:29 -07:00
Leonardo de Moura
a680114fd8 fix(library/tactic/rewrite_tactic): potential crash in the rewrite tactic 2015-06-26 17:18:29 -07:00
Floris van Doorn
c8eee66c5b feat(hott/relation): add equivalence closure of a relation 2015-06-25 22:31:41 -04:00
Floris van Doorn
ea0f57aef5 feat(hott): various clean-up and small additions 2015-06-25 22:31:40 -04:00
Leonardo de Moura
5581b735f4 feat(library/constants.txt): add poly_unit and poly_unit.star 2015-06-25 17:36:34 -07:00
Floris van Doorn
fa1979c128 feat(datatypes): let the type of unit be the lowest non-Prop universe
The definitional package (brec_on and cases_on) now use poly_unit instead of unit

closes #698
2015-06-25 17:33:46 -07:00
Leonardo de Moura
919c4ea8ee feat(frontends/lean/calc_proof_elaborator): cleanup communication between unifier and calc_proof_elaborator 2015-06-24 14:14:44 -07:00
Leonardo de Moura
a2389fb664 refactor(kernel/default_converter): move delay_check code to postpone_is_def_eq method 2015-06-22 13:59:32 -07:00
Leonardo de Moura
76477aedd1 refactor(kernel): move is_stuck predicate to converter 2015-06-22 11:37:14 -07:00
Leonardo de Moura
5687c24944 refactor(library/tactic/induction_tactic): cleanup 2015-06-22 10:23:54 -07:00
Leonardo de Moura
54496709a2 refactor(kernel/default_converter): add virtual method reduce_def_eq
The idea is to allow us to customize the default converter outside of
the kernel.
2015-06-22 10:04:19 -07:00
Leonardo de Moura
a518a45239 refactor(kernel/default_converter): separate lazy_delta_reduction procedure 2015-06-22 08:45:05 -07:00
Leonardo de Moura
1c70514231 feat(frontends/lean/structure_cmd): disable conversion optimization for automatically generated coercions 2015-06-21 16:57:37 -07:00
Leonardo de Moura
aeea8f83c4 feat(library/composition_manager): check if existing definition is definitionally equal 2015-06-21 16:53:08 -07:00
Leonardo de Moura
e3062c64e2 feat(util/timeit): avoid scientific notation when displaying runtimes 2015-06-21 14:52:27 -07:00
Leonardo de Moura
b8243934de feat(library/tc_multigraph): finish transitive closed multigraph 2015-06-20 20:25:20 -07:00
Leonardo de Moura
3626bd83bf refactor(util/sexpr/format): remove format constructors using std::initializer_list
For some reason lean.js (Lean compiled using emscripten) crashes when
this kind of constructor is used.
2015-06-20 14:02:18 -07:00
Leonardo de Moura
d28c26b6eb feat(util/sexpr/format): small change
The idea is to avoid unnecessary memory allocations.
It may also help with the lean.js problem we are fighting with.
2015-06-19 21:21:28 -07:00
Leonardo de Moura
c6ad37a651 chore(src/library/tc_multigraph): fix typo 2015-06-19 21:12:11 -07:00
Leonardo de Moura
38394d85dd fix(util/sexpr/format): potential access memory violation 2015-06-19 20:26:35 -07:00
Leonardo de Moura
accc9dc38b chore(util/sexpr/format): remove unnecessary method 2015-06-19 20:11:42 -07:00
Leonardo de Moura
6872761c67 fix(library/tc_multigraph): typos 2015-06-19 20:11:31 -07:00
Leonardo de Moura
1f753aeccb feat(library): add tc_multigraph skeleton 2015-06-19 20:05:05 -07:00
Leonardo de Moura
70fc05294b refactor(library/local_context): avoid hack in local_context 2015-06-18 15:41:00 -07:00
Leonardo de Moura
694eef7f6a fix(util/sexpr/format): retract change that may be creating problems for emscripten 2015-06-18 10:49:13 -07:00
Leonardo de Moura
42c236eb2e chore(shell/emscripten): fix style 2015-06-18 10:23:49 -07:00
Leonardo de Moura
a24b06254b test(tests/shell): add unit test for emscripten_shell 2015-06-18 10:20:26 -07:00
Leonardo de Moura
a6fe4cbce6 refactor(shell): move emscripten_shell to a separate file 2015-06-18 09:53:23 -07:00
Leonardo de Moura
a4c0699e81 feat(library/tactic/constructor_tactic): restore 'constructor' tactic old semantics, add 'fconstructor' tactic
See issue #676

Add new test demonstrating why it is useful to have the old semantics
for 'constructor'
2015-06-17 23:48:54 -07:00
Leonardo de Moura
bf71d9f342 fix(library/tactic/rewrite_tactic): fixes #682 2015-06-17 18:49:02 -07:00
Leonardo de Moura
2109dff46a feat(frontends/lean): remove unnecessary flag 2015-06-17 17:23:20 -07:00
Leonardo de Moura
ce8f2a1674 feat(library/class): allow any constant to be marked as a class
closes #679
2015-06-17 16:26:45 -07:00
Leonardo de Moura
9e6e406f73 feat(frontends/lean): add '#compose' command for testing composition manager 2015-06-17 14:42:25 -07:00
Leonardo de Moura
c59e1f49db feat(library): add composition manager 2015-06-17 14:41:50 -07:00
Leonardo de Moura
14c33c4e01 feat(kernel/error_msgs): add workaround for issue #669
This issue should fix the new problem reported at #669.
It only disables beta-reduction in the pretty printer for application
type mismatch at (f n) when f is a lambda expression.
2015-06-17 12:00:25 -07:00
Leonardo de Moura
f60cdee14b fix(library/tactic/rewrite_tactic): memory leak 2015-06-16 15:47:21 -07:00
Leonardo de Moura
0ae24faae3 feat(library/tactic/constructor_tactic): use 'fapply' in 'constructor' tactic
closes #676
2015-06-16 12:03:31 -07:00
Leonardo de Moura
2277b170f6 feat(library/tactic/exact_tactic): use 'append' instead of 'orelse' at eassumption 'tactic' 2015-06-16 11:58:10 -07:00
Leonardo de Moura
169f956143 fix(library/tactic): remove dead code 2015-06-16 11:57:37 -07:00
Leonardo de Moura
d8620ef4c9 fix(kernel,library,frontends/lean): improve error messages
see #669
2015-06-14 19:44:00 -07:00
Leonardo de Moura
8699d2dfb7 feat(library/tactic/rewrite_tactic): display list of overloads occurring in a failed rewrite step 2015-06-14 16:30:18 -07:00
Leonardo de Moura
382d4d32b7 feat(frontends/lean): 'override' command and '#<namespace> <expr>' notation also override aliases
Before this commit they were only overriding notation declarations.
2015-06-14 15:48:36 -07:00
Leonardo de Moura
01f8f3c11d fix(frontends/lean): memory access violation 2015-06-14 15:37:45 -07:00
Leonardo de Moura
45684588cc fix(frontends/lean/nested_declaration): compilation error in debug mode 2015-06-13 13:10:10 -07:00
Leonardo de Moura
8a85e4ee87 feat(frontends/lean/builtin_cmds): improve print <id> when <id> is a not yet revealed theorem
We add a remark saying the command `reveal <id>` should be used to
access `<id>` definition.
2015-06-13 12:12:22 -07:00
Leonardo de Moura
591fb91f34 fix(frontends/lean/builtin_cmds): fixes #671 2015-06-13 11:35:03 -07:00
Leonardo de Moura
9fbf267a3f feat(library/tactic/rewrite_tactic): when 'rewrite' step fails apply esimp and try again
closes #670
2015-06-12 19:48:58 -07:00
Leonardo de Moura
3d9b557cfd feat(frontends/lean): allow the user to mark subterms that should be automatically abstracted into new definitions
closes #484
2015-06-12 17:49:26 -07:00
Leonardo de Moura
7bad9fe554 feat(library/error_handling/error_handling): set 'pp.beta' to false when displaying errors
see issue #669
2015-06-12 14:46:51 -07:00
Leonardo de Moura
4694f47ea4 refactor(frontends/lean/decl_attributes): move decl_attributes to a separate module 2015-06-12 13:38:57 -07:00
Leonardo de Moura
69be4c720c fix(library/tactic/subst_tactic): bug in 'subst' tactic 2015-06-12 12:11:44 -07:00
Leonardo de Moura
25cbc5c154 fix(kernel/expr): remove 'cast_binder_info'
We should put it back when we decide to implement it.
We also fix the bogus comment at src/frontends/lean/parser.cpp.

see issue #667
2015-06-11 18:11:22 -07:00
Leonardo de Moura
8b7dc4e03a feat(frontends/lean): apply eta-reduction in postprocessing step
Perhaps, we should add an option to disable this new feature.

Remark: this commit makes commit 46d418a redundant.
I'm keeping 46d418a because we may retract this commit in the future.
2015-06-10 16:29:30 -07:00
Leonardo de Moura
f64784378a fix(frontends/lean/pp): make pp_have more robust
We should not assume the argument of a have_annotation is a lambda.
2015-06-10 16:26:20 -07:00
Leonardo de Moura
8b062b4448 feat(kernel/default_converter): add support for stuck terms at try_eta_expansion_core 2015-06-10 15:19:39 -07:00
Leonardo de Moura
ca43f6e62e refactor(frontends/lean): add postprocess procedure and cleanup 2015-06-10 15:19:35 -07:00
Leonardo de Moura
4b91cfccff feat(frontends/lean/builtin_exprs): make notation ( e : T ) builtin
In the previous approach, the following (definitionally equal) term was being generated

       (fun (A : Type) (a : A), a) T e
2015-06-10 14:52:59 -07:00
Leonardo de Moura
46d418af3d feat(library/abbreviation): apply eta-reduction when expanding abbreviations 2015-06-10 14:52:59 -07:00
Leonardo de Moura
f3d50963ce fix(library/idx_metavar): compilation problem in debug mode 2015-06-09 14:37:17 -07:00
Leonardo de Moura
e3a0e62859 fix(library/unifier): try to generate approximate solution for flex-flex constraints before discarding them
fixes #662
2015-06-09 14:36:31 -07:00
Leonardo de Moura
f7dd85a935 chore(*): fix 'breif' typos 2015-06-08 16:54:55 -07:00
Leonardo de Moura
627e05c9e6 fix(library/tactic/rewrite_tactic): improve krewrite 2015-06-08 16:46:28 -07:00
Leonardo de Moura
d6a483fe84 feat(library): add idx_metavar module 2015-06-08 16:02:37 -07:00
Leonardo de Moura
496189feed feat(kernel/default_converter): cache failures for (f t =?= f s) heuristic
See item 4 at
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/lean-discuss/oJXwW5wT2Ds/d1Dgr8B-pE0J

See also
https://github.com/leanprover/lean/pull/659
2015-06-08 10:41:30 -07:00
Leonardo de Moura
0e099b5fd8 feat(library/tactic/rewrite_tactic): apply beta&eta reduction before rewriting steps, add option 'rewrite.beta_eta' (default true) to control new feature. 2015-06-06 20:43:52 -07:00
Leonardo de Moura
1cbace9df6 feat(library/tactic/congruence_tactic): add congruence lemma generator
The generated congruence theorems ignore arguments that are subsingleton types.
2015-06-05 22:00:10 -07:00
Leonardo de Moura
d0d3f9bb41 refactor(kernel,library,frontends/lean): add helper functions, and cleanup collect_locals 2015-06-05 17:29:36 -07:00
Leonardo de Moura
c76d92284f feat(library/pp_options): add 'pp.all' option 2015-06-05 08:41:46 -07:00
Leonardo de Moura
4d52d4c790 fix(library/init/quot): prove quot.exact 2015-06-05 08:04:55 -07:00
Floris van Doorn
ff41886a32 feat(nat/bquant): give instances for quantification bounded with le
also add theorems c_iff_c to logic/connectives, where c is a connective
2015-06-04 20:14:13 -04:00
Floris van Doorn
ff01774fd7 renaming(hit): rename type_quotient to quotient, and quotient to set_quotient
This renaming is because type_quotient is a nonstandard name.  I've had a discussion with Egbert
Rijke, Steve Awodey and Dan Licata, and the consensus for a better name was 'quotient'.  I had to
make changes in src/kernel/hits/hits.cpp, I renamed g_type_quotient* by g_hit_quotient* (to avoid
name clash the standard library quotient, although I don't know whether that name clash would
matter).
2015-06-04 20:14:13 -04:00
Leonardo de Moura
134740182d fix(frontends/lean): fixes #652 2015-06-03 21:53:51 -07:00
Leonardo de Moura
c8ad1874a2 fix(library/util): compilation error in debug mode 2015-06-03 17:39:03 -07:00
Leonardo de Moura
68688ecdf6 fix(library/tactic/subst_tactic): in the standard mode, use dependent elimination in the subst tactic (when needed)
Before this commit, the subst tactic was producing an type incorrect
result when dependent elimination was needed (see new test for an example).
2015-06-03 17:36:04 -07:00
Leonardo de Moura
dce86b3a84 feat(library/init/logic): add 'eq.drec' (in standard Lean) with a signature very similar to eq.rec in the HoTT library 2015-06-03 17:29:26 -07:00
Leonardo de Moura
cfb102cbd1 fix(emacs/lean-mode): disable electric-indent-mode
closes #636
2015-06-01 22:42:57 -07:00
Leonardo de Moura
b2f8d2000c fix(library/simplifier/rewrite_rule_set): avoid compiler specific behavior 2015-06-01 22:23:34 -07:00
Leonardo de Moura
d6997300f1 fix(library/private): use environment fingerprint to compute private decls "unique" identifier
fixes #648
2015-06-01 22:21:31 -07:00
Leonardo de Moura
4ace996057 fix(library/simplifier): bug in is_permutation_ceqv 2015-06-01 18:07:31 -07:00
Leonardo de Moura
0fbc944cdd feat(frontends/lean): add '[rewrite]' attribute 2015-06-01 17:58:24 -07:00
Leonardo de Moura
d547698a56 refactor(library,library/tactic): move class_instance_synth to library
This module will be needed by the simplifier
2015-06-01 16:30:40 -07:00
Leonardo de Moura
8a89588079 refactor(library,library/tactic): move auxiliary procedures from tactic to library 2015-06-01 16:19:55 -07:00