Theorem: Matroid.cl_diff_singleton_eq_cl (Matroid/Closure.lean)

State before:
α : Type u_1
ι : Type u_2
M : Matroid α
F I J X Y B C R : Set α
e f x y : α
h : e ∈ M.cl (X \ {e})
⊢ M.cl (X \ {e}) = M.cl X
Tactic:
refine' (em (e ∈ X)).elim (fun h' ↦ _) (fun h' ↦ by rw [diff_singleton_eq_self h'])
State after:
α : Type u_1
ι : Type u_2
M : Matroid α
F I J X Y B C R : Set α
e f x y : α
h : e ∈ M.cl (X \ {e})
h' : e ∈ X
⊢ M.cl (X \ {e}) = M.cl X

State before:
α : Type u_1
ι : Type u_2
M : Matroid α
F I J X Y B C R : Set α
e f x y : α
h : e ∈ M.cl (X \ {e})
h' : e ∈ X
⊢ M.cl (X \ {e}) = M.cl X
Tactic:
convert M.cl_insert_cl_eq_cl_insert e (X \ {e}) using 1
State after:
case h.e'_2
α : Type u_1
ι : Type u_2
M : Matroid α
F I J X Y B C R : Set α
e f x y : α
h : e ∈ M.cl (X \ {e})
h' : e ∈ X
⊢ M.cl (X \ {e}) = M.cl (insert e (M.cl (X \ {e})))

case h.e'_3
α : Type u_1
ι : Type u_2
M : Matroid α
F I J X Y B C R : Set α
e f x y : α
h : e ∈ M.cl (X \ {e})
h' : e ∈ X
⊢ M.cl X = M.cl (insert e (X \ {e}))

State before:
case h.e'_3
α : Type u_1
ι : Type u_2
M : Matroid α
F I J X Y B C R : Set α
e f x y : α
h : e ∈ M.cl (X \ {e})
h' : e ∈ X
⊢ M.cl X = M.cl (insert e (X \ {e}))
Tactic:
rw [insert_diff_singleton, insert_eq_of_mem h']
State after:
no goals

State before:
α : Type u_1
ι : Type u_2
M : Matroid α
F I J X Y B C R : Set α
e f x y : α
h : e ∈ M.cl (X \ {e})
h' : e ∉ X
⊢ M.cl (X \ {e}) = M.cl X
Tactic:
rw [diff_singleton_eq_self h']
State after:
no goals

State before:
case h.e'_2
α : Type u_1
ι : Type u_2
M : Matroid α
F I J X Y B C R : Set α
e f x y : α
h : e ∈ M.cl (X \ {e})
h' : e ∈ X
⊢ M.cl (X \ {e}) = M.cl (insert e (M.cl (X \ {e})))
Tactic:
rw [insert_eq_of_mem h, cl_cl]
State after:
no goals