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

Theorem lgs0 27237
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 12594 . . 3 0 โˆˆ โ„ค
2 eqid 2728 . . . 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 27228 . . 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 690 . 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 2728 . . 3 0 = 0
65iftruei 4532 . 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 2784 1 (๐ด โˆˆ โ„ค โ†’ (๐ด /L 0) = if((๐ดโ†‘2) = 1, 1, 0))
Colors of variables: wff setvar class
Syntax hints:   โ†’ wi 4   โˆง wa 395   = wceq 1534   โˆˆ wcel 2099  ifcif 4525  {cpr 4627   class class class wbr 5143   โ†ฆ cmpt 5226  โ€˜cfv 6543  (class class class)co 7415  0cc0 11133  1c1 11134   + caddc 11136   ยท cmul 11138   < clt 11273   โˆ’ cmin 11469  -cneg 11470   / cdiv 11896  โ„•cn 12237  2c2 12292  7c7 12297  8c8 12298  โ„คcz 12583   mod cmo 13861  seqcseq 13993  โ†‘cexp 14053  abscabs 15208   โˆฅ cdvds 16225  โ„™cprime 16636   pCnt cpc 16799   /L clgs 27221
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1790  ax-4 1804  ax-5 1906  ax-6 1964  ax-7 2004  ax-8 2101  ax-9 2109  ax-10 2130  ax-11 2147  ax-12 2167  ax-ext 2699  ax-sep 5294  ax-nul 5301  ax-pr 5424  ax-un 7735  ax-1cn 11191  ax-icn 11192  ax-addcl 11193  ax-addrcl 11194  ax-mulcl 11195  ax-i2m1 11201  ax-rnegex 11204  ax-cnre 11206
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 847  df-3or 1086  df-3an 1087  df-tru 1537  df-fal 1547  df-ex 1775  df-nf 1779  df-sb 2061  df-mo 2530  df-eu 2559  df-clab 2706  df-cleq 2720  df-clel 2806  df-nfc 2881  df-ne 2937  df-ral 3058  df-rex 3067  df-reu 3373  df-rab 3429  df-v 3472  df-sbc 3776  df-csb 3891  df-dif 3948  df-un 3950  df-in 3952  df-ss 3962  df-pss 3964  df-nul 4320  df-if 4526  df-pw 4601  df-sn 4626  df-pr 4628  df-op 4632  df-uni 4905  df-iun 4994  df-br 5144  df-opab 5206  df-mpt 5227  df-tr 5261  df-id 5571  df-eprel 5577  df-po 5585  df-so 5586  df-fr 5628  df-we 5630  df-xp 5679  df-rel 5680  df-cnv 5681  df-co 5682  df-dm 5683  df-rn 5684  df-res 5685  df-ima 5686  df-pred 6300  df-ord 6367  df-on 6368  df-lim 6369  df-suc 6370  df-iota 6495  df-fun 6545  df-fn 6546  df-f 6547  df-f1 6548  df-fo 6549  df-f1o 6550  df-fv 6551  df-ov 7418  df-oprab 7419  df-mpo 7420  df-om 7866  df-2nd 7989  df-frecs 8281  df-wrecs 8312  df-recs 8386  df-rdg 8425  df-neg 11472  df-nn 12238  df-n0 12498  df-z 12584  df-seq 13994  df-lgs 27222
This theorem is referenced by:  lgsdir  27259  lgsne0  27262  lgsdinn0  27272
  Copyright terms: Public domain W3C validator