def element_point

bendtorch-core@0.1.0.0 · src/tensor/construction_PROOF.bend:312

import bendtorch-core@0.1.0.0/src/tensor/construction_PROOF.bend as ConstructionPROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/construction_LAWS.bend as Laws

312def element_point(-shape: Shape.Shape, +values: List<&2, F32>, -tensor: Core.Tensor<shape>, +index: U32,
313  -checked: Core.ObservationChecked(Core.Packed{shape, tensor}, index),
314  -observed: {Core.checked_observe(shape, tensor, index) == Laws.list_element(values, U32.to_nat(index)) : Maybe<&2, F32>}) ->
315  ElementPoint<shape, values, tensor, index>:
316  ElementPoint{(checked, (observed,
317    {\{Core.ObservationModel: same =>
318      Equal.trans(Maybe<&2, F32>, Core.observe(shape, tensor, index), Core.checked_observe(shape, tensor, index), Laws.list_element(values, U32.to_nat(index)),
319        Equal.sym(Maybe<&2, F32>, Core.checked_observe(shape, tensor, index), Core.observe(shape, tensor, index), same), observed)
320    } : Core.ObservationModel<shape, tensor, index, checked> ->
321      {Core.observe(shape, tensor, index) == Laws.list_element(values, U32.to_nat(index)) : Maybe<&2, F32>}}(Core.observation_model(shape, tensor, index, checked))))}

Uses (18)

Used by (1)