lean4-htt/library/init/lean
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
..
compiler fix(library/compiler/llnf): constructor reuse 2019-03-26 11:10:51 -07:00
parser refactor(library/init/data/string/basic): String.Pos as Nat 2019-03-26 15:35:52 -07:00
config.lean chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
declaration.lean chore(library/init/lean/declaration): naming convention 2019-03-23 09:28:38 -07:00
default.lean chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
disjoint_set.lean chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
elaborator.lean feat(library/init/lean/options): add registerOption 2019-03-22 17:26:43 -07:00
expander.lean feat(library/init/lean/{parser/term,expander}): remove (x : e) → f macro hack and replace with actual parser 2019-03-25 16:12:14 +01:00
expr.lean feat(library/init/lean/options): add registerOption 2019-03-22 17:26:43 -07:00
extern.lean refactor(library/init/data/string/basic): simplify String.Iterator 2019-03-25 07:57:12 -07:00
format.lean feat(library/init/lean): improving options 2019-03-24 09:30:20 -07:00
frontend.lean fix(library/init/lean/frontend): naming style misrenamings 2019-03-23 23:09:55 +01:00
kvmap.lean feat(library/init/lean): improving options 2019-03-24 09:30:20 -07:00
level.lean feat(library/init/lean): improving options 2019-03-24 09:30:20 -07:00
message.lean chore(library/init): Empty => empty when it is a function 2019-03-21 17:03:15 -07:00
name.lean feat(library/init/lean): improving options 2019-03-24 09:30:20 -07:00
name_mangling.lean chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
options.lean feat(library/init/lean): improving options 2019-03-24 09:30:20 -07:00
position.lean refactor(library/init/data/string/basic): simplify String.Iterator 2019-03-25 07:57:12 -07:00
trace.lean feat(library/init/lean): improving options 2019-03-24 09:30:20 -07:00
util.lean chore(library): unit => Unit 2019-03-21 15:06:44 -07:00