Metamath Proof Explorer


Theorem bhmafibid2

Description: The Brahmagupta-Fibonacci identity. Express the product of two sums of two squares as a sum of two squares. Second result. (Contributed by Thierry Arnoux, 1-Feb-2020)

Ref Expression
Assertion bhmafibid2 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 simprl A B C D C
2 1 recnd A B C D C
3 2 sqcld A B C D C 2
4 simprr A B C D D
5 4 recnd A B C D D
6 5 sqcld A B C D D 2
7 3 6 addcomd A B C D C 2 + D 2 = D 2 + C 2
8 7 oveq2d A B C D A 2 + B 2 C 2 + D 2 = A 2 + B 2 D 2 + C 2
9 bhmafibid1 A B D C A 2 + B 2 D 2 + C 2 = A D B C 2 + A C + B D 2
10 9 ancom2s A B C D A 2 + B 2 D 2 + C 2 = A D B C 2 + A C + B D 2
11 simpll A B C D A
12 11 recnd A B C D A
13 12 5 mulcld A B C D A D
14 simplr A B C D B
15 14 recnd A B C D B
16 15 2 mulcld A B C D B C
17 13 16 subcld A B C D A D B C
18 17 sqcld A B C D A D B C 2
19 12 2 mulcld A B C D A C
20 15 5 mulcld A B C D B D
21 19 20 addcld A B C D A C + B D
22 21 sqcld A B C D A C + B D 2
23 18 22 addcomd A B C D A D B C 2 + A C + B D 2 = A C + B D 2 + A D B C 2
24 8 10 23 3eqtrd A B C D A 2 + B 2 C 2 + D 2 = A C + B D 2 + A D B C 2