internlm/Lean-Github huggingface dataset:
Theorem: BVExpr.bitblast.blastNot_eq_eval_getLsb
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
target : aig.RefStream w
assign : α → Bool
idx : Nat
hidx : idx < w
⊢ ⟦{ aig := (blastNot aig target).aig, ref := (blastNot aig target).stream.getRef idx hidx }, assign⟧ =
    !⟦{ aig := aig, ref := target.getRef idx hidx }, assign⟧
Tactic:
unfold blastNot
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
target : aig.RefStream w
assign : α → Bool
idx : Nat
hidx : idx < w
⊢ ⟦{ aig := (RefStream.map aig (RefStream.MapTarget.mk target mkNotCached)).aig,
        ref := (RefStream.map aig (RefStream.MapTarget.mk target mkNotCached)).stream.getRef idx hidx },
      assign⟧ =
    !⟦{ aig := aig, ref := target.getRef idx hidx }, assign⟧
Theorem: BVExpr.bitblast.blastNot_eq_eval_getLsb
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
w : Nat
aig : AIG α
target : aig.RefStream w
assign : α → Bool
idx : Nat
hidx : idx < w
⊢ ⟦{ aig := (RefStream.map aig (RefStream.MapTarget.mk target mkNotCached)).aig,
        ref := (RefStream.map aig (RefStream.MapTarget.mk target mkNotCached)).stream.getRef idx hidx },
      assign⟧ =
    !⟦{ aig := aig, ref := target.getRef idx hidx }, assign⟧
Tactic:
simp
Proof state after:
no goals
Theorem: bitvec_AndOrXor_1705
Proof state before:
⊢ ∀ (A B : BitVec 64), ((B == 0 || decide (A < B)) = true) = (A ≤ B + -1)
Tactic:
intros
Proof state after:
A✝ B✝ : BitVec 64
⊢ ((B✝ == 0 || decide (A✝ < B✝)) = true) = (A✝ ≤ B✝ + -1)
Theorem: bitvec_AndOrXor_1705
Proof state before:
A✝ B✝ : BitVec 64
⊢ ((B✝ == 0 || decide (A✝ < B✝)) = true) = (A✝ ≤ B✝ + -1)
Tactic:
bv_decide
Proof state after:
no goals
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
⊢ go start decls2 assign hbounds2 hdag2 = go start decls1 assign hbounds1 hdag1
Tactic:
unfold denote.go
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
⊢ (match elem : decls2[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls2 assign ⋯ hdag2;
      let rval := go rhs decls2 assign ⋯ hdag2;
      xor lval linv && xor rval rinv) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
⊢ (match elem : decls2[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls2 assign ⋯ hdag2;
      let rval := go rhs decls2 assign ⋯ hdag2;
      xor lval linv && xor rval rinv) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
have hidx1 := hprefix.idx_eq start hbounds1
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
⊢ (match elem : decls2[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls2 assign ⋯ hdag2;
      let rval := go rhs decls2 assign ⋯ hdag2;
      xor lval linv && xor rval rinv) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
⊢ (match elem : decls2[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls2 assign ⋯ hdag2;
      let rval := go rhs decls2 assign ⋯ hdag2;
      xor lval linv && xor rval rinv) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
split
Proof state after:
case h_1
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
b✝ : Bool
heq✝ : decls2[start] = Decl.const b✝
⊢ b✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv

case h_2
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
idx✝ : α
heq✝ : decls2[start] = Decl.atom idx✝
⊢ assign idx✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv

case h_3
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lidx✝ ridx✝ : Nat
linv✝ rinv✝ : Bool
heq✝ : decls2[start] = Decl.gate lidx✝ ridx✝ linv✝ rinv✝
⊢ (let_fun this := ⋯;
    let lval := go lidx✝ decls2 assign ⋯ hdag2;
    let rval := go ridx✝ decls2 assign ⋯ hdag2;
    xor lval linv✝ && xor rval rinv✝) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
case h_2
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
idx✝ : α
heq✝ : decls2[start] = Decl.atom idx✝
⊢ assign idx✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv

case h_3
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lidx✝ ridx✝ : Nat
linv✝ rinv✝ : Bool
heq✝ : decls2[start] = Decl.gate lidx✝ ridx✝ linv✝ rinv✝
⊢ (let_fun this := ⋯;
    let lval := go lidx✝ decls2 assign ⋯ hdag2;
    let rval := go ridx✝ decls2 assign ⋯ hdag2;
    xor lval linv✝ && xor rval rinv✝) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
. next heq =>
  rw [hidx1] at heq
  split <;> simp_all
Proof state after:
case h_3
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lidx✝ ridx✝ : Nat
linv✝ rinv✝ : Bool
heq✝ : decls2[start] = Decl.gate lidx✝ ridx✝ linv✝ rinv✝
⊢ (let_fun this := ⋯;
    let lval := go lidx✝ decls2 assign ⋯ hdag2;
    let rval := go ridx✝ decls2 assign ⋯ hdag2;
    xor lval linv✝ && xor rval rinv✝) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
case h_3
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lidx✝ ridx✝ : Nat
linv✝ rinv✝ : Bool
heq✝ : decls2[start] = Decl.gate lidx✝ ridx✝ linv✝ rinv✝
⊢ (let_fun this := ⋯;
    let lval := go lidx✝ decls2 assign ⋯ hdag2;
    let rval := go ridx✝ decls2 assign ⋯ hdag2;
    xor lval linv✝ && xor rval rinv✝) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
. next lhs rhs linv rinv heq =>
  rw [hidx1] at heq
  have foo := hdag1 start lhs rhs linv rinv hbounds1 heq
  have hidx2 := hprefix.idx_eq lhs (by omega)
  have hidx3 := hprefix.idx_eq rhs (by omega)
  split
  . simp_all
  . simp_all
  . simp_all
    congr 2
    . apply denote.go_eq_of_aig_eq
      assumption
    . apply denote.go_eq_of_aig_eq
      assumption
Proof state after:
no goals
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
case h_1
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
b✝ : Bool
heq✝ : decls2[start] = Decl.const b✝
⊢ b✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
next heq =>
rw [hidx1] at heq
split <;> simp_all
Proof state after:
no goals
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
b✝ : Bool
heq : decls2[start] = Decl.const b✝
⊢ b✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
rw [hidx1] at heq
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
b✝ : Bool
heq : decls1[start] = Decl.const b✝
⊢ b✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
b✝ : Bool
heq : decls1[start] = Decl.const b✝
⊢ b✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
split <;> simp_all
Proof state after:
no goals
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
case h_2
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
idx✝ : α
heq✝ : decls2[start] = Decl.atom idx✝
⊢ assign idx✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
next heq =>
rw [hidx1] at heq
split <;> simp_all
Proof state after:
no goals
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
idx✝ : α
heq : decls2[start] = Decl.atom idx✝
⊢ assign idx✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
rw [hidx1] at heq
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
idx✝ : α
heq : decls1[start] = Decl.atom idx✝
⊢ assign idx✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
idx✝ : α
heq : decls1[start] = Decl.atom idx✝
⊢ assign idx✝ =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
split <;> simp_all
Proof state after:
no goals
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
case h_3
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lidx✝ ridx✝ : Nat
linv✝ rinv✝ : Bool
heq✝ : decls2[start] = Decl.gate lidx✝ ridx✝ linv✝ rinv✝
⊢ (let_fun this := ⋯;
    let lval := go lidx✝ decls2 assign ⋯ hdag2;
    let rval := go ridx✝ decls2 assign ⋯ hdag2;
    xor lval linv✝ && xor rval rinv✝) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
next lhs rhs linv rinv heq =>
rw [hidx1] at heq
have foo := hdag1 start lhs rhs linv rinv hbounds1 heq
have hidx2 := hprefix.idx_eq lhs (by omega)
have hidx3 := hprefix.idx_eq rhs (by omega)
split
. simp_all
. simp_all
. simp_all
  congr 2
  . apply denote.go_eq_of_aig_eq
    assumption
  . apply denote.go_eq_of_aig_eq
    assumption
Proof state after:
no goals
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lhs rhs : Nat
linv rinv : Bool
heq : decls2[start] = Decl.gate lhs rhs linv rinv
⊢ (let_fun this := ⋯;
    let lval := go lhs decls2 assign ⋯ hdag2;
    let rval := go rhs decls2 assign ⋯ hdag2;
    xor lval linv && xor rval rinv) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
rw [hidx1] at heq
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lhs rhs : Nat
linv rinv : Bool
heq✝ : decls2[start] = Decl.gate lhs rhs linv rinv
heq : decls1[start] = Decl.gate lhs rhs linv rinv
⊢ (let_fun this := ⋯;
    let lval := go lhs decls2 assign ⋯ hdag2;
    let rval := go rhs decls2 assign ⋯ hdag2;
    xor lval linv && xor rval rinv) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Theorem: AIG.denote.go_eq_of_aig_eq
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lhs rhs : Nat
linv rinv : Bool
heq✝ : decls2[start] = Decl.gate lhs rhs linv rinv
heq : decls1[start] = Decl.gate lhs rhs linv rinv
⊢ (let_fun this := ⋯;
    let lval := go lhs decls2 assign ⋯ hdag2;
    let rval := go rhs decls2 assign ⋯ hdag2;
    xor lval linv && xor rval rinv) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv
Tactic:
have foo := hdag1 start lhs rhs linv rinv hbounds1 heq
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
decls1 decls2 : Array (Decl α)
start : Nat
hdag1 : IsDag α decls1
hdag2 : IsDag α decls2
hbounds1 : start < decls1.size
hbounds2 : start < decls2.size
hprefix : IsPrefix decls1 decls2
hidx1 : decls2[start] = decls1[start]
lhs rhs : Nat
linv rinv : Bool
heq✝ : decls2[start] = Decl.gate lhs rhs linv rinv
heq : decls1[start] = Decl.gate lhs rhs linv rinv
foo : lhs < start ∧ rhs < start
⊢ (let_fun this := ⋯;
    let lval := go lhs decls2 assign ⋯ hdag2;
    let rval := go rhs decls2 assign ⋯ hdag2;
    xor lval linv && xor rval rinv) =
    match elem : decls1[start] with
    | Decl.const b => b
    | Decl.atom v => assign v
    | Decl.gate lhs rhs linv rinv =>
      let_fun this := ⋯;
      let lval := go lhs decls1 assign ⋯ hdag1;
      let rval := go rhs decls1 assign ⋯ hdag1;
      xor lval linv && xor rval rinv