Metamath Proof Explorer


Theorem eqsqrtd

Description: A deduction for showing that a number equals the square root of another. (Contributed by Mario Carneiro, 3-Apr-2015)

Ref Expression
Hypotheses eqsqrtd.1 φ A
eqsqrtd.2 φ B
eqsqrtd.3 φ A 2 = B
eqsqrtd.4 φ 0 A
eqsqrtd.5 φ ¬ i A +
Assertion eqsqrtd φ A = B

Proof

Step Hyp Ref Expression
1 eqsqrtd.1 φ A
2 eqsqrtd.2 φ B
3 eqsqrtd.3 φ A 2 = B
4 eqsqrtd.4 φ 0 A
5 eqsqrtd.5 φ ¬ i A +
6 sqreu B ∃! x x 2 = B 0 x i x +
7 reurmo ∃! x x 2 = B 0 x i x + * x x 2 = B 0 x i x +
8 2 6 7 3syl φ * x x 2 = B 0 x i x +
9 df-nel i A + ¬ i A +
10 5 9 sylibr φ i A +
11 3 4 10 3jca φ A 2 = B 0 A i A +
12 sqrtcl B B
13 2 12 syl φ B
14 sqrtthlem B B 2 = B 0 B i B +
15 2 14 syl φ B 2 = B 0 B i B +
16 oveq1 x = A x 2 = A 2
17 16 eqeq1d x = A x 2 = B A 2 = B
18 fveq2 x = A x = A
19 18 breq2d x = A 0 x 0 A
20 oveq2 x = A i x = i A
21 neleq1 i x = i A i x + i A +
22 20 21 syl x = A i x + i A +
23 17 19 22 3anbi123d x = A x 2 = B 0 x i x + A 2 = B 0 A i A +
24 oveq1 x = B x 2 = B 2
25 24 eqeq1d x = B x 2 = B B 2 = B
26 fveq2 x = B x = B
27 26 breq2d x = B 0 x 0 B
28 oveq2 x = B i x = i B
29 neleq1 i x = i B i x + i B +
30 28 29 syl x = B i x + i B +
31 25 27 30 3anbi123d x = B x 2 = B 0 x i x + B 2 = B 0 B i B +
32 23 31 rmoi * x x 2 = B 0 x i x + A A 2 = B 0 A i A + B B 2 = B 0 B i B + A = B
33 8 1 11 13 15 32 syl122anc φ A = B