Theorem: BVExpr.bitblast.mkOverflowBit.go_decl_eq (LeanSAT/Reflect/BVExpr/BitBlast/Impl/Carry.lean)

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < (go aig curr hcurr cin lhs rhs).aig.decls.size),
    (go aig curr hcurr cin lhs rhs).aig.decls[idx] = aig.decls[idx]
Tactic:
generalize hgo : go aig curr hcurr cin lhs rhs = res
State after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
hgo : go aig curr hcurr cin lhs rhs = res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
hgo : go aig curr hcurr cin lhs rhs = res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]
Tactic:
unfold go at hgo
State after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
hgo :
  (if hidx : curr < a✝ then
      let lin := lhs.getRef curr hidx;
      let rin := rhs.getRef curr hidx;
      let res := mkFullAdderCarry aig { lhs := lin, rhs := rin, cin := cin };
      let_fun this := ⋯;
      let aig_1 := res.aig;
      let carryRef := res.ref;
      let lhs_1 := lhs.cast this;
      let rhs_1 := rhs.cast this;
      go aig_1 (curr + 1) ⋯ carryRef lhs_1 rhs_1
    else { aig := aig, ref := cin }) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
hgo :
  (if hidx : curr < a✝ then
      let lin := lhs.getRef curr hidx;
      let rin := rhs.getRef curr hidx;
      let res := mkFullAdderCarry aig { lhs := lin, rhs := rin, cin := cin };
      let_fun this := ⋯;
      let aig_1 := res.aig;
      let carryRef := res.ref;
      let lhs_1 := lhs.cast this;
      let rhs_1 := rhs.cast this;
      go aig_1 (curr + 1) ⋯ carryRef lhs_1 rhs_1
    else { aig := aig, ref := cin }) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]
Tactic:
dsimp at hgo
State after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
hgo :
  (if hidx : curr < a✝ then
      go (mkFullAdderCarry aig { lhs := lhs.getRef curr hidx, rhs := rhs.getRef curr hidx, cin := cin }).aig (curr + 1)
        ⋯ (mkFullAdderCarry aig { lhs := lhs.getRef curr hidx, rhs := rhs.getRef curr hidx, cin := cin }).ref
        (lhs.cast ⋯) (rhs.cast ⋯)
    else { aig := aig, ref := cin }) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
hgo :
  (if hidx : curr < a✝ then
      go (mkFullAdderCarry aig { lhs := lhs.getRef curr hidx, rhs := rhs.getRef curr hidx, cin := cin }).aig (curr + 1)
        ⋯ (mkFullAdderCarry aig { lhs := lhs.getRef curr hidx, rhs := rhs.getRef curr hidx, cin := cin }).ref
        (lhs.cast ⋯) (rhs.cast ⋯)
    else { aig := aig, ref := cin }) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]
Tactic:
split at hgo
State after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]

case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : ¬curr < a✝
hgo : { aig := aig, ref := cin } = res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]

State before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]

case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : ¬curr < a✝
hgo : { aig := aig, ref := cin } = res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]
Tactic:
. rw [← hgo]
  intros
  rw [go_decl_eq]
  rw [AIG.LawfulOperator.decl_eq (f := mkFullAdderCarry)]
  apply AIG.LawfulOperator.lt_size_of_lt_aig_size (f := mkFullAdderCarry)
  assumption
State after:
case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : ¬curr < a✝
hgo : { aig := aig, ref := cin } = res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]

State before:
case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : ¬curr < a✝
hgo : { aig := aig, ref := cin } = res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]
Tactic:
. simp [← hgo]
State after:
no goals

State before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]
Tactic:
rw [← hgo]
State after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size)
    (h2 :
      idx <
        (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
                (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref
                (lhs.cast ⋯) (rhs.cast ⋯)).aig.decls.size),
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
              (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref
              (lhs.cast ⋯) (rhs.cast ⋯)).aig.decls[idx] =
      aig.decls[idx]

State before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size)
    (h2 :
      idx <
        (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
                (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref
                (lhs.cast ⋯) (rhs.cast ⋯)).aig.decls.size),
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
              (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref
              (lhs.cast ⋯) (rhs.cast ⋯)).aig.decls[idx] =
      aig.decls[idx]
Tactic:
intros
State after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls[idx✝] =
    aig.decls[idx✝]

State before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls[idx✝] =
    aig.decls[idx✝]
Tactic:
rw [go_decl_eq]
State after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig.decls[idx✝] =
    aig.decls[idx✝]

case isTrue.h1
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ idx✝ < (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig.decls.size

State before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig.decls[idx✝] =
    aig.decls[idx✝]

case isTrue.h1
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ idx✝ < (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig.decls.size
Tactic:
rw [AIG.LawfulOperator.decl_eq (f := mkFullAdderCarry)]
State after:
case isTrue.h2
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ idx✝ < (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig.decls.size

State before:
case isTrue.h2
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ idx✝ < (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig.decls.size
Tactic:
apply AIG.LawfulOperator.lt_size_of_lt_aig_size (f := mkFullAdderCarry)
State after:
case isTrue.h2.h
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ idx✝ < aig.decls.size

State before:
case isTrue.h2.h
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : curr < a✝
hgo :
  go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
      (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
      (rhs.cast ⋯) =
    res
idx✝ : Nat
h1✝ : idx✝ < aig.decls.size
h2✝ :
  idx✝ <
    (go (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).aig (curr + 1) ⋯
            (mkFullAdderCarry aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝, cin := cin }).ref (lhs.cast ⋯)
            (rhs.cast ⋯)).aig.decls.size
⊢ idx✝ < aig.decls.size
Tactic:
assumption
State after:
no goals

State before:
case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
curr a✝ : Nat
hcurr : curr ≤ a✝
aig : AIG α
cin : aig.Ref
lhs rhs : aig.RefStream a✝
res : AIG.Entrypoint α
h✝ : ¬curr < a✝
hgo : { aig := aig, ref := cin } = res
⊢ ∀ (idx : Nat) (h1 : idx < aig.decls.size) (h2 : idx < res.aig.decls.size), res.aig.decls[idx] = aig.decls[idx]
Tactic:
simp [← hgo]
State after:
no goals