@[reducible]
- val : ℕ
- valid : is_valid_char self.val
The char
type represents an unicode scalar value.
See http://www.unicode.org/glossary/#unicode_scalar_value).
Instances for char
- char.has_sizeof_inst
- char.has_sizeof
- char.has_lt
- char.has_le
- char.inhabited
- char.has_repr
- char.has_to_string
- char.has_to_format
@[protected, instance]
@[protected, instance]
Equations
- a.decidable_lt b = a.val.decidable_lt b.val
@[protected, instance]
Equations
- a.decidable_le b = a.val.decidable_le b.val
Equations
- char.of_nat n = dite (is_valid_char n) (λ (h : is_valid_char n), {val := n, valid := h}) (λ (h : ¬is_valid_char n), '\x00')
@[protected, instance]
Equations
- char.decidable_eq = λ (i j : char), decidable_of_decidable_of_iff (nat.decidable_eq i.val j.val) _
@[protected, instance]
Equations
- char.inhabited = {default := 'A'}