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
db7b32cf0d
fix(library/init/nat): missing annotations
2016-08-18 11:00:31 -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
6a880d51a4
feat(library/init): define nat.mod in the init folder too
2016-08-18 10:51:40 -07:00
Leonardo de Moura
93d395ecc7
feat(library/init): make sure nat.div is defined in the init folder
2016-08-18 10:48:47 -07:00
Leonardo de Moura
b37c96d2ea
chore(library/init/nat): remove 'local attribute' hack
...
It is not needed anymore. All attributes are now global.
2016-08-18 10:44:33 -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
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
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
095585b61c
feat(library/init): new notation for sum types
2016-08-16 10:45:08 -07:00
Leonardo de Moura
9fe8e09f30
feat(init/reserved_notation): product binds to the right
2016-08-16 10:34:32 -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
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
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
5bdffdf162
feat(library/init/sigma_lex): add rev_lex
2016-08-09 10:36:53 -07:00
Leonardo de Moura
8d2a3fc980
feat(library/init/sigma_lex): add lex_ndep for sigma types
2016-08-09 08:54:13 -07:00
Leonardo de Moura
75904f6dc6
chore(library/init/sigma_lex): cleanup
2016-08-09 08:38:41 -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
Sebastian Ullrich
82657b3b64
refactor(library/compiler/inliner, library): replace inline command with attribute
...
sed -Ei 's/inline (protected )?(meta_)?definition (\S+)/\1\2definition \3 [inline]/' library/**/*.lean
2016-08-08 12:45:22 -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
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
7bb6ccc089
refactor(library/init/meta): qexpr ==> pexpr
2016-08-05 17:04:36 -07:00
Leonardo de Moura
38b81f2656
refactor(library/init/meta): remove base_tactic
...
We don't need it.
2016-08-04 19:17:08 -07:00
Leonardo de Moura
5cc5880a77
refactor(library/init/meta/base_tactic): remove unnecessary option
2016-08-04 19:17:08 -07:00
Leonardo de Moura
22612cff8c
chore(library): disable sigma.mk notation
2016-08-04 10:44:48 -07:00
Daniel Selsam
70a1e53ba8
feat(simplifier/simp_lemmas): take arbitrary list of attributes and cache
2016-08-03 18:04:28 -07:00
Leonardo de Moura
d473622352
refactor(frontends/lean/structure_cmd): remove unnecessary options
2016-08-03 15:48:58 -07:00
Leonardo de Moura
343d423b71
chore(library/init/applicative): make it easier to elaborate
2016-08-03 15:32:43 -07:00
Leonardo de Moura
9ebcd9c2ff
fix(library/init/sigma_lex): closes #1091
2016-08-02 15:53:35 -07:00
Leonardo de Moura
53da866935
feat(library/init/meta/simp_tactic): add tactic for creating empty simp_lemmas
2016-08-02 09:00:49 -07:00
Leonardo de Moura
c1793cd620
feat(library/init/meta/tactic): add 'refine' tactic
2016-07-31 21:17:19 -07:00
Leonardo de Moura
6d0fa806d8
feat(library/tactic/elaborate): convert unassigned metavars into new goals
2016-07-31 20:38:57 -07:00
Leonardo de Moura
12fa52c77d
feat(library/tactic, frontends/lean/elaborator): add to_expr tactic
2016-07-31 20:21:17 -07:00
Leonardo de Moura
f461b53a7f
refactor(library): remove eq.ops namespace
2016-07-31 12:50:11 -07:00
Leonardo de Moura
fafea473b8
feat(frontends/lean/elaborator): coercions to sort
2016-07-30 19:47:04 -07:00
Leonardo de Moura
32eb37472f
feat(library/init/coe): make sure base case is tried before transitive case, add (decidable (coe b)) instance
2016-07-30 11:44:05 -07:00
Leonardo de Moura
2ad5c2ab73
feat(library/init): add has_lift has_coe has_coe_to_fun type classes
2016-07-30 10:11:30 -07:00
Sebastian Ullrich
e090326f98
fix(library): remove classical instances from global scope
2016-07-29 23:44:23 -04:00
Sebastian Ullrich
c4edad0372
feat(frontends/lean, library): remove attribute and metaclass scoping
...
All data is now part of either a global, permanent scope or a local,
temporary one
2016-07-29 23:44:21 -04:00
Leonardo de Moura
de237fa6e4
chore(library/coercion): disable coercion attribute
2016-07-29 13:15:10 -07:00
Leonardo de Moura
7ddf1e817b
chore(frontends/lean): coercions are disabled by default
2016-07-29 13:03:23 -07:00
Daniel Selsam
1b7f70dde9
feat(simplifier): expose simp_lemmas data structure
2016-07-29 10:44:44 -07:00
Daniel Selsam
75145c29ef
refactor(library/smt): move smt files from algebra
2016-07-29 10:44:44 -07:00