Theorem: Option.pmap_eq_some_iff
File: Mathlib/Data/Option/Basic.lean

tactic: rcases x with (_|x)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
x : Option α
hf : ∀ (a : α), a ∈ x → p a
y : β
⊢ pmap f x hf = some y ↔ ∃ a H, f a ⋯ = y
state_after: case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
hf : ∀ (a : α), a ∈ none → p a
⊢ pmap f none hf = some y ↔ ∃ a H, f a ⋯ = y

case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
⊢ pmap f (some x) hf = some y ↔ ∃ a H, f a ⋯ = y

tactic: simp only [not_mem_none, exists_false, pmap, not_false_iff, exists_prop_of_false]
state_before: case none
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
hf : ∀ (a : α), a ∈ none → p a
⊢ pmap f none hf = some y ↔ ∃ a H, f a ⋯ = y
state_after: no goals

tactic: constructor
state_before: case some
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
⊢ pmap f (some x) hf = some y ↔ ∃ a H, f a ⋯ = y
state_after: case some.mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
⊢ pmap f (some x) hf = some y → ∃ a H, f a ⋯ = y

case some.mpr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
⊢ (∃ a H, f a ⋯ = y) → pmap f (some x) hf = some y

tactic: intro h
state_before: case some.mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
⊢ pmap f (some x) hf = some y → ∃ a H, f a ⋯ = y
state_after: case some.mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
h : pmap f (some x) hf = some y
⊢ ∃ a H, f a ⋯ = y

tactic: simp only [pmap, Option.some_inj] at h
state_before: case some.mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
h : pmap f (some x) hf = some y
⊢ ∃ a H, f a ⋯ = y
state_after: case some.mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
h : f x ⋯ = y
⊢ ∃ a H, f a ⋯ = y

tactic: exact ⟨x, rfl, h⟩
state_before: case some.mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
h : f x ⋯ = y
⊢ ∃ a H, f a ⋯ = y
state_after: no goals

tactic: rintro ⟨a, H, rfl⟩
state_before: case some.mpr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
y : β
x : α
hf : ∀ (a : α), a ∈ some x → p a
⊢ (∃ a H, f a ⋯ = y) → pmap f (some x) hf = some y
state_after: case some.mpr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
x : α
hf : ∀ (a : α), a ∈ some x → p a
a : α
H : some x = some a
⊢ pmap f (some x) hf = some (f a ⋯)

tactic: simp only [mem_def, Option.some_inj] at H
state_before: case some.mpr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
x : α
hf : ∀ (a : α), a ∈ some x → p a
a : α
H : some x = some a
⊢ pmap f (some x) hf = some (f a ⋯)
state_after: case some.mpr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
x : α
hf : ∀ (a : α), a ∈ some x → p a
a : α
H✝ : some x = some a
H : x = a
⊢ pmap f (some x) hf = some (f a ⋯)

tactic: simp only [H, pmap]
state_before: case some.mpr.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
p : α → Prop
f : (a : α) → p a → β
x : α
hf : ∀ (a : α), a ∈ some x → p a
a : α
H✝ : some x = some a
H : x = a
⊢ pmap f (some x) hf = some (f a ⋯)
state_after: no goals