proof of transitivity of implication