law row_in

minebender-game@1.0.0.0 · proof_lists.bend:186

import minebender-game@1.0.0.0/proof_lists.bend as ProofLists
import Base
import minebender-game@1.0.0.0/types.bend as T
import minebender-game@1.0.0.0/board.bend as B

186# In a w-by-h grid, the row at y < h is its row and has w cells.
187law row_in:
188  for -A: Data
189  for +w: Nat
190  for +h: Nat
191  for +g: T.Grid(A)
192  for +y: Nat
193  for +sh: {B.shaped(A, w, h, g) == True{} : Bool}
194  for yh: {Nat.is_lt(y, h) == True{} : Bool}
195  {List.get(&2, List<&2, A>, g, y) == Some{row_of(A, g, y)} : Maybe<&2, List<&2, A>>} &
196  {List.length(&2, A, row_of(A, g, y)) == w : Nat}

Uses (17)

Used by (1)