"If you are wearing a hat, you are a baseball fan." and "If you are not a baseball fan, you are not wearing a hat."
It's called a contrapositive.
definition:
: a proposition or theorem formed by contradicting both the subject and predicate or both the hypothesis and conclusion of a given proposition
It's called a contrapositive.
definition:
: a proposition or theorem formed by contradicting both the subject and predicate or both the hypothesis and conclusion of a given proposition