Leonardo de Moura
94bca2b9d8
chore(library/init): mimize use of notations
2019-06-24 15:48:11 -07:00
Leonardo de Moura
bbe93c036d
feat(library/init/data/string): add Substring
2019-03-25 09:29:06 -07:00
Leonardo de Moura
1fe3f14ad0
chore(*): Uint => UInt, Usize => USize
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
2ea0baeb99
chore(library): use lowercase in imports
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
b939162168
chore(library): switch from snake_case to camelCase
2019-03-21 15:06:43 -07:00
Leonardo de Moura
402034df1f
chore(library/init/data): move usize to uint
2019-03-09 10:32:23 -08:00
Leonardo de Moura
ff54bf337a
fix(library/init/data/repr): ultra inefficient to_digits
...
It was very inefficient, and was producing stack overflows for big numbers.
2019-02-05 13:36:13 -08:00
Leonardo de Moura
17cb9b4532
chore(library/init/data/repr): remove unnecessary definition
2018-10-17 12:32:38 -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
b07c718425
refactor(library/init/core): change ite signature
2018-09-17 14:27:28 -07:00
Sebastian Ullrich
80745ba776
chore(library/init/data/string/basic): rename string.iterator's next_to_string to remaining_to_string
...
The old name implied that `curr` was not part of its result
2018-07-05 10:42:37 +02:00
Leonardo de Moura
0c785f8ab7
feat(library/init/data): add instances for has_repr (id A) and has_to_string (id A)
2018-05-10 17:37:57 -07:00
Leonardo de Moura
d85c30fde1
perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible]
...
Without these annotations, Lean will timeout when trying to synthesize
the type class instance `decidable_eq uint32`. The type class resolution
problem will produce the unification problem:
```
decidable (@eq uint32 a b) =?= decidable (@eq usize ?x ?y)
```
which Lean tries to solve by assigning `?x := a`.
During the assignment, the types of `?x` and `a` are unified with "full
force". Thus, we get the constraint
```
usize_sz =?= uint32_sz
```
which will take forever to be solved when peforming the computation in
unary arithmetic.
Remark: this commit also makes sure that `type_context` will not unfold
irreducible definitions when trying to unify/match the types.
The new test `type_class_performance1.lean` exposes the problem fixed
by this commit.
2018-05-07 18:07:04 -07:00
Leonardo de Moura
d5fe509c36
chore(*): remove end after each match-expression
...
`end` is not optional anymore
2018-05-04 11:30:06 -07:00
Leonardo de Moura
ff7e691d66
feat(library/vm): add support for system.platform.nbits in the VM
2018-05-03 15:54:54 -07:00
Leonardo de Moura
65e3c96b28
chore(library/init): remove sum micro module
2018-04-30 09:25:26 -07:00
Leonardo de Moura
2503d6026e
chore(library/init): remove prod micro module
2018-04-30 09:25:25 -07:00
Leonardo de Moura
e9d4780ccb
chore(library/init): remove subtype micro module
2018-04-30 09:25:25 -07:00
Leonardo de Moura
21d9409629
feat(library/init/data): modify unit has_to_string and has_repr instances
2018-04-27 13:39:19 -07:00
Leonardo de Moura
ba633df7e7
chore(library/init/data): add missing instances
2018-04-27 13:39:19 -07:00
Leonardo de Moura
e602ac873a
feat(library/init): modify && and || precedence
...
The idea is to match the precedence used in regular programming
languages, where `x = y || x = z` is parsed as `(x = y) || (x = z)`.
This commit also adds `!x` as notation for `bnot x`
2018-04-26 13:40:57 -07:00
Leonardo de Moura
50328d62e1
feat(library/init/data): add uint16 and make sure uint* - uses wraparound semantics like most programming languages
2018-04-20 18:27:13 -07:00
Leonardo de Moura
1ad1080f11
refactor(library): keep only basic nat theorems
...
All theorems are proved without using the tactic framework.
Thus, we can define `fin/uint32/uint64` types and their operations
before we define the tactic framework.
2018-04-11 16:47:54 -07:00
Sebastian Ullrich
734ee66514
fix(library/string): unicode char literals
2017-10-27 09:48:09 -07:00
Gabriel Ebner
2e142d87ae
fix(library/init/data/repr): give correct implementation of nat.repr
2017-06-19 16:20:27 +02: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