ProofGrid.know_hidden.go: def of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/proof_grid.bend as ProofGrid Lines 133-154 of minebender-game@1.0.0.0/proof_grid.bend: https://jend.leeeet.dev/read.txt?path=minebender-game@1.0.0.0/proof_grid.bend&start_line=133&end_line=154 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 def know_hidden.go(+w: Nat, +h: Nat, +layout: T.Grid(Bool), +shown: T.Grid(Bool), +x: Nat, +y: Nat, +b: Bool, +e: {B.on_board(w, h, T.Pos{x, y}) == b : Bool}) -> {Bool.and(B.on_board(w, h, T.Pos{x, y}), L.is_hidden(L.at(T.Seen, T.Hidden{}, G.know_rows(w, h, layout, shown, List.range(h)), T.Pos{x, y}))) == Bool.and(B.on_board(w, h, T.Pos{x, y}), Bool.not(B.at(Bool, False{}, shown, T.Pos{x, y}))) : Bool}: match b: case False{}: %Equal.sym(Bool, B.on_board(w, h, T.Pos{x, y}), False{}, e) : {Bool.and(_, L.is_hidden(L.at(T.Seen, T.Hidden{}, G.know_rows(w, h, layout, shown, List.range(h)), T.Pos{x, y}))) == Bool.and(_, Bool.not(B.at(Bool, False{}, shown, T.Pos{x, y}))) : Bool} {==} case True{}: +rows = G.know_rows(w, h, layout, shown, List.range(h)) +p = {T.Pos{x, y} : T.Pos} %Equal.sym(Bool, B.on_board(w, h, p), True{}, e) : {Bool.and(_, L.is_hidden(L.at(T.Seen, T.Hidden{}, rows, p))) == Bool.and(_, Bool.not(B.at(Bool, False{}, shown, p))) : Bool} %Equal.sym(T.Seen, L.at(T.Seen, T.Hidden{}, rows, p), G.seen_at(w, h, layout, shown, p), know_at(w, h, layout, shown, x, y, e)) : {L.is_hidden(_) == Bool.not(B.at(Bool, False{}, shown, p)) : Bool} hidden_pick(B.at(Bool, False{}, shown, p), B.mine(layout, p), w, h, layout, p) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.range https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/LAWS.bend&name=at https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/LAWS.bend&name=is_hidden https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=at https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=mine https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=on_board https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=know_rows https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=seen_at https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_grid.bend&name=hidden_pick https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_grid.bend&name=know_at https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Grid https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Pos https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Seen