dsimp at hgo
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  (let input := { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ };
    let res := aig.mkIfCached input;
    let aig_1 := res.aig;
    let ref := res.ref;
    let_fun this := ⋯;
    let discr_1 := discr.cast this;
    let lhs_1 := lhs.cast this;
    let rhs_1 := rhs.cast this;
    let s := s.cast this;
    let s := s.pushRef ref;
    go aig_1 (curr + 1) ⋯ discr_1 lhs_1 rhs_1 s) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef idx hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef idx hidx1 }, assign⟧
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef idx hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef idx hidx1 }, assign⟧