ReduceParallelProof.halves_equal: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/reduce_parallel_proof.bend as ReduceParallelProof Lines 700-712 of bendtorch-core@0.1.0.0/src/autograd/reduce_parallel_proof.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/reduce_parallel_proof.bend&start_line=700&end_line=712 import Base import bendtorch-core@0.1.0.0/src/storage/model.bend as Model import bendtorch-core@0.1.0.0/src/tensor/elementwise_parallel_proof.bend as Parallel import bendtorch-core@0.1.0.0/src/autograd/reduce.bend as Reduce # A split hands each half the contribution array. def halves_equal(+d: Nat, -A: Array, pair: Array & Array, -exact: {pair == Array.clone(F32, A) : Array & Array}, -valid: Model.Balanced(F32, d, A)) -> Parallel.Fact<({Pair.fst(Array & Unit, Array & Unit, Reduce.halves(pair)) == (A, Unit{}) : Array & Unit} & {Pair.snd(Array & Unit, Array & Unit, Reduce.halves(pair)) == (A, Unit{}) : Array & Unit})>: (first, second) = pair Parallel.Fact{( Equal.cong(Array, Array & Unit, a => (a, Unit{}), first, A, {\{Parallel.Fact: p => p} : Parallel.Fact<({Pair.fst(Array, Array, (first, second)) == A : Array})> -> {Pair.fst(Array, Array, (first, second)) == A : Array}}(Parallel.clone_first(d, A, A, (first, second), exact, {==}, valid))), Equal.cong(Array, Array & Unit, a => (a, Unit{}), second, A, {\{Parallel.Fact: p => p} : Parallel.Fact<({Pair.snd(Array, Array, (first, second)) == A : Array})> -> {Pair.snd(Array, Array, (first, second)) == A : Array}}(Parallel.clone_second(d, A, A, (first, second), exact, {==}, valid))))} Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.clone https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair.fst https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair.snd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/reduce.bend&name=halves https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/model.bend&name=Balanced https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise_parallel_proof.bend&name=Fact https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise_parallel_proof.bend&name=clone_first https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise_parallel_proof.bend&name=clone_second