Theorem: Subtype.embeddingInsert_apply_eq_ite (Matroid/ForMathlib/Logic_Embedding_Set.lean)

State before:
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
b : β
s : Set α
f✝ f : ↑s ↪ β
ha : a ∉ s
hb : b ∉ range ⇑f
x : ↑(insert a s)
inst✝ : DecidablePred fun x => x ∈ s
⊢ (embeddingInsert f ha hb) x = if hx : ↑x ∈ s then f ⟨↑x, hx⟩ else b
Tactic:
split_ifs with h
State after:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
b : β
s : Set α
f✝ f : ↑s ↪ β
ha : a ∉ s
hb : b ∉ range ⇑f
x : ↑(insert a s)
inst✝ : DecidablePred fun x => x ∈ s
h : ↑x ∈ s
⊢ (embeddingInsert f ha hb) x = f ⟨↑x, h⟩

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
b : β
s : Set α
f✝ f : ↑s ↪ β
ha : a ∉ s
hb : b ∉ range ⇑f
x : ↑(insert a s)
inst✝ : DecidablePred fun x => x ∈ s
h : ↑x ∉ s
⊢ (embeddingInsert f ha hb) x = b

State before:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
b : β
s : Set α
f✝ f : ↑s ↪ β
ha : a ∉ s
hb : b ∉ range ⇑f
x : ↑(insert a s)
inst✝ : DecidablePred fun x => x ∈ s
h : ↑x ∉ s
⊢ (embeddingInsert f ha hb) x = b
Tactic:
rwa [embeddingInsert_apply']
State after:
no goals

State before:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
a : α
b : β
s : Set α
f✝ f : ↑s ↪ β
ha : a ∉ s
hb : b ∉ range ⇑f
x : ↑(insert a s)
inst✝ : DecidablePred fun x => x ∈ s
h : ↑x ∈ s
⊢ (embeddingInsert f ha hb) x = f ⟨↑x, h⟩
Tactic:
rw [embeddingInsert_apply_mem]
State after:
no goals