dsimp
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
h✝ : curr < newWidth
⊢ aig.decls.size ≤
    (if hcurr2 : curr < w then
            let s := s.pushRef (input.getRef curr hcurr2);
            go aig w input newWidth (curr + 1) ⋯ s
          else
            let res := aig.mkConstCached false;
            let aig_1 := res.aig;
            let zeroRef := res.ref;
            let_fun hcast := ⋯;
            let input := input.cast hcast;
            let s := s.cast hcast;
            let s := s.pushRef zeroRef;
            go aig_1 w input newWidth (curr + 1) ⋯ s).aig.decls.size
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
h✝ : curr < newWidth
⊢ aig.decls.size ≤
    (if hcurr2 : curr < w then go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hcurr2))
          else
            go (aig.mkConstCached false).aig w (input.cast ⋯) newWidth (curr + 1) ⋯
              ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).aig.decls.size