opeltre / topos

Statistics and Topology
MIT License
8 stars 0 forks source link

Cartesian structure on domains and sheaves #14

Open opeltre opened 2 years ago

opeltre commented 2 years ago

Transfer the cartesian structure already present on Set to domains and sheaves:

A, B  = {i: A[i]}, {j: B[j]}
A * B = {i.j: A[i] * B[j]}          # cartesian product of shapes

That way the tensor product will be simply defined on fields as:

(u | v)[i.j] = u[i] * v[j]     # if scalar values
               u[i] | v[j]     # if tensor values (implement a torch.otimes)
opeltre commented 2 years ago

Note that graded domains, sheaves etc. correspond to + of domains (coproduct = disjoint union)

K = Sum([K[i] for i in K])
# N.B: degree == position in the sum
#      n-generalisation of Left a | Right b

Furthermore a cartesian * of maps naturally acts on the union:

d = Prod([d[i] for di in d])      # GradedLinear(...)

While K.lift(name) looks for a common method on subdomains to lift their product on the union. (extends solution of #7)

opeltre commented 2 years ago

Now a graded domain has keys of type 1-Simplex (for convenience) e.g.

A, B  = {i: A[i]}, {j: B[j]}
A + B = {(0, i): A[i]} | {(1, j): B[j]} 
opeltre commented 2 years ago

We can also implement quotient / partitioning as a map:

Sheaf -> Sum(Sheaf)

Grades could be key values returned by the partitioning function (instead of 0..n)

Useful for boundary conditions #10