Package char-def: Definition of Unicode characters
Information
name | char-def |
version | 1.106 |
description | Definition of Unicode characters |
author | Joe Leslie-Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2015-04-28 |
checksum | 3797ebadf18387480392bf9c2d9a7fecaa957a47 |
requires | base natural-bits |
show | Data.Bool Data.Char Number.Natural Probability.Random |
Files
- Package tarball char-def-1.106.tgz
- Theory source file char-def.thy (included in the package tarball)
Defined Type Operator
- Data
- Char
- char
- Char
Defined Constants
- Data
- Char
- dest
- destPlane
- destPosition
- invariant
- mk
- plane
- position
- random
- Char
Theorems
⊦ ∀a. mk (dest a) = a
⊦ ∀c. plane c = destPlane (dest c)
⊦ ∀c. position c = destPosition (dest c)
⊦ ∀r. invariant r ⇔ dest (mk r) = r
⊦ ∀n. destPlane n = Bits.shiftRight n 16
⊦ ∀n. destPosition n = Bits.bound n 16
⊦ ∀n.
invariant n ⇔
let pl ← destPlane n in
let pos ← destPosition n in
pl < 17 ∧ pos < 65534 ∧
(pl = 0 ⇒ ¬(55296 ≤ pos ∧ pos < 57344) ∧ ¬(64976 ≤ pos ∧ pos < 65008))
⊦ ∀r.
random r =
let n0 ← Uniform.random 1111998 r in
let n1 ← if n0 < 55296 then n0 else n0 + 2048 in
let n2 ← if n1 < 64976 then n1 else n1 + 32 in
let pl ← n2 div 65534 in
let pos ← n2 mod 65534 in
let n ← pos + Bits.shiftLeft pl 16 in
mk n
External Type Operators
- →
- bool
- Number
- Natural
- natural
- Natural
- Probability
- Random
- random
- Random
External Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- cond
- ⊥
- ⊤
- Bool
- Number
- Natural
- *
- +
- <
- ≤
- bit0
- bit1
- div
- even
- mod
- suc
- zero
- Bits
- Bits.bound
- Bits.shiftLeft
- Bits.shiftRight
- Uniform
- Uniform.random
- Natural
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ bit0 0 = 0
⊦ ∀n. 0 ≤ n
⊦ ⊥ ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ ⊥
⊦ (∃) = λp. p ((select) p)
⊦ ∀t. (∀x. t) ⇔ t
⊦ ∀t. (λx. t x) = t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. ¬¬t ⇔ t
⊦ ∀t. (⊤ ⇔ t) ⇔ t
⊦ ∀t. (t ⇔ ⊤) ⇔ t
⊦ ∀t. ⊥ ∧ t ⇔ ⊥
⊦ ∀t. ⊤ ∧ t ⇔ t
⊦ ∀t. t ∧ ⊤ ⇔ t
⊦ ∀t. ⊥ ⇒ t ⇔ ⊤
⊦ ∀t. ⊤ ⇒ t ⇔ t
⊦ ∀t. ⊥ ∨ t ⇔ t
⊦ ∀t. ⊤ ∨ t ⇔ ⊤
⊦ ∀n. ¬(suc n = 0)
⊦ ∀n. 0 + n = n
⊦ ∀m. m + 0 = m
⊦ ∀k. Bits.bound 0 k = 0
⊦ ∀k. Bits.shiftRight 0 k = 0
⊦ ∀t. (⊥ ⇔ t) ⇔ ¬t
⊦ ∀t. (t ⇔ ⊥) ⇔ ¬t
⊦ ∀t. t ⇒ ⊥ ⇔ ¬t
⊦ ∀n. bit1 n = suc (bit0 n)
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀n. even (suc n) ⇔ ¬even n
⊦ ∀m. m ≤ 0 ⇔ m = 0
⊦ ∀n. bit0 (suc n) = suc (suc (bit0 n))
⊦ ∀t1 t2. t1 ∨ t2 ⇔ t2 ∨ t1
⊦ ∀m n. m + n = n + m
⊦ ∀n. 2 * n = n + n
⊦ ∀m n. ¬(m < n ∧ n ≤ m)
⊦ ∀m n. ¬(m ≤ n ∧ n < m)
⊦ ∀m n. ¬(m ≤ n) ⇔ n < m
⊦ ∀m n. suc m ≤ n ⇔ m < n
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀p. ¬(∃x. p x) ⇔ ∀x. ¬p x
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀m n. m + suc n = suc (m + n)
⊦ ∀m n. suc m + n = suc (m + n)
⊦ ∀m n. suc m = suc n ⇔ m = n
⊦ ∀m n. even (m * n) ⇔ even m ∨ even n
⊦ ∀m n. even (m + n) ⇔ even m ⇔ even n
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀m n. m ≤ n ⇔ m < n ∨ m = n
⊦ ∀m n. m ≤ n ∧ n ≤ m ⇔ m = n
⊦ ∀m n. m < n ⇔ ∃d. n = m + suc d
⊦ ∀m n. m ≤ suc n ⇔ m = suc n ∨ m ≤ n
⊦ ∀m n. m * n = 0 ⇔ m = 0 ∨ n = 0
⊦ ∀p. p 0 ∧ (∀n. p n ⇒ p (suc n)) ⇒ ∀n. p n
⊦ ∀m n p. m * n = m * p ⇔ m = 0 ∨ n = p
⊦ ∀m n p. m * n ≤ m * p ⇔ m = 0 ∨ n ≤ p
⊦ ∀m n p. m * n < m * p ⇔ ¬(m = 0) ∧ n < p