Where can I read about the behavior of the postgress casting operators?
This is in the PostgreSQL manual section on the boolean data type:

Boolean constants can be represented in SQL queries by the SQL key words TRUE, FALSE, and NULL.
The datatype input function for type boolean accepts these string representations for the “true” state:
true
yes
on
1

and these representations for the “false” state:
false
no
off
0

Unique prefixes of these strings are also accepted, for example t or n. Leading or trailing whitespace is ignored, and case does not matter.
The datatype output function for type boolean always emits either t or f […]