Metamath Proof Explorer


Theorem affineequiv

Description: Equivalence between two ways of expressing B as an affine combination of A and C . (Contributed by David Moews, 28-Feb-2017)

Ref Expression
Hypotheses affineequiv.a φ A
affineequiv.b φ B
affineequiv.c φ C
affineequiv.d φ D
Assertion affineequiv φ B = D A + 1 D C C B = D C A

Proof

Step Hyp Ref Expression
1 affineequiv.a φ A
2 affineequiv.b φ B
3 affineequiv.c φ C
4 affineequiv.d φ D
5 4 3 mulcld φ D C
6 4 1 mulcld φ D A
7 3 5 6 subsubd φ C D C D A = C - D C + D A
8 3 5 subcld φ C D C
9 8 6 addcomd φ C - D C + D A = D A + C - D C
10 7 9 eqtr2d φ D A + C - D C = C D C D A
11 1cnd φ 1
12 11 4 3 subdird φ 1 D C = 1 C D C
13 3 mulid2d φ 1 C = C
14 13 oveq1d φ 1 C D C = C D C
15 12 14 eqtrd φ 1 D C = C D C
16 15 oveq2d φ D A + 1 D C = D A + C - D C
17 3 2 subcld φ C B
18 3 1 subcld φ C A
19 4 18 mulcld φ D C A
20 2 17 19 addsubassd φ B + C B - D C A = B + C B - D C A
21 2 3 pncan3d φ B + C - B = C
22 4 3 1 subdid φ D C A = D C D A
23 21 22 oveq12d φ B + C B - D C A = C D C D A
24 20 23 eqtr3d φ B + C B - D C A = C D C D A
25 10 16 24 3eqtr4d φ D A + 1 D C = B + C B - D C A
26 25 eqeq2d φ B = D A + 1 D C B = B + C B - D C A
27 2 addid1d φ B + 0 = B
28 27 eqeq1d φ B + 0 = B + C B - D C A B = B + C B - D C A
29 0cnd φ 0
30 17 19 subcld φ C - B - D C A
31 2 29 30 addcand φ B + 0 = B + C B - D C A 0 = C - B - D C A
32 26 28 31 3bitr2d φ B = D A + 1 D C 0 = C - B - D C A
33 eqcom 0 = C - B - D C A C - B - D C A = 0
34 32 33 bitrdi φ B = D A + 1 D C C - B - D C A = 0
35 17 19 subeq0ad φ C - B - D C A = 0 C B = D C A
36 34 35 bitrd φ B = D A + 1 D C C B = D C A