ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Finset.sum_le_sum_of_ne_zero
File: Mathlib/Algebra/Order/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
G : Type u_6
k : Type u_7
R : Type u_8
inst✝ : CanonicallyOrderedCommMonoid M
f : ι → M
s t : Finset ι
h : ∀ x ∈ s, f x ≠ 1 → x ∈ t
⊢ ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x
state_after: no goals
tactic: classical calc
    ∏ x ∈ s, f x = (∏ x ∈ s.filter fun x ↦ f x = 1, f x) *
        ∏ x ∈ s.filter fun x ↦ f x ≠ 1, f x := by
      rw [← prod_union, filter_union_filter_neg_eq]
      exact disjoint_filter.2 fun _ _ h n_h ↦ n_h h
    _ ≤ ∏ x ∈ t, f x :=
      mul_le_of_le_one_of_le
        (prod_le_one' <| by simp only [mem_filter, and_imp]; exact fun _ _ ↦ le_of_eq)
        (prod_le_prod_of_subset' <| by simpa only [subset_iff, mem_filter, and_imp] )
Theorem: AlgebraicGeometry.StructureSheaf.const_congr
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
f₁ f₂ g₁ g₂ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu : ∀ x ∈ U, g₁ ∈ x.asIdeal.primeCompl
hf : f₁ = f₂
hg : g₁ = g₂
⊢ const R f₁ g₁ U hu = const R f₂ g₂ U ⋯
state_after: R : Type u
inst✝ : CommRing R
f₁ g₁ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu : ∀ x ∈ U, g₁ ∈ x.asIdeal.primeCompl
⊢ const R f₁ g₁ U hu = const R f₁ g₁ U ⋯
tactic: substs hf hg
state_before: R : Type u
inst✝ : CommRing R
f₁ g₁ : R
U : Opens ↑(PrimeSpectrum.Top R)
hu : ∀ x ∈ U, g₁ ∈ x.asIdeal.primeCompl
⊢ const R f₁ g₁ U hu = const R f₁ g₁ U ⋯
state_after: no goals
tactic: rfl
Theorem: TopCat.Presheaf.germ_res_apply
File: Mathlib/Topology/Sheaves/Stalks.lean

Proof steps:
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y Z : TopCat
F : Presheaf C X
U V : Opens ↑X
i : U ⟶ V
x : ↥U
inst✝ : ConcreteCategory C
s : (forget C).obj (F.obj (op V))
⊢ (F.germ x) ((F.map i.op) s) = (F.germ ((fun x => ⟨↑x, ⋯⟩) x)) s
state_after: no goals
tactic: rw [← comp_apply, germ_res]
Theorem: PMF.pure_bindOnSupport
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f✝ : (a : α) → a ∈ p.support → PMF β
a : α
f : (a' : α) → a' ∈ (pure a).support → PMF β
⊢ (pure a).bindOnSupport f = f a ⋯
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f✝ : (a : α) → a ∈ p.support → PMF β
a : α
f : (a' : α) → a' ∈ (pure a).support → PMF β
b : β
⊢ ((pure a).bindOnSupport f) b = (f a ⋯) b
tactic: refine PMF.ext fun b => ?_
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f✝ : (a : α) → a ∈ p.support → PMF β
a : α
f : (a' : α) → a' ∈ (pure a).support → PMF β
b : β
⊢ ((pure a).bindOnSupport f) b = (f a ⋯) b
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f✝ : (a : α) → a ∈ p.support → PMF β
a : α
f : (a' : α) → a' ∈ (pure a).support → PMF β
b : β
⊢ (∑' (a_1 : α), (if a_1 = a then 1 else 0) * if h : (if a_1 = a then 1 else 0) = 0 then 0 else (f a_1 h) b) = (f a ⋯) b
tactic: simp only [bindOnSupport_apply, pure_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f✝ : (a : α) → a ∈ p.support → PMF β
a : α
f : (a' : α) → a' ∈ (pure a).support → PMF β
b : β
⊢ (∑' (a_1 : α), (if a_1 = a then 1 else 0) * if h : (if a_1 = a then 1 else 0) = 0 then 0 else (f a_1 h) b) = (f a ⋯) b
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f✝ : (a : α) → a ∈ p.support → PMF β
a : α
f : (a' : α) → a' ∈ (pure a).support → PMF β
b : β
a' : α
⊢ ((if a' = a then 1 else 0) * if h : (if a' = a then 1 else 0) = 0 then 0 else (f a' h) b) =
    if a' = a then (f a ⋯) b else 0
tactic: refine _root_.trans (tsum_congr fun a' => ?_) (tsum_ite_eq a _)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f✝ : (a : α) → a ∈ p.support → PMF β
a : α
f : (a' : α) → a' ∈ (pure a).support → PMF β
b : β
a' : α
⊢ ((if a' = a then 1 else 0) * if h : (if a' = a then 1 else 0) = 0 then 0 else (f a' h) b) =
    if a' = a then (f a ⋯) b else 0
state_after: no goals
tactic: by_cases h : a' = a <;> simp [h]
Theorem: pow_mul
File: Mathlib/Algebra/Group/Defs.lean

Proof steps:
state_before: G : Type u_1
M : Type u_2
inst✝ : Monoid M
a✝ b c : M
m✝ n : ℕ
a : M
m : ℕ
⊢ a ^ (m * 0) = (a ^ m) ^ 0
state_after: no goals
tactic: rw [Nat.mul_zero, pow_zero, pow_zero]
state_before: G : Type u_1
M : Type u_2
inst✝ : Monoid M
a✝ b c : M
m✝ n✝ : ℕ
a : M
m n : ℕ
⊢ a ^ (m * (n + 1)) = (a ^ m) ^ (n + 1)
state_after: no goals
tactic: rw [Nat.mul_succ, pow_add, pow_succ, pow_mul]
Theorem: Turing.PartrecToTM2.supports_union
File: Mathlib/Computability/TMToPartrec.lean

Proof steps:
state_before: K₁ K₂ S : Finset Λ'
⊢ Supports (K₁ ∪ K₂) S ↔ Supports K₁ S ∧ Supports K₂ S
state_after: no goals
tactic: simp [Supports, or_imp, forall_and]
Theorem: star_ne_zero
File: Mathlib/Algebra/Star/Basic.lean

Proof steps:
state_before: R : Type u
inst✝¹ : AddMonoid R
inst✝ : StarAddMonoid R
x : R
⊢ star x ≠ 0 ↔ x ≠ 0
state_after: no goals
tactic: simp only [ne_eq, star_eq_zero]
Theorem: CategoryTheory.GrothendieckTopology.imageSheaf_val
File: Mathlib/CategoryTheory/Sites/Subsheaf.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F✝ F'✝ F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F✝
F F' : Sheaf J (Type w)
f : F ⟶ F'
⊢ Presheaf.IsSheaf J (Subpresheaf.sheafify J (imagePresheaf f.val)).toPresheaf
state_after: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F✝ F'✝ F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F✝
F F' : Sheaf J (Type w)
f : F ⟶ F'
⊢ Presieve.IsSheaf J (Subpresheaf.sheafify J (imagePresheaf f.val)).toPresheaf
tactic: rw [isSheaf_iff_isSheaf_of_type]
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F✝ F'✝ F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F✝
F F' : Sheaf J (Type w)
f : F ⟶ F'
⊢ Presieve.IsSheaf J (Subpresheaf.sheafify J (imagePresheaf f.val)).toPresheaf
state_after: case hF
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F✝ F'✝ F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F✝
F F' : Sheaf J (Type w)
f : F ⟶ F'
⊢ Presieve.IsSheaf J F'.val
tactic: apply Subpresheaf.sheafify_isSheaf
state_before: case hF
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F✝ F'✝ F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F✝
F F' : Sheaf J (Type w)
f : F ⟶ F'
⊢ Presieve.IsSheaf J F'.val
state_after: case hF
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F✝ F'✝ F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F✝
F F' : Sheaf J (Type w)
f : F ⟶ F'
⊢ Presheaf.IsSheaf J F'.val
tactic: rw [← isSheaf_iff_isSheaf_of_type]
state_before: case hF
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F✝ F'✝ F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F✝
F F' : Sheaf J (Type w)
f : F ⟶ F'
⊢ Presheaf.IsSheaf J F'.val
state_after: no goals
tactic: exact F'.2
Theorem: Inducing.isOpen_iff
File: Mathlib/Topology/Maps/Basic.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hf : Inducing f
s : Set X
⊢ IsOpen s ↔ ∃ t, IsOpen t ∧ f ⁻¹' t = s
state_after: no goals
tactic: rw [hf.induced, isOpen_induced_iff]
Theorem: iff_right_comm
File: Mathlib/Logic/Lemmas.lean

Proof steps:
state_before: a b c : Prop
⊢ ((a ↔ b) ↔ c) ↔ ((a ↔ c) ↔ b)
state_after: no goals
tactic: tauto
Theorem: EllipticCurve.map_a₆
File: Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
E : EllipticCurve R
A : Type v
inst✝ : CommRing A
φ : R →+* A
⊢ ↑((Units.map ↑φ) E.Δ') = (E.map φ).Δ
state_after: R : Type u
inst✝¹ : CommRing R
E : EllipticCurve R
A : Type v
inst✝ : CommRing A
φ : R →+* A
⊢ ↑φ E.Δ = φ E.Δ
tactic: simp only [Units.coe_map, coe_Δ', E.map_Δ]
state_before: R : Type u
inst✝¹ : CommRing R
E : EllipticCurve R
A : Type v
inst✝ : CommRing A
φ : R →+* A
⊢ ↑φ E.Δ = φ E.Δ
state_after: no goals
tactic: rfl
Theorem: MulOpposite.exponent
File: Mathlib/GroupTheory/Exponent.lean

Proof steps:
state_before: G : Type u
inst✝ : Monoid G
⊢ Monoid.exponent Gᵐᵒᵖ = Monoid.exponent G
state_after: G : Type u
inst✝ : Monoid G
⊢ (if h : ∃ n, 0 < n ∧ ∀ (g : Gᵐᵒᵖ), g ^ n = 1 then Nat.find h else 0) =
    if h : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1 then Nat.find h else 0
tactic: simp only [Monoid.exponent, ExponentExists]
state_before: G : Type u
inst✝ : Monoid G
⊢ (if h : ∃ n, 0 < n ∧ ∀ (g : Gᵐᵒᵖ), g ^ n = 1 then Nat.find h else 0) =
    if h : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1 then Nat.find h else 0
state_after: case h₂.h.e'_1.h.h.e'_2.a
G : Type u
inst✝ : Monoid G
h_congr_thm✝ :
  ∀ {b c : Prop} {α : Type} {x : Decidable b} [inst : Decidable c] {x_1 : b → α} {u : c → α} {y : ¬b → α} {v : ¬c → α}
    (h₁ : b = c), (∀ (h : c), x_1 ⋯ = u h) → (∀ (h : ¬c), y ⋯ = v h) → dite b x_1 y = dite c u v
h✝ : ∃ n, 0 < n ∧ ∀ (g : G), g ^ n = 1
x✝ : ℕ
⊢ (∀ (g : Gᵐᵒᵖ), g ^ x✝ = 1) ↔ ∀ (g : G), g ^ x✝ = 1

case h₁.h.e'_2.h.h.e'_2.a
G : Type u
inst✝ : Monoid G
x✝ : ℕ
⊢ (∀ (g : Gᵐᵒᵖ), g ^ x✝ = 1) ↔ ∀ (g : G), g ^ x✝ = 1
tactic: congr!
Theorem: CategoryTheory.MonoidalCategory.triangle_assoc_comp_left_inv
File: Mathlib/CategoryTheory/Monoidal/Category.lean

Proof steps:
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z X Y : C
⊢ X ◁ (λ_ Y).inv ≫ (α_ X (𝟙_ C) Y).inv = (ρ_ X).inv ▷ Y
state_after: no goals
tactic: simp [← cancel_mono ((ρ_ X).hom ▷ Y)]
Theorem: Set.image_update_Ioo
File: Mathlib/Order/Interval/Set/Pi.lean

Proof steps:
state_before: ι : Type u_1
α : ι → Type u_2
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → PartialOrder (α i)
f : (i : ι) → α i
i : ι
a b : α i
⊢ update f i '' Ioo a b = Ioo (update f i a) (update f i b)
state_after: no goals
tactic: rw [← Ico_diff_left, ← Ico_diff_left, image_diff (update_injective _ _), image_singleton,
    image_update_Ico]
Theorem: div_mul_cancel_left
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : CommGroup G
a✝ b✝ c d a b : G
⊢ a / (a * b) = b⁻¹
state_after: no goals
tactic: rw [← inv_div, mul_div_cancel_left]
Theorem: Nat.image_cast_int_Ioi
File: Mathlib/Data/Nat/Cast/SetInterval.lean

Proof steps:
state_before: a : ℕ
⊢ IsUpperSet (range ⇑castOrderEmbedding)
state_after: no goals
tactic: simp [isUpperSet_Ici]
Theorem: normEDS_ofNat
File: Mathlib/NumberTheory/EllipticDivisibilitySequence.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
n : ℕ
⊢ normEDS b c d ↑n = preNormEDS' (b ^ 4) c d n * if Even n then b else 1
state_after: no goals
tactic: simp only [normEDS, preNormEDS_ofNat, Int.even_coe_nat]
Theorem: CategoryTheory.SimplicialObject.Augmented.whiskering_obj
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X : SimplicialObject C
D : Type u'
inst✝ : Category.{v', u'} D
X✝ Y✝ : C ⥤ D
η : X✝ ⟶ Y✝
A : Augmented C
⊢ (𝟭 (SimplicialObject D)).map (whiskerLeft (drop.obj A) η) ≫ ((whiskeringObj C D Y✝).obj A).hom =
    ((whiskeringObj C D X✝).obj A).hom ≫ (const D).map (η.app (point.obj A))
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
X : SimplicialObject C
D : Type u'
inst✝ : Category.{v', u'} D
X✝ Y✝ : C ⥤ D
η : X✝ ⟶ Y✝
A : Augmented C
n : SimplexCategoryᵒᵖ
⊢ ((𝟭 (SimplicialObject D)).map (whiskerLeft (drop.obj A) η) ≫ ((whiskeringObj C D Y✝).obj A).hom).app n =
    (((whiskeringObj C D X✝).obj A).hom ≫ (const D).map (η.app (point.obj A))).app n
tactic: ext n
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
X : SimplicialObject C
D : Type u'
inst✝ : Category.{v', u'} D
X✝ Y✝ : C ⥤ D
η : X✝ ⟶ Y✝
A : Augmented C
n : SimplexCategoryᵒᵖ
⊢ ((𝟭 (SimplicialObject D)).map (whiskerLeft (drop.obj A) η) ≫ ((whiskeringObj C D Y✝).obj A).hom).app n =
    (((whiskeringObj C D X✝).obj A).hom ≫ (const D).map (η.app (point.obj A))).app n
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
X : SimplicialObject C
D : Type u'
inst✝ : Category.{v', u'} D
X✝ Y✝ : C ⥤ D
η : X✝ ⟶ Y✝
A : Augmented C
n : SimplexCategoryᵒᵖ
⊢ η.app (A.left.obj n) ≫ Y✝.map (A.hom.app n) ≫ 𝟙 (Y✝.obj A.right) =
    (X✝.map (A.hom.app n) ≫ 𝟙 (X✝.obj A.right)) ≫ η.app A.right
tactic: dsimp
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
X : SimplicialObject C
D : Type u'
inst✝ : Category.{v', u'} D
X✝ Y✝ : C ⥤ D
η : X✝ ⟶ Y✝
A : Augmented C
n : SimplexCategoryᵒᵖ
⊢ η.app (A.left.obj n) ≫ Y✝.map (A.hom.app n) ≫ 𝟙 (Y✝.obj A.right) =
    (X✝.map (A.hom.app n) ≫ 𝟙 (X✝.obj A.right)) ≫ η.app A.right
state_after: no goals
tactic: rw [Category.comp_id, Category.comp_id, η.naturality]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X : SimplicialObject C
D : Type u'
inst✝ : Category.{v', u'} D
X✝ Y✝ Z✝ : C ⥤ D
x✝¹ : X✝ ⟶ Y✝
x✝ : Y✝ ⟶ Z✝
⊢ { obj := whiskeringObj C D,
          map := fun {X Y} η =>
            { app := fun A => { left := whiskerLeft (drop.obj A) η, right := η.app (point.obj A), w := ⋯ },
              naturality := ⋯ } }.map
      (x✝¹ ≫ x✝) =
    { obj := whiskeringObj C D,
            map := fun {X Y} η =>
              { app := fun A => { left := whiskerLeft (drop.obj A) η, right := η.app (point.obj A), w := ⋯ },
                naturality := ⋯ } }.map
        x✝¹ ≫
      { obj := whiskeringObj C D,
            map := fun {X Y} η =>
              { app := fun A => { left := whiskerLeft (drop.obj A) η, right := η.app (point.obj A), w := ⋯ },
                naturality := ⋯ } }.map
        x✝
state_after: no goals
tactic: ext <;> rfl
Theorem: AddLocalization.liftOn₂_mk'
File: Mathlib/GroupTheory/MonoidLocalization/Basic.lean

Proof steps:
state_before: M : Type u_1
inst✝² : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝¹ : CommMonoid N
P : Type u_3
inst✝ : CommMonoid P
p : Sort u_4
f : M → ↥S → M → ↥S → p
H :
  ∀ {a a' : M} {b b' : ↥S} {c c' : M} {d d' : ↥S},
    (r S) (a, b) (a', b') → (r S) (c, d) (c', d') → f a b c d = f a' b' c' d'
a c : M
b d : ↥S
⊢ ((monoidOf S).mk' a b).liftOn₂ ((monoidOf S).mk' c d) f H = f a b c d
state_after: no goals
tactic: rw [← mk_eq_monoidOf_mk', liftOn₂_mk]
Theorem: Set.image_iInter₂
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β
hf : Bijective f
s : (i : ι) → κ i → Set α
⊢ f '' ⋂ i, ⋂ j, s i j = ⋂ i, ⋂ j, f '' s i j
state_after: no goals
tactic: simp_rw [image_iInter hf]
Theorem: Prod.image_mk_segment_right
File: Mathlib/Analysis/Convex/Segment.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x : E
y₁ y₂ : F
⊢ (fun y => (x, y)) '' [y₁-[𝕜]y₂] = [(x, y₁)-[𝕜](x, y₂)]
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x : E
y₁ y₂ : F
⊢ (fun x_1 => (x, x_1.1 • y₁ + x_1.2 • y₂)) '' {p | 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ p.1 + p.2 = 1} =
    (fun p => p.1 • (x, y₁) + p.2 • (x, y₂)) '' {p | 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ p.1 + p.2 = 1}
tactic: rw [segment_eq_image₂, segment_eq_image₂, image_image]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x : E
y₁ y₂ : F
⊢ (fun x_1 => (x, x_1.1 • y₁ + x_1.2 • y₂)) '' {p | 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ p.1 + p.2 = 1} =
    (fun p => p.1 • (x, y₁) + p.2 • (x, y₂)) '' {p | 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ p.1 + p.2 = 1}
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x : E
y₁ y₂ : F
a : 𝕜 × 𝕜
ha : a ∈ {p | 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ p.1 + p.2 = 1}
⊢ (x, a.1 • y₁ + a.2 • y₂) = a.1 • (x, y₁) + a.2 • (x, y₂)
tactic: refine EqOn.image_eq fun a ha ↦ ?_
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x : E
y₁ y₂ : F
a : 𝕜 × 𝕜
ha : a ∈ {p | 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ p.1 + p.2 = 1}
⊢ (x, a.1 • y₁ + a.2 • y₂) = a.1 • (x, y₁) + a.2 • (x, y₂)
state_after: no goals
tactic: simp [Convex.combo_self ha.2.2]
Theorem: LinearMap.BilinForm.congr_symm
File: Mathlib/LinearAlgebra/BilinearForm/Hom.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝⁹ : CommRing R₁
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : Module R₁ M₁
V : Type u_5
K : Type u_6
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
M' : Type u_7
M'' : Type u_8
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M''
inst✝¹ : Module R M'
inst✝ : Module R M''
e : M ≃ₗ[R] M'
⊢ (congr e).symm = congr e.symm
state_after: case h.H
R : Type u_1
M : Type u_2
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝⁹ : CommRing R₁
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : Module R₁ M₁
V : Type u_5
K : Type u_6
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
M' : Type u_7
M'' : Type u_8
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M''
inst✝¹ : Module R M'
inst✝ : Module R M''
e : M ≃ₗ[R] M'
x✝¹ : BilinForm R M'
x✝ y✝ : M
⊢ (((congr e).symm x✝¹) x✝) y✝ = (((congr e.symm) x✝¹) x✝) y✝
tactic: ext
state_before: case h.H
R : Type u_1
M : Type u_2
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝⁹ : CommRing R₁
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : Module R₁ M₁
V : Type u_5
K : Type u_6
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
M' : Type u_7
M'' : Type u_8
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M''
inst✝¹ : Module R M'
inst✝ : Module R M''
e : M ≃ₗ[R] M'
x✝¹ : BilinForm R M'
x✝ y✝ : M
⊢ (((congr e).symm x✝¹) x✝) y✝ = (((congr e.symm) x✝¹) x✝) y✝
state_after: case h.H
R : Type u_1
M : Type u_2
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝⁹ : CommRing R₁
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : Module R₁ M₁
V : Type u_5
K : Type u_6
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
M' : Type u_7
M'' : Type u_8
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M''
inst✝¹ : Module R M'
inst✝ : Module R M''
e : M ≃ₗ[R] M'
x✝¹ : BilinForm R M'
x✝ y✝ : M
⊢ (((congr e).symm x✝¹) x✝) y✝ = (x✝¹ (e x✝)) (e y✝)
tactic: simp only [congr_apply, LinearEquiv.symm_symm]
state_before: case h.H
R : Type u_1
M : Type u_2
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝⁹ : CommRing R₁
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : Module R₁ M₁
V : Type u_5
K : Type u_6
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
M' : Type u_7
M'' : Type u_8
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M''
inst✝¹ : Module R M'
inst✝ : Module R M''
e : M ≃ₗ[R] M'
x✝¹ : BilinForm R M'
x✝ y✝ : M
⊢ (((congr e).symm x✝¹) x✝) y✝ = (x✝¹ (e x✝)) (e y✝)
state_after: no goals
tactic: rfl
Theorem: IsLocalMinOn.fderivWithin_eq_zero
File: Mathlib/Analysis/Calculus/LocalExtr/Basic.lean

Proof steps:
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
s : Set E
a x y : E
h : IsLocalMinOn f s a
hy : y ∈ posTangentConeAt s a
hy' : -y ∈ posTangentConeAt s a
hf : ¬DifferentiableWithinAt ℝ f s a
⊢ (fderivWithin ℝ f s a) y = 0
state_after: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
s : Set E
a x y : E
h : IsLocalMinOn f s a
hy : y ∈ posTangentConeAt s a
hy' : -y ∈ posTangentConeAt s a
hf : ¬DifferentiableWithinAt ℝ f s a
⊢ 0 y = 0
tactic: rw [fderivWithin_zero_of_not_differentiableWithinAt hf]
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
s : Set E
a x y : E
h : IsLocalMinOn f s a
hy : y ∈ posTangentConeAt s a
hy' : -y ∈ posTangentConeAt s a
hf : ¬DifferentiableWithinAt ℝ f s a
⊢ 0 y = 0
state_after: no goals
tactic: rfl
Theorem: List.countP_go_eq_add
File: .lake/packages/batteries/Batteries/Data/List/Count.lean

Proof steps:
state_before: α : Type u_1
p q : α → Bool
n : Nat
l : List α
⊢ countP.go p l n = n + countP.go p l 0
state_after: no goals
tactic: induction l generalizing n with
  | nil => rfl
  | cons head tail ih =>
    unfold countP.go
    rw [ih (n := n + 1), ih (n := n), ih (n := 1)]
    if h : p head then simp [h, Nat.add_assoc] else simp [h]
Theorem: CategoryTheory.preservesColimitsIso_inv_comp_desc
File: Mathlib/CategoryTheory/Limits/Preserves/Limits.lean

Proof steps:
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
G : C ⥤ D
J : Type w
inst✝² : Category.{w', w} J
F : J ⥤ C
inst✝¹ : PreservesColimit F G
inst✝ : HasColimit F
t : Cocone F
⊢ (preservesColimitIso G F).inv ≫ G.map (colimit.desc F t) = colimit.desc (F ⋙ G) (G.mapCocone t)
state_after: case w
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
G : C ⥤ D
J : Type w
inst✝² : Category.{w', w} J
F : J ⥤ C
inst✝¹ : PreservesColimit F G
inst✝ : HasColimit F
t : Cocone F
j✝ : J
⊢ colimit.ι (F ⋙ G) j✝ ≫ (preservesColimitIso G F).inv ≫ G.map (colimit.desc F t) =
    colimit.ι (F ⋙ G) j✝ ≫ colimit.desc (F ⋙ G) (G.mapCocone t)
tactic: ext
state_before: case w
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
G : C ⥤ D
J : Type w
inst✝² : Category.{w', w} J
F : J ⥤ C
inst✝¹ : PreservesColimit F G
inst✝ : HasColimit F
t : Cocone F
j✝ : J
⊢ colimit.ι (F ⋙ G) j✝ ≫ (preservesColimitIso G F).inv ≫ G.map (colimit.desc F t) =
    colimit.ι (F ⋙ G) j✝ ≫ colimit.desc (F ⋙ G) (G.mapCocone t)
state_after: no goals
tactic: simp [← G.map_comp]
Theorem: Algebra.traceMatrix_eq_embeddingsMatrixReindex_mul_trans
File: Mathlib/RingTheory/Trace/Basic.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
T : Type u_3
inst✝²⁴ : CommRing R
inst✝²³ : CommRing S
inst✝²² : CommRing T
inst✝²¹ : Algebra R S
inst✝²⁰ : Algebra R T
K : Type u_4
L : Type u_5
inst✝¹⁹ : Field K
inst✝¹⁸ : Field L
inst✝¹⁷ : Algebra K L
ι κ : Type w
inst✝¹⁶ : Fintype ι
F : Type u_6
inst✝¹⁵ : Field F
inst✝¹⁴ : Algebra R L
inst✝¹³ : Algebra L F
inst✝¹² : Algebra R F
inst✝¹¹ : IsScalarTower R L F
A : Type u
B : Type v
C : Type z
inst✝¹⁰ : CommRing A
inst✝⁹ : CommRing B
inst✝⁸ : Algebra A B
inst✝⁷ : CommRing C
inst✝⁶ : Algebra A C
E : Type z
inst✝⁵ : Field E
inst✝⁴ : Algebra K E
inst✝³ : Module.Finite K L
inst✝² : Algebra.IsSeparable K L
inst✝¹ : IsAlgClosed E
b : κ → L
pb : PowerBasis K L
inst✝ : Fintype κ
e : κ ≃ (L →ₐ[K] E)
⊢ (traceMatrix K b).map ⇑(algebraMap K E) = embeddingsMatrixReindex K E b e * (embeddingsMatrixReindex K E b e)ᵀ
state_after: no goals
tactic: rw [traceMatrix_eq_embeddingsMatrix_mul_trans, embeddingsMatrixReindex, reindex_apply,
    transpose_submatrix, ← submatrix_mul_transpose_submatrix, ← Equiv.coe_refl, Equiv.refl_symm]