![]() |
Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
|
Mirrors > Home > MPE Home > Th. List > max0add | Structured version Visualization version GIF version |
Description: The sum of the positive and negative part functions is the absolute value function over the reals. (Contributed by Mario Carneiro, 24-Aug-2014.) |
Ref | Expression |
---|---|
max0add | ⊢ (𝐴 ∈ ℝ → (if(0 ≤ 𝐴, 𝐴, 0) + if(0 ≤ -𝐴, -𝐴, 0)) = (abs‘𝐴)) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | 0red 10244 | . 2 ⊢ (𝐴 ∈ ℝ → 0 ∈ ℝ) | |
2 | id 22 | . 2 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℝ) | |
3 | recn 10229 | . . . . 5 ⊢ (𝐴 ∈ ℝ → 𝐴 ∈ ℂ) | |
4 | 3 | adantr 466 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → 𝐴 ∈ ℂ) |
5 | 4 | addid1d 10439 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (𝐴 + 0) = 𝐴) |
6 | iftrue 4232 | . . . . 5 ⊢ (0 ≤ 𝐴 → if(0 ≤ 𝐴, 𝐴, 0) = 𝐴) | |
7 | 6 | adantl 467 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ 𝐴, 𝐴, 0) = 𝐴) |
8 | le0neg2 10740 | . . . . . . . . 9 ⊢ (𝐴 ∈ ℝ → (0 ≤ 𝐴 ↔ -𝐴 ≤ 0)) | |
9 | 8 | biimpa 462 | . . . . . . . 8 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → -𝐴 ≤ 0) |
10 | 9 | adantr 466 | . . . . . . 7 ⊢ (((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) ∧ 0 ≤ -𝐴) → -𝐴 ≤ 0) |
11 | simpr 471 | . . . . . . 7 ⊢ (((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) ∧ 0 ≤ -𝐴) → 0 ≤ -𝐴) | |
12 | renegcl 10547 | . . . . . . . . 9 ⊢ (𝐴 ∈ ℝ → -𝐴 ∈ ℝ) | |
13 | 12 | ad2antrr 699 | . . . . . . . 8 ⊢ (((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) ∧ 0 ≤ -𝐴) → -𝐴 ∈ ℝ) |
14 | 0re 10243 | . . . . . . . 8 ⊢ 0 ∈ ℝ | |
15 | letri3 10326 | . . . . . . . 8 ⊢ ((-𝐴 ∈ ℝ ∧ 0 ∈ ℝ) → (-𝐴 = 0 ↔ (-𝐴 ≤ 0 ∧ 0 ≤ -𝐴))) | |
16 | 13, 14, 15 | sylancl 568 | . . . . . . 7 ⊢ (((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) ∧ 0 ≤ -𝐴) → (-𝐴 = 0 ↔ (-𝐴 ≤ 0 ∧ 0 ≤ -𝐴))) |
17 | 10, 11, 16 | mpbir2and 686 | . . . . . 6 ⊢ (((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) ∧ 0 ≤ -𝐴) → -𝐴 = 0) |
18 | 17 | ifeq1da 4256 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ -𝐴, -𝐴, 0) = if(0 ≤ -𝐴, 0, 0)) |
19 | ifid 4265 | . . . . 5 ⊢ if(0 ≤ -𝐴, 0, 0) = 0 | |
20 | 18, 19 | syl6eq 2821 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → if(0 ≤ -𝐴, -𝐴, 0) = 0) |
21 | 7, 20 | oveq12d 6812 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (if(0 ≤ 𝐴, 𝐴, 0) + if(0 ≤ -𝐴, -𝐴, 0)) = (𝐴 + 0)) |
22 | absid 14245 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (abs‘𝐴) = 𝐴) | |
23 | 5, 21, 22 | 3eqtr4d 2815 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 0 ≤ 𝐴) → (if(0 ≤ 𝐴, 𝐴, 0) + if(0 ≤ -𝐴, -𝐴, 0)) = (abs‘𝐴)) |
24 | 3 | adantr 466 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 𝐴 ∈ ℂ) |
25 | 24 | negcld 10582 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → -𝐴 ∈ ℂ) |
26 | 25 | addid2d 10440 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (0 + -𝐴) = -𝐴) |
27 | letri3 10326 | . . . . . . . . 9 ⊢ ((𝐴 ∈ ℝ ∧ 0 ∈ ℝ) → (𝐴 = 0 ↔ (𝐴 ≤ 0 ∧ 0 ≤ 𝐴))) | |
28 | 14, 27 | mpan2 665 | . . . . . . . 8 ⊢ (𝐴 ∈ ℝ → (𝐴 = 0 ↔ (𝐴 ≤ 0 ∧ 0 ≤ 𝐴))) |
29 | 28 | biimprd 238 | . . . . . . 7 ⊢ (𝐴 ∈ ℝ → ((𝐴 ≤ 0 ∧ 0 ≤ 𝐴) → 𝐴 = 0)) |
30 | 29 | impl 443 | . . . . . 6 ⊢ (((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) ∧ 0 ≤ 𝐴) → 𝐴 = 0) |
31 | 30 | ifeq1da 4256 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ 𝐴, 𝐴, 0) = if(0 ≤ 𝐴, 0, 0)) |
32 | ifid 4265 | . . . . 5 ⊢ if(0 ≤ 𝐴, 0, 0) = 0 | |
33 | 31, 32 | syl6eq 2821 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ 𝐴, 𝐴, 0) = 0) |
34 | le0neg1 10739 | . . . . . 6 ⊢ (𝐴 ∈ ℝ → (𝐴 ≤ 0 ↔ 0 ≤ -𝐴)) | |
35 | 34 | biimpa 462 | . . . . 5 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → 0 ≤ -𝐴) |
36 | 35 | iftrued 4234 | . . . 4 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → if(0 ≤ -𝐴, -𝐴, 0) = -𝐴) |
37 | 33, 36 | oveq12d 6812 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (if(0 ≤ 𝐴, 𝐴, 0) + if(0 ≤ -𝐴, -𝐴, 0)) = (0 + -𝐴)) |
38 | absnid 14247 | . . 3 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (abs‘𝐴) = -𝐴) | |
39 | 26, 37, 38 | 3eqtr4d 2815 | . 2 ⊢ ((𝐴 ∈ ℝ ∧ 𝐴 ≤ 0) → (if(0 ≤ 𝐴, 𝐴, 0) + if(0 ≤ -𝐴, -𝐴, 0)) = (abs‘𝐴)) |
40 | 1, 2, 23, 39 | lecasei 10346 | 1 ⊢ (𝐴 ∈ ℝ → (if(0 ≤ 𝐴, 𝐴, 0) + if(0 ≤ -𝐴, -𝐴, 0)) = (abs‘𝐴)) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ↔ wb 196 ∧ wa 382 = wceq 1631 ∈ wcel 2145 ifcif 4226 class class class wbr 4787 ‘cfv 6032 (class class class)co 6794 ℂcc 10137 ℝcr 10138 0cc0 10139 + caddc 10142 ≤ cle 10278 -cneg 10470 abscabs 14183 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1870 ax-4 1885 ax-5 1991 ax-6 2057 ax-7 2093 ax-8 2147 ax-9 2154 ax-10 2174 ax-11 2190 ax-12 2203 ax-13 2408 ax-ext 2751 ax-sep 4916 ax-nul 4924 ax-pow 4975 ax-pr 5035 ax-un 7097 ax-cnex 10195 ax-resscn 10196 ax-1cn 10197 ax-icn 10198 ax-addcl 10199 ax-addrcl 10200 ax-mulcl 10201 ax-mulrcl 10202 ax-mulcom 10203 ax-addass 10204 ax-mulass 10205 ax-distr 10206 ax-i2m1 10207 ax-1ne0 10208 ax-1rid 10209 ax-rnegex 10210 ax-rrecex 10211 ax-cnre 10212 ax-pre-lttri 10213 ax-pre-lttrn 10214 ax-pre-ltadd 10215 ax-pre-mulgt0 10216 ax-pre-sup 10217 |
This theorem depends on definitions: df-bi 197 df-an 383 df-or 829 df-3or 1072 df-3an 1073 df-tru 1634 df-ex 1853 df-nf 1858 df-sb 2050 df-eu 2622 df-mo 2623 df-clab 2758 df-cleq 2764 df-clel 2767 df-nfc 2902 df-ne 2944 df-nel 3047 df-ral 3066 df-rex 3067 df-reu 3068 df-rmo 3069 df-rab 3070 df-v 3353 df-sbc 3589 df-csb 3684 df-dif 3727 df-un 3729 df-in 3731 df-ss 3738 df-pss 3740 df-nul 4065 df-if 4227 df-pw 4300 df-sn 4318 df-pr 4320 df-tp 4322 df-op 4324 df-uni 4576 df-iun 4657 df-br 4788 df-opab 4848 df-mpt 4865 df-tr 4888 df-id 5158 df-eprel 5163 df-po 5171 df-so 5172 df-fr 5209 df-we 5211 df-xp 5256 df-rel 5257 df-cnv 5258 df-co 5259 df-dm 5260 df-rn 5261 df-res 5262 df-ima 5263 df-pred 5824 df-ord 5870 df-on 5871 df-lim 5872 df-suc 5873 df-iota 5995 df-fun 6034 df-fn 6035 df-f 6036 df-f1 6037 df-fo 6038 df-f1o 6039 df-fv 6040 df-riota 6755 df-ov 6797 df-oprab 6798 df-mpt2 6799 df-om 7214 df-2nd 7317 df-wrecs 7560 df-recs 7622 df-rdg 7660 df-er 7897 df-en 8111 df-dom 8112 df-sdom 8113 df-sup 8505 df-pnf 10279 df-mnf 10280 df-xr 10281 df-ltxr 10282 df-le 10283 df-sub 10471 df-neg 10472 df-div 10888 df-nn 11224 df-2 11282 df-3 11283 df-n0 11496 df-z 11581 df-uz 11890 df-rp 12037 df-seq 13010 df-exp 13069 df-cj 14048 df-re 14049 df-im 14050 df-sqrt 14184 df-abs 14185 |
This theorem is referenced by: iblabslem 23815 iblabsnclem 33806 |
Copyright terms: Public domain | W3C validator |