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

Theorem marrepfval 21171
Description: First substitution for the definition of the matrix row replacement function. (Contributed by AV, 12-Feb-2019.) (Proof shortened by AV, 2-Mar-2024.)
Hypotheses
Ref Expression
marrepfval.a 𝐴 = (𝑁 Mat 𝑅)
marrepfval.b 𝐵 = (Base‘𝐴)
marrepfval.q 𝑄 = (𝑁 matRRep 𝑅)
marrepfval.z 0 = (0g𝑅)
Assertion
Ref Expression
marrepfval 𝑄 = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
Distinct variable groups:   𝐵,𝑚,𝑠   𝑖,𝑁,𝑗,𝑘,𝑙,𝑚,𝑠   𝑅,𝑖,𝑗,𝑘,𝑙,𝑚,𝑠
Allowed substitution hints:   𝐴(𝑖,𝑗,𝑘,𝑚,𝑠,𝑙)   𝐵(𝑖,𝑗,𝑘,𝑙)   𝑄(𝑖,𝑗,𝑘,𝑚,𝑠,𝑙)   0 (𝑖,𝑗,𝑘,𝑚,𝑠,𝑙)

Proof of Theorem marrepfval
Dummy variables 𝑛 𝑟 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 marrepfval.q . 2 𝑄 = (𝑁 matRRep 𝑅)
2 marrepfval.b . . . . . 6 𝐵 = (Base‘𝐴)
32fvexi 6686 . . . . 5 𝐵 ∈ V
4 fvexd 6687 . . . . 5 ((𝑁 ∈ V ∧ 𝑅 ∈ V) → (Base‘𝑅) ∈ V)
5 mpoexga 7777 . . . . 5 ((𝐵 ∈ V ∧ (Base‘𝑅) ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) ∈ V)
63, 4, 5sylancr 589 . . . 4 ((𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) ∈ V)
7 oveq12 7167 . . . . . . . 8 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑛 Mat 𝑟) = (𝑁 Mat 𝑅))
87fveq2d 6676 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘(𝑛 Mat 𝑟)) = (Base‘(𝑁 Mat 𝑅)))
9 marrepfval.a . . . . . . . . 9 𝐴 = (𝑁 Mat 𝑅)
109fveq2i 6675 . . . . . . . 8 (Base‘𝐴) = (Base‘(𝑁 Mat 𝑅))
112, 10eqtri 2846 . . . . . . 7 𝐵 = (Base‘(𝑁 Mat 𝑅))
128, 11syl6eqr 2876 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘(𝑛 Mat 𝑟)) = 𝐵)
13 fveq2 6672 . . . . . . 7 (𝑟 = 𝑅 → (Base‘𝑟) = (Base‘𝑅))
1413adantl 484 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘𝑟) = (Base‘𝑅))
15 simpl 485 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → 𝑛 = 𝑁)
16 fveq2 6672 . . . . . . . . . . . 12 (𝑟 = 𝑅 → (0g𝑟) = (0g𝑅))
17 marrepfval.z . . . . . . . . . . . 12 0 = (0g𝑅)
1816, 17syl6eqr 2876 . . . . . . . . . . 11 (𝑟 = 𝑅 → (0g𝑟) = 0 )
1918ifeq2d 4488 . . . . . . . . . 10 (𝑟 = 𝑅 → if(𝑗 = 𝑙, 𝑠, (0g𝑟)) = if(𝑗 = 𝑙, 𝑠, 0 ))
2019ifeq1d 4487 . . . . . . . . 9 (𝑟 = 𝑅 → if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)) = if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))
2120adantl 484 . . . . . . . 8 ((𝑛 = 𝑁𝑟 = 𝑅) → if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)) = if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))
2215, 15, 21mpoeq123dv 7231 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))) = (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))
2315, 15, 22mpoeq123dv 7231 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)))) = (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
2412, 14, 23mpoeq123dv 7231 . . . . 5 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑚 ∈ (Base‘(𝑛 Mat 𝑟)), 𝑠 ∈ (Base‘𝑟) ↦ (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))))) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
25 df-marrep 21169 . . . . 5 matRRep = (𝑛 ∈ V, 𝑟 ∈ V ↦ (𝑚 ∈ (Base‘(𝑛 Mat 𝑟)), 𝑠 ∈ (Base‘𝑟) ↦ (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))))))
2624, 25ovmpoga 7306 . . . 4 ((𝑁 ∈ V ∧ 𝑅 ∈ V ∧ (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) ∈ V) → (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
276, 26mpd3an3 1458 . . 3 ((𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
2825mpondm0 7388 . . . 4 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = ∅)
29 matbas0pc 21020 . . . . . . 7 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (Base‘(𝑁 Mat 𝑅)) = ∅)
3011, 29syl5eq 2870 . . . . . 6 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → 𝐵 = ∅)
3130orcd 869 . . . . 5 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝐵 = ∅ ∨ (Base‘𝑅) = ∅))
32 0mpo0 7239 . . . . 5 ((𝐵 = ∅ ∨ (Base‘𝑅) = ∅) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) = ∅)
3331, 32syl 17 . . . 4 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) = ∅)
3428, 33eqtr4d 2861 . . 3 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
3527, 34pm2.61i 184 . 2 (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
361, 35eqtri 2846 1 𝑄 = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wa 398  wo 843   = wceq 1537  wcel 2114  Vcvv 3496  c0 4293  ifcif 4469  cfv 6357  (class class class)co 7158  cmpo 7160  Basecbs 16485  0gc0g 16715   Mat cmat 21018   matRRep cmarrep 21167
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2161  ax-12 2177  ax-ext 2795  ax-rep 5192  ax-sep 5205  ax-nul 5212  ax-pow 5268  ax-pr 5332  ax-un 7463
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3an 1085  df-tru 1540  df-ex 1781  df-nf 1785  df-sb 2070  df-mo 2622  df-eu 2654  df-clab 2802  df-cleq 2816  df-clel 2895  df-nfc 2965  df-ne 3019  df-ral 3145  df-rex 3146  df-reu 3147  df-rab 3149  df-v 3498  df-sbc 3775  df-csb 3886  df-dif 3941  df-un 3943  df-in 3945  df-ss 3954  df-nul 4294  df-if 4470  df-pw 4543  df-sn 4570  df-pr 4572  df-op 4576  df-uni 4841  df-iun 4923  df-br 5069  df-opab 5131  df-mpt 5149  df-id 5462  df-xp 5563  df-rel 5564  df-cnv 5565  df-co 5566  df-dm 5567  df-rn 5568  df-res 5569  df-ima 5570  df-iota 6316  df-fun 6359  df-fn 6360  df-f 6361  df-f1 6362  df-fo 6363  df-f1o 6364  df-fv 6365  df-ov 7161  df-oprab 7162  df-mpo 7163  df-1st 7691  df-2nd 7692  df-slot 16489  df-base 16491  df-mat 21019  df-marrep 21169
This theorem is referenced by:  marrepval0  21172
  Copyright terms: Public domain W3C validator