Sebastian Ullrich
c77970a00f
refactor(library): remove now-redundant parentheses
2019-05-03 13:57:21 +02:00
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
e4f36d14ac
chore(library/init/control/combinators): remove weird List.mmap' alias for List.mfor
2019-03-29 11:09:47 -07:00
Leonardo de Moura
b66f5dcf5c
chore(library/init): avoid wf_term_hack
2019-03-27 12:12:21 -07:00
Leonardo de Moura
1c671965c5
feat(library/init/lean/options): add registerOption
2019-03-22 17:26:43 -07:00
Leonardo de Moura
dc73d5443d
refactor(library/init/lean): add MData abbreviation
2019-03-22 17:26:43 -07:00
Leonardo de Moura
3befc219c9
chore(library/init): Empty => empty when it is a function
2019-03-21 17:03:15 -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
Sebastian Ullrich
97e5aa2411
chore(library): s/Punit/PUnit/g etc
2019-03-21 15:06:45 -07:00
Leonardo de Moura
1fe3f14ad0
chore(*): Uint => UInt, Usize => USize
2019-03-21 15:06:44 -07:00
Leonardo de Moura
79a8d9aa65
chore(*): decidablePred/decidableRel => DecidablePred/DecidableRel
2019-03-21 15:06:44 -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
f8113a01eb
chore(library): unit => Unit
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
f7aeeaf237
exclude export/extern, translate constants.txt
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
d5180ffa17
fix(library/init/lean/elaborator): make sure new frontend can parse the latest core.lean
2019-03-18 15:47:05 -07:00
Sebastian Ullrich
e19ed79414
feat(shell/lean): pass environment to and from Lean, remove environment.mk_empty axiom
...
/cc @leodemoura
I didn't remove the implementation of `environment.mk_empty`, we may want to use
it in tests.
2019-03-16 19:27:16 +01: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
Leonardo de Moura
a78c773f37
feat(library/init/lean): unsafe support in the new frontend
2019-03-15 15:49:03 -07:00
Leonardo de Moura
51838aede9
refactor(library/init/lean/parser/rec): use init.fix
2019-03-12 08:31:58 -07:00
Sebastian Ullrich
234e4d1e8a
refactor(library/init/lean/elaborator): replace coroutines with explicit state
2019-03-08 15:23:01 +01:00
Leonardo de Moura
0d4da4bc76
fix(library/init/lean/elaborator): borrow annotations
...
@kha I see you found this problem too :)
2019-03-07 10:26:40 -08:00
Sebastian Ullrich
0e01871182
fix(library/init/lean/elaborator): re-add borrow annotations
2019-03-07 15:51:40 +01:00
Sebastian Ullrich
ed4a0d904d
feat(library/init/lean/elaborator): make meta, remove max_commands
2019-03-06 16:26:21 +01:00
Sebastian Ullrich
587a7a001a
feat(library/init/lean/elaborator): to_pexpr: support string literals
2019-02-14 14:07:05 -08:00
Sebastian Ullrich
dbc470d7e4
feat(library/init/lean/{parser/term,elaborator}): support @& borrowed annotations
2019-02-14 14:07:05 -08:00
Sebastian Ullrich
7cffe6935e
feat(frontends/lean/vm_elaborator): port to new runtime
2019-02-14 14:07:05 -08:00
Leonardo de Moura
f20c132ced
feat(library/init/lean/elaborator): use extern attribute
2019-02-12 11:40:21 -08:00
Leonardo de Moura
bc4e06666b
chore(*): avoid 0-ary extern declarations
2019-02-11 13:21:17 -08:00
Sebastian Ullrich
0846cc2aa0
fix(library/init/lean/elaborator): to_level
2019-01-22 11:16:00 +01:00
Sebastian Ullrich
abf60e3242
feat(library/init/lean/elaborator): include
2019-01-21 18:09:18 +01:00
Sebastian Ullrich
53d9cb5358
fix(library/init/lean/elaborator): resolve idents after 'attribute'
2019-01-21 17:47:17 +01:00
Sebastian Ullrich
c22fbb5cde
feat(library/init/lean,frontends/lean/vm_elaborator): set_option
2019-01-20 18:21:41 +01:00
Sebastian Ullrich
b24796d98e
feat(library/init/lean/elaborator): inaccessible
2019-01-20 16:41:33 +01:00
Sebastian Ullrich
69e363446d
fix(library/init/lean/{parser/term,elaborator}): local notations override previous notations
2019-01-20 16:25:15 +01:00
Sebastian Ullrich
fc7acc9898
fix(library/init/lean/elaborator): choice
2019-01-20 14:39:22 +01:00
Sebastian Ullrich
dcd3b3dc5d
fix(library/init/lean/elaborator): section variables need to be preresolved as well
...
In
```
section binary
variables {α : Type u} {β : Type v}
variable f : α → α → α
local infix * := f
def commutative := ∀ a b, a * b = b * a
end binary
```
the expansion of `*` applies a macro scope to `f`, so we need to resolve it
before that
2019-01-20 13:22:08 +01:00
Sebastian Ullrich
1708fc74f8
fix(library/init/lean/elaborator): structure instances
2019-01-19 15:35:11 +01:00
Sebastian Ullrich
a23df570fc
fix(library/init/lean/elaborator): match
2019-01-17 19:57:00 +01:00
Sebastian Ullrich
3e8e823893
fix(frontends/lean/vm_elaborator): preserve internal name of section variables
2019-01-17 19:57:00 +01:00
Sebastian Ullrich
85cad3a7f1
fix(library/init/lean/elaborator): equation heads
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
0923a2cbae
refactor(library/init/lean/elaborator): avoid deprecated expr locals in new elaborator state
2019-01-17 12:29:44 +01:00
Sebastian Ullrich
c338245536
feat(library/init/lean/elaborator): implement the only part of open/export
2019-01-16 19:49:44 +01:00
Sebastian Ullrich
2c4b566038
feat(frontends/lean/vm_elaborator): implement equations
2019-01-16 19:12:40 +01:00