Theorem: Nat.Linear.Certificate.of_combineHyps
File: src/lean/Init/Data/Nat/Linear.lean

tactic: match cs with
| [] => simp [combineHyps, denote] at *; exact h
| (k, c')::cs =>
  intro h₁ h₂
  have := PolyCnstr.denote_combine (ctx := ctx) (c₂ := PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')) h₁
  simp at this
  have := this h₂
  have ih := of_combineHyps ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c'))) cs
  exact ih h this
state_before: ctx : Context
c : PolyCnstr
cs : Certificate
h : PolyCnstr.denote ctx (combineHyps c cs) → False
⊢ PolyCnstr.denote ctx c → denote ctx cs

tactic: simp [combineHyps, denote] at *
state_before: ctx : Context
c : PolyCnstr
cs : Certificate
h : PolyCnstr.denote ctx (combineHyps c []) → False
⊢ PolyCnstr.denote ctx c → denote ctx []

tactic: exact h
state_before: ctx : Context
c : PolyCnstr
cs : Certificate
h : PolyCnstr.denote ctx c → False
⊢ PolyCnstr.denote ctx c → False

tactic: intro h₁ h₂
state_before: ctx : Context
c : PolyCnstr
cs✝ : Certificate
k : Nat
c' : ExprCnstr
cs : List (Nat × ExprCnstr)
h : PolyCnstr.denote ctx (combineHyps c ((k, c') :: cs)) → False
⊢ PolyCnstr.denote ctx c → denote ctx ((k, c') :: cs)

tactic: have := PolyCnstr.denote_combine (ctx := ctx) (c₂ := PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')) h₁
state_before: ctx : Context
c : PolyCnstr
cs✝ : Certificate
k : Nat
c' : ExprCnstr
cs : List (Nat × ExprCnstr)
h : PolyCnstr.denote ctx (combineHyps c ((k, c') :: cs)) → False
h₁ : PolyCnstr.denote ctx c
h₂ : ExprCnstr.denote ctx c'
⊢ denote ctx cs

tactic: simp at this
state_before: ctx : Context
c : PolyCnstr
cs✝ : Certificate
k : Nat
c' : ExprCnstr
cs : List (Nat × ExprCnstr)
h : PolyCnstr.denote ctx (combineHyps c ((k, c') :: cs)) → False
h₁ : PolyCnstr.denote ctx c
h₂ : ExprCnstr.denote ctx c'
this :
  PolyCnstr.denote ctx (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')) →
    PolyCnstr.denote ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')))
⊢ denote ctx cs

tactic: have := this h₂
state_before: ctx : Context
c : PolyCnstr
cs✝ : Certificate
k : Nat
c' : ExprCnstr
cs : List (Nat × ExprCnstr)
h : PolyCnstr.denote ctx (combineHyps c ((k, c') :: cs)) → False
h₁ : PolyCnstr.denote ctx c
h₂ : ExprCnstr.denote ctx c'
this :
  ExprCnstr.denote ctx c' → PolyCnstr.denote ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')))
⊢ denote ctx cs

tactic: have ih := of_combineHyps ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c'))) cs
state_before: ctx : Context
c : PolyCnstr
cs✝ : Certificate
k : Nat
c' : ExprCnstr
cs : List (Nat × ExprCnstr)
h : PolyCnstr.denote ctx (combineHyps c ((k, c') :: cs)) → False
h₁ : PolyCnstr.denote ctx c
h₂ : ExprCnstr.denote ctx c'
this✝ :
  ExprCnstr.denote ctx c' → PolyCnstr.denote ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')))
this : PolyCnstr.denote ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')))
⊢ denote ctx cs

tactic: exact ih h this
state_before: ctx : Context
c : PolyCnstr
cs✝ : Certificate
k : Nat
c' : ExprCnstr
cs : List (Nat × ExprCnstr)
h : PolyCnstr.denote ctx (combineHyps c ((k, c') :: cs)) → False
h₁ : PolyCnstr.denote ctx c
h₂ : ExprCnstr.denote ctx c'
this✝ :
  ExprCnstr.denote ctx c' → PolyCnstr.denote ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')))
this : PolyCnstr.denote ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c')))
ih :
  (PolyCnstr.denote ctx (combineHyps (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c'))) cs) →
      False) →
    PolyCnstr.denote ctx (PolyCnstr.combine c (PolyCnstr.mul (k + 1) (ExprCnstr.toNormPoly c'))) → denote ctx cs
⊢ denote ctx cs