Documentation

Init.Data.Char.Lemmas

@[deprecated Char.ext (since := "2025-10-26")]
theorem Char.eq_of_val_eq {a b : Char} :
a.val = b.val → a = b
theorem Char.le_def {a b : Char} :
a ≤ b ↔ a.val ≤ b.val
theorem Char.lt_def {a b : Char} :
a < b ↔ a.val < b.val
@[deprecated Char.lt_def (since := "2025-10-26")]
theorem Char.lt_iff_val_lt_val {a b : Char} :
a < b ↔ a.val < b.val
@[simp]
theorem Char.not_le {a b : Char} :
¬a ≤ b ↔ b < a
@[simp]
theorem Char.not_lt {a b : Char} :
¬a < b ↔ b ≤ a
@[simp]
theorem Char.le_refl (a : Char) :
a ≤ a
@[simp]
theorem Char.lt_irrefl (a : Char) :
¬a < a
theorem Char.le_trans {a b c : Char} :
a ≤ b → b ≤ c → a ≤ c
theorem Char.lt_trans {a b c : Char} :
a < b → b < c → a < c
theorem Char.le_total (a b : Char) :
a ≤ b ∨ b ≤ a
theorem Char.le_antisymm {a b : Char} :
a ≤ b → b ≤ a → a = b
theorem Char.lt_asymm {a b : Char} (h : a < b) :
¬b < a
theorem Char.ne_of_lt {a b : Char} (h : a < b) :
a ≠ b
instance Char.ltIrrefl :
Std.Irrefl fun (x1 x2 : Char) => x1 < x2
instance Char.leRefl :
Std.Refl fun (x1 x2 : Char) => x1 ≤ x2
@[instance_reducible]
instance Char.leTrans :
Trans (fun (x1 x2 : Char) => x1 ≤ x2) (fun (x1 x2 : Char) => x1 ≤ x2) fun (x1 x2 : Char) => x1 ≤ x2
Equations
@[instance_reducible]
instance Char.ltTrans :
Trans (fun (x1 x2 : Char) => x1 < x2) (fun (x1 x2 : Char) => x1 < x2) fun (x1 x2 : Char) => x1 < x2
Equations
@[instance_reducible]
def Char.notLTTrans :
Trans (fun (x1 x2 : Char) => ¬x1 < x2) (fun (x1 x2 : Char) => ¬x1 < x2) fun (x1 x2 : Char) => ¬x1 < x2
Equations
Instances For
    instance Char.leAntisymm :
    Std.Antisymm fun (x1 x2 : Char) => x1 ≤ x2
    instance Char.ltTrichotomous :
    Std.Trichotomous fun (x1 x2 : Char) => x1 < x2
    @[deprecated Char.ltTrichotomous (since := "2025-10-27")]
    theorem Char.notLTAntisymm :
    Std.Antisymm fun (x1 x2 : Char) => ¬x1 < x2
    instance Char.ltAsymm :
    Std.Asymm fun (x1 x2 : Char) => x1 < x2
    instance Char.leTotal :
    Std.Total fun (x1 x2 : Char) => x1 ≤ x2
    @[deprecated Char.ltAsymm (since := "2025-08-01")]
    theorem Char.notLTTotal :
    Std.Total fun (x1 x2 : Char) => ¬x1 < x2
    @[simp]
    theorem Char.ofNat_toNat (c : Char) :
    @[simp]
    @[simp]
    theorem Char.toNat_val {c : Char} :
    theorem Char.val_inj {c d : Char} :
    c.val = d.val ↔ c = d
    theorem Char.toNat_inj {c d : Char} :
    c.toNat = d.toNat ↔ c = d
    @[simp]
    theorem Char.toNat_mk {val : UInt32} {h : val.isValidChar} :
    { val := val, valid := h }.toNat = val.toNat