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

Proof steps:
state_before: α : Type u
β : Type v
M✝ N✝ M : Matroid α
N : Matroid β
I X : Set (α ⊕ β)
⊢ (M.sum N).Basis I X ↔ M.Basis (Sum.inl ⁻¹' I) (Sum.inl ⁻¹' X) ∧ N.Basis (Sum.inr ⁻¹' I) (Sum.inr ⁻¹' X)
state_after: α : Type u
β : Type v
M✝ N✝ M : Matroid α
N : Matroid β
I X : Set (α ⊕ β)
⊢ M.Basis
        ((fun a => a.down) ''
          (Sigma.mk false ⁻¹'
            ((fun s => Sum.elim (fun x => ⟨false, x⟩) (fun x => ⟨true, x⟩) s) ''
              ((fun a =>
                  Sum.map (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm)
                    (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm) a) ''
                I))))
        ((fun a => a.down) ''
          (Sigma.mk false ⁻¹'
            ((fun s => Sum.elim (fun x => ⟨false, x⟩) (fun x => ⟨true, x⟩) s) ''
              ((fun a =>
                  Sum.map (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm)
                    (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm) a) ''
                X)))) ∧
      N.Basis
        ((fun a => a.down) ''
          (Sigma.mk true ⁻¹'
            ((fun s => Sum.elim (fun x => ⟨false, x⟩) (fun x => ⟨true, x⟩) s) ''
              ((fun a =>
                  Sum.map (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm)
                    (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm) a) ''
                I))))
        ((fun a => a.down) ''
          (Sigma.mk true ⁻¹'
            ((fun s => Sum.elim (fun x => ⟨false, x⟩) (fun x => ⟨true, x⟩) s) ''
              ((fun a =>
                  Sum.map (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm)
                    (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm) a) ''
                X)))) ↔
    M.Basis (Sum.inl ⁻¹' I) (Sum.inl ⁻¹' X) ∧ N.Basis (Sum.inr ⁻¹' I) (Sum.inr ⁻¹' X)
tactic: simp only [Matroid.sum, mapEquiv_basis_iff, Equiv.sumCongr_symm,
    Equiv.sumCongr_apply, Equiv.symm_symm, sigma_basis_iff, Bool.forall_bool, Equiv.ulift_apply,
    Equiv.sumEquivSigmaBool, Equiv.coe_fn_mk, Equiv.ulift]
state_before: α : Type u
β : Type v
M✝ N✝ M : Matroid α
N : Matroid β
I X : Set (α ⊕ β)
⊢ M.Basis
        ((fun a => a.down) ''
          (Sigma.mk false ⁻¹'
            ((fun s => Sum.elim (fun x => ⟨false, x⟩) (fun x => ⟨true, x⟩) s) ''
              ((fun a =>
                  Sum.map (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm)
                    (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm) a) ''
                I))))
        ((fun a => a.down) ''
          (Sigma.mk false ⁻¹'
            ((fun s => Sum.elim (fun x => ⟨false, x⟩) (fun x => ⟨true, x⟩) s) ''
              ((fun a =>
                  Sum.map (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm)
                    (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm) a) ''
                X)))) ∧
      N.Basis
        ((fun a => a.down) ''
          (Sigma.mk true ⁻¹'
            ((fun s => Sum.elim (fun x => ⟨false, x⟩) (fun x => ⟨true, x⟩) s) ''
              ((fun a =>
                  Sum.map (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm)
                    (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm) a) ''
                I))))
        ((fun a => a.down) ''
          (Sigma.mk true ⁻¹'
            ((fun s => Sum.elim (fun x => ⟨false, x⟩) (fun x => ⟨true, x⟩) s) ''
              ((fun a =>
                  Sum.map (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm)
                    (⇑{ toFun := ULift.down, invFun := ULift.up, left_inv := ⋯, right_inv := ⋯ }.symm) a) ''
                X)))) ↔
    M.Basis (Sum.inl ⁻¹' I) (Sum.inl ⁻¹' X) ∧ N.Basis (Sum.inr ⁻¹' I) (Sum.inr ⁻¹' X)
state_after: no goals
tactic: convert Iff.rfl <;> exact ext <| by simp