1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: mem_nhdsWithin_Ici_iff_exists_mem_Ioc_Ico_subset
File: Mathlib/Topology/Order/LeftRightNhds.lean

tactic: norm_num
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a u' : α
s : Set α
hu' : a < u'
⊢ [s ∈ 𝓝[≥] a, s ∈ 𝓝[Icc a u'] a, s ∈ 𝓝[Ico a u'] a, ∃ u ∈ Ioc a u', Ico a u ⊆ s, ∃ u ∈ Ioi a, Ico a u ⊆ s].get? 0 =
    some (s ∈ 𝓝[≥] a)
state_after: no goals

tactic: norm_num
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : OrderTopology α
a u' : α
s : Set α
hu' : a < u'
⊢ [s ∈ 𝓝[≥] a, s ∈ 𝓝[Icc a u'] a, s ∈ 𝓝[Ico a u'] a, ∃ u ∈ Ioc a u', Ico a u ⊆ s, ∃ u ∈ Ioi a, Ico a u ⊆ s].get? 3 =
    some (∃ u ∈ Ioc a u', Ico a u ⊆ s)
state_after: no goals
Theorem: Polynomial.coeff_sub_eq_left_of_lt
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

tactic: rw [← natDegree_neg] at dg
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Ring R
p q : R[X]
dg : q.natDegree < n
⊢ (p - q).coeff n = p.coeff n
state_after: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Ring R
p q : R[X]
dg : (-q).natDegree < n
⊢ (p - q).coeff n = p.coeff n

tactic: rw [sub_eq_add_neg, coeff_add_eq_left_of_lt dg]
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Ring R
p q : R[X]
dg : (-q).natDegree < n
⊢ (p - q).coeff n = p.coeff n
state_after: no goals
Theorem: Setoid.classes_mkClasses
File: Mathlib/Data/Setoid/Partition.lean

tactic: ext s
state_before: α : Type u_1
c : Set (Set α)
hc : IsPartition c
⊢ (mkClasses c ⋯).classes = c
state_after: case h
α : Type u_1
c : Set (Set α)
hc : IsPartition c
s : Set α
⊢ s ∈ (mkClasses c ⋯).classes ↔ s ∈ c

tactic: constructor
state_before: case h
α : Type u_1
c : Set (Set α)
hc : IsPartition c
s : Set α
⊢ s ∈ (mkClasses c ⋯).classes ↔ s ∈ c
state_after: case h.mp
α : Type u_1
c : Set (Set α)
hc : IsPartition c
s : Set α
⊢ s ∈ (mkClasses c ⋯).classes → s ∈ c

case h.mpr
α : Type u_1
c : Set (Set α)
hc : IsPartition c
s : Set α
⊢ s ∈ c → s ∈ (mkClasses c ⋯).classes

tactic: rintro ⟨y, rfl⟩
state_before: case h.mp
α : Type u_1
c : Set (Set α)
hc : IsPartition c
s : Set α
⊢ s ∈ (mkClasses c ⋯).classes → s ∈ c
state_after: case h.mp.intro
α : Type u_1
c : Set (Set α)
hc : IsPartition c
y : α
⊢ {x | (mkClasses c ⋯).Rel x y} ∈ c

tactic: obtain ⟨b, ⟨hb, hy⟩, _⟩ := hc.2 y
state_before: case h.mp.intro
α : Type u_1
c : Set (Set α)
hc : IsPartition c
y : α
⊢ {x | (mkClasses c ⋯).Rel x y} ∈ c
state_after: case h.mp.intro.intro.intro.intro
α : Type u_1
c : Set (Set α)
hc : IsPartition c
y : α
b : Set α
right✝ : ∀ (y_1 : Set α), (fun b => b ∈ c ∧ y ∈ b) y_1 → y_1 = b
hb : b ∈ c
hy : y ∈ b
⊢ {x | (mkClasses c ⋯).Rel x y} ∈ c

tactic: rwa [← eq_eqv_class_of_mem _ hb hy]
state_before: case h.mp.intro.intro.intro.intro
α : Type u_1
c : Set (Set α)
hc : IsPartition c
y : α
b : Set α
right✝ : ∀ (y_1 : Set α), (fun b => b ∈ c ∧ y ∈ b) y_1 → y_1 = b
hb : b ∈ c
hy : y ∈ b
⊢ {x | (mkClasses c ⋯).Rel x y} ∈ c
state_after: no goals

tactic: exact exists_of_mem_partition hc
state_before: case h.mpr
α : Type u_1
c : Set (Set α)
hc : IsPartition c
s : Set α
⊢ s ∈ c → s ∈ (mkClasses c ⋯).classes
state_after: no goals
Theorem: LinearMap.toLinearMap₂'Aux_toMatrix₂Aux
File: Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean

tactic: refine ext_basis (Pi.basisFun R₁ n) (Pi.basisFun R₂ m) fun i j => ?_
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
M : Type u_4
M₁ : Type u_5
M₂ : Type u_6
M₁' : Type u_7
M₂' : Type u_8
n : Type u_9
m : Type u_10
n' : Type u_11
m' : Type u_12
ι : Type u_13
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring R₁
inst✝⁸ : Semiring R₂
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R₁ M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
inst✝³ : Fintype n
inst✝² : Fintype m
inst✝¹ : DecidableEq n
inst✝ : DecidableEq m
σ₁ : R₁ →+* R
σ₂ : R₂ →+* R
f : (n → R₁) →ₛₗ[σ₁] (m → R₂) →ₛₗ[σ₂] R
⊢ toLinearMap₂'Aux σ₁ σ₂
      ((toMatrix₂Aux (fun i => (stdBasis R₁ (fun x => R₁) i) 1) fun j => (stdBasis R₂ (fun x => R₂) j) 1) f) =
    f
state_after: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
M : Type u_4
M₁ : Type u_5
M₂ : Type u_6
M₁' : Type u_7
M₂' : Type u_8
n : Type u_9
m : Type u_10
n' : Type u_11
m' : Type u_12
ι : Type u_13
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring R₁
inst✝⁸ : Semiring R₂
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R₁ M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
inst✝³ : Fintype n
inst✝² : Fintype m
inst✝¹ : DecidableEq n
inst✝ : DecidableEq m
σ₁ : R₁ →+* R
σ₂ : R₂ →+* R
f : (n → R₁) →ₛₗ[σ₁] (m → R₂) →ₛₗ[σ₂] R
i : n
j : m
⊢ ((toLinearMap₂'Aux σ₁ σ₂
          ((toMatrix₂Aux (fun i => (stdBasis R₁ (fun x => R₁) i) 1) fun j => (stdBasis R₂ (fun x => R₂) j) 1) f))
        ((Pi.basisFun R₁ n) i))
      ((Pi.basisFun R₂ m) j) =
    (f ((Pi.basisFun R₁ n) i)) ((Pi.basisFun R₂ m) j)

tactic: simp_rw [Pi.basisFun_apply, Matrix.toLinearMap₂'Aux_stdBasis, LinearMap.toMatrix₂Aux_apply]
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
M : Type u_4
M₁ : Type u_5
M₂ : Type u_6
M₁' : Type u_7
M₂' : Type u_8
n : Type u_9
m : Type u_10
n' : Type u_11
m' : Type u_12
ι : Type u_13
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring R₁
inst✝⁸ : Semiring R₂
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R₁ M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
inst✝³ : Fintype n
inst✝² : Fintype m
inst✝¹ : DecidableEq n
inst✝ : DecidableEq m
σ₁ : R₁ →+* R
σ₂ : R₂ →+* R
f : (n → R₁) →ₛₗ[σ₁] (m → R₂) →ₛₗ[σ₂] R
i : n
j : m
⊢ ((toLinearMap₂'Aux σ₁ σ₂
          ((toMatrix₂Aux (fun i => (stdBasis R₁ (fun x => R₁) i) 1) fun j => (stdBasis R₂ (fun x => R₂) j) 1) f))
        ((Pi.basisFun R₁ n) i))
      ((Pi.basisFun R₂ m) j) =
    (f ((Pi.basisFun R₁ n) i)) ((Pi.basisFun R₂ m) j)
state_after: no goals
Theorem: Complex.cpow_ofReal_re
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [cpow_ofReal]
state_before: x : ℂ
y : ℝ
⊢ (x ^ ↑y).re = abs x ^ y * Real.cos (x.arg * y)
state_after: x : ℂ
y : ℝ
⊢ (↑(abs x ^ y) * (↑(Real.cos (x.arg * y)) + ↑(Real.sin (x.arg * y)) * I)).re = abs x ^ y * Real.cos (x.arg * y)

tactic: generalize arg x * y = z
state_before: x : ℂ
y : ℝ
⊢ (↑(abs x ^ y) * (↑(Real.cos (x.arg * y)) + ↑(Real.sin (x.arg * y)) * I)).re = abs x ^ y * Real.cos (x.arg * y)
state_after: x : ℂ
y z : ℝ
⊢ (↑(abs x ^ y) * (↑(Real.cos z) + ↑(Real.sin z) * I)).re = abs x ^ y * Real.cos z

tactic: simp [Real.cos]
state_before: x : ℂ
y z : ℝ
⊢ (↑(abs x ^ y) * (↑(Real.cos z) + ↑(Real.sin z) * I)).re = abs x ^ y * Real.cos z
state_after: no goals
Theorem: mul_sub_mul_div_mul_nonpos_iff
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [mul_comm b c, ← div_sub_div _ _ hc hd, sub_nonpos]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
hc : c ≠ 0
hd : d ≠ 0
⊢ (a * d - b * c) / (c * d) ≤ 0 ↔ a / c ≤ b / d
state_after: no goals
Theorem: Orientation.oangle_neg_left
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

tactic: simp only [oangle, map_neg]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ o.oangle (-x) y = o.oangle x y + ↑π
state_after: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ ↑((-o.kahler x) y).arg = ↑((o.kahler x) y).arg + ↑π

tactic: convert Complex.arg_neg_coe_angle _
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ ↑((-o.kahler x) y).arg = ↑((o.kahler x) y).arg + ↑π
state_after: case convert_2
V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ (o.kahler x) y ≠ 0

tactic: exact o.kahler_ne_zero hx hy
state_before: case convert_2
V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
hx : x ≠ 0
hy : y ≠ 0
⊢ (o.kahler x) y ≠ 0
state_after: no goals
Theorem: Orientation.inner_smul_rotation_pi_div_two_smul_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Rotation.lean

tactic: rw [real_inner_comm, inner_smul_rotation_pi_div_two_smul_left]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x : V
r₁ r₂ : ℝ
⊢ ⟪r₂ • x, r₁ • (o.rotation ↑(π / 2)) x⟫_ℝ = 0
state_after: no goals
Theorem: Set.Ioc_union_Ioi
File: Mathlib/Order/Interval/Set/Basic.lean

tactic: rcases le_total a b with hab | hab <;> simp [hab] at h
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h : c ≤ max a b
⊢ Ioc a b ∪ Ioi c = Ioi (min a c)
state_after: case inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : a ≤ b
h : c ≤ b
⊢ Ioc a b ∪ Ioi c = Ioi (min a c)

case inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : b ≤ a
h : c ≤ a
⊢ Ioc a b ∪ Ioi c = Ioi (min a c)

tactic: exact Ioc_union_Ioi' h
state_before: case inl
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : a ≤ b
h : c ≤ b
⊢ Ioc a b ∪ Ioi c = Ioi (min a c)
state_after: no goals

tactic: simp [*]
state_before: case inr
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
hab : b ≤ a
h : c ≤ a
⊢ Ioc a b ∪ Ioi c = Ioi (min a c)
state_after: no goals
Theorem: EuclideanDomain.xgcdAux_fst
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: intros
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
⊢ ∀ (x s t s' t' : R), (xgcdAux 0 s t x s' t').1 = gcd 0 x
state_after: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y x✝ s✝ t✝ s'✝ t'✝ : R
⊢ (xgcdAux 0 s✝ t✝ x✝ s'✝ t'✝).1 = gcd 0 x✝

tactic: rw [xgcd_zero_left, gcd_zero_left]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y x✝ s✝ t✝ s'✝ t'✝ : R
⊢ (xgcdAux 0 s✝ t✝ x✝ s'✝ t'✝).1 = gcd 0 x✝
state_after: no goals

tactic: simp only [xgcdAux_rec h, if_neg h, IH]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x✝ y✝ x y : R
h : x ≠ 0
IH : ∀ (s t s' t' : R), (xgcdAux (y % x) s t x s' t').1 = gcd (y % x) x
s t s' t' : R
⊢ (xgcdAux x s t y s' t').1 = gcd x y
state_after: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x✝ y✝ x y : R
h : x ≠ 0
IH : ∀ (s t s' t' : R), (xgcdAux (y % x) s t x s' t').1 = gcd (y % x) x
s t s' t' : R
⊢ gcd (y % x) x = gcd x y

tactic: rw [← gcd_val]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x✝ y✝ x y : R
h : x ≠ 0
IH : ∀ (s t s' t' : R), (xgcdAux (y % x) s t x s' t').1 = gcd (y % x) x
s t s' t' : R
⊢ gcd (y % x) x = gcd x y
state_after: no goals
Theorem: Set.preimage_sub_const_Icc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [sub_eq_add_neg]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => x - a) ⁻¹' Icc b c = Icc (b + a) (c + a)
state_after: no goals
Theorem: Nat.factors_two
File: Mathlib/Data/Nat/Factors.lean

tactic: simp [factors]
state_before: ⊢ factors 2 = [2]
state_after: no goals
Theorem: CategoryTheory.Limits.initial.hom_ext
File: Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean

tactic: ext ⟨⟨⟩⟩
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : HasInitial C
P : C
f g : ⊥_ C ⟶ P
⊢ f = g
state_after: no goals
Theorem: Shrink.ext
File: Mathlib/Logic/Small/Defs.lean

tactic: simpa using w
state_before: α : Type v
inst✝ : Small.{w, v} α
x y : Shrink.{w, v} α
w : (equivShrink α).symm x = (equivShrink α).symm y
⊢ x = y
state_after: no goals
Theorem: Filter.HasBasis.filter_eq
File: Mathlib/Order/Filter/Bases.lean

tactic: ext U
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
h : l.HasBasis p s
⊢ ⋯.filter = l
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
h : l.HasBasis p s
U : Set α
⊢ U ∈ ⋯.filter ↔ U ∈ l

tactic: simp [h.mem_iff, IsBasis.mem_filter_iff]
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
h : l.HasBasis p s
U : Set α
⊢ U ∈ ⋯.filter ↔ U ∈ l
state_after: no goals
Theorem: Wbtw.oangle_sign_eq_of_ne_left
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

tactic: simpa [Set.insert_comm p₂] using h.collinear
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₄ : P
h : Wbtw ℝ p₁ p₂ p₃
hne : p₁ ≠ p₂
⊢ Collinear ℝ {p₁, p₂, p₁, p₃}
state_after: no goals
Theorem: Cardinal.mul_le_max_of_aleph0_le_left
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: convert mul_le_mul' (le_max_left a b) (le_max_right a b) using 1
state_before: a b : Cardinal.{u_1}
h : ℵ₀ ≤ a
⊢ a * b ≤ max a b
state_after: case h.e'_4
a b : Cardinal.{u_1}
h : ℵ₀ ≤ a
⊢ max a b = max a b * max a b

tactic: rw [mul_eq_self]
state_before: case h.e'_4
a b : Cardinal.{u_1}
h : ℵ₀ ≤ a
⊢ max a b = max a b * max a b
state_after: case h.e'_4
a b : Cardinal.{u_1}
h : ℵ₀ ≤ a
⊢ ℵ₀ ≤ max a b

tactic: exact h.trans (le_max_left a b)
state_before: case h.e'_4
a b : Cardinal.{u_1}
h : ℵ₀ ≤ a
⊢ ℵ₀ ≤ max a b
state_after: no goals
Theorem: minpoly.natSepDegree_eq_one_iff_eq_expand_X_sub_C
File: Mathlib/FieldTheory/SeparableDegree.lean

tactic: refine ⟨fun h ↦ ?_, fun ⟨n, y, h⟩ ↦ ?_⟩
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
q : ℕ
hF : ExpChar F q
x : E
⊢ (minpoly F x).natSepDegree = 1 ↔ ∃ n y, minpoly F x = (expand F (q ^ n)) (X - C y)
state_after: case refine_1
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
q : ℕ
hF : ExpChar F q
x : E
h : (minpoly F x).natSepDegree = 1
⊢ ∃ n y, minpoly F x = (expand F (q ^ n)) (X - C y)

case refine_2
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
q : ℕ
hF : ExpChar F q
x : E
x✝ : ∃ n y, minpoly F x = (expand F (q ^ n)) (X - C y)
n : ℕ
y : F
h : minpoly F x = (expand F (q ^ n)) (X - C y)
⊢ (minpoly F x).natSepDegree = 1

tactic: rw [h, natSepDegree_expand _ q, natSepDegree_X_sub_C]
state_before: case refine_2
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
q : ℕ
hF : ExpChar F q
x : E
x✝ : ∃ n y, minpoly F x = (expand F (q ^ n)) (X - C y)
n : ℕ
y : F
h : minpoly F x = (expand F (q ^ n)) (X - C y)
⊢ (minpoly F x).natSepDegree = 1
state_after: no goals

tactic: have halg : IsIntegral F x := by_contra fun h' ↦ by
  simp only [eq_zero h', natSepDegree_zero, zero_ne_one] at h
state_before: case refine_1
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
q : ℕ
hF : ExpChar F q
x : E
h : (minpoly F x).natSepDegree = 1
⊢ ∃ n y, minpoly F x = (expand F (q ^ n)) (X - C y)
state_after: case refine_1
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
q : ℕ
hF : ExpChar F q
x : E
h : (minpoly F x).natSepDegree = 1
halg : IsIntegral F x
⊢ ∃ n y, minpoly F x = (expand F (q ^ n)) (X - C y)

tactic: exact (minpoly.irreducible halg).natSepDegree_eq_one_iff_of_monic' q
  (minpoly.monic halg) |>.1 h
state_before: case refine_1
F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
q : ℕ
hF : ExpChar F q
x : E
h : (minpoly F x).natSepDegree = 1
halg : IsIntegral F x
⊢ ∃ n y, minpoly F x = (expand F (q ^ n)) (X - C y)
state_after: no goals

tactic: simp only [eq_zero h', natSepDegree_zero, zero_ne_one] at h
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
q : ℕ
hF : ExpChar F q
x : E
h : (minpoly F x).natSepDegree = 1
h' : ¬IsIntegral F x
⊢ False
state_after: no goals
Theorem: CategoryTheory.GrothendieckTopology.Subpresheaf.le_sheafify
File: Mathlib/CategoryTheory/Sites/Subsheaf.lean

tactic: intro U s hs
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
⊢ G ≤ sheafify J G
state_after: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ s ∈ (sheafify J G).obj U

tactic: change _ ∈ J _
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ s ∈ (sheafify J G).obj U
state_after: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ G.sieveOfSection s ∈ J.sieves U.unop

tactic: convert J.top_mem U.unop
state_before: C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ G.sieveOfSection s ∈ J.sieves U.unop
state_after: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ G.sieveOfSection s = ⊤

tactic: rw [eq_top_iff]
state_before: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ G.sieveOfSection s = ⊤
state_after: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ ⊤ ≤ G.sieveOfSection s

tactic: rintro V i -
state_before: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
⊢ ⊤ ≤ G.sieveOfSection s
state_after: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
V : C
i : V ⟶ U.unop
⊢ (G.sieveOfSection s).arrows i

tactic: exact G.map i.op hs
state_before: case h.e'_4
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
U : Cᵒᵖ
s : F.obj U
hs : s ∈ G.obj U
V : C
i : V ⟶ U.unop
⊢ (G.sieveOfSection s).arrows i
state_after: no goals
Theorem: Rat.divInt_nonneg_iff_of_pos_right
File: Mathlib/Algebra/Order/Ring/Rat.lean

tactic: cases' hab : a /. b with n d hd hnd
state_before: a✝ b✝ c p q : ℚ
a b : ℤ
hb : 0 < b
⊢ 0 ≤ a /. b ↔ 0 ≤ a
state_after: case mk'
a✝ b✝ c p q : ℚ
a b : ℤ
hb : 0 < b
n : ℤ
d : ℕ
hd : d ≠ 0
hnd : n.natAbs.Coprime d
hab : a /. b = { num := n, den := d, den_nz := hd, reduced := hnd }
⊢ 0 ≤ { num := n, den := d, den_nz := hd, reduced := hnd } ↔ 0 ≤ a

tactic: rw [mk'_eq_divInt, divInt_eq_iff hb.ne' (mod_cast hd)] at hab
state_before: case mk'
a✝ b✝ c p q : ℚ
a b : ℤ
hb : 0 < b
n : ℤ
d : ℕ
hd : d ≠ 0
hnd : n.natAbs.Coprime d
hab : a /. b = { num := n, den := d, den_nz := hd, reduced := hnd }
⊢ 0 ≤ { num := n, den := d, den_nz := hd, reduced := hnd } ↔ 0 ≤ a
state_after: case mk'
a✝ b✝ c p q : ℚ
a b : ℤ
hb : 0 < b
n : ℤ
d : ℕ
hd : d ≠ 0
hnd : n.natAbs.Coprime d
hab : a * ↑d = n * b
⊢ 0 ≤ { num := n, den := d, den_nz := hd, reduced := hnd } ↔ 0 ≤ a

tactic: rw [← num_nonneg, ← mul_nonneg_iff_of_pos_right hb, ← hab,
  mul_nonneg_iff_of_pos_right (mod_cast Nat.pos_of_ne_zero hd)]
state_before: case mk'
a✝ b✝ c p q : ℚ
a b : ℤ
hb : 0 < b
n : ℤ
d : ℕ
hd : d ≠ 0
hnd : n.natAbs.Coprime d
hab : a * ↑d = n * b
⊢ 0 ≤ { num := n, den := d, den_nz := hd, reduced := hnd } ↔ 0 ≤ a
state_after: no goals
Theorem: WittVector.ghostFun_zsmul
File: Mathlib/RingTheory/WittVector/Basic.lean

tactic: ghost_fun_tac m • (X 0), ![x.coeff]
state_before: p : ℕ
R : Type u_1
S : Type u_2
T : Type u_3
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type u_4
β : Type u_5
x✝ y : 𝕎 R
m : ℤ
x : 𝕎 R
⊢ WittVector.ghostFun (m • x) = m • WittVector.ghostFun x
state_after: no goals
Theorem: Subring.mem_sSup_of_directedOn
File: Mathlib/Algebra/Ring/Subring/Basic.lean

tactic: haveI : Nonempty S := Sne.to_subtype
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
S : Set (Subring R)
Sne : S.Nonempty
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
⊢ x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s
state_after: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
S : Set (Subring R)
Sne : S.Nonempty
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
this : Nonempty ↑S
⊢ x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

tactic: simp only [sSup_eq_iSup', mem_iSup_of_directed hS.directed_val, SetCoe.exists, Subtype.coe_mk,
  exists_prop]
state_before: R : Type u
S✝ : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S✝
inst✝ : Ring T
S : Set (Subring R)
Sne : S.Nonempty
hS : DirectedOn (fun x x_1 => x ≤ x_1) S
x : R
this : Nonempty ↑S
⊢ x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s
state_after: no goals
Theorem: Nat.isCoprime_iff_coprime
File: Mathlib/RingTheory/Coprime/Lemmas.lean

tactic: rw [Int.isCoprime_iff_gcd_eq_one, Int.gcd_natCast_natCast]
state_before: R : Type u
I : Type v
inst✝ : CommSemiring R
x y z : R
s : I → R
t : Finset I
m n : ℕ
⊢ IsCoprime ↑m ↑n ↔ m.Coprime n
state_after: no goals
Theorem: ProbabilityTheory.cond_toMeasurable_eq
File: Mathlib/Probability/ConditionalProbability.lean

tactic: unfold cond
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ : Measure Ω
s t : Set Ω
⊢ μ[|toMeasurable μ s] = μ[|s]
state_after: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ : Measure Ω
s t : Set Ω
⊢ (μ (toMeasurable μ s))⁻¹ • μ.restrict (toMeasurable μ s) = (μ s)⁻¹ • μ.restrict s

tactic: by_cases hnt : μ s = ∞
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ : Measure Ω
s t : Set Ω
⊢ (μ (toMeasurable μ s))⁻¹ • μ.restrict (toMeasurable μ s) = (μ s)⁻¹ • μ.restrict s
state_after: case pos
Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ : Measure Ω
s t : Set Ω
hnt : μ s = ⊤
⊢ (μ (toMeasurable μ s))⁻¹ • μ.restrict (toMeasurable μ s) = (μ s)⁻¹ • μ.restrict s

case neg
Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ : Measure Ω
s t : Set Ω
hnt : ¬μ s = ⊤
⊢ (μ (toMeasurable μ s))⁻¹ • μ.restrict (toMeasurable μ s) = (μ s)⁻¹ • μ.restrict s

tactic: simp [hnt]
state_before: case pos
Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ : Measure Ω
s t : Set Ω
hnt : μ s = ⊤
⊢ (μ (toMeasurable μ s))⁻¹ • μ.restrict (toMeasurable μ s) = (μ s)⁻¹ • μ.restrict s
state_after: no goals

tactic: simp [Measure.restrict_toMeasurable hnt]
state_before: case neg
Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ : Measure Ω
s t : Set Ω
hnt : ¬μ s = ⊤
⊢ (μ (toMeasurable μ s))⁻¹ • μ.restrict (toMeasurable μ s) = (μ s)⁻¹ • μ.restrict s
state_after: no goals