Users' Mathboxes Mathbox for Richard Penner < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  sqrtcval2 Structured version   Visualization version   GIF version

Theorem sqrtcval2 40700
Description: Explicit formula for the complex square root in terms of the square root of non-negative reals. The right side is slightly more compact than sqrtcval 40699. (Contributed by RP, 18-May-2024.)
Assertion
Ref Expression
sqrtcval2 (𝐴 ∈ ℂ → (√‘𝐴) = ((√‘(((abs‘𝐴) + (ℜ‘𝐴)) / 2)) + (if((ℑ‘𝐴) < 0, -i, i) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2)))))

Proof of Theorem sqrtcval2
StepHypRef Expression
1 sqrtcval 40699 . 2 (𝐴 ∈ ℂ → (√‘𝐴) = ((√‘(((abs‘𝐴) + (ℜ‘𝐴)) / 2)) + (i · (if((ℑ‘𝐴) < 0, -1, 1) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2))))))
2 ovif2 7239 . . . . . . 7 (i · if((ℑ‘𝐴) < 0, -1, 1)) = if((ℑ‘𝐴) < 0, (i · -1), (i · 1))
3 neg1cn 11773 . . . . . . . . 9 -1 ∈ ℂ
4 ax-icn 10619 . . . . . . . . 9 i ∈ ℂ
54mulm1i 11108 . . . . . . . . 9 (-1 · i) = -i
63, 4, 5mulcomli 10673 . . . . . . . 8 (i · -1) = -i
74mulid1i 10668 . . . . . . . 8 (i · 1) = i
8 ifeq12 4431 . . . . . . . 8 (((i · -1) = -i ∧ (i · 1) = i) → if((ℑ‘𝐴) < 0, (i · -1), (i · 1)) = if((ℑ‘𝐴) < 0, -i, i))
96, 7, 8mp2an 692 . . . . . . 7 if((ℑ‘𝐴) < 0, (i · -1), (i · 1)) = if((ℑ‘𝐴) < 0, -i, i)
102, 9eqtr2i 2783 . . . . . 6 if((ℑ‘𝐴) < 0, -i, i) = (i · if((ℑ‘𝐴) < 0, -1, 1))
1110a1i 11 . . . . 5 (𝐴 ∈ ℂ → if((ℑ‘𝐴) < 0, -i, i) = (i · if((ℑ‘𝐴) < 0, -1, 1)))
1211oveq1d 7158 . . . 4 (𝐴 ∈ ℂ → (if((ℑ‘𝐴) < 0, -i, i) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2))) = ((i · if((ℑ‘𝐴) < 0, -1, 1)) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2))))
134a1i 11 . . . . 5 (𝐴 ∈ ℂ → i ∈ ℂ)
14 neg1rr 11774 . . . . . . . 8 -1 ∈ ℝ
15 1re 10664 . . . . . . . 8 1 ∈ ℝ
1614, 15ifcli 4460 . . . . . . 7 if((ℑ‘𝐴) < 0, -1, 1) ∈ ℝ
1716a1i 11 . . . . . 6 (𝐴 ∈ ℂ → if((ℑ‘𝐴) < 0, -1, 1) ∈ ℝ)
1817recnd 10692 . . . . 5 (𝐴 ∈ ℂ → if((ℑ‘𝐴) < 0, -1, 1) ∈ ℂ)
19 sqrtcvallem3 40696 . . . . . 6 (𝐴 ∈ ℂ → (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2)) ∈ ℝ)
2019recnd 10692 . . . . 5 (𝐴 ∈ ℂ → (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2)) ∈ ℂ)
2113, 18, 20mulassd 10687 . . . 4 (𝐴 ∈ ℂ → ((i · if((ℑ‘𝐴) < 0, -1, 1)) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2))) = (i · (if((ℑ‘𝐴) < 0, -1, 1) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2)))))
2212, 21eqtrd 2794 . . 3 (𝐴 ∈ ℂ → (if((ℑ‘𝐴) < 0, -i, i) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2))) = (i · (if((ℑ‘𝐴) < 0, -1, 1) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2)))))
2322oveq2d 7159 . 2 (𝐴 ∈ ℂ → ((√‘(((abs‘𝐴) + (ℜ‘𝐴)) / 2)) + (if((ℑ‘𝐴) < 0, -i, i) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2)))) = ((√‘(((abs‘𝐴) + (ℜ‘𝐴)) / 2)) + (i · (if((ℑ‘𝐴) < 0, -1, 1) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2))))))
241, 23eqtr4d 2797 1 (𝐴 ∈ ℂ → (√‘𝐴) = ((√‘(((abs‘𝐴) + (ℜ‘𝐴)) / 2)) + (if((ℑ‘𝐴) < 0, -i, i) · (√‘(((abs‘𝐴) − (ℜ‘𝐴)) / 2)))))
Colors of variables: wff setvar class
Syntax hints:  wi 4   = wceq 1539  wcel 2112  ifcif 4413   class class class wbr 5025  cfv 6328  (class class class)co 7143  cc 10558  cr 10559  0cc0 10560  1c1 10561  ici 10562   + caddc 10563   · cmul 10565   < clt 10698  cmin 10893  -cneg 10894   / cdiv 11320  2c2 11714  cre 14489  cim 14490  csqrt 14625  abscabs 14626
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1912  ax-6 1971  ax-7 2016  ax-8 2114  ax-9 2122  ax-10 2143  ax-11 2159  ax-12 2176  ax-ext 2730  ax-sep 5162  ax-nul 5169  ax-pow 5227  ax-pr 5291  ax-un 7452  ax-cnex 10616  ax-resscn 10617  ax-1cn 10618  ax-icn 10619  ax-addcl 10620  ax-addrcl 10621  ax-mulcl 10622  ax-mulrcl 10623  ax-mulcom 10624  ax-addass 10625  ax-mulass 10626  ax-distr 10627  ax-i2m1 10628  ax-1ne0 10629  ax-1rid 10630  ax-rnegex 10631  ax-rrecex 10632  ax-cnre 10633  ax-pre-lttri 10634  ax-pre-lttrn 10635  ax-pre-ltadd 10636  ax-pre-mulgt0 10637  ax-pre-sup 10638
This theorem depends on definitions:  df-bi 210  df-an 401  df-or 846  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2071  df-mo 2558  df-eu 2589  df-clab 2737  df-cleq 2751  df-clel 2831  df-nfc 2899  df-ne 2950  df-nel 3054  df-ral 3073  df-rex 3074  df-reu 3075  df-rmo 3076  df-rab 3077  df-v 3409  df-sbc 3694  df-csb 3802  df-dif 3857  df-un 3859  df-in 3861  df-ss 3871  df-pss 3873  df-nul 4222  df-if 4414  df-pw 4489  df-sn 4516  df-pr 4518  df-tp 4520  df-op 4522  df-uni 4792  df-iun 4878  df-br 5026  df-opab 5088  df-mpt 5106  df-tr 5132  df-id 5423  df-eprel 5428  df-po 5436  df-so 5437  df-fr 5476  df-we 5478  df-xp 5523  df-rel 5524  df-cnv 5525  df-co 5526  df-dm 5527  df-rn 5528  df-res 5529  df-ima 5530  df-pred 6119  df-ord 6165  df-on 6166  df-lim 6167  df-suc 6168  df-iota 6287  df-fun 6330  df-fn 6331  df-f 6332  df-f1 6333  df-fo 6334  df-f1o 6335  df-fv 6336  df-riota 7101  df-ov 7146  df-oprab 7147  df-mpo 7148  df-om 7573  df-2nd 7687  df-wrecs 7950  df-recs 8011  df-rdg 8049  df-er 8292  df-en 8521  df-dom 8522  df-sdom 8523  df-sup 8924  df-pnf 10700  df-mnf 10701  df-xr 10702  df-ltxr 10703  df-le 10704  df-sub 10895  df-neg 10896  df-div 11321  df-nn 11660  df-2 11722  df-3 11723  df-n0 11920  df-z 12006  df-uz 12268  df-rp 12416  df-seq 13404  df-exp 13465  df-cj 14491  df-re 14492  df-im 14493  df-sqrt 14627  df-abs 14628
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator