Metamath Proof Explorer


Theorem coskpi2

Description: The cosine of an integer multiple of negative _pi is either 1 or negative 1 . (Contributed by Glauco Siliprandi, 11-Dec-2019)

Ref Expression
Assertion coskpi2 KcosKπ=if2K11

Proof

Step Hyp Ref Expression
1 2z 2
2 divides 2K2Knn2=K
3 1 2 mpan K2Knn2=K
4 3 biimpa K2Knn2=K
5 zcn nn
6 2cnd n2
7 picn π
8 7 a1i nπ
9 5 6 8 mulassd nn2π=n2π
10 9 eqcomd nn2π=n2π
11 10 adantr nn2=Kn2π=n2π
12 oveq1 n2=Kn2π=Kπ
13 12 adantl nn2=Kn2π=Kπ
14 11 13 eqtr2d nn2=KKπ=n2π
15 14 fveq2d nn2=KcosKπ=cosn2π
16 cos2kpi ncosn2π=1
17 16 adantr nn2=Kcosn2π=1
18 15 17 eqtrd nn2=KcosKπ=1
19 18 3adant1 2Knn2=KcosKπ=1
20 iftrue 2Kif2K11=1
21 20 eqcomd 2K1=if2K11
22 21 3ad2ant1 2Knn2=K1=if2K11
23 19 22 eqtrd 2Knn2=KcosKπ=if2K11
24 23 3exp 2Knn2=KcosKπ=if2K11
25 24 adantl K2Knn2=KcosKπ=if2K11
26 25 rexlimdv K2Knn2=KcosKπ=if2K11
27 4 26 mpd K2KcosKπ=if2K11
28 odd2np1 K¬2Kn2n+1=K
29 28 biimpa K¬2Kn2n+1=K
30 6 5 mulcld n2n
31 1cnd n1
32 30 31 8 adddird n2n+1π=2nπ+1π
33 6 5 mulcomd n2n=n2
34 33 oveq1d n2nπ=n2π
35 34 9 eqtrd n2nπ=n2π
36 7 mullidi 1π=π
37 36 a1i n1π=π
38 35 37 oveq12d n2nπ+1π=n2π+π
39 2cn 2
40 39 7 mulcli 2π
41 40 a1i n2π
42 5 41 mulcld nn2π
43 42 8 addcomd nn2π+π=π+n2π
44 32 38 43 3eqtrrd nπ+n2π=2n+1π
45 44 adantr n2n+1=Kπ+n2π=2n+1π
46 oveq1 2n+1=K2n+1π=Kπ
47 46 adantl n2n+1=K2n+1π=Kπ
48 45 47 eqtr2d n2n+1=KKπ=π+n2π
49 48 fveq2d n2n+1=KcosKπ=cosπ+n2π
50 cosper πncosπ+n2π=cosπ
51 7 50 mpan ncosπ+n2π=cosπ
52 51 adantr n2n+1=Kcosπ+n2π=cosπ
53 cospi cosπ=1
54 53 a1i n2n+1=Kcosπ=1
55 49 52 54 3eqtrd n2n+1=KcosKπ=1
56 55 3adant1 ¬2Kn2n+1=KcosKπ=1
57 iffalse ¬2Kif2K11=1
58 57 eqcomd ¬2K1=if2K11
59 58 3ad2ant1 ¬2Kn2n+1=K1=if2K11
60 56 59 eqtrd ¬2Kn2n+1=KcosKπ=if2K11
61 60 3exp ¬2Kn2n+1=KcosKπ=if2K11
62 61 adantl K¬2Kn2n+1=KcosKπ=if2K11
63 62 rexlimdv K¬2Kn2n+1=KcosKπ=if2K11
64 29 63 mpd K¬2KcosKπ=if2K11
65 27 64 pm2.61dan KcosKπ=if2K11