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
⊢ ((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
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

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

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
Tactic:
. simp only [Ref.cast, Ref.mk.injEq]
  rw [AIG.RefStream.getRef_cast]
  . simp
  . assumption
Proof state after:
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

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