TensorVjpPROOF.frozen_skips: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/tensor_vjp_PROOF.bend as TensorVjpPROOF Lines 905-914 of bendtorch-core@0.1.0.0/src/autograd/tensor_vjp_PROOF.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_vjp_PROOF.bend&start_line=905&end_line=914 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/autograd/tensor_backward.bend as Backward # With a not b, Frozen{a, MatmulNT{a, b, ..}} runs the right product alone. def frozen_skips(+a: Nat, +b: Nat, +left: Shape.Shape, +right: Shape.Shape, -saved: Backward.Saved, -g: Core.Dynamic, apart: {Nat.is_eq(a, b) == False{} : Bool}) -> {Backward.vjp_matmul_nt_right(b, right, saved, g) == Backward.vjp(Backward.Frozen{a, Backward.MatmulNT{a, b, left, right}}, saved, g) : Backward.Pass}: %same_refl(a) : {Backward.vjp_matmul_nt_right(b, right, saved, g) == Backward.nt_frozen(a, a, b, left, right, saved, g, Bool.and(_, Bool.not(Nat.is_eq(a, b)))) : Backward.Pass} %Equal.sym(Bool, Nat.is_eq(a, b), False{}, apart) : {Backward.vjp_matmul_nt_right(b, right, saved, g) == Backward.nt_frozen(a, a, b, left, right, saved, g, Bool.and(True{}, Bool.not(_))) : Backward.Pass} {==} Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=Pass https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=Saved https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=nt_frozen https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=vjp https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=vjp_matmul_nt_right https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_vjp_PROOF.bend&name=same_refl https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Dynamic