Metamath Proof Explorer


Theorem discr1

Description: A nonnegative quadratic form has nonnegative leading coefficient. (Contributed by Mario Carneiro, 4-Jun-2014)

Ref Expression
Hypotheses discr.1 φ A
discr.2 φ B
discr.3 φ C
discr.4 φ x 0 A x 2 + B x + C
discr1.5 X = if 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A 1
Assertion discr1 φ 0 A

Proof

Step Hyp Ref Expression
1 discr.1 φ A
2 discr.2 φ B
3 discr.3 φ C
4 discr.4 φ x 0 A x 2 + B x + C
5 discr1.5 X = if 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A 1
6 oveq1 x = X x 2 = X 2
7 6 oveq2d x = X A x 2 = A X 2
8 oveq2 x = X B x = B X
9 7 8 oveq12d x = X A x 2 + B x = A X 2 + B X
10 9 oveq1d x = X A x 2 + B x + C = A X 2 + B X + C
11 10 breq2d x = X 0 A x 2 + B x + C 0 A X 2 + B X + C
12 4 ralrimiva φ x 0 A x 2 + B x + C
13 12 adantr φ A < 0 x 0 A x 2 + B x + C
14 2 adantr φ A < 0 B
15 3 adantr φ A < 0 C
16 0re 0
17 ifcl C 0 if 0 C C 0
18 15 16 17 sylancl φ A < 0 if 0 C C 0
19 14 18 readdcld φ A < 0 B + if 0 C C 0
20 peano2re B + if 0 C C 0 B + if 0 C C 0 + 1
21 19 20 syl φ A < 0 B + if 0 C C 0 + 1
22 1 adantr φ A < 0 A
23 22 renegcld φ A < 0 A
24 1 lt0neg1d φ A < 0 0 < A
25 24 biimpa φ A < 0 0 < A
26 25 gt0ne0d φ A < 0 A 0
27 21 23 26 redivcld φ A < 0 B + if 0 C C 0 + 1 A
28 1re 1
29 ifcl B + if 0 C C 0 + 1 A 1 if 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A 1
30 27 28 29 sylancl φ A < 0 if 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A 1
31 5 30 eqeltrid φ A < 0 X
32 11 13 31 rspcdva φ A < 0 0 A X 2 + B X + C
33 resqcl X X 2
34 31 33 syl φ A < 0 X 2
35 22 34 remulcld φ A < 0 A X 2
36 14 31 remulcld φ A < 0 B X
37 35 36 readdcld φ A < 0 A X 2 + B X
38 37 15 readdcld φ A < 0 A X 2 + B X + C
39 22 31 remulcld φ A < 0 A X
40 39 19 readdcld φ A < 0 A X + B + if 0 C C 0
41 40 31 remulcld φ A < 0 A X + B + if 0 C C 0 X
42 16 a1i φ A < 0 0
43 18 31 remulcld φ A < 0 if 0 C C 0 X
44 max2 0 C C if 0 C C 0
45 16 15 44 sylancr φ A < 0 C if 0 C C 0
46 max1 0 C 0 if 0 C C 0
47 16 15 46 sylancr φ A < 0 0 if 0 C C 0
48 max1 1 B + if 0 C C 0 + 1 A 1 if 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A 1
49 28 27 48 sylancr φ A < 0 1 if 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A 1
50 49 5 breqtrrdi φ A < 0 1 X
51 18 31 47 50 lemulge11d φ A < 0 if 0 C C 0 if 0 C C 0 X
52 15 18 43 45 51 letrd φ A < 0 C if 0 C C 0 X
53 15 43 37 52 leadd2dd φ A < 0 A X 2 + B X + C A X 2 + B X + if 0 C C 0 X
54 39 14 readdcld φ A < 0 A X + B
55 54 recnd φ A < 0 A X + B
56 18 recnd φ A < 0 if 0 C C 0
57 31 recnd φ A < 0 X
58 55 56 57 adddird φ A < 0 A X + B + if 0 C C 0 X = A X + B X + if 0 C C 0 X
59 39 recnd φ A < 0 A X
60 14 recnd φ A < 0 B
61 59 60 56 addassd φ A < 0 A X + B + if 0 C C 0 = A X + B + if 0 C C 0
62 61 oveq1d φ A < 0 A X + B + if 0 C C 0 X = A X + B + if 0 C C 0 X
63 22 recnd φ A < 0 A
64 63 57 57 mulassd φ A < 0 A X X = A X X
65 sqval X X 2 = X X
66 57 65 syl φ A < 0 X 2 = X X
67 66 oveq2d φ A < 0 A X 2 = A X X
68 64 67 eqtr4d φ A < 0 A X X = A X 2
69 68 oveq1d φ A < 0 A X X + B X = A X 2 + B X
70 59 57 60 69 joinlmuladdmuld φ A < 0 A X + B X = A X 2 + B X
71 70 oveq1d φ A < 0 A X + B X + if 0 C C 0 X = A X 2 + B X + if 0 C C 0 X
72 58 62 71 3eqtr3d φ A < 0 A X + B + if 0 C C 0 X = A X 2 + B X + if 0 C C 0 X
73 53 72 breqtrrd φ A < 0 A X 2 + B X + C A X + B + if 0 C C 0 X
74 23 31 remulcld φ A < 0 A X
75 19 ltp1d φ A < 0 B + if 0 C C 0 < B + if 0 C C 0 + 1
76 max2 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A if 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A 1
77 28 27 76 sylancr φ A < 0 B + if 0 C C 0 + 1 A if 1 B + if 0 C C 0 + 1 A B + if 0 C C 0 + 1 A 1
78 77 5 breqtrrdi φ A < 0 B + if 0 C C 0 + 1 A X
79 ledivmul B + if 0 C C 0 + 1 X A 0 < A B + if 0 C C 0 + 1 A X B + if 0 C C 0 + 1 A X
80 21 31 23 25 79 syl112anc φ A < 0 B + if 0 C C 0 + 1 A X B + if 0 C C 0 + 1 A X
81 78 80 mpbid φ A < 0 B + if 0 C C 0 + 1 A X
82 19 21 74 75 81 ltletrd φ A < 0 B + if 0 C C 0 < A X
83 63 57 mulneg1d φ A < 0 A X = A X
84 df-neg A X = 0 A X
85 83 84 eqtrdi φ A < 0 A X = 0 A X
86 82 85 breqtrd φ A < 0 B + if 0 C C 0 < 0 A X
87 39 19 42 ltaddsub2d φ A < 0 A X + B + if 0 C C 0 < 0 B + if 0 C C 0 < 0 A X
88 86 87 mpbird φ A < 0 A X + B + if 0 C C 0 < 0
89 28 a1i φ A < 0 1
90 0lt1 0 < 1
91 90 a1i φ A < 0 0 < 1
92 42 89 31 91 50 ltletrd φ A < 0 0 < X
93 ltmul1 A X + B + if 0 C C 0 0 X 0 < X A X + B + if 0 C C 0 < 0 A X + B + if 0 C C 0 X < 0 X
94 40 42 31 92 93 syl112anc φ A < 0 A X + B + if 0 C C 0 < 0 A X + B + if 0 C C 0 X < 0 X
95 88 94 mpbid φ A < 0 A X + B + if 0 C C 0 X < 0 X
96 57 mul02d φ A < 0 0 X = 0
97 95 96 breqtrd φ A < 0 A X + B + if 0 C C 0 X < 0
98 38 41 42 73 97 lelttrd φ A < 0 A X 2 + B X + C < 0
99 ltnle A X 2 + B X + C 0 A X 2 + B X + C < 0 ¬ 0 A X 2 + B X + C
100 38 16 99 sylancl φ A < 0 A X 2 + B X + C < 0 ¬ 0 A X 2 + B X + C
101 98 100 mpbid φ A < 0 ¬ 0 A X 2 + B X + C
102 32 101 pm2.65da φ ¬ A < 0
103 lelttric 0 A 0 A A < 0
104 16 1 103 sylancr φ 0 A A < 0
105 104 ord φ ¬ 0 A A < 0
106 102 105 mt3d φ 0 A