Theorem: Dioph.inject_dummies_lem
File: Mathlib/NumberTheory/Dioph.lean

tactic: dsimp
state_before: α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
⊢ (∃ t, p (v ⊗ t) = 0) ↔ ∃ t, (Poly.map (inl ⊗ inr ∘ f) p) (v ⊗ t) = 0
state_after: α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
⊢ (∃ t, p (v ⊗ t) = 0) ↔ ∃ t, p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0

tactic: refine ⟨fun t => ?_, fun t => ?_⟩ <;> cases' t with t ht
state_before: α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
⊢ (∃ t, p (v ⊗ t) = 0) ↔ ∃ t, p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0
state_after: case refine_1.intro
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : β → ℕ
ht : p (v ⊗ t) = 0
⊢ ∃ t, p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0

case refine_2.intro
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : γ → ℕ
ht : p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0
⊢ ∃ t, p (v ⊗ t) = 0

tactic: exact ⟨(0 ::ₒ t) ∘ g, by rwa [this]⟩
state_before: case refine_1.intro
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : β → ℕ
ht : p (v ⊗ t) = 0
this : (v ⊗ (0 ::ₒ t) ∘ g) ∘ (inl ⊗ inr ∘ f) = v ⊗ t
⊢ ∃ t, p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0
state_after: no goals

tactic: try rw [inv]; rfl
state_before: case inr
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : β → ℕ
ht : p (v ⊗ t) = 0
b : β
⊢ (0 ::ₒ t) (g (f b)) = t b
state_after: no goals

tactic: rw [inv]
state_before: case inr
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : β → ℕ
ht : p (v ⊗ t) = 0
b : β
⊢ (0 ::ₒ t) (g (f b)) = t b
state_after: case inr
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : β → ℕ
ht : p (v ⊗ t) = 0
b : β
⊢ (0 ::ₒ t) (some b) = t b

tactic: rfl
state_before: case inr
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : β → ℕ
ht : p (v ⊗ t) = 0
b : β
⊢ (0 ::ₒ t) (some b) = t b
state_after: no goals

tactic: rwa [this]
state_before: α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : β → ℕ
ht : p (v ⊗ t) = 0
this : (v ⊗ (0 ::ₒ t) ∘ g) ∘ (inl ⊗ inr ∘ f) = v ⊗ t
⊢ p ((v ⊗ (0 ::ₒ t) ∘ g) ∘ (inl ⊗ inr ∘ f)) = 0
state_after: no goals

tactic: have : v ⊗ t ∘ f = (v ⊗ t) ∘ (inl ⊗ inr ∘ f) := funext fun s => by cases' s with a b <;> rfl
state_before: case refine_2.intro
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : γ → ℕ
ht : p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0
⊢ ∃ t, p (v ⊗ t) = 0
state_after: case refine_2.intro
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : γ → ℕ
ht : p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0
this : v ⊗ t ∘ f = (v ⊗ t) ∘ (inl ⊗ inr ∘ f)
⊢ ∃ t, p (v ⊗ t) = 0

tactic: exact ⟨t ∘ f, by rwa [this]⟩
state_before: case refine_2.intro
α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : γ → ℕ
ht : p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0
this : v ⊗ t ∘ f = (v ⊗ t) ∘ (inl ⊗ inr ∘ f)
⊢ ∃ t, p (v ⊗ t) = 0
state_after: no goals

tactic: cases' s with a b <;> rfl
state_before: α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : γ → ℕ
ht : p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0
s : α ⊕ β
⊢ (v ⊗ t ∘ f) s = ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) s
state_after: no goals

tactic: rwa [this]
state_before: α β γ : Type u
S S' : Set (α → ℕ)
f : β → γ
g : γ → Option β
inv : ∀ (x : β), g (f x) = some x
p : Poly (α ⊕ β)
v : α → ℕ
t : γ → ℕ
ht : p ((v ⊗ t) ∘ (inl ⊗ inr ∘ f)) = 0
this : v ⊗ t ∘ f = (v ⊗ t) ∘ (inl ⊗ inr ∘ f)
⊢ p (v ⊗ t ∘ f) = 0
state_after: no goals