Metamath Proof Explorer


Theorem requad01

Description: A condition for a quadratic equation with real coefficients to have (at least) one real solution. (Contributed by AV, 23-Jan-2023)

Ref Expression
Hypotheses requad2.a φ A
requad2.z φ A 0
requad2.b φ B
requad2.c φ C
requad2.d φ D = B 2 4 A C
Assertion requad01 φ x A x 2 + B x + C = 0 0 D

Proof

Step Hyp Ref Expression
1 requad2.a φ A
2 requad2.z φ A 0
3 requad2.b φ B
4 requad2.c φ C
5 requad2.d φ D = B 2 4 A C
6 1 recnd φ A
7 6 adantr φ x A
8 2 adantr φ x A 0
9 3 recnd φ B
10 9 adantr φ x B
11 4 recnd φ C
12 11 adantr φ x C
13 recn x x
14 13 adantl φ x x
15 5 adantr φ x D = B 2 4 A C
16 7 8 10 12 14 15 quad φ x A x 2 + B x + C = 0 x = - B + D 2 A x = - B - D 2 A
17 eleq1 x = - B + D 2 A x - B + D 2 A
18 17 adantl φ x = - B + D 2 A x - B + D 2 A
19 2re 2
20 19 a1i φ 2
21 20 1 remulcld φ 2 A
22 21 adantr φ ¬ 0 D 2 A
23 9 negcld φ B
24 3 resqcld φ B 2
25 4re 4
26 25 a1i φ 4
27 1 4 remulcld φ A C
28 26 27 remulcld φ 4 A C
29 24 28 resubcld φ B 2 4 A C
30 5 29 eqeltrd φ D
31 30 recnd φ D
32 31 sqrtcld φ D
33 23 32 addcld φ - B + D
34 33 adantr φ ¬ 0 D - B + D
35 3 renegcld φ B
36 35 adantr φ ¬ 0 D B
37 32 adantr φ ¬ 0 D D
38 31 negnegd φ D = D
39 38 adantr φ ¬ 0 D D = D
40 39 eqcomd φ ¬ 0 D D = D
41 40 fveq2d φ ¬ 0 D D = D
42 30 renegcld φ D
43 42 adantr φ ¬ 0 D D
44 0red φ 0
45 30 44 ltnled φ D < 0 ¬ 0 D
46 ltle D 0 D < 0 D 0
47 30 44 46 syl2anc φ D < 0 D 0
48 45 47 sylbird φ ¬ 0 D D 0
49 48 imp φ ¬ 0 D D 0
50 30 le0neg1d φ D 0 0 D
51 50 adantr φ ¬ 0 D D 0 0 D
52 49 51 mpbid φ ¬ 0 D 0 D
53 43 52 sqrtnegd φ ¬ 0 D D = i D
54 41 53 eqtrd φ ¬ 0 D D = i D
55 ax-icn i
56 55 a1i φ ¬ 0 D i
57 31 negcld φ D
58 57 sqrtcld φ D
59 58 adantr φ ¬ 0 D D
60 56 59 mulcomd φ ¬ 0 D i D = D i
61 43 52 resqrtcld φ ¬ 0 D D
62 inelr ¬ i
63 eldif i i ¬ i
64 55 62 63 mpbir2an i
65 64 a1i φ ¬ 0 D i
66 30 lt0neg1d φ D < 0 0 < D
67 ltne 0 0 < D D 0
68 44 67 sylan φ 0 < D D 0
69 42 adantr φ 0 < D D
70 ltle 0 D 0 < D 0 D
71 44 42 70 syl2anc φ 0 < D 0 D
72 71 imp φ 0 < D 0 D
73 sqrt00 D 0 D D = 0 D = 0
74 69 72 73 syl2anc φ 0 < D D = 0 D = 0
75 74 bicomd φ 0 < D D = 0 D = 0
76 75 necon3bid φ 0 < D D 0 D 0
77 68 76 mpbid φ 0 < D D 0
78 77 ex φ 0 < D D 0
79 66 78 sylbid φ D < 0 D 0
80 45 79 sylbird φ ¬ 0 D D 0
81 80 imp φ ¬ 0 D D 0
82 61 65 81 recnmulnred φ ¬ 0 D D i
83 df-nel D i ¬ D i
84 82 83 sylib φ ¬ 0 D ¬ D i
85 60 84 eqneltrd φ ¬ 0 D ¬ i D
86 54 85 eqneltrd φ ¬ 0 D ¬ D
87 37 86 eldifd φ ¬ 0 D D
88 36 87 readdcnnred φ ¬ 0 D - B + D
89 df-nel - B + D ¬ - B + D
90 88 89 sylib φ ¬ 0 D ¬ - B + D
91 34 90 eldifd φ ¬ 0 D - B + D
92 2cnd φ 2
93 2ne0 2 0
94 93 a1i φ 2 0
95 92 6 94 2 mulne0d φ 2 A 0
96 95 adantr φ ¬ 0 D 2 A 0
97 22 91 96 cndivrenred φ ¬ 0 D - B + D 2 A
98 df-nel - B + D 2 A ¬ - B + D 2 A
99 97 98 sylib φ ¬ 0 D ¬ - B + D 2 A
100 99 ex φ ¬ 0 D ¬ - B + D 2 A
101 100 con4d φ - B + D 2 A 0 D
102 101 adantr φ x = - B + D 2 A - B + D 2 A 0 D
103 18 102 sylbid φ x = - B + D 2 A x 0 D
104 103 ex φ x = - B + D 2 A x 0 D
105 eleq1 x = - B - D 2 A x - B - D 2 A
106 105 adantl φ x = - B - D 2 A x - B - D 2 A
107 23 32 subcld φ - B - D
108 107 adantr φ ¬ 0 D - B - D
109 36 87 resubcnnred φ ¬ 0 D - B - D
110 df-nel - B - D ¬ - B - D
111 109 110 sylib φ ¬ 0 D ¬ - B - D
112 108 111 eldifd φ ¬ 0 D - B - D
113 22 112 96 cndivrenred φ ¬ 0 D - B - D 2 A
114 df-nel - B - D 2 A ¬ - B - D 2 A
115 113 114 sylib φ ¬ 0 D ¬ - B - D 2 A
116 115 ex φ ¬ 0 D ¬ - B - D 2 A
117 116 con4d φ - B - D 2 A 0 D
118 117 adantr φ x = - B - D 2 A - B - D 2 A 0 D
119 106 118 sylbid φ x = - B - D 2 A x 0 D
120 119 ex φ x = - B - D 2 A x 0 D
121 104 120 jaod φ x = - B + D 2 A x = - B - D 2 A x 0 D
122 121 com23 φ x x = - B + D 2 A x = - B - D 2 A 0 D
123 122 imp φ x x = - B + D 2 A x = - B - D 2 A 0 D
124 16 123 sylbid φ x A x 2 + B x + C = 0 0 D
125 124 rexlimdva φ x A x 2 + B x + C = 0 0 D
126 35 adantr φ 0 D B
127 30 adantr φ 0 D D
128 simpr φ 0 D 0 D
129 127 128 resqrtcld φ 0 D D
130 126 129 readdcld φ 0 D - B + D
131 19 a1i φ 0 D 2
132 1 adantr φ 0 D A
133 131 132 remulcld φ 0 D 2 A
134 95 adantr φ 0 D 2 A 0
135 130 133 134 redivcld φ 0 D - B + D 2 A
136 oveq1 x = - B + D 2 A x 2 = - B + D 2 A 2
137 136 oveq2d x = - B + D 2 A A x 2 = A - B + D 2 A 2
138 oveq2 x = - B + D 2 A B x = B - B + D 2 A
139 138 oveq1d x = - B + D 2 A B x + C = B - B + D 2 A + C
140 137 139 oveq12d x = - B + D 2 A A x 2 + B x + C = A - B + D 2 A 2 + B - B + D 2 A + C
141 140 eqeq1d x = - B + D 2 A A x 2 + B x + C = 0 A - B + D 2 A 2 + B - B + D 2 A + C = 0
142 141 adantl φ 0 D x = - B + D 2 A A x 2 + B x + C = 0 A - B + D 2 A 2 + B - B + D 2 A + C = 0
143 eqidd φ 0 D - B + D 2 A = - B + D 2 A
144 143 orcd φ 0 D - B + D 2 A = - B + D 2 A - B + D 2 A = - B - D 2 A
145 6 adantr φ 0 D A
146 2 adantr φ 0 D A 0
147 9 adantr φ 0 D B
148 11 adantr φ 0 D C
149 92 6 mulcld φ 2 A
150 33 149 95 divcld φ - B + D 2 A
151 150 adantr φ 0 D - B + D 2 A
152 5 adantr φ 0 D D = B 2 4 A C
153 145 146 147 148 151 152 quad φ 0 D A - B + D 2 A 2 + B - B + D 2 A + C = 0 - B + D 2 A = - B + D 2 A - B + D 2 A = - B - D 2 A
154 144 153 mpbird φ 0 D A - B + D 2 A 2 + B - B + D 2 A + C = 0
155 135 142 154 rspcedvd φ 0 D x A x 2 + B x + C = 0
156 155 ex φ 0 D x A x 2 + B x + C = 0
157 125 156 impbid φ x A x 2 + B x + C = 0 0 D