ProofFlood.flood_zero.take: def of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/proof_flood.bend as ProofFlood Lines 419-458 of minebender-game@1.0.0.0/proof_flood.bend: https://jend.leeeet.dev/read.txt?path=minebender-game@1.0.0.0/proof_flood.bend&start_line=419&end_line=458 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/proof_base.bend as P import minebender-game@1.0.0.0/proof_grid.bend as PG import minebender-game@1.0.0.0/proof_lists.bend as PL import minebender-game@1.0.0.0/proof_cells.bend as PS def flood_zero.take(+k: Nat, +c: T.Pos, +back: List<&2, T.Pos>, +rest: List<&2, G.Work>, +w: Nat, +h: Nat, +layout: T.Grid(Bool), +shown: T.Grid(Bool), +q: T.Pos, +r: T.Pos, +sh: {B.shaped(Bool, w, h, shown) == True{} : Bool}, +cnt: {1n+k == B.count_false(shown) : Nat}, +he: {G.unrevealed(w, h, shown, c) == True{} : Bool}, before: {B.at(Bool, False{}, shown, q) == False{} : Bool}, z: {B.zero(w, h, layout, q) == True{} : Bool}, +rm: {B.contains(B.neighbours(w, h, q), r) == True{} : Bool}, +b: Bool, +be: {B.same(c, q) == b : Bool}, ih: {B.at(Bool, False{}, B.set_at(Bool, shown, c, True{}), q) == False{} : Bool} -> {B.at(Bool, False{}, G.flood(k, G.push(B.zero(w, h, layout, c), B.neighbours(w, h, c), back, rest), G.head_hidden(w, h, B.set_at(Bool, shown, c, True{}), G.push(B.zero(w, h, layout, c), B.neighbours(w, h, c), back, rest)), w, h, layout, B.set_at(Bool, shown, c, True{})), r) == True{} : Bool}) -> {B.at(Bool, False{}, G.flood(k, G.push(B.zero(w, h, layout, c), B.neighbours(w, h, c), back, rest), G.head_hidden(w, h, B.set_at(Bool, shown, c, True{}), G.push(B.zero(w, h, layout, c), B.neighbours(w, h, c), back, rest)), w, h, layout, B.set_at(Bool, shown, c, True{})), r) == True{} : Bool}: match b: case True{}: %Equal.sym(T.Pos, c, q, PG.same_sound(c, q, be)) : {B.at(Bool, False{}, G.flood(k, G.push(B.zero(w, h, layout, _), B.neighbours(w, h, _), back, rest), G.head_hidden(w, h, B.set_at(Bool, shown, _, True{}), G.push(B.zero(w, h, layout, _), B.neighbours(w, h, _), back, rest)), w, h, layout, B.set_at(Bool, shown, _, True{})), r) == True{} : Bool} %Equal.sym(Bool, B.zero(w, h, layout, q), True{}, z) : {B.at(Bool, False{}, G.flood(k, G.push(_, B.neighbours(w, h, q), back, rest), G.head_hidden(w, h, B.set_at(Bool, shown, q, True{}), G.push(_, B.neighbours(w, h, q), back, rest)), w, h, layout, B.set_at(Bool, shown, q, True{})), r) == True{} : Bool} +s2 = B.set_at(Bool, shown, q, True{}) +wk = List.append(&2, G.Work, G.works(B.neighbours(w, h, q), back), rest) +hq = {%PG.same_sound(c, q, be) : {G.unrevealed(w, h, shown, _) == True{} : Bool}; he : {G.unrevealed(w, h, shown, q) == True{} : Bool}} +ron = P.and_true_r(B.adjacent(q, r), B.on_board(w, h, r), PS.allp_member(~PS.WHS, ~PS.adj_on, PS.WHS{w, h, q}, B.neighbours(w, h, q), r, PS.neighbours_all(w, h, q), rm)) flood_work(k, wk, G.head_hidden(w, h, s2, wk), w, h, layout, s2, PL.shaped_set(Bool, w, h, shown, q, True{}, sh), count_after(w, h, shown, q, k, sh, hq, cnt), {==}, r, ron, wcontains_append_l(G.works(B.neighbours(w, h, q), back), rest, r, wcontains_works(B.neighbours(w, h, q), back, r, rm))) case False{}: ih(%Equal.sym(Bool, B.at(Bool, False{}, B.set_at(Bool, shown, c, True{}), q), B.at(Bool, False{}, shown, q), PL.at_set_ne(Bool, shown, c, q, True{}, False{}, be)) : {_ == False{} : Bool}; before) Uses (35): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append 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/board.bend&name=adjacent 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=contains https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=count_false https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=neighbours 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/board.bend&name=same https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=set_at https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=shaped https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=zero https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=Work https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=flood https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=head_hidden https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=push https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=unrevealed https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=works https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_base.bend&name=and_true_r https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_cells.bend&name=WHS https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_cells.bend&name=adj_on https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_cells.bend&name=allp_member https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_cells.bend&name=neighbours_all https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_flood.bend&name=count_after https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_flood.bend&name=flood_work https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_flood.bend&name=wcontains_append_l https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_flood.bend&name=wcontains_works https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_grid.bend&name=same_sound https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_lists.bend&name=at_set_ne https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_lists.bend&name=shaped_set 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