This paper provides a characterization of viability kernels and capture bas
ins of a target viable in a constrained subset as a unique closed subset be
tween the target and the constrained subset satisfying tangential condition
s or, by duality, normal conditions. It is based on a method devised by Hel
ene Frankowska for characterizing the value function of an optimal control
problem as generalized (contingent or viscosity) solutions to Hamilton Jaco
bi equations. These abstract results, interesting by themselves, can be app
lied to epigraphs of functions or graphs of maps and happen to be very effi
cient for solving other problems, such as stopping time problems, dynamical
games, boundary-value problems for systems of partial differential equatio
ns, and impulse and hybrid control systems, which are the topics of other c
ompanion papers.