Theorem: Matroid.mapSetEmbedding_indep_iff'
File: Mathlib/Data/Matroid/Map.lean

tactic: simp only [mapSetEmbedding_indep_iff, subset_range_iff_exists_image_eq]
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set β
⊢ (M.mapSetEmbedding f).Indep I ↔ ∃ I₀, M.Indep ↑I₀ ∧ I = ⇑f '' I₀
state_after: α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set β
⊢ (M.Indep ↑(⇑f ⁻¹' I) ∧ ∃ t, ⇑f '' t = I) ↔ ∃ I₀, M.Indep ↑I₀ ∧ I = ⇑f '' I₀

tactic: constructor
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set β
⊢ (M.Indep ↑(⇑f ⁻¹' I) ∧ ∃ t, ⇑f '' t = I) ↔ ∃ I₀, M.Indep ↑I₀ ∧ I = ⇑f '' I₀
state_after: case mp
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set β
⊢ (M.Indep ↑(⇑f ⁻¹' I) ∧ ∃ t, ⇑f '' t = I) → ∃ I₀, M.Indep ↑I₀ ∧ I = ⇑f '' I₀

case mpr
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set β
⊢ (∃ I₀, M.Indep ↑I₀ ∧ I = ⇑f '' I₀) → M.Indep ↑(⇑f ⁻¹' I) ∧ ∃ t, ⇑f '' t = I

tactic: rintro ⟨I, hI, rfl⟩
state_before: case mpr
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set β
⊢ (∃ I₀, M.Indep ↑I₀ ∧ I = ⇑f '' I₀) → M.Indep ↑(⇑f ⁻¹' I) ∧ ∃ t, ⇑f '' t = I
state_after: case mpr.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set ↑M.E
hI : M.Indep ↑I
⊢ M.Indep ↑(⇑f ⁻¹' (⇑f '' I)) ∧ ∃ t, ⇑f '' t = ⇑f '' I

tactic: rw [preimage_image_eq _ f.injective]
state_before: case mpr.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set ↑M.E
hI : M.Indep ↑I
⊢ M.Indep ↑(⇑f ⁻¹' (⇑f '' I)) ∧ ∃ t, ⇑f '' t = ⇑f '' I
state_after: case mpr.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set ↑M.E
hI : M.Indep ↑I
⊢ M.Indep ↑I ∧ ∃ t, ⇑f '' t = ⇑f '' I

tactic: exact ⟨hI, _, rfl⟩
state_before: case mpr.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set ↑M.E
hI : M.Indep ↑I
⊢ M.Indep ↑I ∧ ∃ t, ⇑f '' t = ⇑f '' I
state_after: no goals

tactic: rintro ⟨hI, I, rfl⟩
state_before: case mp
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set β
⊢ (M.Indep ↑(⇑f ⁻¹' I) ∧ ∃ t, ⇑f '' t = I) → ∃ I₀, M.Indep ↑I₀ ∧ I = ⇑f '' I₀
state_after: case mp.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set ↑M.E
hI : M.Indep ↑(⇑f ⁻¹' (⇑f '' I))
⊢ ∃ I₀, M.Indep ↑I₀ ∧ ⇑f '' I = ⇑f '' I₀

tactic: exact ⟨I, by rwa [preimage_image_eq _ f.injective] at hI, rfl⟩
state_before: case mp.intro.intro
α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set ↑M.E
hI : M.Indep ↑(⇑f ⁻¹' (⇑f '' I))
⊢ ∃ I₀, M.Indep ↑I₀ ∧ ⇑f '' I = ⇑f '' I₀
state_after: no goals

tactic: rwa [preimage_image_eq _ f.injective] at hI
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I✝ s : Set α
M : Matroid α
N : Matroid β
f : ↑M.E ↪ β
I : Set ↑M.E
hI : M.Indep ↑(⇑f ⁻¹' (⇑f '' I))
⊢ M.Indep ↑I
state_after: no goals