Commit graph

3288 commits

Author SHA1 Message Date
Leonardo de Moura
a4577901e8 fix(library/user_recursors): add support for automatically generated recursors 2016-08-21 17:17:48 -07:00
Leonardo de Moura
6aa2ab6538 chore(tests/lean/run/match2): missing test 2016-08-21 15:55:56 -07:00
Daniel Selsam
4f8db64e23 refactor(simplifier): many fixes, extensions, and tests
fix(simplifier): missing simp rule in prop simplifier
fix(library/unfold_macros): do not look for untrusted macros when using sufficient trust level
2016-08-19 14:57:03 -07:00
Leonardo de Moura
7e4f15b0d8 feat(frontends/lean/elaborator): more inaccessible term validation 2016-08-19 14:52:11 -07:00
Leonardo de Moura
e99eb6d47e feat(frontends/lean): revising inaccessible terms syntax again :( 2016-08-19 13:57:12 -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
22b8cb2777 fix(library/type_context): whnf cache bug 2016-08-18 18:04:19 -07:00
Leonardo de Moura
bd67c9cd9f fix(tests/lean/user_attribute): test output 2016-08-18 15:55:55 -07:00
Sebastian Ullrich
21e8c23ed7 feat(library/vm/user_attribute): use command instead of attribute for registering 2016-08-18 15:51:41 -07:00
Sebastian Ullrich
ca8be3857c feat(library/user_attribute): add user-defined attributes and make attribute_manager environment-aware 2016-08-18 12:56:44 -07:00
Leonardo de Moura
cd77f7167e chore(frontends/lean): run_tactic ==> run_command
add `command` as alias for `tactic unit`
2016-08-18 12:53:21 -07:00
Leonardo de Moura
ddc3789929 feat(frontends/lean): add run_tactic command
This commit also adds the tactic `add_decl`.
2016-08-18 10:56:18 -07:00
Leonardo de Moura
7ac58c0715 chore(tests/lean/run): fix tests 2016-08-17 15:46:06 -07:00
Leonardo de Moura
93d48ae620 feat(frontends/lean/parser): revised pattern validation 2016-08-17 15:42:13 -07:00
Daniel Selsam
a9b01991c2 feat(frontends/lean/inductive_cmd): new frontend for the inductive cmd
Conflicts:
	src/frontends/lean/CMakeLists.txt
	src/frontends/lean/structure_cmd.h
2016-08-17 07:34:03 -07:00
Sebastian Ullrich
e548a6311e chore(frontends/lean/print_cmd): change attribute output to new syntax 2016-08-16 13:49:03 -07:00
Sebastian Ullrich
8bbcbb14cf chore(library, tests): use new attribute chaining syntax
sed -E -i 's/(attribute(\s*(\w|\.)+)* \[[^]]+)\] \[/\1, /' {library,tests}/**/*.lean  # repeat as needed
2016-08-16 13:49:03 -07:00
Sebastian Ullrich
cb6a6b642e refactor(library/attribute_manager): remove attribute tokens and use name for attribute names 2016-08-16 13:49:03 -07:00
Leonardo de Moura
0f224ff437 fix(library/tactic/subst_tactic): incorrect depends_on 2016-08-16 11:19:06 -07:00
Leonardo de Moura
c9475774f4 feat(library/tactic/tactic_state): add is_def_eq and is_def_eq_core tactics 2016-08-16 11:08:03 -07:00
Leonardo de Moura
f8e5753a13 feat(library/type_context, library/tactic): add eta-expansion method and tactic 2016-08-14 16:15:12 -07:00
Leonardo de Moura
2354b63099 feat(library/tactic/tactic_state): add whnf_core 2016-08-14 16:02:40 -07:00
Leonardo de Moura
323701bef1 feat(frontends/lean/parser): simplify pattern semantics '_' in a pattern is always a anonymous variable 2016-08-13 22:14:40 -07:00
Leonardo de Moura
f7f564a00a feat(frontends/lean/definition_cmds): postprocessing for parameters 2016-08-13 17:41:05 -07:00
Leonardo de Moura
8ff2876074 fix(frontends/lean/definition_cmds): collect implicit args in the type 2016-08-13 16:54:17 -07:00
Leonardo de Moura
2de3d40910 feat(frontends/lean/definition_cmds): invoke compiler 2016-08-13 16:45:32 -07:00
Leonardo de Moura
0312b84273 feat(frontends/lean/definition_cmds): check noncomputable annotation 2016-08-13 16:33:02 -07:00
Leonardo de Moura
9e3bf4bd8d fix(frontends/lean/elaborator): improve error message for eliminator elaborator 2016-08-13 15:43:44 -07:00
Leonardo de Moura
7d9cf74007 feat(frontends/lean/definition_cmds): basic xdefinition_cmd_core 2016-08-13 15:08:32 -07:00
Sebastian Ullrich
fd2c42a8bf chore(library, tests): switch to new attribute declaration syntax
sed -Ei 's/^(\s*)((private |protected )?(noncomputable )?(abbreviation|definition|meta_definition|theorem|lemma|proposition|corollary)\s+\S+\s*)((\s*\[(\S+(\s+[0-9]+)*|priority.*)\])+)\s*/\1attribute \6\n\1\2/' library/**/*.lean tests/**/*.lean
sed -Ei 's/\s+$//' library/**/*.lean  # remove trailing whitespace
2016-08-12 15:36:12 -07:00
Leonardo de Moura
f3dbd0c69a chore(library): disable stdlib but init and systems folder 2016-08-11 18:42:10 -07:00
Leonardo de Moura
0fcbcb4cce chore(tests/lean): make sure tests only use init and systems.IO 2016-08-11 18:31:33 -07:00
Leonardo de Moura
f6df7fb4d1 chore(tests/lean/run): make sure tests only use init and system.IO 2016-08-11 18:13:00 -07:00
Leonardo de Moura
e38be05717 chore(tests/lean): remove tests with 'exit' 2016-08-11 16:24:33 -07:00
Leonardo de Moura
f003bd8df8 chore(tests/lean): erase old blast tests 2016-08-11 16:18:20 -07:00
Leonardo de Moura
8ba17af50b fix(frontends/lean/builtin_cmds): non-determinism 2016-08-11 08:01:44 -07:00
Leonardo de Moura
ac57fb9d2a fix(frontends/lean/match_expr): nary match revision 2016-08-10 07:24:10 -07:00
Leonardo de Moura
4e307f906f fix(library/init/function): '$' notation should be left-associative 2016-08-09 16:50:36 -07:00
Leonardo de Moura
8c36cd04a3 feat(library/init/sigma_lex): add skip_left relation for sigma 2016-08-09 11:17:12 -07:00
Leonardo de Moura
9ac7ee1624 refactor(library/init): well_founded is not a type class anymore 2016-08-08 14:28:45 -07:00
Leonardo de Moura
1d6b1d381b refactor(library/init): rename measurable to has_sizeof 2016-08-08 13:58:10 -07:00
Leonardo de Moura
1602a53336 feat(frontends/lean): nary match 2016-08-08 10:04:58 -07:00
Leonardo de Moura
1e6b3614ab feat(frontends/lean): new pattern matching validation
@Kha, we now support variable/constant shadowing in patterns.
A constant may occur in a pattern if it is a constructor or tagged with
the new [pattern] attribute. In the standard library, I have tagged
'add', 'zero', 'one', 'bit0', 'bit1' and 'rfl' with this new attribute.
BTW, arbitrary constants and variables may occur nested in type ascriptions and
inaccessible terms.

Here is an example:

     meta_definition tactic_result_to_string {A : Type} : tactic_result A → string
     | (success a s)   := to_string a
     | (exception ⌞A⌟ e s) := "Exception: " ++ to_string (e ())

I had to use the inaccessible ⌞A⌟ in the example above, otherwise, we would be shadowing the parameter
{A : Type}, and we would get a type error.

The new validation is performed at to_pattern_fn (parser.cpp).
2016-08-07 11:31:11 -07:00
Leonardo de Moura
5a38e15c2e test(tests/lean/run/match_expr2): match example with abstract structures 2016-08-06 14:18:08 -07:00
Leonardo de Moura
e52cffd04d feat(library/init/meta/match_tactic): add helper tactics on top of match tactic 2016-08-06 14:13:41 -07:00
Leonardo de Moura
1041f6d9d8 feat(frontends/lean/structure_cmd): private structures 2016-08-06 00:03:06 -07:00
Leonardo de Moura
46570bd51d fix(frontends/lean/structure_cmd): bug when generating alias for S.induction_on in the structure command 2016-08-05 23:13:39 -07:00
Leonardo de Moura
61554f920e test(tests/lean/run/assoc1): mul.assoc example 2016-08-05 18:35:13 -07:00
Leonardo de Moura
b6420904f5 feat(frontends/lean): resolved quoted names 2016-08-05 17:04:36 -07:00
Leonardo de Moura
7bb6ccc089 refactor(library/init/meta): qexpr ==> pexpr 2016-08-05 17:04:36 -07:00