Leonardo de Moura
9a071c18e7
feat(library/equations_compiler): add support for partial definitions
2019-03-27 11:09:32 -07:00
Leonardo de Moura
2a37e60ba9
feat(library/init/core): add != notation
2019-03-25 16:58:01 -07:00
Leonardo de Moura
3ad7d2ba81
fix(library/compiler/lcnf): disable transformation for Bool
...
@kha Here is another motivation for re-implementing the equation compiler.
2019-03-25 16:48:11 -07:00
Leonardo de Moura
7db4f60e50
feat(library/init/core): eagerly expanding Decidable.toBool seems to be a bad idea
...
After we erase types and proofs, `Decidable.toBool` can be replaced with
the identity function since `Decidable A` and `Bool` have the same
runtime representation. By eagerly expanding `toBool`, we introduce
unnecessary `cases` expressions.
2019-03-25 16:48:11 -07:00
Leonardo de Moura
4d9150859b
chore(library/init/core): avoid {{x : A}} strict implicit arguments, and cleanup
2019-03-23 19:03:26 -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
2b76d79791
chore(library/init/core): remove more nonsense
2019-03-22 13:14:20 -07: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
3fe5cf1528
chore(library/init/core): remove another weirdness: the bs at bnot, band and bor
2019-03-22 12:57:31 -07:00
Leonardo de Moura
e24ad8c0b5
feat(library/init/core): add HasBeq default instances for types that implement DecidableEq
...
@kha I think code looks less weird if we don't mix Booleans and
propositions in the same expression.
2019-03-22 11:23:45 -07:00
Leonardo de Moura
87b066b87e
refactor(library/init): move function.lean definitions to core.lean
2019-03-22 09:33:10 -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
46cb2436d8
chore(library/init/core): remove dead code, and naming convention
2019-03-22 09:19:28 -07:00
Leonardo de Moura
1ff920f955
chore(library/init/core): remove dead code
2019-03-21 16:24:20 -07:00
Sebastian Ullrich
cf72e97455
chore(library): capitalize more Props
2019-03-21 15:06:45 -07:00
Sebastian Ullrich
c786673837
chore(library/init/core): more renaming
2019-03-21 15:06:45 -07:00
Sebastian Ullrich
7615c9f92f
chore(library/init/core): style review of the first half
2019-03-21 15:06:45 -07:00
Sebastian Ullrich
d5ec4a4606
chore(frontends/lean/pp): ppAnonymousCtor -> ppAsAnonymousCtor
2019-03-21 15:06:45 -07:00
Sebastian Ullrich
b9edaf888f
chore(library/init/core): ne -> Ne, not -> Not
2019-03-21 15:06:45 -07:00
Sebastian Ullrich
97e5aa2411
chore(library): s/Punit/PUnit/g etc
2019-03-21 15:06:45 -07:00
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