▁the ▁type ▁ ▁in ▁the ▁type ▁environment ▁. ▁Dec id ability ▁of ▁type ▁checking ▁means ▁that ▁type ▁safety ▁of ▁any ▁given ▁program ▁text ▁( source ▁code ) ▁can ▁be ▁verified . ▁ ▁Typ ability ▁▁ ▁The ▁decision ▁problem ▁of ▁typ ability ▁( ab bre vi ated ▁by ▁) ▁is : ▁ ▁Given ▁a ▁term ▁, ▁decide ▁whether ▁there ▁exists ▁a ▁type ▁environment ▁ ▁and ▁a ▁type ▁ ▁such ▁that ▁the ▁term ▁ ▁can ▁be ▁assigned ▁the ▁type ▁ ▁in ▁the ▁type ▁environment ▁. ▁A ▁variant ▁of ▁typ ability ▁is ▁typ ability ▁w rt . ▁a ▁type ▁environment ▁( ab bre vi ated ▁by ▁), ▁for ▁which ▁a ▁type ▁environment ▁is ▁part ▁of ▁the ▁input . ▁If ▁the ▁given ▁term ▁does ▁not ▁contain ▁external ▁references ▁( such ▁as ▁free ▁term ▁variables ), ▁then ▁typ ability ▁coinc ides ▁with ▁typ ability ▁w rt . ▁the ▁empty ▁type ▁environment . ▁ ▁Typ ability ▁is ▁closely ▁related ▁to ▁type ▁inference . ▁Where as ▁typ ability ▁( as ▁a ▁decision ▁problem ) ▁addresses ▁the ▁existence ▁of ▁a ▁type ▁for ▁a ▁given ▁term , ▁type ▁inference ▁( as ▁a ▁computation ▁problem ) ▁requires ▁an ▁actual ▁type ▁to ▁be ▁computed . ▁ ▁Type ▁inhab itation ▁▁ ▁The ▁decision ▁problem ▁of ▁type ▁inhab itation ▁( ab bre vi ated ▁by ▁) ▁is : ▁ ▁Given ▁a ▁type ▁environment ▁ ▁and ▁a ▁type ▁, ▁decide ▁whether ▁there ▁exists ▁a ▁term ▁ ▁that ▁can ▁be ▁assigned ▁the ▁type ▁ ▁in ▁the ▁type ▁environment ▁. ▁Type ▁inhab itation ▁often ▁plays ▁an ▁auxili ary ▁role