def contains_cells.go

minebender-game@1.0.0.0 · proof_cells.bend:210

import minebender-game@1.0.0.0/proof_cells.bend as ProofCells
import Base
import minebender-game@1.0.0.0/types.bend as T
import minebender-game@1.0.0.0/board.bend as B

210def contains_cells.go(+w: Nat, +a: Nat, +t: List<&2, Nat>, +x: Nat, +y: Nat,
211  xm: {memn(List.range(w), x) == True{} : Bool}, +b: Bool,
212  e: {Bool.or(b, memn(t, y)) == True{} : Bool}, be: {Nat.is_eq(a, y) == b : Bool},
213  ih: {memn(t, y) == True{} : Bool} -> {B.contains(B.cells.go(w, t), T.Pos{x, y}) == True{} : Bool}) ->
214  {B.contains(List.append(&2, T.Pos, B.row_cells(a, List.range(w)), B.cells.go(w, t)), T.Pos{x, y}) == True{} : Bool}:
215  +row = B.row_cells(a, List.range(w))
216  %Equal.sym(Bool, B.contains(List.append(&2, T.Pos, row, B.cells.go(w, t)), T.Pos{x, y}),
217    Bool.or(B.contains(row, T.Pos{x, y}), B.contains(B.cells.go(w, t), T.Pos{x, y})),
218    contains_append(row, B.cells.go(w, t), T.Pos{x, y})) : {_ == True{} : Bool}
219  contains_cells.k(w, a, t, x, y, xm, b, e, be, ih)

Uses (15)

Used by (1)