internlm/Lean-Github huggingface dataset:
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isTrue
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ ((s.cast ⋯).getRef idx ?isTrue.hidx).cast ?isTrue.hfoo = (s.getRef idx hidx).cast hfoo
Tactic:
simp only [Ref.cast, Ref.mk.injEq]
Proof state after:
case isTrue
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ ((s.cast ⋯).getRef idx ?isTrue.hidx).gate = (s.getRef idx hidx).gate
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isTrue
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ ((s.cast ⋯).getRef idx ?isTrue.hidx).gate = (s.getRef idx hidx).gate
Tactic:
rw [AIG.RefStream.getRef_cast]
Proof state after:
case isTrue
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ ((s.getRef idx ?isTrue.hidx).cast ⋯).gate = (s.getRef idx hidx).gate

case isTrue.hidx
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ idx < curr
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isTrue
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ ((s.getRef idx ?isTrue.hidx).cast ⋯).gate = (s.getRef idx hidx).gate

case isTrue.hidx
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ idx < curr
Tactic:
. simp
Proof state after:
case isTrue.hidx
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ idx < curr
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isTrue.hidx
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ idx < curr
Tactic:
. assumption
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isTrue
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ ((s.getRef idx ?isTrue.hidx).cast ⋯).gate = (s.getRef idx hidx).gate
Tactic:
simp
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isTrue.hidx
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ idx < curr
Tactic:
assumption
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isTrue.hfoo
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : curr < w
hgo :
  go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
      ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯ =
    res
hfoo :
  aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
⊢ (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig.decls.size ≤
    (go w (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).aig (curr + 1)
            ((s.cast ⋯).pushRef (aig.mkAtomCached (BVBit.mk a ⟨curr, h✝⟩)).ref) a ⋯).aig.decls.size
Tactic:
apply go_le_size
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isFalse
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo :
  (let_fun hidx := ⋯;
    { aig := aig, stream := hidx ▸ s }) =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Tactic:
dsimp at hgo
Proof state after:
case isFalse
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isFalse
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Tactic:
rw [← hgo]
Proof state after:
case isFalse
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ ∀ (hfoo : aig.decls.size ≤ { aig := aig, stream := ⋯ ▸ s }.aig.decls.size),
    { aig := aig, stream := ⋯ ▸ s }.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isFalse
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ ∀ (hfoo : aig.decls.size ≤ { aig := aig, stream := ⋯ ▸ s }.aig.decls.size),
    { aig := aig, stream := ⋯ ▸ s }.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Tactic:
simp only [Nat.le_refl, RefStream.getRef, Ref_cast', Ref.mk.injEq, true_implies]
Proof state after:
case isFalse
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ (⋯ ▸ s).refs[idx] = s.refs[idx]
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isFalse
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ (⋯ ▸ s).refs[idx] = s.refs[idx]
Tactic:
congr
Proof state after:
case isFalse.e_xs.h.e_5
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ w = curr

case isFalse.e_xs.h.e_6
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ HEq (⋯ ▸ s) s
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isFalse.e_xs.h.e_5
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ w = curr

case isFalse.e_xs.h.e_6
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ HEq (⋯ ▸ s) s
Tactic:
. omega
Proof state after:
case isFalse.e_xs.h.e_6
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ HEq (⋯ ▸ s) s
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isFalse.e_xs.h.e_6
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ HEq (⋯ ▸ s) s
Tactic:
. simp
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isFalse.e_xs.h.e_5
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ w = curr
Tactic:
omega
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef_aux
Proof state before:
case isFalse.e_xs.h.e_6
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
res : RefStreamEntry BVBit w
h✝ : ¬curr < w
hgo : { aig := aig, stream := ⋯ ▸ s } = res
⊢ HEq (⋯ ▸ s) s
Tactic:
simp
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef
Proof state before:
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
⊢ idx < w
Tactic:
omega
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef
Proof state before:
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx : idx < curr
⊢ aig.decls.size ≤ (go w aig curr s a hcurr).aig.decls.size
Tactic:
apply go_le_size
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_getRef
Proof state before:
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
⊢ ∀ (idx : Nat) (hidx : idx < curr), (go w aig curr s a hcurr).stream.getRef idx ⋯ = (s.getRef idx hidx).cast ⋯
Tactic:
intros
Proof state after:
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx✝ : Nat
hidx✝ : idx✝ < curr
⊢ (go w aig curr s a hcurr).stream.getRef idx✝ ⋯ = (s.getRef idx✝ hidx✝).cast ⋯
Theorem: BVExpr.bitblast.blastVar.go_getRef
Proof state before:
w : Nat
aig : AIG BVBit
a curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx✝ : Nat
hidx✝ : idx✝ < curr
⊢ (go w aig curr s a hcurr).stream.getRef idx✝ ⋯ = (s.getRef idx✝ hidx✝).cast ⋯
Tactic:
apply go_getRef_aux
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ start < (go w aig idx s a hidx).aig.decls.size
Tactic:
apply Nat.lt_of_lt_of_le
Proof state after:
case a
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ start < ?m

case a
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ ?m ≤ (go w aig idx s a hidx).aig.decls.size

case m
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ Nat
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
case a
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ start < ?m

case a
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ ?m ≤ (go w aig idx s a hidx).aig.decls.size

case m
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ Nat
Tactic:
exact hstart
Proof state after:
case a
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ aig.decls.size ≤ (go w aig idx s a hidx).aig.decls.size
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
case a
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ aig.decls.size ≤ (go w aig idx s a hidx).aig.decls.size
Tactic:
apply go_le_size
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ ⟦{ aig := (go w aig idx s a hidx).aig, ref := { gate := start, hgate := ⋯ } }, assign⟧ =
    ⟦{ aig := aig, ref := { gate := start, hgate := hstart } }, assign⟧
Tactic:
apply denote.eq_of_aig_eq (entry := ⟨aig, start,hstart⟩)
Proof state after:
case hprefix
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ IsPrefix { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls (go w aig idx s a hidx).aig.decls
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
case hprefix
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ IsPrefix { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls (go w aig idx s a hidx).aig.decls
Tactic:
apply IsPrefix.of
Proof state after:
case hprefix.idx_eq
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ ∀ (idx_1 : Nat) (h : idx_1 < { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size),
    (go w aig idx s a hidx).aig.decls[idx_1] =
      { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls[idx_1]

case hprefix.size_le
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size ≤ (go w aig idx s a hidx).aig.decls.size
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
case hprefix.idx_eq
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ ∀ (idx_1 : Nat) (h : idx_1 < { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size),
    (go w aig idx s a hidx).aig.decls[idx_1] =
      { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls[idx_1]

case hprefix.size_le
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size ≤ (go w aig idx s a hidx).aig.decls.size
Tactic:
. intros
  apply go_decl_eq
Proof state after:
case hprefix.size_le
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size ≤ (go w aig idx s a hidx).aig.decls.size
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
case hprefix.size_le
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size ≤ (go w aig idx s a hidx).aig.decls.size
Tactic:
. intros
  apply go_le_size
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
case hprefix.idx_eq
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ ∀ (idx_1 : Nat) (h : idx_1 < { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size),
    (go w aig idx s a hidx).aig.decls[idx_1] =
      { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls[idx_1]
Tactic:
intros
Proof state after:
case hprefix.idx_eq
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
idx✝ : Nat
h✝ : idx✝ < { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size
⊢ (go w aig idx s a hidx).aig.decls[idx✝] = { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls[idx✝]
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
case hprefix.idx_eq
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
idx✝ : Nat
h✝ : idx✝ < { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size
⊢ (go w aig idx s a hidx).aig.decls[idx✝] = { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls[idx✝]
Tactic:
apply go_decl_eq
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_denote_mem_prefix
Proof state before:
case hprefix.size_le
w : Nat
assign : BVBit → Bool
aig : AIG BVBit
idx : Nat
hidx : idx ≤ w
s : aig.RefStream idx
a start : Nat
hstart : start < aig.decls.size
⊢ { aig := aig, ref := { gate := start, hgate := hstart } }.aig.decls.size ≤ (go w aig idx s a hidx).aig.decls.size
Tactic:
apply go_le_size
Proof state after:
no goals
Theorem: BVExpr.bitblast.blastVar.go_eq_eval_getLsb
Proof state before:
w : Nat
aig : AIG BVBit
a : Nat
assign : Assignment
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
⊢ ∀ (idx : Nat) (hidx1 : idx < w),
    curr ≤ idx →
      ⟦{ aig := (go w aig curr s a hcurr).aig, ref := (go w aig curr s a hcurr).stream.getRef idx hidx1 },
          assign.toAIGAssignment⟧ =
        (eval assign (var a)).getLsb idx
Tactic:
intro idx hidx1 hidx2
Proof state after:
w : Nat
aig : AIG BVBit
a : Nat
assign : Assignment
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
⊢ ⟦{ aig := (go w aig curr s a hcurr).aig, ref := (go w aig curr s a hcurr).stream.getRef idx hidx1 },
      assign.toAIGAssignment⟧ =
    (eval assign (var a)).getLsb idx
Theorem: BVExpr.bitblast.blastVar.go_eq_eval_getLsb
Proof state before:
w : Nat
aig : AIG BVBit
a : Nat
assign : Assignment
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
⊢ ⟦{ aig := (go w aig curr s a hcurr).aig, ref := (go w aig curr s a hcurr).stream.getRef idx hidx1 },
      assign.toAIGAssignment⟧ =
    (eval assign (var a)).getLsb idx
Tactic:
generalize hgo : go w aig curr s a hcurr = res
Proof state after:
w : Nat
aig : AIG BVBit
a : Nat
assign : Assignment
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry BVBit w
hgo : go w aig curr s a hcurr = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign.toAIGAssignment⟧ = (eval assign (var a)).getLsb idx
Theorem: BVExpr.bitblast.blastVar.go_eq_eval_getLsb
Proof state before:
w : Nat
aig : AIG BVBit
a : Nat
assign : Assignment
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry BVBit w
hgo : go w aig curr s a hcurr = res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign.toAIGAssignment⟧ = (eval assign (var a)).getLsb idx
Tactic:
unfold go at hgo
Proof state after:
w : Nat
aig : AIG BVBit
a : Nat
assign : Assignment
curr : Nat
hcurr : curr ≤ w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry BVBit w
hgo :
  (if hidx : curr < w then
      let res := aig.mkAtomCached (BVBit.mk a ⟨curr, hidx⟩);
      let aig_1 := res.aig;
      let bitRef := res.ref;
      let s := s.cast ⋯;
      let s := s.pushRef bitRef;
      go w aig_1 (curr + 1) s a ⋯
    else
      let_fun hidx := ⋯;
      { aig := aig, stream := hidx ▸ s }) =
    res
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign.toAIGAssignment⟧ = (eval assign (var a)).getLsb idx