def written_point

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

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/word_injective.bend as Injective

391def written_point(-shape: Shape.Shape, -tensor: Core.Tensor<shape>, +cursor: Nat, +index: U32, +value: F32,
392  converted: {U32.to_nat(index) == cursor : Nat}, checked: Core.ObservationChecked(Core.Packed{shape, tensor}, index),
393  observed: {Core.checked_observe(shape, tensor, index) == Some{value} : Maybe<&2, F32>}, +other: U32,
394  at: {U32.to_nat(other) == cursor : Nat}) ->
395  Core.ObservationChecked(Core.Packed{shape, tensor}, other) &
396    {Core.checked_observe(shape, tensor, other) == Some{value} : Maybe<&2, F32>}:
397  %Injective.u32_natural_injective(index, other)(Equal.trans(Nat, U32.to_nat(index), cursor, U32.to_nat(other), converted,
398    Equal.sym(Nat, U32.to_nat(other), cursor, at))) :
399    Core.ObservationChecked(Core.Packed{shape, tensor}, _) &
400      {Core.checked_observe(shape, tensor, _) == Some{value} : Maybe<&2, F32>}
401  (checked, observed)

Uses (15)

Used by (1)