Mathbox for metakunt < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  metakunt34 Structured version   Visualization version   GIF version

Theorem metakunt34 39450
 Description: 𝐷 is a permutation. (Contributed by metakunt, 18-Jul-2024.)
Hypotheses
Ref Expression
metakunt34.1 (𝜑𝑀 ∈ ℕ)
metakunt34.2 (𝜑𝐼 ∈ ℕ)
metakunt34.3 (𝜑𝐼𝑀)
metakunt34.4 𝐷 = (𝑤 ∈ (1...𝑀) ↦ if(𝑤 = 𝐼, 𝑤, if(𝑤 < 𝐼, ((𝑤 + (𝑀𝐼)) + if(𝐼 ≤ (𝑤 + (𝑀𝐼)), 1, 0)), ((𝑤𝐼) + if(𝐼 ≤ (𝑤𝐼), 1, 0)))))
Assertion
Ref Expression
metakunt34 (𝜑𝐷:(1...𝑀)–1-1-onto→(1...𝑀))
Distinct variable groups:   𝑤,𝐼   𝑤,𝑀   𝜑,𝑤
Allowed substitution hint:   𝐷(𝑤)

Proof of Theorem metakunt34
Dummy variables 𝑥 𝑧 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 metakunt34.1 . . . . . . 7 (𝜑𝑀 ∈ ℕ)
2 metakunt34.2 . . . . . . 7 (𝜑𝐼 ∈ ℕ)
3 metakunt34.3 . . . . . . 7 (𝜑𝐼𝑀)
4 eqid 2798 . . . . . . 7 (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))) = (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1))))
5 eqid 2798 . . . . . . 7 (𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))) = (𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1))))
61, 2, 3, 4, 5metakunt14 39430 . . . . . 6 (𝜑 → ((𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))):(1...𝑀)–1-1-onto→(1...𝑀) ∧ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))) = (𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1))))))
76simpld 498 . . . . 5 (𝜑 → (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))):(1...𝑀)–1-1-onto→(1...𝑀))
8 f1ocnv 6608 . . . . 5 ((𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))):(1...𝑀)–1-1-onto→(1...𝑀) → (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))):(1...𝑀)–1-1-onto→(1...𝑀))
97, 8syl 17 . . . 4 (𝜑(𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))):(1...𝑀)–1-1-onto→(1...𝑀))
106simprd 499 . . . . 5 (𝜑(𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))) = (𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))))
11 eqidd 2799 . . . . 5 (𝜑 → (1...𝑀) = (1...𝑀))
1210, 11, 11f1oeq123d 6590 . . . 4 (𝜑 → ((𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))):(1...𝑀)–1-1-onto→(1...𝑀) ↔ (𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))):(1...𝑀)–1-1-onto→(1...𝑀)))
139, 12mpbid 235 . . 3 (𝜑 → (𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))):(1...𝑀)–1-1-onto→(1...𝑀))
14 eqid 2798 . . . . 5 (𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))) = (𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼)))))
151, 2, 3, 14metakunt25 39441 . . . 4 (𝜑 → (𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))):(1...𝑀)–1-1-onto→(1...𝑀))
16 f1oco 6618 . . . 4 (((𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))):(1...𝑀)–1-1-onto→(1...𝑀) ∧ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))):(1...𝑀)–1-1-onto→(1...𝑀)) → ((𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))) ∘ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1))))):(1...𝑀)–1-1-onto→(1...𝑀))
1715, 7, 16syl2anc 587 . . 3 (𝜑 → ((𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))) ∘ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1))))):(1...𝑀)–1-1-onto→(1...𝑀))
18 f1oco 6618 . . 3 (((𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))):(1...𝑀)–1-1-onto→(1...𝑀) ∧ ((𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))) ∘ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1))))):(1...𝑀)–1-1-onto→(1...𝑀)) → ((𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))) ∘ ((𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))) ∘ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))))):(1...𝑀)–1-1-onto→(1...𝑀))
1913, 17, 18syl2anc 587 . 2 (𝜑 → ((𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))) ∘ ((𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))) ∘ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))))):(1...𝑀)–1-1-onto→(1...𝑀))
20 metakunt34.4 . . . 4 𝐷 = (𝑤 ∈ (1...𝑀) ↦ if(𝑤 = 𝐼, 𝑤, if(𝑤 < 𝐼, ((𝑤 + (𝑀𝐼)) + if(𝐼 ≤ (𝑤 + (𝑀𝐼)), 1, 0)), ((𝑤𝐼) + if(𝐼 ≤ (𝑤𝐼), 1, 0)))))
211, 2, 3, 4, 14, 5, 20metakunt33 39449 . . 3 (𝜑 → ((𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))) ∘ ((𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))) ∘ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))))) = 𝐷)
2221, 11, 11f1oeq123d 6590 . 2 (𝜑 → (((𝑧 ∈ (1...𝑀) ↦ if(𝑧 = 𝑀, 𝐼, if(𝑧 < 𝐼, 𝑧, (𝑧 + 1)))) ∘ ((𝑦 ∈ (1...𝑀) ↦ if(𝑦 = 𝑀, 𝑀, if(𝑦 < 𝐼, (𝑦 + (𝑀𝐼)), (𝑦 + (1 − 𝐼))))) ∘ (𝑥 ∈ (1...𝑀) ↦ if(𝑥 = 𝐼, 𝑀, if(𝑥 < 𝐼, 𝑥, (𝑥 − 1)))))):(1...𝑀)–1-1-onto→(1...𝑀) ↔ 𝐷:(1...𝑀)–1-1-onto→(1...𝑀)))
2319, 22mpbid 235 1 (𝜑𝐷:(1...𝑀)–1-1-onto→(1...𝑀))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   = wceq 1538   ∈ wcel 2111  ifcif 4427   class class class wbr 5033   ↦ cmpt 5113  ◡ccnv 5521   ∘ ccom 5526  –1-1-onto→wf1o 6328  (class class class)co 7142  0cc0 10541  1c1 10542   + caddc 10544   < clt 10679   ≤ cle 10680   − cmin 10874  ℕcn 11640  ...cfz 12902 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-sep 5170  ax-nul 5177  ax-pow 5234  ax-pr 5298  ax-un 7451  ax-cnex 10597  ax-resscn 10598  ax-1cn 10599  ax-icn 10600  ax-addcl 10601  ax-addrcl 10602  ax-mulcl 10603  ax-mulrcl 10604  ax-mulcom 10605  ax-addass 10606  ax-mulass 10607  ax-distr 10608  ax-i2m1 10609  ax-1ne0 10610  ax-1rid 10611  ax-rnegex 10612  ax-rrecex 10613  ax-cnre 10614  ax-pre-lttri 10615  ax-pre-lttrn 10616  ax-pre-ltadd 10617  ax-pre-mulgt0 10618 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ne 2988  df-nel 3092  df-ral 3111  df-rex 3112  df-reu 3113  df-rab 3115  df-v 3443  df-sbc 3722  df-csb 3830  df-dif 3885  df-un 3887  df-in 3889  df-ss 3899  df-pss 3901  df-nul 4246  df-if 4428  df-pw 4501  df-sn 4528  df-pr 4530  df-tp 4532  df-op 4534  df-uni 4804  df-iun 4886  df-br 5034  df-opab 5096  df-mpt 5114  df-tr 5140  df-id 5428  df-eprel 5433  df-po 5441  df-so 5442  df-fr 5481  df-we 5483  df-xp 5528  df-rel 5529  df-cnv 5530  df-co 5531  df-dm 5532  df-rn 5533  df-res 5534  df-ima 5535  df-pred 6121  df-ord 6167  df-on 6168  df-lim 6169  df-suc 6170  df-iota 6288  df-fun 6331  df-fn 6332  df-f 6333  df-f1 6334  df-fo 6335  df-f1o 6336  df-fv 6337  df-riota 7100  df-ov 7145  df-oprab 7146  df-mpo 7147  df-om 7571  df-1st 7681  df-2nd 7682  df-wrecs 7945  df-recs 8006  df-rdg 8044  df-er 8287  df-en 8508  df-dom 8509  df-sdom 8510  df-pnf 10681  df-mnf 10682  df-xr 10683  df-ltxr 10684  df-le 10685  df-sub 10876  df-neg 10877  df-nn 11641  df-n0 11901  df-z 11987  df-uz 12249  df-rp 12395  df-fz 12903  df-fzo 13046 This theorem is referenced by: (None)
 Copyright terms: Public domain W3C validator