1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: reflection_eq_self_iff
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: rw [← orthogonalProjection_eq_self_iff, reflection_apply, sub_eq_iff_eq_add', ← two_smul 𝕜,
  two_smul ℕ, ← two_smul 𝕜]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
x : E
⊢ (reflection K) x = x ↔ x ∈ K
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
x : E
⊢ 2 • ↑((orthogonalProjection K) x) = 2 • x ↔ ↑((orthogonalProjection K) x) = x

tactic: refine (smul_right_injective E ?_).eq_iff
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
x : E
⊢ 2 • ↑((orthogonalProjection K) x) = 2 • x ↔ ↑((orthogonalProjection K) x) = x
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
x : E
⊢ 2 ≠ 0

tactic: exact two_ne_zero
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
x : E
⊢ 2 ≠ 0
state_after: no goals
Theorem: Squarefree.isRadical
File: Mathlib/Algebra/Squarefree/Basic.lean

tactic: obtain ⟨a, b, ha, hb, rfl⟩ := exists_dvd_and_dvd_of_dvd_mul (sq y ▸ hy)
state_before: R : Type u_1
inst✝¹ : CommMonoidWithZero R
inst✝ : DecompositionMonoid R
x : R
hx : Squarefree x
y : R
hy : x ∣ y ^ 2
⊢ x ∣ y
state_after: case intro.intro.intro.intro
R : Type u_1
inst✝¹ : CommMonoidWithZero R
inst✝ : DecompositionMonoid R
y a b : R
ha : a ∣ y
hb : b ∣ y
hx : Squarefree (a * b)
hy : a * b ∣ y ^ 2
⊢ a * b ∣ y

tactic: exact (IsRelPrime.of_squarefree_mul hx).mul_dvd ha hb
state_before: case intro.intro.intro.intro
R : Type u_1
inst✝¹ : CommMonoidWithZero R
inst✝ : DecompositionMonoid R
y a b : R
ha : a ∣ y
hb : b ∣ y
hx : Squarefree (a * b)
hy : a * b ∣ y ^ 2
⊢ a * b ∣ y
state_after: no goals
Theorem: lTensor.inverse_apply
File: Mathlib/LinearAlgebra/TensorProduct/RightExactness.lean

tactic: rw [lTensor.inverse, lTensor.inverse_of_rightInverse_apply]
state_before: R : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup N
inst✝⁵ : AddCommGroup P
inst✝⁴ : Module R M
inst✝³ : Module R N
inst✝² : Module R P
f : M →ₗ[R] N
g : N →ₗ[R] P
Q : Type u_5
inst✝¹ : AddCommGroup Q
inst✝ : Module R Q
hfg : Exact ⇑f ⇑g
hg : Surjective ⇑g
y : Q ⊗[R] N
⊢ (inverse Q hfg hg) ((lTensor Q g) y) = Submodule.Quotient.mk y
state_after: no goals
Theorem: PolyEquivTensor.right_inv
File: Mathlib/RingTheory/PolynomialAlgebra.lean

tactic: refine Polynomial.induction_on' x ?_ ?_
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
⊢ (toFunAlgHom R A) (invFun R A x) = x
state_after: case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
⊢ ∀ (p q : A[X]),
    (toFunAlgHom R A) (invFun R A p) = p →
      (toFunAlgHom R A) (invFun R A q) = q → (toFunAlgHom R A) (invFun R A (p + q)) = p + q

case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
⊢ ∀ (n : ℕ) (a : A), (toFunAlgHom R A) (invFun R A ((monomial n) a)) = (monomial n) a

tactic: intro p q hp hq
state_before: case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
⊢ ∀ (p q : A[X]),
    (toFunAlgHom R A) (invFun R A p) = p →
      (toFunAlgHom R A) (invFun R A q) = q → (toFunAlgHom R A) (invFun R A (p + q)) = p + q
state_after: case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x p q : A[X]
hp : (toFunAlgHom R A) (invFun R A p) = p
hq : (toFunAlgHom R A) (invFun R A q) = q
⊢ (toFunAlgHom R A) (invFun R A (p + q)) = p + q

tactic: simp only [invFun_add, AlgHom.map_add, hp, hq]
state_before: case refine_1
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x p q : A[X]
hp : (toFunAlgHom R A) (invFun R A p) = p
hq : (toFunAlgHom R A) (invFun R A q) = q
⊢ (toFunAlgHom R A) (invFun R A (p + q)) = p + q
state_after: no goals

tactic: intro n a
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
⊢ ∀ (n : ℕ) (a : A), (toFunAlgHom R A) (invFun R A ((monomial n) a)) = (monomial n) a
state_after: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
n : ℕ
a : A
⊢ (toFunAlgHom R A) (invFun R A ((monomial n) a)) = (monomial n) a

tactic: rw [invFun_monomial, Algebra.TensorProduct.tmul_pow,
    one_pow, Algebra.TensorProduct.tmul_mul_tmul, mul_one, one_mul, toFunAlgHom_apply_tmul,
    X_pow_eq_monomial, sum_monomial_index] <;>
  simp
state_before: case refine_2
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x : A[X]
n : ℕ
a : A
⊢ (toFunAlgHom R A) (invFun R A ((monomial n) a)) = (monomial n) a
state_after: no goals
Theorem: ENNReal.lt_add_right
File: Mathlib/Data/ENNReal/Operations.lean

tactic: rwa [← pos_iff_ne_zero, ← ENNReal.add_lt_add_iff_left ha, add_zero] at hb
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ 0
⊢ a < a + b
state_after: no goals
Theorem: LipschitzWith.ediam_image_le
File: Mathlib/Topology/EMetricSpace/Lipschitz.lean

tactic: apply EMetric.diam_le
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
x y : α
r : ℝ≥0∞
hf : LipschitzWith K f
s : Set α
⊢ diam (f '' s) ≤ ↑K * diam s
state_after: case h
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
x y : α
r : ℝ≥0∞
hf : LipschitzWith K f
s : Set α
⊢ ∀ x ∈ f '' s, ∀ y ∈ f '' s, edist x y ≤ ↑K * diam s

tactic: rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩
state_before: case h
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
x y : α
r : ℝ≥0∞
hf : LipschitzWith K f
s : Set α
⊢ ∀ x ∈ f '' s, ∀ y ∈ f '' s, edist x y ≤ ↑K * diam s
state_after: case h.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
x✝ y✝ : α
r : ℝ≥0∞
hf : LipschitzWith K f
s : Set α
x : α
hx : x ∈ s
y : α
hy : y ∈ s
⊢ edist (f x) (f y) ≤ ↑K * diam s

tactic: exact hf.edist_le_mul_of_le (EMetric.edist_le_diam_of_mem hx hy)
state_before: case h.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
K : ℝ≥0
f : α → β
x✝ y✝ : α
r : ℝ≥0∞
hf : LipschitzWith K f
s : Set α
x : α
hx : x ∈ s
y : α
hy : y ∈ s
⊢ edist (f x) (f y) ≤ ↑K * diam s
state_after: no goals
Theorem: Equiv.prodCongr_refl_left
File: Mathlib/Logic/Equiv/Basic.lean

tactic: ext ⟨a, b⟩ : 1
state_before: α₁ : Type u_3
β₁ : Type u_1
β₂ : Type u_2
e✝ : α₁ → β₁ ≃ β₂
e : β₁ ≃ β₂
⊢ (Equiv.refl α₁).prodCongr e = prodCongrRight fun x => e
state_after: case H.mk
α₁ : Type u_3
β₁ : Type u_1
β₂ : Type u_2
e✝ : α₁ → β₁ ≃ β₂
e : β₁ ≃ β₂
a : α₁
b : β₁
⊢ ((Equiv.refl α₁).prodCongr e) (a, b) = (prodCongrRight fun x => e) (a, b)

tactic: simp
state_before: case H.mk
α₁ : Type u_3
β₁ : Type u_1
β₂ : Type u_2
e✝ : α₁ → β₁ ≃ β₂
e : β₁ ≃ β₂
a : α₁
b : β₁
⊢ ((Equiv.refl α₁).prodCongr e) (a, b) = (prodCongrRight fun x => e) (a, b)
state_after: no goals
Theorem: Fin.find_eq_none_iff
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: rw [← not_exists, ← isSome_find_iff]
state_before: m n✝ n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
⊢ find p = none ↔ ∀ (i : Fin n), ¬p i
state_after: m n✝ n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
⊢ find p = none ↔ ¬(find p).isSome = true

tactic: cases find p <;> simp
state_before: m n✝ n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
⊢ find p = none ↔ ¬(find p).isSome = true
state_after: no goals
Theorem: List.foldrM_eq_foldr
File: Mathlib/Data/List/Basic.lean

tactic: induction l <;> simp [*]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
m : Type v → Type w
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → β → m β
b : β
l : List α
⊢ foldrM f b l = foldr (fun a mb => mb >>= f a) (pure b) l
state_after: no goals
Theorem: Set.ncard_eq_zero
File: Mathlib/Data/Set/Card.lean

tactic: rw [← Nat.cast_inj (R := ℕ∞), hs.cast_ncard_eq, Nat.cast_zero, encard_eq_zero]
state_before: α : Type u_1
β : Type u_2
s t : Set α
hs : autoParam s.Finite _auto✝
⊢ s.ncard = 0 ↔ s = ∅
state_after: no goals
Theorem: SimpleGraph.chromaticNumber_ne_top_iff_exists
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: rw [chromaticNumber]
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ G.chromaticNumber ≠ ⊤ ↔ ∃ n, G.Colorable n
state_after: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ ⨅ n ∈ setOf G.Colorable, ↑n ≠ ⊤ ↔ ∃ n, G.Colorable n

tactic: convert_to ⨅ n : {m | G.Colorable m}, (n : ℕ∞) ≠ ⊤ ↔ _
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ ⨅ n ∈ setOf G.Colorable, ↑n ≠ ⊤ ↔ ∃ n, G.Colorable n
state_after: case h.e'_1.a
V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ ⨅ n ∈ setOf G.Colorable, ↑n ≠ ⊤ ↔ ⨅ n, ↑↑n ≠ ⊤

case convert_2
V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ ⨅ n, ↑↑n ≠ ⊤ ↔ ∃ n, G.Colorable n

tactic: rw [← lt_top_iff_ne_top, ENat.iInf_coe_lt_top]
state_before: case convert_2
V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ ⨅ n, ↑↑n ≠ ⊤ ↔ ∃ n, G.Colorable n
state_after: case convert_2
V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ Nonempty ↑{m | G.Colorable m} ↔ ∃ n, G.Colorable n

tactic: simp
state_before: case convert_2
V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ Nonempty ↑{m | G.Colorable m} ↔ ∃ n, G.Colorable n
state_after: no goals

tactic: rw [iInf_subtype]
state_before: case h.e'_1.a
V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
⊢ ⨅ n ∈ setOf G.Colorable, ↑n ≠ ⊤ ↔ ⨅ n, ↑↑n ≠ ⊤
state_after: no goals
Theorem: Real.continuousAt_const_rpow'
File: Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean

tactic: simp only [rpow_def]
state_before: a b : ℝ
h : b ≠ 0
⊢ ContinuousAt (fun x => a ^ x) b
state_after: a b : ℝ
h : b ≠ 0
⊢ ContinuousAt (fun x => (↑a ^ ↑x).re) b

tactic: refine Complex.continuous_re.continuousAt.comp ?_
state_before: a b : ℝ
h : b ≠ 0
⊢ ContinuousAt (fun x => (↑a ^ ↑x).re) b
state_after: a b : ℝ
h : b ≠ 0
⊢ ContinuousAt (fun x => ↑a ^ ↑x) b

tactic: refine (continuousAt_const_cpow' ?_).comp Complex.continuous_ofReal.continuousAt
state_before: a b : ℝ
h : b ≠ 0
⊢ ContinuousAt (fun x => ↑a ^ ↑x) b
state_after: a b : ℝ
h : b ≠ 0
⊢ ↑b ≠ 0

tactic: norm_cast
state_before: a b : ℝ
h : b ≠ 0
⊢ ↑b ≠ 0
state_after: no goals
Theorem: FirstOrder.Language.Structure.CG.map_of_surjective
File: Mathlib/ModelTheory/FinitelyGenerated.lean

tactic: rw [← Hom.range_eq_top] at hs
state_before: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
hs : Function.Surjective ⇑f
⊢ CG L N
state_after: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
hs : f.range = ⊤
⊢ CG L N

tactic: rw [cg_def, ← hs]
state_before: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
hs : f.range = ⊤
⊢ CG L N
state_after: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
hs : f.range = ⊤
⊢ f.range.CG

tactic: exact h.range f
state_before: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
hs : f.range = ⊤
⊢ f.range.CG
state_after: no goals
Theorem: Matrix.two_mul_expl
File: Mathlib/Data/Matrix/Basic.lean

tactic: rw [Matrix.mul_apply, Finset.sum_fin_eq_sum_range, Finset.sum_range_succ, Finset.sum_range_succ]
state_before: case refine_4
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R✝ : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
R : Type u_10
inst✝ : CommRing R
A B : Matrix (Fin 2) (Fin 2) R
⊢ (A * B) 1 1 = A 1 0 * B 0 1 + A 1 1 * B 1 1
state_after: case refine_4
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R✝ : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
R : Type u_10
inst✝ : CommRing R
A B : Matrix (Fin 2) (Fin 2) R
⊢ (((∑ x ∈ Finset.range 0, if h : x < 2 then A 1 ⟨x, h⟩ * B ⟨x, h⟩ 1 else 0) +
        if h : 0 < 2 then A 1 ⟨0, h⟩ * B ⟨0, h⟩ 1 else 0) +
      if h : 1 < 2 then A 1 ⟨1, h⟩ * B ⟨1, h⟩ 1 else 0) =
    A 1 0 * B 0 1 + A 1 1 * B 1 1

tactic: simp
state_before: case refine_4
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R✝ : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
R : Type u_10
inst✝ : CommRing R
A B : Matrix (Fin 2) (Fin 2) R
⊢ (((∑ x ∈ Finset.range 0, if h : x < 2 then A 1 ⟨x, h⟩ * B ⟨x, h⟩ 1 else 0) +
        if h : 0 < 2 then A 1 ⟨0, h⟩ * B ⟨0, h⟩ 1 else 0) +
      if h : 1 < 2 then A 1 ⟨1, h⟩ * B ⟨1, h⟩ 1 else 0) =
    A 1 0 * B 0 1 + A 1 1 * B 1 1
state_after: no goals
Theorem: QuotientMap.image_connectedComponent
File: Mathlib/Topology/Connected/Basic.lean

tactic: rw [← hf.preimage_connectedComponent h_fibers, image_preimage_eq _ hf.surjective]
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝¹ : TopologicalSpace α
s t u v : Set α
inst✝ : TopologicalSpace β
f : α → β
hf : QuotientMap f
h_fibers : ∀ (y : β), IsConnected (f ⁻¹' {y})
a : α
⊢ f '' connectedComponent a = connectedComponent (f a)
state_after: no goals
Theorem: Polynomial.factor_dvd_of_not_isUnit
File: Mathlib/FieldTheory/SplittingField/Construction.lean

tactic: by_cases hf2 : f = 0
state_before: F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
⊢ f.factor ∣ f
state_after: case pos
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
hf2 : f = 0
⊢ f.factor ∣ f

case neg
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
hf2 : ¬f = 0
⊢ f.factor ∣ f

tactic: rw [factor, dif_pos (WfDvdMonoid.exists_irreducible_factor hf1 hf2)]
state_before: case neg
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
hf2 : ¬f = 0
⊢ f.factor ∣ f
state_after: case neg
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
hf2 : ¬f = 0
⊢ Classical.choose ⋯ ∣ f

tactic: exact (Classical.choose_spec <| WfDvdMonoid.exists_irreducible_factor hf1 hf2).2
state_before: case neg
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
hf2 : ¬f = 0
⊢ Classical.choose ⋯ ∣ f
state_after: no goals

tactic: rw [hf2]
state_before: case pos
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
hf2 : f = 0
⊢ f.factor ∣ f
state_after: case pos
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
hf2 : f = 0
⊢ factor 0 ∣ 0

tactic: exact dvd_zero _
state_before: case pos
F : Type u
K : Type v
L : Type w
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
f : K[X]
hf1 : ¬IsUnit f
hf2 : f = 0
⊢ factor 0 ∣ 0
state_after: no goals
Theorem: Nat.bit0_eq_zero
File: Mathlib/Data/Nat/Bits.lean

tactic: simp [h]
state_before: m n✝ n : ℕ
h : n = 0
⊢ bit0 n = 0
state_after: no goals
Theorem: MvPowerSeries.eq_inv_iff_mul_eq_one
File: Mathlib/RingTheory/MvPowerSeries/Inverse.lean

tactic: rw [← MvPowerSeries.eq_mul_inv_iff_mul_eq h, one_mul]
state_before: σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
φ ψ : MvPowerSeries σ k
h : (constantCoeff σ k) ψ ≠ 0
⊢ φ = ψ⁻¹ ↔ φ * ψ = 1
state_after: no goals
Theorem: List.perm_insert_swap
File: .lake/packages/batteries/Batteries/Data/List/Perm.lean

tactic: by_cases xl : x ∈ l <;> by_cases yl : y ∈ l <;> simp [xl, yl]
state_before: α : Type u_1
inst✝ : DecidableEq α
x y : α
l : List α
⊢ List.insert x (List.insert y l) ~ List.insert y (List.insert x l)
state_after: case neg
α : Type u_1
inst✝ : DecidableEq α
x y : α
l : List α
xl : ¬x ∈ l
yl : ¬y ∈ l
⊢ List.insert x (y :: l) ~ List.insert y (x :: l)

tactic: if xy : x = y then simp [xy] else
simp [List.insert, xl, yl, xy, Ne.symm xy]
constructor
state_before: case neg
α : Type u_1
inst✝ : DecidableEq α
x y : α
l : List α
xl : ¬x ∈ l
yl : ¬y ∈ l
⊢ List.insert x (y :: l) ~ List.insert y (x :: l)
state_after: no goals

tactic: simp [xy]
state_before: α : Type u_1
inst✝ : DecidableEq α
x y : α
l : List α
xl : ¬x ∈ l
yl : ¬y ∈ l
xy : x = y
⊢ List.insert x (y :: l) ~ List.insert y (x :: l)
state_after: no goals

tactic: simp [List.insert, xl, yl, xy, Ne.symm xy]
state_before: α : Type u_1
inst✝ : DecidableEq α
x y : α
l : List α
xl : ¬x ∈ l
yl : ¬y ∈ l
xy : ¬x = y
⊢ List.insert x (y :: l) ~ List.insert y (x :: l)
state_after: α : Type u_1
inst✝ : DecidableEq α
x y : α
l : List α
xl : ¬x ∈ l
yl : ¬y ∈ l
xy : ¬x = y
⊢ x :: y :: l ~ y :: x :: l

tactic: constructor
state_before: α : Type u_1
inst✝ : DecidableEq α
x y : α
l : List α
xl : ¬x ∈ l
yl : ¬y ∈ l
xy : ¬x = y
⊢ x :: y :: l ~ y :: x :: l
state_after: no goals
Theorem: SimpleGraph.TripartiteFromTriangles.Graph.in₂₁_iff
File: Mathlib/Combinatorics/SimpleGraph/Triangle/Tripartite.lean

tactic: rintro ⟨⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
𝕜 : Type u_4
inst✝ : LinearOrderedField 𝕜
t : Finset (α × β × γ)
a a' : α
b b' : β
c c' : γ
x : α × β × γ
ε : 𝕜
⊢ (graph t).Adj (in₂ c) (in₁ b) → ∃ a, (a, b, c) ∈ t
state_after: case in₂₁
α : Type u_1
β : Type u_2
γ : Type u_3
𝕜 : Type u_4
inst✝ : LinearOrderedField 𝕜
t : Finset (α × β × γ)
a a' : α
b b' : β
c c' : γ
x : α × β × γ
ε : 𝕜
a✝¹ : α
a✝ : (a✝¹, b, c) ∈ t
⊢ ∃ a, (a, b, c) ∈ t

tactic: exact ⟨_, ‹_›⟩
state_before: case in₂₁
α : Type u_1
β : Type u_2
γ : Type u_3
𝕜 : Type u_4
inst✝ : LinearOrderedField 𝕜
t : Finset (α × β × γ)
a a' : α
b b' : β
c c' : γ
x : α × β × γ
ε : 𝕜
a✝¹ : α
a✝ : (a✝¹, b, c) ∈ t
⊢ ∃ a, (a, b, c) ∈ t
state_after: no goals
Theorem: add_pow_expChar_of_commute
File: Mathlib/Algebra/CharP/ExpChar.lean

tactic: cases' hR with _ _ hprime _
state_before: R : Type u
inst✝ : Semiring R
q : ℕ
hR : ExpChar R q
x y : R
h : Commute x y
⊢ (x + y) ^ q = x ^ q + y ^ q
state_after: case zero
R : Type u
inst✝¹ : Semiring R
x y : R
h : Commute x y
inst✝ : CharZero R
⊢ (x + y) ^ 1 = x ^ 1 + y ^ 1

case prime
R : Type u
inst✝ : Semiring R
q : ℕ
x y : R
h : Commute x y
hprime : Nat.Prime q
hchar✝ : CharP R q
⊢ (x + y) ^ q = x ^ q + y ^ q

tactic: haveI := Fact.mk hprime
state_before: case prime
R : Type u
inst✝ : Semiring R
q : ℕ
x y : R
h : Commute x y
hprime : Nat.Prime q
hchar✝ : CharP R q
⊢ (x + y) ^ q = x ^ q + y ^ q
state_after: case prime
R : Type u
inst✝ : Semiring R
q : ℕ
x y : R
h : Commute x y
hprime : Nat.Prime q
hchar✝ : CharP R q
this : Fact (Nat.Prime q)
⊢ (x + y) ^ q = x ^ q + y ^ q

tactic: exact add_pow_char_of_commute R x y h
state_before: case prime
R : Type u
inst✝ : Semiring R
q : ℕ
x y : R
h : Commute x y
hprime : Nat.Prime q
hchar✝ : CharP R q
this : Fact (Nat.Prime q)
⊢ (x + y) ^ q = x ^ q + y ^ q
state_after: no goals

tactic: simp only [pow_one]
state_before: case zero
R : Type u
inst✝¹ : Semiring R
x y : R
h : Commute x y
inst✝ : CharZero R
⊢ (x + y) ^ 1 = x ^ 1 + y ^ 1
state_after: no goals
Theorem: ProbabilityTheory.measurable_preCDF'
File: Mathlib/Probability/Kernel/Disintegration/CondCdf.lean

tactic: rw [measurable_pi_iff]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
⊢ Measurable fun a r => (preCDF ρ r a).toReal
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
⊢ ∀ (a : ℚ), Measurable fun x => (preCDF ρ a x).toReal

tactic: exact fun _ ↦ measurable_preCDF.ennreal_toReal
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
⊢ ∀ (a : ℚ), Measurable fun x => (preCDF ρ a x).toReal
state_after: no goals
Theorem: Fin.range_cons
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: rw [range_fin_succ, cons_zero, tail_cons]
state_before: m n✝ : ℕ
α✝ : Fin (n✝ + 1) → Type u
x✝ : α✝ 0
q : (i : Fin (n✝ + 1)) → α✝ i
p : (i : Fin n✝) → α✝ i.succ
i : Fin n✝
y : α✝ i.succ
z : α✝ 0
α : Type u_1
n : ℕ
x : α
b : Fin n → α
⊢ Set.range (cons x b) = insert x (Set.range b)
state_after: no goals
Theorem: Algebra.adjoin_union_coe_submodule
File: Mathlib/RingTheory/Adjoin/Basic.lean

tactic: rw [adjoin_eq_span, adjoin_eq_span, adjoin_eq_span, span_mul_span]
state_before: R : Type uR
S : Type uS
A : Type uA
B : Type uB
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Algebra R A
s t : Set A
⊢ Subalgebra.toSubmodule (adjoin R (s ∪ t)) = Subalgebra.toSubmodule (adjoin R s) * Subalgebra.toSubmodule (adjoin R t)
state_after: R : Type uR
S : Type uS
A : Type uA
B : Type uB
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Algebra R A
s t : Set A
⊢ span R ↑(Submonoid.closure (s ∪ t)) = span R (↑(Submonoid.closure s) * ↑(Submonoid.closure t))

tactic: congr 1 with z
state_before: R : Type uR
S : Type uS
A : Type uA
B : Type uB
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Algebra R A
s t : Set A
⊢ span R ↑(Submonoid.closure (s ∪ t)) = span R (↑(Submonoid.closure s) * ↑(Submonoid.closure t))
state_after: case e_s.h
R : Type uR
S : Type uS
A : Type uA
B : Type uB
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Algebra R A
s t : Set A
z : A
⊢ z ∈ ↑(Submonoid.closure (s ∪ t)) ↔ z ∈ ↑(Submonoid.closure s) * ↑(Submonoid.closure t)

tactic: simp [Submonoid.closure_union, Submonoid.mem_sup, Set.mem_mul]
state_before: case e_s.h
R : Type uR
S : Type uS
A : Type uA
B : Type uB
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Algebra R A
s t : Set A
z : A
⊢ z ∈ ↑(Submonoid.closure (s ∪ t)) ↔ z ∈ ↑(Submonoid.closure s) * ↑(Submonoid.closure t)
state_after: no goals
Theorem: CategoryTheory.OplaxFunctor.map₂_inv
File: Mathlib/CategoryTheory/Bicategory/Functor/Oplax.lean

tactic: apply IsIso.eq_inv_of_hom_inv_id
state_before: B : Type u₁
inst✝³ : Bicategory B
C : Type u₂
inst✝² : Bicategory C
D : Type u₃
inst✝¹ : Bicategory D
F✝ F : OplaxFunctor B C
a b : B
f g : a ⟶ b
η : f ⟶ g
inst✝ : IsIso η
⊢ F.map₂ (inv η) = inv (F.map₂ η)
state_after: case hom_inv_id
B : Type u₁
inst✝³ : Bicategory B
C : Type u₂
inst✝² : Bicategory C
D : Type u₃
inst✝¹ : Bicategory D
F✝ F : OplaxFunctor B C
a b : B
f g : a ⟶ b
η : f ⟶ g
inst✝ : IsIso η
⊢ F.map₂ η ≫ F.map₂ (inv η) = 𝟙 ((↑F.toPrelaxFunctor).map f)

tactic: simp [← F.map₂_comp η (inv η)]
state_before: case hom_inv_id
B : Type u₁
inst✝³ : Bicategory B
C : Type u₂
inst✝² : Bicategory C
D : Type u₃
inst✝¹ : Bicategory D
F✝ F : OplaxFunctor B C
a b : B
f g : a ⟶ b
η : f ⟶ g
inst✝ : IsIso η
⊢ F.map₂ η ≫ F.map₂ (inv η) = 𝟙 ((↑F.toPrelaxFunctor).map f)
state_after: no goals
Theorem: Finset.subset_insert_iff_of_not_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [subset_insert_iff, erase_eq_of_not_mem h]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
h : a ∉ s
⊢ s ⊆ insert a t ↔ s ⊆ t
state_after: no goals