Metamath Proof Explorer


Theorem lgsmulsqcoprm

Description: The Legendre (Jacobi) symbol is preserved under multiplication with a square of an integer coprime to the second argument. Theorem 9.9(d) in ApostolNT p. 188. (Contributed by AV, 20-Jul-2021)

Ref Expression
Assertion lgsmulsqcoprm A A 0 B B 0 N A gcd N = 1 A 2 B / L N = B / L N

Proof

Step Hyp Ref Expression
1 zsqcl A A 2
2 1 adantr A A 0 A 2
3 simpl B B 0 B
4 simpl N A gcd N = 1 N
5 2 3 4 3anim123i A A 0 B B 0 N A gcd N = 1 A 2 B N
6 zcn A A
7 sqne0 A A 2 0 A 0
8 6 7 syl A A 2 0 A 0
9 8 biimpar A A 0 A 2 0
10 simpr B B 0 B 0
11 9 10 anim12i A A 0 B B 0 A 2 0 B 0
12 11 3adant3 A A 0 B B 0 N A gcd N = 1 A 2 0 B 0
13 lgsdir A 2 B N A 2 0 B 0 A 2 B / L N = A 2 / L N B / L N
14 5 12 13 syl2anc A A 0 B B 0 N A gcd N = 1 A 2 B / L N = A 2 / L N B / L N
15 3anass A A 0 N A gcd N = 1 A A 0 N A gcd N = 1
16 15 biimpri A A 0 N A gcd N = 1 A A 0 N A gcd N = 1
17 16 3adant2 A A 0 B B 0 N A gcd N = 1 A A 0 N A gcd N = 1
18 lgssq A A 0 N A gcd N = 1 A 2 / L N = 1
19 17 18 syl A A 0 B B 0 N A gcd N = 1 A 2 / L N = 1
20 19 oveq1d A A 0 B B 0 N A gcd N = 1 A 2 / L N B / L N = 1 B / L N
21 3 4 anim12i B B 0 N A gcd N = 1 B N
22 21 3adant1 A A 0 B B 0 N A gcd N = 1 B N
23 lgscl B N B / L N
24 22 23 syl A A 0 B B 0 N A gcd N = 1 B / L N
25 24 zcnd A A 0 B B 0 N A gcd N = 1 B / L N
26 25 mulid2d A A 0 B B 0 N A gcd N = 1 1 B / L N = B / L N
27 14 20 26 3eqtrd A A 0 B B 0 N A gcd N = 1 A 2 B / L N = B / L N