Leonardo de Moura
dda0e38802
chore(library/init): avoid local notation
2019-06-24 15:48:11 -07:00
Leonardo de Moura
4ab31275a4
chore(library/init, frontends/lean): remove foldl and foldr notation, and implement list notation in the old parser
2019-06-20 14:32:08 -07:00
Leonardo de Moura
9e73d92e42
chore(library/init): remove instances of scoped notation
2019-06-20 14:08:35 -07:00
Leonardo de Moura
00aa2a3ffe
chore(library/user_recursors): remove [recursor] attribute and environment extension
2019-06-20 11:25:53 -07:00
Leonardo de Moura
1e30f76511
chore(frontends/lean/pp): remove ppAsAnonymousCtor attribute
2019-06-20 11:03:20 -07:00
Leonardo de Moura
0b99a18f97
chore(library): use >> as notation for andthen
...
We have other plans for `;`.
2019-06-20 09:54:53 -07:00
Leonardo de Moura
f5725abb57
refactor(library/init/lean/environment): cleanup and improve
2019-05-10 15:54:29 -07:00
Leonardo de Moura
20285b1079
fix(library/init/core): incorrectly fixing universe level at 1
2019-05-06 18:20:39 -07:00
Leonardo de Moura
0d1a0c8b6e
chore(library): toBool ==> decide
...
We want to define a type class similar to Haskell's `ToBool`.
2019-05-06 14:02:15 -07:00
Leonardo de Moura
82d88dc96f
chore(library/init/core): make sure new frontend can parse it
...
@kha This is a temporary fix. We will get back to the new frontend after
we submit the IR paper.
2019-05-03 17:36:39 -07:00
Sebastian Ullrich
c77970a00f
refactor(library): remove now-redundant parentheses
2019-05-03 13:57:21 +02:00
Leonardo de Moura
abaf181495
refactor(core): homogeneous andthen
...
The motivation is to make sure `andthen` and `orelse` are both
homogeneous.
2019-04-24 14:00:34 -07:00
Leonardo de Moura
2cd3954198
chore(library/init/core): remove misleading annotation
...
The compiler will not try to inline definitions tagged as `@[extern]`.
`strictOr` and `strictAnd` must be handled using the constant folding module.
2019-04-05 16:29:44 -07:00
Leonardo de Moura
5f6106be83
chore(init): add reserve for all control notation at core.lean
...
cc @kha
2019-04-04 08:53:42 -07:00
Leonardo de Moura
5b31f85fcb
chore(library/init/core): add extern for strictAnd and strictOr
2019-03-30 08:04:16 -07:00
Sebastian Ullrich
21f1d231b8
fix(runtime/object): do not return temporary borrowed reference from a builtin
2019-03-29 14:32:15 +01:00
Leonardo de Moura
2943fce8c8
chore(library/init/core): add strictAnd and strictOr
2019-03-28 09:42:12 -07:00
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