Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ (((s.cast ⋯).pushRef (f aig { 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 α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ idx < curr + 1

case isTrue.hfoo
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
Tactic:
rw [AIG.RefStream.getRef_push_ref_lt]
Proof state after:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).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 α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ idx < curr

case isTrue.hfoo
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size

case isTrue.hfoo
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size