def safe_none

minebender-game@1.0.0.0 · proof_solver.bend:2743

import minebender-game@1.0.0.0/proof_solver.bend as ProofSolver
import Base
import minebender-game@1.0.0.0/types.bend as T
import minebender-game@1.0.0.0/board.bend as B
import minebender-game@1.0.0.0/LAWS.bend as L
import minebender-game@1.0.0.0/proof_copy.bend as PC
import minebender-game@1.0.0.0/proof_walk.bend as PW

2743def safe_none(+w: Nat, +h: Nat, +n: Nat, +rows: T.Grid(T.Seen), okf: {B.shaped(T.Seen, w, h, rows) == False{} : Bool},
2744  +c: T.Pos, +layout: T.Grid(Bool), cons: {L.consistent(T.Knowledge{w, h, n, rows}, layout) == True{} : Bool}) ->
2745  {L.mine(layout, c) == False{} : Bool}:
2746  PF_both(B.shaped(T.Seen, w, h, rows), okf,
2747    %Equal.sym(Bool, B.shaped(T.Seen, w, h, rows), L.shaped(T.Seen, w, h, rows), PC.shaped_eq(T.Seen, w, h, rows)) :
2748      {_ == True{} : Bool};
2749    PW.and4_b(L.shaped(Bool, w, h, layout), L.shaped(T.Seen, w, h, rows), Nat.is_eq(L.total_mines(layout), n),
2750      L.agrees_all(w, h, rows, layout, L.cells(w, h)), cons), {L.mine(layout, c) == False{} : Bool})

Uses (18)

Used by (1)