MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  adderpq Structured version   Visualization version   GIF version

Theorem adderpq 10371
Description: Addition is compatible with the equivalence relation. (Contributed by Mario Carneiro, 8-May-2013.) (New usage is discouraged.)
Assertion
Ref Expression
adderpq (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵))

Proof of Theorem adderpq
StepHypRef Expression
1 nqercl 10346 . . . 4 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ Q)
2 nqercl 10346 . . . 4 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ Q)
3 addpqnq 10353 . . . 4 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵))))
41, 2, 3syl2an 598 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵))))
5 enqer 10336 . . . . . 6 ~Q Er (N × N)
65a1i 11 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ~Q Er (N × N))
7 nqerrel 10347 . . . . . . 7 (𝐴 ∈ (N × N) → 𝐴 ~Q ([Q]‘𝐴))
87adantr 484 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → 𝐴 ~Q ([Q]‘𝐴))
9 elpqn 10340 . . . . . . . . 9 (([Q]‘𝐴) ∈ Q → ([Q]‘𝐴) ∈ (N × N))
101, 9syl 17 . . . . . . . 8 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ (N × N))
11 adderpqlem 10369 . . . . . . . . 9 ((𝐴 ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 ~Q ([Q]‘𝐴) ↔ (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵)))
12113exp 1116 . . . . . . . 8 (𝐴 ∈ (N × N) → (([Q]‘𝐴) ∈ (N × N) → (𝐵 ∈ (N × N) → (𝐴 ~Q ([Q]‘𝐴) ↔ (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵)))))
1310, 12mpd 15 . . . . . . 7 (𝐴 ∈ (N × N) → (𝐵 ∈ (N × N) → (𝐴 ~Q ([Q]‘𝐴) ↔ (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵))))
1413imp 410 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 ~Q ([Q]‘𝐴) ↔ (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵)))
158, 14mpbid 235 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵))
16 nqerrel 10347 . . . . . . . 8 (𝐵 ∈ (N × N) → 𝐵 ~Q ([Q]‘𝐵))
1716adantl 485 . . . . . . 7 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → 𝐵 ~Q ([Q]‘𝐵))
18 elpqn 10340 . . . . . . . . . 10 (([Q]‘𝐵) ∈ Q → ([Q]‘𝐵) ∈ (N × N))
192, 18syl 17 . . . . . . . . 9 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ (N × N))
20 adderpqlem 10369 . . . . . . . . . 10 ((𝐵 ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N)) → (𝐵 ~Q ([Q]‘𝐵) ↔ (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴))))
21203exp 1116 . . . . . . . . 9 (𝐵 ∈ (N × N) → (([Q]‘𝐵) ∈ (N × N) → (([Q]‘𝐴) ∈ (N × N) → (𝐵 ~Q ([Q]‘𝐵) ↔ (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴))))))
2219, 21mpd 15 . . . . . . . 8 (𝐵 ∈ (N × N) → (([Q]‘𝐴) ∈ (N × N) → (𝐵 ~Q ([Q]‘𝐵) ↔ (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴)))))
2310, 22mpan9 510 . . . . . . 7 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐵 ~Q ([Q]‘𝐵) ↔ (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴))))
2417, 23mpbid 235 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴)))
25 addcompq 10365 . . . . . 6 (𝐵 +pQ ([Q]‘𝐴)) = (([Q]‘𝐴) +pQ 𝐵)
26 addcompq 10365 . . . . . 6 (([Q]‘𝐵) +pQ ([Q]‘𝐴)) = (([Q]‘𝐴) +pQ ([Q]‘𝐵))
2724, 25, 263brtr3g 5066 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)))
286, 15, 27ertrd 8292 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)))
29 addpqf 10359 . . . . . 6 +pQ :((N × N) × (N × N))⟶(N × N)
3029fovcl 7262 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ∈ (N × N))
3129fovcl 7262 . . . . . 6 ((([Q]‘𝐴) ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N)) → (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N))
3210, 19, 31syl2an 598 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N))
33 nqereq 10350 . . . . 5 (((𝐴 +pQ 𝐵) ∈ (N × N) ∧ (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N)) → ((𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ↔ ([Q]‘(𝐴 +pQ 𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵)))))
3430, 32, 33syl2anc 587 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ↔ ([Q]‘(𝐴 +pQ 𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵)))))
3528, 34mpbid 235 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ([Q]‘(𝐴 +pQ 𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵))))
364, 35eqtr4d 2839 . 2 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵)))
37 0nnq 10339 . . . . . . 7 ¬ ∅ ∈ Q
38 nqerf 10345 . . . . . . . . . . 11 [Q]:(N × N)⟶Q
3938fdmi 6502 . . . . . . . . . 10 dom [Q] = (N × N)
4039eleq2i 2884 . . . . . . . . 9 (𝐴 ∈ dom [Q] ↔ 𝐴 ∈ (N × N))
41 ndmfv 6679 . . . . . . . . 9 𝐴 ∈ dom [Q] → ([Q]‘𝐴) = ∅)
4240, 41sylnbir 334 . . . . . . . 8 𝐴 ∈ (N × N) → ([Q]‘𝐴) = ∅)
4342eleq1d 2877 . . . . . . 7 𝐴 ∈ (N × N) → (([Q]‘𝐴) ∈ Q ↔ ∅ ∈ Q))
4437, 43mtbiri 330 . . . . . 6 𝐴 ∈ (N × N) → ¬ ([Q]‘𝐴) ∈ Q)
4544con4i 114 . . . . 5 (([Q]‘𝐴) ∈ Q𝐴 ∈ (N × N))
4639eleq2i 2884 . . . . . . . . 9 (𝐵 ∈ dom [Q] ↔ 𝐵 ∈ (N × N))
47 ndmfv 6679 . . . . . . . . 9 𝐵 ∈ dom [Q] → ([Q]‘𝐵) = ∅)
4846, 47sylnbir 334 . . . . . . . 8 𝐵 ∈ (N × N) → ([Q]‘𝐵) = ∅)
4948eleq1d 2877 . . . . . . 7 𝐵 ∈ (N × N) → (([Q]‘𝐵) ∈ Q ↔ ∅ ∈ Q))
5037, 49mtbiri 330 . . . . . 6 𝐵 ∈ (N × N) → ¬ ([Q]‘𝐵) ∈ Q)
5150con4i 114 . . . . 5 (([Q]‘𝐵) ∈ Q𝐵 ∈ (N × N))
5245, 51anim12i 615 . . . 4 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
53 addnqf 10363 . . . . . 6 +Q :(Q × Q)⟶Q
5453fdmi 6502 . . . . 5 dom +Q = (Q × Q)
5554ndmov 7316 . . . 4 (¬ (([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ∅)
5652, 55nsyl5 162 . . 3 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ∅)
57 0nelxp 5557 . . . . . 6 ¬ ∅ ∈ (N × N)
5839eleq2i 2884 . . . . . 6 (∅ ∈ dom [Q] ↔ ∅ ∈ (N × N))
5957, 58mtbir 326 . . . . 5 ¬ ∅ ∈ dom [Q]
6029fdmi 6502 . . . . . . 7 dom +pQ = ((N × N) × (N × N))
6160ndmov 7316 . . . . . 6 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) = ∅)
6261eleq1d 2877 . . . . 5 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((𝐴 +pQ 𝐵) ∈ dom [Q] ↔ ∅ ∈ dom [Q]))
6359, 62mtbiri 330 . . . 4 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ¬ (𝐴 +pQ 𝐵) ∈ dom [Q])
64 ndmfv 6679 . . . 4 (¬ (𝐴 +pQ 𝐵) ∈ dom [Q] → ([Q]‘(𝐴 +pQ 𝐵)) = ∅)
6563, 64syl 17 . . 3 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ([Q]‘(𝐴 +pQ 𝐵)) = ∅)
6656, 65eqtr4d 2839 . 2 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵)))
6736, 66pm2.61i 185 1 (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 209  wa 399   = wceq 1538  wcel 2112  c0 4246   class class class wbr 5033   × cxp 5521  dom cdm 5523  cfv 6328  (class class class)co 7139   Er wer 8273  Ncnpi 10259   +pQ cplpq 10263   ~Q ceq 10266  Qcnq 10267  [Q]cerq 10269   +Q cplq 10270
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2114  ax-9 2122  ax-10 2143  ax-11 2159  ax-12 2176  ax-ext 2773  ax-sep 5170  ax-nul 5177  ax-pow 5234  ax-pr 5298  ax-un 7445
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2601  df-eu 2632  df-clab 2780  df-cleq 2794  df-clel 2873  df-nfc 2941  df-ne 2991  df-ral 3114  df-rex 3115  df-reu 3116  df-rmo 3117  df-rab 3118  df-v 3446  df-sbc 3724  df-csb 3832  df-dif 3887  df-un 3889  df-in 3891  df-ss 3901  df-pss 3903  df-nul 4247  df-if 4429  df-pw 4502  df-sn 4529  df-pr 4531  df-tp 4533  df-op 4535  df-uni 4804  df-iun 4886  df-br 5034  df-opab 5096  df-mpt 5114  df-tr 5140  df-id 5428  df-eprel 5433  df-po 5442  df-so 5443  df-fr 5482  df-we 5484  df-xp 5529  df-rel 5530  df-cnv 5531  df-co 5532  df-dm 5533  df-rn 5534  df-res 5535  df-ima 5536  df-pred 6120  df-ord 6166  df-on 6167  df-lim 6168  df-suc 6169  df-iota 6287  df-fun 6330  df-fn 6331  df-f 6332  df-f1 6333  df-fo 6334  df-f1o 6335  df-fv 6336  df-ov 7142  df-oprab 7143  df-mpo 7144  df-om 7565  df-1st 7675  df-2nd 7676  df-wrecs 7934  df-recs 7995  df-rdg 8033  df-1o 8089  df-oadd 8093  df-omul 8094  df-er 8276  df-ni 10287  df-pli 10288  df-mi 10289  df-lti 10290  df-plpq 10323  df-enq 10326  df-nq 10327  df-erq 10328  df-plq 10329  df-1nq 10331
This theorem is referenced by:  addassnq  10373  distrnq  10376  ltexnq  10390
  Copyright terms: Public domain W3C validator