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

Theorem marrepfval 20185
Description: First substitution for the definition of the matrix row replacement function. (Contributed by AV, 12-Feb-2019.)
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‘𝐴)
3 fvex 6113 . . . . . 6 (Base‘𝐴) ∈ V
42, 3eqeltri 2684 . . . . 5 𝐵 ∈ V
5 fvex 6113 . . . . . 6 (Base‘𝑅) ∈ V
65a1i 11 . . . . 5 ((𝑁 ∈ V ∧ 𝑅 ∈ V) → (Base‘𝑅) ∈ V)
7 mpt2exga 7135 . . . . 5 ((𝐵 ∈ V ∧ (Base‘𝑅) ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) ∈ V)
84, 6, 7sylancr 694 . . . 4 ((𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) ∈ V)
9 oveq12 6558 . . . . . . . 8 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑛 Mat 𝑟) = (𝑁 Mat 𝑅))
109fveq2d 6107 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘(𝑛 Mat 𝑟)) = (Base‘(𝑁 Mat 𝑅)))
11 marrepfval.a . . . . . . . . 9 𝐴 = (𝑁 Mat 𝑅)
1211fveq2i 6106 . . . . . . . 8 (Base‘𝐴) = (Base‘(𝑁 Mat 𝑅))
132, 12eqtri 2632 . . . . . . 7 𝐵 = (Base‘(𝑁 Mat 𝑅))
1410, 13syl6eqr 2662 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘(𝑛 Mat 𝑟)) = 𝐵)
15 fveq2 6103 . . . . . . 7 (𝑟 = 𝑅 → (Base‘𝑟) = (Base‘𝑅))
1615adantl 481 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (Base‘𝑟) = (Base‘𝑅))
17 simpl 472 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → 𝑛 = 𝑁)
18 fveq2 6103 . . . . . . . . . . . 12 (𝑟 = 𝑅 → (0g𝑟) = (0g𝑅))
19 marrepfval.z . . . . . . . . . . . 12 0 = (0g𝑅)
2018, 19syl6eqr 2662 . . . . . . . . . . 11 (𝑟 = 𝑅 → (0g𝑟) = 0 )
2120ifeq2d 4055 . . . . . . . . . 10 (𝑟 = 𝑅 → if(𝑗 = 𝑙, 𝑠, (0g𝑟)) = if(𝑗 = 𝑙, 𝑠, 0 ))
2221ifeq1d 4054 . . . . . . . . 9 (𝑟 = 𝑅 → if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)) = if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))
2322adantl 481 . . . . . . . 8 ((𝑛 = 𝑁𝑟 = 𝑅) → if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)) = if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))
2417, 17, 23mpt2eq123dv 6615 . . . . . . 7 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))) = (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))
2517, 17, 24mpt2eq123dv 6615 . . . . . 6 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗)))) = (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
2614, 16, 25mpt2eq123dv 6615 . . . . 5 ((𝑛 = 𝑁𝑟 = 𝑅) → (𝑚 ∈ (Base‘(𝑛 Mat 𝑟)), 𝑠 ∈ (Base‘𝑟) ↦ (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))))) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
27 df-marrep 20183 . . . . 5 matRRep = (𝑛 ∈ V, 𝑟 ∈ V ↦ (𝑚 ∈ (Base‘(𝑛 Mat 𝑟)), 𝑠 ∈ (Base‘𝑟) ↦ (𝑘𝑛, 𝑙𝑛 ↦ (𝑖𝑛, 𝑗𝑛 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, (0g𝑟)), (𝑖𝑚𝑗))))))
2826, 27ovmpt2ga 6688 . . . 4 ((𝑁 ∈ V ∧ 𝑅 ∈ V ∧ (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) ∈ V) → (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
298, 28mpd3an3 1417 . . 3 ((𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
3027mpt2ndm0 6773 . . . . 5 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = ∅)
31 mpt20 6623 . . . . 5 (𝑚 ∈ ∅, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) = ∅
3230, 31syl6eqr 2662 . . . 4 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = (𝑚 ∈ ∅, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
33 matbas0pc 20034 . . . . . 6 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (Base‘(𝑁 Mat 𝑅)) = ∅)
3413, 33syl5eq 2656 . . . . 5 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → 𝐵 = ∅)
35 eqidd 2611 . . . . 5 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (Base‘𝑅) = (Base‘𝑅))
36 mpt2eq12 6613 . . . . 5 ((𝐵 = ∅ ∧ (Base‘𝑅) = (Base‘𝑅)) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) = (𝑚 ∈ ∅, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
3734, 35, 36syl2anc 691 . . . 4 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))) = (𝑚 ∈ ∅, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
3832, 37eqtr4d 2647 . . 3 (¬ (𝑁 ∈ V ∧ 𝑅 ∈ V) → (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗))))))
3929, 38pm2.61i 175 . 2 (𝑁 matRRep 𝑅) = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
401, 39eqtri 2632 1 𝑄 = (𝑚𝐵, 𝑠 ∈ (Base‘𝑅) ↦ (𝑘𝑁, 𝑙𝑁 ↦ (𝑖𝑁, 𝑗𝑁 ↦ if(𝑖 = 𝑘, if(𝑗 = 𝑙, 𝑠, 0 ), (𝑖𝑚𝑗)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wa 383   = wceq 1475  wcel 1977  Vcvv 3173  c0 3874  ifcif 4036  cfv 5804  (class class class)co 6549  cmpt2 6551  Basecbs 15695  0gc0g 15923   Mat cmat 20032   matRRep cmarrep 20181
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-8 1979  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-rep 4699  ax-sep 4709  ax-nul 4717  ax-pow 4769  ax-pr 4833  ax-un 6847
This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-mo 2463  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ne 2782  df-ral 2901  df-rex 2902  df-reu 2903  df-rab 2905  df-v 3175  df-sbc 3403  df-csb 3500  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-nul 3875  df-if 4037  df-pw 4110  df-sn 4126  df-pr 4128  df-op 4132  df-uni 4373  df-iun 4457  df-br 4584  df-opab 4644  df-mpt 4645  df-id 4953  df-xp 5044  df-rel 5045  df-cnv 5046  df-co 5047  df-dm 5048  df-rn 5049  df-res 5050  df-ima 5051  df-iota 5768  df-fun 5806  df-fn 5807  df-f 5808  df-f1 5809  df-fo 5810  df-f1o 5811  df-fv 5812  df-ov 6552  df-oprab 6553  df-mpt2 6554  df-1st 7059  df-2nd 7060  df-slot 15699  df-base 15700  df-mat 20033  df-marrep 20183
This theorem is referenced by:  marrepval0  20186
  Copyright terms: Public domain W3C validator