Commit graph

143 commits

Author SHA1 Message Date
Leonardo de Moura
79a8d9aa65 chore(*): decidablePred/decidableRel => DecidablePred/DecidableRel 2019-03-21 15:06:44 -07:00
Leonardo de Moura
0b5862b6ce chore(*): and => And 2019-03-21 15:06:44 -07:00
Leonardo de Moura
4c50859129 chore(*): or => Or 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
67fb78bb47 chore(*): renaming files 2019-03-21 15:06:44 -07:00
Leonardo de Moura
485abe7a10 chore(library/init/core): we can parse core.lean
@kha
2019-03-21 15:06:43 -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
15d89b24a3 feat(library/compiler): [init] attribute
TODO: use attribute when emitting code in the backends.
2019-03-18 15:33:29 -07:00
Leonardo de Moura
8f6444c76a chore(library/init/core): remove todo 2019-03-16 18:42:37 -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
Leonardo de Moura
0888dee25e chore(*): meta ==> unsafe 2019-03-15 15:04:40 -07:00
Leonardo de Moura
4e04d373e4 feat(library/init): unicode notation for heq: ≅ 2019-03-07 10:21:14 -08:00
Leonardo de Moura
79521e7e49 feat(library/init/core): add has_beq type class 2019-03-07 10:21:14 -08:00
Leonardo de Moura
67b01cddd0 chore(library/init): heq notation == ==> ~= 2019-03-07 10:21:14 -08:00
Leonardo de Moura
170579c803 feat(library/init/core): task builting primitives 2019-02-17 08:45:46 -08:00
Leonardo de Moura
456ed23cc2 feat(library/init): use extern when declarating nat primitives 2019-02-12 18:12:29 -08:00
Leonardo de Moura
7b0227572f fix(library/init/core): missing borrowed annotation 2019-02-11 16:01:56 -08:00
Leonardo de Moura
1703255330 fix(library/init/core): we simulate the unused attribute feature using extern inline 2019-02-11 11:38:24 -08:00
Sebastian Ullrich
d444b5ef49 chore(library/init/core): move sorry_ax up (temporarily) to get error recovery sooner 2019-01-15 17:42:09 +01:00
Leonardo de Moura
733bbc521f feat(library/init/core): mark thunk and task primitives with [noinline]
In the future, we should use the `[builtin]` attribute which cannot be
overwritten by the user.
2018-11-02 13:54:40 -07:00
Leonardo de Moura
1af1a8996b chore(library/init/core): classical.some ==> classical.choose
To avoid confusion with `option.some`.
2018-10-17 09:04:52 -07: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
338038a05e feat(library/init/core): add inline identity function 2018-10-10 18:17:29 -07:00
Leonardo de Moura
eb51b9ef26 chore(library/init/core): avoid . as end-of-command and empty equations 2018-10-05 17:30:27 -07:00
Sebastian Ullrich
959948b901 feat(library/init/lean): even more core.lean progress 2018-10-03 16:00:08 -07:00
Leonardo de Moura
761db5bc7e chore(library/init/core): remove obsolete lemmas
We don't need them anymore.
2018-10-01 14:17:11 -07:00
Sebastian Ullrich
e261d8f222 perf(library/init): missing [inline] attributes 2018-10-01 11:53:38 -07:00
Leonardo de Moura
a2ee4552fb chore(library/init/core): add inline annotations 2018-09-30 08:21:11 -07:00
Leonardo de Moura
923c8ea9a3 chore(library/init/core): missing @[inline] 2018-09-29 16:21:42 -07:00
Leonardo de Moura
0e4c5d932e feat(library/init/core): missing @[macro_inline] 2018-09-29 16:12:40 -07:00
Sebastian Ullrich
945bf39e05 feat(library/init/lean): progress 2018-09-28 20:50:18 -07:00
Sebastian Ullrich
64a6341751 chore(library/init/core): remove has_inv 2018-09-28 20:50:18 -07:00
Sebastian Ullrich
ba1da61dd0 chore(library/init/core): avoid unquoted notation symbol 2018-09-28 13:08:24 -07:00
Leonardo de Moura
7f64033111 chore(library/init): remove all occurrences of parameter command
We will not support the `parameter` command in Lean 4.
It is seldom used and creates many complications.
2018-09-26 17:54:11 -07:00
Leonardo de Moura
a31f12d8cd chore(library/init/core): revert ite+thunks modification
We don't need it since we marked `ite` as `[macro_inline]`
2018-09-23 19:27:06 -07:00
Leonardo de Moura
ad82ad69ec feat(library/init/core): cleanup bor and band 2018-09-23 19:27:06 -07:00
Leonardo de Moura
dd046b0e0a feat(library/init/core): mark id_rhs as [macro_inline] 2018-09-23 19:27:06 -07:00
Leonardo de Moura
d43f9627c2 feat(library/init/core): use [macro_inline] to get shortcircuit semantics in new compiler stack 2018-09-23 19:27:06 -07:00
Leonardo de Moura
54f04dca9f feat(library/init/core): use cases_on instead of rec_on 2018-09-18 15:25:15 -07:00
Leonardo de Moura
b07c718425 refactor(library/init/core): change ite signature 2018-09-17 14:27:28 -07:00
Leonardo de Moura
871e7de673 chore(library/init/core): move auxiliary constants to beginning of the file 2018-09-16 11:02:17 -07:00
Leonardo de Moura
9f2d543209 chore(library/init/core): hide arguments for lc_proof, lc_cast and lc_unreachable 2018-09-12 11:00:05 -07:00
Leonardo de Moura
d5d926b0ef feat(library/compiler/lcnf): eliminate no_confusion 2018-09-12 10:40:09 -07:00
Leonardo de Moura
9b21287a3e feat(library/compiler/lcnf): add lean compiler normal form 2018-09-11 18:10:10 -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
c48eaed9a4 chore(library): remove relation_manager 2018-09-07 12:35:04 -07:00