def comp_set.cell
minebender-game@1.0.0.0 · proof_solver.bend:811
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/proof_grid.bend as PG
import minebender-game@1.0.0.0/proof_lists.bend as PL
811def comp_set.cell(+w: Nat, +h: Nat, +c: T.Pos, +part: T.Grid(Maybe<&2, Bool>), +layout: T.Grid(Bool), +bv: Bool,
812 +shP: {B.shaped(Maybe<&2, Bool>, w, h, part) == True{} : Bool}, mc: {B.mine(layout, c) == bv : Bool},
813 +q: T.Pos, on: {B.on_board(w, h, q) == True{} : Bool},
814 h0: {cmp_f(CE{part, layout}, q) == True{} : Bool}, +b: Bool, +be: {B.same(c, q) == b : Bool}) ->
815 {cmp_f(CE{B.set_at(Maybe<&2, Bool>, part, c, Some{bv}), layout}, q) == True{} : Bool}:
816 match b:
817 case True{}:
818 %Equal.sym(T.Pos, c, q, PG.same_sound(c, q, be)) :
819 {cmp_cell(S.look(B.set_at(Maybe<&2, Bool>, part, _, Some{bv}), q), B.mine(layout, q)) == True{} : Bool}
820 %Equal.sym(Maybe<&2, Bool>, S.look(B.set_at(Maybe<&2, Bool>, part, q, Some{bv}), q), Some{bv},
821 set_look(w, h, part, q, Some{bv}, shP, on)) :
822 {cmp_cell(_, B.mine(layout, q)) == True{} : Bool}
823 %PG.same_sound(c, q, be) : {beq(B.mine(layout, _), bv) == True{} : Bool}
824 %Equal.sym(Bool, B.mine(layout, c), bv, mc) : {beq(_, bv) == True{} : Bool}
825 beq_refl(bv)
826 case False{}:
827 %Equal.sym(Maybe<&2, Bool>, S.look(B.set_at(Maybe<&2, Bool>, part, c, Some{bv}), q), S.look(part, q),
828 PL.at_set_ne(Maybe<&2, Bool>, part, c, q, Some{bv}, None{}, be)) :
829 {cmp_cell(_, B.mine(layout, q)) == True{} : Bool}
830 h0