Theorem: BVExpr.bitblast.blastShiftRightConst.go_le_size (LeanSAT/Reflect/BVExpr/BitBlast/Impl/ShiftRight.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 : distance + curr < w then
              let s := s.pushRef (input.getRef (distance + curr) ⋯);
              go aig input distance (curr + 1) ⋯ s
            else
              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_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 : distance + curr < w then
              let s := s.pushRef (input.getRef (distance + curr) ⋯);
              go aig input distance (curr + 1) ⋯ s
            else
              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_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 : distance + curr < w then
            let s := s.pushRef (input.getRef (distance + curr) ⋯);
            go aig input distance (curr + 1) ⋯ s
          else
            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).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 : distance + curr < w then
            let s := s.pushRef (input.getRef (distance + curr) ⋯);
            go aig input distance (curr + 1) ⋯ s
          else
            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).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)
    omega
  . refine Nat.le_trans ?_ (by apply go_le_size)
    apply AIG.LawfulOperator.le_size
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 : distance + curr < w then
            let s := s.pushRef (input.getRef (distance + curr) ⋯);
            go aig input distance (curr + 1) ⋯ s
          else
            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).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 : distance + curr < w then
            go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (distance + curr) ⋯))
          else
            go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
              ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).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 : distance + curr < w then
            go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (distance + curr) ⋯))
          else
            go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
              ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).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✝ : distance + curr < w
⊢ aig.decls.size ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (distance + curr) ⋯))).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✝ : ¬distance + curr < w
⊢ aig.decls.size ≤
    (go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
            ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).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✝ : distance + curr < w
⊢ aig.decls.size ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (distance + curr) ⋯))).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✝ : ¬distance + curr < w
⊢ 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)
  omega
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✝ : ¬distance + curr < w
⊢ aig.decls.size ≤
    (go (aig.mkConstCached false).aig (input.cast ⋯) distance (curr + 1) ⋯
            ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)).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✝ : ¬distance + curr < w
⊢ 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)
  apply AIG.LawfulOperator.le_size
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✝ : distance + curr < w
⊢ aig.decls.size ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (distance + curr) ⋯))).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✝ : distance + curr < w
⊢ aig.decls.size ≤ 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✝ : distance + curr < w
⊢ 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✝ : distance + curr < w
⊢ ?m.16731 ≤ (go aig input distance (curr + 1) ⋯ (s.pushRef (input.getRef (distance + curr) ⋯))).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✝ : ¬distance + curr < w
⊢ 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.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✝ : ¬distance + curr < w
⊢ aig.decls.size ≤ (aig.mkConstCached false).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✝ : ¬distance + curr < w
⊢ 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✝ : ¬distance + curr < w
⊢ ?m.16859 ≤
    (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 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