intro i j hi hj
nfa : NFA
pos : String.Pos
next : SparseSet nfa.nodes.size
currentSave : Array (Option String.Pos)
matched : Option (Array (Option String.Pos))
saveSlots : Data.Vec (Array (Option String.Pos)) nfa.nodes.size
target : Fin nfa.nodes.size
stack : Array (StackEntry nfa.nodes.size)
matched' : Option (Array (Option String.Pos))
next' : SparseSet nfa.nodes.size
saveSlots' : Data.Vec (Array (Option String.Pos)) nfa.nodes.size
inv : LowerInvExploreεClosure nfa next target stack
h✝¹ : target ∉ next
offset✝ target' : ℕ
hn : nfa[↑target] = Node.save offset✝ target'
isLt : (Node.save offset✝ target').inBounds nfa.nodes.size
h✝ : ¬offset✝ < currentSave.size
h :
  exploreεClosure nfa pos (next.insert target) currentSave matched saveSlots ⟨target', ⋯⟩ stack =
    (matched', next', saveSlots')
⊢ LowerInvExploreεClosure nfa (next.insert target) ⟨target', isLt⟩ stack
nfa : NFA
pos : String.Pos
next : SparseSet nfa.nodes.size
currentSave : Array (Option String.Pos)
matched : Option (Array (Option String.Pos))
saveSlots : Data.Vec (Array (Option String.Pos)) nfa.nodes.size
target : Fin nfa.nodes.size
stack : Array (StackEntry nfa.nodes.size)
matched' : Option (Array (Option String.Pos))
next' : SparseSet nfa.nodes.size
saveSlots' : Data.Vec (Array (Option String.Pos)) nfa.nodes.size
inv : LowerInvExploreεClosure nfa next target stack
h✝¹ : target ∉ next
offset✝ target' : ℕ
hn : nfa[↑target] = Node.save offset✝ target'
isLt : (Node.save offset✝ target').inBounds nfa.nodes.size
h✝ : ¬offset✝ < currentSave.size
h :
  exploreεClosure nfa pos (next.insert target) currentSave matched saveSlots ⟨target', ⋯⟩ stack =
    (matched', next', saveSlots')
i j : Fin nfa.nodes.size
hi : i ∈ next.insert target
hj : ↑j ∈ nfa.εStep ↑i
⊢ j ∈ next.insert target ∨ j = ⟨target', isLt⟩ ∨ StackEntry.explore j ∈ stack