ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: AlgebraicGeometry.disjointGlueData_t
File: Mathlib/AlgebraicGeometry/Limits.lean

Proof steps:
state_before: ι : Type u
f : ι → Scheme
i j : __spread✝⁻⁰.J
⊢ IsOpenImmersion (__spread✝⁻⁰.f i j)
state_after: ι : Type u
f : ι → Scheme
i j : __spread✝⁻⁰.J
⊢ IsOpenImmersion (if h : i = j then eqToHom ⋯ else eqToHom ⋯ ≫ (f i).emptyTo)
tactic: dsimp only [GlueData.ofGlueData', GlueData'.f', disjointGlueData']
state_before: ι : Type u
f : ι → Scheme
i j : __spread✝⁻⁰.J
⊢ IsOpenImmersion (if h : i = j then eqToHom ⋯ else eqToHom ⋯ ≫ (f i).emptyTo)
state_after: no goals
tactic: split <;> infer_instance
Theorem: Order.pred_eq_pred_iff_of_not_isMin
File: Mathlib/Order/SuccPred/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : PartialOrder α
inst✝ : PredOrder α
a b : α
ha : ¬IsMin a
hb : ¬IsMin b
⊢ pred a = pred b ↔ a = b
state_after: no goals
tactic: rw [eq_iff_le_not_lt, eq_iff_le_not_lt, pred_le_pred_iff_of_not_isMin ha hb,
    pred_lt_pred_iff_of_not_isMin ha hb]
Theorem: Finset.image_insert
File: Mathlib/Data/Finset/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t : Finset β
a✝ : α
b c : β
inst✝ : DecidableEq α
f : α → β
a : α
s : Finset α
⊢ image f (insert a s) = insert (f a) (image f s)
state_after: no goals
tactic: simp only [insert_eq, image_singleton, image_union]
Theorem: IsCyclotomicExtension.discr_odd_prime
File: Mathlib/NumberTheory/Cyclotomic/Discriminant.lean

Proof steps:
state_before: p : ℕ+
k : ℕ
K : Type u
L : Type v
ζ : L
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {p} K L
hp : Fact (Nat.Prime ↑p)
hζ : IsPrimitiveRoot ζ ↑p
hirr : Irreducible (cyclotomic (↑p) K)
hodd : p ≠ 2
⊢ discr K ⇑(IsPrimitiveRoot.powerBasis K hζ).basis = (-1) ^ ((↑p - 1) / 2) * ↑↑p ^ (↑p - 2)
state_after: p : ℕ+
k : ℕ
K : Type u
L : Type v
ζ : L
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {p} K L
hp : Fact (Nat.Prime ↑p)
hζ : IsPrimitiveRoot ζ ↑p
hirr : Irreducible (cyclotomic (↑p) K)
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} K L
⊢ discr K ⇑(IsPrimitiveRoot.powerBasis K hζ).basis = (-1) ^ ((↑p - 1) / 2) * ↑↑p ^ (↑p - 2)
tactic: have : IsCyclotomicExtension {p ^ (0 + 1)} K L := by
    rw [zero_add, pow_one]
    infer_instance
state_before: p : ℕ+
k : ℕ
K : Type u
L : Type v
ζ : L
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {p} K L
hp : Fact (Nat.Prime ↑p)
hζ : IsPrimitiveRoot ζ ↑p
hirr : Irreducible (cyclotomic (↑p) K)
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} K L
⊢ discr K ⇑(IsPrimitiveRoot.powerBasis K hζ).basis = (-1) ^ ((↑p - 1) / 2) * ↑↑p ^ (↑p - 2)
state_after: p : ℕ+
k : ℕ
K : Type u
L : Type v
ζ : L
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {p} K L
hp : Fact (Nat.Prime ↑p)
hζ : IsPrimitiveRoot ζ ↑p
hirr : Irreducible (cyclotomic (↑p) K)
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} K L
hζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))
⊢ discr K ⇑(IsPrimitiveRoot.powerBasis K hζ).basis = (-1) ^ ((↑p - 1) / 2) * ↑↑p ^ (↑p - 2)
tactic: have hζ' : IsPrimitiveRoot ζ (p ^ (0 + 1):) := by simpa using hζ
state_before: p : ℕ+
k : ℕ
K : Type u
L : Type v
ζ : L
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {p} K L
hp : Fact (Nat.Prime ↑p)
hζ : IsPrimitiveRoot ζ ↑p
hirr : Irreducible (cyclotomic (↑p) K)
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} K L
hζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))
⊢ discr K ⇑(IsPrimitiveRoot.powerBasis K hζ).basis = (-1) ^ ((↑p - 1) / 2) * ↑↑p ^ (↑p - 2)
state_after: case h.e'_3.h.e'_5
p : ℕ+
k : ℕ
K : Type u
L : Type v
ζ : L
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {p} K L
hp : Fact (Nat.Prime ↑p)
hζ : IsPrimitiveRoot ζ ↑p
hirr : Irreducible (cyclotomic (↑p) K)
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} K L
hζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))
⊢ (-1) ^ ((↑p - 1) / 2) = (-1) ^ (φ (↑p ^ (0 + 1)) / 2)

case h.e'_3.h.e'_6
p : ℕ+
k : ℕ
K : Type u
L : Type v
ζ : L
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsCyclotomicExtension {p} K L
hp : Fact (Nat.Prime ↑p)
hζ : IsPrimitiveRoot ζ ↑p
hirr : Irreducible (cyclotomic (↑p) K)
hodd : p ≠ 2
this : IsCyclotomicExtension {p ^ (0 + 1)} K L
hζ' : IsPrimitiveRoot ζ ↑(p ^ (0 + 1))
⊢ ↑↑p ^ (↑p - 2) = ↑↑p ^ (↑p ^ 0 * ((↑p - 1) * (0 + 1) - 1))
tactic: convert discr_prime_pow_ne_two hζ' (by simpa [hirr]) (by simp [hodd]) using 2
Theorem: WeierstrassCurve.Projective.equiv_some_of_Z_ne_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Projective R
F : Type u
inst✝ : Field F
W : Projective F
P : Fin 3 → F
hPz : P 2 ≠ 0
⊢ (fun m => m • ![P 0 / P 2, P 1 / P 2, 1]) (Units.mk0 (P 2) hPz) = P
state_after: no goals
tactic: simp [← fin3_def P, mul_div_cancel₀ _ hPz]
Theorem: Pell.strictMono_x
File: Mathlib/NumberTheory/PellMatiyasevic.lean

Proof steps:
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
⊢ xn a1 m < xn a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : xn a1 m ≤ xn a1 n
⊢ xn a1 m < xn a1 (n + 1)
tactic: have : xn a1 m ≤ xn a1 n :=
      Or.elim (lt_or_eq_of_le <| Nat.le_of_succ_le_succ h) (fun hl => le_of_lt <| strictMono_x hl)
        fun e => by rw [e]
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : xn a1 m ≤ xn a1 n
⊢ xn a1 m < xn a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : xn a1 m ≤ xn a1 n
⊢ xn a1 m < xn a1 n * a + Pell.d a1 * yn a1 n
tactic: simp
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : xn a1 m ≤ xn a1 n
⊢ xn a1 m < xn a1 n * a + Pell.d a1 * yn a1 n
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : xn a1 m ≤ xn a1 n
⊢ xn a1 n < xn a1 n * a
tactic: refine lt_of_lt_of_le (lt_of_le_of_lt this ?_) (Nat.le_add_right _ _)
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : xn a1 m ≤ xn a1 n
⊢ xn a1 n < xn a1 n * a
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : xn a1 m ≤ xn a1 n
t : xn a1 n * 1 < xn a1 n * a
⊢ xn a1 n < xn a1 n * a
tactic: have t := Nat.mul_lt_mul_of_pos_left a1 (x_pos a1 n)
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : m < n + 1
this : xn a1 m ≤ xn a1 n
t : xn a1 n * 1 < xn a1 n * a
⊢ xn a1 n < xn a1 n * a
state_after: no goals
tactic: rwa [mul_one] at t
Theorem: Polynomial.roots_monomial
File: Mathlib/Algebra/Polynomial/Roots.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
a b : R
n✝ : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
ha : a ≠ 0
n : ℕ
⊢ ((monomial n) a).roots = n • {0}
state_after: no goals
tactic: rw [← C_mul_X_pow_eq_monomial, roots_C_mul_X_pow ha]
Theorem: vectorSpan_range_eq_span_range_vsub_left_ne
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.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
p : ι → P
i₀ : ι
⊢ vectorSpan k (range p) = Submodule.span k (range fun i => p i₀ -ᵥ p ↑i)
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
p : ι → P
i₀ : ι
⊢ Submodule.span k ((fun x => p i₀ -ᵥ x) '' (p '' (univ \ {i₀}))) = Submodule.span k (range fun i => p i₀ -ᵥ p ↑i)
tactic: rw [← Set.image_univ, vectorSpan_image_eq_span_vsub_set_left_ne k _ (Set.mem_univ i₀)]
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
p : ι → P
i₀ : ι
⊢ Submodule.span k ((fun x => p i₀ -ᵥ x) '' (p '' (univ \ {i₀}))) = Submodule.span k (range fun i => p i₀ -ᵥ p ↑i)
state_after: case e_s.h
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
p : ι → P
i₀ : ι
v : V
⊢ v ∈ (fun x => p i₀ -ᵥ x) '' (p '' (univ \ {i₀})) ↔ v ∈ range fun i => p i₀ -ᵥ p ↑i
tactic: congr with v
state_before: case e_s.h
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
p : ι → P
i₀ : ι
v : V
⊢ v ∈ (fun x => p i₀ -ᵥ x) '' (p '' (univ \ {i₀})) ↔ v ∈ range fun i => p i₀ -ᵥ p ↑i
state_after: case e_s.h
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
p : ι → P
i₀ : ι
v : V
⊢ (∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ p i₀ -ᵥ x = v) ↔ ∃ a, ∃ (_ : a ≠ i₀), p i₀ -ᵥ p a = v
tactic: simp only [Set.mem_range, Set.mem_image, Set.mem_diff, Set.mem_singleton_iff, Subtype.exists,
    Subtype.coe_mk]
state_before: case e_s.h
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
p : ι → P
i₀ : ι
v : V
⊢ (∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ p i₀ -ᵥ x = v) ↔ ∃ a, ∃ (_ : a ≠ i₀), p i₀ -ᵥ p a = v
state_after: case e_s.h.mp
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
p : ι → P
i₀ : ι
v : V
⊢ (∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ p i₀ -ᵥ x = v) → ∃ a, ∃ (_ : a ≠ i₀), p i₀ -ᵥ p a = v

case e_s.h.mpr
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
p : ι → P
i₀ : ι
v : V
⊢ (∃ a, ∃ (_ : a ≠ i₀), p i₀ -ᵥ p a = v) → ∃ x, (∃ x_1, (x_1 ∈ univ ∧ ¬x_1 = i₀) ∧ p x_1 = x) ∧ p i₀ -ᵥ x = v
tactic: constructor
Theorem: OrderIso.isAtomic_iff
File: Mathlib/Order/Atoms.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : OrderBot α
inst✝ : OrderBot β
f : α ≃o β
⊢ IsAtomic α ↔ IsAtomic β
state_after: no goals
tactic: simp only [isAtomic_iff, f.surjective.forall, f.surjective.exists, ← map_bot f, f.eq_iff_eq,
    f.le_iff_le, f.isAtom_iff]
Theorem: ContinuousLinearMap.opNorm_lsmul_le
File: Mathlib/Analysis/NormedSpace/OperatorNorm/Mul.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
𝕜' : Type u_3
inst✝³ : NormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' E
inst✝ : IsScalarTower 𝕜 𝕜' E
⊢ ‖lsmul 𝕜 𝕜'‖ ≤ 1
state_after: 𝕜 : Type u_1
E : Type u_2
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
𝕜' : Type u_3
inst✝³ : NormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' E
inst✝ : IsScalarTower 𝕜 𝕜' E
x : 𝕜'
⊢ ‖(lsmul 𝕜 𝕜') x‖ ≤ 1 * ‖x‖
tactic: refine ContinuousLinearMap.opNorm_le_bound _ zero_le_one fun x => ?_
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
𝕜' : Type u_3
inst✝³ : NormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' E
inst✝ : IsScalarTower 𝕜 𝕜' E
x : 𝕜'
⊢ ‖(lsmul 𝕜 𝕜') x‖ ≤ 1 * ‖x‖
state_after: 𝕜 : Type u_1
E : Type u_2
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
𝕜' : Type u_3
inst✝³ : NormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' E
inst✝ : IsScalarTower 𝕜 𝕜' E
x : 𝕜'
⊢ ‖(lsmul 𝕜 𝕜') x‖ ≤ ‖x‖
tactic: simp_rw [one_mul]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
𝕜' : Type u_3
inst✝³ : NormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' E
inst✝ : IsScalarTower 𝕜 𝕜' E
x : 𝕜'
⊢ ‖(lsmul 𝕜 𝕜') x‖ ≤ ‖x‖
state_after: no goals
tactic: exact opNorm_lsmul_apply_le _
Theorem: Filter.forall_neBot_le_iff
File: Mathlib/Order/Filter/Ultrafilter.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type u_1
f : Filter α
s : Set α
a : α
g : Filter α
p : Filter α → Prop
hp : Monotone p
⊢ (∀ (f : Filter α), f.NeBot → f ≤ g → p f) ↔ ∀ (f : Ultrafilter α), ↑f ≤ g → p ↑f
state_after: α : Type u
β : Type v
γ : Type u_1
f : Filter α
s : Set α
a : α
g : Filter α
p : Filter α → Prop
hp : Monotone p
⊢ (∀ (f : Ultrafilter α), ↑f ≤ g → p ↑f) → ∀ (f : Filter α), f.NeBot → f ≤ g → p f
tactic: refine ⟨fun H f hf => H f f.neBot hf, ?_⟩
state_before: α : Type u
β : Type v
γ : Type u_1
f : Filter α
s : Set α
a : α
g : Filter α
p : Filter α → Prop
hp : Monotone p
⊢ (∀ (f : Ultrafilter α), ↑f ≤ g → p ↑f) → ∀ (f : Filter α), f.NeBot → f ≤ g → p f
state_after: α : Type u
β : Type v
γ : Type u_1
f✝ : Filter α
s : Set α
a : α
g : Filter α
p : Filter α → Prop
hp : Monotone p
H : ∀ (f : Ultrafilter α), ↑f ≤ g → p ↑f
f : Filter α
hf : f.NeBot
hfg : f ≤ g
⊢ p f
tactic: intro H f hf hfg
state_before: α : Type u
β : Type v
γ : Type u_1
f✝ : Filter α
s : Set α
a : α
g : Filter α
p : Filter α → Prop
hp : Monotone p
H : ∀ (f : Ultrafilter α), ↑f ≤ g → p ↑f
f : Filter α
hf : f.NeBot
hfg : f ≤ g
⊢ p f
state_after: no goals
tactic: exact hp (of_le f) (H _ ((of_le f).trans hfg))
Theorem: Ideal.comap_eq_top_iff
File: Mathlib/RingTheory/Ideal/Maps.lean

Proof steps:
state_before: R : Type u
S : Type v
F : Type u_1
inst✝³ : Semiring R
inst✝² : Semiring S
inst✝¹ : FunLike F R S
rc : RingHomClass F R S
f : F
I✝ J : Ideal R
K L : Ideal S
G : Type u_2
inst✝ : FunLike G S R
rcg : RingHomClass G S R
I : Ideal S
h : I = ⊤
⊢ comap f I = ⊤
state_after: no goals
tactic: rw [h, comap_top]
Theorem: Ideal.ramificationIdx_ne_zero
File: Mathlib/NumberTheory/RamificationInertia.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
S : Type v
inst✝ : CommRing S
f : R →+* S
p : Ideal R
P : Ideal S
e : ℕ
he : e ≠ 0
hle : map f p ≤ P ^ e
hnle : ¬map f p ≤ P ^ (e + 1)
⊢ ramificationIdx f p P ≠ 0
state_after: no goals
tactic: rwa [ramificationIdx_spec hle hnle]
Theorem: quadraticChar_neg_one_iff_not_isSquare
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/Basic.lean

Proof steps:
state_before: F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
a : F
⊢ (quadraticChar F) a = -1 ↔ ¬IsSquare a
state_after: case pos
F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
a : F
ha : a = 0
⊢ (quadraticChar F) a = -1 ↔ ¬IsSquare a

case neg
F : Type u_1
inst✝² : Field F
inst✝¹ : Fintype F
inst✝ : DecidableEq F
a : F
ha : ¬a = 0
⊢ (quadraticChar F) a = -1 ↔ ¬IsSquare a
tactic: by_cases ha : a = 0
Theorem: Nat.factorizationLCMLeft_zero_right
File: Mathlib/Data/Nat/Factorization/Basic.lean

Proof steps:
state_before: a b m n p : ℕ
⊢ a.factorizationLCMLeft 0 = 1
state_after: no goals
tactic: simp [factorizationLCMLeft]
Theorem: PowerSeries.eval₂_trunc_eq_sum_range
File: Mathlib/RingTheory/PowerSeries/Trunc.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : Semiring R
S : Type u_2
inst✝ : Semiring S
s : S
G : R →+* S
n : ℕ
f : R⟦X⟧
⊢ eval₂ G s (trunc n f) = ∑ i ∈ range n, G ((coeff R i) f) * s ^ i
state_after: no goals
tactic: cases n with
  | zero =>
    rw [trunc_zero', range_zero, sum_empty, eval₂_zero]
  | succ n =>
    have := natDegree_trunc_lt f n
    rw [eval₂_eq_sum_range' (hn := this)]
    apply sum_congr rfl
    intro _ h
    rw [mem_range] at h
    congr
    rw [coeff_trunc, if_pos h]
Theorem: AffineSubspace.wOppSide_comm
File: Mathlib/Analysis/Convex/Side.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✝⁶ : StrictOrderedCommRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x y : P
⊢ s.WOppSide x y ↔ s.WOppSide y x
state_after: case mp
R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : StrictOrderedCommRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x y : P
⊢ s.WOppSide x y → s.WOppSide y x

case mpr
R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : StrictOrderedCommRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
s : AffineSubspace R P
x y : P
⊢ s.WOppSide y x → s.WOppSide x y
tactic: constructor
Theorem: MvPolynomial.isNoetherianRing_fin_0
File: Mathlib/RingTheory/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : IsNoetherianRing R
⊢ IsNoetherianRing (MvPolynomial (Fin 0) R)
state_after: case f
R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : IsNoetherianRing R
⊢ R ≃+* MvPolynomial (Fin 0) R
tactic: apply isNoetherianRing_of_ringEquiv R
state_before: case f
R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : IsNoetherianRing R
⊢ R ≃+* MvPolynomial (Fin 0) R
state_after: case f
R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : IsNoetherianRing R
⊢ MvPolynomial (Fin 0) R ≃+* R
tactic: symm
state_before: case f
R : Type u
S : Type u_1
σ : Type v
M : Type w
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : IsNoetherianRing R
⊢ MvPolynomial (Fin 0) R ≃+* R
state_after: no goals
tactic: apply MvPolynomial.isEmptyRingEquiv R (Fin 0)
Theorem: Polynomial.natDegree_X_sub_C
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

Proof steps:
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝¹ : Ring R
inst✝ : Nontrivial R
x : R
⊢ (X - C x).natDegree = 1
state_after: no goals
tactic: rw [natDegree_sub_C, natDegree_X]
Theorem: spectrum.subset_closedBall_norm_mul
File: Mathlib/Analysis/Normed/Algebra/Spectrum.lean

Proof steps:
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : NormedRing A
inst✝¹ : NormedAlgebra 𝕜 A
inst✝ : CompleteSpace A
a : A
k : 𝕜
hk : k ∈ σ a
⊢ k ∈ Metric.closedBall 0 (‖a‖ * ‖1‖)
state_after: no goals
tactic: simp [norm_le_norm_mul_of_mem hk]
Theorem: Hyperreal.isSt_iff_abs_sub_lt_delta
File: Mathlib/Data/Real/Hyperreal.lean

Proof steps:
state_before: x : ℝ*
r : ℝ
⊢ x.IsSt r ↔ ∀ (δ : ℝ), 0 < δ → |x - ↑r| < ↑δ
state_after: no goals
tactic: simp only [abs_sub_lt_iff, sub_lt_iff_lt_add, IsSt, and_comm, add_comm]
Theorem: Finset.weightedVSubVSubWeights_apply_right
File: Mathlib/LinearAlgebra/AffineSpace/Combination.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
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
inst✝ : DecidableEq ι
i j : ι
h : i ≠ j
⊢ weightedVSubVSubWeights k i j j = -1
state_after: no goals
tactic: simp [weightedVSubVSubWeights, h.symm]
Theorem: Filter.countable_biInf_eq_iInf_seq'
File: Mathlib/Order/Filter/Bases.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
inst✝ : CompleteLattice α
B : Set ι
Bcbl : B.Countable
f : ι → α
i₀ : ι
h : f i₀ = ⊤
⊢ ∃ x, ⨅ t ∈ B, f t = ⨅ i, f (x i)
state_after: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
inst✝ : CompleteLattice α
B : Set ι
Bcbl : B.Countable
f : ι → α
i₀ : ι
h : f i₀ = ⊤
hB : B = ∅
⊢ ∃ x, ⨅ t ∈ B, f t = ⨅ i, f (x i)

case inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Sort u_5
inst✝ : CompleteLattice α
B : Set ι
Bcbl : B.Countable
f : ι → α
i₀ : ι
h : f i₀ = ⊤
Bnonempty : B.Nonempty
⊢ ∃ x, ⨅ t ∈ B, f t = ⨅ i, f (x i)
tactic: rcases B.eq_empty_or_nonempty with hB | Bnonempty
Theorem: EuclideanGeometry.left_ne_of_oangle_ne_zero
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ ≠ 0
⊢ p₁ ≠ p₂
state_after: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ ≠ 0
⊢ p₁ -ᵥ p₂ ≠ 0
tactic: rw [← @vsub_ne_zero V]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ ≠ 0
⊢ p₁ -ᵥ p₂ ≠ 0
state_after: no goals
tactic: exact o.left_ne_zero_of_oangle_ne_zero h
Theorem: MeasureTheory.lintegral_zero_measure
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ ν : Measure α
m : MeasurableSpace α
f : α → ℝ≥0∞
⊢ ∫⁻ (a : α), f a ∂0 = 0
state_after: no goals
tactic: simp [lintegral]
Theorem: posPart_eq_of_posPart_pos
File: Mathlib/Algebra/Order/Group/PosPart.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : Group α
a : α
ha : 1 < a⁺ᵐ
⊢ a⁺ᵐ = a
state_after: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : Group α
a : α
ha : 1 < a
⊢ a⁺ᵐ = a
tactic: rw [oneLePart, right_lt_sup, not_le] at ha
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : Group α
a : α
ha : 1 < a
⊢ a⁺ᵐ = a
state_after: no goals
tactic: exact oneLePart_eq_self.2 ha.le
Theorem: abs_eq_abs
File: Mathlib/Algebra/Order/Group/Unbundled/Abs.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : Group α
inst✝ : LinearOrder α
a b : α
⊢ mabs a = mabs b ↔ a = b ∨ a = b⁻¹
state_after: α : Type u_1
inst✝¹ : Group α
inst✝ : LinearOrder α
a b : α
h : mabs a = mabs b
⊢ a = b ∨ a = b⁻¹
tactic: refine ⟨fun h ↦ ?_, by rintro (h | h) <;> simp [h, abs_neg]⟩
state_before: α : Type u_1
inst✝¹ : Group α
inst✝ : LinearOrder α
a b : α
h : mabs a = mabs b
⊢ a = b ∨ a = b⁻¹
state_after: no goals
tactic: obtain rfl | rfl := eq_or_eq_inv_of_mabs_eq h <;>
    simpa only [inv_eq_iff_eq_inv (a := |b|ₘ), inv_inv, inv_inj, or_comm] using mabs_choice b