(aig : Std.Sat.AIG ℕ) →
  (upper : ℕ) →
    (h : upper < aig.decls.size) →
      (state : Std.Sat.AIG.toCNF.State aig) →
        (lhs rhs : Std.Sat.AIG.Fanin) →
          (this : lhs.gate < upper ∧ rhs.gate < upper) →
            (motive : { out // state.IsExtensionBy out lhs.gate ⋯ } → Sort u_1) →
              (x : { out // state.IsExtensionBy out lhs.gate ⋯ }) →
                ((lstate : Std.Sat.AIG.toCNF.State aig) →
                    (hlstate : state.IsExtensionBy lstate lhs.gate ⋯) → motive ⟨lstate, hlstate⟩) →
                  motive x