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

Theorem lgsquad 25962
Description: The Law of Quadratic Reciprocity, see also theorem 9.8 in [ApostolNT] p. 185. If 𝑃 and 𝑄 are distinct odd primes, then the product of the Legendre symbols (𝑃 /L 𝑄) and (𝑄 /L 𝑃) is the parity of ((𝑃 − 1) / 2) · ((𝑄 − 1) / 2). This uses Eisenstein's proof, which also has a nice geometric interpretation - see https://en.wikipedia.org/wiki/Proofs_of_quadratic_reciprocity. This is Metamath 100 proof #7. (Contributed by Mario Carneiro, 19-Jun-2015.)
Assertion
Ref Expression
lgsquad ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → ((𝑃 /L 𝑄) · (𝑄 /L 𝑃)) = (-1↑(((𝑃 − 1) / 2) · ((𝑄 − 1) / 2))))

Proof of Theorem lgsquad
Dummy variables 𝑥 𝑤 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 simp1 1132 . 2 ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → 𝑃 ∈ (ℙ ∖ {2}))
2 simp2 1133 . 2 ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → 𝑄 ∈ (ℙ ∖ {2}))
3 simp3 1134 . 2 ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → 𝑃𝑄)
4 eqid 2824 . 2 ((𝑃 − 1) / 2) = ((𝑃 − 1) / 2)
5 eqid 2824 . 2 ((𝑄 − 1) / 2) = ((𝑄 − 1) / 2)
6 eleq1w 2898 . . . . 5 (𝑥 = 𝑧 → (𝑥 ∈ (1...((𝑃 − 1) / 2)) ↔ 𝑧 ∈ (1...((𝑃 − 1) / 2))))
7 eleq1w 2898 . . . . 5 (𝑦 = 𝑤 → (𝑦 ∈ (1...((𝑄 − 1) / 2)) ↔ 𝑤 ∈ (1...((𝑄 − 1) / 2))))
86, 7bi2anan9 637 . . . 4 ((𝑥 = 𝑧𝑦 = 𝑤) → ((𝑥 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑦 ∈ (1...((𝑄 − 1) / 2))) ↔ (𝑧 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑤 ∈ (1...((𝑄 − 1) / 2)))))
9 oveq1 7166 . . . . 5 (𝑦 = 𝑤 → (𝑦 · 𝑃) = (𝑤 · 𝑃))
10 oveq1 7166 . . . . 5 (𝑥 = 𝑧 → (𝑥 · 𝑄) = (𝑧 · 𝑄))
119, 10breqan12rd 5086 . . . 4 ((𝑥 = 𝑧𝑦 = 𝑤) → ((𝑦 · 𝑃) < (𝑥 · 𝑄) ↔ (𝑤 · 𝑃) < (𝑧 · 𝑄)))
128, 11anbi12d 632 . . 3 ((𝑥 = 𝑧𝑦 = 𝑤) → (((𝑥 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑦 ∈ (1...((𝑄 − 1) / 2))) ∧ (𝑦 · 𝑃) < (𝑥 · 𝑄)) ↔ ((𝑧 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑤 ∈ (1...((𝑄 − 1) / 2))) ∧ (𝑤 · 𝑃) < (𝑧 · 𝑄))))
1312cbvopabv 5141 . 2 {⟨𝑥, 𝑦⟩ ∣ ((𝑥 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑦 ∈ (1...((𝑄 − 1) / 2))) ∧ (𝑦 · 𝑃) < (𝑥 · 𝑄))} = {⟨𝑧, 𝑤⟩ ∣ ((𝑧 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑤 ∈ (1...((𝑄 − 1) / 2))) ∧ (𝑤 · 𝑃) < (𝑧 · 𝑄))}
141, 2, 3, 4, 5, 13lgsquadlem3 25961 1 ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → ((𝑃 /L 𝑄) · (𝑄 /L 𝑃)) = (-1↑(((𝑃 − 1) / 2) · ((𝑄 − 1) / 2))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 398  w3a 1083   = wceq 1536  wcel 2113  wne 3019  cdif 3936  {csn 4570   class class class wbr 5069  {copab 5131  (class class class)co 7159  1c1 10541   · cmul 10545   < clt 10678  cmin 10873  -cneg 10874   / cdiv 11300  2c2 11695  ...cfz 12895  cexp 13432  cprime 16018   /L clgs 25873
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1795  ax-4 1809  ax-5 1910  ax-6 1969  ax-7 2014  ax-8 2115  ax-9 2123  ax-10 2144  ax-11 2160  ax-12 2176  ax-ext 2796  ax-rep 5193  ax-sep 5206  ax-nul 5213  ax-pow 5269  ax-pr 5333  ax-un 7464  ax-inf2 9107  ax-cnex 10596  ax-resscn 10597  ax-1cn 10598  ax-icn 10599  ax-addcl 10600  ax-addrcl 10601  ax-mulcl 10602  ax-mulrcl 10603  ax-mulcom 10604  ax-addass 10605  ax-mulass 10606  ax-distr 10607  ax-i2m1 10608  ax-1ne0 10609  ax-1rid 10610  ax-rnegex 10611  ax-rrecex 10612  ax-cnre 10613  ax-pre-lttri 10614  ax-pre-lttrn 10615  ax-pre-ltadd 10616  ax-pre-mulgt0 10617  ax-pre-sup 10618  ax-addf 10619  ax-mulf 10620
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3or 1084  df-3an 1085  df-tru 1539  df-fal 1549  df-ex 1780  df-nf 1784  df-sb 2069  df-mo 2621  df-eu 2653  df-clab 2803  df-cleq 2817  df-clel 2896  df-nfc 2966  df-ne 3020  df-nel 3127  df-ral 3146  df-rex 3147  df-reu 3148  df-rmo 3149  df-rab 3150  df-v 3499  df-sbc 3776  df-csb 3887  df-dif 3942  df-un 3944  df-in 3946  df-ss 3955  df-pss 3957  df-nul 4295  df-if 4471  df-pw 4544  df-sn 4571  df-pr 4573  df-tp 4575  df-op 4577  df-uni 4842  df-int 4880  df-iun 4924  df-disj 5035  df-br 5070  df-opab 5132  df-mpt 5150  df-tr 5176  df-id 5463  df-eprel 5468  df-po 5477  df-so 5478  df-fr 5517  df-se 5518  df-we 5519  df-xp 5564  df-rel 5565  df-cnv 5566  df-co 5567  df-dm 5568  df-rn 5569  df-res 5570  df-ima 5571  df-pred 6151  df-ord 6197  df-on 6198  df-lim 6199  df-suc 6200  df-iota 6317  df-fun 6360  df-fn 6361  df-f 6362  df-f1 6363  df-fo 6364  df-f1o 6365  df-fv 6366  df-isom 6367  df-riota 7117  df-ov 7162  df-oprab 7163  df-mpo 7164  df-of 7412  df-om 7584  df-1st 7692  df-2nd 7693  df-supp 7834  df-tpos 7895  df-wrecs 7950  df-recs 8011  df-rdg 8049  df-1o 8105  df-2o 8106  df-oadd 8109  df-er 8292  df-ec 8294  df-qs 8298  df-map 8411  df-en 8513  df-dom 8514  df-sdom 8515  df-fin 8516  df-fsupp 8837  df-sup 8909  df-inf 8910  df-oi 8977  df-dju 9333  df-card 9371  df-pnf 10680  df-mnf 10681  df-xr 10682  df-ltxr 10683  df-le 10684  df-sub 10875  df-neg 10876  df-div 11301  df-nn 11642  df-2 11703  df-3 11704  df-4 11705  df-5 11706  df-6 11707  df-7 11708  df-8 11709  df-9 11710  df-n0 11901  df-xnn0 11971  df-z 11985  df-dec 12102  df-uz 12247  df-q 12352  df-rp 12393  df-fz 12896  df-fzo 13037  df-fl 13165  df-mod 13241  df-seq 13373  df-exp 13433  df-hash 13694  df-cj 14461  df-re 14462  df-im 14463  df-sqrt 14597  df-abs 14598  df-clim 14848  df-sum 15046  df-dvds 15611  df-gcd 15847  df-prm 16019  df-phi 16106  df-pc 16177  df-struct 16488  df-ndx 16489  df-slot 16490  df-base 16492  df-sets 16493  df-ress 16494  df-plusg 16581  df-mulr 16582  df-starv 16583  df-sca 16584  df-vsca 16585  df-ip 16586  df-tset 16587  df-ple 16588  df-ds 16590  df-unif 16591  df-0g 16718  df-gsum 16719  df-imas 16784  df-qus 16785  df-mgm 17855  df-sgrp 17904  df-mnd 17915  df-mhm 17959  df-submnd 17960  df-grp 18109  df-minusg 18110  df-sbg 18111  df-mulg 18228  df-subg 18279  df-nsg 18280  df-eqg 18281  df-ghm 18359  df-cntz 18450  df-cmn 18911  df-abl 18912  df-mgp 19243  df-ur 19255  df-ring 19302  df-cring 19303  df-oppr 19376  df-dvdsr 19394  df-unit 19395  df-invr 19425  df-dvr 19436  df-rnghom 19470  df-drng 19507  df-field 19508  df-subrg 19536  df-lmod 19639  df-lss 19707  df-lsp 19747  df-sra 19947  df-rgmod 19948  df-lidl 19949  df-rsp 19950  df-2idl 20008  df-nzr 20034  df-rlreg 20059  df-domn 20060  df-idom 20061  df-cnfld 20549  df-zring 20621  df-zrh 20654  df-zn 20657  df-lgs 25874
This theorem is referenced by:  lgsquad2  25965
  Copyright terms: Public domain W3C validator