internlm/Lean-Github huggingface dataset:
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr = idx
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef idx hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef idx hidx1 }, assign⟧
Tactic:
subst heq
Proof state after:
case isTrue.inl
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef curr hidx1 }, assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef curr hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef curr hidx1 }, assign⟧
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef curr hidx1 }, assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef curr hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef curr hidx1 }, assign⟧
Tactic:
rw [← hgo]
Proof state after:
case isTrue.inl
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ⟦{
        aig :=
          (go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
              { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
              ((s.cast ⋯).pushRef
                (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref)).aig,
        ref :=
          (go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
                  { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
                  ((s.cast ⋯).pushRef
                    (aig.mkIfCached
                        { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref)).stream.getRef
            curr hidx1 },
      assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef curr hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef curr hidx1 }, assign⟧
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ⟦{
        aig :=
          (go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
              { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
              ((s.cast ⋯).pushRef
                (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref)).aig,
        ref := (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref.cast ⋯ },
      assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef curr hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef curr hidx1 }, assign⟧

case isTrue.inl.hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ curr = curr
Tactic:
. rw [go_denote_mem_prefix]
  . simp
  . simp [Ref.hgate]
Proof state after:
case isTrue.inl.hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ curr = curr
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl.hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ curr = curr
Tactic:
. omega
Proof state after:
no goals
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ⟦{ aig := (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig,
        ref :=
          {
            gate :=
              ((aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref.cast
                  ⋯).gate,
            hgate := ?isTrue.inl.hstart } },
      assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef curr hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef curr hidx1 }, assign⟧

case isTrue.inl.hstart
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ((aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref.cast ⋯).gate <
    (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size
Tactic:
. simp
Proof state after:
case isTrue.inl.hstart
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ((aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref.cast ⋯).gate <
    (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl.hstart
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ((aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref.cast ⋯).gate <
    (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size
Tactic:
. simp [Ref.hgate]
Proof state after:
no goals
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ⟦{ aig := (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig,
        ref :=
          {
            gate :=
              ((aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref.cast
                  ⋯).gate,
            hgate := ?isTrue.inl.hstart } },
      assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef curr hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef curr hidx1 }, assign⟧
Tactic:
simp
Proof state after:
no goals
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl.hstart
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ ((aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref.cast ⋯).gate <
    (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig.decls.size
Tactic:
simp [Ref.hgate]
Proof state after:
no goals
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inl.hidx
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
hidx1 : curr < w
hidx2 : curr ≤ curr
⊢ curr = curr
Tactic:
omega
Proof state after:
no goals
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inr
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ ⟦{ aig := res.aig, ref := res.stream.getRef idx hidx1 }, assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef idx hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef idx hidx1 }, assign⟧
Tactic:
rw [← hgo]
Proof state after:
case isTrue.inr
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ ⟦{
        aig :=
          (go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
              { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
              ((s.cast ⋯).pushRef
                (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref)).aig,
        ref :=
          (go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
                  { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
                  ((s.cast ⋯).pushRef
                    (aig.mkIfCached
                        { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref)).stream.getRef
            idx hidx1 },
      assign⟧ =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef idx hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef idx hidx1 }, assign⟧
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inr
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ (if
        ⟦{ aig := (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig,
              ref := { gate := discr.gate, hgate := ⋯ } },
            assign⟧ =
          true then
      ⟦{ aig := (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig,
          ref := (lhs.cast ⋯).getRef idx hidx1 },
        assign⟧
    else
      ⟦{ aig := (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig,
          ref := (rhs.cast ⋯).getRef idx hidx1 },
        assign⟧) =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef idx hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef idx hidx1 }, assign⟧

case isTrue.inr.a
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ curr + 1 ≤ idx
Tactic:
. rw [LawfulOperator.denote_mem_prefix (f := mkIfCached)]
  rw [LawfulOperator.denote_mem_prefix (f := mkIfCached)]
  rw [LawfulOperator.denote_mem_prefix (f := mkIfCached)]
  . simp
  . simp [Ref.hgate]
  . simp [Ref.hgate]
  . simp [Ref.hgate]
Proof state after:
case isTrue.inr.a
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ curr + 1 ≤ idx
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inr.a
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ curr + 1 ≤ idx
Tactic:
. omega
Proof state after:
no goals
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inr
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ ((lhs.cast ⋯).getRef idx hidx1).gate < aig.decls.size

case isTrue.inr
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ ((lhs.cast ⋯).getRef idx hidx1).gate < aig.decls.size
Tactic:
. simp [Ref.hgate]
Proof state after:
no goals
Theorem: AIG.RefStream.ite.denote_go
Proof state before:
case isTrue.inr
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
w : Nat
aig : AIG α
curr : Nat
hcurr : curr ≤ w
discr : aig.Ref
lhs rhs : aig.RefStream w
s : aig.RefStream curr
idx : Nat
hidx1 : idx < w
hidx2 : curr ≤ idx
res : RefStreamEntry α w
h✝ : curr < w
hgo :
  go (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).aig (curr + 1) ⋯
      { gate := discr.gate, hgate := ⋯ } (lhs.cast ⋯) (rhs.cast ⋯)
      ((s.cast ⋯).pushRef
        (aig.mkIfCached { discr := discr, lhs := lhs.getRef curr h✝, rhs := rhs.getRef curr h✝ }).ref) =
    res
heq : curr < idx
⊢ (if ⟦{ aig := aig, ref := { gate := discr.gate, hgate := ?isTrue.inr } }, assign⟧ = true then
      ⟦{ aig := aig, ref := { gate := ((lhs.cast ⋯).getRef idx hidx1).gate, hgate := ?isTrue.inr } }, assign⟧
    else ⟦{ aig := aig, ref := { gate := ((rhs.cast ⋯).getRef idx hidx1).gate, hgate := ?isTrue.inr } }, assign⟧) =
    if ⟦{ aig := aig, ref := discr }, assign⟧ = true then ⟦{ aig := aig, ref := lhs.getRef idx hidx1 }, assign⟧
    else ⟦{ aig := aig, ref := rhs.getRef idx hidx1 }, assign⟧
Tactic:
simp
Proof state after:
no goals