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

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
a b : α
hn : a ≠ b
h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1
ha : a ∉ s → f a = 1
hb : b ∉ s → f b = 1
⊢ ∏ x ∈ s, f x = f a * f b
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
a b : α
hn : a ≠ b
h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1
ha : a ∉ s → f a = 1
hb : b ∉ s → f b = 1
this : DecidableEq α
⊢ ∏ x ∈ s, f x = f a * f b
tactic: haveI := Classical.decEq α
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
a b : α
hn : a ≠ b
h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1
ha : a ∉ s → f a = 1
hb : b ∉ s → f b = 1
this : DecidableEq α
⊢ ∏ x ∈ s, f x = f a * f b
state_after: case pos
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
a b : α
hn : a ≠ b
h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1
ha : a ∉ s → f a = 1
hb : b ∉ s → f b = 1
this : DecidableEq α
h₁ : a ∈ s
h₂ : b ∈ s
⊢ ∏ x ∈ s, f x = f a * f b

case neg
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
a b : α
hn : a ≠ b
h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1
ha : a ∉ s → f a = 1
hb : b ∉ s → f b = 1
this : DecidableEq α
h₁ : a ∈ s
h₂ : b ∉ s
⊢ ∏ x ∈ s, f x = f a * f b

case pos
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
a b : α
hn : a ≠ b
h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1
ha : a ∉ s → f a = 1
hb : b ∉ s → f b = 1
this : DecidableEq α
h₁ : a ∉ s
h₂ : b ∈ s
⊢ ∏ x ∈ s, f x = f a * f b

case neg
ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
a b : α
hn : a ≠ b
h₀ : ∀ c ∈ s, c ≠ a ∧ c ≠ b → f c = 1
ha : a ∉ s → f a = 1
hb : b ∉ s → f b = 1
this : DecidableEq α
h₁ : a ∉ s
h₂ : b ∉ s
⊢ ∏ x ∈ s, f x = f a * f b
tactic: by_cases h₁ : a ∈ s <;> by_cases h₂ : b ∈ s
Theorem: measurable_derivWithin_Ioi
File: Mathlib/Analysis/Calculus/FDeriv/Measurable.lean

Proof steps:
state_before: F : Type u_1
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝² : CompleteSpace F
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
⊢ Measurable fun x => derivWithin f (Ioi x) x
state_after: no goals
tactic: simpa [derivWithin_Ioi_eq_Ici] using measurable_derivWithin_Ici f
Theorem: CategoryTheory.Discrete.addMonoidal_associator
File: Mathlib/CategoryTheory/Monoidal/Discrete.lean

Proof steps:
state_before: M : Type u
inst✝ : Monoid M
X x✝¹ x✝ : Discrete M
f : x✝¹ ⟶ x✝
⊢ (fun X Y => { as := X.as * Y.as }) X x✝¹ = (fun X Y => { as := X.as * Y.as }) X x✝
state_after: M : Type u
inst✝ : Monoid M
X x✝¹ x✝ : Discrete M
f : x✝¹ ⟶ x✝
⊢ { as := X.as * x✝¹.as } = { as := X.as * x✝.as }
tactic: dsimp
state_before: M : Type u
inst✝ : Monoid M
X x✝¹ x✝ : Discrete M
f : x✝¹ ⟶ x✝
⊢ { as := X.as * x✝¹.as } = { as := X.as * x✝.as }
state_after: no goals
tactic: rw [eq_of_hom f]
state_before: M : Type u
inst✝ : Monoid M
X₁✝ X₂✝ : Discrete M
f : X₁✝ ⟶ X₂✝
X : Discrete M
⊢ (fun X Y => { as := X.as * Y.as }) X₁✝ X = (fun X Y => { as := X.as * Y.as }) X₂✝ X
state_after: M : Type u
inst✝ : Monoid M
X₁✝ X₂✝ : Discrete M
f : X₁✝ ⟶ X₂✝
X : Discrete M
⊢ { as := X₁✝.as * X.as } = { as := X₂✝.as * X.as }
tactic: dsimp
state_before: M : Type u
inst✝ : Monoid M
X₁✝ X₂✝ : Discrete M
f : X₁✝ ⟶ X₂✝
X : Discrete M
⊢ { as := X₁✝.as * X.as } = { as := X₂✝.as * X.as }
state_after: no goals
tactic: rw [eq_of_hom f]
state_before: M : Type u
inst✝ : Monoid M
X₁✝ Y₁✝ X₂✝ Y₂✝ : Discrete M
f : X₁✝ ⟶ Y₁✝
g : X₂✝ ⟶ Y₂✝
⊢ (fun X Y => { as := X.as * Y.as }) X₁✝ X₂✝ = (fun X Y => { as := X.as * Y.as }) Y₁✝ Y₂✝
state_after: M : Type u
inst✝ : Monoid M
X₁✝ Y₁✝ X₂✝ Y₂✝ : Discrete M
f : X₁✝ ⟶ Y₁✝
g : X₂✝ ⟶ Y₂✝
⊢ { as := X₁✝.as * X₂✝.as } = { as := Y₁✝.as * Y₂✝.as }
tactic: dsimp
state_before: M : Type u
inst✝ : Monoid M
X₁✝ Y₁✝ X₂✝ Y₂✝ : Discrete M
f : X₁✝ ⟶ Y₁✝
g : X₂✝ ⟶ Y₂✝
⊢ { as := X₁✝.as * X₂✝.as } = { as := Y₁✝.as * Y₂✝.as }
state_after: no goals
tactic: rw [eq_of_hom f, eq_of_hom g]
Theorem: Turing.Tape.mk'_left_right₀
File: Mathlib/Computability/TuringMachine.lean

Proof steps:
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
T : Tape Γ
⊢ mk' T.left T.right₀ = T
state_after: case mk
Γ : Type u_1
inst✝ : Inhabited Γ
head✝ : Γ
left✝ right✝ : ListBlank Γ
⊢ mk' { head := head✝, left := left✝, right := right✝ }.left { head := head✝, left := left✝, right := right✝ }.right₀ =
    { head := head✝, left := left✝, right := right✝ }
tactic: cases T
state_before: case mk
Γ : Type u_1
inst✝ : Inhabited Γ
head✝ : Γ
left✝ right✝ : ListBlank Γ
⊢ mk' { head := head✝, left := left✝, right := right✝ }.left { head := head✝, left := left✝, right := right✝ }.right₀ =
    { head := head✝, left := left✝, right := right✝ }
state_after: no goals
tactic: simp only [Tape.right₀, Tape.mk', ListBlank.head_cons, ListBlank.tail_cons, eq_self_iff_true,
    and_self_iff]
Theorem: WithBot.strictMono_map_iff
File: Mathlib/Order/WithBot.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a b : α
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α → β
⊢ ((StrictMono fun a => map f ↑a) ∧ ∀ (x : α), map f ⊥ < map f ↑x) ↔ StrictMono f
state_after: no goals
tactic: simp [StrictMono, bot_lt_coe]
Theorem: CategoryTheory.tensor_sum
File: Mathlib/CategoryTheory/Monoidal/Preadditive.lean

Proof steps:
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : Preadditive C
inst✝¹ : MonoidalCategory C
inst✝ : MonoidalPreadditive C
P Q R S : C
J : Type u_2
s : Finset J
f : P ⟶ Q
g : J → (R ⟶ S)
⊢ f ⊗ ∑ j ∈ s, g j = ∑ j ∈ s, f ⊗ g j
state_after: no goals
tactic: simp only [tensorHom_def, whiskerLeft_sum, Preadditive.comp_sum]
Theorem: collinear_insert_iff_of_mem_affineSpan
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

Proof steps:
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
p : P
h : p ∈ affineSpan k s
⊢ Collinear k (insert p s) ↔ Collinear k s
state_after: no goals
tactic: rw [Collinear, Collinear, vectorSpan_insert_eq_vectorSpan h]
Theorem: TypeVec.eq_nilFun
File: Mathlib/Data/TypeVec.lean

Proof steps:
state_before: n : ℕ
α : TypeVec.{u_1} 0
β : TypeVec.{u_2} 0
f : α ⟹ β
⊢ f = nilFun
state_after: case a.h
n : ℕ
α : TypeVec.{u_1} 0
β : TypeVec.{u_2} 0
f : α ⟹ β
x : Fin2 0
x✝ : α x
⊢ f x x✝ = nilFun x x✝
tactic: ext x
state_before: case a.h
n : ℕ
α : TypeVec.{u_1} 0
β : TypeVec.{u_2} 0
f : α ⟹ β
x : Fin2 0
x✝ : α x
⊢ f x x✝ = nilFun x x✝
state_after: no goals
tactic: cases x
Theorem: CategoryTheory.ShiftedHom.comp_map
File: Mathlib/CategoryTheory/Shift/ShiftedHom.lean

Proof steps:
state_before: C : Type u_1
inst✝⁸ : Category.{u_5, u_1} C
D : Type u_2
inst✝⁷ : Category.{u_6, u_2} D
E : Type u_3
inst✝⁶ : Category.{u_7, u_3} E
M : Type u_4
inst✝⁵ : AddMonoid M
inst✝⁴ : HasShift C M
inst✝³ : HasShift D M
inst✝² : HasShift E M
X Y Z T : C
a : M
f : ShiftedHom X Y a
F : C ⥤ D
inst✝¹ : F.CommShift M
G : D ⥤ E
inst✝ : G.CommShift M
⊢ f.map (F ⋙ G) = (f.map F).map G
state_after: no goals
tactic: simp [map, Functor.commShiftIso_comp_hom_app]
Theorem: affinity_unitBall
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 < r
x : E
⊢ x +ᵥ r • ball 0 1 = ball x r
state_after: no goals
tactic: rw [smul_unitBall_of_pos hr, vadd_ball_zero]
Theorem: Set.range_eq_empty_iff
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : ι → α
s t : Set α
f : ι → α
⊢ range f = ∅ ↔ IsEmpty ι
state_after: no goals
tactic: rw [← not_nonempty_iff, ← range_nonempty_iff_nonempty, not_nonempty_iff_eq_empty]
Theorem: Polynomial.coeff_sum
File: Mathlib/Algebra/Polynomial/Coeff.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
n : ℕ
f : ℕ → R → S[X]
⊢ (p.sum f).coeff n = p.sum fun a b => (f a b).coeff n
state_after: case ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
q r : R[X]
inst✝ : Semiring S
n : ℕ
f : ℕ → R → S[X]
toFinsupp✝ : R[ℕ]
⊢ ({ toFinsupp := toFinsupp✝ }.sum f).coeff n = { toFinsupp := toFinsupp✝ }.sum fun a b => (f a b).coeff n
tactic: rcases p with ⟨⟩
state_before: case ofFinsupp
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝¹ : Semiring R
q r : R[X]
inst✝ : Semiring S
n : ℕ
f : ℕ → R → S[X]
toFinsupp✝ : R[ℕ]
⊢ ({ toFinsupp := toFinsupp✝ }.sum f).coeff n = { toFinsupp := toFinsupp✝ }.sum fun a b => (f a b).coeff n
state_after: no goals
tactic: simp [Polynomial.sum, support_ofFinsupp, coeff_ofFinsupp]
Theorem: WithTop.LinearOrderedAddCommGroup.sub_eq_top_iff
File: Mathlib/Algebra/Order/AddGroupWithTop.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c d : α
a b : WithTop α
⊢ a - b = ⊤ ↔ a = ⊤ ∨ b = ⊤
state_after: no goals
tactic: cases a <;> cases b <;> simp [← coe_sub]
Theorem: LieModule.coe_lowerCentralSeries_ideal_le
File: Mathlib/Algebra/Lie/Nilpotent.lean

Proof steps:
state_before: R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I : LieIdeal R L
k : ℕ
⊢ ↑(lowerCentralSeries R (↥↑I) (↥↑I) k) ≤ ↑(lowerCentralSeries R L (↥↑I) k)
state_after: case zero
R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I : LieIdeal R L
⊢ ↑(lowerCentralSeries R (↥↑I) (↥↑I) 0) ≤ ↑(lowerCentralSeries R L (↥↑I) 0)

case succ
R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I : LieIdeal R L
k : ℕ
ih : ↑(lowerCentralSeries R (↥↑I) (↥↑I) k) ≤ ↑(lowerCentralSeries R L (↥↑I) k)
⊢ ↑(lowerCentralSeries R (↥↑I) (↥↑I) (k + 1)) ≤ ↑(lowerCentralSeries R L (↥↑I) (k + 1))
tactic: induction' k with k ih
Theorem: BoundedContinuousFunction.nndist_eq
File: Mathlib/Topology/ContinuousFunction/Bounded.lean

Proof steps:
state_before: F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
⊢ sInf {C | 0 ≤ C ∧ ∀ (x : α), dist (f x) (g x) ≤ C} = ↑(sInf {C | ∀ (x : α), nndist (f x) (g x) ≤ C})
state_after: F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
⊢ sInf {C | 0 ≤ C ∧ ∀ (x : α), dist (f x) (g x) ≤ C} =
    sInf {x | ∃ (h : 0 ≤ x), ⟨x, h⟩ ∈ {C | ∀ (x : α), nndist (f x) (g x) ≤ C}}
tactic: rw [val_eq_coe, coe_sInf, coe_image]
state_before: F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
f g : α →ᵇ β
x : α
C : ℝ
⊢ sInf {C | 0 ≤ C ∧ ∀ (x : α), dist (f x) (g x) ≤ C} =
    sInf {x | ∃ (h : 0 ≤ x), ⟨x, h⟩ ∈ {C | ∀ (x : α), nndist (f x) (g x) ≤ C}}
state_after: no goals
tactic: simp_rw [mem_setOf_eq, ← NNReal.coe_le_coe, coe_mk, exists_prop, coe_nndist]
Theorem: LinearMap.surjective_or_eq_zero
File: Mathlib/RingTheory/SimpleModule.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
S : Type u_3
inst✝⁶ : Ring R
inst✝⁵ : Ring S
M : Type u_4
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
m : Submodule R M
N : Type u_5
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : IsSimpleModule R N
f : M →ₗ[R] N
⊢ Function.Surjective ⇑f ∨ f = 0
state_after: ι : Type u_1
R : Type u_2
S : Type u_3
inst✝⁶ : Ring R
inst✝⁵ : Ring S
M : Type u_4
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
m : Submodule R M
N : Type u_5
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : IsSimpleModule R N
f : M →ₗ[R] N
⊢ range f = ⊥ ∨ range f = ⊤
tactic: rw [← range_eq_top, ← range_eq_bot, or_comm]
state_before: ι : Type u_1
R : Type u_2
S : Type u_3
inst✝⁶ : Ring R
inst✝⁵ : Ring S
M : Type u_4
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
m : Submodule R M
N : Type u_5
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : IsSimpleModule R N
f : M →ₗ[R] N
⊢ range f = ⊥ ∨ range f = ⊤
state_after: no goals
tactic: apply eq_bot_or_eq_top
Theorem: Homeomorph.image_interior
File: Mathlib/Topology/Homeomorph.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
h : X ≃ₜ Y
s : Set X
⊢ ⇑h '' interior s = interior (⇑h '' s)
state_after: no goals
tactic: rw [← preimage_symm, preimage_interior]
Theorem: Set.iUnion_eq_range_psigma
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
s : ι → Set β
⊢ ⋃ i, s i = range fun a => ↑a.snd
state_after: no goals
tactic: simp [Set.ext_iff]
Theorem: Matrix.fromColumns_neg
File: Mathlib/Data/Matrix/ColumnRowPartitioned.lean

Proof steps:
state_before: R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Neg R
A₁ : Matrix n m₁ R
A₂ : Matrix n m₂ R
⊢ -A₁.fromColumns A₂ = (-A₁).fromColumns (-A₂)
state_after: no goals
tactic: ext i (j | j) <;> simp
Theorem: norm_nonneg'
File: Mathlib/Analysis/Normed/Group/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
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a✝ a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
a : E
⊢ 0 ≤ ‖a‖
state_after: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a✝ a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
a : E
⊢ 0 ≤ dist a 1
tactic: rw [← dist_one_right]
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a✝ a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
a : E
⊢ 0 ≤ dist a 1
state_after: no goals
tactic: exact dist_nonneg
Theorem: le_add_left
File: Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean

Proof steps:
state_before: α : Type u
inst✝ : CanonicallyOrderedCommMonoid α
a b c d : α
h : a ≤ c
⊢ a = 1 * a
state_after: no goals
tactic: simp
Theorem: StateT.goto_mkLabel
File: Mathlib/Control/Monad/Cont.lean

Proof steps:
state_before: m : Type u → Type v
α β σ : Type u
x : Label (α × σ) m (β × σ)
i : α
⊢ goto (mkLabel x) i = StateT.mk fun s => goto x (i, s)
state_after: case mk
m : Type u → Type v
α β σ : Type u
i : α
apply✝ : α × σ → m (β × σ)
⊢ goto (mkLabel { apply := apply✝ }) i = StateT.mk fun s => goto { apply := apply✝ } (i, s)
tactic: cases x
state_before: case mk
m : Type u → Type v
α β σ : Type u
i : α
apply✝ : α × σ → m (β × σ)
⊢ goto (mkLabel { apply := apply✝ }) i = StateT.mk fun s => goto { apply := apply✝ } (i, s)
state_after: no goals
tactic: rfl
Theorem: CategoryTheory.ComposableArrows.homMk₅_app_four
File: Mathlib/CategoryTheory/ComposableArrows.lean

Proof steps:
state_before: C : Type u_1
inst✝ : Category.{?u.426465, u_1} C
n m : ℕ
F G : ComposableArrows C n
f g : ComposableArrows C 5
app₀ : f.obj' 0 ⋯ ⟶ g.obj' 0 ⋯
app₁ : f.obj' 1 ⋯ ⟶ g.obj' 1 ⋯
app₂ : f.obj' 2 ⋯ ⟶ g.obj' 2 ⋯
app₃ : f.obj' 3 ⋯ ⟶ g.obj' 3 ⋯
app₄ : f.obj' 4 ⋯ ⟶ g.obj' 4 ⋯
app₅ : f.obj' 5 ⋯ ⟶ g.obj' 5 ⋯
w₀ : f.map' 0 1 ⋯ ⋯ ≫ app₁ = app₀ ≫ g.map' 0 1 ⋯ ⋯
w₁ : f.map' 1 2 ⋯ ⋯ ≫ app₂ = app₁ ≫ g.map' 1 2 ⋯ ⋯
w₂ : f.map' 2 3 ⋯ ⋯ ≫ app₃ = app₂ ≫ g.map' 2 3 ⋯ ⋯
w₃ : f.map' 3 4 ⋯ ⋯ ≫ app₄ = app₃ ≫ g.map' 3 4 ⋯ ⋯
w₄ : f.map' 4 5 ⋯ ⋯ ≫ app₅ = app₄ ≫ g.map' 4 5 ⋯ ⋯
⊢ 4 < 5 + 1
state_after: no goals
tactic: valid
Theorem: Polynomial.natDegree_pos_of_eval₂_root
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

Proof steps:
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : eval₂ f z p = 0
inj : ∀ (x : R), f x = 0 → x = 0
hlt : 0 ≥ p.natDegree
⊢ False
state_after: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : eval₂ f z p = 0
inj : ∀ (x : R), f x = 0 → x = 0
hlt : 0 ≥ p.natDegree
A : p = C (p.coeff 0)
⊢ False
tactic: have A : p = C (p.coeff 0) := eq_C_of_natDegree_le_zero hlt
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : eval₂ f z p = 0
inj : ∀ (x : R), f x = 0 → x = 0
hlt : 0 ≥ p.natDegree
A : p = C (p.coeff 0)
⊢ False
state_after: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : f (p.coeff 0) = 0
inj : ∀ (x : R), f x = 0 → x = 0
hlt : 0 ≥ p.natDegree
A : p = C (p.coeff 0)
⊢ False
tactic: rw [A, eval₂_C] at hz
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : f (p.coeff 0) = 0
inj : ∀ (x : R), f x = 0 → x = 0
hlt : 0 ≥ p.natDegree
A : p = C (p.coeff 0)
⊢ False
state_after: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : f (p.coeff 0) = 0
inj : ∀ (x : R), f x = 0 → x = 0
hlt : 0 ≥ p.natDegree
A : p = 0
⊢ False
tactic: simp only [inj (p.coeff 0) hz, RingHom.map_zero] at A
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
p : R[X]
hp : p ≠ 0
f : R →+* S
z : S
hz : f (p.coeff 0) = 0
inj : ∀ (x : R), f x = 0 → x = 0
hlt : 0 ≥ p.natDegree
A : p = 0
⊢ False
state_after: no goals
tactic: exact hp A
Theorem: CoxeterSystem.not_isRightDescent_iff
File: Mathlib/GroupTheory/Coxeter/Length.lean

Proof steps:
state_before: B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
w : W
i : B
⊢ ¬cs.IsRightDescent w i ↔ cs.length (w * cs.simple i) = cs.length w + 1
state_after: B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
w : W
i : B
⊢ ¬cs.length (w * cs.simple i) < cs.length w ↔ cs.length (w * cs.simple i) = cs.length w + 1
tactic: unfold IsRightDescent
state_before: B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
w : W
i : B
⊢ ¬cs.length (w * cs.simple i) < cs.length w ↔ cs.length (w * cs.simple i) = cs.length w + 1
state_after: case mp
B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
w : W
i : B
⊢ ¬cs.length (w * cs.simple i) < cs.length w → cs.length (w * cs.simple i) = cs.length w + 1

case mpr
B : Type u_1
W : Type u_2
inst✝ : Group W
M : CoxeterMatrix B
cs : CoxeterSystem M W
w : W
i : B
⊢ cs.length (w * cs.simple i) = cs.length w + 1 → ¬cs.length (w * cs.simple i) < cs.length w
tactic: constructor
Theorem: AddSubmonoid.top_prod
File: Mathlib/Algebra/Group/Submonoid/Operations.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
P : Type u_3
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
s : Submonoid N
x : M × N
⊢ x ∈ ⊤.prod s ↔ x ∈ comap (MonoidHom.snd M N) s
state_after: no goals
tactic: simp [mem_prod, MonoidHom.coe_snd]
Theorem: Ordinal.typein_apply
File: Mathlib/SetTheory/Ordinal/Basic.lean

Proof steps:
state_before: α✝ : Type u
β✝ : Type u_1
γ : Type u_2
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_3
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≼i s
a : α
x✝ : ↑{b | r b a}
x : α
h : x ∈ {b | r b a}
⊢ ((Subrel.relEmbedding r {b | r b a}).trans f.toRelEmbedding) ⟨x, h⟩ ∈ {b | s b (f a)}
state_after: α✝ : Type u
β✝ : Type u_1
γ : Type u_2
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_3
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≼i s
a : α
x✝ : ↑{b | r b a}
x : α
h : x ∈ {b | r b a}
⊢ f.toRelEmbedding ((Subrel.relEmbedding r {b | r b a}) ⟨x, h⟩) ∈ {b | s b (f a)}
tactic: rw [RelEmbedding.trans_apply]
state_before: α✝ : Type u
β✝ : Type u_1
γ : Type u_2
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_3
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≼i s
a : α
x✝ : ↑{b | r b a}
x : α
h : x ∈ {b | r b a}
⊢ f.toRelEmbedding ((Subrel.relEmbedding r {b | r b a}) ⟨x, h⟩) ∈ {b | s b (f a)}
state_after: no goals
tactic: exact f.toRelEmbedding.map_rel_iff.2 h
state_before: α✝ : Type u
β✝ : Type u_1
γ : Type u_2
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_3
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≼i s
a : α
x✝ : ↑{b | s b (f a)}
y : β
h : y ∈ {b | s b (f a)}
⊢ ∃ a_1,
    (RelEmbedding.codRestrict {b | s b (f a)} ((Subrel.relEmbedding r {b | r b a}).trans f.toRelEmbedding) ⋯) a_1 =
      ⟨y, h⟩
state_after: case intro
α✝ : Type u
β✝ : Type u_1
γ : Type u_2
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_3
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≼i s
a✝ : α
x✝ : ↑{b | s b (f a✝)}
a : α
h : f a ∈ {b | s b (f a✝)}
⊢ ∃ a_1,
    (RelEmbedding.codRestrict {b | s b (f a✝)} ((Subrel.relEmbedding r {b | r b a✝}).trans f.toRelEmbedding) ⋯) a_1 =
      ⟨f a, h⟩
tactic: rcases f.init h with ⟨a, rfl⟩
state_before: case intro
α✝ : Type u
β✝ : Type u_1
γ : Type u_2
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u_3
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≼i s
a✝ : α
x✝ : ↑{b | s b (f a✝)}
a : α
h : f a ∈ {b | s b (f a✝)}
⊢ ∃ a_1,
    (RelEmbedding.codRestrict {b | s b (f a✝)} ((Subrel.relEmbedding r {b | r b a✝}).trans f.toRelEmbedding) ⋯) a_1 =
      ⟨f a, h⟩
state_after: no goals
tactic: exact ⟨⟨a, f.toRelEmbedding.map_rel_iff.1 h⟩,
              Subtype.eq <| RelEmbedding.trans_apply _ _ _⟩
Theorem: Polynomial.count_map_roots_of_injective
File: Mathlib/Algebra/Polynomial/Roots.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
a b✝ : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : DecidableEq B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
b : B
⊢ Multiset.count b (Multiset.map (⇑f) p.roots) ≤ rootMultiplicity b (map f p)
state_after: case pos
R : Type u
S : Type v
T : Type w
a b✝ : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : DecidableEq B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
b : B
hp0 : p = 0
⊢ Multiset.count b (Multiset.map (⇑f) p.roots) ≤ rootMultiplicity b (map f p)

case neg
R : Type u
S : Type v
T : Type w
a b✝ : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : DecidableEq B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
b : B
hp0 : ¬p = 0
⊢ Multiset.count b (Multiset.map (⇑f) p.roots) ≤ rootMultiplicity b (map f p)
tactic: by_cases hp0 : p = 0