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

tactic: refine Subring.InClosure.recOn hxs ?_ ?_ ?_ ?_
state_before: α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) ((restriction s) x) = x
state_after: case refine_1
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) ((restriction s) 1) = 1

case refine_2
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) ((restriction s) (-1)) = -1

case refine_3
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ ∀ z ∈ of '' s,
    ∀ (n : FreeCommRing α),
      (map Subtype.val) ((restriction s) n) = n → (map Subtype.val) ((restriction s) (z * n)) = z * n

case refine_4
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ ∀ {x y : FreeCommRing α},
    (map Subtype.val) ((restriction s) x) = x →
      (map Subtype.val) ((restriction s) y) = y → (map Subtype.val) ((restriction s) (x + y)) = x + y

tactic: rw [RingHom.map_one]
state_before: case refine_1
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) ((restriction s) 1) = 1
state_after: case refine_1
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) 1 = 1

tactic: rfl
state_before: case refine_1
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) 1 = 1
state_after: no goals

tactic: rw [map_neg, map_one]
state_before: case refine_2
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) ((restriction s) (-1)) = -1
state_after: case refine_2
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) (-1) = -1

tactic: rfl
state_before: case refine_2
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ (map Subtype.val) (-1) = -1
state_after: no goals

tactic: rintro _ ⟨p, hps, rfl⟩ n ih
state_before: case refine_3
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ ∀ z ∈ of '' s,
    ∀ (n : FreeCommRing α),
      (map Subtype.val) ((restriction s) n) = n → (map Subtype.val) ((restriction s) (z * n)) = z * n
state_after: case refine_3.intro.intro
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
p : α
hps : p ∈ s
n : FreeCommRing α
ih : (map Subtype.val) ((restriction s) n) = n
⊢ (map Subtype.val) ((restriction s) (of p * n)) = of p * n

tactic: rw [RingHom.map_mul, restriction_of, dif_pos hps, RingHom.map_mul, map_of, ih]
state_before: case refine_3.intro.intro
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
p : α
hps : p ∈ s
n : FreeCommRing α
ih : (map Subtype.val) ((restriction s) n) = n
⊢ (map Subtype.val) ((restriction s) (of p * n)) = of p * n
state_after: no goals

tactic: intro x y ihx ihy
state_before: case refine_4
α : Type u
β : Type v
f : α → β
x : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x.IsSupported s
⊢ ∀ {x y : FreeCommRing α},
    (map Subtype.val) ((restriction s) x) = x →
      (map Subtype.val) ((restriction s) y) = y → (map Subtype.val) ((restriction s) (x + y)) = x + y
state_after: case refine_4
α : Type u
β : Type v
f : α → β
x✝ : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x✝.IsSupported s
x y : FreeCommRing α
ihx : (map Subtype.val) ((restriction s) x) = x
ihy : (map Subtype.val) ((restriction s) y) = y
⊢ (map Subtype.val) ((restriction s) (x + y)) = x + y

tactic: rw [RingHom.map_add, RingHom.map_add, ihx, ihy]
state_before: case refine_4
α : Type u
β : Type v
f : α → β
x✝ : FreeCommRing α
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
hxs : x✝.IsSupported s
x y : FreeCommRing α
ihx : (map Subtype.val) ((restriction s) x) = x
ihy : (map Subtype.val) ((restriction s) y) = y
⊢ (map Subtype.val) ((restriction s) (x + y)) = x + y
state_after: no goals