lean4-htt/library/init
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
..
control chore(library/init/control/state): indentation consistency 2019-03-23 19:03:26 -07:00
data refactor(library/init/data/string/basic): String.Pos as Nat 2019-03-26 15:35:52 -07:00
lean refactor(library/init/data/string/basic): String.Pos as Nat 2019-03-26 15:35:52 -07:00
coe.lean chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false 2019-03-21 15:06:44 -07:00
core.lean feat(library/init/core): add != notation 2019-03-25 16:58:01 -07:00
default.lean refactor(library/init): move function.lean definitions to core.lean 2019-03-22 09:33:10 -07:00
env_ext.lean chore(library): capitalize types and namespaces 2019-03-21 15:06:43 -07:00
fix.lean chore(*): small fixes 2019-03-21 15:06:44 -07:00
init.md chore(*.md): fix/remove broken links 2016-02-23 10:11:24 -08:00
io.lean feat(library/init/io): IO.userError 2019-03-22 17:26:43 -07:00
platform.lean chore(library): capitalize types and namespaces 2019-03-21 15:06:43 -07:00
util.lean chore(*): Uint => UInt, Usize => USize 2019-03-21 15:06:44 -07:00
wf.lean chore(library/init/core): avoid {{x : A}} strict implicit arguments, and cleanup 2019-03-23 19:03:26 -07:00