ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  lgsquad GIF version

Theorem lgsquad 15331
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 999 . 2 ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → 𝑃 ∈ (ℙ ∖ {2}))
2 simp2 1000 . 2 ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → 𝑄 ∈ (ℙ ∖ {2}))
3 simp3 1001 . 2 ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → 𝑃𝑄)
4 eqid 2196 . 2 ((𝑃 − 1) / 2) = ((𝑃 − 1) / 2)
5 eqid 2196 . 2 ((𝑄 − 1) / 2) = ((𝑄 − 1) / 2)
6 eleq1w 2257 . . . . 5 (𝑥 = 𝑧 → (𝑥 ∈ (1...((𝑃 − 1) / 2)) ↔ 𝑧 ∈ (1...((𝑃 − 1) / 2))))
7 eleq1w 2257 . . . . 5 (𝑦 = 𝑤 → (𝑦 ∈ (1...((𝑄 − 1) / 2)) ↔ 𝑤 ∈ (1...((𝑄 − 1) / 2))))
86, 7bi2anan9 606 . . . 4 ((𝑥 = 𝑧𝑦 = 𝑤) → ((𝑥 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑦 ∈ (1...((𝑄 − 1) / 2))) ↔ (𝑧 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑤 ∈ (1...((𝑄 − 1) / 2)))))
9 oveq1 5930 . . . . 5 (𝑦 = 𝑤 → (𝑦 · 𝑃) = (𝑤 · 𝑃))
10 oveq1 5930 . . . . 5 (𝑥 = 𝑧 → (𝑥 · 𝑄) = (𝑧 · 𝑄))
119, 10breqan12rd 4051 . . . 4 ((𝑥 = 𝑧𝑦 = 𝑤) → ((𝑦 · 𝑃) < (𝑥 · 𝑄) ↔ (𝑤 · 𝑃) < (𝑧 · 𝑄)))
128, 11anbi12d 473 . . 3 ((𝑥 = 𝑧𝑦 = 𝑤) → (((𝑥 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑦 ∈ (1...((𝑄 − 1) / 2))) ∧ (𝑦 · 𝑃) < (𝑥 · 𝑄)) ↔ ((𝑧 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑤 ∈ (1...((𝑄 − 1) / 2))) ∧ (𝑤 · 𝑃) < (𝑧 · 𝑄))))
1312cbvopabv 4106 . 2 {⟨𝑥, 𝑦⟩ ∣ ((𝑥 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑦 ∈ (1...((𝑄 − 1) / 2))) ∧ (𝑦 · 𝑃) < (𝑥 · 𝑄))} = {⟨𝑧, 𝑤⟩ ∣ ((𝑧 ∈ (1...((𝑃 − 1) / 2)) ∧ 𝑤 ∈ (1...((𝑄 − 1) / 2))) ∧ (𝑤 · 𝑃) < (𝑧 · 𝑄))}
141, 2, 3, 4, 5, 13lgsquadlem3 15330 1 ((𝑃 ∈ (ℙ ∖ {2}) ∧ 𝑄 ∈ (ℙ ∖ {2}) ∧ 𝑃𝑄) → ((𝑃 /L 𝑄) · (𝑄 /L 𝑃)) = (-1↑(((𝑃 − 1) / 2) · ((𝑄 − 1) / 2))))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  w3a 980   = wceq 1364  wcel 2167  wne 2367  cdif 3154  {csn 3623   class class class wbr 4034  {copab 4094  (class class class)co 5923  1c1 7882   · cmul 7886   < clt 8063  cmin 8199  -cneg 8200   / cdiv 8701  2c2 9043  ...cfz 10085  cexp 10632  cprime 12285   /L clgs 15248
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1461  ax-7 1462  ax-gen 1463  ax-ie1 1507  ax-ie2 1508  ax-8 1518  ax-10 1519  ax-11 1520  ax-i12 1521  ax-bndl 1523  ax-4 1524  ax-17 1540  ax-i9 1544  ax-ial 1548  ax-i5r 1549  ax-13 2169  ax-14 2170  ax-ext 2178  ax-coll 4149  ax-sep 4152  ax-nul 4160  ax-pow 4208  ax-pr 4243  ax-un 4469  ax-setind 4574  ax-iinf 4625  ax-cnex 7972  ax-resscn 7973  ax-1cn 7974  ax-1re 7975  ax-icn 7976  ax-addcl 7977  ax-addrcl 7978  ax-mulcl 7979  ax-mulrcl 7980  ax-addcom 7981  ax-mulcom 7982  ax-addass 7983  ax-mulass 7984  ax-distr 7985  ax-i2m1 7986  ax-0lt1 7987  ax-1rid 7988  ax-0id 7989  ax-rnegex 7990  ax-precex 7991  ax-cnre 7992  ax-pre-ltirr 7993  ax-pre-ltwlin 7994  ax-pre-lttrn 7995  ax-pre-apti 7996  ax-pre-ltadd 7997  ax-pre-mulgt0 7998  ax-pre-mulext 7999  ax-arch 8000  ax-caucvg 8001  ax-addf 8003  ax-mulf 8004
This theorem depends on definitions:  df-bi 117  df-stab 832  df-dc 836  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-xor 1387  df-nf 1475  df-sb 1777  df-eu 2048  df-mo 2049  df-clab 2183  df-cleq 2189  df-clel 2192  df-nfc 2328  df-ne 2368  df-nel 2463  df-ral 2480  df-rex 2481  df-reu 2482  df-rmo 2483  df-rab 2484  df-v 2765  df-sbc 2990  df-csb 3085  df-dif 3159  df-un 3161  df-in 3163  df-ss 3170  df-nul 3452  df-if 3563  df-pw 3608  df-sn 3629  df-pr 3630  df-tp 3631  df-op 3632  df-uni 3841  df-int 3876  df-iun 3919  df-disj 4012  df-br 4035  df-opab 4096  df-mpt 4097  df-tr 4133  df-id 4329  df-po 4332  df-iso 4333  df-iord 4402  df-on 4404  df-ilim 4405  df-suc 4407  df-iom 4628  df-xp 4670  df-rel 4671  df-cnv 4672  df-co 4673  df-dm 4674  df-rn 4675  df-res 4676  df-ima 4677  df-iota 5220  df-fun 5261  df-fn 5262  df-f 5263  df-f1 5264  df-fo 5265  df-f1o 5266  df-fv 5267  df-isom 5268  df-riota 5878  df-ov 5926  df-oprab 5927  df-mpo 5928  df-of 6136  df-1st 6199  df-2nd 6200  df-tpos 6304  df-recs 6364  df-irdg 6429  df-frec 6450  df-1o 6475  df-2o 6476  df-oadd 6479  df-er 6593  df-ec 6595  df-qs 6599  df-map 6710  df-en 6801  df-dom 6802  df-fin 6803  df-sup 7051  df-inf 7052  df-pnf 8065  df-mnf 8066  df-xr 8067  df-ltxr 8068  df-le 8069  df-sub 8201  df-neg 8202  df-reap 8604  df-ap 8611  df-div 8702  df-inn 8993  df-2 9051  df-3 9052  df-4 9053  df-5 9054  df-6 9055  df-7 9056  df-8 9057  df-9 9058  df-n0 9252  df-z 9329  df-dec 9460  df-uz 9604  df-q 9696  df-rp 9731  df-fz 10086  df-fzo 10220  df-fl 10362  df-mod 10417  df-seqfrec 10542  df-exp 10633  df-ihash 10870  df-cj 11009  df-re 11010  df-im 11011  df-rsqrt 11165  df-abs 11166  df-clim 11446  df-sumdc 11521  df-proddc 11718  df-dvds 11955  df-gcd 12131  df-prm 12286  df-phi 12389  df-pc 12464  df-struct 12690  df-ndx 12691  df-slot 12692  df-base 12694  df-sets 12695  df-iress 12696  df-plusg 12778  df-mulr 12779  df-starv 12780  df-sca 12781  df-vsca 12782  df-ip 12783  df-tset 12784  df-ple 12785  df-ds 12787  df-unif 12788  df-0g 12939  df-igsum 12940  df-topgen 12941  df-iimas 12955  df-qus 12956  df-mgm 13009  df-sgrp 13055  df-mnd 13068  df-mhm 13101  df-submnd 13102  df-grp 13145  df-minusg 13146  df-sbg 13147  df-mulg 13260  df-subg 13310  df-nsg 13311  df-eqg 13312  df-ghm 13381  df-cmn 13426  df-abl 13427  df-mgp 13487  df-rng 13499  df-ur 13526  df-srg 13530  df-ring 13564  df-cring 13565  df-oppr 13634  df-dvdsr 13655  df-unit 13656  df-invr 13687  df-dvr 13698  df-rhm 13718  df-nzr 13746  df-subrg 13785  df-domn 13825  df-idom 13826  df-lmod 13855  df-lssm 13919  df-lsp 13953  df-sra 14001  df-rgmod 14002  df-lidl 14035  df-rsp 14036  df-2idl 14066  df-bl 14112  df-mopn 14113  df-fg 14115  df-metu 14116  df-cnfld 14123  df-zring 14157  df-zrh 14180  df-zn 14182  df-lgs 15249
This theorem is referenced by:  lgsquad2  15334
  Copyright terms: Public domain W3C validator