internlm/Lean-Github huggingface dataset:
Theorem: AIG.mkGateCached_decl_eq
Proof state before:
case h_2.h_8
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
input : aig.GateInput
res : Entrypoint α
x✝³ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝³ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝² x✝¹ : Decl α
linv✝ rinv✝ : Bool
heq✝² : aig.decls[input.rhs.ref.gate] = Decl.const false
heq✝¹ : input.lhs.inv = false
heq✝ : input.rhs.inv = true
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → False
hres :
  { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := input.lhs.ref.gate, hgate := ⋯ } } =
    res
⊢ ∀ (idx : Nat) (h1 : idx < res.aig.decls.size) (h2 : idx < aig.decls.size), res.aig.decls[idx] = aig.decls[idx]
Tactic:
rw [← hres]
Proof state after:
case h_2.h_8
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
input : aig.GateInput
res : Entrypoint α
x✝³ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝³ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝² x✝¹ : Decl α
linv✝ rinv✝ : Bool
heq✝² : aig.decls[input.rhs.ref.gate] = Decl.const false
heq✝¹ : input.lhs.inv = false
heq✝ : input.rhs.inv = true
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → False
hres :
  { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := input.lhs.ref.gate, hgate := ⋯ } } =
    res
⊢ ∀ (idx : Nat)
    (h1 :
      idx <
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
                ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }.aig.decls.size)
    (h2 : idx < aig.decls.size),
    { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
              ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }.aig.decls[idx] =
      aig.decls[idx]
Theorem: AIG.mkGateCached_decl_eq
Proof state before:
case h_2.h_8
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
input : aig.GateInput
res : Entrypoint α
x✝³ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝³ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝² x✝¹ : Decl α
linv✝ rinv✝ : Bool
heq✝² : aig.decls[input.rhs.ref.gate] = Decl.const false
heq✝¹ : input.lhs.inv = false
heq✝ : input.rhs.inv = true
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → False
hres :
  { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := input.lhs.ref.gate, hgate := ⋯ } } =
    res
⊢ ∀ (idx : Nat)
    (h1 :
      idx <
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
                ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }.aig.decls.size)
    (h2 : idx < aig.decls.size),
    { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
              ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }.aig.decls[idx] =
      aig.decls[idx]
Tactic:
intros
Proof state after:
case h_2.h_8
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
input : aig.GateInput
res : Entrypoint α
x✝³ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝³ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝² x✝¹ : Decl α
linv✝ rinv✝ : Bool
heq✝² : aig.decls[input.rhs.ref.gate] = Decl.const false
heq✝¹ : input.lhs.inv = false
heq✝ : input.rhs.inv = true
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → False
hres :
  { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := input.lhs.ref.gate, hgate := ⋯ } } =
    res
idx✝ : Nat
h1✝ :
  idx✝ <
    { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
            ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }.aig.decls.size
h2✝ : idx✝ < aig.decls.size
⊢ { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
            ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }.aig.decls[idx✝] =
    aig.decls[idx✝]
Theorem: AIG.mkGateCached_decl_eq
Proof state before:
case h_2.h_8
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
input : aig.GateInput
res : Entrypoint α
x✝³ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝³ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝² x✝¹ : Decl α
linv✝ rinv✝ : Bool
heq✝² : aig.decls[input.rhs.ref.gate] = Decl.const false
heq✝¹ : input.lhs.inv = false
heq✝ : input.rhs.inv = true
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → False
hres :
  { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := input.lhs.ref.gate, hgate := ⋯ } } =
    res
idx✝ : Nat
h1✝ :
  idx✝ <
    { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
            ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }.aig.decls.size
h2✝ : idx✝ < aig.decls.size
⊢ { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
            ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }.aig.decls[idx✝] =
    aig.decls[idx✝]
Tactic:
simp
Proof state after:
no goals
Theorem: AIG.mkGateCached_decl_eq
Proof state before:
case h_2.h_9
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
aig : AIG α
input : aig.GateInput
res : Entrypoint α
x✝¹⁰ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝⁹ x✝⁸ : Decl α
linv✝ rinv✝ : Bool
x✝⁷ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False
x✝⁶ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False
x✝⁵ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.rhs.inv = true → False
x✝⁴ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.rhs.inv = false → False
x✝³ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False
x✝² : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = true → input.rhs.inv = false → False
x✝¹ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False
x✝ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.lhs.inv = false → input.rhs.inv = true → False
hres :
  {
      aig :=
        { decls := aig.decls.push (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv),
          cache :=
            Cache.insert aig.decls aig.cache
              (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv),
          inv := ⋯ },
      ref := { gate := aig.decls.size, hgate := ⋯ } } =
    res
idx : Nat
h1 : idx < (aig.decls.push (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv)).size
h2 : idx < aig.decls.size
⊢ (if h : idx < aig.decls.size then aig.decls[idx]
    else Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) =
    aig.decls[idx]
Tactic:
simp [h2]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
⊢ ⟦aig.mkGateCached input, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
simp only [mkGateCached]
Proof state after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
⊢ ⟦match aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) with
      | some hit =>
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := hit.idx, hgate := ⋯ } }
      | none =>
        match aig.decls[input.lhs.ref.gate], aig.decls[input.rhs.ref.gate], input.lhs.inv, input.rhs.inv with
        | Decl.const true, x, true, x_1 => { decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false
        | Decl.const false, x, false, x_1 => { decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false
        | x, Decl.const true, x_1, true => { decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false
        | x, Decl.const false, x_1, false => { decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false
        | Decl.const true, x, false, false =>
          { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
            ref := { gate := input.rhs.ref.gate, hgate := ⋯ } }
        | Decl.const false, x, true, false =>
          { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
            ref := { gate := input.rhs.ref.gate, hgate := ⋯ } }
        | x, Decl.const true, false, false =>
          { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
            ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }
        | x, Decl.const false, false, true =>
          { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
            ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }
        | x, x_1, x_2, x_3 =>
          {
            aig :=
              { decls := aig.decls.push (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv),
                cache :=
                  Cache.insert aig.decls aig.cache
                    (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv),
                inv := ⋯ },
            ref := { gate := aig.decls.size, hgate := ⋯ } },
      assign⟧ =
    ⟦aig.mkGate input, assign⟧
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
case h_2
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
⊢ ⟦match aig.decls[input.lhs.ref.gate], aig.decls[input.rhs.ref.gate], input.lhs.inv, input.rhs.inv with
      | Decl.const true, x, true, x_1 => { decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false
      | Decl.const false, x, false, x_1 => { decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false
      | x, Decl.const true, x_1, true => { decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false
      | x, Decl.const false, x_1, false => { decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false
      | Decl.const true, x, false, false =>
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
          ref := { gate := input.rhs.ref.gate, hgate := ⋯ } }
      | Decl.const false, x, true, false =>
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
          ref := { gate := input.rhs.ref.gate, hgate := ⋯ } }
      | x, Decl.const true, false, false =>
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
          ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }
      | x, Decl.const false, false, true =>
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ },
          ref := { gate := input.lhs.ref.gate, hgate := ⋯ } }
      | x, x_1, x_2, x_3 =>
        {
          aig :=
            { decls := aig.decls.push (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv),
              cache :=
                Cache.insert aig.decls aig.cache
                  (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv),
              inv := ⋯ },
          ref := { gate := aig.decls.size, hgate := ⋯ } },
      assign⟧ =
    ⟦aig.mkGate input, assign⟧
Tactic:
. split
  . next heq _ =>
    simp_all [denote_idx_const heq]
  . next heq _ =>
    simp_all [denote_idx_const heq]
  . next heq _ _ _ =>
    simp_all [denote_idx_const heq]
  . next heq _ _ _ =>
    simp_all [denote_idx_const heq]
  . next heq _ _ _ =>
    simp_all [denote_idx_const heq]
  . next heq _ _ _ =>
    simp_all [denote_idx_const heq]
  . next heq _ _ _ _ =>
    simp_all [denote_idx_const heq]
  . next heq _ _ _ =>
    simp_all [denote_idx_const heq]
  . simp [mkGate, denote]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
case h_1
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
hit✝ : CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv)
heq✝ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = some hit✝
⊢ ⟦{ aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := hit✝.idx, hgate := ⋯ } }, assign⟧ =
    ⟦aig.mkGate input, assign⟧
Tactic:
next heq1 =>
rw [denote_mkGate_cached heq1]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
hit✝ : CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv)
heq1 : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = some hit✝
⊢ ⟦{ aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := hit✝.idx, hgate := ⋯ } }, assign⟧ =
    ⟦aig.mkGate input, assign⟧
Tactic:
rw [denote_mkGate_cached heq1]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
case h_2.h_9
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝¹⁰ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝⁹ x✝⁸ : Decl α
linv✝ rinv✝ : Bool
x✝⁷ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False
x✝⁶ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False
x✝⁵ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.rhs.inv = true → False
x✝⁴ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.rhs.inv = false → False
x✝³ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False
x✝² : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = true → input.rhs.inv = false → False
x✝¹ : aig.decls[input.rhs.ref.gate] = Decl.const true → input.lhs.inv = false → input.rhs.inv = false → False
x✝ : aig.decls[input.rhs.ref.gate] = Decl.const false → input.lhs.inv = false → input.rhs.inv = true → False
⊢ ⟦{
        aig :=
          { decls := aig.decls.push (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv),
            cache :=
              Cache.insert aig.decls aig.cache
                (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv),
            inv := ⋯ },
        ref := { gate := aig.decls.size, hgate := ⋯ } },
      assign⟧ =
    ⟦aig.mkGate input, assign⟧
Tactic:
. simp [mkGate, denote]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
case h_2.h_1
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝² : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝² : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝¹ x✝ : Decl α
linv✝ rinv✝ : Bool
heq✝¹ : aig.decls[input.lhs.ref.gate] = Decl.const true
heq✝ : input.lhs.inv = true
⊢ ⟦{ decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
next heq _ =>
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝² : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝¹ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝¹ x✝ : Decl α
linv✝ rinv✝ : Bool
heq : aig.decls[input.lhs.ref.gate] = Decl.const true
heq✝ : input.lhs.inv = true
⊢ ⟦{ decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
case h_2.h_2
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝² : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝² : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝¹ x✝ : Decl α
linv✝ rinv✝ : Bool
heq✝¹ : aig.decls[input.lhs.ref.gate] = Decl.const false
heq✝ : input.lhs.inv = false
⊢ ⟦{ decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
next heq _ =>
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝² : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝¹ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝¹ x✝ : Decl α
linv✝ rinv✝ : Bool
heq : aig.decls[input.lhs.ref.gate] = Decl.const false
heq✝ : input.lhs.inv = false
⊢ ⟦{ decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
case h_2.h_3
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝⁴ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝² : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝³ x✝² : Decl α
linv✝ rinv✝ : Bool
heq✝¹ : aig.decls[input.rhs.ref.gate] = Decl.const true
heq✝ : input.rhs.inv = true
x✝¹ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False
⊢ ⟦{ decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
next heq _ _ _ =>
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝⁴ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝¹ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝³ x✝² : Decl α
linv✝ rinv✝ : Bool
heq : aig.decls[input.rhs.ref.gate] = Decl.const true
heq✝ : input.rhs.inv = true
x✝¹ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False
⊢ ⟦{ decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
case h_2.h_4
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝⁴ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝² : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝³ x✝² : Decl α
linv✝ rinv✝ : Bool
heq✝¹ : aig.decls[input.rhs.ref.gate] = Decl.const false
heq✝ : input.rhs.inv = false
x✝¹ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False
⊢ ⟦{ decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
next heq _ _ _ =>
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝⁴ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝¹ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝³ x✝² : Decl α
linv✝ rinv✝ : Bool
heq : aig.decls[input.rhs.ref.gate] = Decl.const false
heq✝ : input.rhs.inv = false
x✝¹ : aig.decls[input.lhs.ref.gate] = Decl.const true → input.lhs.inv = true → False
x✝ : aig.decls[input.lhs.ref.gate] = Decl.const false → input.lhs.inv = false → False
⊢ ⟦{ decls := aig.decls, cache := aig.cache, inv := ⋯ }.mkConstCached false, assign⟧ = ⟦aig.mkGate input, assign⟧
Tactic:
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
case h_2.h_5
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝³ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝³ : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝² x✝¹ : Decl α
linv✝ rinv✝ : Bool
heq✝² : aig.decls[input.lhs.ref.gate] = Decl.const true
heq✝¹ : input.lhs.inv = false
heq✝ : input.rhs.inv = false
x✝ : aig.decls[input.rhs.ref.gate] = Decl.const false → False
⊢ ⟦{ aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := input.rhs.ref.gate, hgate := ⋯ } },
      assign⟧ =
    ⟦aig.mkGate input, assign⟧
Tactic:
next heq _ _ _ =>
simp_all [denote_idx_const heq]
Proof state after:
no goals
Theorem: AIG.mkGateCached_eval_eq_mkGate_eval
Proof state before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
assign : α → Bool
aig : AIG α
input : aig.GateInput
x✝³ : Option (CacheHit aig.decls (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv))
heq✝² : aig.cache.find? (Decl.gate input.lhs.ref.gate input.rhs.ref.gate input.lhs.inv input.rhs.inv) = none
x✝² x✝¹ : Decl α
linv✝ rinv✝ : Bool
heq : aig.decls[input.lhs.ref.gate] = Decl.const true
heq✝¹ : input.lhs.inv = false
heq✝ : input.rhs.inv = false
x✝ : aig.decls[input.rhs.ref.gate] = Decl.const false → False
⊢ ⟦{ aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := input.rhs.ref.gate, hgate := ⋯ } },
      assign⟧ =
    ⟦aig.mkGate input, assign⟧
Tactic:
simp_all [denote_idx_const heq]
Proof state after:
no goals