Commit graph

1140 commits

Author SHA1 Message Date
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
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
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
ac57fb9d2a fix(frontends/lean/match_expr): nary match revision 2016-08-10 07:24:10 -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
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
7bb6ccc089 refactor(library/init/meta): qexpr ==> pexpr 2016-08-05 17:04:36 -07:00
Leonardo de Moura
f9b90913a8 chore(tests/lean): fix tests 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
Leonardo de Moura
52b66a1573 chore(frontends/lean/pp, library/pp_options): pp.lazy_abstraction ==> pp.delayed_abstraction 2016-08-03 18:45:47 -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
594c7ca4c5 chore(frontends/lean/find_cmd): remove find_decl command 2016-08-03 17:32:47 -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
4e80094927 feat(frontends/lean/inductive_cmd): use new elaborator in the inductive command 2016-08-03 13:13:12 -07:00
Leonardo de Moura
8993d0738a feat(frontends/lean): remove #elab command
The check command is now using the new elaborator.
2016-08-02 15:05:24 -07:00
Leonardo de Moura
dc44edfd41 feat(frontends/lean): use new elaborator in the 'check' command 2016-08-02 14:57:49 -07:00
Leonardo de Moura
860d333b5e fix(src/library/type_context): unifier first-order approximation 2016-08-02 09:51:18 -07:00
Leonardo de Moura
a1854df9fa test(tests/lean/run/elab_crash1): add new test 2016-08-01 17:26:47 -07:00
Leonardo de Moura
d46e9b411c fix(frontends/lean/elaborator): spurious universe parameters being generated 2016-08-01 08:10:15 -07:00
Leonardo de Moura
5b33c0384d test(tests/lean/run/qexpr1): add test for nested quotes 2016-08-01 07:42:06 -07:00
Leonardo de Moura
da98191256 chore(tests/lean/run): preparing tests for new elaborator 2016-07-31 17:45:43 -07:00
Leonardo de Moura
138d1bb146 fix(library/type_context): missing case 2016-07-31 15:16:52 -07:00
Leonardo de Moura
f461b53a7f refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
Leonardo de Moura
a0589ce8b8 feat(frontends/lean): automatic coercions 2016-07-30 11:53:25 -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
5fe08cb24c fix(simplifier): closes #1093 2016-07-29 10:44:44 -07:00
Leonardo de Moura
a7c8cbc548 feat(frontends/lean/elaborator): add hard coded coercion from bool to Prop 2016-07-28 15:38:22 -07:00
Leonardo de Moura
690e39b261 feat(frontends/lean/elaborator): add checkpoint at typed_expr 2016-07-27 18:08:28 -07:00
Leonardo de Moura
12070e589a feat(frontends/lean/elaborator): elaboration procedure for recursor/eliminator applications 2016-07-27 17:58:18 -07:00
Leonardo de Moura
3af268a95a test(tests/lean/run/elab4): test 'calc'-expressions in the new elaborator 2016-07-27 17:11:34 -07:00
Leonardo de Moura
de9075b19d chore(frontends/lean/builtin_cmds): support 'sorry' at #elab command 2016-07-27 17:09:36 -07:00
Leonardo de Moura
c4953cac43 feat(frontends/lean/elaborator): only use eliminator elaboration is function is fully applied 2016-07-25 17:24:57 -07:00
Leonardo de Moura
05a0061c09 feat(frontends/lean/elaborator): default elaboration for function applications 2016-07-25 15:50:16 -07:00
Leonardo de Moura
9ca065e7ee chore(tests/lean/run/measurable): remove obsolete test 2016-07-23 19:05:22 -07:00
Leonardo de Moura
461b5f289c feat(frontends/lean/elaborator): new elaborator skeleton 2016-07-23 19:02:17 -07:00