Theorem: BVExpr.bitblast.blastShiftLeftConst.go_le_size (LeanSAT/Reflect/BVExpr/BitBlast/Impl/ShiftLeft.lean)

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
⊢ aig.decls.size ≤ (go aig input distance curr hcurr s).aig.decls.size
Tactic:
unfold go
State after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
⊢ aig.decls.size ≤
    (if hidx : curr < w then
            if hdist : curr < distance then
              let res := aig.mkConstCached false;
              let aig_1 := res.aig;
              let zeroRef := res.ref;
              let_fun hfinal := ⋯;
              let s := s.cast hfinal;
              let input := input.cast hfinal;
              let s := s.pushRef zeroRef;
              go aig_1 input distance (curr + 1) ⋯ s
            else
              let s := s.pushRef (input.getRef (curr - distance) ⋯);
              go aig input distance (curr + 1) ⋯ s
          else
            let_fun hcurr := ⋯;
            { aig := aig, stream := hcurr ▸ s }).aig.decls.size

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
⊢ aig.decls.size ≤
    (if hidx : curr < w then
            if hdist : curr < distance then
              let res := aig.mkConstCached false;
              let aig_1 := res.aig;
              let zeroRef := res.ref;
              let_fun hfinal := ⋯;
              let s := s.cast hfinal;
              let input := input.cast hfinal;
              let s := s.pushRef zeroRef;
              go aig_1 input distance (curr + 1) ⋯ s
            else
              let s := s.pushRef (input.getRef (curr - distance) ⋯);
              go aig input distance (curr + 1) ⋯ s
          else
            let_fun hcurr := ⋯;
            { aig := aig, stream := hcurr ▸ s }).aig.decls.size
Tactic:
split
State after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : curr < w
⊢ aig.decls.size ≤
    (if hdist : curr < distance then
            let res := aig.mkConstCached false;
            let aig_1 := res.aig;
            let zeroRef := res.ref;
            let_fun hfinal := ⋯;
            let s := s.cast hfinal;
            let input := input.cast hfinal;
            let s := s.pushRef zeroRef;
            go aig_1 input distance (curr + 1) ⋯ s
          else
            let s := s.pushRef (input.getRef (curr - distance) ⋯);
            go aig input distance (curr + 1) ⋯ s).aig.decls.size

case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : ¬curr < w
⊢ aig.decls.size ≤
    (let_fun hcurr := ⋯;
          { aig := aig, stream := hcurr ▸ s }).aig.decls.size

State before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : curr < w
⊢ aig.decls.size ≤
    (if hdist : curr < distance then
            let res := aig.mkConstCached false;
            let aig_1 := res.aig;
            let zeroRef := res.ref;
            let_fun hfinal := ⋯;
            let s := s.cast hfinal;
            let input := input.cast hfinal;
            let s := s.pushRef zeroRef;
            go aig_1 input distance (curr + 1) ⋯ s
          else
            let s := s.pushRef (input.getRef (curr - distance) ⋯);
            go aig input distance (curr + 1) ⋯ s).aig.decls.size

case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : ¬curr < w
⊢ aig.decls.size ≤
    (let_fun hcurr := ⋯;
          { aig := aig, stream := hcurr ▸ s }).aig.decls.size
Tactic:
. dsimp
  split
  . refine Nat.le_trans ?_ (by apply go_le_size)
    apply AIG.LawfulOperator.le_size
  . refine Nat.le_trans ?_ (by apply go_le_size)
    omega
State after:
case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : ¬curr < w
⊢ aig.decls.size ≤
    (let_fun hcurr := ⋯;
          { aig := aig, stream := hcurr ▸ s }).aig.decls.size

State before:
case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : ¬curr < w
⊢ aig.decls.size ≤
    (let_fun hcurr := ⋯;
          { aig := aig, stream := hcurr ▸ s }).aig.decls.size
Tactic:
. simp
State after:
no goals

State before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : curr < w
⊢ aig.decls.size ≤
    (if hdist : curr < distance then
            let res := aig.mkConstCached false;
            let aig_1 := res.aig;
            let zeroRef := res.ref;
            let_fun hfinal := ⋯;
            let s := s.cast hfinal;
            let input := input.cast hfinal;
            let s := s.pushRef zeroRef;
            go aig_1 input distance (curr + 1) ⋯ s
          else
            let s := s.pushRef (input.getRef (curr - distance) ⋯);
            go aig input distance (curr + 1) ⋯ s).aig.decls.size
Tactic:
dsimp
State after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : curr < w
⊢ aig.decls.size ≤
    (if hdist : curr < distance then
            go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
              ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)
          else go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (curr - distance) ⋯))).aig.decls.size

State before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : curr < w
⊢ aig.decls.size ≤
    (if hdist : curr < distance then
            go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
              ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)
          else go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (curr - distance) ⋯))).aig.decls.size
Tactic:
split
State after:
case isTrue.isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : curr < distance
⊢ aig.decls.size ≤
    (go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
            ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).aig.decls.size

case isTrue.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : ¬curr < distance
⊢ aig.decls.size ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (curr - distance) ⋯))).aig.decls.size

State before:
case isTrue.isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : curr < distance
⊢ aig.decls.size ≤
    (go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
            ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).aig.decls.size

case isTrue.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : ¬curr < distance
⊢ aig.decls.size ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (curr - distance) ⋯))).aig.decls.size
Tactic:
. refine Nat.le_trans ?_ (by apply go_le_size)
  apply AIG.LawfulOperator.le_size
State after:
case isTrue.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : ¬curr < distance
⊢ aig.decls.size ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (curr - distance) ⋯))).aig.decls.size

State before:
case isTrue.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : ¬curr < distance
⊢ aig.decls.size ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (curr - distance) ⋯))).aig.decls.size
Tactic:
. refine Nat.le_trans ?_ (by apply go_le_size)
  omega
State after:
no goals

State before:
case isTrue.isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : curr < distance
⊢ aig.decls.size ≤
    (go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
            ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).aig.decls.size
Tactic:
refine Nat.le_trans ?_ (by apply go_le_size)
State after:
case isTrue.isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : curr < distance
⊢ aig.decls.size ≤ (aig.mkConstCached false).aig.decls.size

State before:
case isTrue.isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : curr < distance
⊢ aig.decls.size ≤ (aig.mkConstCached false).aig.decls.size
Tactic:
apply AIG.LawfulOperator.le_size
State after:
no goals

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : curr < distance
⊢ ?m.17569 ≤
    (go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
            ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).aig.decls.size
Tactic:
apply go_le_size
State after:
no goals

State before:
case isTrue.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : ¬curr < distance
⊢ aig.decls.size ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (curr - distance) ⋯))).aig.decls.size
Tactic:
refine Nat.le_trans ?_ (by apply go_le_size)
State after:
case isTrue.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : ¬curr < distance
⊢ aig.decls.size ≤ aig.decls.size

State before:
case isTrue.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : ¬curr < distance
⊢ aig.decls.size ≤ aig.decls.size
Tactic:
omega
State after:
no goals

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝¹ : curr < w
h✝ : ¬curr < distance
⊢ ?m.17734 ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (curr - distance) ⋯))).aig.decls.size
Tactic:
apply go_le_size
State after:
no goals

State before:
case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
distance : Nat
input : aig.RefStream w
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
h✝ : ¬curr < w
⊢ aig.decls.size ≤
    (let_fun hcurr := ⋯;
          { aig := aig, stream := hcurr ▸ s }).aig.decls.size
Tactic:
simp
State after:
no goals