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

 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 𝐵))

StepHypRef Expression
1 nqercl 9955 . . . 4 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ Q)
2 nqercl 9955 . . . 4 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ Q)
3 addpqnq 9962 . . . 4 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵))))
41, 2, 3syl2an 583 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵))))
5 enqer 9945 . . . . . 6 ~Q Er (N × N)
65a1i 11 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ~Q Er (N × N))
7 nqerrel 9956 . . . . . . 7 (𝐴 ∈ (N × N) → 𝐴 ~Q ([Q]‘𝐴))
87adantr 466 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → 𝐴 ~Q ([Q]‘𝐴))
9 elpqn 9949 . . . . . . . . 9 (([Q]‘𝐴) ∈ Q → ([Q]‘𝐴) ∈ (N × N))
101, 9syl 17 . . . . . . . 8 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ (N × N))
11 adderpqlem 9978 . . . . . . . . 9 ((𝐴 ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 ~Q ([Q]‘𝐴) ↔ (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵)))
12113exp 1112 . . . . . . . 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 393 . . . . . 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 9956 . . . . . . . 8 (𝐵 ∈ (N × N) → 𝐵 ~Q ([Q]‘𝐵))
1716adantl 467 . . . . . . 7 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → 𝐵 ~Q ([Q]‘𝐵))
18 elpqn 9949 . . . . . . . . . 10 (([Q]‘𝐵) ∈ Q → ([Q]‘𝐵) ∈ (N × N))
192, 18syl 17 . . . . . . . . 9 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ (N × N))
20 adderpqlem 9978 . . . . . . . . . 10 ((𝐵 ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N)) → (𝐵 ~Q ([Q]‘𝐵) ↔ (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴))))
21203exp 1112 . . . . . . . . 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 496 . . . . . . 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 9974 . . . . . 6 (𝐵 +pQ ([Q]‘𝐴)) = (([Q]‘𝐴) +pQ 𝐵)
26 addcompq 9974 . . . . . 6 (([Q]‘𝐵) +pQ ([Q]‘𝐴)) = (([Q]‘𝐴) +pQ ([Q]‘𝐵))
2724, 25, 263brtr3g 4819 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)))
286, 15, 27ertrd 7912 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)))
29 addpqf 9968 . . . . . 6 +pQ :((N × N) × (N × N))⟶(N × N)
3029fovcl 6912 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ∈ (N × N))
3129fovcl 6912 . . . . . 6 ((([Q]‘𝐴) ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N)) → (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N))
3210, 19, 31syl2an 583 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N))
33 nqereq 9959 . . . . 5 (((𝐴 +pQ 𝐵) ∈ (N × N) ∧ (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ∈ (N × N)) → ((𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)) ↔ ([Q]‘(𝐴 +pQ 𝐵)) = ([Q]‘(([Q]‘𝐴) +pQ ([Q]‘𝐵)))))
3430, 32, 33syl2anc 573 . . . 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 2808 . 2 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵)))
37 0nnq 9948 . . . . . . . 8 ¬ ∅ ∈ Q
38 nqerf 9954 . . . . . . . . . . . 12 [Q]:(N × N)⟶Q
3938fdmi 6192 . . . . . . . . . . 11 dom [Q] = (N × N)
4039eleq2i 2842 . . . . . . . . . 10 (𝐴 ∈ dom [Q] ↔ 𝐴 ∈ (N × N))
41 ndmfv 6359 . . . . . . . . . 10 𝐴 ∈ dom [Q] → ([Q]‘𝐴) = ∅)
4240, 41sylnbir 320 . . . . . . . . 9 𝐴 ∈ (N × N) → ([Q]‘𝐴) = ∅)
4342eleq1d 2835 . . . . . . . 8 𝐴 ∈ (N × N) → (([Q]‘𝐴) ∈ Q ↔ ∅ ∈ Q))
4437, 43mtbiri 316 . . . . . . 7 𝐴 ∈ (N × N) → ¬ ([Q]‘𝐴) ∈ Q)
4544con4i 114 . . . . . 6 (([Q]‘𝐴) ∈ Q𝐴 ∈ (N × N))
4639eleq2i 2842 . . . . . . . . . 10 (𝐵 ∈ dom [Q] ↔ 𝐵 ∈ (N × N))
47 ndmfv 6359 . . . . . . . . . 10 𝐵 ∈ dom [Q] → ([Q]‘𝐵) = ∅)
4846, 47sylnbir 320 . . . . . . . . 9 𝐵 ∈ (N × N) → ([Q]‘𝐵) = ∅)
4948eleq1d 2835 . . . . . . . 8 𝐵 ∈ (N × N) → (([Q]‘𝐵) ∈ Q ↔ ∅ ∈ Q))
5037, 49mtbiri 316 . . . . . . 7 𝐵 ∈ (N × N) → ¬ ([Q]‘𝐵) ∈ Q)
5150con4i 114 . . . . . 6 (([Q]‘𝐵) ∈ Q𝐵 ∈ (N × N))
5245, 51anim12i 600 . . . . 5 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
5352con3i 151 . . . 4 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ¬ (([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q))
54 addnqf 9972 . . . . . 6 +Q :(Q × Q)⟶Q
5554fdmi 6192 . . . . 5 dom +Q = (Q × Q)
5655ndmov 6965 . . . 4 (¬ (([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ∅)
5753, 56syl 17 . . 3 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ∅)
58 0nelxp 5283 . . . . . 6 ¬ ∅ ∈ (N × N)
5939eleq2i 2842 . . . . . 6 (∅ ∈ dom [Q] ↔ ∅ ∈ (N × N))
6058, 59mtbir 312 . . . . 5 ¬ ∅ ∈ dom [Q]
6129fdmi 6192 . . . . . . 7 dom +pQ = ((N × N) × (N × N))
6261ndmov 6965 . . . . . 6 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) = ∅)
6362eleq1d 2835 . . . . 5 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((𝐴 +pQ 𝐵) ∈ dom [Q] ↔ ∅ ∈ dom [Q]))
6460, 63mtbiri 316 . . . 4 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ¬ (𝐴 +pQ 𝐵) ∈ dom [Q])
65 ndmfv 6359 . . . 4 (¬ (𝐴 +pQ 𝐵) ∈ dom [Q] → ([Q]‘(𝐴 +pQ 𝐵)) = ∅)
6664, 65syl 17 . . 3 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ([Q]‘(𝐴 +pQ 𝐵)) = ∅)
6757, 66eqtr4d 2808 . 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 382   = wceq 1631   ∈ wcel 2145  ∅c0 4063   class class class wbr 4786   × cxp 5247  dom cdm 5249  ‘cfv 6031  (class class class)co 6793   Er wer 7893  Ncnpi 9868   +pQ cplpq 9872   ~Q ceq 9875  Qcnq 9876  [Q]cerq 9878   +Q cplq 9879 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 4915  ax-nul 4923  ax-pow 4974  ax-pr 5034  ax-un 7096 This theorem depends on definitions:  df-bi 197  df-an 383  df-or 835  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-ral 3066  df-rex 3067  df-reu 3068  df-rmo 3069  df-rab 3070  df-v 3353  df-sbc 3588  df-csb 3683  df-dif 3726  df-un 3728  df-in 3730  df-ss 3737  df-pss 3739  df-nul 4064  df-if 4226  df-pw 4299  df-sn 4317  df-pr 4319  df-tp 4321  df-op 4323  df-uni 4575  df-iun 4656  df-br 4787  df-opab 4847  df-mpt 4864  df-tr 4887  df-id 5157  df-eprel 5162  df-po 5170  df-so 5171  df-fr 5208  df-we 5210  df-xp 5255  df-rel 5256  df-cnv 5257  df-co 5258  df-dm 5259  df-rn 5260  df-res 5261  df-ima 5262  df-pred 5823  df-ord 5869  df-on 5870  df-lim 5871  df-suc 5872  df-iota 5994  df-fun 6033  df-fn 6034  df-f 6035  df-f1 6036  df-fo 6037  df-f1o 6038  df-fv 6039  df-ov 6796  df-oprab 6797  df-mpt2 6798  df-om 7213  df-1st 7315  df-2nd 7316  df-wrecs 7559  df-recs 7621  df-rdg 7659  df-1o 7713  df-oadd 7717  df-omul 7718  df-er 7896  df-ni 9896  df-pli 9897  df-mi 9898  df-lti 9899  df-plpq 9932  df-enq 9935  df-nq 9936  df-erq 9937  df-plq 9938  df-1nq 9940 This theorem is referenced by:  addassnq  9982  distrnq  9985  ltexnq  9999
 Copyright terms: Public domain W3C validator