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

Theorem adderpq 9722
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 9697 . . . 4 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ Q)
2 nqercl 9697 . . . 4 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ Q)
3 addpqnq 9704 . . . 4 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵))))
41, 2, 3syl2an 494 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵))))
5 enqer 9687 . . . . . 6 ~Q Er (N × N)
65a1i 11 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ~Q Er (N × N))
7 nqerrel 9698 . . . . . . 7 (𝐴 ∈ (N × N) → 𝐴 ~Q ([Q]‘𝐴))
87adantr 481 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → 𝐴 ~Q ([Q]‘𝐴))
9 elpqn 9691 . . . . . . . . 9 (([Q]‘𝐴) ∈ Q → ([Q]‘𝐴) ∈ (N × N))
101, 9syl 17 . . . . . . . 8 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ (N × N))
11 adderpqlem 9720 . . . . . . . . 9 ((𝐴 ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 ~Q ([Q]‘𝐴) ↔ (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵)))
12113exp 1261 . . . . . . . 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 445 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 ~Q ([Q]‘𝐴) ↔ (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵)))
158, 14mpbid 222 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵))
16 nqerrel 9698 . . . . . . . 8 (𝐵 ∈ (N × N) → 𝐵 ~Q ([Q]‘𝐵))
1716adantl 482 . . . . . . 7 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → 𝐵 ~Q ([Q]‘𝐵))
18 elpqn 9691 . . . . . . . . . 10 (([Q]‘𝐵) ∈ Q → ([Q]‘𝐵) ∈ (N × N))
192, 18syl 17 . . . . . . . . 9 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ (N × N))
20 adderpqlem 9720 . . . . . . . . . 10 ((𝐵 ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N)) → (𝐵 ~Q ([Q]‘𝐵) ↔ (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴))))
21203exp 1261 . . . . . . . . 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 486 . . . . . . 7 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐵 ~Q ([Q]‘𝐵) ↔ (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴))))
2417, 23mpbid 222 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴)))
25 addcompq 9716 . . . . . 6 (𝐵 +pQ ([Q]‘𝐴)) = (([Q]‘𝐴) +pQ 𝐵)
26 addcompq 9716 . . . . . 6 (([Q]‘𝐵) +pQ ([Q]‘𝐴)) = (([Q]‘𝐴) +pQ ([Q]‘𝐵))
2724, 25, 263brtr3g 4646 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)))
286, 15, 27ertrd 7703 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)))
29 addpqf 9710 . . . . . 6 +pQ :((N × N) × (N × N))⟶(N × N)
3029fovcl 6718 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ∈ (N × N))
3129fovcl 6718 . . . . . 6 ((([Q]‘𝐴) ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N)) → (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N))
3210, 19, 31syl2an 494 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N))
33 nqereq 9701 . . . . 5 (((𝐴 +pQ 𝐵) ∈ (N × N) ∧ (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N)) → ((𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ↔ ([Q]‘(𝐴 +pQ 𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵)))))
3430, 32, 33syl2anc 692 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ↔ ([Q]‘(𝐴 +pQ 𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵)))))
3528, 34mpbid 222 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ([Q]‘(𝐴 +pQ 𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵))))
364, 35eqtr4d 2658 . 2 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵)))
37 0nnq 9690 . . . . . . . 8 ¬ ∅ ∈ Q
38 nqerf 9696 . . . . . . . . . . . 12 [Q]:(N × N)⟶Q
3938fdmi 6009 . . . . . . . . . . 11 dom [Q] = (N × N)
4039eleq2i 2690 . . . . . . . . . 10 (𝐴 ∈ dom [Q] ↔ 𝐴 ∈ (N × N))
41 ndmfv 6175 . . . . . . . . . 10 𝐴 ∈ dom [Q] → ([Q]‘𝐴) = ∅)
4240, 41sylnbir 321 . . . . . . . . 9 𝐴 ∈ (N × N) → ([Q]‘𝐴) = ∅)
4342eleq1d 2683 . . . . . . . 8 𝐴 ∈ (N × N) → (([Q]‘𝐴) ∈ Q ↔ ∅ ∈ Q))
4437, 43mtbiri 317 . . . . . . 7 𝐴 ∈ (N × N) → ¬ ([Q]‘𝐴) ∈ Q)
4544con4i 113 . . . . . 6 (([Q]‘𝐴) ∈ Q𝐴 ∈ (N × N))
4639eleq2i 2690 . . . . . . . . . 10 (𝐵 ∈ dom [Q] ↔ 𝐵 ∈ (N × N))
47 ndmfv 6175 . . . . . . . . . 10 𝐵 ∈ dom [Q] → ([Q]‘𝐵) = ∅)
4846, 47sylnbir 321 . . . . . . . . 9 𝐵 ∈ (N × N) → ([Q]‘𝐵) = ∅)
4948eleq1d 2683 . . . . . . . 8 𝐵 ∈ (N × N) → (([Q]‘𝐵) ∈ Q ↔ ∅ ∈ Q))
5037, 49mtbiri 317 . . . . . . 7 𝐵 ∈ (N × N) → ¬ ([Q]‘𝐵) ∈ Q)
5150con4i 113 . . . . . 6 (([Q]‘𝐵) ∈ Q𝐵 ∈ (N × N))
5245, 51anim12i 589 . . . . 5 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
5352con3i 150 . . . 4 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ¬ (([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q))
54 addnqf 9714 . . . . . 6 +Q :(Q × Q)⟶Q
5554fdmi 6009 . . . . 5 dom +Q = (Q × Q)
5655ndmov 6771 . . . 4 (¬ (([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ∅)
5753, 56syl 17 . . 3 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ∅)
58 0nelxp 5103 . . . . . 6 ¬ ∅ ∈ (N × N)
5939eleq2i 2690 . . . . . 6 (∅ ∈ dom [Q] ↔ ∅ ∈ (N × N))
6058, 59mtbir 313 . . . . 5 ¬ ∅ ∈ dom [Q]
6129fdmi 6009 . . . . . . 7 dom +pQ = ((N × N) × (N × N))
6261ndmov 6771 . . . . . 6 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) = ∅)
6362eleq1d 2683 . . . . 5 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((𝐴 +pQ 𝐵) ∈ dom [Q] ↔ ∅ ∈ dom [Q]))
6460, 63mtbiri 317 . . . 4 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ¬ (𝐴 +pQ 𝐵) ∈ dom [Q])
65 ndmfv 6175 . . . 4 (¬ (𝐴 +pQ 𝐵) ∈ dom [Q] → ([Q]‘(𝐴 +pQ 𝐵)) = ∅)
6664, 65syl 17 . . 3 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ([Q]‘(𝐴 +pQ 𝐵)) = ∅)
6757, 66eqtr4d 2658 . 2 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵)))
6836, 67pm2.61i 176 1 (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wa 384   = wceq 1480  wcel 1987  c0 3891   class class class wbr 4613   × cxp 5072  dom cdm 5074  cfv 5847  (class class class)co 6604   Er wer 7684  Ncnpi 9610   +pQ cplpq 9614   ~Q ceq 9617  Qcnq 9618  [Q]cerq 9620   +Q cplq 9621
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-sep 4741  ax-nul 4749  ax-pow 4803  ax-pr 4867  ax-un 6902
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-ral 2912  df-rex 2913  df-reu 2914  df-rmo 2915  df-rab 2916  df-v 3188  df-sbc 3418  df-csb 3515  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-pss 3571  df-nul 3892  df-if 4059  df-pw 4132  df-sn 4149  df-pr 4151  df-tp 4153  df-op 4155  df-uni 4403  df-iun 4487  df-br 4614  df-opab 4674  df-mpt 4675  df-tr 4713  df-eprel 4985  df-id 4989  df-po 4995  df-so 4996  df-fr 5033  df-we 5035  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-pred 5639  df-ord 5685  df-on 5686  df-lim 5687  df-suc 5688  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854  df-fv 5855  df-ov 6607  df-oprab 6608  df-mpt2 6609  df-om 7013  df-1st 7113  df-2nd 7114  df-wrecs 7352  df-recs 7413  df-rdg 7451  df-1o 7505  df-oadd 7509  df-omul 7510  df-er 7687  df-ni 9638  df-pli 9639  df-mi 9640  df-lti 9641  df-plpq 9674  df-enq 9677  df-nq 9678  df-erq 9679  df-plq 9680  df-1nq 9682
This theorem is referenced by:  addassnq  9724  distrnq  9727  ltexnq  9741
  Copyright terms: Public domain W3C validator