diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-10-30 11:29:19 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-10-30 11:29:19 +0100 |
| commit | ca0c7d5e75a631d0e6689ee21d017404046f3f12 (patch) | |
| tree | a3b3f376ce945c51e86885b30f60337e6260cf20 /Nominal/Helpers | |
| parent | 5dde77b6db9fc78094363f91e0c6643a84be513e (diff) | |
implement lambda preterms
Diffstat (limited to 'Nominal/Helpers')
| -rw-r--r-- | Nominal/Helpers/CountableString.lean | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Nominal/Helpers/CountableString.lean b/Nominal/Helpers/CountableString.lean new file mode 100644 index 0000000..7d2fcb7 --- /dev/null +++ b/Nominal/Helpers/CountableString.lean @@ -0,0 +1,12 @@ +import Mathlib + +instance : Countable Char where + exists_injective_nat' := by + exists Char.toNat + intro c₁ c₂ hc + rw [Char.toNat, Char.toNat, UInt32.toNat_inj] at hc + exact Char.eq_of_val_eq hc + +instance : Countable String := Countable.of_equiv (List Char) + { toFun := String.mk + invFun := String.data } |
