Commit graph

78 commits

Author SHA1 Message Date
Leonardo de Moura
dc6c1e329f refactor(library/init/data/rbmap): use Bool instead of Prop 2019-04-03 02:54:34 -07:00
Leonardo de Moura
e58949e938 chore(library/init/control/id): rename id monad to Id 2019-03-29 16:45:52 -07:00
Leonardo de Moura
6af5f0490e chore(library/init/data/list/basic): cleanup 2019-03-29 16:33:08 -07:00
Sebastian Ullrich
beec014890 feat(library/init/lean/{parser/term,expander}): remove (x : e) → f macro hack and replace with actual parser 2019-03-25 16:12:14 +01:00
Sebastian Ullrich
6ea5f5196e feat(library/init/lean/expander): support Agda-like (a : b) → c syntax 2019-03-24 20:25:11 +01:00
Leonardo de Moura
930653f292 chore(library/init): Unit.star => Unit.unit
@kha Our stdlib is starting to match the names we used in our paper :)
2019-03-22 13:06:45 -07:00
Leonardo de Moura
dfe15cf743 refactor(library/init): use get and set for State EState and Ref
TODO: use the same naming convention for array reads and writes.
2019-03-21 16:34:32 -07:00
Leonardo de Moura
7982420d8d fix(library/init/lean/expander, frontends/lean/lean_elaborator): conversion issues 2019-03-21 15:06:46 -07:00
Sebastian Ullrich
97e5aa2411 chore(library): s/Punit/PUnit/g etc 2019-03-21 15:06:45 -07:00
Leonardo de Moura
1b1946f0e0 fix(library/init/lean/expander): unit => Unit 2019-03-21 15:06:45 -07:00
Leonardo de Moura
2be87ecd92 chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false 2019-03-21 15:06:44 -07:00
Leonardo de Moura
04e20623e6 chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
Leonardo de Moura
67fb78bb47 chore(*): renaming files 2019-03-21 15:06:44 -07:00
Sebastian Ullrich
beda5f5f43 chore(library): capitalize types and namespaces 2019-03-21 15:06:43 -07:00
Sebastian Ullrich
b939162168 chore(library): switch from snake_case to camelCase 2019-03-21 15:06:43 -07:00
Leonardo de Moura
0b7d987699 feat(frontends/lean, library/init/lean): opaque constants
@kha I have added support for opaque constants to the old C++ frontend,
and made sure the new frontend can still parse `library/init/core.lean`.
The kernel should enforce that opaque constants are really opaque, and
the following example should fail
```
constant x : nat := 0
theorem foo : x = 0 := rfl
```
If it doesn't, it is a bug.

Here are some remaining issues:
1- `environment.mk_empty` is currently an axiom because we cannot create
an inhabitant of an opaque type. A possible solution is to use
`option environment` instead of `environment`.

2- There is no support for opaque constants in the new
frontend. However, I modified it to handle axioms, and fixed the literal
values with decl_cmd_kind. I tried to mark some of my changes with
comments, but it is probably much easier for you to just check the
commit change list.

3- I did not add any support for automatically constructing `e`
at `constant x : t := e`. I think we can do this later
after we replace the old frontend with the new one. BTW, it took only a
few minutes to provide the inhabitants manually.
2019-03-15 17:41:44 -07:00
Leonardo de Moura
ecdb9d6df0 feat(library/init, frontends/lean): add abbreviation for abbreviation 2019-03-15 16:01:25 -07:00
Sebastian Ullrich
234e4d1e8a refactor(library/init/lean/elaborator): replace coroutines with explicit state 2019-03-08 15:23:01 +01:00
Sebastian Ullrich
a823157338 fix(library/init/lean/expander): fix let expansion again
Last bug in core.lean!
2019-01-22 11:16:00 +01:00
Sebastian Ullrich
099354eb5f fix(library/init/lean/expander): expansion of parameterized let 2019-01-21 22:07:10 +01:00
Sebastian Ullrich
88534abccd fix(library/init/lean/expander): tuple element order 2019-01-20 16:41:46 +01:00
Sebastian Ullrich
a23df570fc fix(library/init/lean/elaborator): match 2019-01-17 19:57:00 +01:00
Sebastian Ullrich
8cc35b854b feat(library/init/lean/{expander,elaborator}): variable(s) 2019-01-17 17:06:52 +01:00
Sebastian Ullrich
a6d5af7387 feat(library/init/lean/expander): expand class and class inductive 2019-01-16 19:12:40 +01:00
Sebastian Ullrich
ca058a6d8e chore(library/init/lean/expander): simplify constant normalization 2019-01-16 19:12:40 +01:00
Sebastian Ullrich
dce62fc190 fix(library/init/lean/expander): structural substitution instead of abstraction-application when applying notations 2019-01-16 19:12:40 +01:00
Sebastian Ullrich
7aa06338c9 feat(frontends/lean/vm_elaborator): implement inductive 2019-01-14 14:49:40 +01:00
Sebastian Ullrich
fec4502e0f feat(library/init/lean/parser/term): parse and expand sorry 2019-01-07 22:19:47 +01:00
Sebastian Ullrich
2b5f19677d feat(frontends/lean/vm_elaborator): elaborate #check 2019-01-07 22:19:47 +01:00
Sebastian Ullrich
38df819817 fix(library/init/lean/expander): all identifiers in terms should be ident_univs 2019-01-01 23:59:23 +01:00
Sebastian Ullrich
fce5c5bd36 perf(library/init/lean/position): add file_map cache for position conversion 2018-12-20 15:32:46 +01:00
Sebastian Ullrich
0911d16bc3 feat(library/init/lean): compute and show error positions 2018-12-20 14:28:18 +01:00
Sebastian Ullrich
90458de7d0 feat(library/init/lean/expander): normalize type signatures of constants 2018-12-19 15:04:48 +01:00
Sebastian Ullrich
0cf88598d2 feat(library/init/lean/parser/declaration): stricter grammar for universe parameters and non-optional declaration types 2018-12-19 14:41:17 +01:00
Sebastian Ullrich
4f7be93e87 feat(library/init/lean): remove support for section aliases 2018-12-18 17:04:04 +01:00
Sebastian Ullrich
0a63d39247 refactor(library/init/lean): syntax.mk_app'/mk_app ~> syntax.mk_app/mk_capp 2018-12-14 17:37:37 +01:00
Sebastian Ullrich
306da89551 feat(library/init/lean/expander): expand universe( variable)s to multiple universe( variable) commands 2018-12-07 10:31:14 +01:00
Sebastian Ullrich
e7a6746b6a refactor(library/init/lean): share error function between expander and elaborator 2018-12-06 17:03:01 +01:00
Sebastian Ullrich
9c9e642210 feat(library/init/lean/elaborator): universe operators, subtype 2018-12-06 13:23:12 +01:00
Sebastian Ullrich
4b3995fac3 refactor(library/init/lean/parser/term): factor out opt_type parser 2018-12-06 13:23:12 +01:00
Sebastian Ullrich
143ac0e58a feat(library/init/lean/expander): also normalize bracketed binders in e.g. declarations 2018-12-06 13:23:12 +01:00
Sebastian Ullrich
c3f8e219c0 feat(library/init/lean/expander): preresolve global references (not actually used anywhere yet) 2018-11-27 18:02:51 +01:00
Sebastian Ullrich
d9dc4edd31 refactor(library/init/lean/parser/combinators): improve sep_by view 2018-11-27 17:11:14 +01:00
Sebastian Ullrich
ba0feb5daa chore(library/init/lean/expander): comments, minor refactoring 2018-11-27 16:35:20 +01:00
Sebastian Ullrich
89b67a0367 fix(library/init/lean/expander): mk_notation_transformer: reverse substitution list 2018-11-23 17:36:34 +01:00
Sebastian Ullrich
5043a6b9b3 feat(library/init/lean/{expander,elaborator}): show, let, choice 2018-11-22 17:25:46 +01:00
Sebastian Ullrich
7003fb6447 feat(library/init/lean/expander): command-level notations 2018-11-21 18:13:38 +01:00
Sebastian Ullrich
fd121f03bd feat(library/init/lean/expander): make set of transformers configurable 2018-11-21 18:13:38 +01:00
Sebastian Ullrich
d1098534b2 feat(library/init/lean/expander): arrow, if 2018-11-21 18:13:38 +01:00
Sebastian Ullrich
cc93a2eb89 feat(library/init/lean/expander): extend "simple binders" to pi, expand pi 2018-11-21 18:13:38 +01:00