Metamath Proof Explorer


Theorem sqmid3api

Description: Value of the square of the middle term of a 3-term arithmetic progression. (Contributed by Steven Nguyen, 20-Sep-2022)

Ref Expression
Hypotheses sqmid3api.a A
sqmid3api.n N
sqmid3api.b A + N = B
sqmid3api.c B + N = C
Assertion sqmid3api B B = A C + N N

Proof

Step Hyp Ref Expression
1 sqmid3api.a A
2 sqmid3api.n N
3 sqmid3api.b A + N = B
4 sqmid3api.c B + N = C
5 1 2 1 2 muladdi A + N A + N = A A + N N + A N + A N
6 3 3 oveq12i A + N A + N = B B
7 1 1 mulcli A A
8 2 2 mulcli N N
9 1 2 mulcli A N
10 9 9 addcli A N + A N
11 7 8 10 add32i A A + N N + A N + A N = A A + A N + A N + N N
12 1 2 addcli A + N
13 1 12 2 adddii A A + N + N = A A + N + A N
14 3 oveq1i A + N + N = B + N
15 14 4 eqtri A + N + N = C
16 15 oveq2i A A + N + N = A C
17 1 1 2 adddii A A + N = A A + A N
18 17 oveq1i A A + N + A N = A A + A N + A N
19 7 9 9 addassi A A + A N + A N = A A + A N + A N
20 18 19 eqtri A A + N + A N = A A + A N + A N
21 13 16 20 3eqtr3ri A A + A N + A N = A C
22 21 oveq1i A A + A N + A N + N N = A C + N N
23 11 22 eqtri A A + N N + A N + A N = A C + N N
24 5 6 23 3eqtr3i B B = A C + N N