Theorem: AIG.mkConstCached_hit_aig (LeanSAT/AIG/CachedLemmas.lean)

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
val : Bool
aig : AIG α
hit : CacheHit aig.decls (Decl.const val)
hcache : aig.cache.find? (Decl.const val) = some hit
⊢ (aig.mkConstCached val).aig = aig
Tactic:
simp only [mkConstCached]
State after:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
val : Bool
aig : AIG α
hit : CacheHit aig.decls (Decl.const val)
hcache : aig.cache.find? (Decl.const val) = some hit
⊢ (match aig.cache.find? (Decl.const val) with
      | some hit =>
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := hit.idx, hgate := ⋯ } }
      | none =>
        {
          aig :=
            { decls := aig.decls.push (Decl.const val), cache := Cache.insert aig.decls aig.cache (Decl.const val),
              inv := ⋯ },
          ref := { gate := aig.decls.size, hgate := ⋯ } }).aig =
    aig

State before:
α : Type
inst✝² : BEq α
inst✝¹ : Hashable α
inst✝ : DecidableEq α
val : Bool
aig : AIG α
hit : CacheHit aig.decls (Decl.const val)
hcache : aig.cache.find? (Decl.const val) = some hit
⊢ (match aig.cache.find? (Decl.const val) with
      | some hit =>
        { aig := { decls := aig.decls, cache := aig.cache, inv := ⋯ }, ref := { gate := hit.idx, hgate := ⋯ } }
      | none =>
        {
          aig :=
            { decls := aig.decls.push (Decl.const val), cache := Cache.insert aig.decls aig.cache (Decl.const val),
              inv := ⋯ },
          ref := { gate := aig.decls.size, hgate := ⋯ } }).aig =
    aig
Tactic:
split <;> simp_all
State after:
no goals