Metamath Proof Explorer


Theorem pythagtriplem18

Description: Lemma for pythagtrip . Wrap the previous M and N up in quantifiers. (Contributed by Scott Fenton, 18-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Assertion pythagtriplem18 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A n m A = m 2 n 2 B = 2 m n C = m 2 + n 2

Proof

Step Hyp Ref Expression
1 eqid C + B C B 2 = C + B C B 2
2 1 pythagtriplem13 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B C B 2
3 eqid C + B + C B 2 = C + B + C B 2
4 3 pythagtriplem11 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B 2
5 3 1 pythagtriplem15 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A = C + B + C B 2 2 C + B C B 2 2
6 3 1 pythagtriplem16 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A B = 2 C + B + C B 2 C + B C B 2
7 3 1 pythagtriplem17 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C = C + B + C B 2 2 + C + B C B 2 2
8 oveq1 n = C + B C B 2 n 2 = C + B C B 2 2
9 8 oveq2d n = C + B C B 2 m 2 n 2 = m 2 C + B C B 2 2
10 9 eqeq2d n = C + B C B 2 A = m 2 n 2 A = m 2 C + B C B 2 2
11 oveq2 n = C + B C B 2 m n = m C + B C B 2
12 11 oveq2d n = C + B C B 2 2 m n = 2 m C + B C B 2
13 12 eqeq2d n = C + B C B 2 B = 2 m n B = 2 m C + B C B 2
14 8 oveq2d n = C + B C B 2 m 2 + n 2 = m 2 + C + B C B 2 2
15 14 eqeq2d n = C + B C B 2 C = m 2 + n 2 C = m 2 + C + B C B 2 2
16 10 13 15 3anbi123d n = C + B C B 2 A = m 2 n 2 B = 2 m n C = m 2 + n 2 A = m 2 C + B C B 2 2 B = 2 m C + B C B 2 C = m 2 + C + B C B 2 2
17 oveq1 m = C + B + C B 2 m 2 = C + B + C B 2 2
18 17 oveq1d m = C + B + C B 2 m 2 C + B C B 2 2 = C + B + C B 2 2 C + B C B 2 2
19 18 eqeq2d m = C + B + C B 2 A = m 2 C + B C B 2 2 A = C + B + C B 2 2 C + B C B 2 2
20 oveq1 m = C + B + C B 2 m C + B C B 2 = C + B + C B 2 C + B C B 2
21 20 oveq2d m = C + B + C B 2 2 m C + B C B 2 = 2 C + B + C B 2 C + B C B 2
22 21 eqeq2d m = C + B + C B 2 B = 2 m C + B C B 2 B = 2 C + B + C B 2 C + B C B 2
23 17 oveq1d m = C + B + C B 2 m 2 + C + B C B 2 2 = C + B + C B 2 2 + C + B C B 2 2
24 23 eqeq2d m = C + B + C B 2 C = m 2 + C + B C B 2 2 C = C + B + C B 2 2 + C + B C B 2 2
25 19 22 24 3anbi123d m = C + B + C B 2 A = m 2 C + B C B 2 2 B = 2 m C + B C B 2 C = m 2 + C + B C B 2 2 A = C + B + C B 2 2 C + B C B 2 2 B = 2 C + B + C B 2 C + B C B 2 C = C + B + C B 2 2 + C + B C B 2 2
26 16 25 rspc2ev C + B C B 2 C + B + C B 2 A = C + B + C B 2 2 C + B C B 2 2 B = 2 C + B + C B 2 C + B C B 2 C = C + B + C B 2 2 + C + B C B 2 2 n m A = m 2 n 2 B = 2 m n C = m 2 + n 2
27 2 4 5 6 7 26 syl113anc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A n m A = m 2 n 2 B = 2 m n C = m 2 + n 2