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

tactic: rw [base_iff_maximal_indep]
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
⊢ (M.map f hf).Base B ↔ ∃ B₀, M.Base B₀ ∧ B = f '' B₀
state_after: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
⊢ ((M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I) ↔ ∃ B₀, M.Base B₀ ∧ B = f '' B₀

tactic: refine ⟨fun ⟨h, h'⟩ ↦ ?_, ?_⟩
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
⊢ ((M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I) ↔ ∃ B₀, M.Base B₀ ∧ B = f '' B₀
state_after: case refine_1
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
x✝ : (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
h : (M.map f hf).Indep B
h' : ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
⊢ ∃ B₀, M.Base B₀ ∧ B = f '' B₀

case refine_2
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
⊢ (∃ B₀, M.Base B₀ ∧ B = f '' B₀) → (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I

tactic: rintro ⟨B, hB, rfl⟩
state_before: case refine_2
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
⊢ (∃ B₀, M.Base B₀ ∧ B = f '' B₀) → (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
state_after: case refine_2.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set α
hB : M.Base B
⊢ (M.map f hf).Indep (f '' B) ∧ ∀ (I : Set β), (M.map f hf).Indep I → f '' B ⊆ I → f '' B = I

tactic: refine ⟨hB.indep.map f hf, fun I hI hBI ↦ ?_⟩
state_before: case refine_2.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set α
hB : M.Base B
⊢ (M.map f hf).Indep (f '' B) ∧ ∀ (I : Set β), (M.map f hf).Indep I → f '' B ⊆ I → f '' B = I
state_after: case refine_2.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set α
hB : M.Base B
I : Set β
hI : (M.map f hf).Indep I
hBI : f '' B ⊆ I
⊢ f '' B = I

tactic: obtain ⟨I₀, hI₀, hbij⟩ := hI.exists_bijOn_of_map
state_before: case refine_2.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set α
hB : M.Base B
I : Set β
hI : (M.map f hf).Indep I
hBI : f '' B ⊆ I
⊢ f '' B = I
state_after: case refine_2.intro.intro.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set α
hB : M.Base B
I : Set β
hI : (M.map f hf).Indep I
hBI : f '' B ⊆ I
I₀ : Set α
hI₀ : M.Indep I₀
hbij : BijOn f I₀ I
⊢ f '' B = I

tactic: rw [← hbij.image_eq, hf.image_subset_image_iff hB.subset_ground hI₀.subset_ground] at hBI
state_before: case refine_2.intro.intro.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set α
hB : M.Base B
I : Set β
hI : (M.map f hf).Indep I
hBI : f '' B ⊆ I
I₀ : Set α
hI₀ : M.Indep I₀
hbij : BijOn f I₀ I
⊢ f '' B = I
state_after: case refine_2.intro.intro.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set α
hB : M.Base B
I : Set β
hI : (M.map f hf).Indep I
I₀ : Set α
hBI : B ⊆ I₀
hI₀ : M.Indep I₀
hbij : BijOn f I₀ I
⊢ f '' B = I

tactic: rw [hB.eq_of_subset_indep hI₀ hBI, hbij.image_eq]
state_before: case refine_2.intro.intro.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set α
hB : M.Base B
I : Set β
hI : (M.map f hf).Indep I
I₀ : Set α
hBI : B ⊆ I₀
hI₀ : M.Indep I₀
hbij : BijOn f I₀ I
⊢ f '' B = I
state_after: no goals

tactic: obtain ⟨B₀, hB₀, hbij⟩ := h.exists_bijOn_of_map
state_before: case refine_1
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
x✝ : (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
h : (M.map f hf).Indep B
h' : ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
⊢ ∃ B₀, M.Base B₀ ∧ B = f '' B₀
state_after: case refine_1.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
x✝ : (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
h : (M.map f hf).Indep B
h' : ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
B₀ : Set α
hB₀ : M.Indep B₀
hbij : BijOn f B₀ B
⊢ ∃ B₀, M.Base B₀ ∧ B = f '' B₀

tactic: refine ⟨B₀, hB₀.base_of_maximal fun J hJ hB₀J ↦ ?_, hbij.image_eq.symm⟩
state_before: case refine_1.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
x✝ : (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
h : (M.map f hf).Indep B
h' : ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
B₀ : Set α
hB₀ : M.Indep B₀
hbij : BijOn f B₀ B
⊢ ∃ B₀, M.Base B₀ ∧ B = f '' B₀
state_after: case refine_1.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
x✝ : (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
h : (M.map f hf).Indep B
h' : ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
B₀ : Set α
hB₀ : M.Indep B₀
hbij : BijOn f B₀ B
J : Set α
hJ : M.Indep J
hB₀J : B₀ ⊆ J
⊢ B₀ = J

tactic: rw [← hf.image_eq_image_iff hB₀.subset_ground hJ.subset_ground]
state_before: case refine_1.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
x✝ : (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
h : (M.map f hf).Indep B
h' : ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
B₀ : Set α
hB₀ : M.Indep B₀
hbij : BijOn f B₀ B
J : Set α
hJ : M.Indep J
hB₀J : B₀ ⊆ J
⊢ B₀ = J
state_after: case refine_1.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
x✝ : (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
h : (M.map f hf).Indep B
h' : ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
B₀ : Set α
hB₀ : M.Indep B₀
hbij : BijOn f B₀ B
J : Set α
hJ : M.Indep J
hB₀J : B₀ ⊆ J
⊢ f '' B₀ = f '' J

tactic: exact hbij.image_eq ▸ h' _ (hJ.map f hf) (hbij.image_eq ▸ image_subset f hB₀J)
state_before: case refine_1.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M✝ : Matroid α
N : Matroid β
M : Matroid α
f : α → β
hf : InjOn f M.E
B : Set β
x✝ : (M.map f hf).Indep B ∧ ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
h : (M.map f hf).Indep B
h' : ∀ (I : Set β), (M.map f hf).Indep I → B ⊆ I → B = I
B₀ : Set α
hB₀ : M.Indep B₀
hbij : BijOn f B₀ B
J : Set α
hJ : M.Indep J
hB₀J : B₀ ⊆ J
⊢ f '' B₀ = f '' J
state_after: no goals