Commit graph

27 commits

Author SHA1 Message Date
Leonardo de Moura
a02443d23d chore(frontends/lean): fun x, e ==> fun x => e 2019-07-02 13:22:11 -07:00
Leonardo de Moura
ab487ea4ac feat(frontends/lean): allow ; instead of in in let-decls 2019-06-27 17:12:03 -07:00
Leonardo de Moura
e00dc873a8 chore(library/pattern_attribute): [pattern] ==> [matchPattern] 2019-06-26 11:26:49 -07:00
Leonardo de Moura
dda0e38802 chore(library/init): avoid local notation 2019-06-24 15:48:11 -07: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
8225146aa2 chore(library/init/core): HasLt => HasLess, HasLe => HasLessEq, ... 2019-03-23 10:07:46 -07:00
Leonardo de Moura
e31c3fde56 chore(library/init): remove dead code, lemma => theorem 2019-03-22 09:27:30 -07:00
Leonardo de Moura
1fe3f14ad0 chore(*): Uint => UInt, Usize => USize 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
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
2c3cfcf1dd feat(library/init/data/char/basic): add char.utf8_size 2019-03-09 10:46:29 -08:00
Leonardo de Moura
c855094ecb feat(library/init/data/char/basic): mark char.of_nat as noinline 2019-02-16 10:45:52 -08:00
Leonardo de Moura
61274c7d35 feat(library/init/data/char): use uint32 instead of nat for defining char 2019-02-15 18:07:55 -08:00
Leonardo de Moura
835b3a10cc chore(library/init): consistent names 2018-11-14 13:08:57 -08:00
Leonardo de Moura
fa9d6b4ddf chore(library/init): missing [inline] and remove unnecessary defs 2018-10-17 08:38:30 -07:00
Leonardo de Moura
71dd8653bc feat(library/init/core): decidable_eq is a proper class
We need this to take advantage of the new indexing structure we are
going to add to improve performance.
2018-09-07 16:38:11 -07:00
Leonardo de Moura
530c437953 feat(library/init/data/char/basic): missing theorems for equation compiler 2018-06-06 08:47:17 -07:00
Leonardo de Moura
3091ca3441 feat(library/init/data/char): use bool instead of Prop for basic char predicates 2018-04-26 13:46:59 -07:00
Leonardo de Moura
f048da4c98 refactor(library/init/data): replace char.zero_lt_d800 proof
See issue https://github.com/leanprover/tc/issues/8

cc @dselsam
2018-02-15 14:36:28 -08:00
Leonardo de Moura
e421808b8c refactor(library/init/data/char, library/init/data/fin): has_lt, has_le for char and fin 2017-11-13 15:09:08 -08:00
Leonardo de Moura
bdc8e1ced8 feat(library/init/data/char): char as an unicode scalar value
TODO: this is the first step to have better unicode support.
2017-10-23 10:55:26 -07:00
Leonardo de Moura
dc1a1c8540 refactor(library): has_to_string ==> has_repr
See issue #1664

This is just the first step to implement proposal described at issue #1664.
2017-06-18 18:29:19 -07:00
Leonardo de Moura
a0a8103804 chore(frontends/lean): go back to 'c' as notation for characters
This suggestion has been discussed at Slack.
We have decided to use #"c" as notation because we wanted to allow `'`
in the beginning of identifiers like in SML and F*. In particular,
we wanted to allow users to use 'a 'b 'c for naming type parameters
like in SML. However, nobody used this notation. In the Lean standard
library, we are using greek letters for naming type parameters.
So, there is no real motivation for the ugly #"c" syntax.
2017-05-02 13:00:51 -07:00
Leonardo de Moura
f6556ecdcc fix(library/init): missing has_sizeof instances for subtype, char and string 2017-04-15 23:31:14 -07:00
Leonardo de Moura
e11fd8820a refactor(library/init): create init.data folder 2016-12-02 14:23:06 -08:00
Renamed from library/init/char.lean (Browse further)