| Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
| Mirrors > Home > MPE Home > Th. List > max0sub | Structured version Visualization version GIF version | ||
| Description: Decompose a real number into positive and negative parts. (Contributed by Mario Carneiro, 6-Aug-2014.) |
| Ref | Expression |
|---|---|
| max0sub | ⊢ (𝐴 ∈ ℝ → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | 0red 11230 | . 2 ⊢ (𝐴 ∈ ℝ → 0 ∈ ℝ) | |
| 2 | id 22 | . 2 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℝ) | |
| 3 | iftrue 4504 | . . . . 5 ⊢ (0 ≤ 𝐴 → if(0 ≤ 𝐴, 𝐴, 0) = 𝐴) | |
| 4 | 3 | adantl 481 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ 𝐴, 𝐴, 0) = 𝐴) |
| 5 | 0xr 11274 | . . . . 5 ⊢ 0 ∈ ℝ* | |
| 6 | renegcl 11538 | . . . . . . 7 ⊢ (𝐴 ∈ ℝ → -𝐴 ∈ ℝ) | |
| 7 | 6 | adantr 480 | . . . . . 6 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ∈ ℝ) |
| 8 | 7 | rexrd 11277 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ∈ ℝ*) |
| 9 | le0neg2 11738 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → (0 ≤ 𝐴 ↔ -𝐴 ≤ 0)) | |
| 10 | 9 | biimpa 476 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ≤ 0) |
| 11 | xrmaxeq 13187 | . . . . 5 ⊢ ((0 ∈ ℝ* ∧ -𝐴 ∈ ℝ* ∧ -𝐴 ≤ 0) → if(0 ≤ -𝐴, -𝐴, 0) = 0) | |
| 12 | 5, 8, 10, 11 | mp3an2i 1467 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ -𝐴, -𝐴, 0) = 0) |
| 13 | 4, 12 | oveq12d 7417 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = (𝐴 − 0)) |
| 14 | recn 11211 | . . . . 5 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℂ) | |
| 15 | 14 | adantr 480 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → 𝐴 ∈ ℂ) |
| 16 | 15 | subid1d 11575 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (𝐴 − 0) = 𝐴) |
| 17 | 13, 16 | eqtrd 2769 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
| 18 | rexr 11273 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℝ*) | |
| 19 | 18 | adantr 480 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ∈ ℝ*) |
| 20 | simpr 484 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ≤ 0) | |
| 21 | xrmaxeq 13187 | . . . . 5 ⊢ ((0 ∈ ℝ* ∧ 𝐴 ∈ ℝ* ∧ 𝐴 ≤ 0) → if(0 ≤ 𝐴, 𝐴, 0) = 0) | |
| 22 | 5, 19, 20, 21 | mp3an2i 1467 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ 𝐴, 𝐴, 0) = 0) |
| 23 | le0neg1 11737 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → (𝐴 ≤ 0 ↔ 0 ≤ -𝐴)) | |
| 24 | 23 | biimpa 476 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 0 ≤ -𝐴) |
| 25 | 24 | iftrued 4506 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ -𝐴, -𝐴, 0) = -𝐴) |
| 26 | 22, 25 | oveq12d 7417 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = (0 − -𝐴)) |
| 27 | df-neg 11461 | . . . 4 ⊢ --𝐴 = (0 − -𝐴) | |
| 28 | 14 | adantr 480 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ∈ ℂ) |
| 29 | 28 | negnegd 11577 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → --𝐴 = 𝐴) |
| 30 | 27, 29 | eqtr3id 2783 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (0 − -𝐴) = 𝐴) |
| 31 | 26, 30 | eqtrd 2769 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
| 32 | 1, 2, 17, 31 | lecasei 11333 | 1 ⊢ (𝐴 ∈ ℝ → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
| Colors of variables: wff setvar class |
| Syntax hints: → wi 4 ∧ wa 395 = wceq 1539 ∈ wcel 2107 ifcif 4498 class class class wbr 5116 (class class class)co 7399 ℂcc 11119 ℝcr 11120 0cc0 11121 ℝ*cxr 11260 ≤ cle 11262 − cmin 11458 -cneg 11459 |
| This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1794 ax-4 1808 ax-5 1909 ax-6 1966 ax-7 2006 ax-8 2109 ax-9 2117 ax-10 2140 ax-11 2156 ax-12 2176 ax-ext 2706 ax-sep 5263 ax-nul 5273 ax-pow 5332 ax-pr 5399 ax-un 7723 ax-cnex 11177 ax-resscn 11178 ax-1cn 11179 ax-icn 11180 ax-addcl 11181 ax-addrcl 11182 ax-mulcl 11183 ax-mulrcl 11184 ax-mulcom 11185 ax-addass 11186 ax-mulass 11187 ax-distr 11188 ax-i2m1 11189 ax-1ne0 11190 ax-1rid 11191 ax-rnegex 11192 ax-rrecex 11193 ax-cnre 11194 ax-pre-lttri 11195 ax-pre-lttrn 11196 ax-pre-ltadd 11197 |
| This theorem depends on definitions: df-bi 207 df-an 396 df-or 848 df-3or 1087 df-3an 1088 df-tru 1542 df-fal 1552 df-ex 1779 df-nf 1783 df-sb 2064 df-mo 2538 df-eu 2567 df-clab 2713 df-cleq 2726 df-clel 2808 df-nfc 2884 df-ne 2932 df-nel 3036 df-ral 3051 df-rex 3060 df-reu 3358 df-rab 3414 df-v 3459 df-sbc 3764 df-csb 3873 df-dif 3927 df-un 3929 df-in 3931 df-ss 3941 df-nul 4307 df-if 4499 df-pw 4575 df-sn 4600 df-pr 4602 df-op 4606 df-uni 4881 df-br 5117 df-opab 5179 df-mpt 5199 df-id 5545 df-po 5558 df-so 5559 df-xp 5657 df-rel 5658 df-cnv 5659 df-co 5660 df-dm 5661 df-rn 5662 df-res 5663 df-ima 5664 df-iota 6480 df-fun 6529 df-fn 6530 df-f 6531 df-f1 6532 df-fo 6533 df-f1o 6534 df-fv 6535 df-riota 7356 df-ov 7402 df-oprab 7403 df-mpo 7404 df-er 8713 df-en 8954 df-dom 8955 df-sdom 8956 df-pnf 11263 df-mnf 11264 df-xr 11265 df-ltxr 11266 df-le 11267 df-sub 11460 df-neg 11461 |
| This theorem is referenced by: mbfi1flimlem 25660 itgitg1 25747 itgconst 25757 itgaddlem2 25762 itgmulc2lem2 25771 itgaddnclem2 37624 itgmulc2nclem2 37632 |
| Copyright terms: Public domain | W3C validator |