Theorem: AIG.RefStream.ite.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
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
hfoo✝ :
  aig.decls.size ≤
    (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)).aig.decls.size
⊢ (((s.cast ⋯).pushRef
              (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref).getRef
          idx ?isTrue.hidx).cast
      ?isTrue.hfoo =
    (s.getRef idx hidx).cast hfoo✝

case isTrue.hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
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
hfoo✝ :
  aig.decls.size ≤
    (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)).aig.decls.size
⊢ idx < curr + 1

case isTrue.hfoo
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
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
hfoo✝ :
  aig.decls.size ≤
    (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)).aig.decls.size
⊢ (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size ≤
    (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)).aig.decls.size
Tactic:
rw [AIG.RefStream.getRef_push_ref_lt]
Proof state after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
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
hfoo✝ :
  aig.decls.size ≤
    (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)).aig.decls.size
⊢ ((s.cast ⋯).getRef idx ?isTrue.hidx).cast ?isTrue.hfoo = (s.getRef idx hidx).cast hfoo✝

case isTrue.hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
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
hfoo✝ :
  aig.decls.size ≤
    (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)).aig.decls.size
⊢ idx < curr

case isTrue.hfoo
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
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
hfoo✝ :
  aig.decls.size ≤
    (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)).aig.decls.size
⊢ (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size ≤
    (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)).aig.decls.size

case isTrue.hfoo
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
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
hfoo✝ :
  aig.decls.size ≤
    (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)).aig.decls.size
⊢ (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size ≤
    (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)).aig.decls.size