def solve_safe.k
minebender-game@1.0.0.0 · proof_solver.bend:2770
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/solver.bend as S
import minebender-game@1.0.0.0/LAWS.bend as L
2770def solve_safe.k(+w: Nat, +h: Nat, +n: Nat, +rows: T.Grid(T.Seen), +c: T.Pos,
2771 +okt: {B.shaped(T.Seen, w, h, rows) == True{} : Bool},
2772 ls: LoopSome(S.hidden_cells(rows, B.cells(w, h)), S.plan(w, h, S.todos(S.items(w, h, rows, B.cells(w, h)), S.hidden_cells(rows, B.cells(w, h)))),
2773 S.start(rows), S.Ctx{w, h, n, rows, S.items(w, h, rows, B.cells(w, h))}, c)) ->
2774 L.ProvablySafe(T.Knowledge{w, h, n, rows}, c):
2775 match ls:
2776 case (m, sn):
2777 hc = hc_sound(rows, B.cells(w, h), c, m)
2778 safe_hidden.k(w, h, n, rows, c, hc, onc => +layout => cons => safe_fn(w, h, n, rows, okt, c, onc, sn, layout, cons, B.mine(layout, c), {==}))