def split_left
bendtorch-core@0.1.0.0 · src/shape/index_proofs.bend:12
import bendtorch-core@0.1.0.0/src/shape/index_proofs.bend as IndexProofs
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
12def split_left(+a: Nat, +b: Nat, +index: Shape.Fin(a)) -> {Shape.Fin.split(a, b, Shape.Fin.left(a, b, index)) == Inl{index} : Either<Shape.Fin(a), Shape.Fin(b)>}:
13 match a:
14 case 0n:
15 match index:
16 case 1n+p:
17 match index:
18 case Shape.FZero{}:
19 {==}
20 case Shape.FNext{+previous}:
21 %split_left(p, b, previous) : {Shape.Fin.split.step(p, b, Shape.Fin.split(p, b, Shape.Fin.left(p, b, previous))) == Shape.Fin.split.step(p, b, _) : Either<Shape.Fin(1n+p), Shape.Fin(b)>}
22 {==}