Get definition of AUC here
Property: if you flip ground truth only, or flip prediction only, you will get 1-original AUC as new AUC.
Take original ROC curve as function of moving score threshold (x(s),y(s))=(fp(s)/N, tp(s)/P)
Where fp(s) is false positive=number of cases predicted as positive under score threshold s but actually negative.
tp(s) is true postive=number of cases predicted as positive and actually also positive.
N is number of negative cases and P is number of positive cases.
1. Flip ground truth only
You will get P'=N and N'=P. Note that prediction is kept unchanged, so fp'(s)=tp(s), tp'(s)=fp(s).
As a result, (x'(s),y'(s))=(y(s),x(s)), which means the two curves are symmetric to line y=x.
So, the area a is the same as area c.
Note that a+b+c=1, so a+(a+b)=1 where a and a+b are AUC before and after ground truth flip.
2. Flip prediction only
You will get N'=N, P'=P, fp'(s)=N-fp(s) and tp'(s)=P-tp(s).
As a result, (x'(s),y'(s))=(1-x(s), 1-y(s)), which means the cuve flip according to line x=1/2 and then flip according to line y=1/2.
Note that the flip horizontal never change the area under the curve.
while flip vertical make the curve top down, that is to say, the area under the new curve is the area above the original curve.