def cell_keeps

bendtorch-core@0.1.0.0 · src/tensor/gather_PROOF.bend:265

import bendtorch-core@0.1.0.0/src/tensor/gather_PROOF.bend as GatherPROOF
import Base
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
import bendtorch-core@0.1.0.0/src/storage/refinement.bend as Refinement
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
import bendtorch-core@0.1.0.0/src/tensor/parallel_proofs.bend as Generic

265def cell_keeps(+plan: Gather.Plan, +at: Nat, +da: Nat, -A: Array<F32>, +di: Nat, -I: Array<U32>, inside: Bool,
266  -valid: Model.Balanced(F32, da, A), -index_valid: Model.Balanced(U32, di, I)) ->
267  Generic.Fact<{Pair.snd(F32, Array<F32> & Array<U32>, Gather.cell(plan, at, (A, I), inside)) == (A, I) : Array<F32> & Array<U32>}>:
268  match inside:
269    case False{}:
270      Generic.Fact{{==}}
271    case True{}:
272      Generic.Fact{{\{Generic.Fact: q => q} :
273        Generic.Fact<{Pair.snd(F32, Array<F32> & Array<U32>, Gather.looked(plan, at, A, Array.get(U32, I, U32.from_nat(Gather.entry(plan, at))))) == (A, I) : Array<F32> & Array<U32>}> ->
274        {Pair.snd(F32, Array<F32> & Array<U32>, Gather.looked(plan, at, A, Array.get(U32, I, U32.from_nat(Gather.entry(plan, at))))) == (A, I) : Array<F32> & Array<U32>}}(
275        looked_keeps(plan, at, da, A, I, Array.get(U32, I, U32.from_nat(Gather.entry(plan, at))),
276          Refinement.law_get_retains(U32, di, I, U32.from_nat(Gather.entry(plan, at)), index_valid), valid))}

Uses (18)

Used by (1)