ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: MeasureTheory.Integrable.withDensityᵥ_trim_eq_integral
File: Mathlib/MeasureTheory/Measure/WithDensityVectorMeasure.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
E : Type u_3
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f✝ g : α → E
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
f : α → ℝ
hf : Integrable f μ
i : Set α
hi : MeasurableSet i
⊢ ↑((μ.withDensityᵥ f).trim hm) i = ∫ (x : α) in i, f x ∂μ
state_after: no goals
tactic: rw [VectorMeasure.trim_measurableSet_eq hm hi, withDensityᵥ_apply hf (hm _ hi)]
Theorem: Finset.filter_True
File: Mathlib/Data/Finset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ t : Finset α
h : DecidablePred fun x => True
s : Finset α
⊢ filter (fun x => True) s = s
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ t : Finset α
h : DecidablePred fun x => True
s : Finset α
a✝ : α
⊢ a✝ ∈ filter (fun x => True) s ↔ a✝ ∈ s
tactic: ext
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s✝ t : Finset α
h : DecidablePred fun x => True
s : Finset α
a✝ : α
⊢ a✝ ∈ filter (fun x => True) s ↔ a✝ ∈ s
state_after: no goals
tactic: simp
Theorem: Polynomial.Chebyshev.U_add_one
File: Mathlib/RingTheory/Polynomial/Chebyshev.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
n : ℤ
⊢ U R (n + 1) = 2 * X * U R n - U R (n - 1)
state_after: no goals
tactic: linear_combination (norm := ring_nf) U_add_two R (n - 1)
Theorem: Con.list_prod
File: Mathlib/GroupTheory/Congruence/BigOperators.lean

Proof steps:
state_before: ι : Type u_1
M : Type u_2
inst✝ : Monoid M
c : Con M
l : List ι
f g : ι → M
h : ∀ x ∈ l, c (f x) (g x)
⊢ c (List.map f l).prod (List.map g l).prod
state_after: no goals
tactic: induction l with
  | nil =>
    simpa only [List.map_nil, List.prod_nil] using c.refl 1
  | cons x xs ih =>
    rw [List.map_cons, List.map_cons, List.prod_cons, List.prod_cons]
    exact c.mul (h _ <| .head _) <| ih fun k hk ↦ h _ (.tail _ hk)
Theorem: legendreSym.eq_one_of_sq_sub_mul_sq_eq_zero
File: Mathlib/NumberTheory/LegendreSymbol/Basic.lean

Proof steps:
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
x y : ZMod p
hy : y ≠ 0
hxy : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = 0 * y⁻¹ ^ 2
⊢ legendreSym p a = 1
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
x y : ZMod p
hy : y ≠ 0
hxy : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = 0
⊢ legendreSym p a = 1
tactic: simp only [zero_mul] at hxy
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
x y : ZMod p
hy : y ≠ 0
hxy : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = 0
⊢ legendreSym p a = 1
state_after: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
x y : ZMod p
hy : y ≠ 0
hxy : x * y⁻¹ * (x * y⁻¹) = ↑a
⊢ legendreSym p a = 1
tactic: rw [(by ring : (x ^ 2 - ↑a * y ^ 2) * y⁻¹ ^ 2 = (x * y⁻¹) ^ 2 - a * (y * y⁻¹) ^ 2),
    mul_inv_cancel hy, one_pow, mul_one, sub_eq_zero, pow_two] at hxy
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a : ℤ
ha : ↑a ≠ 0
x y : ZMod p
hy : y ≠ 0
hxy : x * y⁻¹ * (x * y⁻¹) = ↑a
⊢ legendreSym p a = 1
state_after: no goals
tactic: exact (eq_one_iff p ha).mpr ⟨x * y⁻¹, hxy.symm⟩
Theorem: SimplexCategory.hom_zero_zero
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

Proof steps:
state_before: f : [0] ⟶ [0]
⊢ f = 𝟙 [0]
state_after: case a.h.h
f : [0] ⟶ [0]
x✝ : Fin ([0].len + 1)
⊢ (Hom.toOrderHom f) x✝ = (Hom.toOrderHom (𝟙 [0])) x✝
tactic: ext : 3
state_before: case a.h.h
f : [0] ⟶ [0]
x✝ : Fin ([0].len + 1)
⊢ (Hom.toOrderHom f) x✝ = (Hom.toOrderHom (𝟙 [0])) x✝
state_after: no goals
tactic: apply @Subsingleton.elim (Fin 1)
Theorem: AffineEquiv.affineIndependent_set_of_eq_iff
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

Proof steps:
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁶ : Ring k
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module k V
inst✝³ : AffineSpace V P
ι : Type u_4
V₂ : Type u_5
P₂ : Type u_6
inst✝² : AddCommGroup V₂
inst✝¹ : Module k V₂
inst✝ : AffineSpace V₂ P₂
s : Set P
e : P ≃ᵃ[k] P₂
⊢ AffineIndependent k Subtype.val ↔ AffineIndependent k Subtype.val
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁶ : Ring k
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module k V
inst✝³ : AffineSpace V P
ι : Type u_4
V₂ : Type u_5
P₂ : Type u_6
inst✝² : AddCommGroup V₂
inst✝¹ : Module k V₂
inst✝ : AffineSpace V₂ P₂
s : Set P
e : P ≃ᵃ[k] P₂
this : ⇑e ∘ Subtype.val = Subtype.val ∘ ⇑((↑e).image s)
⊢ AffineIndependent k Subtype.val ↔ AffineIndependent k Subtype.val
tactic: have : e ∘ ((↑) : s → P) = ((↑) : e '' s → P₂) ∘ (e : P ≃ P₂).image s := rfl
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁶ : Ring k
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module k V
inst✝³ : AffineSpace V P
ι : Type u_4
V₂ : Type u_5
P₂ : Type u_6
inst✝² : AddCommGroup V₂
inst✝¹ : Module k V₂
inst✝ : AffineSpace V₂ P₂
s : Set P
e : P ≃ᵃ[k] P₂
this : ⇑e ∘ Subtype.val = Subtype.val ∘ ⇑((↑e).image s)
⊢ AffineIndependent k Subtype.val ↔ AffineIndependent k Subtype.val
state_after: no goals
tactic: erw [← e.affineIndependent_iff, this, affineIndependent_equiv]
Theorem: SNum.bit_one
File: Mathlib/Data/Num/Bitwise.lean

Proof steps:
state_before: b : Bool
⊢ (b::zero (decide ¬b = true)) = nz (msb b)
state_after: no goals
tactic: cases b <;> rfl
Theorem: Function.LeftInverse.image_image
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Sort u_3
f : α → β
g : β → α
h : LeftInverse g f
s : Set α
⊢ g '' (f '' s) = s
state_after: no goals
tactic: rw [← image_comp, h.comp_eq_id, image_id]
Theorem: Monoid.CoprodI.Word.smul_induction
File: Mathlib/GroupTheory/CoprodI.lean

Proof steps:
state_before: ι : Type u_1
M : ι → Type u_2
inst✝³ : (i : ι) → Monoid (M i)
N : Type u_3
inst✝² : Monoid N
inst✝¹ : (i : ι) → DecidableEq (M i)
inst✝ : DecidableEq ι
C : Word M → Prop
h_empty : C empty
h_smul : ∀ (i : ι) (m : M i) (w : Word M), C w → C (of m • w)
w : Word M
⊢ C w
state_after: no goals
tactic: induction w using consRecOn with
  | h_empty => exact h_empty
  | h_cons _ _ _ _ _ ih =>
    rw [cons_eq_smul]
    exact h_smul _ _ _ ih
Theorem: CategoryTheory.Limits.Cocones.whiskeringEquivalence_counitIso
File: Mathlib/CategoryTheory/Limits/Cones.lean

Proof steps:
state_before: J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : J ⥤ C
e : K ≌ J
s : Cocone (e.functor ⋙ F)
k : K
⊢ (((whiskering e.inverse ⋙
                    precompose
                      (F.leftUnitor.inv ≫ whiskerRight e.counitIso.inv F ≫ (e.inverse.associator e.functor F).inv)) ⋙
                  whiskering e.functor).obj
              s).ι.app
        k ≫
      (Iso.refl
          (((whiskering e.inverse ⋙
                    precompose
                      (F.leftUnitor.inv ≫ whiskerRight e.counitIso.inv F ≫ (e.inverse.associator e.functor F).inv)) ⋙
                  whiskering e.functor).obj
              s).pt).hom =
    ((𝟭 (Cocone (e.functor ⋙ F))).obj s).ι.app k
state_after: no goals
tactic: simpa [e.counitInv_app_functor k] using s.w (e.unit.app k)
Theorem: Fin.liftFun_iff_succ
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m : ℕ
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : Fin (n + 1) → α
⊢ ((fun x x_1 => x < x_1) ⇒ r) f f ↔ ∀ (i : Fin n), r (f i.castSucc) (f i.succ)
state_after: case mp
n m : ℕ
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : Fin (n + 1) → α
⊢ ((fun x x_1 => x < x_1) ⇒ r) f f → ∀ (i : Fin n), r (f i.castSucc) (f i.succ)

case mpr
n m : ℕ
α : Type u_1
r : α → α → Prop
inst✝ : IsTrans α r
f : Fin (n + 1) → α
⊢ (∀ (i : Fin n), r (f i.castSucc) (f i.succ)) → ((fun x x_1 => x < x_1) ⇒ r) f f
tactic: constructor
Theorem: CategoryTheory.SingleFunctors.postcompPostcompIso_inv_hom_app
File: Mathlib/CategoryTheory/Shift/SingleFunctors.lean

Proof steps:
state_before: C : Type u_1
D : Type u_2
E : Type u_3
E' : Type u_4
inst✝⁹ : Category.{?u.91944, u_1} C
inst✝⁸ : Category.{?u.91948, u_2} D
inst✝⁷ : Category.{?u.91952, u_3} E
inst✝⁶ : Category.{?u.91956, u_4} E'
A : Type u_5
inst✝⁵ : AddMonoid A
inst✝⁴ : HasShift D A
inst✝³ : HasShift E A
inst✝² : HasShift E' A
F G✝ H : SingleFunctors C D A
G : D ⥤ E
G' : E ⥤ E'
inst✝¹ : G.CommShift A
inst✝ : G'.CommShift A
n a a' : A
ha' : n + a = a'
⊢ (((F.postcomp G).postcomp G').shiftIso n a a' ha').hom ≫ ((fun a => (F.functor a).associator G G') a).hom =
    whiskerRight ((fun a => (F.functor a).associator G G') a').hom (shiftFunctor E' n) ≫
      ((F.postcomp (G ⋙ G')).shiftIso n a a' ha').hom
state_after: case w.h
C : Type u_1
D : Type u_2
E : Type u_3
E' : Type u_4
inst✝⁹ : Category.{?u.91944, u_1} C
inst✝⁸ : Category.{?u.91948, u_2} D
inst✝⁷ : Category.{?u.91952, u_3} E
inst✝⁶ : Category.{?u.91956, u_4} E'
A : Type u_5
inst✝⁵ : AddMonoid A
inst✝⁴ : HasShift D A
inst✝³ : HasShift E A
inst✝² : HasShift E' A
F G✝ H : SingleFunctors C D A
G : D ⥤ E
G' : E ⥤ E'
inst✝¹ : G.CommShift A
inst✝ : G'.CommShift A
n a a' : A
ha' : n + a = a'
X : C
⊢ ((((F.postcomp G).postcomp G').shiftIso n a a' ha').hom ≫ ((fun a => (F.functor a).associator G G') a).hom).app X =
    (whiskerRight ((fun a => (F.functor a).associator G G') a').hom (shiftFunctor E' n) ≫
          ((F.postcomp (G ⋙ G')).shiftIso n a a' ha').hom).app
      X
tactic: ext X
state_before: case w.h
C : Type u_1
D : Type u_2
E : Type u_3
E' : Type u_4
inst✝⁹ : Category.{?u.91944, u_1} C
inst✝⁸ : Category.{?u.91948, u_2} D
inst✝⁷ : Category.{?u.91952, u_3} E
inst✝⁶ : Category.{?u.91956, u_4} E'
A : Type u_5
inst✝⁵ : AddMonoid A
inst✝⁴ : HasShift D A
inst✝³ : HasShift E A
inst✝² : HasShift E' A
F G✝ H : SingleFunctors C D A
G : D ⥤ E
G' : E ⥤ E'
inst✝¹ : G.CommShift A
inst✝ : G'.CommShift A
n a a' : A
ha' : n + a = a'
X : C
⊢ ((((F.postcomp G).postcomp G').shiftIso n a a' ha').hom ≫ ((fun a => (F.functor a).associator G G') a).hom).app X =
    (whiskerRight ((fun a => (F.functor a).associator G G') a').hom (shiftFunctor E' n) ≫
          ((F.postcomp (G ⋙ G')).shiftIso n a a' ha').hom).app
      X
state_after: no goals
tactic: simp [Functor.commShiftIso_comp_inv_app]
Theorem: Real.rpow_two
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

Proof steps:
state_before: x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ 2 = x ^ 2
state_after: x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ 2 = x ^ ↑2
tactic: rw [← rpow_natCast]
state_before: x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ 2 = x ^ ↑2
state_after: no goals
tactic: simp only [Nat.cast_ofNat]
Theorem: CochainComplex.mappingCone.inl_v_triangle_mor₃_f
File: Mathlib/Algebra/Homology/HomotopyCategory/Pretriangulated.lean

Proof steps:
state_before: C : Type u_1
D : Type u_2
inst✝⁷ : Category.{?u.2006, u_1} C
inst✝⁶ : Category.{?u.2010, u_2} D
inst✝⁵ : Preadditive C
inst✝⁴ : HasZeroObject C
inst✝³ : HasBinaryBiproducts C
inst✝² : Preadditive D
inst✝¹ : HasZeroObject D
inst✝ : HasBinaryBiproducts D
K L : CochainComplex C ℤ
φ : K ⟶ L
p q : ℤ
hpq : p + -1 = q
⊢ p = q + 1
state_after: no goals
tactic: rw [← hpq, neg_add_cancel_right]
state_before: C : Type u_1
D : Type u_2
inst✝⁷ : Category.{u_3, u_1} C
inst✝⁶ : Category.{?u.2010, u_2} D
inst✝⁵ : Preadditive C
inst✝⁴ : HasZeroObject C
inst✝³ : HasBinaryBiproducts C
inst✝² : Preadditive D
inst✝¹ : HasZeroObject D
inst✝ : HasBinaryBiproducts D
K L : CochainComplex C ℤ
φ : K ⟶ L
p q : ℤ
hpq : p + -1 = q
⊢ (inl φ).v p q hpq ≫ (triangle φ).mor₃.f q = -(K.shiftFunctorObjXIso 1 q p ⋯).inv
state_after: no goals
tactic: simp [triangle, Cochain.rightShift_v _ 1 0 (zero_add 1) q q (add_zero q) p (by omega)]
Theorem: Int.range_castAddHom
File: Mathlib/Algebra/Group/Subgroup/ZPowers.lean

Proof steps:
state_before: G : Type u_1
inst✝³ : Group G
A✝ : Type u_2
inst✝² : AddGroup A✝
N : Type u_3
inst✝¹ : Group N
A : Type u_4
inst✝ : AddGroupWithOne A
⊢ (castAddHom A).range = AddSubgroup.zmultiples 1
state_after: case h
G : Type u_1
inst✝³ : Group G
A✝ : Type u_2
inst✝² : AddGroup A✝
N : Type u_3
inst✝¹ : Group N
A : Type u_4
inst✝ : AddGroupWithOne A
a : A
⊢ a ∈ (castAddHom A).range ↔ a ∈ AddSubgroup.zmultiples 1
tactic: ext a
state_before: case h
G : Type u_1
inst✝³ : Group G
A✝ : Type u_2
inst✝² : AddGroup A✝
N : Type u_3
inst✝¹ : Group N
A : Type u_4
inst✝ : AddGroupWithOne A
a : A
⊢ a ∈ (castAddHom A).range ↔ a ∈ AddSubgroup.zmultiples 1
state_after: no goals
tactic: simp_rw [AddMonoidHom.mem_range, Int.coe_castAddHom, AddSubgroup.mem_zmultiples_iff, zsmul_one]
Theorem: Monoid.exists_list_of_mem_closure
File: Mathlib/Deprecated/Submonoid.lean

Proof steps:
state_before: M : Type u_1
inst✝¹ : Monoid M
s✝ : Set M
A : Type u_2
inst✝ : AddMonoid A
t : Set A
s : Set M
a : M
h : a ∈ Closure s
⊢ ∃ l, (∀ x ∈ l, x ∈ s) ∧ l.prod = a
state_after: no goals
tactic: induction h with
  | @basic a ha => exists [a]; simp [ha]
  | one => exists []; simp
  | mul _ _ ha hb =>
    rcases ha with ⟨la, ha, eqa⟩
    rcases hb with ⟨lb, hb, eqb⟩
    exists la ++ lb
    simp only [List.mem_append, or_imp, List.prod_append, eqa.symm, eqb.symm, and_true]
    exact fun a => ⟨ha a, hb a⟩
Theorem: SimpleGraph.edgeFinset_inj
File: Mathlib/Combinatorics/SimpleGraph/Finite.lean

Proof steps:
state_before: V : Type u_1
G : SimpleGraph V
e : Sym2 V
G₁ G₂ : SimpleGraph V
inst✝² : Fintype ↑G.edgeSet
inst✝¹ : Fintype ↑G₁.edgeSet
inst✝ : Fintype ↑G₂.edgeSet
⊢ G₁.edgeFinset = G₂.edgeFinset ↔ G₁ = G₂
state_after: no goals
tactic: simp
Theorem: Set.Finite.toFinset_univ
File: Mathlib/Data/Set/Finite.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
a : α
hs : s.Finite
ht : t.Finite
inst✝ : Fintype α
h : univ.Finite
⊢ h.toFinset = Finset.univ
state_after: no goals
tactic: simp
Theorem: WithLp.prod_edist_eq_card
File: Mathlib/Analysis/Normed/Lp/ProdLp.lean

Proof steps:
state_before: p : ℝ≥0∞
𝕜 : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : EDist α
inst✝ : EDist β
x y : WithLp p (α × β)
x' : α × β
f g : WithLp 0 (α × β)
⊢ edist f g = (if edist f.1 g.1 = 0 then 0 else 1) + if edist f.2 g.2 = 0 then 0 else 1
state_after: no goals
tactic: convert if_pos rfl
Theorem: CategoryTheory.ShortComplex.rightHomologyFunctorOpNatIso_inv_app
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝⁵ : Category.{?u.199564, u_1} C
inst✝⁴ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
inst✝³ : HasKernels C
inst✝² : HasCokernels C
inst✝¹ : HasKernels Cᵒᵖ
inst✝ : HasCokernels Cᵒᵖ
⊢ ∀ {X Y : (ShortComplex C)ᵒᵖ} (f : X ⟶ Y),
    (rightHomologyFunctor C).op.map f ≫ ((fun S => (Opposite.unop S).leftHomologyOpIso.symm) Y).hom =
      ((fun S => (Opposite.unop S).leftHomologyOpIso.symm) X).hom ≫ (opFunctor C ⋙ leftHomologyFunctor Cᵒᵖ).map f
state_after: no goals
tactic: simp [rightHomologyMap_op]
Theorem: acc_lift₂_iff
File: Mathlib/Order/RelIso/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
u : δ → δ → Prop
inst✝ : Setoid α
r : α → α → Prop
H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂
a : α
⊢ Acc (Quotient.lift₂ r H) ⟦a⟧ ↔ Acc r a
state_after: case mp
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
u : δ → δ → Prop
inst✝ : Setoid α
r : α → α → Prop
H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂
a : α
⊢ Acc (Quotient.lift₂ r H) ⟦a⟧ → Acc r a

case mpr
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r✝ : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
u : δ → δ → Prop
inst✝ : Setoid α
r : α → α → Prop
H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂
a : α
⊢ Acc r a → Acc (Quotient.lift₂ r H) ⟦a⟧
tactic: constructor
Theorem: List.Chain'.count_not_eq_count
File: Mathlib/Data/Bool/Count.lean

Proof steps:
state_before: l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) l
h2 : Even l.length
b : Bool
⊢ count (!b) l = count b l
state_after: case nil
b : Bool
hl : Chain' (fun x x_1 => x ≠ x_1) []
h2 : Even [].length
⊢ count (!b) [] = count b []

case cons
b x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
h2 : Even (x :: l).length
⊢ count (!b) (x :: l) = count b (x :: l)
tactic: cases' l with x l
state_before: case cons
b x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
h2 : Even (x :: l).length
⊢ count (!b) (x :: l) = count b (x :: l)
state_after: case cons
b x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
h2 : l.length % 2 = 1
⊢ count (!b) (x :: l) = count b (x :: l)
tactic: rw [length_cons, Nat.even_add_one, Nat.not_even_iff] at h2
state_before: case cons
b x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
h2 : l.length % 2 = 1
⊢ count (!b) (x :: l) = count b (x :: l)
state_after: case cons
b x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
h2 : l.length % 2 = 1
⊢ count (!x) (x :: l) = count x (x :: l)
tactic: suffices count (!x) (x :: l) = count x (x :: l) by
    -- Porting note: old proof is
    -- cases b <;> cases x <;> try exact this;
    cases b <;> cases x <;>
    revert this <;> simp only [Bool.not_false, Bool.not_true] <;> intro this <;>
    (try exact this) <;> exact this.symm
state_before: case cons
b x : Bool
l : List Bool
hl : Chain' (fun x x_1 => x ≠ x_1) (x :: l)
h2 : l.length % 2 = 1
⊢ count (!x) (x :: l) = count x (x :: l)
state_after: no goals
tactic: rw [count_cons_of_ne x.not_ne_self, hl.count_not, h2, count_cons_self]
Theorem: CategoryTheory.Limits.Cocones.whiskeringEquivalence_inverse
File: Mathlib/CategoryTheory/Limits/Cones.lean

Proof steps:
state_before: J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : J ⥤ C
e : K ≌ J
s : Cocone (e.functor ⋙ F)
k : K
⊢ (((whiskering e.inverse ⋙
                    precompose
                      (F.leftUnitor.inv ≫ whiskerRight e.counitIso.inv F ≫ (e.inverse.associator e.functor F).inv)) ⋙
                  whiskering e.functor).obj
              s).ι.app
        k ≫
      (Iso.refl
          (((whiskering e.inverse ⋙
                    precompose
                      (F.leftUnitor.inv ≫ whiskerRight e.counitIso.inv F ≫ (e.inverse.associator e.functor F).inv)) ⋙
                  whiskering e.functor).obj
              s).pt).hom =
    ((𝟭 (Cocone (e.functor ⋙ F))).obj s).ι.app k
state_after: no goals
tactic: simpa [e.counitInv_app_functor k] using s.w (e.unit.app k)
Theorem: HasFDerivAt.hasLineDerivAt
File: Mathlib/Analysis/Calculus/LineDeriv/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ : E → F
f' : F
s t : Set E
x v✝ : E
L : E →L[𝕜] F
hf : HasFDerivAt f L x
v : E
⊢ HasLineDerivAt 𝕜 f (L v) x v
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ : E → F
f' : F
s t : Set E
x v✝ : E
L : E →L[𝕜] F
hf : HasFDerivAt f L x
v : E
⊢ HasLineDerivWithinAt 𝕜 f (L v) univ x v
tactic: rw [← hasLineDerivWithinAt_univ]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ : E → F
f' : F
s t : Set E
x v✝ : E
L : E →L[𝕜] F
hf : HasFDerivAt f L x
v : E
⊢ HasLineDerivWithinAt 𝕜 f (L v) univ x v
state_after: no goals
tactic: exact hf.hasFDerivWithinAt.hasLineDerivWithinAt v
Theorem: List.prod_take_succ
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
i : ℕ
p : i < [].length
⊢ (take (i + 1) []).prod = (take i []).prod * [][i]
state_after: no goals
tactic: cases p
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 h : M
t : List M
n : ℕ
p : n + 1 < (h :: t).length
⊢ (take (n + 1 + 1) (h :: t)).prod = (take (n + 1) (h :: t)).prod * (h :: t)[n + 1]
state_after: ι : 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 h : M
t : List M
n : ℕ
p : n + 1 < (h :: t).length
⊢ (h :: take (n + 1) t).prod = (h :: take n t).prod * t[n]
tactic: dsimp
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 h : M
t : List M
n : ℕ
p : n + 1 < (h :: t).length
⊢ (h :: take (n + 1) t).prod = (h :: take n t).prod * t[n]
state_after: no goals
tactic: rw [prod_cons, prod_cons, prod_take_succ t n (Nat.lt_of_succ_lt_succ p), mul_assoc]
Theorem: FirstOrder.Language.BoundedFormula.realize_liftAt_one_self
File: Mathlib/ModelTheory/Semantics.lean

Proof steps:
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝ l : ℕ
φ✝ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v✝ : α → M
xs✝ : Fin l → M
n : ℕ
φ : L.BoundedFormula α n
v : α → M
xs : Fin (n + 1) → M
⊢ (liftAt 1 n φ).Realize v xs ↔ φ.Realize v (xs ∘ castSucc)
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝ l : ℕ
φ✝ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v✝ : α → M
xs✝ : Fin l → M
n : ℕ
φ : L.BoundedFormula α n
v : α → M
xs : Fin (n + 1) → M
⊢ φ.Realize v (xs ∘ fun i => if ↑i < n then i.castSucc else i.succ) = φ.Realize v (xs ∘ castSucc)
tactic: rw [realize_liftAt_one (refl n), iff_eq_eq]
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝ l : ℕ
φ✝ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v✝ : α → M
xs✝ : Fin l → M
n : ℕ
φ : L.BoundedFormula α n
v : α → M
xs : Fin (n + 1) → M
⊢ φ.Realize v (xs ∘ fun i => if ↑i < n then i.castSucc else i.succ) = φ.Realize v (xs ∘ castSucc)
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝ l : ℕ
φ✝ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v✝ : α → M
xs✝ : Fin l → M
n : ℕ
φ : L.BoundedFormula α n
v : α → M
xs : Fin (n + 1) → M
i : Fin n
⊢ (if ↑i < n then i.castSucc else i.succ) = i.castSucc
tactic: refine congr rfl (congr rfl (funext fun i => ?_))
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝ l : ℕ
φ✝ ψ : L.BoundedFormula α l
θ : L.BoundedFormula α l.succ
v✝ : α → M
xs✝ : Fin l → M
n : ℕ
φ : L.BoundedFormula α n
v : α → M
xs : Fin (n + 1) → M
i : Fin n
⊢ (if ↑i < n then i.castSucc else i.succ) = i.castSucc
state_after: no goals
tactic: rw [if_pos i.is_lt]
Theorem: MeasureTheory.Measure.fst_univ
File: Mathlib/MeasureTheory/Constructions/Prod/Basic.lean

Proof steps:
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
E : Type u_6
inst✝⁶ : MeasurableSpace α
inst✝⁵ : MeasurableSpace α'
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace β'
inst✝² : MeasurableSpace γ
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ
inst✝¹ : NormedAddCommGroup E
inst✝ : SFinite ν
ρ : Measure (α × β)
⊢ ρ.fst univ = ρ univ
state_after: no goals
tactic: rw [fst_apply MeasurableSet.univ, preimage_univ]