ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: DirichletCharacter.Odd.toUnitHom_eval_neg_one
File: Mathlib/NumberTheory/DirichletCharacter/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
S : Type
inst✝ : CommRing S
m : ℕ
ψ : DirichletCharacter S m
hψ : ψ.Odd
⊢ (toUnitHom ψ) (-1) = -1
state_after: R : Type u_1
inst✝¹ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
S : Type
inst✝ : CommRing S
m : ℕ
ψ : DirichletCharacter S m
hψ : ψ.Odd
⊢ ψ ↑(-1) = ↑(-1)
tactic: rw [← Units.eq_iff, MulChar.coe_toUnitHom]
state_before: R : Type u_1
inst✝¹ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
S : Type
inst✝ : CommRing S
m : ℕ
ψ : DirichletCharacter S m
hψ : ψ.Odd
⊢ ψ ↑(-1) = ↑(-1)
state_after: no goals
tactic: exact hψ
Theorem: IsAlgClosed.isAlgClosure_of_transcendence_basis
File: Mathlib/FieldTheory/IsAlgClosed/Classification.lean

Proof steps:
state_before: R : Type u_1
L : Type u_2
K : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : Field K
inst✝³ : Algebra R K
inst✝² : Field L
inst✝¹ : Algebra R L
ι : Type u_4
v : ι → K
κ : Type u_5
w : κ → L
hv✝ : AlgebraicIndependent R v
inst✝ : IsAlgClosed K
hv : IsTranscendenceBasis R v
this : Nontrivial R := RingHom.domain_nontrivial (algebraMap R K)
⊢ IsAlgClosed K
state_after: no goals
tactic: infer_instance
Theorem: Nat.add_div_of_dvd_left
File: Mathlib/Data/Nat/ModEq.lean

Proof steps:
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hca : c ∣ b
⊢ (a + b) / c = a / c + b / c
state_after: no goals
tactic: rwa [add_comm, Nat.add_div_of_dvd_right, add_comm]
Theorem: Nat.card_zpowers
File: Mathlib/Data/ZMod/Quotient.lean

Proof steps:
state_before: n : ℕ
A : Type u_1
R : Type u_2
inst✝² : AddGroup A
inst✝¹ : Ring R
α : Type u_3
inst✝ : Group α
a : α
⊢ Nat.card ↥(zpowers a) = orderOf a
state_after: n : ℕ
A : Type u_1
R : Type u_2
inst✝² : AddGroup A
inst✝¹ : Ring R
α : Type u_3
inst✝ : Group α
a : α
this : Nat.card ↑(MulAction.orbit (↥(zpowers a)) 1) = Nat.card (ZMod (Function.minimalPeriod (fun x => a • x) 1))
⊢ Nat.card ↥(zpowers a) = orderOf a
tactic: have := Nat.card_congr (MulAction.orbitZPowersEquiv a (1 : α))
state_before: n : ℕ
A : Type u_1
R : Type u_2
inst✝² : AddGroup A
inst✝¹ : Ring R
α : Type u_3
inst✝ : Group α
a : α
this : Nat.card ↑(MulAction.orbit (↥(zpowers a)) 1) = Nat.card (ZMod (Function.minimalPeriod (fun x => a • x) 1))
⊢ Nat.card ↥(zpowers a) = orderOf a
state_after: no goals
tactic: rwa [Nat.card_zmod, orbit_subgroup_one_eq_self] at this
Theorem: solvableByRad.isSolvable'
File: Mathlib/FieldTheory/AbelRuffini.lean

Proof steps:
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α✝ α : E
q : F[X]
q_irred : Irreducible q
q_aeval : (aeval α) q = 0
hα : IsSolvableByRad F α
⊢ IsSolvable q.Gal
state_after: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α✝ α : E
q : F[X]
q_irred : Irreducible q
q_aeval : (aeval α) q = 0
hα : IsSolvableByRad F α
this : IsSolvable (q * C q.leadingCoeff⁻¹).Gal
⊢ IsSolvable q.Gal
tactic: have : _root_.IsSolvable (q * C q.leadingCoeff⁻¹).Gal := by
    rw [minpoly.eq_of_irreducible q_irred q_aeval, ←
      show minpoly F (⟨α, hα⟩ : solvableByRad F E) = minpoly F α from
        (minpoly.algebraMap_eq (RingHom.injective _) _).symm]
    exact isSolvable ⟨α, hα⟩
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α✝ α : E
q : F[X]
q_irred : Irreducible q
q_aeval : (aeval α) q = 0
hα : IsSolvableByRad F α
this : IsSolvable (q * C q.leadingCoeff⁻¹).Gal
⊢ IsSolvable q.Gal
state_after: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α✝ α : E
q : F[X]
q_irred : Irreducible q
q_aeval : (aeval α) q = 0
hα : IsSolvableByRad F α
this : IsSolvable (q * C q.leadingCoeff⁻¹).Gal
⊢ q * C q.leadingCoeff⁻¹ ≠ 0
tactic: refine solvable_of_surjective (Gal.restrictDvd_surjective ⟨C q.leadingCoeff⁻¹, rfl⟩ ?_)
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α✝ α : E
q : F[X]
q_irred : Irreducible q
q_aeval : (aeval α) q = 0
hα : IsSolvableByRad F α
this : IsSolvable (q * C q.leadingCoeff⁻¹).Gal
⊢ q * C q.leadingCoeff⁻¹ ≠ 0
state_after: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α✝ α : E
q : F[X]
q_irred : Irreducible q
q_aeval : (aeval α) q = 0
hα : IsSolvableByRad F α
this : IsSolvable (q * C q.leadingCoeff⁻¹).Gal
⊢ ¬q = 0 ∧ ¬q.leadingCoeff = 0
tactic: rw [mul_ne_zero_iff, Ne, Ne, C_eq_zero, inv_eq_zero]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α✝ α : E
q : F[X]
q_irred : Irreducible q
q_aeval : (aeval α) q = 0
hα : IsSolvableByRad F α
this : IsSolvable (q * C q.leadingCoeff⁻¹).Gal
⊢ ¬q = 0 ∧ ¬q.leadingCoeff = 0
state_after: no goals
tactic: exact ⟨q_irred.ne_zero, leadingCoeff_ne_zero.mpr q_irred.ne_zero⟩
Theorem: Submodule.biSup_comap_eq_top_of_range_eq_biSup
File: Mathlib/LinearAlgebra/Span.lean

Proof steps:
state_before: R✝ : Type u_1
R₂✝ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝¹³ : Semiring R✝
inst✝¹² : Semiring R₂✝
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R✝ M
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂✝ M₂
τ₁₂✝ : R✝ →+* R₂✝
inst✝⁷ : RingHomSurjective τ₁₂✝
F : Type u_8
inst✝⁶ : FunLike F M M₂
inst✝⁵ : SemilinearMapClass F τ₁₂✝ M M₂
R : Type u_9
R₂ : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring R₂
τ₁₂ : R →+* R₂
inst✝² : RingHomSurjective τ₁₂
inst✝¹ : Module R M
inst✝ : Module R₂ M₂
ι : Type u_11
s : Set ι
hs : s.Nonempty
p : ι → Submodule R₂ M₂
f : M →ₛₗ[τ₁₂] M₂
hf : LinearMap.range f = ⨆ i ∈ s, p i
⊢ ⨆ i ∈ s, comap f (p i) = ⊤
state_after: R✝ : Type u_1
R₂✝ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝¹³ : Semiring R✝
inst✝¹² : Semiring R₂✝
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R✝ M
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂✝ M₂
τ₁₂✝ : R✝ →+* R₂✝
inst✝⁷ : RingHomSurjective τ₁₂✝
F : Type u_8
inst✝⁶ : FunLike F M M₂
inst✝⁵ : SemilinearMapClass F τ₁₂✝ M M₂
R : Type u_9
R₂ : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring R₂
τ₁₂ : R →+* R₂
inst✝² : RingHomSurjective τ₁₂
inst✝¹ : Module R M
inst✝ : Module R₂ M₂
ι : Type u_11
s : Set ι
hs : s.Nonempty
p : ι → Submodule R₂ M₂
f : M →ₛₗ[τ₁₂] M₂
hf : LinearMap.range f = ⨆ i ∈ s, p i
⊢ ⨆ i ∈ s, comap (LinearMap.range f).subtype (p i) = ⊤
tactic: suffices ⨆ i ∈ s, (p i).comap (LinearMap.range f).subtype = ⊤ by
    rw [← biSup_comap_eq_top_of_surjective s hs _ this _ f.surjective_rangeRestrict]; rfl
state_before: R✝ : Type u_1
R₂✝ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝¹³ : Semiring R✝
inst✝¹² : Semiring R₂✝
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R✝ M
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂✝ M₂
τ₁₂✝ : R✝ →+* R₂✝
inst✝⁷ : RingHomSurjective τ₁₂✝
F : Type u_8
inst✝⁶ : FunLike F M M₂
inst✝⁵ : SemilinearMapClass F τ₁₂✝ M M₂
R : Type u_9
R₂ : Type u_10
inst✝⁴ : Ring R
inst✝³ : Ring R₂
τ₁₂ : R →+* R₂
inst✝² : RingHomSurjective τ₁₂
inst✝¹ : Module R M
inst✝ : Module R₂ M₂
ι : Type u_11
s : Set ι
hs : s.Nonempty
p : ι → Submodule R₂ M₂
f : M →ₛₗ[τ₁₂] M₂
hf : LinearMap.range f = ⨆ i ∈ s, p i
⊢ ⨆ i ∈ s, comap (LinearMap.range f).subtype (p i) = ⊤
state_after: no goals
tactic: exact hf ▸ biSup_comap_subtype_eq_top s p
Theorem: Finsupp.le_degree
File: Mathlib/Data/Finsupp/Weight.lean

Proof steps:
state_before: σ : Type u_1
M : Type u_2
w : σ → M
s : σ
f : σ →₀ ℕ
⊢ f s ≤ f.degree
state_after: σ : Type u_1
M : Type u_2
w : σ → M
s : σ
f : σ →₀ ℕ
⊢ f s ≤ (weight 1) f
tactic: rw [degree_eq_weight_one]
state_before: σ : Type u_1
M : Type u_2
w : σ → M
s : σ
f : σ →₀ ℕ
⊢ f s ≤ (weight 1) f
state_after: case hs
σ : Type u_1
M : Type u_2
w : σ → M
s : σ
f : σ →₀ ℕ
⊢ 1 s ≠ 0
tactic: apply le_weight
state_before: case hs
σ : Type u_1
M : Type u_2
w : σ → M
s : σ
f : σ →₀ ℕ
⊢ 1 s ≠ 0
state_after: no goals
tactic: simp only [Pi.one_apply, ne_eq, one_ne_zero, not_false_eq_true]
Theorem: mem_image_univ_iff_mem_range
File: Mathlib/Data/Fintype/Basic.lean

Proof steps:
state_before: α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Fintype α
inst✝ : DecidableEq β
f : α → β
b : β
⊢ b ∈ image f univ ↔ b ∈ Set.range f
state_after: no goals
tactic: simp
Theorem: List.formPerm_append_pair
File: Mathlib/GroupTheory/Perm/List.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
l✝ : List α
x✝ x y : α
l : List α
a b : α
⊢ (x :: y :: l ++ [a, b]).formPerm = (x :: y :: l ++ [a]).formPerm * swap a b
state_after: no goals
tactic: simpa [mul_assoc] using formPerm_append_pair (y::l) a b
Theorem: Set.mem_toFinset
File: Mathlib/Data/Fintype/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s✝ t s : Set α
inst✝ : Fintype ↑s
a : α
⊢ a ∈ s.toFinset ↔ a ∈ s
state_after: no goals
tactic: simp [toFinset]
Theorem: Profinite.NobelingProof.GoodProducts.linearIndependent_iff_smaller
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

Proof steps:
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
⊢ LinearIndependent ℤ (eval (π C fun x => ord I x < o)) ↔ LinearIndependent ℤ fun (p : ↑(smaller C o)) => ↑p
state_after: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
⊢ LinearIndependent (ι := ↑(range (π C fun x => ord I x < o))) ℤ ((fun p => ↑p) ∘ (range_equiv_smaller C o).toFun) ↔
    LinearIndependent ℤ fun (p : ↑(smaller C o)) => ↑p
tactic: rw [GoodProducts.linearIndependent_iff_range,
    ← LinearMap.linearIndependent_iff (πs C o)
    (LinearMap.ker_eq_bot_of_injective (injective_πs _ _)), ← smaller_factorization C o]
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
⊢ LinearIndependent (ι := ↑(range (π C fun x => ord I x < o))) ℤ ((fun p => ↑p) ∘ (range_equiv_smaller C o).toFun) ↔
    LinearIndependent ℤ fun (p : ↑(smaller C o)) => ↑p
state_after: no goals
tactic: exact linearIndependent_equiv _
Theorem: CategoryTheory.Adjunction.leftAdjointOfEquiv_map
File: Mathlib/CategoryTheory/Adjunction/Basic.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
F_obj : C → D
e : (X : C) → (Y : D) → (F_obj X ⟶ Y) ≃ (X ⟶ G.obj Y)
he : ∀ (X : C) (Y Y' : D) (g : Y ⟶ Y') (h : F_obj X ⟶ Y), (e X Y') (h ≫ g) = (e X Y) h ≫ G.map g
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
f' : Y✝ ⟶ Z✝
⊢ { obj := F_obj, map := fun {X X'} f => (e X (F_obj X')).symm (f ≫ (e X' (F_obj X')) (𝟙 (F_obj X'))) }.map (f ≫ f') =
    { obj := F_obj, map := fun {X X'} f => (e X (F_obj X')).symm (f ≫ (e X' (F_obj X')) (𝟙 (F_obj X'))) }.map f ≫
      { obj := F_obj, map := fun {X X'} f => (e X (F_obj X')).symm (f ≫ (e X' (F_obj X')) (𝟙 (F_obj X'))) }.map f'
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
F_obj : C → D
e : (X : C) → (Y : D) → (F_obj X ⟶ Y) ≃ (X ⟶ G.obj Y)
he : ∀ (X : C) (Y Y' : D) (g : Y ⟶ Y') (h : F_obj X ⟶ Y), (e X Y') (h ≫ g) = (e X Y) h ≫ G.map g
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
f' : Y✝ ⟶ Z✝
⊢ (f ≫ f') ≫ (e Z✝ (F_obj Z✝)) (𝟙 (F_obj Z✝)) =
    (f ≫ (e Y✝ (F_obj Y✝)) (𝟙 (F_obj Y✝))) ≫
      G.map
        ({ obj := F_obj, map := fun {X X'} f => (e X (F_obj X')).symm (f ≫ (e X' (F_obj X')) (𝟙 (F_obj X'))) }.map f')
tactic: rw [Equiv.symm_apply_eq, he, Equiv.apply_symm_apply]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
F_obj : C → D
e : (X : C) → (Y : D) → (F_obj X ⟶ Y) ≃ (X ⟶ G.obj Y)
he : ∀ (X : C) (Y Y' : D) (g : Y ⟶ Y') (h : F_obj X ⟶ Y), (e X Y') (h ≫ g) = (e X Y) h ≫ G.map g
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
f' : Y✝ ⟶ Z✝
⊢ (f ≫ f') ≫ (e Z✝ (F_obj Z✝)) (𝟙 (F_obj Z✝)) =
    (f ≫ (e Y✝ (F_obj Y✝)) (𝟙 (F_obj Y✝))) ≫
      G.map
        ({ obj := F_obj, map := fun {X X'} f => (e X (F_obj X')).symm (f ≫ (e X' (F_obj X')) (𝟙 (F_obj X'))) }.map f')
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
F_obj : C → D
e : (X : C) → (Y : D) → (F_obj X ⟶ Y) ≃ (X ⟶ G.obj Y)
he : ∀ (X : C) (Y Y' : D) (g : Y ⟶ Y') (h : F_obj X ⟶ Y), (e X Y') (h ≫ g) = (e X Y) h ≫ G.map g
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
f' : Y✝ ⟶ Z✝
⊢ (f ≫ f') ≫ (e Z✝ (F_obj Z✝)) (𝟙 (F_obj Z✝)) = f ≫ f' ≫ (e Z✝ (F_obj Z✝)) (𝟙 (F_obj Z✝))
tactic: conv =>
      rhs
      rw [assoc, ← he, id_comp, Equiv.apply_symm_apply]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
F_obj : C → D
e : (X : C) → (Y : D) → (F_obj X ⟶ Y) ≃ (X ⟶ G.obj Y)
he : ∀ (X : C) (Y Y' : D) (g : Y ⟶ Y') (h : F_obj X ⟶ Y), (e X Y') (h ≫ g) = (e X Y) h ≫ G.map g
X✝ Y✝ Z✝ : C
f : X✝ ⟶ Y✝
f' : Y✝ ⟶ Z✝
⊢ (f ≫ f') ≫ (e Z✝ (F_obj Z✝)) (𝟙 (F_obj Z✝)) = f ≫ f' ≫ (e Z✝ (F_obj Z✝)) (𝟙 (F_obj Z✝))
state_after: no goals
tactic: simp
Theorem: Mathlib.Vector.mapAccumr_bisim_tail
File: Mathlib/Data/Vector/MapLemmas.lean

Proof steps:
state_before: α : Type u_2
n : ℕ
xs : Vector α n
σ₁ : Type
β : Type u_1
σ₂ : Type
f₁ : α → σ₁ → σ₁ × β
f₂ : α → σ₂ → σ₂ × β
s₁ : σ₁
s₂ : σ₂
h : ∃ R, R s₁ s₂ ∧ ∀ {s : σ₁} {q : σ₂} (a : α), R s q → R (f₁ a s).1 (f₂ a q).1 ∧ (f₁ a s).2 = (f₂ a q).2
⊢ (mapAccumr f₁ xs s₁).2 = (mapAccumr f₂ xs s₂).2
state_after: case intro.intro
α : Type u_2
n : ℕ
xs : Vector α n
σ₁ : Type
β : Type u_1
σ₂ : Type
f₁ : α → σ₁ → σ₁ × β
f₂ : α → σ₂ → σ₂ × β
s₁ : σ₁
s₂ : σ₂
R : σ₁ → σ₂ → Prop
h₀ : R s₁ s₂
hR : ∀ {s : σ₁} {q : σ₂} (a : α), R s q → R (f₁ a s).1 (f₂ a q).1 ∧ (f₁ a s).2 = (f₂ a q).2
⊢ (mapAccumr f₁ xs s₁).2 = (mapAccumr f₂ xs s₂).2
tactic: rcases h with ⟨R, h₀, hR⟩
state_before: case intro.intro
α : Type u_2
n : ℕ
xs : Vector α n
σ₁ : Type
β : Type u_1
σ₂ : Type
f₁ : α → σ₁ → σ₁ × β
f₂ : α → σ₂ → σ₂ × β
s₁ : σ₁
s₂ : σ₂
R : σ₁ → σ₂ → Prop
h₀ : R s₁ s₂
hR : ∀ {s : σ₁} {q : σ₂} (a : α), R s q → R (f₁ a s).1 (f₂ a q).1 ∧ (f₁ a s).2 = (f₂ a q).2
⊢ (mapAccumr f₁ xs s₁).2 = (mapAccumr f₂ xs s₂).2
state_after: no goals
tactic: exact (mapAccumr_bisim R h₀ hR).2
Theorem: exists_dist_eq
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x✝ y z✝ : E
δ ε : ℝ
x z : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ ∃ y, dist x y = b * dist x z ∧ dist y z = a * dist x z
state_after: case h
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x✝ y z✝ : E
δ ε : ℝ
x z : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ dist x (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) z = a * dist x z
tactic: use a • x + b • z
state_before: case h
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x✝ y z✝ : E
δ ε : ℝ
x z : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ dist x (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) z = a * dist x z
state_after: case h
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x✝ y z✝ : E
δ ε : ℝ
x z : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ dist (1 • x) (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) z = a * dist x z
tactic: nth_rw 1 [← one_smul ℝ x]
state_before: case h
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x✝ y z✝ : E
δ ε : ℝ
x z : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ dist (1 • x) (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) z = a * dist x z
state_after: case h
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x✝ y z✝ : E
δ ε : ℝ
x z : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ dist (1 • x) (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) (1 • z) = a * dist x z
tactic: nth_rw 4 [← one_smul ℝ z]
state_before: case h
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x✝ y z✝ : E
δ ε : ℝ
x z : E
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ dist (1 • x) (a • x + b • z) = b * dist x z ∧ dist (a • x + b • z) (1 • z) = a * dist x z
state_after: no goals
tactic: simp [dist_eq_norm, ← hab, add_smul, ← smul_sub, norm_smul_of_nonneg, ha, hb]
Theorem: Polynomial.natTrailingDegree_monomial_le
File: Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
this : DecidableEq R := Classical.decEq R
ha : a = 0
⊢ ((monomial n) a).natTrailingDegree ≤ n
state_after: no goals
tactic: simp [ha]
Theorem: CategoryTheory.NatTrans.isIso_app_iff_of_iso
File: Mathlib/CategoryTheory/MorphismProperty/Basic.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u_1
inst✝ : Category.{u_2, u_1} D
F G : C ⥤ D
α : F ⟶ G
X Y : C
e : X ≅ Y
⊢ (F.mapIso e).hom ≫ (Arrow.mk (α.app Y)).hom = (Arrow.mk (α.app X)).hom ≫ (G.mapIso e).hom
state_after: no goals
tactic: simp
Theorem: Nat.choose_symm_half
File: Mathlib/Data/Nat/Choose/Basic.lean

Proof steps:
state_before: m : ℕ
⊢ (2 * m + 1).choose (m + 1) = (2 * m + 1).choose m
state_after: case h
m : ℕ
⊢ 2 * m + 1 = m + 1 + m
tactic: apply choose_symm_of_eq_add
state_before: case h
m : ℕ
⊢ 2 * m + 1 = m + 1 + m
state_after: no goals
tactic: rw [Nat.add_comm m 1, Nat.add_assoc 1 m m, Nat.add_comm (2 * m) 1, Nat.two_mul m]
Theorem: EReal.le_coe_toReal
File: Mathlib/Data/Real/EReal.lean

Proof steps:
state_before: x : EReal
h : x ≠ ⊤
⊢ x ≤ ↑x.toReal
state_after: case pos
x : EReal
h : x ≠ ⊤
h' : x = ⊥
⊢ x ≤ ↑x.toReal

case neg
x : EReal
h : x ≠ ⊤
h' : ¬x = ⊥
⊢ x ≤ ↑x.toReal
tactic: by_cases h' : x = ⊥
Theorem: Set.directedOn_sUnion
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
r : α → α → Prop
S : Set (Set α)
hd : DirectedOn (fun x x_1 => x ⊆ x_1) S
h : ∀ x ∈ S, DirectedOn r x
⊢ DirectedOn r (⋃₀ S)
state_after: α : 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
r : α → α → Prop
S : Set (Set α)
hd : DirectedOn (fun x x_1 => x ⊆ x_1) S
h : ∀ x ∈ S, DirectedOn r x
⊢ DirectedOn r (⋃ i, ↑i)
tactic: rw [sUnion_eq_iUnion]
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
r : α → α → Prop
S : Set (Set α)
hd : DirectedOn (fun x x_1 => x ⊆ x_1) S
h : ∀ x ∈ S, DirectedOn r x
⊢ DirectedOn r (⋃ i, ↑i)
state_after: no goals
tactic: exact directedOn_iUnion (directedOn_iff_directed.mp hd) (fun i ↦ h i.1 i.2)
Theorem: List.Sublist.sym2
File: Mathlib/Data/List/Sym.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
xs ys : List α
h : xs <+ ys
⊢ xs.sym2 <+ ys.sym2
state_after: no goals
tactic: induction h with
  | slnil => apply slnil
  | cons a h ih =>
    simp only [List.sym2]
    exact Sublist.append (nil_sublist _) ih
  | cons₂ a h ih =>
    simp only [List.sym2, map_cons, cons_append]
    exact cons₂ _ (append (Sublist.map _ h) ih)
Theorem: mul_div_cancel_of_imp'
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

Proof steps:
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : CommGroupWithZero G₀
a b c d : G₀
h : b = 0 → a = 0
⊢ b * (a / b) = a
state_after: no goals
tactic: rw [mul_comm, div_mul_cancel_of_imp h]
Theorem: IsExposed.subset
File: Mathlib/Analysis/Convex/Exposed.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : OrderedRing 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : TopologicalSpace E
inst✝ : Module 𝕜 E
l : E →L[𝕜] 𝕜
A B C : Set E
X : Finset E
x : E
hAB : IsExposed 𝕜 A B
⊢ B ⊆ A
state_after: 𝕜 : Type u_1
E : Type u_2
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : OrderedRing 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : TopologicalSpace E
inst✝ : Module 𝕜 E
l : E →L[𝕜] 𝕜
A B C : Set E
X : Finset E
x✝ : E
hAB : IsExposed 𝕜 A B
x : E
hx : x ∈ B
⊢ x ∈ A
tactic: rintro x hx
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : OrderedRing 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : TopologicalSpace E
inst✝ : Module 𝕜 E
l : E →L[𝕜] 𝕜
A B C : Set E
X : Finset E
x✝ : E
hAB : IsExposed 𝕜 A B
x : E
hx : x ∈ B
⊢ x ∈ A
state_after: case intro
𝕜 : Type u_1
E : Type u_2
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : OrderedRing 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : TopologicalSpace E
inst✝ : Module 𝕜 E
l : E →L[𝕜] 𝕜
A C : Set E
X : Finset E
x✝ x : E
w✝ : E →L[𝕜] 𝕜
hAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ y ∈ A, w✝ y ≤ w✝ x}
hx : x ∈ {x | x ∈ A ∧ ∀ y ∈ A, w✝ y ≤ w✝ x}
⊢ x ∈ A
tactic: obtain ⟨_, rfl⟩ := hAB ⟨x, hx⟩
state_before: case intro
𝕜 : Type u_1
E : Type u_2
inst✝⁴ : TopologicalSpace 𝕜
inst✝³ : OrderedRing 𝕜
inst✝² : AddCommMonoid E
inst✝¹ : TopologicalSpace E
inst✝ : Module 𝕜 E
l : E →L[𝕜] 𝕜
A C : Set E
X : Finset E
x✝ x : E
w✝ : E →L[𝕜] 𝕜
hAB : IsExposed 𝕜 A {x | x ∈ A ∧ ∀ y ∈ A, w✝ y ≤ w✝ x}
hx : x ∈ {x | x ∈ A ∧ ∀ y ∈ A, w✝ y ≤ w✝ x}
⊢ x ∈ A
state_after: no goals
tactic: exact hx.1
Theorem: BoxIntegral.Prepartition.biUnionIndex_le
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

Proof steps:
state_before: ι : Type u_1
I J✝ J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
J : Box ι
⊢ π.biUnionIndex πi J ≤ I
state_after: case pos
ι : Type u_1
I J✝ J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
J : Box ι
hJ : J ∈ π.biUnion πi
⊢ π.biUnionIndex πi J ≤ I

case neg
ι : Type u_1
I J✝ J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
J : Box ι
hJ : J ∉ π.biUnion πi
⊢ π.biUnionIndex πi J ≤ I
tactic: by_cases hJ : J ∈ π.biUnion πi
Theorem: CategoryTheory.Limits.eq_zero_of_epi_kernel
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝¹ : HasKernel f
inst✝ : Epi (kernel.ι f)
⊢ kernel.ι f ≫ f = kernel.ι f ≫ 0
state_after: no goals
tactic: simp