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 10638 | . 2 ⊢ (𝐴 ∈ ℝ → 0 ∈ ℝ) | |
2 | id 22 | . 2 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℝ) | |
3 | iftrue 4472 | . . . . 5 ⊢ (0 ≤ 𝐴 → if(0 ≤ 𝐴, 𝐴, 0) = 𝐴) | |
4 | 3 | adantl 484 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ 𝐴, 𝐴, 0) = 𝐴) |
5 | 0xr 10682 | . . . . 5 ⊢ 0 ∈ ℝ* | |
6 | renegcl 10943 | . . . . . . 7 ⊢ (𝐴 ∈ ℝ → -𝐴 ∈ ℝ) | |
7 | 6 | adantr 483 | . . . . . 6 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ∈ ℝ) |
8 | 7 | rexrd 10685 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ∈ ℝ*) |
9 | le0neg2 11143 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → (0 ≤ 𝐴 ↔ -𝐴 ≤ 0)) | |
10 | 9 | biimpa 479 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ≤ 0) |
11 | xrmaxeq 12566 | . . . . 5 ⊢ ((0 ∈ ℝ* ∧ -𝐴 ∈ ℝ* ∧ -𝐴 ≤ 0) → if(0 ≤ -𝐴, -𝐴, 0) = 0) | |
12 | 5, 8, 10, 11 | mp3an2i 1462 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ -𝐴, -𝐴, 0) = 0) |
13 | 4, 12 | oveq12d 7168 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = (𝐴 − 0)) |
14 | recn 10621 | . . . . 5 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℂ) | |
15 | 14 | adantr 483 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → 𝐴 ∈ ℂ) |
16 | 15 | subid1d 10980 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (𝐴 − 0) = 𝐴) |
17 | 13, 16 | eqtrd 2856 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
18 | rexr 10681 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℝ*) | |
19 | 18 | adantr 483 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ∈ ℝ*) |
20 | simpr 487 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ≤ 0) | |
21 | xrmaxeq 12566 | . . . . 5 ⊢ ((0 ∈ ℝ* ∧ 𝐴 ∈ ℝ* ∧ 𝐴 ≤ 0) → if(0 ≤ 𝐴, 𝐴, 0) = 0) | |
22 | 5, 19, 20, 21 | mp3an2i 1462 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ 𝐴, 𝐴, 0) = 0) |
23 | le0neg1 11142 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → (𝐴 ≤ 0 ↔ 0 ≤ -𝐴)) | |
24 | 23 | biimpa 479 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 0 ≤ -𝐴) |
25 | 24 | iftrued 4474 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ -𝐴, -𝐴, 0) = -𝐴) |
26 | 22, 25 | oveq12d 7168 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = (0 − -𝐴)) |
27 | df-neg 10867 | . . . 4 ⊢ --𝐴 = (0 − -𝐴) | |
28 | 14 | adantr 483 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ∈ ℂ) |
29 | 28 | negnegd 10982 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → --𝐴 = 𝐴) |
30 | 27, 29 | syl5eqr 2870 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (0 − -𝐴) = 𝐴) |
31 | 26, 30 | eqtrd 2856 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
32 | 1, 2, 17, 31 | lecasei 10740 | 1 ⊢ (𝐴 ∈ ℝ → (if(0 ≤ 𝐴, 𝐴, 0) − if(0 ≤ -𝐴, -𝐴, 0)) = 𝐴) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 398 = wceq 1533 ∈ wcel 2110 ifcif 4466 class class class wbr 5058 (class class class)co 7150 ℂcc 10529 ℝcr 10530 0cc0 10531 ℝ*cxr 10668 ≤ cle 10670 − cmin 10864 -cneg 10865 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1792 ax-4 1806 ax-5 1907 ax-6 1966 ax-7 2011 ax-8 2112 ax-9 2120 ax-10 2141 ax-11 2157 ax-12 2173 ax-ext 2793 ax-sep 5195 ax-nul 5202 ax-pow 5258 ax-pr 5321 ax-un 7455 ax-cnex 10587 ax-resscn 10588 ax-1cn 10589 ax-icn 10590 ax-addcl 10591 ax-addrcl 10592 ax-mulcl 10593 ax-mulrcl 10594 ax-mulcom 10595 ax-addass 10596 ax-mulass 10597 ax-distr 10598 ax-i2m1 10599 ax-1ne0 10600 ax-1rid 10601 ax-rnegex 10602 ax-rrecex 10603 ax-cnre 10604 ax-pre-lttri 10605 ax-pre-lttrn 10606 ax-pre-ltadd 10607 |
This theorem depends on definitions: df-bi 209 df-an 399 df-or 844 df-3or 1084 df-3an 1085 df-tru 1536 df-ex 1777 df-nf 1781 df-sb 2066 df-mo 2618 df-eu 2650 df-clab 2800 df-cleq 2814 df-clel 2893 df-nfc 2963 df-ne 3017 df-nel 3124 df-ral 3143 df-rex 3144 df-reu 3145 df-rab 3147 df-v 3496 df-sbc 3772 df-csb 3883 df-dif 3938 df-un 3940 df-in 3942 df-ss 3951 df-nul 4291 df-if 4467 df-pw 4540 df-sn 4561 df-pr 4563 df-op 4567 df-uni 4832 df-br 5059 df-opab 5121 df-mpt 5139 df-id 5454 df-po 5468 df-so 5469 df-xp 5555 df-rel 5556 df-cnv 5557 df-co 5558 df-dm 5559 df-rn 5560 df-res 5561 df-ima 5562 df-iota 6308 df-fun 6351 df-fn 6352 df-f 6353 df-f1 6354 df-fo 6355 df-f1o 6356 df-fv 6357 df-riota 7108 df-ov 7153 df-oprab 7154 df-mpo 7155 df-er 8283 df-en 8504 df-dom 8505 df-sdom 8506 df-pnf 10671 df-mnf 10672 df-xr 10673 df-ltxr 10674 df-le 10675 df-sub 10866 df-neg 10867 |
This theorem is referenced by: mbfi1flimlem 24317 itgitg1 24403 itgconst 24413 itgaddlem2 24418 itgmulc2lem2 24427 itgaddnclem2 34945 itgmulc2nclem2 34953 |
Copyright terms: Public domain | W3C validator |