Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
Mirrors > Home > MPE Home > Th. List > lgscllem | Structured version Visualization version GIF version |
Description: The Legendre symbol is an element of 𝑍. (Contributed by Mario Carneiro, 4-Feb-2015.) |
Ref | Expression |
---|---|
lgsval.1 | ⊢ 𝐹 = (𝑛 ∈ ℕ ↦ if(𝑛 ∈ ℙ, (if(𝑛 = 2, if(2 ∥ 𝐴, 0, if((𝐴 mod 8) ∈ {1, 7}, 1, -1)), ((((𝐴↑((𝑛 − 1) / 2)) + 1) mod 𝑛) − 1))↑(𝑛 pCnt 𝑁)), 1)) |
lgsfcl2.z | ⊢ 𝑍 = {𝑥 ∈ ℤ ∣ (abs‘𝑥) ≤ 1} |
Ref | Expression |
---|---|
lgscllem | ⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝐴 /L 𝑁) ∈ 𝑍) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | lgsval.1 | . . 3 ⊢ 𝐹 = (𝑛 ∈ ℕ ↦ if(𝑛 ∈ ℙ, (if(𝑛 = 2, if(2 ∥ 𝐴, 0, if((𝐴 mod 8) ∈ {1, 7}, 1, -1)), ((((𝐴↑((𝑛 − 1) / 2)) + 1) mod 𝑛) − 1))↑(𝑛 pCnt 𝑁)), 1)) | |
2 | 1 | lgsval 25985 | . 2 ⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝐴 /L 𝑁) = if(𝑁 = 0, if((𝐴↑2) = 1, 1, 0), (if((𝑁 < 0 ∧ 𝐴 < 0), -1, 1) · (seq1( · , 𝐹)‘(abs‘𝑁))))) |
3 | lgsfcl2.z | . . . . . . 7 ⊢ 𝑍 = {𝑥 ∈ ℤ ∣ (abs‘𝑥) ≤ 1} | |
4 | 3 | lgslem2 25982 | . . . . . 6 ⊢ (-1 ∈ 𝑍 ∧ 0 ∈ 𝑍 ∧ 1 ∈ 𝑍) |
5 | 4 | simp3i 1139 | . . . . 5 ⊢ 1 ∈ 𝑍 |
6 | 4 | simp2i 1138 | . . . . 5 ⊢ 0 ∈ 𝑍 |
7 | 5, 6 | ifcli 4468 | . . . 4 ⊢ if((𝐴↑2) = 1, 1, 0) ∈ 𝑍 |
8 | 7 | a1i 11 | . . 3 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑁 = 0) → if((𝐴↑2) = 1, 1, 0) ∈ 𝑍) |
9 | 4 | simp1i 1137 | . . . . 5 ⊢ -1 ∈ 𝑍 |
10 | 9, 5 | ifcli 4468 | . . . 4 ⊢ if((𝑁 < 0 ∧ 𝐴 < 0), -1, 1) ∈ 𝑍 |
11 | simplr 769 | . . . . . . 7 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) → 𝑁 ∈ ℤ) | |
12 | simpr 489 | . . . . . . . 8 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) → ¬ 𝑁 = 0) | |
13 | 12 | neqned 2959 | . . . . . . 7 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) → 𝑁 ≠ 0) |
14 | nnabscl 14734 | . . . . . . 7 ⊢ ((𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (abs‘𝑁) ∈ ℕ) | |
15 | 11, 13, 14 | syl2anc 588 | . . . . . 6 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) → (abs‘𝑁) ∈ ℕ) |
16 | nnuz 12322 | . . . . . 6 ⊢ ℕ = (ℤ≥‘1) | |
17 | 15, 16 | eleqtrdi 2863 | . . . . 5 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) → (abs‘𝑁) ∈ (ℤ≥‘1)) |
18 | df-ne 2953 | . . . . . . 7 ⊢ (𝑁 ≠ 0 ↔ ¬ 𝑁 = 0) | |
19 | 1, 3 | lgsfcl2 25987 | . . . . . . . 8 ⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → 𝐹:ℕ⟶𝑍) |
20 | 19 | 3expa 1116 | . . . . . . 7 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑁 ≠ 0) → 𝐹:ℕ⟶𝑍) |
21 | 18, 20 | sylan2br 598 | . . . . . 6 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) → 𝐹:ℕ⟶𝑍) |
22 | elfznn 12986 | . . . . . 6 ⊢ (𝑦 ∈ (1...(abs‘𝑁)) → 𝑦 ∈ ℕ) | |
23 | ffvelrn 6841 | . . . . . 6 ⊢ ((𝐹:ℕ⟶𝑍 ∧ 𝑦 ∈ ℕ) → (𝐹‘𝑦) ∈ 𝑍) | |
24 | 21, 22, 23 | syl2an 599 | . . . . 5 ⊢ ((((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) ∧ 𝑦 ∈ (1...(abs‘𝑁))) → (𝐹‘𝑦) ∈ 𝑍) |
25 | 3 | lgslem3 25983 | . . . . . 6 ⊢ ((𝑦 ∈ 𝑍 ∧ 𝑧 ∈ 𝑍) → (𝑦 · 𝑧) ∈ 𝑍) |
26 | 25 | adantl 486 | . . . . 5 ⊢ ((((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) ∧ (𝑦 ∈ 𝑍 ∧ 𝑧 ∈ 𝑍)) → (𝑦 · 𝑧) ∈ 𝑍) |
27 | 17, 24, 26 | seqcl 13441 | . . . 4 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) → (seq1( · , 𝐹)‘(abs‘𝑁)) ∈ 𝑍) |
28 | 3 | lgslem3 25983 | . . . 4 ⊢ ((if((𝑁 < 0 ∧ 𝐴 < 0), -1, 1) ∈ 𝑍 ∧ (seq1( · , 𝐹)‘(abs‘𝑁)) ∈ 𝑍) → (if((𝑁 < 0 ∧ 𝐴 < 0), -1, 1) · (seq1( · , 𝐹)‘(abs‘𝑁))) ∈ 𝑍) |
29 | 10, 27, 28 | sylancr 591 | . . 3 ⊢ (((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ 𝑁 = 0) → (if((𝑁 < 0 ∧ 𝐴 < 0), -1, 1) · (seq1( · , 𝐹)‘(abs‘𝑁))) ∈ 𝑍) |
30 | 8, 29 | ifclda 4456 | . 2 ⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) → if(𝑁 = 0, if((𝐴↑2) = 1, 1, 0), (if((𝑁 < 0 ∧ 𝐴 < 0), -1, 1) · (seq1( · , 𝐹)‘(abs‘𝑁)))) ∈ 𝑍) |
31 | 2, 30 | eqeltrd 2853 | 1 ⊢ ((𝐴 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝐴 /L 𝑁) ∈ 𝑍) |
Colors of variables: wff setvar class |
Syntax hints: ¬ wn 3 → wi 4 ∧ wa 400 = wceq 1539 ∈ wcel 2112 ≠ wne 2952 {crab 3075 ifcif 4421 {cpr 4525 class class class wbr 5033 ↦ cmpt 5113 ⟶wf 6332 ‘cfv 6336 (class class class)co 7151 0cc0 10576 1c1 10577 + caddc 10579 · cmul 10581 < clt 10714 ≤ cle 10715 − cmin 10909 -cneg 10910 / cdiv 11336 ℕcn 11675 2c2 11730 7c7 11735 8c8 11736 ℤcz 12021 ℤ≥cuz 12283 ...cfz 12940 mod cmo 13287 seqcseq 13419 ↑cexp 13480 abscabs 14642 ∥ cdvds 15656 ℙcprime 16068 pCnt cpc 16229 /L clgs 25978 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1798 ax-4 1812 ax-5 1912 ax-6 1971 ax-7 2016 ax-8 2114 ax-9 2122 ax-10 2143 ax-11 2159 ax-12 2176 ax-ext 2730 ax-rep 5157 ax-sep 5170 ax-nul 5177 ax-pow 5235 ax-pr 5299 ax-un 7460 ax-cnex 10632 ax-resscn 10633 ax-1cn 10634 ax-icn 10635 ax-addcl 10636 ax-addrcl 10637 ax-mulcl 10638 ax-mulrcl 10639 ax-mulcom 10640 ax-addass 10641 ax-mulass 10642 ax-distr 10643 ax-i2m1 10644 ax-1ne0 10645 ax-1rid 10646 ax-rnegex 10647 ax-rrecex 10648 ax-cnre 10649 ax-pre-lttri 10650 ax-pre-lttrn 10651 ax-pre-ltadd 10652 ax-pre-mulgt0 10653 ax-pre-sup 10654 |
This theorem depends on definitions: df-bi 210 df-an 401 df-or 846 df-3or 1086 df-3an 1087 df-tru 1542 df-fal 1552 df-ex 1783 df-nf 1787 df-sb 2071 df-mo 2558 df-eu 2589 df-clab 2737 df-cleq 2751 df-clel 2831 df-nfc 2902 df-ne 2953 df-nel 3057 df-ral 3076 df-rex 3077 df-reu 3078 df-rmo 3079 df-rab 3080 df-v 3412 df-sbc 3698 df-csb 3807 df-dif 3862 df-un 3864 df-in 3866 df-ss 3876 df-pss 3878 df-nul 4227 df-if 4422 df-pw 4497 df-sn 4524 df-pr 4526 df-tp 4528 df-op 4530 df-uni 4800 df-int 4840 df-iun 4886 df-br 5034 df-opab 5096 df-mpt 5114 df-tr 5140 df-id 5431 df-eprel 5436 df-po 5444 df-so 5445 df-fr 5484 df-we 5486 df-xp 5531 df-rel 5532 df-cnv 5533 df-co 5534 df-dm 5535 df-rn 5536 df-res 5537 df-ima 5538 df-pred 6127 df-ord 6173 df-on 6174 df-lim 6175 df-suc 6176 df-iota 6295 df-fun 6338 df-fn 6339 df-f 6340 df-f1 6341 df-fo 6342 df-f1o 6343 df-fv 6344 df-riota 7109 df-ov 7154 df-oprab 7155 df-mpo 7156 df-om 7581 df-1st 7694 df-2nd 7695 df-wrecs 7958 df-recs 8019 df-rdg 8057 df-1o 8113 df-2o 8114 df-oadd 8117 df-er 8300 df-map 8419 df-en 8529 df-dom 8530 df-sdom 8531 df-fin 8532 df-sup 8940 df-inf 8941 df-dju 9364 df-card 9402 df-pnf 10716 df-mnf 10717 df-xr 10718 df-ltxr 10719 df-le 10720 df-sub 10911 df-neg 10912 df-div 11337 df-nn 11676 df-2 11738 df-3 11739 df-n0 11936 df-xnn0 12008 df-z 12022 df-uz 12284 df-q 12390 df-rp 12432 df-fz 12941 df-fzo 13084 df-fl 13212 df-mod 13288 df-seq 13420 df-exp 13481 df-hash 13742 df-cj 14507 df-re 14508 df-im 14509 df-sqrt 14643 df-abs 14644 df-dvds 15657 df-gcd 15895 df-prm 16069 df-phi 16159 df-pc 16230 df-lgs 25979 |
This theorem is referenced by: lgscl2 25993 |
Copyright terms: Public domain | W3C validator |