ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.shiftFunctorAdd_assoc
File: Mathlib/CategoryTheory/Shift/Basic.lean

Proof steps:
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a₁ a₂ a₃ : A
⊢ shiftFunctorAdd C (a₁ + a₂) a₃ ≪≫
      isoWhiskerRight (shiftFunctorAdd C a₁ a₂) (shiftFunctor C a₃) ≪≫
        (shiftFunctor C a₁).associator (shiftFunctor C a₂) (shiftFunctor C a₃) =
    shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) ⋯ ≪≫ isoWhiskerLeft (shiftFunctor C a₁) (shiftFunctorAdd C a₂ a₃)
state_after: case w.w.h
C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a₁ a₂ a₃ : A
X : C
⊢ (shiftFunctorAdd C (a₁ + a₂) a₃ ≪≫
            isoWhiskerRight (shiftFunctorAdd C a₁ a₂) (shiftFunctor C a₃) ≪≫
              (shiftFunctor C a₁).associator (shiftFunctor C a₂) (shiftFunctor C a₃)).hom.app
      X =
    (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) ⋯ ≪≫
            isoWhiskerLeft (shiftFunctor C a₁) (shiftFunctorAdd C a₂ a₃)).hom.app
      X
tactic: ext X
state_before: case w.w.h
C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a₁ a₂ a₃ : A
X : C
⊢ (shiftFunctorAdd C (a₁ + a₂) a₃ ≪≫
            isoWhiskerRight (shiftFunctorAdd C a₁ a₂) (shiftFunctor C a₃) ≪≫
              (shiftFunctor C a₁).associator (shiftFunctor C a₂) (shiftFunctor C a₃)).hom.app
      X =
    (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) ⋯ ≪≫
            isoWhiskerLeft (shiftFunctor C a₁) (shiftFunctorAdd C a₂ a₃)).hom.app
      X
state_after: no goals
tactic: simpa [shiftFunctorAdd'_eq_shiftFunctorAdd]
    using NatTrans.congr_app (congr_arg Iso.hom
      (shiftFunctorAdd'_assoc C a₁ a₂ a₃ _ _ _ rfl rfl rfl)) X
Theorem: IsUnit.mul_inv_cancel
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
M : Type u_1
N : Type u_2
inst✝ : DivisionMonoid α
a b c : α
⊢ IsUnit a → a * a⁻¹ = 1
state_after: case intro
α : Type u
M : Type u_1
N : Type u_2
inst✝ : DivisionMonoid α
b c : α
u : αˣ
⊢ ↑u * (↑u)⁻¹ = 1
tactic: rintro ⟨u, rfl⟩
state_before: case intro
α : Type u
M : Type u_1
N : Type u_2
inst✝ : DivisionMonoid α
b c : α
u : αˣ
⊢ ↑u * (↑u)⁻¹ = 1
state_after: no goals
tactic: rw [← Units.val_inv_eq_inv_val, Units.mul_inv]
Theorem: isReduced_zmod
File: Mathlib/RingTheory/ZMod.lean

Proof steps:
state_before: n : ℕ
⊢ IsReduced (ZMod n) ↔ Squarefree n ∨ n = 0
state_after: no goals
tactic: rw [← RingHom.ker_isRadical_iff_reduced_of_surjective
      (ZMod.ringHom_surjective <| Int.castRingHom <| ZMod n),
      ZMod.ker_intCastRingHom, ← isRadical_iff_span_singleton, isRadical_iff_squarefree_or_zero,
      Int.squarefree_natCast, Nat.cast_eq_zero]
Theorem: Matroid.restrictSubtype_dual
File: Mathlib/Data/Matroid/Map.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M✝ : Matroid α
N : Matroid β
E X I : Set α
M : Matroid α
⊢ (M.restrictSubtype M.E)✶ = M✶.restrictSubtype M.E
state_after: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M✝ : Matroid α
N : Matroid β
E X I : Set α
M : Matroid α
⊢ BijOn Subtype.val (M.E ↓∩ (M ↾ M.E).E) (M ↾ M.E).E
tactic: rw [restrictSubtype, ← comapOn_preimage_eq, comapOn_dual_eq_of_bijOn, restrict_ground_eq_self,
    ← dual_ground, comapOn_preimage_eq, restrictSubtype, restrict_ground_eq_self]
state_before: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M✝ : Matroid α
N : Matroid β
E X I : Set α
M : Matroid α
⊢ BijOn Subtype.val (M.E ↓∩ (M ↾ M.E).E) (M ↾ M.E).E
state_after: no goals
tactic: exact ⟨by simp [MapsTo], Subtype.val_injective.injOn, by simp [SurjOn, Subset.rfl]⟩
Theorem: Wbtw.swap_right_iff
File: Mathlib/Analysis/Convex/Between.lean

Proof steps:
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : OrderedRing R
inst✝⁶ : AddCommGroup V
inst✝⁵ : Module R V
inst✝⁴ : AddTorsor V P
inst✝³ : AddCommGroup V'
inst✝² : Module R V'
inst✝¹ : AddTorsor V' P'
inst✝ : NoZeroSMulDivisors R V
x y z : P
h : Wbtw R x y z
⊢ Wbtw R x z y ↔ y = z
state_after: no goals
tactic: rw [← wbtw_swap_right_iff R x, and_iff_right h]
Theorem: Multiset.map_eq_map_of_bij_of_nodup
File: Mathlib/Data/Multiset/Nodup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s✝ t✝ : Multiset α
a : α
f : α → γ
g : β → γ
s : Multiset α
t : Multiset β
hs : s.Nodup
ht : t.Nodup
i : (a : α) → a ∈ s → β
hi : ∀ (a : α) (ha : a ∈ s), i a ha ∈ t
i_inj : ∀ (a₁ : α) (ha₁ : a₁ ∈ s) (a₂ : α) (ha₂ : a₂ ∈ s), i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂
i_surj : ∀ b ∈ t, ∃ a, ∃ (ha : a ∈ s), i a ha = b
h : ∀ (a : α) (ha : a ∈ s), f a = g (i a ha)
this : t = map (fun x => i ↑x ⋯) s.attach
⊢ map f s = map g t
state_after: no goals
tactic: calc
    s.map f = s.pmap (fun x _ => f x) fun _ => id := by rw [pmap_eq_map]
    _ = s.attach.map fun x => f x.1 := by rw [pmap_eq_map_attach]
    _ = t.map g := by rw [this, Multiset.map_map]; exact map_congr rfl fun x _ => h _ _
Theorem: IsUnifLocDoublingMeasure.tendsto_closedBall_filterAt
File: Mathlib/MeasureTheory/Covering/DensityTheorem.lean

Proof steps:
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
inst✝⁴ : MeasurableSpace α
μ : Measure α
inst✝³ : IsUnifLocDoublingMeasure μ
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
inst✝ : IsLocallyFiniteMeasure μ
K : ℝ
x : α
ι : Type u_2
l : Filter ι
w : ι → α
δ : ι → ℝ
δlim : Tendsto δ l (𝓝[>] 0)
xmem : ∀ᶠ (j : ι) in l, x ∈ closedBall (w j) (K * δ j)
⊢ Tendsto (fun j => closedBall (w j) (δ j)) l ((vitaliFamily μ K).filterAt x)
state_after: case refine_1
α : Type u_1
inst✝⁵ : MetricSpace α
inst✝⁴ : MeasurableSpace α
μ : Measure α
inst✝³ : IsUnifLocDoublingMeasure μ
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
inst✝ : IsLocallyFiniteMeasure μ
K : ℝ
x : α
ι : Type u_2
l : Filter ι
w : ι → α
δ : ι → ℝ
δlim : Tendsto δ l (𝓝[>] 0)
xmem : ∀ᶠ (j : ι) in l, x ∈ closedBall (w j) (K * δ j)
⊢ ∀ᶠ (i : ι) in l, closedBall (w i) (δ i) ∈ (vitaliFamily μ K).setsAt x

case refine_2
α : Type u_1
inst✝⁵ : MetricSpace α
inst✝⁴ : MeasurableSpace α
μ : Measure α
inst✝³ : IsUnifLocDoublingMeasure μ
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
inst✝ : IsLocallyFiniteMeasure μ
K : ℝ
x : α
ι : Type u_2
l : Filter ι
w : ι → α
δ : ι → ℝ
δlim : Tendsto δ l (𝓝[>] 0)
xmem : ∀ᶠ (j : ι) in l, x ∈ closedBall (w j) (K * δ j)
ε : ℝ
hε : ε > 0
⊢ ∀ᶠ (i : ι) in l, closedBall (w i) (δ i) ⊆ closedBall x ε
tactic: refine (vitaliFamily μ K).tendsto_filterAt_iff.mpr ⟨?_, fun ε hε => ?_⟩
Theorem: monotone_of_odd_of_monotoneOn_nonneg
File: Mathlib/Order/Monotone/Odd.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
inst✝¹ : LinearOrderedAddCommGroup G
inst✝ : OrderedAddCommGroup H
f : G → H
h₁ : ∀ (x : G), f (-x) = -f x
h₂ : MonotoneOn f (Ici 0)
⊢ Monotone f
state_after: G : Type u_1
H : Type u_2
inst✝¹ : LinearOrderedAddCommGroup G
inst✝ : OrderedAddCommGroup H
f : G → H
h₁ : ∀ (x : G), f (-x) = -f x
h₂ : MonotoneOn f (Ici 0)
x : G
hx : x ∈ Iic 0
y : G
hy : y ∈ Iic 0
hxy : x ≤ y
⊢ -f y ≤ -f x
tactic: refine MonotoneOn.Iic_union_Ici (fun x hx y hy hxy => neg_le_neg_iff.1 ?_) h₂
state_before: G : Type u_1
H : Type u_2
inst✝¹ : LinearOrderedAddCommGroup G
inst✝ : OrderedAddCommGroup H
f : G → H
h₁ : ∀ (x : G), f (-x) = -f x
h₂ : MonotoneOn f (Ici 0)
x : G
hx : x ∈ Iic 0
y : G
hy : y ∈ Iic 0
hxy : x ≤ y
⊢ -f y ≤ -f x
state_after: G : Type u_1
H : Type u_2
inst✝¹ : LinearOrderedAddCommGroup G
inst✝ : OrderedAddCommGroup H
f : G → H
h₁ : ∀ (x : G), f (-x) = -f x
h₂ : MonotoneOn f (Ici 0)
x : G
hx : x ∈ Iic 0
y : G
hy : y ∈ Iic 0
hxy : x ≤ y
⊢ f (-y) ≤ f (-x)
tactic: rw [← h₁, ← h₁]
state_before: G : Type u_1
H : Type u_2
inst✝¹ : LinearOrderedAddCommGroup G
inst✝ : OrderedAddCommGroup H
f : G → H
h₁ : ∀ (x : G), f (-x) = -f x
h₂ : MonotoneOn f (Ici 0)
x : G
hx : x ∈ Iic 0
y : G
hy : y ∈ Iic 0
hxy : x ≤ y
⊢ f (-y) ≤ f (-x)
state_after: no goals
tactic: exact h₂ (neg_nonneg.2 hy) (neg_nonneg.2 hx) (neg_le_neg hxy)
Theorem: HomologicalComplex.opSymm_d
File: Mathlib/Algebra/Homology/Opposite.lean

Proof steps:
state_before: ι : Type u_1
V : Type u_2
inst✝¹ : Category.{?u.19205, u_2} V
c : ComplexShape ι
inst✝ : HasZeroMorphisms V
X : HomologicalComplex V c.symm
i j : ι
hij : ¬c.Rel i j
⊢ (fun i j => (X.d j i).op) i j = 0
state_after: ι : Type u_1
V : Type u_2
inst✝¹ : Category.{?u.19205, u_2} V
c : ComplexShape ι
inst✝ : HasZeroMorphisms V
X : HomologicalComplex V c.symm
i j : ι
hij : ¬c.Rel i j
⊢ (X.d j i).op = 0
tactic: simp only
state_before: ι : Type u_1
V : Type u_2
inst✝¹ : Category.{?u.19205, u_2} V
c : ComplexShape ι
inst✝ : HasZeroMorphisms V
X : HomologicalComplex V c.symm
i j : ι
hij : ¬c.Rel i j
⊢ (X.d j i).op = 0
state_after: no goals
tactic: rw [X.shape j i hij, op_zero]
state_before: ι : Type u_1
V : Type u_2
inst✝¹ : Category.{?u.19205, u_2} V
c : ComplexShape ι
inst✝ : HasZeroMorphisms V
X : HomologicalComplex V c.symm
x✝⁴ x✝³ x✝² : ι
x✝¹ : c.Rel x✝⁴ x✝³
x✝ : c.Rel x✝³ x✝²
⊢ (fun i j => (X.d j i).op) x✝⁴ x✝³ ≫ (fun i j => (X.d j i).op) x✝³ x✝² = 0
state_after: no goals
tactic: rw [← op_comp, X.d_comp_d, op_zero]
Theorem: List.sublist_join
File: Mathlib/Data/List/Join.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
L : List (List α)
s : List α
hs : s ∈ L
⊢ s <+ L.join
state_after: no goals
tactic: induction L with
  | nil =>
    exfalso
    exact not_mem_nil s hs
  | cons t m ht =>
    cases mem_cons.mp hs with
    | inl h =>
      rw [h]
      simp only [join_cons, sublist_append_left]
    | inr h =>
      simp only [join_cons]
      exact sublist_append_of_sublist_right (ht h)
Theorem: mul_nonpos_of_nonneg_of_nonpos
File: Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean

Proof steps:
state_before: α : Type u_1
a b c d : α
inst✝² : MulZeroClass α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
ha : 0 ≤ a
hb : b ≤ 0
⊢ a * b ≤ 0
state_after: no goals
tactic: simpa only [mul_zero] using mul_le_mul_of_nonneg_left hb ha
Theorem: PresheafOfModules.Sheafify.app_eq_of_isLocallyInjective
File: Mathlib/Algebra/Category/ModuleCat/Presheaf/Sheafify.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : GrothendieckTopology C
R₀ R : Cᵒᵖ ⥤ RingCat
α : R₀ ⟶ R
inst✝¹ : Presheaf.IsLocallyInjective J α
M₀ : PresheafOfModules R₀
A : Cᵒᵖ ⥤ AddCommGrp
φ : M₀.presheaf ⟶ A
inst✝ : Presheaf.IsLocallyInjective J φ
hA : Presheaf.IsSeparated J A
X : C
r : ↑(R.obj (Opposite.op X))
m : ↑(A.obj (Opposite.op X))
P : Presieve X
r₀✝ : FamilyOfElements (R₀ ⋙ forget RingCat) P
m₀✝ : FamilyOfElements (M₀.presheaf ⋙ forget AddCommGrp) P
hr₀✝ : (r₀✝.map (whiskerRight α (forget RingCat))).IsAmalgamation r
hm₀✝ : (m₀✝.map (whiskerRight φ (forget AddCommGrp))).IsAmalgamation m
Y : C
r₀ r₀' : ↑(R₀.obj (Opposite.op Y))
m₀ m₀' : ↑(M₀.presheaf.obj (Opposite.op Y))
hr₀ : (α.app (Opposite.op Y)) r₀ = (α.app (Opposite.op Y)) r₀'
hm₀ : (φ.app (Opposite.op Y)) m₀ = (φ.app (Opposite.op Y)) m₀'
⊢ (φ.app (Opposite.op Y)) (r₀ • m₀) = (φ.app (Opposite.op Y)) (r₀' • m₀')
state_after: case x
C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : GrothendieckTopology C
R₀ R : Cᵒᵖ ⥤ RingCat
α : R₀ ⟶ R
inst✝¹ : Presheaf.IsLocallyInjective J α
M₀ : PresheafOfModules R₀
A : Cᵒᵖ ⥤ AddCommGrp
φ : M₀.presheaf ⟶ A
inst✝ : Presheaf.IsLocallyInjective J φ
hA : Presheaf.IsSeparated J A
X : C
r : ↑(R.obj (Opposite.op X))
m : ↑(A.obj (Opposite.op X))
P : Presieve X
r₀✝ : FamilyOfElements (R₀ ⋙ forget RingCat) P
m₀✝ : FamilyOfElements (M₀.presheaf ⋙ forget AddCommGrp) P
hr₀✝ : (r₀✝.map (whiskerRight α (forget RingCat))).IsAmalgamation r
hm₀✝ : (m₀✝.map (whiskerRight φ (forget AddCommGrp))).IsAmalgamation m
Y : C
r₀ r₀' : ↑(R₀.obj (Opposite.op Y))
m₀ m₀' : ↑(M₀.presheaf.obj (Opposite.op Y))
hr₀ : (α.app (Opposite.op Y)) r₀ = (α.app (Opposite.op Y)) r₀'
hm₀ : (φ.app (Opposite.op Y)) m₀ = (φ.app (Opposite.op Y)) m₀'
⊢ Presheaf.equalizerSieve r₀ r₀' ⊓ Presheaf.equalizerSieve m₀ m₀' ∈ J.sieves (Opposite.unop (Opposite.op Y))

case a
C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : GrothendieckTopology C
R₀ R : Cᵒᵖ ⥤ RingCat
α : R₀ ⟶ R
inst✝¹ : Presheaf.IsLocallyInjective J α
M₀ : PresheafOfModules R₀
A : Cᵒᵖ ⥤ AddCommGrp
φ : M₀.presheaf ⟶ A
inst✝ : Presheaf.IsLocallyInjective J φ
hA : Presheaf.IsSeparated J A
X : C
r : ↑(R.obj (Opposite.op X))
m : ↑(A.obj (Opposite.op X))
P : Presieve X
r₀✝ : FamilyOfElements (R₀ ⋙ forget RingCat) P
m₀✝ : FamilyOfElements (M₀.presheaf ⋙ forget AddCommGrp) P
hr₀✝ : (r₀✝.map (whiskerRight α (forget RingCat))).IsAmalgamation r
hm₀✝ : (m₀✝.map (whiskerRight φ (forget AddCommGrp))).IsAmalgamation m
Y : C
r₀ r₀' : ↑(R₀.obj (Opposite.op Y))
m₀ m₀' : ↑(M₀.presheaf.obj (Opposite.op Y))
hr₀ : (α.app (Opposite.op Y)) r₀ = (α.app (Opposite.op Y)) r₀'
hm₀ : (φ.app (Opposite.op Y)) m₀ = (φ.app (Opposite.op Y)) m₀'
⊢ ∀ (Y_1 : C) (f : Y_1 ⟶ Opposite.unop (Opposite.op Y)),
    (Presheaf.equalizerSieve r₀ r₀' ⊓ Presheaf.equalizerSieve m₀ m₀').arrows f →
      (A.map f.op) ((φ.app (Opposite.op Y)) (r₀ • m₀)) = (A.map f.op) ((φ.app (Opposite.op Y)) (r₀' • m₀'))
tactic: apply hA _ (Presheaf.equalizerSieve r₀ r₀' ⊓ Presheaf.equalizerSieve (F := M₀.presheaf) m₀ m₀')
Theorem: IsLindelof.inter_iInter_nonempty
File: Mathlib/Topology/Compactness/Lindelof.lean

Proof steps:
state_before: X : Type u
Y : Type v
ι✝ : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
ι : Type v
hs : IsLindelof s
t : ι → Set X
htc : ∀ (i : ι), IsClosed (t i)
hst : ∀ (u : Set ι), u.Countable ∧ (s ∩ ⋂ i ∈ u, t i).Nonempty
⊢ (s ∩ ⋂ i, t i).Nonempty
state_after: X : Type u
Y : Type v
ι✝ : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
ι : Type v
hs : IsLindelof s
t : ι → Set X
htc : ∀ (i : ι), IsClosed (t i)
hst : s ∩ ⋂ i, t i = ∅
⊢ ∃ u, u.Countable → s ∩ ⋂ i ∈ u, t i = ∅
tactic: contrapose! hst
state_before: X : Type u
Y : Type v
ι✝ : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
ι : Type v
hs : IsLindelof s
t : ι → Set X
htc : ∀ (i : ι), IsClosed (t i)
hst : s ∩ ⋂ i, t i = ∅
⊢ ∃ u, u.Countable → s ∩ ⋂ i ∈ u, t i = ∅
state_after: case intro.intro
X : Type u
Y : Type v
ι✝ : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
ι : Type v
hs : IsLindelof s
t : ι → Set X
htc : ∀ (i : ι), IsClosed (t i)
hst : s ∩ ⋂ i, t i = ∅
u : Set ι
left✝ : u.Countable
husub : s ∩ ⋂ i ∈ u, t i = ∅
⊢ ∃ u, u.Countable → s ∩ ⋂ i ∈ u, t i = ∅
tactic: rcases hs.elim_countable_subfamily_closed t htc hst with ⟨u, ⟨_, husub⟩⟩
state_before: case intro.intro
X : Type u
Y : Type v
ι✝ : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t✝ : Set X
ι : Type v
hs : IsLindelof s
t : ι → Set X
htc : ∀ (i : ι), IsClosed (t i)
hst : s ∩ ⋂ i, t i = ∅
u : Set ι
left✝ : u.Countable
husub : s ∩ ⋂ i ∈ u, t i = ∅
⊢ ∃ u, u.Countable → s ∩ ⋂ i ∈ u, t i = ∅
state_after: no goals
tactic: exact ⟨u, fun _ ↦ husub⟩
Theorem: Nat.multichoose_eq
File: Mathlib/Data/Nat/Choose/Basic.lean

Proof steps:
state_before: x✝ : ℕ
⊢ x✝.multichoose 0 = (x✝ + 0 - 1).choose 0
state_after: no goals
tactic: simp
state_before: k : ℕ
⊢ multichoose 0 (k + 1) = (0 + (k + 1) - 1).choose (k + 1)
state_after: no goals
tactic: simp
state_before: n k : ℕ
⊢ (n + 1).multichoose (k + 1) = (n + 1 + (k + 1) - 1).choose (k + 1)
state_after: n k : ℕ
this : n + (k + 1) < n + 1 + (k + 1)
⊢ (n + 1).multichoose (k + 1) = (n + 1 + (k + 1) - 1).choose (k + 1)
tactic: have : n + (k + 1) < (n + 1) + (k + 1) := Nat.add_lt_add_right (Nat.lt_succ_self _) _
state_before: n k : ℕ
this : n + (k + 1) < n + 1 + (k + 1)
⊢ (n + 1).multichoose (k + 1) = (n + 1 + (k + 1) - 1).choose (k + 1)
state_after: n k : ℕ
this✝ : n + (k + 1) < n + 1 + (k + 1)
this : n + 1 + k < n + 1 + (k + 1)
⊢ (n + 1).multichoose (k + 1) = (n + 1 + (k + 1) - 1).choose (k + 1)
tactic: have : (n + 1) + k < (n + 1) + (k + 1) := Nat.add_lt_add_left (Nat.lt_succ_self _) _
state_before: n k : ℕ
this✝ : n + (k + 1) < n + 1 + (k + 1)
this : n + 1 + k < n + 1 + (k + 1)
⊢ (n + 1).multichoose (k + 1) = (n + 1 + (k + 1) - 1).choose (k + 1)
state_after: n k : ℕ
this✝ : n + (k + 1) < n + 1 + (k + 1)
this : n + 1 + k < n + 1 + (k + 1)
⊢ (n + 1).multichoose k + n.multichoose (k + 1) = (n + k).choose k + (n + k).choose k.succ
tactic: erw [multichoose_succ_succ, Nat.add_comm, Nat.succ_add_sub_one, ← Nat.add_assoc,
      Nat.choose_succ_succ]
state_before: n k : ℕ
this✝ : n + (k + 1) < n + 1 + (k + 1)
this : n + 1 + k < n + 1 + (k + 1)
⊢ (n + 1).multichoose k + n.multichoose (k + 1) = (n + k).choose k + (n + k).choose k.succ
state_after: no goals
tactic: simp [multichoose_eq n (k+1), multichoose_eq (n+1) k]
state_before: n k : ℕ
x✝ :
  ∀ (y : (_ : ℕ) ×' ℕ),
    (invImage (fun x => PSigma.casesOn x fun n k => n + k) instWellFoundedRelationOfSizeOf).1 y ⟨n.succ, k.succ⟩ →
      y.1.multichoose y.2 = (y.1 + y.2 - 1).choose y.2
this✝ : n + (k + 1) < n + 1 + (k + 1)
this : n + 1 + k < n + 1 + (k + 1)
⊢ (invImage (fun x => PSigma.casesOn x fun n k => n + k) instWellFoundedRelationOfSizeOf).1 ⟨n + 1, k⟩ ⟨n.succ, k.succ⟩

n k : ℕ
x✝ :
  ∀ (y : (_ : ℕ) ×' ℕ),
    (invImage (fun x => PSigma.casesOn x fun n k => n + k) instWellFoundedRelationOfSizeOf).1 y ⟨n.succ, k.succ⟩ →
      y.1.multichoose y.2 = (y.1 + y.2 - 1).choose y.2
this✝ : n + (k + 1) < n + 1 + (k + 1)
this : n + 1 + k < n + 1 + (k + 1)
⊢ (invImage (fun x => PSigma.casesOn x fun n k => n + k) instWellFoundedRelationOfSizeOf).1 ⟨n, k + 1⟩ ⟨n.succ, k.succ⟩
state_after: no goals
tactic: all_goals assumption
Theorem: CategoryTheory.Limits.Multifork.IsLimit.hom_ext
File: Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
I : MulticospanIndex C
K : Multifork I
hK : IsLimit K
T : C
f g : T ⟶ K.pt
h : ∀ (a : I.L), f ≫ K.ι a = g ≫ K.ι a
⊢ f = g
state_after: C : Type u
inst✝ : Category.{v, u} C
I : MulticospanIndex C
K : Multifork I
hK : IsLimit K
T : C
f g : T ⟶ K.pt
h : ∀ (a : I.L), f ≫ K.ι a = g ≫ K.ι a
⊢ ∀ (j : WalkingMulticospan I.fstTo I.sndTo), f ≫ K.π.app j = g ≫ K.π.app j
tactic: apply hK.hom_ext
state_before: C : Type u
inst✝ : Category.{v, u} C
I : MulticospanIndex C
K : Multifork I
hK : IsLimit K
T : C
f g : T ⟶ K.pt
h : ∀ (a : I.L), f ≫ K.ι a = g ≫ K.ι a
⊢ ∀ (j : WalkingMulticospan I.fstTo I.sndTo), f ≫ K.π.app j = g ≫ K.π.app j
state_after: case left
C : Type u
inst✝ : Category.{v, u} C
I : MulticospanIndex C
K : Multifork I
hK : IsLimit K
T : C
f g : T ⟶ K.pt
h : ∀ (a : I.L), f ≫ K.ι a = g ≫ K.ι a
a✝ : I.L
⊢ f ≫ K.π.app (WalkingMulticospan.left a✝) = g ≫ K.π.app (WalkingMulticospan.left a✝)

case right
C : Type u
inst✝ : Category.{v, u} C
I : MulticospanIndex C
K : Multifork I
hK : IsLimit K
T : C
f g : T ⟶ K.pt
h : ∀ (a : I.L), f ≫ K.ι a = g ≫ K.ι a
b : I.R
⊢ f ≫ K.π.app (WalkingMulticospan.right b) = g ≫ K.π.app (WalkingMulticospan.right b)
tactic: rintro (_|b)
Theorem: Fin.univ_image_getElem'
File: Mathlib/Data/Fintype/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq β
l : List α
f : α → β
⊢ image (fun i => f l[↑i]) univ = (List.map f l).toFinset
state_after: no goals
tactic: simp only [univ_image_def, List.ofFn_getElem_eq_map]
Theorem: IsAtom.le_iff
File: Mathlib/Order/Atoms.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
a b x : α
h : IsAtom a
⊢ x ≤ a ↔ x = ⊥ ∨ x = a
state_after: no goals
tactic: rw [le_iff_lt_or_eq, h.lt_iff]
Theorem: List.get?_zero_add_tail_sum
File: Mathlib/Algebra/BigOperators/Group/List.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l✝ l₁ l₂ : List M
a : M
l : List M
⊢ (l.get? 0).getD 1 * l.tail.prod = l.prod
state_after: no goals
tactic: cases l <;> simp
Theorem: Convex.exists_mem_add_smul_eq
File: Mathlib/Analysis/Convex/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : LinearOrderedField 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
h : Convex 𝕜 s
x y : E
p q : 𝕜
hx : x ∈ s
hy : y ∈ s
hp : 0 ≤ p
hq : 0 ≤ q
⊢ ∃ z ∈ s, (p + q) • z = p • x + q • y
state_after: case inl.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : LinearOrderedField 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
h : Convex 𝕜 s
x y : E
hx : x ∈ s
hy : y ∈ s
hp hq : 0 ≤ 0
⊢ ∃ z ∈ s, (0 + 0) • z = 0 • x + 0 • y

case inr
𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : LinearOrderedField 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
h : Convex 𝕜 s
x y : E
p q : 𝕜
hx : x ∈ s
hy : y ∈ s
hp : 0 ≤ p
hq : 0 ≤ q
hpq : ¬(p = 0 ∧ q = 0)
⊢ ∃ z ∈ s, (p + q) • z = p • x + q • y
tactic: rcases _root_.em (p = 0 ∧ q = 0) with (⟨rfl, rfl⟩ | hpq)
Theorem: Associates.eq_of_factors_eq_factors
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a b : Associates α
h : a.factors = b.factors
⊢ a = b
state_after: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a b : Associates α
h : a.factors = b.factors
this : a.factors.prod = b.factors.prod
⊢ a = b
tactic: have : a.factors.prod = b.factors.prod := by rw [h]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a b : Associates α
h : a.factors = b.factors
this : a.factors.prod = b.factors.prod
⊢ a = b
state_after: no goals
tactic: rwa [factors_prod, factors_prod] at this
Theorem: Ideal.Polynomial.Subring.mem_closure_image_of
File: Mathlib/RingTheory/Jacobson.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : x ∈ Subring.closure u
⊢ g x ∈ Subring.closure (⇑g '' u)
state_after: S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
⊢ ∀ (S_1 : Subring T), ⇑g '' u ⊆ ↑S_1 → g x ∈ S_1
tactic: rw [Subring.mem_closure] at hx ⊢
state_before: S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
⊢ ∀ (S_1 : Subring T), ⇑g '' u ⊆ ↑S_1 → g x ∈ S_1
state_after: S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ g x ∈ T₁
tactic: intro T₁ h₁
state_before: S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ g x ∈ T₁
state_after: S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ x ∈ Subring.comap g T₁
tactic: rw [← Subring.mem_comap]
state_before: S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ x ∈ Subring.comap g T₁
state_after: case a
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ u ⊆ ↑(Subring.comap g T₁)
tactic: apply hx
state_before: case a
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ u ⊆ ↑(Subring.comap g T₁)
state_after: case a
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ ⇑g '' u ⊆ ↑T₁
tactic: simp only [Subring.coe_comap, ← Set.image_subset_iff, SetLike.mem_coe]
state_before: case a
S : Type u_1
T : Type u_2
inst✝¹ : CommRing S
inst✝ : CommRing T
g : S →+* T
u : Set S
x : S
hx : ∀ (S_1 : Subring S), u ⊆ ↑S_1 → x ∈ S_1
T₁ : Subring T
h₁ : ⇑g '' u ⊆ ↑T₁
⊢ ⇑g '' u ⊆ ↑T₁
state_after: no goals
tactic: exact h₁