Theorem: CompositionSeries.Equivalent.append
File: Mathlib/Order/JordanHolder.lean

tactic: intro i
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ t₁ t₂ : CompositionSeries X
hs : top s₁ = bot s₂
ht : top t₁ = bot t₂
h₁ : Equivalent s₁ t₁
h₂ : Equivalent s₂ t₂
e : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=
  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv
⊢ ∀ (i : Fin (CompositionSeries.append s₁ s₂ hs).length),
    Iso
      (series (CompositionSeries.append s₁ s₂ hs) (↑Fin.castSucc i),
        series (CompositionSeries.append s₁ s₂ hs) (Fin.succ i))
      (series (CompositionSeries.append t₁ t₂ ht) (↑Fin.castSucc (↑e i)),
        series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e i)))

tactic: refine' Fin.addCases _ _ i
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ t₁ t₂ : CompositionSeries X
hs : top s₁ = bot s₂
ht : top t₁ = bot t₂
h₁ : Equivalent s₁ t₁
h₂ : Equivalent s₂ t₂
e : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=
  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv
i : Fin (CompositionSeries.append s₁ s₂ hs).length
⊢ Iso
    (series (CompositionSeries.append s₁ s₂ hs) (↑Fin.castSucc i),
      series (CompositionSeries.append s₁ s₂ hs) (Fin.succ i))
    (series (CompositionSeries.append t₁ t₂ ht) (↑Fin.castSucc (↑e i)),
      series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e i)))

tactic: intro i
state_before: case refine'_1
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ t₁ t₂ : CompositionSeries X
hs : top s₁ = bot s₂
ht : top t₁ = bot t₂
h₁ : Equivalent s₁ t₁
h₂ : Equivalent s₂ t₂
e : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=
  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv
i : Fin (CompositionSeries.append s₁ s₂ hs).length
⊢ ∀ (i : Fin s₁.length),
    Iso
      (series (CompositionSeries.append s₁ s₂ hs) (↑Fin.castSucc (↑(Fin.castAdd s₂.length) i)),
        series (CompositionSeries.append s₁ s₂ hs) (Fin.succ (↑(Fin.castAdd s₂.length) i)))
      (series (CompositionSeries.append t₁ t₂ ht) (↑Fin.castSucc (↑e (↑(Fin.castAdd s₂.length) i))),
        series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e (↑(Fin.castAdd s₂.length) i))))

tactic: simpa [top, bot] using h₁.choose_spec i
state_before: case refine'_1
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ t₁ t₂ : CompositionSeries X
hs : top s₁ = bot s₂
ht : top t₁ = bot t₂
h₁ : Equivalent s₁ t₁
h₂ : Equivalent s₂ t₂
e : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=
  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv
i✝ : Fin (CompositionSeries.append s₁ s₂ hs).length
i : Fin s₁.length
⊢ Iso
    (series (CompositionSeries.append s₁ s₂ hs) (↑Fin.castSucc (↑(Fin.castAdd s₂.length) i)),
      series (CompositionSeries.append s₁ s₂ hs) (Fin.succ (↑(Fin.castAdd s₂.length) i)))
    (series (CompositionSeries.append t₁ t₂ ht) (↑Fin.castSucc (↑e (↑(Fin.castAdd s₂.length) i))),
      series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e (↑(Fin.castAdd s₂.length) i))))

tactic: intro i
state_before: case refine'_2
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ t₁ t₂ : CompositionSeries X
hs : top s₁ = bot s₂
ht : top t₁ = bot t₂
h₁ : Equivalent s₁ t₁
h₂ : Equivalent s₂ t₂
e : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=
  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv
i : Fin (CompositionSeries.append s₁ s₂ hs).length
⊢ ∀ (i : Fin s₂.length),
    Iso
      (series (CompositionSeries.append s₁ s₂ hs) (↑Fin.castSucc (↑(Fin.natAdd s₁.length) i)),
        series (CompositionSeries.append s₁ s₂ hs) (Fin.succ (↑(Fin.natAdd s₁.length) i)))
      (series (CompositionSeries.append t₁ t₂ ht) (↑Fin.castSucc (↑e (↑(Fin.natAdd s₁.length) i))),
        series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e (↑(Fin.natAdd s₁.length) i))))

tactic: simpa [top, bot] using h₂.choose_spec i
state_before: case refine'_2
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ t₁ t₂ : CompositionSeries X
hs : top s₁ = bot s₂
ht : top t₁ = bot t₂
h₁ : Equivalent s₁ t₁
h₂ : Equivalent s₂ t₂
e : Fin (s₁.length + s₂.length) ≃ Fin (t₁.length + t₂.length) :=
  Trans.trans (Trans.trans finSumFinEquiv.symm (Equiv.sumCongr (Exists.choose h₁) (Exists.choose h₂))) finSumFinEquiv
i✝ : Fin (CompositionSeries.append s₁ s₂ hs).length
i : Fin s₂.length
⊢ Iso
    (series (CompositionSeries.append s₁ s₂ hs) (↑Fin.castSucc (↑(Fin.natAdd s₁.length) i)),
      series (CompositionSeries.append s₁ s₂ hs) (Fin.succ (↑(Fin.natAdd s₁.length) i)))
    (series (CompositionSeries.append t₁ t₂ ht) (↑Fin.castSucc (↑e (↑(Fin.natAdd s₁.length) i))),
      series (CompositionSeries.append t₁ t₂ ht) (Fin.succ (↑e (↑(Fin.natAdd s₁.length) i))))