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

Theorem modprmn0modprm0 12147
Description: For an integer not being 0 modulo a given prime number and a nonnegative integer less than the prime number, there is always a second nonnegative integer (less than the given prime number) so that the sum of this second nonnegative integer multiplied with the integer and the first nonnegative integer is 0 ( modulo the given prime number). (Contributed by Alexander van der Vekens, 10-Nov-2018.)
Assertion
Ref Expression
modprmn0modprm0 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → (𝐼 ∈ (0..^𝑃) → ∃𝑗 ∈ (0..^𝑃)((𝐼 + (𝑗 · 𝑁)) mod 𝑃) = 0))
Distinct variable groups:   𝑗,𝐼   𝑗,𝑁   𝑃,𝑗

Proof of Theorem modprmn0modprm0
StepHypRef Expression
1 simpl1 985 . . . 4 (((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) → 𝑃 ∈ ℙ)
2 prmnn 12003 . . . . . . . . 9 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
3 zmodfzo 10256 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ 𝑃 ∈ ℕ) → (𝑁 mod 𝑃) ∈ (0..^𝑃))
42, 3sylan2 284 . . . . . . . 8 ((𝑁 ∈ ℤ ∧ 𝑃 ∈ ℙ) → (𝑁 mod 𝑃) ∈ (0..^𝑃))
54ancoms 266 . . . . . . 7 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ) → (𝑁 mod 𝑃) ∈ (0..^𝑃))
653adant3 1002 . . . . . 6 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → (𝑁 mod 𝑃) ∈ (0..^𝑃))
7 fzo1fzo0n0 10092 . . . . . . . 8 ((𝑁 mod 𝑃) ∈ (1..^𝑃) ↔ ((𝑁 mod 𝑃) ∈ (0..^𝑃) ∧ (𝑁 mod 𝑃) ≠ 0))
87simplbi2com 1424 . . . . . . 7 ((𝑁 mod 𝑃) ≠ 0 → ((𝑁 mod 𝑃) ∈ (0..^𝑃) → (𝑁 mod 𝑃) ∈ (1..^𝑃)))
983ad2ant3 1005 . . . . . 6 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → ((𝑁 mod 𝑃) ∈ (0..^𝑃) → (𝑁 mod 𝑃) ∈ (1..^𝑃)))
106, 9mpd 13 . . . . 5 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → (𝑁 mod 𝑃) ∈ (1..^𝑃))
1110adantr 274 . . . 4 (((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) → (𝑁 mod 𝑃) ∈ (1..^𝑃))
12 simpr 109 . . . 4 (((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) → 𝐼 ∈ (0..^𝑃))
13 nnnn0modprm0 12146 . . . 4 ((𝑃 ∈ ℙ ∧ (𝑁 mod 𝑃) ∈ (1..^𝑃) ∧ 𝐼 ∈ (0..^𝑃)) → ∃𝑗 ∈ (0..^𝑃)((𝐼 + (𝑗 · (𝑁 mod 𝑃))) mod 𝑃) = 0)
141, 11, 12, 13syl3anc 1220 . . 3 (((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) → ∃𝑗 ∈ (0..^𝑃)((𝐼 + (𝑗 · (𝑁 mod 𝑃))) mod 𝑃) = 0)
15 elfzoelz 10056 . . . . . . . . . 10 (𝑗 ∈ (0..^𝑃) → 𝑗 ∈ ℤ)
1615zcnd 9293 . . . . . . . . 9 (𝑗 ∈ (0..^𝑃) → 𝑗 ∈ ℂ)
172anim1ci 339 . . . . . . . . . . . 12 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ) → (𝑁 ∈ ℤ ∧ 𝑃 ∈ ℕ))
18 zmodcl 10253 . . . . . . . . . . . 12 ((𝑁 ∈ ℤ ∧ 𝑃 ∈ ℕ) → (𝑁 mod 𝑃) ∈ ℕ0)
19 nn0cn 9106 . . . . . . . . . . . 12 ((𝑁 mod 𝑃) ∈ ℕ0 → (𝑁 mod 𝑃) ∈ ℂ)
2017, 18, 193syl 17 . . . . . . . . . . 11 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ) → (𝑁 mod 𝑃) ∈ ℂ)
21203adant3 1002 . . . . . . . . . 10 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → (𝑁 mod 𝑃) ∈ ℂ)
2221adantr 274 . . . . . . . . 9 (((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) → (𝑁 mod 𝑃) ∈ ℂ)
23 mulcom 7864 . . . . . . . . 9 ((𝑗 ∈ ℂ ∧ (𝑁 mod 𝑃) ∈ ℂ) → (𝑗 · (𝑁 mod 𝑃)) = ((𝑁 mod 𝑃) · 𝑗))
2416, 22, 23syl2anr 288 . . . . . . . 8 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → (𝑗 · (𝑁 mod 𝑃)) = ((𝑁 mod 𝑃) · 𝑗))
2524oveq2d 5843 . . . . . . 7 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → (𝐼 + (𝑗 · (𝑁 mod 𝑃))) = (𝐼 + ((𝑁 mod 𝑃) · 𝑗)))
2625oveq1d 5842 . . . . . 6 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → ((𝐼 + (𝑗 · (𝑁 mod 𝑃))) mod 𝑃) = ((𝐼 + ((𝑁 mod 𝑃) · 𝑗)) mod 𝑃))
27 elfzoelz 10056 . . . . . . . . 9 (𝐼 ∈ (0..^𝑃) → 𝐼 ∈ ℤ)
2827ad2antlr 481 . . . . . . . 8 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 𝐼 ∈ ℤ)
29 zq 9542 . . . . . . . 8 (𝐼 ∈ ℤ → 𝐼 ∈ ℚ)
3028, 29syl 14 . . . . . . 7 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 𝐼 ∈ ℚ)
31 simpll2 1022 . . . . . . . 8 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 𝑁 ∈ ℤ)
32 zq 9542 . . . . . . . 8 (𝑁 ∈ ℤ → 𝑁 ∈ ℚ)
3331, 32syl 14 . . . . . . 7 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 𝑁 ∈ ℚ)
3415adantl 275 . . . . . . 7 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 𝑗 ∈ ℤ)
3523ad2ant1 1003 . . . . . . . . 9 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → 𝑃 ∈ ℕ)
3635ad2antrr 480 . . . . . . . 8 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 𝑃 ∈ ℕ)
37 nnq 9549 . . . . . . . 8 (𝑃 ∈ ℕ → 𝑃 ∈ ℚ)
3836, 37syl 14 . . . . . . 7 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 𝑃 ∈ ℚ)
392nnrpd 9608 . . . . . . . . . 10 (𝑃 ∈ ℙ → 𝑃 ∈ ℝ+)
40393ad2ant1 1003 . . . . . . . . 9 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → 𝑃 ∈ ℝ+)
4140ad2antrr 480 . . . . . . . 8 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 𝑃 ∈ ℝ+)
4241rpgt0d 9613 . . . . . . 7 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → 0 < 𝑃)
43 modqaddmulmod 10300 . . . . . . 7 (((𝐼 ∈ ℚ ∧ 𝑁 ∈ ℚ ∧ 𝑗 ∈ ℤ) ∧ (𝑃 ∈ ℚ ∧ 0 < 𝑃)) → ((𝐼 + ((𝑁 mod 𝑃) · 𝑗)) mod 𝑃) = ((𝐼 + (𝑁 · 𝑗)) mod 𝑃))
4430, 33, 34, 38, 42, 43syl32anc 1228 . . . . . 6 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → ((𝐼 + ((𝑁 mod 𝑃) · 𝑗)) mod 𝑃) = ((𝐼 + (𝑁 · 𝑗)) mod 𝑃))
45 zcn 9178 . . . . . . . . . . . . . 14 (𝑁 ∈ ℤ → 𝑁 ∈ ℂ)
4645adantr 274 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑗 ∈ (0..^𝑃)) → 𝑁 ∈ ℂ)
4716adantl 275 . . . . . . . . . . . . 13 ((𝑁 ∈ ℤ ∧ 𝑗 ∈ (0..^𝑃)) → 𝑗 ∈ ℂ)
4846, 47mulcomd 7902 . . . . . . . . . . . 12 ((𝑁 ∈ ℤ ∧ 𝑗 ∈ (0..^𝑃)) → (𝑁 · 𝑗) = (𝑗 · 𝑁))
4948ex 114 . . . . . . . . . . 11 (𝑁 ∈ ℤ → (𝑗 ∈ (0..^𝑃) → (𝑁 · 𝑗) = (𝑗 · 𝑁)))
50493ad2ant2 1004 . . . . . . . . . 10 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → (𝑗 ∈ (0..^𝑃) → (𝑁 · 𝑗) = (𝑗 · 𝑁)))
5150adantr 274 . . . . . . . . 9 (((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) → (𝑗 ∈ (0..^𝑃) → (𝑁 · 𝑗) = (𝑗 · 𝑁)))
5251imp 123 . . . . . . . 8 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → (𝑁 · 𝑗) = (𝑗 · 𝑁))
5352oveq2d 5843 . . . . . . 7 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → (𝐼 + (𝑁 · 𝑗)) = (𝐼 + (𝑗 · 𝑁)))
5453oveq1d 5842 . . . . . 6 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → ((𝐼 + (𝑁 · 𝑗)) mod 𝑃) = ((𝐼 + (𝑗 · 𝑁)) mod 𝑃))
5526, 44, 543eqtrrd 2195 . . . . 5 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → ((𝐼 + (𝑗 · 𝑁)) mod 𝑃) = ((𝐼 + (𝑗 · (𝑁 mod 𝑃))) mod 𝑃))
5655eqeq1d 2166 . . . 4 ((((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) ∧ 𝑗 ∈ (0..^𝑃)) → (((𝐼 + (𝑗 · 𝑁)) mod 𝑃) = 0 ↔ ((𝐼 + (𝑗 · (𝑁 mod 𝑃))) mod 𝑃) = 0))
5756rexbidva 2454 . . 3 (((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) → (∃𝑗 ∈ (0..^𝑃)((𝐼 + (𝑗 · 𝑁)) mod 𝑃) = 0 ↔ ∃𝑗 ∈ (0..^𝑃)((𝐼 + (𝑗 · (𝑁 mod 𝑃))) mod 𝑃) = 0))
5814, 57mpbird 166 . 2 (((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) ∧ 𝐼 ∈ (0..^𝑃)) → ∃𝑗 ∈ (0..^𝑃)((𝐼 + (𝑗 · 𝑁)) mod 𝑃) = 0)
5958ex 114 1 ((𝑃 ∈ ℙ ∧ 𝑁 ∈ ℤ ∧ (𝑁 mod 𝑃) ≠ 0) → (𝐼 ∈ (0..^𝑃) → ∃𝑗 ∈ (0..^𝑃)((𝐼 + (𝑗 · 𝑁)) mod 𝑃) = 0))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  w3a 963   = wceq 1335  wcel 2128  wne 2327  wrex 2436   class class class wbr 3967  (class class class)co 5827  cc 7733  0cc0 7735  1c1 7736   + caddc 7738   · cmul 7740   < clt 7915  cn 8839  0cn0 9096  cz 9173  cq 9535  +crp 9567  ..^cfzo 10051   mod cmo 10231  cprime 12000
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-coll 4082  ax-sep 4085  ax-nul 4093  ax-pow 4138  ax-pr 4172  ax-un 4396  ax-setind 4499  ax-iinf 4550  ax-cnex 7826  ax-resscn 7827  ax-1cn 7828  ax-1re 7829  ax-icn 7830  ax-addcl 7831  ax-addrcl 7832  ax-mulcl 7833  ax-mulrcl 7834  ax-addcom 7835  ax-mulcom 7836  ax-addass 7837  ax-mulass 7838  ax-distr 7839  ax-i2m1 7840  ax-0lt1 7841  ax-1rid 7842  ax-0id 7843  ax-rnegex 7844  ax-precex 7845  ax-cnre 7846  ax-pre-ltirr 7847  ax-pre-ltwlin 7848  ax-pre-lttrn 7849  ax-pre-apti 7850  ax-pre-ltadd 7851  ax-pre-mulgt0 7852  ax-pre-mulext 7853  ax-arch 7854  ax-caucvg 7855
This theorem depends on definitions:  df-bi 116  df-stab 817  df-dc 821  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rmo 2443  df-rab 2444  df-v 2714  df-sbc 2938  df-csb 3032  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-nul 3396  df-if 3507  df-pw 3546  df-sn 3567  df-pr 3568  df-op 3570  df-uni 3775  df-int 3810  df-iun 3853  df-br 3968  df-opab 4029  df-mpt 4030  df-tr 4066  df-id 4256  df-po 4259  df-iso 4260  df-iord 4329  df-on 4331  df-ilim 4332  df-suc 4334  df-iom 4553  df-xp 4595  df-rel 4596  df-cnv 4597  df-co 4598  df-dm 4599  df-rn 4600  df-res 4601  df-ima 4602  df-iota 5138  df-fun 5175  df-fn 5176  df-f 5177  df-f1 5178  df-fo 5179  df-f1o 5180  df-fv 5181  df-isom 5182  df-riota 5783  df-ov 5830  df-oprab 5831  df-mpo 5832  df-1st 6091  df-2nd 6092  df-recs 6255  df-irdg 6320  df-frec 6341  df-1o 6366  df-2o 6367  df-oadd 6370  df-er 6483  df-en 6689  df-dom 6690  df-fin 6691  df-sup 6931  df-pnf 7917  df-mnf 7918  df-xr 7919  df-ltxr 7920  df-le 7921  df-sub 8053  df-neg 8054  df-reap 8455  df-ap 8462  df-div 8551  df-inn 8840  df-2 8898  df-3 8899  df-4 8900  df-n0 9097  df-z 9174  df-uz 9446  df-q 9536  df-rp 9568  df-fz 9920  df-fzo 10052  df-fl 10179  df-mod 10232  df-seqfrec 10355  df-exp 10429  df-ihash 10662  df-cj 10754  df-re 10755  df-im 10756  df-rsqrt 10910  df-abs 10911  df-clim 11188  df-proddc 11460  df-dvds 11696  df-gcd 11843  df-prm 12001  df-phi 12102
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator