internlm/Lean-Github huggingface dataset:
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
hgo :
  (if hcurr1 : curr < newWidth then
      if hcurr2 : curr < w then
        let s := s.pushRef (input.getRef curr hcurr2);
        go aig w input newWidth (curr + 1) ⋯ s
      else
        let res := aig.mkConstCached false;
        let aig_1 := res.aig;
        let zeroRef := res.ref;
        let_fun hcast := ⋯;
        let input := input.cast hcast;
        let s := s.cast hcast;
        let s := s.pushRef zeroRef;
        go aig_1 w input newWidth (curr + 1) ⋯ s
    else
      let_fun hcurr := ⋯;
      { aig := aig, stream := hcurr ▸ s }) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
split at hgo
Proof state after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
hgo :
  (if hcurr2 : curr < w then
      let s := s.pushRef (input.getRef curr hcurr2);
      go aig w input newWidth (curr + 1) ⋯ s
    else
      let res := aig.mkConstCached false;
      let aig_1 := res.aig;
      let zeroRef := res.ref;
      let_fun hcast := ⋯;
      let input := input.cast hcast;
      let s := s.cast hcast;
      let s := s.pushRef zeroRef;
      go aig_1 w input newWidth (curr + 1) ⋯ s) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false

case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : ¬curr < newWidth
hgo :
  (let_fun hcurr := ⋯;
    { aig := aig, stream := hcurr ▸ s }) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
hgo :
  (if hcurr2 : curr < w then
      let s := s.pushRef (input.getRef curr hcurr2);
      go aig w input newWidth (curr + 1) ⋯ s
    else
      let res := aig.mkConstCached false;
      let aig_1 := res.aig;
      let zeroRef := res.ref;
      let_fun hcast := ⋯;
      let input := input.cast hcast;
      let s := s.cast hcast;
      let s := s.pushRef zeroRef;
      go aig_1 w input newWidth (curr + 1) ⋯ s) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false

case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : ¬curr < newWidth
hgo :
  (let_fun hcurr := ⋯;
    { aig := aig, stream := hcurr ▸ s }) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
. dsimp at hgo
  cases Nat.eq_or_lt_of_le hidx2 with
  | inl heq =>
    split at hgo
    . next hsplit =>
      rw [heq] at hsplit
      simp only [hsplit, ↓reduceDite]
      rw [← hgo]
      rw [go_getRef]
      rw [AIG.RefStream.getRef_push_ref_eq']
      . rw [go_denote_mem_prefix]
        . simp [heq]
        . simp [Ref.hgate]
      . omega
    . next hsplit =>
      rw [heq] at hsplit
      simp only [hsplit, ↓reduceDite]
      rw [← hgo]
      rw [go_getRef]
      rw [AIG.RefStream.getRef_push_ref_eq']
      . rw [go_denote_mem_prefix]
        . simp [heq]
        . simp [Ref.hgate]
      . omega
  | inr =>
    split at hgo
    . rw [← hgo]
      rw [go_eq_eval_getLsb]
      omega
    . rw [← hgo]
      rw [go_eq_eval_getLsb]
      . split
        . omega
        . rfl
      . omega
Proof state after:
case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : ¬curr < newWidth
hgo :
  (let_fun hcurr := ⋯;
    { aig := aig, stream := hcurr ▸ s }) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
case isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : ¬curr < newWidth
hgo :
  (let_fun hcurr := ⋯;
    { aig := aig, stream := hcurr ▸ s }) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
. omega
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
hgo :
  (if hcurr2 : curr < w then
      let s := s.pushRef (input.getRef curr hcurr2);
      go aig w input newWidth (curr + 1) ⋯ s
    else
      let res := aig.mkConstCached false;
      let aig_1 := res.aig;
      let zeroRef := res.ref;
      let_fun hcast := ⋯;
      let input := input.cast hcast;
      let s := s.cast hcast;
      let s := s.pushRef zeroRef;
      go aig_1 w input newWidth (curr + 1) ⋯ s) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
dsimp at hgo
Proof state after:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
hgo :
  (if hcurr2 : curr < w then go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hcurr2))
    else
      go (aig.mkConstCached false).aig w (input.cast ⋯) newWidth (curr + 1) ⋯
        ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
case isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
hgo :
  (if hcurr2 : curr < w then go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hcurr2))
    else
      go (aig.mkConstCached false).aig w (input.cast ⋯) newWidth (curr + 1) ⋯
        ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
cases Nat.eq_or_lt_of_le hidx2 with
| inl heq =>
  split at hgo
  . next hsplit =>
    rw [heq] at hsplit
    simp only [hsplit, ↓reduceDite]
    rw [← hgo]
    rw [go_getRef]
    rw [AIG.RefStream.getRef_push_ref_eq']
    . rw [go_denote_mem_prefix]
      . simp [heq]
      . simp [Ref.hgate]
    . omega
  . next hsplit =>
    rw [heq] at hsplit
    simp only [hsplit, ↓reduceDite]
    rw [← hgo]
    rw [go_getRef]
    rw [AIG.RefStream.getRef_push_ref_eq']
    . rw [go_denote_mem_prefix]
      . simp [heq]
      . simp [Ref.hgate]
    . omega
| inr =>
  split at hgo
  . rw [← hgo]
    rw [go_eq_eval_getLsb]
    omega
  . rw [← hgo]
    rw [go_eq_eval_getLsb]
    . split
      . omega
      . rfl
    . omega
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
case isTrue.inl
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
hgo :
  (if hcurr2 : curr < w then go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hcurr2))
    else
      go (aig.mkConstCached false).aig w (input.cast ⋯) newWidth (curr + 1) ⋯
        ((s.cast ⋯).pushRef (aig.mkConstCached false).ref)) =
    res
heq : curr = idx
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
split at hgo
Proof state after:
case isTrue.inl.isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝¹ : curr < newWidth
heq : curr = idx
h✝ : curr < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr h✝)) = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false

case isTrue.inl.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝¹ : curr < newWidth
heq : curr = idx
h✝ : ¬curr < w
hgo :
  go (aig.mkConstCached false).aig w (input.cast ⋯) newWidth (curr + 1) ⋯
      ((s.cast ⋯).pushRef (aig.mkConstCached false).ref) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
case isTrue.inl.isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝¹ : curr < newWidth
heq : curr = idx
h✝ : curr < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr h✝)) = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false

case isTrue.inl.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝¹ : curr < newWidth
heq : curr = idx
h✝ : ¬curr < w
hgo :
  go (aig.mkConstCached false).aig w (input.cast ⋯) newWidth (curr + 1) ⋯
      ((s.cast ⋯).pushRef (aig.mkConstCached false).ref) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
. next hsplit =>
  rw [heq] at hsplit
  simp only [hsplit, ↓reduceDite]
  rw [← hgo]
  rw [go_getRef]
  rw [AIG.RefStream.getRef_push_ref_eq']
  . rw [go_denote_mem_prefix]
    . simp [heq]
    . simp [Ref.hgate]
  . omega
Proof state after:
case isTrue.inl.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝¹ : curr < newWidth
heq : curr = idx
h✝ : ¬curr < w
hgo :
  go (aig.mkConstCached false).aig w (input.cast ⋯) newWidth (curr + 1) ⋯
      ((s.cast ⋯).pushRef (aig.mkConstCached false).ref) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
case isTrue.inl.isFalse
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝¹ : curr < newWidth
heq : curr = idx
h✝ : ¬curr < w
hgo :
  go (aig.mkConstCached false).aig w (input.cast ⋯) newWidth (curr + 1) ⋯
      ((s.cast ⋯).pushRef (aig.mkConstCached false).ref) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
. next hsplit =>
  rw [heq] at hsplit
  simp only [hsplit, ↓reduceDite]
  rw [← hgo]
  rw [go_getRef]
  rw [AIG.RefStream.getRef_push_ref_eq']
  . rw [go_denote_mem_prefix]
    . simp [heq]
    . simp [Ref.hgate]
  . omega
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
case isTrue.inl.isTrue
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝¹ : curr < newWidth
heq : curr = idx
h✝ : curr < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr h✝)) = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
next hsplit =>
rw [heq] at hsplit
simp only [hsplit, ↓reduceDite]
rw [← hgo]
rw [go_getRef]
rw [AIG.RefStream.getRef_push_ref_eq']
. rw [go_denote_mem_prefix]
  . simp [heq]
  . simp [Ref.hgate]
. omega
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit : curr < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit)) = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
rw [heq] at hsplit
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if hidx : idx < w then ⟦{ aig := aig, ref := input.getRef idx hidx }, assign⟧ else false
Tactic:
simp only [hsplit, ↓reduceDite]
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ = ⟦{ aig := aig, ref := input.getRef idx ⋯ }, assign⟧
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ = ⟦{ aig := aig, ref := input.getRef idx ⋯ }, assign⟧
Tactic:
rw [← hgo]
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := (go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝))).aig,
        ref := (go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝))).stream.getRef idx hidx1 },
      assign⟧ =
    ⟦{ aig := aig, ref := input.getRef idx ⋯ }, assign⟧
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := (go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝))).aig,
        ref := (go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝))).stream.getRef idx hidx1 },
      assign⟧ =
    ⟦{ aig := aig, ref := input.getRef idx ⋯ }, assign⟧
Tactic:
rw [go_getRef]
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := (go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝))).aig,
        ref := ((s.pushRef (input.getRef curr hsplit✝)).getRef idx ?hidx).cast ⋯ },
      assign⟧ =
    ⟦{ aig := aig, ref := input.getRef idx ⋯ }, assign⟧

case hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ idx < curr + 1
Theorem: BVExpr.bitblast.blastZeroExtend.go_eq_eval_getLsb
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := (go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝))).aig,
        ref := ((s.pushRef (input.getRef curr hsplit✝)).getRef idx ?hidx).cast ⋯ },
      assign⟧ =
    ⟦{ aig := aig, ref := input.getRef idx ⋯ }, assign⟧

case hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ idx < curr + 1
Tactic:
rw [AIG.RefStream.getRef_push_ref_eq']
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ ⟦{ aig := (go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝))).aig,
        ref := (input.getRef curr hsplit✝).cast ⋯ },
      assign⟧ =
    ⟦{ aig := aig, ref := input.getRef idx ⋯ }, assign⟧

case hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
w : Nat
input : aig.RefStream w
newWidth curr : Nat
hcurr : curr ≤ newWidth
s : aig.RefStream curr
assign : α → Bool
idx : Nat
hidx1 : idx < newWidth
hidx2 : curr ≤ idx
res : RefStreamEntry α newWidth
h✝ : curr < newWidth
heq : curr = idx
hsplit✝ : curr < w
hsplit : idx < w
hgo : go aig w input newWidth (curr + 1) ⋯ (s.pushRef (input.getRef curr hsplit✝)) = res
⊢ idx = curr