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

Theorem lgs0 27162
Description: The Legendre symbol when the second argument is zero. (Contributed by Mario Carneiro, 4-Feb-2015.)
Assertion
Ref Expression
lgs0 (๐ด โˆˆ โ„ค โ†’ (๐ด /L 0) = if((๐ดโ†‘2) = 1, 1, 0))

Proof of Theorem lgs0
Dummy variable ๐‘› is distinct from all other variables.
StepHypRef Expression
1 0z 12567 . . 3 0 โˆˆ โ„ค
2 eqid 2724 . . . 4 (๐‘› โˆˆ โ„• โ†ฆ if(๐‘› โˆˆ โ„™, (if(๐‘› = 2, if(2 โˆฅ ๐ด, 0, if((๐ด mod 8) โˆˆ {1, 7}, 1, -1)), ((((๐ดโ†‘((๐‘› โˆ’ 1) / 2)) + 1) mod ๐‘›) โˆ’ 1))โ†‘(๐‘› pCnt 0)), 1)) = (๐‘› โˆˆ โ„• โ†ฆ if(๐‘› โˆˆ โ„™, (if(๐‘› = 2, if(2 โˆฅ ๐ด, 0, if((๐ด mod 8) โˆˆ {1, 7}, 1, -1)), ((((๐ดโ†‘((๐‘› โˆ’ 1) / 2)) + 1) mod ๐‘›) โˆ’ 1))โ†‘(๐‘› pCnt 0)), 1))
32lgsval 27153 . . 3 ((๐ด โˆˆ โ„ค โˆง 0 โˆˆ โ„ค) โ†’ (๐ด /L 0) = if(0 = 0, if((๐ดโ†‘2) = 1, 1, 0), (if((0 < 0 โˆง ๐ด < 0), -1, 1) ยท (seq1( ยท , (๐‘› โˆˆ โ„• โ†ฆ if(๐‘› โˆˆ โ„™, (if(๐‘› = 2, if(2 โˆฅ ๐ด, 0, if((๐ด mod 8) โˆˆ {1, 7}, 1, -1)), ((((๐ดโ†‘((๐‘› โˆ’ 1) / 2)) + 1) mod ๐‘›) โˆ’ 1))โ†‘(๐‘› pCnt 0)), 1)))โ€˜(absโ€˜0)))))
41, 3mpan2 688 . 2 (๐ด โˆˆ โ„ค โ†’ (๐ด /L 0) = if(0 = 0, if((๐ดโ†‘2) = 1, 1, 0), (if((0 < 0 โˆง ๐ด < 0), -1, 1) ยท (seq1( ยท , (๐‘› โˆˆ โ„• โ†ฆ if(๐‘› โˆˆ โ„™, (if(๐‘› = 2, if(2 โˆฅ ๐ด, 0, if((๐ด mod 8) โˆˆ {1, 7}, 1, -1)), ((((๐ดโ†‘((๐‘› โˆ’ 1) / 2)) + 1) mod ๐‘›) โˆ’ 1))โ†‘(๐‘› pCnt 0)), 1)))โ€˜(absโ€˜0)))))
5 eqid 2724 . . 3 0 = 0
65iftruei 4528 . 2 if(0 = 0, if((๐ดโ†‘2) = 1, 1, 0), (if((0 < 0 โˆง ๐ด < 0), -1, 1) ยท (seq1( ยท , (๐‘› โˆˆ โ„• โ†ฆ if(๐‘› โˆˆ โ„™, (if(๐‘› = 2, if(2 โˆฅ ๐ด, 0, if((๐ด mod 8) โˆˆ {1, 7}, 1, -1)), ((((๐ดโ†‘((๐‘› โˆ’ 1) / 2)) + 1) mod ๐‘›) โˆ’ 1))โ†‘(๐‘› pCnt 0)), 1)))โ€˜(absโ€˜0)))) = if((๐ดโ†‘2) = 1, 1, 0)
74, 6eqtrdi 2780 1 (๐ด โˆˆ โ„ค โ†’ (๐ด /L 0) = if((๐ดโ†‘2) = 1, 1, 0))
Colors of variables: wff setvar class
Syntax hints:   โ†’ wi 4   โˆง wa 395   = wceq 1533   โˆˆ wcel 2098  ifcif 4521  {cpr 4623   class class class wbr 5139   โ†ฆ cmpt 5222  โ€˜cfv 6534  (class class class)co 7402  0cc0 11107  1c1 11108   + caddc 11110   ยท cmul 11112   < clt 11246   โˆ’ cmin 11442  -cneg 11443   / cdiv 11869  โ„•cn 12210  2c2 12265  7c7 12270  8c8 12271  โ„คcz 12556   mod cmo 13832  seqcseq 13964  โ†‘cexp 14025  abscabs 15179   โˆฅ cdvds 16196  โ„™cprime 16607   pCnt cpc 16770   /L clgs 27146
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1789  ax-4 1803  ax-5 1905  ax-6 1963  ax-7 2003  ax-8 2100  ax-9 2108  ax-10 2129  ax-11 2146  ax-12 2163  ax-ext 2695  ax-sep 5290  ax-nul 5297  ax-pr 5418  ax-un 7719  ax-1cn 11165  ax-icn 11166  ax-addcl 11167  ax-addrcl 11168  ax-mulcl 11169  ax-i2m1 11175  ax-rnegex 11178  ax-cnre 11180
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 845  df-3or 1085  df-3an 1086  df-tru 1536  df-fal 1546  df-ex 1774  df-nf 1778  df-sb 2060  df-mo 2526  df-eu 2555  df-clab 2702  df-cleq 2716  df-clel 2802  df-nfc 2877  df-ne 2933  df-ral 3054  df-rex 3063  df-reu 3369  df-rab 3425  df-v 3468  df-sbc 3771  df-csb 3887  df-dif 3944  df-un 3946  df-in 3948  df-ss 3958  df-pss 3960  df-nul 4316  df-if 4522  df-pw 4597  df-sn 4622  df-pr 4624  df-op 4628  df-uni 4901  df-iun 4990  df-br 5140  df-opab 5202  df-mpt 5223  df-tr 5257  df-id 5565  df-eprel 5571  df-po 5579  df-so 5580  df-fr 5622  df-we 5624  df-xp 5673  df-rel 5674  df-cnv 5675  df-co 5676  df-dm 5677  df-rn 5678  df-res 5679  df-ima 5680  df-pred 6291  df-ord 6358  df-on 6359  df-lim 6360  df-suc 6361  df-iota 6486  df-fun 6536  df-fn 6537  df-f 6538  df-f1 6539  df-fo 6540  df-f1o 6541  df-fv 6542  df-ov 7405  df-oprab 7406  df-mpo 7407  df-om 7850  df-2nd 7970  df-frecs 8262  df-wrecs 8293  df-recs 8367  df-rdg 8406  df-neg 11445  df-nn 12211  df-n0 12471  df-z 12557  df-seq 13965  df-lgs 27147
This theorem is referenced by:  lgsdir  27184  lgsne0  27187  lgsdinn0  27197
  Copyright terms: Public domain W3C validator