def exact_explode

minebender-game@1.0.0.0 · proof_laws.bend:803

import minebender-game@1.0.0.0/proof_laws.bend as ProofLaws
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/proof_copy.bend as PC
import minebender-game@1.0.0.0/proof_lists.bend as PL
import minebender-game@1.0.0.0/proof_flood.bend as PF

803def exact_explode(+w: Nat, +h: Nat, +layout: T.Grid(Bool), +s: T.Grid(Bool), +p: T.Pos, +q: T.Pos,
804  hidq: {B.at(Bool, False{}, s, q) == False{} : Bool},
805  after: {B.at(Bool, False{}, B.set_at(Bool, s, p, True{}), q) == True{} : Bool},
806  +b: Bool, be: {B.same(p, q) == b : Bool}) -> PF.Walk(w, h, layout, p, q):
807  match b:
808    case True{}:
809      (Nil{}, %PC.same_eq(p, q) : {_ == True{} : Bool}; be)
810    case False{}:
811      PF.both_absurd(PF.Walk(w, h, layout, p, q), B.at(Bool, False{}, s, q), hidq,
812        %PL.at_set_ne(Bool, s, p, q, True{}, False{}, be) : {_ == True{} : Bool}; after)

Uses (13)

Used by (1)