兩事件的排容原理(取捨原理)

r = 3
A: (0.5 * (Corner[1] + Corner[3])) + (2.8, 0)
B: A - ((0.8 * r), 0)
C: A + ((0.9 * r), 0)
c_2 = Circle(C, (4 * r / 3))
c_1 = Circle(B, (4 * r / 3))
D = Intersect(c_2, c_1, 2)
E = Intersect(c_2, c_1, 1)
c_4 = CircleArc(B, E, D)
c_5 = CircleArc(C, E, D)
c_3 = CircleArc(C, D, E)
list1: {c_3, c_4}
P_1 = Point(list1)
Q_1: P_1 + (0, 0)
lcs1 = Locus(Q_1, P_1)
list2: {c_4, c_5}
P_2 = Point(list2)
Q_2: P_2 + (0, 0)
lcs2 = Locus(Q_2, P_2)
n = 0 (slider from 0 to 9, step 1)
text1: "" + (LaTeX[If[n ≟ 1, "A", If[n ≟ 2, "B", If[n ≟ 3, "A∩B", If[n ≟ 4, "A∪B"]]]]]) + ""
c_6 = CircleArc(B, D, E)
list3: {c_6, c_5}
P_3 = Point(list3)
Q_3: P_3 + (0, 0)
lcs3 = Locus(Q_3, P_3)
text2: "P(A∪B)" + (LaTeX[If[n ≥ 5, "=P(A)"]]) + "" + (LaTeX[If[n ≥ 6, "+x"]]) + "
\cr " + (LaTeX[If[n ≥ 7, "⇒x=P(B)"]]) + "" + (LaTeX[If[n ≥ 8, "-P(A∩B)"]]) + "
\cr " + (LaTeX[If[n ≟ 9, "⇒P(A∪B)=P(A)+P(B)-P(A∩B)"]]) + ""
c_a: c_1
c_b: c_2