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

Theorem marrepfval 21163
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 6679 . . . . 5 𝐵 ∈ V
4 fvexd 6680 . . . . 5 ((𝑁 ∈ V ∧ 𝑅 ∈ V) → (Base‘𝑅) ∈ V)
5 mpoexga 7769 . . . . 5 ((𝐵 ∈ V ∧ (Base‘𝑅) ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) ∈ V)
63, 4, 5sylancr 589 . . . 4 ((𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) ∈ V)
7 oveq12 7159 . . . . . . . 8 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑛 Mat 𝑟) = (𝑁 Mat 𝑅))
87fveq2d 6669 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘(𝑛 Mat 𝑟)) = (Base‘(𝑁 Mat 𝑅)))
9 marrepfval.a . . . . . . . . 9 𝐴 = (𝑁 Mat 𝑅)
109fveq2i 6668 . . . . . . . 8 (Base‘𝐴) = (Base‘(𝑁 Mat 𝑅))
112, 10eqtri 2844 . . . . . . 7 𝐵 = (Base‘(𝑁 Mat 𝑅))
128, 11syl6eqr 2874 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘(𝑛 Mat 𝑟)) = 𝐵)
13 fveq2 6665 . . . . . . 7 (𝑟 = 𝑅 → (Base‘𝑟) = (Base‘𝑅))
1413adantl 484 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘𝑟) = (Base‘𝑅))
15 simpl 485 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → 𝑛 = 𝑁)
16 fveq2 6665 . . . . . . . . . . . 12 (𝑟 = 𝑅 → (0g𝑟) = (0g𝑅))
17 marrepfval.z . . . . . . . . . . . 12 0 = (0g𝑅)
1816, 17syl6eqr 2874 . . . . . . . . . . 11 (𝑟 = 𝑅 → (0g𝑟) = 0 )
1918ifeq2d 4486 . . . . . . . . . 10 (𝑟 = 𝑅 → if(𝑗 = 𝑙, 𝑠, (0g𝑟)) = if(𝑗 = 𝑙, 𝑠, 0 ))
2019ifeq1d 4485 . . . . . . . . 9 (𝑟 = 𝑅 → if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)) = if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))
2120adantl 484 . . . . . . . 8 ((𝑛 = 𝑁𝑟 = 𝑅) → if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)) = if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))
2215, 15, 21mpoeq123dv 7223 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))) = (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))
2315, 15, 22mpoeq123dv 7223 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)))) = (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
2412, 14, 23mpoeq123dv 7223 . . . . 5 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑚 ∈ (Base‘(𝑛 Mat 𝑟)), 𝑠 ∈ (Base‘𝑟) ↦ (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))))) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
25 df-marrep 21161 . . . . 5 matRRep = (𝑛 ∈ V, 𝑟 ∈ V ↦ (𝑚 ∈ (Base‘(𝑛 Mat 𝑟)), 𝑠 ∈ (Base‘𝑟) ↦ (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))))))
2624, 25ovmpoga 7298 . . . 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 7380 . . . 4 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = ∅)
29 matbas0pc 21012 . . . . . . 7 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (Base‘(𝑁 Mat 𝑅)) = ∅)
3011, 29syl5eq 2868 . . . . . 6 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → 𝐵 = ∅)
3130orcd 869 . . . . 5 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝐵 = ∅ ∨ (Base‘𝑅) = ∅))
32 0mpo0 7231 . . . . 5 ((𝐵 = ∅ ∨ (Base‘𝑅) = ∅) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) = ∅)
3331, 32syl 17 . . . 4 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) = ∅)
3428, 33eqtr4d 2859 . . 3 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
3527, 34pm2.61i 184 . 2 (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
361, 35eqtri 2844 1 𝑄 = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wa 398  wo 843   = wceq 1533  wcel 2110  Vcvv 3495  c0 4291  ifcif 4467  cfv 6350  (class class class)co 7150  cmpo 7152  Basecbs 16477  0gc0g 16707   Mat cmat 21010   matRRep cmarrep 21159
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1792  ax-4 1806  ax-5 1907  ax-6 1966  ax-7 2011  ax-8 2112  ax-9 2120  ax-10 2141  ax-11 2156  ax-12 2172  ax-ext 2793  ax-rep 5183  ax-sep 5196  ax-nul 5203  ax-pow 5259  ax-pr 5322  ax-un 7455
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3an 1085  df-tru 1536  df-ex 1777  df-nf 1781  df-sb 2066  df-mo 2618  df-eu 2650  df-clab 2800  df-cleq 2814  df-clel 2893  df-nfc 2963  df-ne 3017  df-ral 3143  df-rex 3144  df-reu 3145  df-rab 3147  df-v 3497  df-sbc 3773  df-csb 3884  df-dif 3939  df-un 3941  df-in 3943  df-ss 3952  df-nul 4292  df-if 4468  df-pw 4541  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4833  df-iun 4914  df-br 5060  df-opab 5122  df-mpt 5140  df-id 5455  df-xp 5556  df-rel 5557  df-cnv 5558  df-co 5559  df-dm 5560  df-rn 5561  df-res 5562  df-ima 5563  df-iota 6309  df-fun 6352  df-fn 6353  df-f 6354  df-f1 6355  df-fo 6356  df-f1o 6357  df-fv 6358  df-ov 7153  df-oprab 7154  df-mpo 7155  df-1st 7683  df-2nd 7684  df-slot 16481  df-base 16483  df-mat 21011  df-marrep 21161
This theorem is referenced by:  marrepval0  21164
  Copyright terms: Public domain W3C validator