HomeHome Metamath Proof Explorer < Previous   Next >
Related theorems
Unicode version

Theorem addcan 6303
Description: Cancellation law for addition. Theorem I.1 of [Apostol] p. 18. This proof illustrates how dedth3h 2840 can be used to convert the assumptions of addcani 6301 into antecedents. This general method can be used to convert deductions into theorems as needed.
Assertion
Ref Expression
addcan |- ((A e. CC /\ B e. CC /\ C e. CC) -> ((A + B) = (A + C) <-> B = C))

Proof of Theorem addcan
StepHypRef Expression
1 opreq1 4700 . . . 4 |- (A = if(A e. CC, A, 0) -> (A + B) = (if(A e. CC, A, 0) + B))
2 opreq1 4700 . . . 4 |- (A = if(A e. CC, A, 0) -> (A + C) = (if(A e. CC, A, 0) + C))
31, 2eqeq12d 1736 . . 3 |- (A = if(A e. CC, A, 0) -> ((A + B) = (A + C) <-> (if(A e. CC, A, 0) + B) = (if(A e. CC, A, 0) + C)))
43bibi1d 678 . 2 |- (A = if(A e. CC, A, 0) -> (((A + B) = (A + C) <-> B = C) <-> ((if(A e. CC, A, 0) + B) = (if(A e. CC, A, 0) + C) <-> B = C)))
5 opreq2 4701 . . . 4 |- (B = if(B e. CC, B, 0) -> (if(A e. CC, A, 0) + B) = (if(A e. CC, A, 0) + if(B e. CC, B, 0)))
65eqeq1d 1729 . . 3 |- (B = if(B e. CC, B, 0) -> ((if(A e. CC, A, 0) + B) = (if(A e. CC, A, 0) + C) <-> (if(A e. CC, A, 0) + if(B e. CC, B, 0)) = (if(A e. CC, A, 0) + C)))
7 eqeq1 1727 . . 3 |- (B = if(B e. CC, B, 0) -> (B = C <-> if(B e. CC, B, 0) = C))
86, 7bibi12d 688 . 2 |- (B = if(B e. CC, B, 0) -> (((if(A e. CC, A, 0) + B) = (if(A e. CC, A, 0) + C) <-> B = C) <-> ((if(A e. CC, A, 0) + if(B e. CC, B, 0)) = (if(A e. CC, A, 0) + C) <-> if(B e. CC, B, 0) = C)))
9 opreq2 4701 . . . 4 |- (C = if(C e. CC, C, 0) -> (if(A e. CC, A, 0) + C) = (if(A e. CC, A, 0) + if(C e. CC, C, 0)))
109eqeq2d 1732 . . 3 |- (C = if(C e. CC, C, 0) -> ((if(A e. CC, A, 0) + if(B e. CC, B, 0)) = (if(A e. CC, A, 0) + C) <-> (if(A e. CC, A, 0) + if(B e. CC, B, 0)) = (if(A e. CC, A, 0) + if(C e. CC, C, 0))))
11 eqeq2 1730 . . 3 |- (C = if(C e. CC, C, 0) -> (if(B e. CC, B, 0) = C <-> if(B e. CC, B, 0) = if(C e. CC, C, 0)))
1210, 11bibi12d 688 . 2 |- (C = if(C e. CC, C, 0) -> (((if(A e. CC, A, 0) + if(B e. CC, B, 0)) = (if(A e. CC, A, 0) + C) <-> if(B e. CC, B, 0) = C) <-> ((if(A e. CC, A, 0) + if(B e. CC, B, 0)) = (if(A e. CC, A, 0) + if(C e. CC, C, 0)) <-> if(B e. CC, B, 0) = if(C e. CC, C, 0))))
13 0cn 6277 . . . 4 |- 0 e. CC
1413elimel 2849 . . 3 |- if(A e. CC, A, 0) e. CC
1513elimel 2849 . . 3 |- if(B e. CC, B, 0) e. CC
1613elimel 2849 . . 3 |- if(C e. CC, C, 0) e. CC
1714, 15, 16addcani 6301 . 2 |- ((if(A e. CC, A, 0) + if(B e. CC, B, 0)) = (if(A e. CC, A, 0) + if(C e. CC, C, 0)) <-> if(B e. CC, B, 0) = if(C e. CC, C, 0))
184, 8, 12, 17dedth3h 2840 1 |- ((A e. CC /\ B e. CC /\ C e. CC) -> ((A + B) = (A + C) <-> B = C))
Colors of variables: wff set class
Syntax hints:   -> wi 3   <-> wb 162   /\ w3a 855   = wceq 1136   e. wcel 1138  ifcif 2806  (class class class)co 4695  CCcc 6180  0cc0 6182   + caddc 6185
This theorem is referenced by:  addcan2 6304  negeui 6306  subcan 6368  nnleltp1 6933
This theorem was proved from axioms:  ax-1 4  ax-2 5  ax-3 6  ax-mp 7  ax-7 1142  ax-gen 1143  ax-8 1144  ax-9 1145  ax-10 1146  ax-11 1147  ax-12 1148  ax-13 1149  ax-14 1150  ax-17 1155  ax-4 1157  ax-5o 1159  ax-6o 1162  ax-9o 1319  ax-10o 1338  ax-16 1418  ax-11o 1426  ax-ext 1702  ax-rep 3243  ax-sep 3253  ax-nul 3260  ax-pow 3296  ax-pr 3339  ax-un 3601  ax-inf2 5540
This theorem depends on definitions:  df-bi 163  df-or 240  df-an 241  df-3or 856  df-3an 857  df-ex 1165  df-sb 1374  df-eu 1613  df-mo 1614  df-clab 1709  df-cleq 1714  df-clel 1717  df-ne 1856  df-ral 1943  df-rex 1944  df-reu 1945  df-rab 1946  df-v 2127  df-sbc 2287  df-csb 2374  df-dif 2430  df-un 2433  df-in 2436  df-ss 2438  df-pss 2440  df-nul 2702  df-if 2807  df-pw 2859  df-sn 2873  df-pr 2874  df-tp 2876  df-op 2877  df-uni 3000  df-int 3037  df-iun 3079  df-br 3159  df-opab 3214  df-tr 3230  df-eprel 3398  df-id 3401  df-po 3406  df-so 3419  df-fr 3440  df-we 3459  df-ord 3475  df-on 3476  df-lim 3477  df-suc 3478  df-om 3761  df-xp 3811  df-rel 3812  df-cnv 3813  df-co 3814  df-dm 3815  df-rn 3816  df-res 3817  df-ima 3818  df-fun 3819  df-fn 3820  df-f 3821  df-fv 3825  df-opr 4697  df-oprab 4698  df-1st 4831  df-2nd 4832  df-rdg 4951  df-1o 4988  df-oadd 4990  df-omul 4991  df-er 5129  df-ec 5131  df-qs 5134  df-ni 5948  df-pli 5949  df-mi 5950  df-lti 5951  df-plpq 5983  df-mpq 5984  df-enq 5985  df-nq 5986  df-plq 5987  df-mq 5988  df-rq 5989  df-ltq 5990  df-1q 5991  df-np 6034  df-1p 6035  df-plp 6036  df-mp 6037  df-ltp 6038  df-plpr 6112  df-mpr 6113  df-enr 6114  df-nr 6115  df-plr 6116  df-mr 6117  df-0r 6119  df-1r 6120  df-m1r 6121  df-c 6188  df-0 6189  df-1 6190  df-i 6191  df-r 6192  df-plus 6193  df-mul 6194
Copyright terms: Public domain