| 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 11178 | . 2 ⊢ (𝐴 ∈ ℝ → 0 ∈ ℝ) | |
| 2 | id 22 | . 2 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℝ) | |
| 3 | iftrue 4483 | . . . . 5 ⊢ (0 ≤ 𝐴 → if(0 ≤ 𝐴, 𝐴, 0) = 𝐴) | |
| 4 | 3 | adantl 485 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ 𝐴, 𝐴, 0) = 𝐴) |
| 5 | 0xr 11223 | . . . . 5 ⊢ 0 ∈ ℝ* | |
| 6 | renegcl 11488 | . . . . . . 7 ⊢ (𝐴 ∈ ℝ → -𝐴 ∈ ℝ) | |
| 7 | 6 | adantr 484 | . . . . . 6 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ∈ ℝ) |
| 8 | 7 | rexrd 11226 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ∈ ℝ*) |
| 9 | le0neg2 11690 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → (0 ≤ 𝐴 ↔ -𝐴 ≤ 0)) | |
| 10 | 9 | biimpa 480 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ≤ 0) |
| 11 | xrmaxeq 13176 | . . . . 5 ⊢ ((0 ∈ ℝ* ∧ -𝐴 ∈ ℝ* ∧ -𝐴 ≤ 0) → if(0 ≤ -𝐴, -𝐴, 0) = 0) | |
| 12 | 5, 8, 10, 11 | mp3an2i 1486 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ -𝐴, -𝐴, 0) = 0) |
| 13 | 4, 12 | oveq12d 7409 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = (𝐴 − 0)) |
| 14 | recn 11157 | . . . . 5 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℂ) | |
| 15 | 14 | adantr 484 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → 𝐴 ∈ ℂ) |
| 16 | 15 | subid1d 11525 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (𝐴 − 0) = 𝐴) |
| 17 | 13, 16 | eqtrd 2796 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
| 18 | rexr 11222 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℝ*) | |
| 19 | 18 | adantr 484 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ∈ ℝ*) |
| 20 | simpr 488 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ≤ 0) | |
| 21 | xrmaxeq 13176 | . . . . 5 ⊢ ((0 ∈ ℝ* ∧ 𝐴 ∈ ℝ* ∧ 𝐴 ≤ 0) → if(0 ≤ 𝐴, 𝐴, 0) = 0) | |
| 22 | 5, 19, 20, 21 | mp3an2i 1486 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ 𝐴, 𝐴, 0) = 0) |
| 23 | le0neg1 11689 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → (𝐴 ≤ 0 ↔ 0 ≤ -𝐴)) | |
| 24 | 23 | biimpa 480 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 0 ≤ -𝐴) |
| 25 | 24 | iftrued 4485 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ -𝐴, -𝐴, 0) = -𝐴) |
| 26 | 22, 25 | oveq12d 7409 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = (0 − -𝐴)) |
| 27 | df-neg 11411 | . . . 4 ⊢ --𝐴 = (0 − -𝐴) | |
| 28 | 14 | adantr 484 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ∈ ℂ) |
| 29 | 28 | negnegd 11527 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → --𝐴 = 𝐴) |
| 30 | 27, 29 | eqtr3id 2810 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (0 − -𝐴) = 𝐴) |
| 31 | 26, 30 | eqtrd 2796 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
| 32 | 1, 2, 17, 31 | lecasei 11283 | 1 ⊢ (𝐴 ∈ ℝ → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
| Colors of variables: wff setvar class |
| Syntax hints: → wi 4 ∧ wa 399 = wceq 1559 ∈ wcel 2141 ifcif 4477 class class class wbr 5097 (class class class)co 7391 ℂcc 11065 ℝcr 11066 0cc0 11067 ℝ*cxr 11209 ≤ cle 11211 − cmin 11408 -cneg 11409 |
| This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1814 ax-4 1828 ax-5 1929 ax-6 1986 ax-7 2027 ax-8 2143 ax-9 2151 ax-10 2174 ax-11 2190 ax-12 2211 ax-ext 2733 ax-sep 5243 ax-nul 5253 ax-pow 5319 ax-pr 5387 ax-un 7713 ax-cnex 11123 ax-resscn 11124 ax-1cn 11125 ax-icn 11126 ax-addcl 11127 ax-addrcl 11128 ax-mulcl 11129 ax-mulrcl 11130 ax-mulcom 11131 ax-addass 11132 ax-mulass 11133 ax-distr 11134 ax-i2m1 11135 ax-1ne0 11136 ax-1rid 11137 ax-rnegex 11138 ax-rrecex 11139 ax-cnre 11140 ax-pre-lttri 11141 ax-pre-lttrn 11142 ax-pre-ltadd 11143 |
| This theorem depends on definitions: df-bi 209 df-an 400 df-or 859 df-3or 1098 df-3an 1099 df-tru 1562 df-fal 1572 df-ex 1799 df-nf 1803 df-sb 2090 df-mo 2565 df-eu 2595 df-clab 2740 df-cleq 2753 df-clel 2836 df-nfc 2910 df-ne 2957 df-nel 3061 df-ral 3076 df-rex 3086 df-reu 3367 df-rab 3414 df-v 3455 df-sbc 3743 df-csb 3851 df-dif 3905 df-un 3907 df-in 3909 df-ss 3919 df-nul 4284 df-if 4478 df-pw 4554 df-sn 4580 df-pr 4582 df-op 4586 df-uni 4863 df-br 5098 df-opab 5160 df-mpt 5179 df-id 5538 df-po 5551 df-so 5552 df-xp 5649 df-rel 5650 df-cnv 5651 df-co 5652 df-dm 5653 df-rn 5654 df-res 5655 df-ima 5656 df-iota 6472 df-fun 6518 df-fn 6519 df-f 6520 df-f1 6521 df-fo 6522 df-f1o 6523 df-fv 6524 df-riota 7348 df-ov 7394 df-oprab 7395 df-mpo 7396 df-er 8672 df-en 8922 df-dom 8923 df-sdom 8924 df-pnf 11212 df-mnf 11213 df-xr 11214 df-ltxr 11215 df-le 11216 df-sub 11410 df-neg 11411 |
| This theorem is referenced by: mbfi1flimlem 25772 itgitg1 25859 itgconst 25869 itgaddlem2 25874 itgmulc2lem2 25883 itgaddnclem2 38139 itgmulc2nclem2 38147 |
| Copyright terms: Public domain | W3C validator |