Theorem: AIG.RefStream.map.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
input : aig.RefStream len
f : (aig : AIG α) → aig.Ref → Entrypoint α
inst✝¹ : LawfulOperator α Ref f
inst✝ : LawfulMapOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
      (input.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
            (input.cast ⋯) f).aig.decls.size
⊢ (go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
            (input.cast ⋯) f).stream.getRef
      idx ⋯ =
    (s.getRef idx hidx).cast hfoo
Tactic:
rw [go_getRef_aux]
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
input : aig.RefStream len
f : (aig : AIG α) → aig.Ref → Entrypoint α
inst✝¹ : LawfulOperator α Ref f
inst✝ : LawfulMapOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
      (input.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
            (input.cast ⋯) f).aig.decls.size
⊢ (((s.cast ⋯).pushRef (f aig (input.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
input : aig.RefStream len
f : (aig : AIG α) → aig.Ref → Entrypoint α
inst✝¹ : LawfulOperator α Ref f
inst✝ : LawfulMapOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
      (input.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
            (input.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
input : aig.RefStream len
f : (aig : AIG α) → aig.Ref → Entrypoint α
inst✝¹ : LawfulOperator α Ref f
inst✝ : LawfulMapOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
      (input.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
            (input.cast ⋯) f).aig.decls.size
⊢ (f aig (input.getRef curr h✝)).aig.decls.size ≤
    (go (f aig (input.getRef curr h✝)).aig (curr + 1) ⋯ ((s.cast ⋯).pushRef (f aig (input.getRef curr h✝)).ref)
            (input.cast ⋯) f).aig.decls.size