Theorem: Matroid.SkewFamily.sum_er_eq_er_iUnion (Matroid/Modular.lean)

State before:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
⊢ ∑ i : ι, M.er (Xs i) = M.er (⋃ i, Xs i)
Tactic:
choose Is hIs using fun i ↦ M.exists_basis (Xs i) (h.subset_ground_of_mem i)
State after:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is✝ : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
Is : ι → Set α
hIs : ∀ (i : ι), M.Basis (Is i) (Xs i)
⊢ ∑ i : ι, M.er (Xs i) = M.er (⋃ i, Xs i)

State before:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is✝ : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
Is : ι → Set α
hIs : ∀ (i : ι), M.Basis (Is i) (Xs i)
⊢ ∑ i : ι, M.er (Xs i) = M.er (⋃ i, Xs i)
Tactic:
have hdj := (h.pairwise_disjoint_of_bases hIs)
State after:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is✝ : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
Is : ι → Set α
hIs : ∀ (i : ι), M.Basis (Is i) (Xs i)
hdj : Pairwise (Disjoint on fun i => Is i)
⊢ ∑ i : ι, M.er (Xs i) = M.er (⋃ i, Xs i)

State before:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is✝ : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
Is : ι → Set α
hIs : ∀ (i : ι), M.Basis (Is i) (Xs i)
hdj : Pairwise (Disjoint on fun i => Is i)
⊢ ∑ i : ι, M.er (Xs i) = M.er (⋃ i, Xs i)
Tactic:
rw [← pairwise_univ] at hdj
State after:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is✝ : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
Is : ι → Set α
hIs : ∀ (i : ι), M.Basis (Is i) (Xs i)
hdj : univ.Pairwise (Disjoint on fun i => Is i)
⊢ ∑ i : ι, M.er (Xs i) = M.er (⋃ i, Xs i)

State before:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is✝ : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
Is : ι → Set α
hIs : ∀ (i : ι), M.Basis (Is i) (Xs i)
hdj : univ.Pairwise (Disjoint on fun i => Is i)
⊢ ∑ i : ι, M.er (Xs i) = M.er (⋃ i, Xs i)
Tactic:
rw [(h.iUnion_basis_iUnion hIs).er_eq_encard, encard_iUnion _ hdj]
State after:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is✝ : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
Is : ι → Set α
hIs : ∀ (i : ι), M.Basis (Is i) (Xs i)
hdj : univ.Pairwise (Disjoint on fun i => Is i)
⊢ ∑ i : ι, M.er (Xs i) = ∑ i : ι, (Is i).encard

State before:
ι : Type u_1
α : Type u_2
M : Matroid α
B I J X X' Y Y' F : Set α
Xs Ys Js Is✝ : ι → Set α
i j : ι
e f : α
inst✝ : Fintype ι
h : M.SkewFamily Xs
Is : ι → Set α
hIs : ∀ (i : ι), M.Basis (Is i) (Xs i)
hdj : univ.Pairwise (Disjoint on fun i => Is i)
⊢ ∑ i : ι, M.er (Xs i) = ∑ i : ι, (Is i).encard
Tactic:
simp_rw [(hIs _).er_eq_encard]
State after:
no goals