lean4-htt/library/init/lean/parser
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
..
basic.lean refactor(library/init/data/string/basic): simplify String.Iterator 2019-03-25 07:57:12 -07:00
combinators.lean fix(library/init/lean/parser/combinators): (x) -> e should not be a dependent function 2019-03-26 11:26:39 +01:00
command.lean chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
declaration.lean chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
identifier.lean chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
level.lean chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
module.lean refactor(library/init/data/string/basic): simplify String.Iterator 2019-03-25 07:57:12 -07:00
notation.lean chore(library/init/data/dlist): Dlist => DList 2019-03-21 17:03:22 -07:00
parsec.lean refactor(library/init/data/string/basic): String.Pos as Nat 2019-03-26 15:35:52 -07:00
pratt.lean refactor(library/init/data/string/basic): simplify String.Iterator 2019-03-25 07:57:12 -07:00
rec.lean feat(library/init/lean): improving options 2019-03-24 09:30:20 -07:00
stringliteral.lean chore(*): lowercase file names 2019-03-21 15:06:44 -07:00
syntax.lean refactor(library/init/data/string/basic): simplify String.Iterator 2019-03-25 07:57:12 -07:00
term.lean fix(library/init/lean/parser/combinators): (x) -> e should not be a dependent function 2019-03-26 11:26:39 +01:00
token.lean refactor(library/init/data/string/basic): simplify String.Iterator 2019-03-25 07:57:12 -07:00
trie.lean refactor(library/init/data/string/basic): simplify String.Iterator 2019-03-25 07:57:12 -07:00