ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.Injective.injective_iff_preservesEpimorphisms_preadditiveYoneda_obj
File: Mathlib/CategoryTheory/Preadditive/Yoneda/Injective.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
J : C
⊢ Injective J ↔ (preadditiveYoneda.obj J).PreservesEpimorphisms
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
J : C
⊢ (yoneda.obj J).PreservesEpimorphisms ↔ (preadditiveYoneda.obj J).PreservesEpimorphisms
tactic: rw [injective_iff_preservesEpimorphisms_yoneda_obj]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
J : C
⊢ (yoneda.obj J).PreservesEpimorphisms ↔ (preadditiveYoneda.obj J).PreservesEpimorphisms
state_after: case refine_1
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
J : C
h : (preadditiveYoneda.obj J ⋙ forget AddCommGrp).PreservesEpimorphisms
⊢ (preadditiveYoneda.obj J).PreservesEpimorphisms

case refine_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
J : C
⊢ (preadditiveYoneda.obj J).PreservesEpimorphisms → (yoneda.obj J).PreservesEpimorphisms
tactic: refine
    ⟨fun h : (preadditiveYoneda.obj J ⋙ (forget AddCommGrp)).PreservesEpimorphisms => ?_, ?_⟩
Theorem: PartENat.add_right_cancel_iff
File: Mathlib/Data/Nat/PartENat.lean

Proof steps:
state_before: a b c : PartENat
hc : c ≠ ⊤
⊢ a + c = b + c ↔ a = b
state_after: case intro
a b : PartENat
c : ℕ
hc : ↑c ≠ ⊤
⊢ a + ↑c = b + ↑c ↔ a = b
tactic: rcases ne_top_iff.1 hc with ⟨c, rfl⟩
state_before: case intro
a b : PartENat
c : ℕ
hc : ↑c ≠ ⊤
⊢ a + ↑c = b + ↑c ↔ a = b
state_after: case intro.refine_2.refine_2
a b : PartENat
c : ℕ
hc : ↑c ≠ ⊤
⊢ ∀ (n n_1 : ℕ), ↑n_1 + ↑c = ↑n + ↑c ↔ n_1 = n
tactic: refine PartENat.casesOn a ?_ ?_
  <;> refine PartENat.casesOn b ?_ ?_
  <;> simp [add_eq_top_iff, natCast_ne_top, @eq_comm _ (⊤ : PartENat), top_add]
state_before: case intro.refine_2.refine_2
a b : PartENat
c : ℕ
hc : ↑c ≠ ⊤
⊢ ∀ (n n_1 : ℕ), ↑n_1 + ↑c = ↑n + ↑c ↔ n_1 = n
state_after: no goals
tactic: simp only [← Nat.cast_add, add_left_cancel_iff, PartENat.natCast_inj, add_comm, forall_const]
Theorem: finprod_mem_singleton
File: Mathlib/Algebra/BigOperators/Finprod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
⊢ ∏ᶠ (i : α) (_ : i ∈ {a}), f i = f a
state_after: no goals
tactic: rw [← Finset.coe_singleton, finprod_mem_coe_finset, Finset.prod_singleton]
Theorem: Trivialization.symm_apply_eq_mk_continuousLinearEquivAt_symm
File: Mathlib/Topology/VectorBundle/Basic.lean

Proof steps:
state_before: R : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
inst✝⁹ : NontriviallyNormedField R
inst✝⁸ : (x : B) → AddCommMonoid (E x)
inst✝⁷ : (x : B) → Module R (E x)
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace R F
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace (TotalSpace F E)
inst✝² : (x : B) → TopologicalSpace (E x)
inst✝¹ : FiberBundle F E
e : Trivialization F TotalSpace.proj
inst✝ : Trivialization.IsLinear R e
b : B
hb : b ∈ e.baseSet
z : F
⊢ ↑e.symm (b, z) = { proj := b, snd := (continuousLinearEquivAt R e b hb).symm z }
state_after: R : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
inst✝⁹ : NontriviallyNormedField R
inst✝⁸ : (x : B) → AddCommMonoid (E x)
inst✝⁷ : (x : B) → Module R (E x)
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace R F
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace (TotalSpace F E)
inst✝² : (x : B) → TopologicalSpace (E x)
inst✝¹ : FiberBundle F E
e : Trivialization F TotalSpace.proj
inst✝ : Trivialization.IsLinear R e
b : B
hb : b ∈ e.baseSet
z : F
h : (b, z) ∈ e.target
⊢ ↑e.symm (b, z) = { proj := b, snd := (continuousLinearEquivAt R e b hb).symm z }
tactic: have h : (b, z) ∈ e.target := by
    rw [e.target_eq]
    exact ⟨hb, mem_univ _⟩
state_before: R : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
inst✝⁹ : NontriviallyNormedField R
inst✝⁸ : (x : B) → AddCommMonoid (E x)
inst✝⁷ : (x : B) → Module R (E x)
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace R F
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace (TotalSpace F E)
inst✝² : (x : B) → TopologicalSpace (E x)
inst✝¹ : FiberBundle F E
e : Trivialization F TotalSpace.proj
inst✝ : Trivialization.IsLinear R e
b : B
hb : b ∈ e.baseSet
z : F
h : (b, z) ∈ e.target
⊢ ↑e.symm (b, z) = { proj := b, snd := (continuousLinearEquivAt R e b hb).symm z }
state_after: case a
R : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
inst✝⁹ : NontriviallyNormedField R
inst✝⁸ : (x : B) → AddCommMonoid (E x)
inst✝⁷ : (x : B) → Module R (E x)
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace R F
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace (TotalSpace F E)
inst✝² : (x : B) → TopologicalSpace (E x)
inst✝¹ : FiberBundle F E
e : Trivialization F TotalSpace.proj
inst✝ : Trivialization.IsLinear R e
b : B
hb : b ∈ e.baseSet
z : F
h : (b, z) ∈ e.target
⊢ { proj := b, snd := (continuousLinearEquivAt R e b hb).symm z } ∈ e.source

case a
R : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
inst✝⁹ : NontriviallyNormedField R
inst✝⁸ : (x : B) → AddCommMonoid (E x)
inst✝⁷ : (x : B) → Module R (E x)
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace R F
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace (TotalSpace F E)
inst✝² : (x : B) → TopologicalSpace (E x)
inst✝¹ : FiberBundle F E
e : Trivialization F TotalSpace.proj
inst✝ : Trivialization.IsLinear R e
b : B
hb : b ∈ e.baseSet
z : F
h : (b, z) ∈ e.target
⊢ ↑e.toPartialHomeomorph (↑e.symm (b, z)) =
    ↑e.toPartialHomeomorph { proj := b, snd := (continuousLinearEquivAt R e b hb).symm z }
tactic: apply e.injOn (e.map_target h)
Theorem: MonoidAlgebra.support_single_mul_eq_image
File: Mathlib/Algebra/MonoidAlgebra/Support.lean

Proof steps:
state_before: k : Type u₁
G : Type u₂
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
hr : ∀ (y : k), r * y = 0 ↔ y = 0
x : G
lx : IsLeftRegular x
⊢ (single x r * f).support = image (fun x_1 => x * x_1) f.support
state_after: k : Type u₁
G : Type u₂
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
hr : ∀ (y : k), r * y = 0 ↔ y = 0
x : G
lx : IsLeftRegular x
y : G
hy : y ∈ image (fun x_1 => x * x_1) f.support
⊢ y ∈ (single x r * f).support
tactic: refine subset_antisymm (support_single_mul_subset f _ _) fun y hy => ?_
state_before: k : Type u₁
G : Type u₂
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
hr : ∀ (y : k), r * y = 0 ↔ y = 0
x : G
lx : IsLeftRegular x
y : G
hy : y ∈ image (fun x_1 => x * x_1) f.support
⊢ y ∈ (single x r * f).support
state_after: case intro.intro
k : Type u₁
G : Type u₂
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
hr : ∀ (y : k), r * y = 0 ↔ y = 0
x : G
lx : IsLeftRegular x
y : G
yf : y ∈ f.support
hy : x * y ∈ image (fun x_1 => x * x_1) f.support
⊢ x * y ∈ (single x r * f).support
tactic: obtain ⟨y, yf, rfl⟩ : ∃ a : G, a ∈ f.support ∧ x * a = y := by
    simpa only [Finset.mem_image, exists_prop] using hy
state_before: case intro.intro
k : Type u₁
G : Type u₂
inst✝² : Semiring k
inst✝¹ : DecidableEq G
inst✝ : Mul G
f : MonoidAlgebra k G
r : k
hr : ∀ (y : k), r * y = 0 ↔ y = 0
x : G
lx : IsLeftRegular x
y : G
yf : y ∈ f.support
hy : x * y ∈ image (fun x_1 => x * x_1) f.support
⊢ x * y ∈ (single x r * f).support
state_after: no goals
tactic: simp only [mul_apply, mem_support_iff.mp yf, hr, mem_support_iff, sum_single_index,
    Finsupp.sum_ite_eq', Ne, not_false_iff, if_true, zero_mul, ite_self, sum_zero, lx.eq_iff]
Theorem: Substring.ValidFor.contains
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: l m r : List Char
c : Char
x✝ : Substring
h : ValidFor l m r x✝
⊢ x✝.contains c = true ↔ c ∈ m
state_after: no goals
tactic: simp [Substring.contains, h.any, String.contains]
Theorem: NormedSpace.exp_mem_unitary_of_mem_skewAdjoint
File: Mathlib/Analysis/NormedSpace/Exponential.lean

Proof steps:
state_before: 𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁷ : RCLike 𝕂
inst✝⁶ : NormedRing 𝔸
inst✝⁵ : NormedAlgebra 𝕂 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔹
inst✝² : CompleteSpace 𝔸
inst✝¹ : StarRing 𝔸
inst✝ : ContinuousStar 𝔸
x : 𝔸
h : x ∈ skewAdjoint 𝔸
⊢ exp 𝕂 x ∈ unitary 𝔸
state_after: no goals
tactic: rw [unitary.mem_iff, star_exp, skewAdjoint.mem_iff.mp h, ←
    exp_add_of_commute (Commute.refl x).neg_left, ← exp_add_of_commute (Commute.refl x).neg_right,
    add_left_neg, add_right_neg, exp_zero, and_self_iff]
Theorem: Pretrivialization.preimage_symm_proj_baseSet
File: Mathlib/Topology/FiberBundle/Trivialization.lean

Proof steps:
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x : Z
⊢ ↑e.symm ⁻¹' (proj ⁻¹' e.baseSet) ∩ e.target = e.target
state_after: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x✝ : Z
x : B × F
hx : x ∈ e.target
⊢ x ∈ ↑e.symm ⁻¹' (proj ⁻¹' e.baseSet)
tactic: refine inter_eq_right.mpr fun x hx => ?_
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x✝ : Z
x : B × F
hx : x ∈ e.target
⊢ x ∈ ↑e.symm ⁻¹' (proj ⁻¹' e.baseSet)
state_after: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x✝ : Z
x : B × F
hx : x ∈ e.target
⊢ x.1 ∈ e.baseSet
tactic: simp only [mem_preimage, PartialEquiv.invFun_as_coe, e.proj_symm_apply hx]
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
proj : Z → B
e : Pretrivialization F proj
x✝ : Z
x : B × F
hx : x ∈ e.target
⊢ x.1 ∈ e.baseSet
state_after: no goals
tactic: exact e.mem_target.mp hx
Theorem: WeierstrassCurve.Affine.baseChange_addY
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

Proof steps:
state_before: R✝ : Type u
inst✝¹¹ : CommRing R✝
W✝ : Affine R✝
R : Type r
inst✝¹⁰ : CommRing R
W : Affine R
S : Type s
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
A : Type u
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra S A
inst✝⁴ : IsScalarTower R S A
B : Type v
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra S B
inst✝ : IsScalarTower R S B
f : A →ₐ[S] B
x₁ x₂ y₁ L : A
⊢ (baseChange W B).toAffine.addY (f x₁) (f x₂) (f y₁) (f L) = f ((baseChange W A).toAffine.addY x₁ x₂ y₁ L)
state_after: R✝ : Type u
inst✝¹¹ : CommRing R✝
W✝ : Affine R✝
R : Type r
inst✝¹⁰ : CommRing R
W : Affine R
S : Type s
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
A : Type u
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra S A
inst✝⁴ : IsScalarTower R S A
B : Type v
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra S B
inst✝ : IsScalarTower R S B
f : A →ₐ[S] B
x₁ x₂ y₁ L : A
⊢ (baseChange W B).toAffine.addY (f x₁) (f x₂) (f y₁) (f L) =
    (baseChange W B).toAffine.addY (f.toRingHom x₁) (f.toRingHom x₂) (f.toRingHom y₁) (f.toRingHom L)
tactic: erw [← map_addY, map_baseChange]
state_before: R✝ : Type u
inst✝¹¹ : CommRing R✝
W✝ : Affine R✝
R : Type r
inst✝¹⁰ : CommRing R
W : Affine R
S : Type s
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
A : Type u
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : Algebra S A
inst✝⁴ : IsScalarTower R S A
B : Type v
inst✝³ : CommRing B
inst✝² : Algebra R B
inst✝¹ : Algebra S B
inst✝ : IsScalarTower R S B
f : A →ₐ[S] B
x₁ x₂ y₁ L : A
⊢ (baseChange W B).toAffine.addY (f x₁) (f x₂) (f y₁) (f L) =
    (baseChange W B).toAffine.addY (f.toRingHom x₁) (f.toRingHom x₂) (f.toRingHom y₁) (f.toRingHom L)
state_after: no goals
tactic: rfl
Theorem: AffineBasis.ext_elem
File: Mathlib/LinearAlgebra/AffineSpace/Basis.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝⁴ : AddCommGroup V
inst✝³ : AffineSpace V P
inst✝² : Ring k
inst✝¹ : Module k V
b : AffineBasis ι k P
s : Finset ι
i j : ι
e : ι ≃ ι'
inst✝ : Finite ι
q₁ q₂ : P
h : ∀ (i : ι), (b.coord i) q₁ = (b.coord i) q₂
⊢ q₁ = q₂
state_after: case intro
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝⁴ : AddCommGroup V
inst✝³ : AffineSpace V P
inst✝² : Ring k
inst✝¹ : Module k V
b : AffineBasis ι k P
s : Finset ι
i j : ι
e : ι ≃ ι'
inst✝ : Finite ι
q₁ q₂ : P
h : ∀ (i : ι), (b.coord i) q₁ = (b.coord i) q₂
val✝ : Fintype ι
⊢ q₁ = q₂
tactic: cases nonempty_fintype ι
state_before: case intro
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝⁴ : AddCommGroup V
inst✝³ : AffineSpace V P
inst✝² : Ring k
inst✝¹ : Module k V
b : AffineBasis ι k P
s : Finset ι
i j : ι
e : ι ≃ ι'
inst✝ : Finite ι
q₁ q₂ : P
h : ∀ (i : ι), (b.coord i) q₁ = (b.coord i) q₂
val✝ : Fintype ι
⊢ q₁ = q₂
state_after: case intro
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝⁴ : AddCommGroup V
inst✝³ : AffineSpace V P
inst✝² : Ring k
inst✝¹ : Module k V
b : AffineBasis ι k P
s : Finset ι
i j : ι
e : ι ≃ ι'
inst✝ : Finite ι
q₁ q₂ : P
h : ∀ (i : ι), (b.coord i) q₁ = (b.coord i) q₂
val✝ : Fintype ι
⊢ ((Finset.affineCombination k Finset.univ ⇑b) fun i => (b.coord i) q₁) =
    (Finset.affineCombination k Finset.univ ⇑b) fun i => (b.coord i) q₂
tactic: rw [← b.affineCombination_coord_eq_self q₁, ← b.affineCombination_coord_eq_self q₂]
state_before: case intro
ι : Type u_1
ι' : Type u_2
k : Type u_3
V : Type u_4
P : Type u_5
inst✝⁴ : AddCommGroup V
inst✝³ : AffineSpace V P
inst✝² : Ring k
inst✝¹ : Module k V
b : AffineBasis ι k P
s : Finset ι
i j : ι
e : ι ≃ ι'
inst✝ : Finite ι
q₁ q₂ : P
h : ∀ (i : ι), (b.coord i) q₁ = (b.coord i) q₂
val✝ : Fintype ι
⊢ ((Finset.affineCombination k Finset.univ ⇑b) fun i => (b.coord i) q₁) =
    (Finset.affineCombination k Finset.univ ⇑b) fun i => (b.coord i) q₂
state_after: no goals
tactic: simp only [h]
Theorem: Set.countable_iUnion
File: Mathlib/Data/Set/Countable.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
t : ι → Set α
inst✝ : Countable ι
ht : ∀ (i : ι), (t i).Countable
⊢ (⋃ i, t i).Countable
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
t : ι → Set α
inst✝ : Countable ι
ht : ∀ (i : ι), (t i).Countable
this : ∀ (i : ι), Countable ↑(t i)
⊢ (⋃ i, t i).Countable
tactic: have := fun i ↦ (ht i).to_subtype
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
t : ι → Set α
inst✝ : Countable ι
ht : ∀ (i : ι), (t i).Countable
this : ∀ (i : ι), Countable ↑(t i)
⊢ (⋃ i, t i).Countable
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
t : ι → Set α
inst✝ : Countable ι
ht : ∀ (i : ι), (t i).Countable
this : ∀ (i : ι), Countable ↑(t i)
⊢ (range fun a => ↑a.snd).Countable
tactic: rw [iUnion_eq_range_psigma]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
t : ι → Set α
inst✝ : Countable ι
ht : ∀ (i : ι), (t i).Countable
this : ∀ (i : ι), Countable ↑(t i)
⊢ (range fun a => ↑a.snd).Countable
state_after: no goals
tactic: apply countable_range
Theorem: Nat.card_eq_zero
File: Mathlib/SetTheory/Cardinal/Finite.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
⊢ Nat.card α = 0 ↔ IsEmpty α ∨ Infinite α
state_after: no goals
tactic: simp [Nat.card, mk_eq_zero_iff, aleph0_le_mk_iff]
Theorem: rightAddCoset_mem_rightAddCoset
File: Mathlib/GroupTheory/Coset.lean

Proof steps:
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
a : α
ha : a ∈ s
b : α
⊢ b ∈ op a • ↑s ↔ b ∈ ↑s
state_after: no goals
tactic: simp [mem_rightCoset_iff, mul_mem_cancel_right (s.inv_mem ha)]
Theorem: Polynomial.eq_C_content_mul_primPart
File: Mathlib/RingTheory/Polynomial/Content.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
⊢ p = C p.content * p.primPart
state_after: case pos
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : p = 0
⊢ p = C p.content * p.primPart

case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : ¬p = 0
⊢ p = C p.content * p.primPart
tactic: by_cases h : p = 0
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : ¬p = 0
⊢ p = C p.content * p.primPart
state_after: no goals
tactic: rw [primPart, if_neg h, ← Classical.choose_spec (C_content_dvd p)]
Theorem: Set.eq_of_Ico_disjoint
File: Mathlib/Order/Interval/Set/Disjoint.lean

Proof steps:
state_before: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ x₁ x₂ y₁ y₂ : α
h : Disjoint (Ico x₁ x₂) (Ico y₁ y₂)
hx : x₁ < x₂
h2 : x₂ ∈ Ico y₁ y₂
⊢ y₁ = x₂
state_after: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ x₁ x₂ y₁ y₂ : α
h : x₂ ≤ x₁ ∨ x₂ ≤ y₁
hx : x₁ < x₂
h2 : x₂ ∈ Ico y₁ y₂
⊢ y₁ = x₂
tactic: rw [Ico_disjoint_Ico, min_eq_left (le_of_lt h2.2), le_max_iff] at h
state_before: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ x₁ x₂ y₁ y₂ : α
h : x₂ ≤ x₁ ∨ x₂ ≤ y₁
hx : x₁ < x₂
h2 : x₂ ∈ Ico y₁ y₂
⊢ y₁ = x₂
state_after: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ x₁ x₂ y₁ y₂ : α
h : x₂ ≤ x₁ ∨ x₂ ≤ y₁
hx : x₁ < x₂
h2 : x₂ ∈ Ico y₁ y₂
⊢ x₂ ≤ y₁
tactic: apply le_antisymm h2.1
state_before: ι : Sort u
α : Type v
β : Type w
inst✝ : LinearOrder α
a₁ a₂ b₁ b₂ x₁ x₂ y₁ y₂ : α
h : x₂ ≤ x₁ ∨ x₂ ≤ y₁
hx : x₁ < x₂
h2 : x₂ ∈ Ico y₁ y₂
⊢ x₂ ≤ y₁
state_after: no goals
tactic: exact h.elim (fun h => absurd hx (not_lt_of_le h)) id
Theorem: neg_one_eq_one_iff
File: Mathlib/Algebra/CharP/Two.lean

Proof steps:
state_before: R : Type u_1
ι : Type u_2
inst✝¹ : Ring R
inst✝ : Nontrivial R
⊢ -1 = 1 ↔ ringChar R = 2
state_after: R : Type u_1
ι : Type u_2
inst✝¹ : Ring R
inst✝ : Nontrivial R
h : -1 = 1
⊢ ringChar R = 2
tactic: refine ⟨fun h => ?_, fun h => @CharTwo.neg_eq _ _ (ringChar.of_eq h) 1⟩
state_before: R : Type u_1
ι : Type u_2
inst✝¹ : Ring R
inst✝ : Nontrivial R
h : -1 = 1
⊢ ringChar R = 2
state_after: R : Type u_1
ι : Type u_2
inst✝¹ : Ring R
inst✝ : Nontrivial R
h : ↑(1 + 1) = 0
⊢ ringChar R = 2
tactic: rw [eq_comm, ← sub_eq_zero, sub_neg_eq_add, ← Nat.cast_one, ← Nat.cast_add] at h
state_before: R : Type u_1
ι : Type u_2
inst✝¹ : Ring R
inst✝ : Nontrivial R
h : ↑(1 + 1) = 0
⊢ ringChar R = 2
state_after: no goals
tactic: exact ((Nat.dvd_prime Nat.prime_two).mp (ringChar.dvd h)).resolve_left CharP.ringChar_ne_one
Theorem: Sequential.homeoOfIso_symm_apply
File: Mathlib/Topology/Category/Sequential.lean

Proof steps:
state_before: X✝ : Type u
inst✝¹ : TopologicalSpace X✝
inst✝ : SequentialSpace X✝
X Y : Sequential
f : X ≅ Y
x : ↑X.toTop
⊢ f.inv (f.hom x) = x
state_after: no goals
tactic: simp
state_before: X✝ : Type u
inst✝¹ : TopologicalSpace X✝
inst✝ : SequentialSpace X✝
X Y : Sequential
f : X ≅ Y
x : ↑Y.toTop
⊢ f.hom (f.inv x) = x
state_after: no goals
tactic: simp
Theorem: Sbtw.mem_image_Ioo
File: Mathlib/Analysis/Convex/Between.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✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y z : P
h : Sbtw R x y z
⊢ y ∈ ⇑(lineMap x z) '' Set.Ioo 0 1
state_after: case intro.intro.intro.intro
R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x z : P
t : R
ht : t ∈ Set.Icc 0 1
hyx : (lineMap x z) t ≠ x
hyz : (lineMap x z) t ≠ z
⊢ (lineMap x z) t ∈ ⇑(lineMap x z) '' Set.Ioo 0 1
tactic: rcases h with ⟨⟨t, ht, rfl⟩, hyx, hyz⟩
state_before: case intro.intro.intro.intro
R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x z : P
t : R
ht : t ∈ Set.Icc 0 1
hyx : (lineMap x z) t ≠ x
hyz : (lineMap x z) t ≠ z
⊢ (lineMap x z) t ∈ ⇑(lineMap x z) '' Set.Ioo 0 1
state_after: case intro.intro.intro.intro.inl
R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x z : P
ht : 0 ∈ Set.Icc 0 1
hyx : (lineMap x z) 0 ≠ x
hyz : (lineMap x z) 0 ≠ z
⊢ (lineMap x z) 0 ∈ ⇑(lineMap x z) '' Set.Ioo 0 1

case intro.intro.intro.intro.inr.inl
R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x z : P
ht : 1 ∈ Set.Icc 0 1
hyx : (lineMap x z) 1 ≠ x
hyz : (lineMap x z) 1 ≠ z
⊢ (lineMap x z) 1 ∈ ⇑(lineMap x z) '' Set.Ioo 0 1

case intro.intro.intro.intro.inr.inr
R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x z : P
t : R
ht : t ∈ Set.Icc 0 1
hyx : (lineMap x z) t ≠ x
hyz : (lineMap x z) t ≠ z
ho : t ∈ Set.Ioo 0 1
⊢ (lineMap x z) t ∈ ⇑(lineMap x z) '' Set.Ioo 0 1
tactic: rcases Set.eq_endpoints_or_mem_Ioo_of_mem_Icc ht with (rfl | rfl | ho)
Theorem: FirstOrder.Language.Substructure.map_coe
File: Mathlib/ModelTheory/Substructures.lean

Proof steps:
state_before: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S✝ : L.Substructure M
s : Set M
φ : M →[L] N
S : L.Substructure M
n : ℕ
f : L.Functions n
x : Fin n → N
hx : ∀ (i : Fin n), x i ∈ ⇑φ '' ↑S
⊢ φ (funMap f fun i => Classical.choose ⋯) = funMap f x
state_after: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S✝ : L.Substructure M
s : Set M
φ : M →[L] N
S : L.Substructure M
n : ℕ
f : L.Functions n
x : Fin n → N
hx : ∀ (i : Fin n), x i ∈ ⇑φ '' ↑S
⊢ funMap f (⇑φ ∘ fun i => Classical.choose ⋯) = funMap f x
tactic: simp only [Hom.map_fun, SetLike.mem_coe]
state_before: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S✝ : L.Substructure M
s : Set M
φ : M →[L] N
S : L.Substructure M
n : ℕ
f : L.Functions n
x : Fin n → N
hx : ∀ (i : Fin n), x i ∈ ⇑φ '' ↑S
⊢ funMap f (⇑φ ∘ fun i => Classical.choose ⋯) = funMap f x
state_after: no goals
tactic: exact congr rfl (funext fun i => (Classical.choose_spec (hx i)).2)
Theorem: continuous_discrete_rng
File: Mathlib/Topology/Order.lean

Proof steps:
state_before: α : Type u_1
t t₁ t₂ : TopologicalSpace α
s✝ : Set α
inst✝³ : TopologicalSpace α
inst✝² : DiscreteTopology α
β : Type u_2
inst✝¹ : TopologicalSpace β
inst✝ : DiscreteTopology β
f : α → β
h : ∀ (b : β), IsOpen (f ⁻¹' {b})
s : Set β
x✝ : IsOpen s
⊢ IsOpen (f ⁻¹' s)
state_after: α : Type u_1
t t₁ t₂ : TopologicalSpace α
s✝ : Set α
inst✝³ : TopologicalSpace α
inst✝² : DiscreteTopology α
β : Type u_2
inst✝¹ : TopologicalSpace β
inst✝ : DiscreteTopology β
f : α → β
h : ∀ (b : β), IsOpen (f ⁻¹' {b})
s : Set β
x✝ : IsOpen s
⊢ IsOpen (⋃ i ∈ s, f ⁻¹' {i})
tactic: rw [← biUnion_of_singleton s, preimage_iUnion₂]
state_before: α : Type u_1
t t₁ t₂ : TopologicalSpace α
s✝ : Set α
inst✝³ : TopologicalSpace α
inst✝² : DiscreteTopology α
β : Type u_2
inst✝¹ : TopologicalSpace β
inst✝ : DiscreteTopology β
f : α → β
h : ∀ (b : β), IsOpen (f ⁻¹' {b})
s : Set β
x✝ : IsOpen s
⊢ IsOpen (⋃ i ∈ s, f ⁻¹' {i})
state_after: no goals
tactic: exact isOpen_biUnion fun _ _ => h _