section ‹Nameful WS1S Formulas› (*<*) theory WS1S_Nameful imports WS1S_Formula begin (*>*) declare [[coercion "of_char :: char ⇒ nat", coercion_enabled]] definition is_upper :: "char ⇒ bool" where [simp]: "is_upper c = (c ∈ {65..90 :: nat})" definition is_lower :: "char ⇒ bool" where [simp]: "is_lower c = (c ∈ {97..122 :: nat})" (*nonempty string starting with lower case*) typedef fo = "{s. s ≠ [] ∧ is_lower (hd s)}" by (auto intro!: exI[of _ "''x''"]) (*nonempty string starting with upper case*) typedef so = "{s. s ≠ [] ∧ is_upper (hd s)}" by (auto intro!: exI[of _ "''X''"])