lean4-htt/library/init/data
Leonardo de Moura b29fb57fcf refactor(library/init/data/string/basic): String.Pos as Nat
@kha: I initially planned to use the UTF8 API only in very special
cases, but I found them to be super useful. They allow us to implement
an efficient String library mostly in Lean.
However, the there was a problem: `abbrev String.Pos := USize`.
This definition is fine for a low level API, but this is not the case
anymore. By having `String.Pos := USize`, we will not be able to
prove natural theorems for the `String` API. For example,
`String.map id s = s` did not hold. We would have to include the
artificial antecedent `s.length <= usizeMax` (or something like this).
I suspect it would be very painful.
So, this commit defines `String.Pos` as `Nat`. The performance
overhead seems to be very small.
2019-03-26 15:35:52 -07:00
..
array refactor(library/init): move function.lean definitions to core.lean 2019-03-22 09:33:10 -07:00
char chore(library/init/core): HasLt => HasLess, HasLe => HasLessEq, ... 2019-03-23 10:07:46 -07:00
fin chore(library/init/core): HasLt => HasLess, HasLe => HasLessEq, ... 2019-03-23 10:07:46 -07:00
hashmap chore(library/init/core): remove dead code, and naming convention 2019-03-22 09:19:28 -07:00
int feat(library/init/data/string/basic): improve and cleanup String/Substring API 2019-03-25 14:19:10 -07:00
list chore(library/init/core): HasLt => HasLess, HasLe => HasLessEq, ... 2019-03-23 10:07:46 -07:00
nat chore(library/init/core): HasLt => HasLess, HasLe => HasLessEq, ... 2019-03-23 10:07:46 -07:00
option chore(library/init/core): HasLt => HasLess, HasLe => HasLessEq, ... 2019-03-23 10:07:46 -07:00
ordering chore(library/init/core): HasLt => HasLess, HasLe => HasLessEq, ... 2019-03-23 10:07:46 -07:00
rbmap chore(library/init): fix names and add HasEmptyc instances 2019-03-22 12:38:22 -07:00
rbtree chore(library/init): fix names and add HasEmptyc instances 2019-03-22 12:38:22 -07:00
string refactor(library/init/data/string/basic): String.Pos as Nat 2019-03-26 15:35:52 -07:00
basic.lean chore(library): use lowercase in imports 2019-03-21 15:06:44 -07:00
default.lean chore(library): use lowercase in imports 2019-03-21 15:06:44 -07:00
dlist.lean refactor(library/init): move function.lean definitions to core.lean 2019-03-22 09:33:10 -07:00
hashable.lean chore(*): Uint => UInt, Usize => USize 2019-03-21 15:06:44 -07:00
repr.lean feat(library/init/data/string): add Substring 2019-03-25 09:29:06 -07:00
tostring.lean feat(library/init/data/string): add Substring 2019-03-25 09:29:06 -07:00
uint.lean chore(library/init/core): HasLt => HasLess, HasLe => HasLessEq, ... 2019-03-23 10:07:46 -07:00