NLAlib.Ops.Routine.Implements.of_shaped
Library · theorem
A routine implements an operation contract when the seven facts of NLAlib.Ops.Routine.Implements about admitted operands hold together at every admitted operands of the shape of the contract. The tactic implements applies this with the dimensions and the operands named, where all but the separation hold by computation.
NLAlib.Ops.Routine.Implements.of_shaped {Op Tst K : Type} {R : Ops.Routine Op Tst}
{B : Ops.BlockRel K} {adm : List ℕ → List (ℕ × ℕ) → List (ℕ × ℕ) → Prop}
{port : List (ℕ × ℕ) → List (ℕ × ℕ) → List (ℕ × ℕ)} (hnd : B.nd = R.nd)
(hdraws : ∀ (d : List ℕ), R.draws d = some (B.win d))
(h :
∀ (d : List ℕ) (ins outs : List (ℕ × ℕ)),
B.Shaped adm d ins outs →
(ins.length = R.nin ∧ outs.length = R.nout) ∧
(port ins outs).length = R.arity ∧
(∀ z ∈ port ins outs, z ∈ ins ++ outs) ∧
R.SeparatedAt d (port ins outs) ∧
R.env (R.operands d (port ins outs)) = ins ++ outs ∧
(R.readArgs (R.operands d (port ins outs)) = ins ∧ R.readLens d = B.inLens d) ∧
R.writeArgs (R.operands d (port ins outs)) = outs ∧ R.writeLens d = B.outLens d)
(hrep : R.allReported = true := by rfl) (hcontig : R.contiguous = true := by rfl) :
R.Implements B adm portImport NLAlib.Ops.RoutineLink.