Commit graph

967 commits

Author SHA1 Message Date
Leonardo de Moura
47cd475052 feat(library): add debugger 2016-11-16 14:53:13 -08:00
Joe Hendrix
e6d964bef3 feat(library): Port subset of lean2 standard library needed for bitvectors.
This is a minimal port of lean2 libraries needed for the bitvector
library to lean3.
2016-11-15 12:15:49 -08:00
Leonardo de Moura
d97e5b5061 chore(library): remove old files 2016-09-21 11:46:40 -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
095585b61c feat(library/init): new notation for sum types 2016-08-16 10:45:08 -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
9ac7ee1624 refactor(library/init): well_founded is not a type class anymore 2016-08-08 14:28:45 -07:00
Sebastian Ullrich
c3ea0c1852 refactor(frontends/decl_cmds): simplify definition parsing logic
Also restrict syntax to `inline? (private|protected)? noncomputable?`
2016-08-08 12:44:37 -07:00
Leonardo de Moura
1602a53336 feat(frontends/lean): nary match 2016-08-08 10:04:58 -07:00
Leonardo de Moura
a52221d939 chore(library/data): use mk_dec_eq_instance 2016-08-08 09:34:57 -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
22612cff8c chore(library): disable sigma.mk notation 2016-08-04 10:44:48 -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
f461b53a7f refactor(library): remove eq.ops namespace 2016-07-31 12:50:11 -07:00
Leonardo de Moura
264c23a24f chore(library/class): disable [trans_instance] attribute
Conflicts:
	src/library/class.cpp
2016-07-29 23:28:36 -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
Leonardo de Moura
477a137db9 feat(frontends/lean): remove 'using' expressions
Reason: we have include/omit commands
2016-07-28 09:53:27 -07:00
Leonardo de Moura
bdc93cb7f4 refactor(library/init): change subtype notation and put it on the top-level 2016-07-23 12:30:11 -07:00
Leonardo de Moura
0163c1aa5b feat(library/init): use mk_dec_eq_instance in the init folder
We cannot mk_dec_eq_instance everywhere in the init folder because some
dec_eq instances are used to define the tactic mk_dec_eq_instance.
2016-07-20 20:21:58 -04:00
Leonardo de Moura
a66a1df3b0 feat(library/data/map): add map type and test new tactics 2016-07-20 00:09:17 -04:00
Leonardo de Moura
ff59fc39b9 fix(library/data/list/basic): broken proof 2016-07-18 18:48:25 -04:00
Leonardo de Moura
5a96237989 refactor(library/data/list): move dropn to init 2016-07-18 18:14:21 -04:00
Leonardo de Moura
393f926563 refactor(library): move head to init folder 2016-07-16 16:27:30 -04:00
Leonardo de Moura
26bc1602a7 refactor(library): move 'filter' to init folder 2016-07-09 17:23:28 -07:00
Leonardo de Moura
257252e831 chore(library): fix and cleanup 'import' commands 2016-07-07 07:39:26 -07:00
Leonardo de Moura
dce8776cfd refactor(library/fun_info): separate subsingleton information from general param_info 2016-07-07 07:39:26 -07:00
Leonardo de Moura
97719a4c5f refactor(frontends/lean): disable '!' operator, and adjust standard library 2016-07-02 01:41:46 +01:00
Leonardo de Moura
3b6b487e43 feat(library/init/meta/tactic): add 'focus', 'first', 'solve' and LCF-style AND_THEN tactical 2016-06-29 01:07:41 +01:00
Leonardo de Moura
9d7a75d0e2 refactor(library/init): move option (inhabited, decidable_eq and monad) instances to init 2016-06-28 16:37:10 +01:00
Leonardo de Moura
9aa6ac62ec refactor(library): add has_append type class, string concatenation is now an instance of has_append instead of has_add 2016-06-27 08:04:47 +01:00
Leonardo de Moura
583a55c7c3 refactor(library): move 'none', 'some', 'tt', 'ff' to top-level 2016-06-25 12:39:19 -07:00
Leonardo de Moura
9371aa0e99 refactor(library/data/list/basic): move tail to init 2016-06-18 14:27:57 -07:00
Leonardo de Moura
7089762cd6 refactor(library/data/list): move nth to init 2016-06-18 12:40:00 -07:00
Leonardo de Moura
dc2fbe6bfc refacto(library): move prod inhabited and has_decidable_eq instances to init folder 2016-06-18 09:49:22 -07:00
Leonardo de Moura
514c09d7b8 chore(library/data/nat/div): move instances to top-level 2016-06-17 15:36:33 -07:00
Leonardo de Moura
23cd318b1e feat(library/data/option): add monad instance 2016-06-14 15:56:03 -07:00
Leonardo de Moura
c2c4593648 chore(library): unit.star ==> () 2016-06-08 17:31:44 -07:00
Leonardo de Moura
31e066633c chore(library): fix dependencies 2016-06-06 16:43:43 -07:00
Leonardo de Moura
f60d088572 feat(library/init): add 'has_to_string' type class 2016-05-26 10:43:26 -07:00
Leonardo de Moura
d96b3e0172 chore(library/data/hlist): make sure we can generate code for hlist.get 2016-05-25 17:53:17 -07:00
Leonardo de Moura
9530f716f9 refactor(library): move list.is_inhabited instance to init folder 2016-05-25 17:26:42 -07:00
Leonardo de Moura
1bce20c322 feat(library/init): make sure list, char and string decidable_eq instances are defined in the init folder 2016-05-25 15:16:12 -07:00
Leonardo de Moura
d22d850b28 refactor(library): redefine string and char 2016-05-24 14:11:24 -07:00
Leonardo de Moura
9dfc5ed787 chore(library/data): make sure we can generate code for the modified functions 2016-05-23 17:50:01 -07:00
Leonardo de Moura
413a0faf99 chore(library/data/nat/bquant): make sure we can generate code for bsub_succ 2016-05-23 17:50:01 -07:00
Leonardo de Moura
a208f9473c refactor(library): reorder and rename decidable constructors
Motivation: make sure the "false" case will have constructor idx 0.
2016-05-10 17:30:22 -07:00
Leonardo de Moura
54f68226f4 chore(frontends/lean): disable old tactic framework and blast 2016-04-25 16:22:15 -07:00