internlm/Lean-Github huggingface dataset:
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
hgo :
  (if hidx : curr < len then
      let res := f aig { lhs := lhs.getRef curr hidx, rhs := rhs.getRef curr hidx };
      let aig_1 := res.aig;
      let newRef := res.ref;
      let_fun this := ⋯;
      let s := s.cast this;
      let s := s.pushRef newRef;
      go aig_1 (curr + 1) s ⋯ (lhs.cast this) (rhs.cast this) f
    else
      let_fun this := ⋯;
      { aig := aig, stream := this ▸ s }) =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Tactic:
split at hgo
Proof state after:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  (let res := f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ };
    let aig_1 := res.aig;
    let newRef := res.ref;
    let_fun this := ⋯;
    let s := s.cast this;
    let s := s.pushRef newRef;
    go aig_1 (curr + 1) s ⋯ (lhs.cast this) (rhs.cast this) f) =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo

case isFalse
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : ¬curr < len
hgo :
  (let_fun this := ⋯;
    { aig := aig, stream := this ▸ s }) =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  (let res := f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ };
    let aig_1 := res.aig;
    let newRef := res.ref;
    let_fun this := ⋯;
    let s := s.cast this;
    let s := s.pushRef newRef;
    go aig_1 (curr + 1) s ⋯ (lhs.cast this) (rhs.cast this) f) =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo

case isFalse
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : ¬curr < len
hgo :
  (let_fun this := ⋯;
    { aig := aig, stream := this ▸ s }) =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Tactic:
. dsimp at hgo
  rw [← hgo]
  intro hfoo
  rw [go_getRef_aux]
  rw [AIG.RefStream.getRef_push_ref_lt]
  . simp only [Ref.cast, Ref.mk.injEq]
    rw [AIG.RefStream.getRef_cast]
    . simp
    . assumption
  . apply go_le_size
Proof state after:
case isFalse
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : ¬curr < len
hgo :
  (let_fun this := ⋯;
    { aig := aig, stream := this ▸ s }) =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isFalse
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : ¬curr < len
hgo :
  (let_fun this := ⋯;
    { aig := aig, stream := this ▸ s }) =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Tactic:
. dsimp at hgo
  rw [← hgo]
  simp only [Nat.le_refl, getRef, Ref_cast', Ref.mk.injEq, true_implies]
  congr
  . omega
  . simp
Proof state after:
no goals
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  (let res := f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ };
    let aig_1 := res.aig;
    let newRef := res.ref;
    let_fun this := ⋯;
    let s := s.cast this;
    let s := s.pushRef newRef;
    go aig_1 (curr + 1) s ⋯ (lhs.cast this) (rhs.cast this) f) =
    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 isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
⊢ ∀ (hfoo : aig.decls.size ≤ res.aig.decls.size), res.stream.getRef idx ⋯ = (s.getRef idx hidx).cast hfoo
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    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 isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
⊢ ∀
    (hfoo :
      aig.decls.size ≤
        (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
                ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
                (rhs.cast ⋯) f).aig.decls.size),
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
              ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
              (rhs.cast ⋯) f).stream.getRef
        idx ⋯ =
      (s.getRef idx hidx).cast hfoo
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
⊢ ∀
    (hfoo :
      aig.decls.size ≤
        (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
                ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
                (rhs.cast ⋯) f).aig.decls.size),
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
              ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
              (rhs.cast ⋯) f).stream.getRef
        idx ⋯ =
      (s.getRef idx hidx).cast hfoo
Tactic:
intro hfoo
Proof state after:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).stream.getRef
      idx ⋯ =
    (s.getRef idx hidx).cast hfoo
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue.hfoo
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size

case isTrue.hfoo
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
Tactic:
. apply go_le_size
Proof state after:
no goals
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).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
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ ((s.cast ⋯).getRef idx ?isTrue.hidx).gate = (s.getRef idx hidx).gate
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).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
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ ((s.getRef idx ?isTrue.hidx).cast ⋯).gate = (s.getRef idx hidx).gate

case isTrue.hidx
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ idx < curr
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ ((s.getRef idx ?isTrue.hidx).cast ⋯).gate = (s.getRef idx hidx).gate

case isTrue.hidx
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ idx < curr
Tactic:
. simp
Proof state after:
case isTrue.hidx
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ idx < curr
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue.hidx
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ idx < curr
Tactic:
. assumption
Proof state after:
no goals
Theorem: AIG.RefStream.zip.go_getRef_aux
Proof state before:
case isTrue
α : Type
inst✝³ : BEq α
inst✝² : Hashable α
inst✝¹ : DecidableEq α
aig✝ : AIG α
len : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ len
s : aig.RefStream curr
lhs rhs : aig.RefStream len
f : (aig : AIG α) → aig.BinaryInput → Entrypoint α
inst✝ : LawfulOperator α BinaryInput f
chainable : LawfulZipOperator α f
idx : Nat
hidx : idx < curr
res : RefStreamEntry α len
h✝ : curr < len
hgo :
  go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
      ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
      (rhs.cast ⋯) f =
    res
hfoo :
  aig.decls.size ≤
    (go (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1)
            ((s.cast ⋯).pushRef (f aig { lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) ⋯ (lhs.cast ⋯)
            (rhs.cast ⋯) f).aig.decls.size
⊢ ((s.getRef idx ?isTrue.hidx).cast ⋯).gate = (s.getRef idx hidx).gate
Tactic:
simp
Proof state after:
no goals