Discrete-time switched systems, set theoretic analysis and quasi-quadratic Lyapunov functions