Metamath Proof Explorer


Theorem bhmafibid2cn

Description: The Brahmagupta-Fibonacci identity for complex numbers. Express the product of two sums of two squares as a sum of two squares. Second result. (Contributed by Thierry Arnoux, 1-Feb-2020) Generalization for complex numbers proposed by GL. (Revised by AV, 8-Jun-2023)

Ref Expression
Assertion bhmafibid2cn A B C D A 2 + B 2 C 2 + D 2 = A C + B D 2 + A D B C 2

Proof

Step Hyp Ref Expression
1 simpll A B C D A
2 1 sqcld A B C D A 2
3 simprl A B C D C
4 3 sqcld A B C D C 2
5 2 4 mulcld A B C D A 2 C 2
6 simprr A B C D D
7 6 sqcld A B C D D 2
8 simplr A B C D B
9 8 sqcld A B C D B 2
10 7 9 mulcld A B C D D 2 B 2
11 2 7 mulcld A B C D A 2 D 2
12 4 9 mulcld A B C D C 2 B 2
13 5 10 11 12 add4d A B C D A 2 C 2 + D 2 B 2 + A 2 D 2 + C 2 B 2 = A 2 C 2 + A 2 D 2 + D 2 B 2 + C 2 B 2
14 7 9 mulcomd A B C D D 2 B 2 = B 2 D 2
15 4 9 mulcomd A B C D C 2 B 2 = B 2 C 2
16 14 15 oveq12d A B C D D 2 B 2 + C 2 B 2 = B 2 D 2 + B 2 C 2
17 16 oveq2d A B C D A 2 C 2 + A 2 D 2 + D 2 B 2 + C 2 B 2 = A 2 C 2 + A 2 D 2 + B 2 D 2 + B 2 C 2
18 13 17 eqtrd A B C D A 2 C 2 + D 2 B 2 + A 2 D 2 + C 2 B 2 = A 2 C 2 + A 2 D 2 + B 2 D 2 + B 2 C 2
19 2 9 4 7 muladdd A B C D A 2 + B 2 C 2 + D 2 = A 2 C 2 + D 2 B 2 + A 2 D 2 + C 2 B 2
20 1 3 mulcld A B C D A C
21 8 6 mulcld A B C D B D
22 binom2 A C B D A C + B D 2 = A C 2 + 2 A C B D + B D 2
23 20 21 22 syl2anc A B C D A C + B D 2 = A C 2 + 2 A C B D + B D 2
24 1 6 mulcld A B C D A D
25 8 3 mulcld A B C D B C
26 binom2sub A D B C A D B C 2 = A D 2 - 2 A D B C + B C 2
27 24 25 26 syl2anc A B C D A D B C 2 = A D 2 - 2 A D B C + B C 2
28 23 27 oveq12d A B C D A C + B D 2 + A D B C 2 = A C 2 + 2 A C B D + B D 2 + A D 2 2 A D B C + B C 2
29 20 sqcld A B C D A C 2
30 2cnd A B C D 2
31 20 21 mulcld A B C D A C B D
32 30 31 mulcld A B C D 2 A C B D
33 29 32 addcld A B C D A C 2 + 2 A C B D
34 21 sqcld A B C D B D 2
35 24 sqcld A B C D A D 2
36 24 25 mulcld A B C D A D B C
37 30 36 mulcld A B C D 2 A D B C
38 35 37 subcld A B C D A D 2 2 A D B C
39 25 sqcld A B C D B C 2
40 33 34 38 39 add4d A B C D A C 2 + 2 A C B D + B D 2 + A D 2 2 A D B C + B C 2 = A C 2 + 2 A C B D + A D 2 2 A D B C + B D 2 + B C 2
41 mul4r A C B D A C B D = A D B C
42 41 an4s A B C D A C B D = A D B C
43 42 oveq2d A B C D 2 A C B D = 2 A D B C
44 43 oveq2d A B C D A C 2 + 2 A C B D = A C 2 + 2 A D B C
45 44 oveq1d A B C D A C 2 + 2 A C B D + A D 2 2 A D B C = A C 2 + 2 A D B C + A D 2 2 A D B C
46 29 37 35 ppncand A B C D A C 2 + 2 A D B C + A D 2 2 A D B C = A C 2 + A D 2
47 45 46 eqtrd A B C D A C 2 + 2 A C B D + A D 2 2 A D B C = A C 2 + A D 2
48 8 6 sqmuld A B C D B D 2 = B 2 D 2
49 8 3 sqmuld A B C D B C 2 = B 2 C 2
50 48 49 oveq12d A B C D B D 2 + B C 2 = B 2 D 2 + B 2 C 2
51 47 50 oveq12d A B C D A C 2 + 2 A C B D + A D 2 2 A D B C + B D 2 + B C 2 = A C 2 + A D 2 + B 2 D 2 + B 2 C 2
52 1 3 sqmuld A B C D A C 2 = A 2 C 2
53 1 6 sqmuld A B C D A D 2 = A 2 D 2
54 52 53 oveq12d A B C D A C 2 + A D 2 = A 2 C 2 + A 2 D 2
55 54 oveq1d A B C D A C 2 + A D 2 + B 2 D 2 + B 2 C 2 = A 2 C 2 + A 2 D 2 + B 2 D 2 + B 2 C 2
56 51 55 eqtrd A B C D A C 2 + 2 A C B D + A D 2 2 A D B C + B D 2 + B C 2 = A 2 C 2 + A 2 D 2 + B 2 D 2 + B 2 C 2
57 28 40 56 3eqtrd A B C D A C + B D 2 + A D B C 2 = A 2 C 2 + A 2 D 2 + B 2 D 2 + B 2 C 2
58 18 19 57 3eqtr4d A B C D A 2 + B 2 C 2 + D 2 = A C + B D 2 + A D B C 2