Theorem: Matroid.mapEmbedding_basis_iff
File: Mathlib/Data/Matroid/Map.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
I X : Set β
⊢ (M.mapEmbedding f).Basis I X ↔ M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' X) ∧ I ⊆ X ∧ X ⊆ range ⇑f
state_after: α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
I X : Set β
⊢ (∃ I₀ X₀, M.Basis I₀ X₀ ∧ I = ⇑f '' I₀ ∧ X = ⇑f '' X₀) ↔ M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' X) ∧ I ⊆ X ∧ X ⊆ range ⇑f
tactic: rw [mapEmbedding, map_basis_iff']
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
I X : Set β
⊢ (∃ I₀ X₀, M.Basis I₀ X₀ ∧ I = ⇑f '' I₀ ∧ X = ⇑f '' X₀) ↔ M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' X) ∧ I ⊆ X ∧ X ⊆ range ⇑f
state_after: case refine_1
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
I X : Set β
⊢ (∃ I₀ X₀, M.Basis I₀ X₀ ∧ I = ⇑f '' I₀ ∧ X = ⇑f '' X₀) → M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' X) ∧ I ⊆ X ∧ X ⊆ range ⇑f

case refine_2
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
I X : Set β
x✝ : M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' X) ∧ I ⊆ X ∧ X ⊆ range ⇑f
hb : M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' X)
hIX : I ⊆ X
hX : X ⊆ range ⇑f
⊢ ∃ I₀ X₀, M.Basis I₀ X₀ ∧ I = ⇑f '' I₀ ∧ X = ⇑f '' X₀
tactic: refine ⟨?_, fun ⟨hb, hIX, hX⟩ ↦ ?_⟩
state_before: case refine_2
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
I X : Set β
x✝ : M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' X) ∧ I ⊆ X ∧ X ⊆ range ⇑f
hb : M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' X)
hIX : I ⊆ X
hX : X ⊆ range ⇑f
⊢ ∃ I₀ X₀, M.Basis I₀ X₀ ∧ I = ⇑f '' I₀ ∧ X = ⇑f '' X₀
state_after: case refine_2.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
I : Set β
X : Set α
x✝ : M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' (⇑f '' X)) ∧ I ⊆ ⇑f '' X ∧ ⇑f '' X ⊆ range ⇑f
hb : M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' (⇑f '' X))
hIX : I ⊆ ⇑f '' X
hX : ⇑f '' X ⊆ range ⇑f
⊢ ∃ I₀ X₀, M.Basis I₀ X₀ ∧ I = ⇑f '' I₀ ∧ ⇑f '' X = ⇑f '' X₀
tactic: obtain ⟨X, rfl⟩ := subset_range_iff_exists_image_eq.1 hX
state_before: case refine_2.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
I : Set β
X : Set α
x✝ : M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' (⇑f '' X)) ∧ I ⊆ ⇑f '' X ∧ ⇑f '' X ⊆ range ⇑f
hb : M.Basis (⇑f ⁻¹' I) (⇑f ⁻¹' (⇑f '' X))
hIX : I ⊆ ⇑f '' X
hX : ⇑f '' X ⊆ range ⇑f
⊢ ∃ I₀ X₀, M.Basis I₀ X₀ ∧ I = ⇑f '' I₀ ∧ ⇑f '' X = ⇑f '' X₀
state_after: case refine_2.intro.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
X : Set α
hX : ⇑f '' X ⊆ range ⇑f
I : Set α
x✝ : M.Basis (⇑f ⁻¹' (⇑f '' I)) (⇑f ⁻¹' (⇑f '' X)) ∧ ⇑f '' I ⊆ ⇑f '' X ∧ ⇑f '' X ⊆ range ⇑f
hb : M.Basis (⇑f ⁻¹' (⇑f '' I)) (⇑f ⁻¹' (⇑f '' X))
hIX : ⇑f '' I ⊆ ⇑f '' X
⊢ ∃ I₀ X₀, M.Basis I₀ X₀ ∧ ⇑f '' I = ⇑f '' I₀ ∧ ⇑f '' X = ⇑f '' X₀
tactic: obtain ⟨I, -, rfl⟩ := subset_image_iff.1 hIX
state_before: case refine_2.intro.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : α ↪ β
X : Set α
hX : ⇑f '' X ⊆ range ⇑f
I : Set α
x✝ : M.Basis (⇑f ⁻¹' (⇑f '' I)) (⇑f ⁻¹' (⇑f '' X)) ∧ ⇑f '' I ⊆ ⇑f '' X ∧ ⇑f '' X ⊆ range ⇑f
hb : M.Basis (⇑f ⁻¹' (⇑f '' I)) (⇑f ⁻¹' (⇑f '' X))
hIX : ⇑f '' I ⊆ ⇑f '' X
⊢ ∃ I₀ X₀, M.Basis I₀ X₀ ∧ ⇑f '' I = ⇑f '' I₀ ∧ ⇑f '' X = ⇑f '' X₀
state_after: no goals
tactic: exact ⟨I, X, by simpa [preimage_image_eq _ f.injective] using hb⟩