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

Theorem adderpq 9763
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 9738 . . . 4 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ Q)
2 nqercl 9738 . . . 4 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ Q)
3 addpqnq 9745 . . . 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 9728 . . . . . 6 ~Q Er (N × N)
65a1i 11 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ~Q Er (N × N))
7 nqerrel 9739 . . . . . . 7 (𝐴 ∈ (N × N) → 𝐴 ~Q ([Q]‘𝐴))
87adantr 481 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → 𝐴 ~Q ([Q]‘𝐴))
9 elpqn 9732 . . . . . . . . 9 (([Q]‘𝐴) ∈ Q → ([Q]‘𝐴) ∈ (N × N))
101, 9syl 17 . . . . . . . 8 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ (N × N))
11 adderpqlem 9761 . . . . . . . . 9 ((𝐴 ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 ~Q ([Q]‘𝐴) ↔ (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ 𝐵)))
12113exp 1262 . . . . . . . 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 9739 . . . . . . . 8 (𝐵 ∈ (N × N) → 𝐵 ~Q ([Q]‘𝐵))
1716adantl 482 . . . . . . 7 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → 𝐵 ~Q ([Q]‘𝐵))
18 elpqn 9732 . . . . . . . . . 10 (([Q]‘𝐵) ∈ Q → ([Q]‘𝐵) ∈ (N × N))
192, 18syl 17 . . . . . . . . 9 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ (N × N))
20 adderpqlem 9761 . . . . . . . . . 10 ((𝐵 ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N)) → (𝐵 ~Q ([Q]‘𝐵) ↔ (𝐵 +pQ ([Q]‘𝐴)) ~Q (([Q]‘𝐵) +pQ ([Q]‘𝐴))))
21203exp 1262 . . . . . . . . 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 9757 . . . . . 6 (𝐵 +pQ ([Q]‘𝐴)) = (([Q]‘𝐴) +pQ 𝐵)
26 addcompq 9757 . . . . . 6 (([Q]‘𝐵) +pQ ([Q]‘𝐴)) = (([Q]‘𝐴) +pQ ([Q]‘𝐵))
2724, 25, 263brtr3g 4677 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)))
286, 15, 27ertrd 7743 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ~Q (([Q]‘𝐴) +pQ ([Q]‘𝐵)))
29 addpqf 9751 . . . . . 6 +pQ :((N × N) × (N × N))⟶(N × N)
3029fovcl 6750 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) ∈ (N × N))
3129fovcl 6750 . . . . . 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 9742 . . . . 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 2657 . 2 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ([Q]‘(𝐴 +pQ 𝐵)))
37 0nnq 9731 . . . . . . . 8 ¬ ∅ ∈ Q
38 nqerf 9737 . . . . . . . . . . . 12 [Q]:(N × N)⟶Q
3938fdmi 6039 . . . . . . . . . . 11 dom [Q] = (N × N)
4039eleq2i 2691 . . . . . . . . . 10 (𝐴 ∈ dom [Q] ↔ 𝐴 ∈ (N × N))
41 ndmfv 6205 . . . . . . . . . 10 𝐴 ∈ dom [Q] → ([Q]‘𝐴) = ∅)
4240, 41sylnbir 321 . . . . . . . . 9 𝐴 ∈ (N × N) → ([Q]‘𝐴) = ∅)
4342eleq1d 2684 . . . . . . . 8 𝐴 ∈ (N × N) → (([Q]‘𝐴) ∈ Q ↔ ∅ ∈ Q))
4437, 43mtbiri 317 . . . . . . 7 𝐴 ∈ (N × N) → ¬ ([Q]‘𝐴) ∈ Q)
4544con4i 113 . . . . . 6 (([Q]‘𝐴) ∈ Q𝐴 ∈ (N × N))
4639eleq2i 2691 . . . . . . . . . 10 (𝐵 ∈ dom [Q] ↔ 𝐵 ∈ (N × N))
47 ndmfv 6205 . . . . . . . . . 10 𝐵 ∈ dom [Q] → ([Q]‘𝐵) = ∅)
4846, 47sylnbir 321 . . . . . . . . 9 𝐵 ∈ (N × N) → ([Q]‘𝐵) = ∅)
4948eleq1d 2684 . . . . . . . 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 9755 . . . . . 6 +Q :(Q × Q)⟶Q
5554fdmi 6039 . . . . 5 dom +Q = (Q × Q)
5655ndmov 6803 . . . 4 (¬ (([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ∅)
5753, 56syl 17 . . 3 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) +Q ([Q]‘𝐵)) = ∅)
58 0nelxp 5133 . . . . . 6 ¬ ∅ ∈ (N × N)
5939eleq2i 2691 . . . . . 6 (∅ ∈ dom [Q] ↔ ∅ ∈ (N × N))
6058, 59mtbir 313 . . . . 5 ¬ ∅ ∈ dom [Q]
6129fdmi 6039 . . . . . . 7 dom +pQ = ((N × N) × (N × N))
6261ndmov 6803 . . . . . 6 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 +pQ 𝐵) = ∅)
6362eleq1d 2684 . . . . 5 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((𝐴 +pQ 𝐵) ∈ dom [Q] ↔ ∅ ∈ dom [Q]))
6460, 63mtbiri 317 . . . 4 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ¬ (𝐴 +pQ 𝐵) ∈ dom [Q])
65 ndmfv 6205 . . . 4 (¬ (𝐴 +pQ 𝐵) ∈ dom [Q] → ([Q]‘(𝐴 +pQ 𝐵)) = ∅)
6664, 65syl 17 . . 3 (¬ (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ([Q]‘(𝐴 +pQ 𝐵)) = ∅)
6757, 66eqtr4d 2657 . 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 1481  wcel 1988  c0 3907   class class class wbr 4644   × cxp 5102  dom cdm 5104  cfv 5876  (class class class)co 6635   Er wer 7724  Ncnpi 9651   +pQ cplpq 9655   ~Q ceq 9658  Qcnq 9659  [Q]cerq 9661   +Q cplq 9662
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1720  ax-4 1735  ax-5 1837  ax-6 1886  ax-7 1933  ax-8 1990  ax-9 1997  ax-10 2017  ax-11 2032  ax-12 2045  ax-13 2244  ax-ext 2600  ax-sep 4772  ax-nul 4780  ax-pow 4834  ax-pr 4897  ax-un 6934
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1484  df-ex 1703  df-nf 1708  df-sb 1879  df-eu 2472  df-mo 2473  df-clab 2607  df-cleq 2613  df-clel 2616  df-nfc 2751  df-ne 2792  df-ral 2914  df-rex 2915  df-reu 2916  df-rmo 2917  df-rab 2918  df-v 3197  df-sbc 3430  df-csb 3527  df-dif 3570  df-un 3572  df-in 3574  df-ss 3581  df-pss 3583  df-nul 3908  df-if 4078  df-pw 4151  df-sn 4169  df-pr 4171  df-tp 4173  df-op 4175  df-uni 4428  df-iun 4513  df-br 4645  df-opab 4704  df-mpt 4721  df-tr 4744  df-id 5014  df-eprel 5019  df-po 5025  df-so 5026  df-fr 5063  df-we 5065  df-xp 5110  df-rel 5111  df-cnv 5112  df-co 5113  df-dm 5114  df-rn 5115  df-res 5116  df-ima 5117  df-pred 5668  df-ord 5714  df-on 5715  df-lim 5716  df-suc 5717  df-iota 5839  df-fun 5878  df-fn 5879  df-f 5880  df-f1 5881  df-fo 5882  df-f1o 5883  df-fv 5884  df-ov 6638  df-oprab 6639  df-mpt2 6640  df-om 7051  df-1st 7153  df-2nd 7154  df-wrecs 7392  df-recs 7453  df-rdg 7491  df-1o 7545  df-oadd 7549  df-omul 7550  df-er 7727  df-ni 9679  df-pli 9680  df-mi 9681  df-lti 9682  df-plpq 9715  df-enq 9718  df-nq 9719  df-erq 9720  df-plq 9721  df-1nq 9723
This theorem is referenced by:  addassnq  9765  distrnq  9768  ltexnq  9782
  Copyright terms: Public domain W3C validator