ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  2lgslem3 GIF version

Theorem 2lgslem3 15426
Description: Lemma 3 for 2lgs 15429. (Contributed by AV, 16-Jul-2021.)
Hypothesis
Ref Expression
2lgslem2.n 𝑁 = (((𝑃 − 1) / 2) − (⌊‘(𝑃 / 4)))
Assertion
Ref Expression
2lgslem3 ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1))

Proof of Theorem 2lgslem3
StepHypRef Expression
1 nnz 9362 . . 3 (𝑃 ∈ ℕ → 𝑃 ∈ ℤ)
2 lgsdir2lem3 15355 . . 3 ((𝑃 ∈ ℤ ∧ ¬ 2 ∥ 𝑃) → (𝑃 mod 8) ∈ ({1, 7} ∪ {3, 5}))
31, 2sylan 283 . 2 ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑃 mod 8) ∈ ({1, 7} ∪ {3, 5}))
4 elun 3305 . . 3 ((𝑃 mod 8) ∈ ({1, 7} ∪ {3, 5}) ↔ ((𝑃 mod 8) ∈ {1, 7} ∨ (𝑃 mod 8) ∈ {3, 5}))
5 elpri 3646 . . . . . . . 8 ((𝑃 mod 8) ∈ {1, 7} → ((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7))
6 2lgslem2.n . . . . . . . . . . . . 13 𝑁 = (((𝑃 − 1) / 2) − (⌊‘(𝑃 / 4)))
762lgslem3a1 15422 . . . . . . . . . . . 12 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 1) → (𝑁 mod 2) = 0)
87a1d 22 . . . . . . . . . . 11 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 1) → (¬ 2 ∥ 𝑃 → (𝑁 mod 2) = 0))
98expcom 116 . . . . . . . . . 10 ((𝑃 mod 8) = 1 → (𝑃 ∈ ℕ → (¬ 2 ∥ 𝑃 → (𝑁 mod 2) = 0)))
109impd 254 . . . . . . . . 9 ((𝑃 mod 8) = 1 → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = 0))
1162lgslem3d1 15425 . . . . . . . . . . . 12 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 7) → (𝑁 mod 2) = 0)
1211a1d 22 . . . . . . . . . . 11 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 7) → (¬ 2 ∥ 𝑃 → (𝑁 mod 2) = 0))
1312expcom 116 . . . . . . . . . 10 ((𝑃 mod 8) = 7 → (𝑃 ∈ ℕ → (¬ 2 ∥ 𝑃 → (𝑁 mod 2) = 0)))
1413impd 254 . . . . . . . . 9 ((𝑃 mod 8) = 7 → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = 0))
1510, 14jaoi 717 . . . . . . . 8 (((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7) → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = 0))
165, 15syl 14 . . . . . . 7 ((𝑃 mod 8) ∈ {1, 7} → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = 0))
1716imp 124 . . . . . 6 (((𝑃 mod 8) ∈ {1, 7} ∧ (𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃)) → (𝑁 mod 2) = 0)
18 iftrue 3567 . . . . . . 7 ((𝑃 mod 8) ∈ {1, 7} → if((𝑃 mod 8) ∈ {1, 7}, 0, 1) = 0)
1918adantr 276 . . . . . 6 (((𝑃 mod 8) ∈ {1, 7} ∧ (𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃)) → if((𝑃 mod 8) ∈ {1, 7}, 0, 1) = 0)
2017, 19eqtr4d 2232 . . . . 5 (((𝑃 mod 8) ∈ {1, 7} ∧ (𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃)) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1))
2120ex 115 . . . 4 ((𝑃 mod 8) ∈ {1, 7} → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1)))
22 elpri 3646 . . . . 5 ((𝑃 mod 8) ∈ {3, 5} → ((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5))
2362lgslem3b1 15423 . . . . . . . . . . 11 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 3) → (𝑁 mod 2) = 1)
2423expcom 116 . . . . . . . . . 10 ((𝑃 mod 8) = 3 → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1))
2562lgslem3c1 15424 . . . . . . . . . . 11 ((𝑃 ∈ ℕ ∧ (𝑃 mod 8) = 5) → (𝑁 mod 2) = 1)
2625expcom 116 . . . . . . . . . 10 ((𝑃 mod 8) = 5 → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1))
2724, 26jaoi 717 . . . . . . . . 9 (((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) → (𝑃 ∈ ℕ → (𝑁 mod 2) = 1))
2827imp 124 . . . . . . . 8 ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (𝑁 mod 2) = 1)
29 1re 8042 . . . . . . . . . . . . . . . . 17 1 ∈ ℝ
30 1lt3 9179 . . . . . . . . . . . . . . . . 17 1 < 3
3129, 30ltneii 8140 . . . . . . . . . . . . . . . 16 1 ≠ 3
3231nesymi 2413 . . . . . . . . . . . . . . 15 ¬ 3 = 1
33 3re 9081 . . . . . . . . . . . . . . . . 17 3 ∈ ℝ
34 3lt7 9195 . . . . . . . . . . . . . . . . 17 3 < 7
3533, 34ltneii 8140 . . . . . . . . . . . . . . . 16 3 ≠ 7
3635neii 2369 . . . . . . . . . . . . . . 15 ¬ 3 = 7
3732, 36pm3.2i 272 . . . . . . . . . . . . . 14 (¬ 3 = 1 ∧ ¬ 3 = 7)
38 eqeq1 2203 . . . . . . . . . . . . . . . 16 ((𝑃 mod 8) = 3 → ((𝑃 mod 8) = 1 ↔ 3 = 1))
3938notbid 668 . . . . . . . . . . . . . . 15 ((𝑃 mod 8) = 3 → (¬ (𝑃 mod 8) = 1 ↔ ¬ 3 = 1))
40 eqeq1 2203 . . . . . . . . . . . . . . . 16 ((𝑃 mod 8) = 3 → ((𝑃 mod 8) = 7 ↔ 3 = 7))
4140notbid 668 . . . . . . . . . . . . . . 15 ((𝑃 mod 8) = 3 → (¬ (𝑃 mod 8) = 7 ↔ ¬ 3 = 7))
4239, 41anbi12d 473 . . . . . . . . . . . . . 14 ((𝑃 mod 8) = 3 → ((¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7) ↔ (¬ 3 = 1 ∧ ¬ 3 = 7)))
4337, 42mpbiri 168 . . . . . . . . . . . . 13 ((𝑃 mod 8) = 3 → (¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7))
44 1lt5 9186 . . . . . . . . . . . . . . . . 17 1 < 5
4529, 44ltneii 8140 . . . . . . . . . . . . . . . 16 1 ≠ 5
4645nesymi 2413 . . . . . . . . . . . . . . 15 ¬ 5 = 1
47 5re 9086 . . . . . . . . . . . . . . . . 17 5 ∈ ℝ
48 5lt7 9193 . . . . . . . . . . . . . . . . 17 5 < 7
4947, 48ltneii 8140 . . . . . . . . . . . . . . . 16 5 ≠ 7
5049neii 2369 . . . . . . . . . . . . . . 15 ¬ 5 = 7
5146, 50pm3.2i 272 . . . . . . . . . . . . . 14 (¬ 5 = 1 ∧ ¬ 5 = 7)
52 eqeq1 2203 . . . . . . . . . . . . . . . 16 ((𝑃 mod 8) = 5 → ((𝑃 mod 8) = 1 ↔ 5 = 1))
5352notbid 668 . . . . . . . . . . . . . . 15 ((𝑃 mod 8) = 5 → (¬ (𝑃 mod 8) = 1 ↔ ¬ 5 = 1))
54 eqeq1 2203 . . . . . . . . . . . . . . . 16 ((𝑃 mod 8) = 5 → ((𝑃 mod 8) = 7 ↔ 5 = 7))
5554notbid 668 . . . . . . . . . . . . . . 15 ((𝑃 mod 8) = 5 → (¬ (𝑃 mod 8) = 7 ↔ ¬ 5 = 7))
5653, 55anbi12d 473 . . . . . . . . . . . . . 14 ((𝑃 mod 8) = 5 → ((¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7) ↔ (¬ 5 = 1 ∧ ¬ 5 = 7)))
5751, 56mpbiri 168 . . . . . . . . . . . . 13 ((𝑃 mod 8) = 5 → (¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7))
5843, 57jaoi 717 . . . . . . . . . . . 12 (((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) → (¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7))
5958adantr 276 . . . . . . . . . . 11 ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7))
60 ioran 753 . . . . . . . . . . 11 (¬ ((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7) ↔ (¬ (𝑃 mod 8) = 1 ∧ ¬ (𝑃 mod 8) = 7))
6159, 60sylibr 134 . . . . . . . . . 10 ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → ¬ ((𝑃 mod 8) = 1 ∨ (𝑃 mod 8) = 7))
6261, 5nsyl 629 . . . . . . . . 9 ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → ¬ (𝑃 mod 8) ∈ {1, 7})
6362iffalsed 3572 . . . . . . . 8 ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → if((𝑃 mod 8) ∈ {1, 7}, 0, 1) = 1)
6428, 63eqtr4d 2232 . . . . . . 7 ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1))
6564a1d 22 . . . . . 6 ((((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) ∧ 𝑃 ∈ ℕ) → (¬ 2 ∥ 𝑃 → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1)))
6665expimpd 363 . . . . 5 (((𝑃 mod 8) = 3 ∨ (𝑃 mod 8) = 5) → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1)))
6722, 66syl 14 . . . 4 ((𝑃 mod 8) ∈ {3, 5} → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1)))
6821, 67jaoi 717 . . 3 (((𝑃 mod 8) ∈ {1, 7} ∨ (𝑃 mod 8) ∈ {3, 5}) → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1)))
694, 68sylbi 121 . 2 ((𝑃 mod 8) ∈ ({1, 7} ∪ {3, 5}) → ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1)))
703, 69mpcom 36 1 ((𝑃 ∈ ℕ ∧ ¬ 2 ∥ 𝑃) → (𝑁 mod 2) = if((𝑃 mod 8) ∈ {1, 7}, 0, 1))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 104  wo 709   = wceq 1364  wcel 2167  cun 3155  ifcif 3562  {cpr 3624   class class class wbr 4034  cfv 5259  (class class class)co 5925  0cc0 7896  1c1 7897  cmin 8214   / cdiv 8716  cn 9007  2c2 9058  3c3 9059  4c4 9060  5c5 9061  7c7 9063  8c8 9064  cz 9343  cfl 10375   mod cmo 10431  cdvds 11969
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1461  ax-7 1462  ax-gen 1463  ax-ie1 1507  ax-ie2 1508  ax-8 1518  ax-10 1519  ax-11 1520  ax-i12 1521  ax-bndl 1523  ax-4 1524  ax-17 1540  ax-i9 1544  ax-ial 1548  ax-i5r 1549  ax-13 2169  ax-14 2170  ax-ext 2178  ax-sep 4152  ax-pow 4208  ax-pr 4243  ax-un 4469  ax-setind 4574  ax-cnex 7987  ax-resscn 7988  ax-1cn 7989  ax-1re 7990  ax-icn 7991  ax-addcl 7992  ax-addrcl 7993  ax-mulcl 7994  ax-mulrcl 7995  ax-addcom 7996  ax-mulcom 7997  ax-addass 7998  ax-mulass 7999  ax-distr 8000  ax-i2m1 8001  ax-0lt1 8002  ax-1rid 8003  ax-0id 8004  ax-rnegex 8005  ax-precex 8006  ax-cnre 8007  ax-pre-ltirr 8008  ax-pre-ltwlin 8009  ax-pre-lttrn 8010  ax-pre-apti 8011  ax-pre-ltadd 8012  ax-pre-mulgt0 8013  ax-pre-mulext 8014  ax-arch 8015
This theorem depends on definitions:  df-bi 117  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-xor 1387  df-nf 1475  df-sb 1777  df-eu 2048  df-mo 2049  df-clab 2183  df-cleq 2189  df-clel 2192  df-nfc 2328  df-ne 2368  df-nel 2463  df-ral 2480  df-rex 2481  df-reu 2482  df-rmo 2483  df-rab 2484  df-v 2765  df-sbc 2990  df-csb 3085  df-dif 3159  df-un 3161  df-in 3163  df-ss 3170  df-nul 3452  df-if 3563  df-pw 3608  df-sn 3629  df-pr 3630  df-op 3632  df-uni 3841  df-int 3876  df-iun 3919  df-br 4035  df-opab 4096  df-mpt 4097  df-id 4329  df-po 4332  df-iso 4333  df-xp 4670  df-rel 4671  df-cnv 4672  df-co 4673  df-dm 4674  df-rn 4675  df-res 4676  df-ima 4677  df-iota 5220  df-fun 5261  df-fn 5262  df-f 5263  df-fv 5267  df-riota 5880  df-ov 5928  df-oprab 5929  df-mpo 5930  df-1st 6207  df-2nd 6208  df-pnf 8080  df-mnf 8081  df-xr 8082  df-ltxr 8083  df-le 8084  df-sub 8216  df-neg 8217  df-reap 8619  df-ap 8626  df-div 8717  df-inn 9008  df-2 9066  df-3 9067  df-4 9068  df-5 9069  df-6 9070  df-7 9071  df-8 9072  df-n0 9267  df-z 9344  df-uz 9619  df-q 9711  df-rp 9746  df-ico 9986  df-fz 10101  df-fl 10377  df-mod 10432  df-dvds 11970
This theorem is referenced by:  2lgs  15429
  Copyright terms: Public domain W3C validator