def nsm_flood.cells
minebender-game@1.0.0.0 · proof_inv.bend:377
import minebender-game@1.0.0.0/proof_inv.bend as ProofInv
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/game.bend as G
import minebender-game@1.0.0.0/LAWS.bend as L
import minebender-game@1.0.0.0/proof_cells.bend as PS
import minebender-game@1.0.0.0/proof_flood.bend as PF
377def nsm_flood.cells(+n: Nat, +work: List<&2, G.Work>, +hd: Bool, +w: Nat, +h: Nat, +layout: T.Grid(Bool),
378 +shown: T.Grid(Bool), +p0: T.Pos, +safe: {L.mine(layout, p0) == False{} : Bool},
379 +ok: {PF.works_ok(work, w, h, layout, p0) == True{} : Bool},
380 +ns: {nsm(w, h, layout, shown) == True{} : Bool}, ps: List<&2, T.Pos>,
381 +ons: {PS.allp(~PS.WH, ~PS.onb, PS.WH{w, h}, ps) == True{} : Bool}) ->
382 {PS.allp(~LS, ~nsm_f, LS{layout, G.flood(n, work, hd, w, h, layout, shown)}, ps) == True{} : Bool}:
383 match ps:
384 case Nil{}:
385 {==}
386 case +q <> +t:
387 +F = G.flood(n, work, hd, w, h, layout, shown)
388 %Equal.sym(Bool, nsm_f(LS{layout, F}, q), True{},
389 nsm_flood.cell(n, work, hd, w, h, layout, shown, p0, safe, ok, ns, q,
390 PS.allp_head(~PS.WH, ~PS.onb, PS.WH{w, h}, q, t, ons),
391 Bool.and(B.at(Bool, False{}, F, q), B.mine(layout, q)), {==})) :
392 {Bool.and(_, PS.allp(~LS, ~nsm_f, LS{layout, F}, t)) == True{} : Bool}
393 nsm_flood.cells(n, work, hd, w, h, layout, shown, p0, safe, ok, ns, t,
394 PS.allp_tail(~PS.WH, ~PS.onb, PS.WH{w, h}, q, t, ons))