加法公式覚えているかな

sinとcosの加法公式を完成させよう。赤い点を動かすと四角ごと動かすことができる。

\sin A

\cos A

\sin B

\cos B

+

-

正解！

A = (2, 3)
B: A + (0, -1)
C: A + (2, -1)
D: A + (2, 0)
poly1, a, b, c, d = Polygon(A, B, C, D)
A_1 = (-3, 3)
B_1: A_1 + (0, -1)
C_1: A_1 + (2, -1)
D_1: A_1 + (2, 0)
poly1_1, a_1, b_1, c_1, d_1 = Polygon(A_1, B_1, C_1, D_1)
A_3 = (-3.0218181818181815, 1.44)
B_3: A_3 + (0, -1)
C_3: A_3 + (2, -1)
D_3: A_3 + (2, 0)
A_2 = (2.0145454545454564, 1.4218181818181805)
B_2: A_2 + (0, -1)
C_2: A_2 + (2, -1)
D_2: A_2 + (2, 0)
poly1_2, a_2, b_2, c_2, d_2 = Polygon(A_2, B_2, C_2, D_2)
poly2, a_3, b_3, c_3, d_3 = Polygon(A_3, B_3, C_3, D_3)
E = (-4, 4)
F = (-2, 4)
G = (1, 4)
H = (3, 4)
A_5 = (0, 3)
A_6 = (0.03272727272727398, 1.3672727272727259)
B_5: A_5 + (0, -1)
C_5: A_5 + (1, -1)
D_5: A_5 + (1, 0)
poly3, a_5, b_5, c_5, d_5 = Polygon(A_5, B_5, C_5, D_5)
B_6: A_6 + (0, -1)
C_6: A_6 + (1, -1)
D_6: A_6 + (1, 0)
poly4, a_6, b_6, c_6, d_6 = Polygon(A_6, B_6, C_6, D_6)
I = (0, 4)
MText: {"\sin(A+B)", "\sin(A-B)", "\cos(A+B)", "\cos(A-B)"}
n = Random(1, 4)
text8 = Element(MText, n)
sAsB1: E ≟ A ∧ F ≟ A_2 ∨ F ≟ A ∧ E ≟ A_2
sAsB2: G ≟ A ∧ H ≟ A_2 ∨ H ≟ A ∧ G ≟ A_2
sAcB1: E ≟ A ∧ F ≟ A_3 ∨ F ≟ A ∧ E ≟ A_3
cAsB1: E ≟ A_1 ∧ F ≟ A_2 ∨ F ≟ A_1 ∧ E ≟ A_2
cAcB1: E ≟ A_1 ∧ F ≟ A_3 ∨ F ≟ A_1 ∧ E ≟ A_3
cAcB2: G ≟ A_1 ∧ H ≟ A_3 ∨ H ≟ A_1 ∧ G ≟ A_3
cAsB2: G ≟ A_1 ∧ H ≟ A_2 ∨ H ≟ A_1 ∧ G ≟ A_2
sAcB2: G ≟ A ∧ H ≟ A_3 ∨ H ≟ A ∧ G ≟ A_3
plus: A_5 ≟ I
minus: A_6 ≟ I
cAmB: plus ∧ cAcB1 ∧ sAsB2 ∨ plus ∧ sAsB2 ∧ cAcB1
sApB: plus ∧ sAcB1 ∧ cAsB2 ∨ plus ∧ sAcB2 ∧ cAsB1
sAmB: sAcB1 ∧ minus ∧ cAsB2
cApB: cAcB1 ∧ minus ∧ sAsB2
ans1: n ≟ 1 ∧ sApB
ans2: n ≟ 2 ∧ sAmB
ans3: n ≟ 3 ∧ cApB
ans4: n ≟ 4 ∧ cAmB
answer: ans1 ∨ ans2 ∨ ans3 ∨ ans4
text1: "赤い点を動かして加法公式を完成させよう。\\
\quad \quad " + (LaTeX[text8]) + "="