File size: 5,133 Bytes
7f5fab8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import OAI.AlgebraicGeometry.CharacterVarieties.Frames.FramedFlags

namespace OAI

noncomputable section
namespace IntegralCharacterVarieties.SurfacePresentation.Diagram
open scoped Classical Matrix
open OccurrenceIncidence VertexTable MatrixExpression NamedBandGrades HomTransport

/-- Frame values depend only on the ports and ranks, hence are unchanged by the
choice of boundary enumeration. -/
lemma frameValues_canonical {F S V K : Type} {arity : S → ℕ}
    [CommRing K] [Finite S] (D : Diagram F S V arity)
    (frames : D.PortFrames (R:=K)) (s : S) (b : Bool) :
    D.frameValues frames s b =
      (SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).frameValues frames s b := rfl

/-- A frame generator evaluates in the canonical boundary presentation using the
same port frame. -/
lemma valuesFromPorts_frame_canonical {F S V K : Type} {arity : S → ℕ}
    [CommRing K] [Finite S] (D : Diagram F S V arity)
    (frames : D.PortFrames (R:=K)) (side : D.SideValues (R:=K))
    (handle : D.HandleValues (R:=K)) (s : S) (b : Bool) :
    D.valuesFromPorts frames side handle (.frame s b) =
      (SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).frameValues frames s b := rfl

/-- Evaluating and reindexing a frame does not depend on the boundary enumeration. -/
lemma valuesFromPorts_frameCoordinates_canonical {F S V K α β : Type} {arity : S → ℕ}
    [CommRing K] [Finite S] [Fintype α] [Fintype β] (D : Diagram F S V arity)
    (frames : D.PortFrames (R:=K)) (side : D.SideValues (R:=K))
    (handle : D.HandleValues (R:=K)) (s : S) (b : Bool)
    (e : α ≃ Fin (D.seamDim s)) (f : β ≃ Fin (D.seamDim s)) :
    ((MatrixIso.unit (D.valuesFromPorts frames side handle (.frame s b))).reindex e f).linearEquiv =
      ((MatrixIso.unit ((SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).frameValues
        frames s b)).reindex e f).linearEquiv := rfl

/-- The evaluated parent coordinates use only the port and rank data. -/
lemma valuesFromPorts_parentCoordinates_canonical {F S V K R α : Type} {arity : S → ℕ}
    [CommRing K] [CommRing R] [Finite S] [Fintype α] (D : Diagram F S V arity)
    (frames : D.PortFrames (R:=K)) (side : D.SideValues (R:=K))
    (handle : D.HandleValues (R:=K)) (s : S) (φ : R →+* K)
    (e : α ≃ Fin (D.seamDim s)) :
    ((MatrixIso.unit ((D.parentWord s).eval φ (D.valuesFromPorts frames side handle))).reindex e e).linearEquiv =
      ((MatrixIso.unit (((SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).parentWord s).eval φ
        ((SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).valuesFromPorts
          frames side handle))).reindex e e).linearEquiv := by
  unfold parentWord
  erw [Term.eval_cast_unit φ (D.valuesFromPorts frames side handle) (D.seamRank s),    Term.eval_cast_unit φ      ((SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).valuesFromPorts frames side handle)      (D.seamRank s)]
  rfl

/-- The evaluated inverse child coordinates use only the port and rank data. -/
lemma valuesFromPorts_childCoordinates_canonical {F S V K R α : Type} {arity : S → ℕ}
    [CommRing K] [CommRing R] [Finite S] [Fintype α] (D : Diagram F S V arity)
    (frames : D.PortFrames (R:=K)) (side : D.SideValues (R:=K))
    (handle : D.HandleValues (R:=K)) (s : S) (φ : R →+* K)
    (e : α ≃ Fin (D.seamDim s)) :
    ((MatrixIso.unit ((Term.block (D.childDim s) (fun j => Term.inv (D.childWord s j))).eval φ
      (D.valuesFromPorts frames side handle))).reindex e e).linearEquiv =
      ((MatrixIso.unit ((Term.block
        ((SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).childDim s)
        (fun j => Term.inv ((SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).childWord s j))).eval φ
        ((SurfacePresentation.fromPorts D.ports D.rank D.genus D.seamRank).valuesFromPorts
          frames side handle))).reindex e e).linearEquiv := rfl

/-- Child coordinates for values induced by ports and side transports. -/
lemma valuesFromPorts_childWord_coordinates
    {F S V R K : Type} {arity : S → ℕ} [CommRing R] [Field K]
    (D : Diagram F S V arity) (s : S) (φ : R →+* K)
    (frames : D.PortFrames (R:=K)) (side : D.SideValues (R:=K))
    (handle : D.HandleValues (R:=K)) {m : ℕ} (d : Fin m → ℕ)
    (c : Fin m ≃ Fin (arity s)) (hc : ∀ i,d i=D.childDim s (c i))
    (old : (i : Fin m) → (Matrix (Fin (d i)) (Fin (d i)) K)ˣ)
    (ho : ∀ i,rebaseUnit (hc i).symm (side ⟨s,some (c i)⟩)=old i)
    (e : ((i : Fin m) × Fin (d i)) ≃ Fin (D.seamDim s))
    (he : e=(Equiv.sigmaCongr c (fun i=>finCongr (hc i))).trans
      (blockIndex (D.childDim s)).symm) :
    ((MatrixIso.unit ((Term.block (D.childDim s)
      (fun j => Term.inv (D.childWord s j))).eval φ
        (D.valuesFromPorts frames side handle))).reindex e e).linearEquiv=
      (MatrixIso.block (fun i=>MatrixIso.unit (old i)⁻¹)).linearEquiv := by
  exact D.childWord_coordinates s φ (D.valuesFromPorts frames side handle)
    d c hc old ho e he

end IntegralCharacterVarieties.SurfacePresentation.Diagram
end

end OAI