File size: 1,385 Bytes
cdec422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import Mathlib
import OAI.LinearAlgebra.MatrixFields.Construction.InitialState

namespace OAI

namespace MatrixAllFields

open scoped BigOperators Topology Polynomial

noncomputable section

namespace MatrixMultiplication.AllFieldFiniteFamily

open MatrixMultiplication.Foundation

variable {F : Type*} [Field F]

private theorem matrixCoefficients_decidable (A B C : Type)
    (dA eA : DecidableEq A) (dB eB : DecidableEq B) (dC eC : DecidableEq C) :
    @Tensor.matrixCoefficients F _ A B C dA dB dC =
      @Tensor.matrixCoefficients F _ A B C eA eB eC := by
  have hA : dA = eA := Subsingleton.elim _ _
  have hB : dB = eB := Subsingleton.elim _ _
  have hC : dC = eC := Subsingleton.elim _ _
  cases hA
  cases hB
  cases hC
  rfl

namespace LocalMap

def redecideMatrix {X Y Z A B C : Type}
    [Fintype X] [Fintype Y] [Fintype Z]
    {source : Tensor F X Y Z}
    {dA : DecidableEq A} {dB : DecidableEq B} {dC : DecidableEq C}
    (map : LocalMap source (@Tensor.matrixCoefficients F _ A B C dA dB dC))
    (eA : DecidableEq A) (eB : DecidableEq B) (eC : DecidableEq C) :
    LocalMap source (@Tensor.matrixCoefficients F _ A B C eA eB eC) where
  x := map.x
  y := map.y
  z := map.z
  coefficient := map.coefficient.trans
    (matrixCoefficients_decidable A B C dA eA dB eB dC eC)

end LocalMap
end MatrixMultiplication.AllFieldFiniteFamily

end

end MatrixAllFields

end OAI