Theorem: Matroid.sigma_basis_iff
File: Mathlib/Data/Matroid/Sum.lean

Proof steps:
state_before: ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
⊢ (Matroid.sigma M).Basis I X ↔ ∀ (i : ι), (M i).Basis (Sigma.mk i ⁻¹' I) (Sigma.mk i ⁻¹' X)
state_after: ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
⊢ (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)) →
    ((I ⊆ X ∧
        (∀ ⦃y : Set ((i : ι) × α i)⦄, (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' y)) → y ⊆ X → I ⊆ y → I = y) ∧
          X ⊆ univ.sigma fun i => (M i).E) ↔
      (∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X) ∧
        (∀ (x : ι) ⦃y : Set (α x)⦄,
            (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y) ∧
          ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E)
tactic: simp only [Basis, sigma_indep_iff, mem_maximals_iff, mem_setOf_eq, and_imp, and_assoc,
    sigma_ground_eq, forall_and, and_congr_right_iff]
state_before: ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
⊢ (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)) →
    ((I ⊆ X ∧
        (∀ ⦃y : Set ((i : ι) × α i)⦄, (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' y)) → y ⊆ X → I ⊆ y → I = y) ∧
          X ⊆ univ.sigma fun i => (M i).E) ↔
      (∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X) ∧
        (∀ (x : ι) ⦃y : Set (α x)⦄,
            (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y) ∧
          ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E)
state_after: case refine_1
ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
hI : ∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)
x✝ :
  I ⊆ X ∧
    (∀ ⦃y : Set ((i : ι) × α i)⦄, (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' y)) → y ⊆ X → I ⊆ y → I = y) ∧
      X ⊆ univ.sigma fun i => (M i).E
hIX : I ⊆ X
h : ∀ ⦃y : Set ((i : ι) × α i)⦄, (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' y)) → y ⊆ X → I ⊆ y → I = y
h' : X ⊆ univ.sigma fun i => (M i).E
i : ι
I₀ : Set (α i)
hI₀ : (M i).Indep I₀
hI₀X : I₀ ⊆ Sigma.mk i ⁻¹' X
hII₀ : Sigma.mk i ⁻¹' I ⊆ I₀
⊢ Sigma.mk i ⁻¹' I = I₀

case refine_2
ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
hI : ∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)
x✝ :
  I ⊆ X ∧
    (∀ ⦃y : Set ((i : ι) × α i)⦄, (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' y)) → y ⊆ X → I ⊆ y → I = y) ∧
      X ⊆ univ.sigma fun i => (M i).E
hIX : I ⊆ X
h : ∀ ⦃y : Set ((i : ι) × α i)⦄, (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' y)) → y ⊆ X → I ⊆ y → I = y
h' : X ⊆ univ.sigma fun i => (M i).E
⊢ ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E

case refine_3
ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
hI : ∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)
x✝ :
  (∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X) ∧
    (∀ (x : ι) ⦃y : Set (α x)⦄, (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y) ∧
      ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E
hIX : ∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X
h' : ∀ (x : ι) ⦃y : Set (α x)⦄, (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y
h'' : ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E
⊢ I ⊆ X

case refine_4
ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
hI : ∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)
x✝ :
  (∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X) ∧
    (∀ (x : ι) ⦃y : Set (α x)⦄, (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y) ∧
      ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E
hIX : ∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X
h' : ∀ (x : ι) ⦃y : Set (α x)⦄, (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y
h'' : ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E
⊢ ∀ ⦃y : Set ((i : ι) × α i)⦄, (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' y)) → y ⊆ X → I ⊆ y → I = y

case refine_5
ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
hI : ∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)
x✝ :
  (∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X) ∧
    (∀ (x : ι) ⦃y : Set (α x)⦄, (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y) ∧
      ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E
hIX : ∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X
h' : ∀ (x : ι) ⦃y : Set (α x)⦄, (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y
h'' : ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E
⊢ X ⊆ univ.sigma fun i => (M i).E
tactic: refine fun hI ↦ ⟨fun ⟨hIX, h, h'⟩ ↦ ⟨fun i ↦ preimage_mono hIX, fun i I₀ hI₀ hI₀X hII₀ ↦ ?_, ?_⟩,
    fun ⟨hIX, h', h''⟩ ↦ ⟨?_, ?_, ?_⟩⟩
state_before: case refine_5
ι : Type u_1
α : ι → Type u_2
M : (i : ι) → Matroid (α i)
I X : Set ((i : ι) × α i)
hI : ∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)
x✝ :
  (∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X) ∧
    (∀ (x : ι) ⦃y : Set (α x)⦄, (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y) ∧
      ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E
hIX : ∀ (x : ι), Sigma.mk x ⁻¹' I ⊆ Sigma.mk x ⁻¹' X
h' : ∀ (x : ι) ⦃y : Set (α x)⦄, (M x).Indep y → y ⊆ Sigma.mk x ⁻¹' X → Sigma.mk x ⁻¹' I ⊆ y → Sigma.mk x ⁻¹' I = y
h'' : ∀ (x : ι), Sigma.mk x ⁻¹' X ⊆ (M x).E
⊢ X ⊆ univ.sigma fun i => (M i).E
state_after: no goals
tactic: exact fun ⟨i,x⟩ hx ↦ by simpa using h'' i hx