Theorem: Subtype.embeddingInsert_apply_mem (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)
hx : ↑x ∈ s
⊢ (embeddingInsert f ha hb) x = f ⟨↑x, hx⟩
Tactic:
nth_rw 1 [show x = inclusion (subset_insert a s) ⟨x,hx⟩ from rfl]
State after:
α : 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)
hx : ↑x ∈ s
⊢ (embeddingInsert f ha hb) (inclusion ⋯ ⟨↑x, hx⟩) = f ⟨↑x, hx⟩

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)
hx : ↑x ∈ s
⊢ (embeddingInsert f ha hb) (inclusion ⋯ ⟨↑x, hx⟩) = f ⟨↑x, hx⟩
Tactic:
simp only [embeddingInsert,  Embedding.coeFn_mk]
State after:
α : 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)
hx : ↑x ∈ s
⊢ extend (inclusion ⋯) (⇑f) (fun x => b) (inclusion ⋯ ⟨↑x, hx⟩) = f ⟨↑x, hx⟩

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)
hx : ↑x ∈ s
⊢ extend (inclusion ⋯) (⇑f) (fun x => b) (inclusion ⋯ ⟨↑x, hx⟩) = f ⟨↑x, hx⟩
Tactic:
rw [(inclusion_injective (subset_insert a s)).extend_apply]
State after:
no goals