def length_snoc
bendtorch-core@0.1.0.0 · src/autograd/reduce_replayed_proof.bend:899
import bendtorch-core@0.1.0.0/src/autograd/reduce_replayed_proof.bend as ReduceReplayedProof
import Base
899
900
901def length_snoc(+values: List<&2, F32>, +word: F32) ->
902 {List.length(&2, F32, List.append(&2, F32, values, [word])) == 1n+List.length(&2, F32, values) : Nat}:
903 match values:
904 case Nil{}:
905 {==}
906 case +value <> +rest:
907 Equal.cong(Nat, Nat, n => 1n+n, List.length(&2, F32, List.append(&2, F32, rest, [word])), 1n+List.length(&2, F32, rest),
908 length_snoc(rest, word))