Theorem: FreeCommRing.isSupported_of
File: Mathlib/RingTheory/FreeCommRing.lean

Proof steps:
state_before: α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
⊢ p ∈ s
state_after: α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this : DecidablePred s
⊢ p ∈ s
tactic: haveI := Classical.decPred s
state_before: α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
this : ∀ (x : FreeCommRing α), x.IsSupported s → ∃ n, (lift fun a => if a ∈ s then 0 else X) x = ↑n
⊢ p ∈ s
state_after: α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
this : ∃ n, (lift fun a => if a ∈ s then 0 else X) (of p) = ↑n
⊢ p ∈ s
tactic: specialize this (of p) hps
state_before: α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
this : ∃ n, (lift fun a => if a ∈ s then 0 else X) (of p) = ↑n
⊢ p ∈ s
state_after: α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
this : ∃ n, (if p ∈ s then 0 else X) = ↑n
⊢ p ∈ s
tactic: rw [lift_of] at this
state_before: α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
this : ∃ n, (if p ∈ s then 0 else X) = ↑n
⊢ p ∈ s
state_after: case pos
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∈ s
this : ∃ n, 0 = ↑n
⊢ p ∈ s

case neg
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∉ s
this : ∃ n, X = ↑n
⊢ p ∈ s
tactic: split_ifs at this with h
state_before: case neg
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∉ s
this : ∃ n, X = ↑n
⊢ p ∈ s
state_after: case neg
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∉ s
this : ∃ n, X = ↑n
⊢ False
tactic: exfalso
state_before: case neg
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∉ s
this : ∃ n, X = ↑n
⊢ False
state_after: case neg
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∉ s
this : ∃ n, X = ↑n
⊢ 1 = 0
tactic: apply Ne.symm Int.zero_ne_one
state_before: case neg
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∉ s
this : ∃ n, X = ↑n
⊢ 1 = 0
state_after: case neg.intro
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this : DecidablePred s
h : p ∉ s
w : ℤ
H : X = ↑w
⊢ 1 = 0
tactic: rcases this with ⟨w, H⟩
state_before: case neg.intro
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this : DecidablePred s
h : p ∉ s
w : ℤ
H : X = ↑w
⊢ 1 = 0
state_after: case neg.intro
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this : DecidablePred s
h : p ∉ s
w : ℤ
H : X = C ↑w
⊢ 1 = 0
tactic: rw [← Polynomial.C_eq_intCast] at H
state_before: case neg.intro
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this : DecidablePred s
h : p ∉ s
w : ℤ
H : X = C ↑w
⊢ 1 = 0
state_after: case neg.intro
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∉ s
w : ℤ
H : X = C ↑w
this : X.coeff 1 = (C w).coeff 1
⊢ 1 = 0
tactic: have : Polynomial.X.coeff 1 = (Polynomial.C ↑w).coeff 1 := by rw [H]; rfl
state_before: case neg.intro
α : Type u
β : Type v
f : α → β
p : α
s : Set α
hps : (of p).IsSupported s
this✝ : DecidablePred s
h : p ∉ s
w : ℤ
H : X = C ↑w
this : X.coeff 1 = (C w).coeff 1
⊢ 1 = 0
state_after: no goals
tactic: rwa [Polynomial.coeff_C, if_neg (one_ne_zero : 1 ≠ 0), Polynomial.coeff_X, if_pos rfl] at this