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

Theorem 4sqlem13 17181
Description: Lemma for 4sq 17188. (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 2766 . . 3 {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)} = {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)}
6 eqid 2766 . . 3 (𝑣 ∈ {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)} ↦ ((𝑃 − 1) − 𝑣)) = (𝑣 ∈ {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)} ↦ ((𝑃 − 1) − 𝑣))
71, 2, 3, 4, 5, 64sqlem12 17180 . 2 (𝜑 → ∃𝑘 ∈ (1...(𝑃 − 1))∃𝑢 ∈ ℤ[i] (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃))
8 simplrl 789 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 ∈ (1...(𝑃 − 1)))
9 elfznn 13726 . . . . . . . 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 15506 . . . . . . . . . . . 12 (abs‘1) = 1
1312oveq1i 7460 . . . . . . . . . . 11 ((abs‘1)↑2) = (1↑2)
14 sq1 14377 . . . . . . . . . . 11 (1↑2) = 1
1513, 14eqtri 2789 . . . . . . . . . 10 ((abs‘1)↑2) = 1
1615oveq2i 7461 . . . . . . . . 9 (((abs‘𝑢)↑2) + ((abs‘1)↑2)) = (((abs‘𝑢)↑2) + 1)
17 simplrr 790 . . . . . . . . . 10 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑢 ∈ ℤ[i])
18 1z 12765 . . . . . . . . . . 11 1 ∈ ℤ
19 zgz 17157 . . . . . . . . . . 11 (1 ∈ ℤ → 1 ∈ ℤ[i])
2018, 19ax-mp 5 . . . . . . . . . 10 1 ∈ ℤ[i]
2114sqlem4a 17175 . . . . . . . . . 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 2872 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (((abs‘𝑢)↑2) + 1) ∈ 𝑆)
2411, 23eqeltrrd 2868 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → (𝑘 · 𝑃) ∈ 𝑆)
25 oveq1 7457 . . . . . . . . 9 (𝑖 = 𝑘 → (𝑖 · 𝑃) = (𝑘 · 𝑃))
2625eleq1d 2852 . . . . . . . 8 (𝑖 = 𝑘 → ((𝑖 · 𝑃) ∈ 𝑆 ↔ (𝑘 · 𝑃) ∈ 𝑆))
27 4sq.6 . . . . . . . 8 𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}
2826, 27elrab2 3651 . . . . . . 7 (𝑘 ∈ 𝑇 ↔ (𝑘 ∈ ℕ ∧ (𝑘 · 𝑃) ∈ 𝑆))
2910, 24, 28sylanbrc 595 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 ∈ 𝑇)
3029ne0d 4290 . . . . 5 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑇 ≠ ∅)
3127ssrab3 4009 . . . . . . . 8 𝑇 ⊆ ℕ
32 4sq.7 . . . . . . . . 9 𝑀 = inf(𝑇, ℝ, < )
33 nnuz 13043 . . . . . . . . . . 11 ℕ = (ℤ≥‘1)
3431, 33sseqtri 3960 . . . . . . . . . 10 𝑇 ⊆ (ℤ≥‘1)
35 infssuzcl 13098 . . . . . . . . . 10 ((𝑇 ⊆ (ℤ≥‘1) ∧ 𝑇 ≠ ∅) → inf(𝑇, ℝ, < ) ∈ 𝑇)
3634, 30, 35sylancr 599 . . . . . . . . 9 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → inf(𝑇, ℝ, < ) ∈ 𝑇)
3732, 36eqeltrid 2871 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 ∈ 𝑇)
3831, 37sselid 3910 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 ∈ ℕ)
3938nnred 12389 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 ∈ ℝ)
4010nnred 12389 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 ∈ ℝ)
414ad2antrr 739 . . . . . . . 8 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑃 ∈ ℙ)
42 prmnn 16892 . . . . . . . 8 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
4341, 42syl 18 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑃 ∈ ℕ)
4443nnred 12389 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑃 ∈ ℝ)
45 infssuzle 13097 . . . . . . . 8 ((𝑇 ⊆ (ℤ≥‘1) ∧ 𝑘 ∈ 𝑇) → inf(𝑇, ℝ, < ) ≤ 𝑘)
4634, 29, 45sylancr 599 . . . . . . 7 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → inf(𝑇, ℝ, < ) ≤ 𝑘)
4732, 46eqbrtrid 5145 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑀 ≤ 𝑘)
48 prmz 16893 . . . . . . . . . 10 (𝑃 ∈ ℙ → 𝑃 ∈ ℤ)
4941, 48syl 18 . . . . . . . . 9 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑃 ∈ ℤ)
50 elfzm11 13768 . . . . . . . . 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 1163 . . . . . 6 (((𝜑 ∧ (𝑘 ∈ (1...(𝑃 − 1)) ∧ 𝑢 ∈ ℤ[i])) ∧ (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃)) → 𝑘 < 𝑃)
5439, 40, 44, 47, 53lelttrd 11506 . . . . 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 1104   = wceq 1572   ∈ wcel 2150  {cab 2744   ≠ wne 2962  ∃wrex 3093  {crab 3415   ⊆ wss 3899  ∅c0 4280   class class class wbr 5107   ↦ cmpt 5191  ‘cfv 6565  (class class class)co 7450  infcinf 9469  ℝcr 11237  0cc0 11238  1c1 11239   + caddc 11241   · cmul 11243   < clt 11381   ≤ cle 11382   − cmin 11579  ℕcn 12374  2c2 12436  ℤcz 12732  ℤ≥cuz 13004  ...cfz 13678   mod cmo 14048  ↑cexp 14243  abscabs 15443  ℙcprime 16889  ℤ[i]cgz 17153
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1830  ax-4 1844  ax-5 1947  ax-6 2004  ax-7 2045  ax-8 2152  ax-9 2160  ax-10 2183  ax-11 2200  ax-12 2219  ax-ext 2738  ax-rep 5237  ax-sep 5254  ax-nul 5265  ax-pow 5333  ax-pr 5397  ax-un 7782  ax-cnex 11294  ax-resscn 11295  ax-1cn 11296  ax-icn 11297  ax-addcl 11298  ax-addrcl 11299  ax-mulcl 11300  ax-mulrcl 11301  ax-mulcom 11302  ax-addass 11303  ax-mulass 11304  ax-distr 11305  ax-i2m1 11306  ax-1ne0 11307  ax-1rid 11308  ax-rnegex 11309  ax-rrecex 11310  ax-cnre 11311  ax-pre-lttri 11312  ax-pre-lttrn 11313  ax-pre-ltadd 11314  ax-pre-mulgt0 11315  ax-pre-sup 11316
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1105  df-3an 1106  df-tru 1575  df-fal 1585  df-ex 1815  df-nf 1819  df-sb 2104  df-mo 2570  df-eu 2600  df-clab 2745  df-cleq 2758  df-clel 2842  df-nfc 2916  df-ne 2963  df-nel 3069  df-ral 3084  df-rex 3094  df-rmo 3368  df-reu 3369  df-rab 3416  df-v 3455  df-sbc 3742  df-csb 3851  df-ss 3900  df-pss 4016  df-dif 4049  df-in 4093  df-un 4153  df-nul 4281  df-if 4485  df-pw 4561  df-sn 4588  df-pr 4590  df-op 4840  df-uni 4872  df-int 4912  df-iun 4957  df-br 5108  df-opab 5173  df-mpt 5192  df-tr 5218  df-id 5552  df-eprel 5557  df-po 5565  df-so 5566  df-fr 5610  df-we 5612  df-xp 5663  df-rel 5664  df-cnv 5665  df-co 5666  df-dm 5667  df-rn 5668  df-res 5669  df-ima 5670  df-pred 6329  df-ord 6390  df-on 6391  df-lim 6392  df-suc 6393  df-iota 6519  df-fun 6567  df-fn 6568  df-f 6569  df-f1 6570  df-fo 6571  df-f1o 6572  df-fv 6573  df-riota 7407  df-ov 7453  df-oprab 7454  df-mpo 7455  df-om 7911  df-1st 8034  df-2nd 8035  df-frecs 8336  df-wrecs 8367  df-recs 8416  df-rdg 8455  df-1o 8513  df-2o 8514  df-oadd 8517  df-er 8754  df-en 9011  df-dom 9012  df-sdom 9013  df-fin 9014  df-sup 9470  df-inf 9471  df-dju 10018  df-card 10056  df-pnf 11383  df-mnf 11384  df-xr 11385  df-ltxr 11386  df-le 11387  df-sub 11581  df-neg 11582  df-div 12013  df-nn 12375  df-2 12444  df-3 12445  df-4 12446  df-n0 12646  df-xnn0 12719  df-z 12733  df-uz 13005  df-rp 13160  df-fz 13679  df-fl 13971  df-mod 14049  df-seq 14184  df-exp 14244  df-hash 14515  df-cj 15308  df-re 15309  df-im 15310  df-sqrt 15444  df-abs 15445  df-dvds 16465  df-gcd 16707  df-prm 16890  df-gz 17154
This theorem is used by:  4sqlem14  17182  4sqlem17  17185  4sqlem18  17186
  Copyright terms: Public domain W3C validator