MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  4sqlem13 Structured version   Visualization version   GIF version

Theorem 4sqlem13 17161
Description: Lemma for 4sq 17168. (Contributed by Mario Carneiro, 16-Jul-2014.) (Revised by AV, 14-Sep-2020.)
Hypotheses
Ref Expression
4sq.1 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
4sq.2 (𝜑 → 𝑁 ∈ ℕ)
4sq.3 (𝜑 → 𝑃 = ((2 · 𝑁) + 1))
4sq.4 (𝜑 → 𝑃 ∈ ℙ)
4sq.5 (𝜑 → (0...(2 · 𝑁)) ⊆ 𝑆)
4sq.6 𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}
4sq.7 𝑀 = inf(𝑇, ℝ, < )
Assertion
Ref Expression
4sqlem13 (𝜑 → (𝑇 ≠ ∅ ∧ 𝑀 < 𝑃))
Distinct variable groups:   𝑤,𝑛,𝑥,𝑦,𝑧   𝑖,𝑛,𝑀   𝑛,𝑁   𝑃,𝑖,𝑛   𝜑,𝑛   𝑆,𝑖,𝑛
Allowed substitution hints:   𝜑(𝑥, 𝑦, 𝑧, 𝑤, 𝑖)   𝑃(𝑥, 𝑦, 𝑧, 𝑤)   𝑆(𝑥, 𝑦, 𝑧, 𝑤)   𝑇(𝑥, 𝑦, 𝑧, 𝑤, 𝑖, 𝑛)   𝑀(𝑥, 𝑦, 𝑧, 𝑤)   𝑁(𝑥, 𝑦, 𝑧, 𝑤, 𝑖)

Proof of Theorem 4sqlem13
Dummy variables 𝑘 𝑣 𝑢 𝑚 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 4sq.1 . . 3 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
2 4sq.2 . . 3 (𝜑 → 𝑁 ∈ ℕ)
3 4sq.3 . . 3 (𝜑 → 𝑃 = ((2 · 𝑁) + 1))
4 4sq.4 . . 3 (𝜑 → 𝑃 ∈ ℙ)
5 eqid 2763 . . 3 {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)} = {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)}
6 eqid 2763 . . 3 (𝑣 ∈ {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)} ↦ ((𝑃 − 1) − 𝑣)) = (𝑣 ∈ {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)} ↦ ((𝑃 − 1) − 𝑣))
71, 2, 3, 4, 5, 64sqlem12 17160 . 2 (𝜑 → ∃𝑘 ∈ (1...(𝑃 − 1))∃𝑢 ∈ ℤ[i] (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃))
8 simplrl 789 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 ∈ (1...(𝑃 − 1)))
9 elfznn 13711 . . . . . . . 8 (𝑘 ∈ (1...(𝑃 − 1)) → 𝑘 ∈ ℕ)
108, 9syl 18 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 ∈ ℕ)
11 simpr 490 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃))
12 abs1 15490 . . . . . . . . . . . 12 (abs‘1) = 1
1312oveq1i 7450 . . . . . . . . . . 11 ((abs‘1)↑2) = (1↑2)
14 sq1 14362 . . . . . . . . . . 11 (1↑2) = 1
1513, 14eqtri 2786 . . . . . . . . . 10 ((abs‘1)↑2) = 1
1615oveq2i 7451 . . . . . . . . 9 (((abs‘𝑢)↑2) + ((abs‘1)↑2)) = (((abs‘𝑢)↑2) + 1)
17 simplrr 790 . . . . . . . . . 10 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑢 ∈ ℤ[i])
18 1z 12750 . . . . . . . . . . 11 1 ∈ ℤ
19 zgz 17137 . . . . . . . . . . 11 (1 ∈ ℤ → 1 ∈ ℤ[i])
2018, 19ax-mp 5 . . . . . . . . . 10 1 ∈ ℤ[i]
2114sqlem4a 17155 . . . . . . . . . 10 ((𝑢 ∈ ℤ[i] ∧ 1 ∈ ℤ[i]) → (((abs‘𝑢)↑2) + ((abs‘1)↑2)) ∈ 𝑆)
2217, 20, 21sylancl 598 . . . . . . . . 9 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (((abs‘𝑢)↑2) + ((abs‘1)↑2)) ∈ 𝑆)
2316, 22eqeltrrid 2869 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (((abs‘𝑢)↑2) + 1) ∈ 𝑆)
2411, 23eqeltrrd 2865 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (𝑘 · 𝑃) ∈ 𝑆)
25 oveq1 7447 . . . . . . . . 9 (𝑖 = 𝑘 → (𝑖 · 𝑃) = (𝑘 · 𝑃))
2625eleq1d 2849 . . . . . . . 8 (𝑖 = 𝑘 → ((𝑖 · 𝑃) ∈ 𝑆 ↔ (𝑘 · 𝑃) ∈ 𝑆))
27 4sq.6 . . . . . . . 8 𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}
2826, 27elrab2 3652 . . . . . . 7 (𝑘 ∈ 𝑇 ↔ (𝑘 ∈ ℕ ∧ (𝑘 · 𝑃) ∈ 𝑆))
2910, 24, 28sylanbrc 595 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 ∈ 𝑇)
3029ne0d 4291 . . . . 5 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑇 ≠ ∅)
3127ssrab3 4010 . . . . . . . 8 𝑇 ⊆ ℕ
32 4sq.7 . . . . . . . . 9 𝑀 = inf(𝑇, ℝ, < )
33 nnuz 13028 . . . . . . . . . . 11 ℕ = (ℤ≥‘1)
3431, 33sseqtri 3961 . . . . . . . . . 10 𝑇 ⊆ (ℤ≥‘1)
35 infssuzcl 13083 . . . . . . . . . 10 ((𝑇 ⊆ (ℤ≥‘1) ∧ 𝑇 ≠ ∅) → inf(𝑇, ℝ, < ) ∈ 𝑇)
3634, 30, 35sylancr 599 . . . . . . . . 9 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → inf(𝑇, ℝ, < ) ∈ 𝑇)
3732, 36eqeltrid 2868 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 ∈ 𝑇)
3831, 37sselid 3911 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 ∈ ℕ)
3938nnred 12374 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 ∈ ℝ)
4010nnred 12374 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 ∈ ℝ)
414ad2antrr 739 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑃 ∈ ℙ)
42 prmnn 16875 . . . . . . . 8 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
4341, 42syl 18 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑃 ∈ ℕ)
4443nnred 12374 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑃 ∈ ℝ)
45 infssuzle 13082 . . . . . . . 8 ((𝑇 ⊆ (ℤ≥‘1) ∧ 𝑘 ∈ 𝑇) → inf(𝑇, ℝ, < ) ≤ 𝑘)
4634, 29, 45sylancr 599 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → inf(𝑇, ℝ, < ) ≤ 𝑘)
4732, 46eqbrtrid 5143 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 ≤ 𝑘)
48 prmz 16876 . . . . . . . . . 10 (𝑃 ∈ ℙ → 𝑃 ∈ ℤ)
4941, 48syl 18 . . . . . . . . 9 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑃 ∈ ℤ)
50 elfzm11 13753 . . . . . . . . 9 ((1 ∈ ℤ ∧ 𝑃 ∈ ℤ) → (𝑘 ∈ (1...(𝑃 − 1)) ↔ (𝑘 ∈ ℤ ∧ 1 ≤ 𝑘 ∧ 𝑘 < 𝑃)))
5118, 49, 50sylancr 599 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (𝑘 ∈ (1...(𝑃 − 1)) ↔ (𝑘 ∈ ℤ ∧ 1 ≤ 𝑘 ∧ 𝑘 < 𝑃)))
528, 51mpbid 235 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (𝑘 ∈ ℤ ∧ 1 ≤ 𝑘 ∧ 𝑘 < 𝑃))
5352simp3d 1162 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 < 𝑃)
5439, 40, 44, 47, 53lelttrd 11492 . . . . 5 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 < 𝑃)
5530, 54jca 521 . . . 4 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (𝑇 ≠ ∅ ∧ 𝑀 < 𝑃))
5655ex 418 . . 3 ((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) → ((((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃) → (𝑇 ≠ ∅ ∧ 𝑀 < 𝑃)))
5756rexlimdvva 3223 . 2 (𝜑 → (∃𝑘 ∈ (1...(𝑃 − 1))∃𝑢 ∈ ℤ[i] (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃) → (𝑇 ≠ ∅ ∧ 𝑀 < 𝑃)))
587, 57mpd 16 1 (𝜑 → (𝑇 ≠ ∅ ∧ 𝑀 < 𝑃))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ↔ wb 209   ∧ wa 401   ∧ w3a 1103   = wceq 1570   ∈ wcel 2147  {cab 2741   ≠ wne 2959  ∃wrex 3090  {crab 3416   ⊆ wss 3900  ∅c0 4281   class class class wbr 5106   ↦ cmpt 5189  ‘cfv 6555  (class class class)co 7440  infcinf 9457  ℝcr 11223  0cc0 11224  1c1 11225   + caddc 11227   · cmul 11229   < clt 11367   ≤ cle 11368   − cmin 11565  ℕcn 12359  2c2 12421  ℤcz 12717  ℤ≥cuz 12989  ...cfz 13663   mod cmo 14033  ↑cexp 14228  abscabs 15427  ℙcprime 16872  ℤ[i]cgz 17133
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1945  ax-6 2002  ax-7 2043  ax-8 2149  ax-9 2157  ax-10 2180  ax-11 2197  ax-12 2216  ax-ext 2735  ax-rep 5235  ax-sep 5252  ax-nul 5263  ax-pow 5331  ax-pr 5395  ax-un 7772  ax-cnex 11280  ax-resscn 11281  ax-1cn 11282  ax-icn 11283  ax-addcl 11284  ax-addrcl 11285  ax-mulcl 11286  ax-mulrcl 11287  ax-mulcom 11288  ax-addass 11289  ax-mulass 11290  ax-distr 11291  ax-i2m1 11292  ax-1ne0 11293  ax-1rid 11294  ax-rnegex 11295  ax-rrecex 11296  ax-cnre 11297  ax-pre-lttri 11298  ax-pre-lttrn 11299  ax-pre-ltadd 11300  ax-pre-mulgt0 11301  ax-pre-sup 11302
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2102  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-ne 2960  df-nel 3066  df-ral 3081  df-rex 3091  df-rmo 3369  df-reu 3370  df-rab 3417  df-v 3456  df-sbc 3743  df-csb 3852  df-ss 3901  df-pss 4017  df-dif 4050  df-in 4094  df-un 4154  df-nul 4282  df-if 4486  df-pw 4562  df-sn 4589  df-pr 4591  df-op 4839  df-uni 4871  df-int 4911  df-iun 4956  df-br 5107  df-opab 5171  df-mpt 5190  df-tr 5216  df-id 5550  df-eprel 5555  df-po 5563  df-so 5564  df-fr 5608  df-we 5610  df-xp 5661  df-rel 5662  df-cnv 5663  df-co 5664  df-dm 5665  df-rn 5666  df-res 5667  df-ima 5668  df-pred 6319  df-ord 6380  df-on 6381  df-lim 6382  df-suc 6383  df-iota 6509  df-fun 6557  df-fn 6558  df-f 6559  df-f1 6560  df-fo 6561  df-f1o 6562  df-fv 6563  df-riota 7397  df-ov 7443  df-oprab 7444  df-mpo 7445  df-om 7899  df-1st 8022  df-2nd 8023  df-frecs 8324  df-wrecs 8355  df-recs 8404  df-rdg 8443  df-1o 8501  df-2o 8502  df-oadd 8505  df-er 8742  df-en 8999  df-dom 9000  df-sdom 9001  df-fin 9002  df-sup 9458  df-inf 9459  df-dju 10006  df-card 10044  df-pnf 11369  df-mnf 11370  df-xr 11371  df-ltxr 11372  df-le 11373  df-sub 11567  df-neg 11568  df-div 11998  df-nn 12360  df-2 12429  df-3 12430  df-4 12431  df-n0 12631  df-xnn0 12704  df-z 12718  df-uz 12990  df-rp 13145  df-fz 13664  df-fl 13956  df-mod 14034  df-seq 14169  df-exp 14229  df-hash 14499  df-cj 15292  df-re 15293  df-im 15294  df-sqrt 15428  df-abs 15429  df-dvds 16449  df-gcd 16691  df-prm 16873  df-gz 17134
This theorem is used by:  4sqlem14  17162  4sqlem17  17165  4sqlem18  17166
  Copyright terms: Public domain W3C validator