1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: ArithmeticFunction.natCoe_one
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: ext n
state_before: R : Type u_1
inst✝ : AddMonoidWithOne R
⊢ ↑1 = 1
state_after: case h
R : Type u_1
inst✝ : AddMonoidWithOne R
n : ℕ
⊢ ↑1 n = 1 n

tactic: simp [one_apply]
state_before: case h
R : Type u_1
inst✝ : AddMonoidWithOne R
n : ℕ
⊢ ↑1 n = 1 n
state_after: no goals
Theorem: Monoid.exponent_ne_zero
File: Mathlib/GroupTheory/Exponent.lean

tactic: rw [exponent]
state_before: G : Type u
inst✝ : Monoid G
⊢ exponent G ≠ 0 ↔ ExponentExists G
state_after: G : Type u
inst✝ : Monoid G
⊢ (if h : ExponentExists G then Nat.find h else 0) ≠ 0 ↔ ExponentExists G

tactic: split_ifs with h
state_before: G : Type u
inst✝ : Monoid G
⊢ (if h : ExponentExists G then Nat.find h else 0) ≠ 0 ↔ ExponentExists G
state_after: case pos
G : Type u
inst✝ : Monoid G
h : ExponentExists G
⊢ Nat.find h ≠ 0 ↔ ExponentExists G

case neg
G : Type u
inst✝ : Monoid G
h : ¬ExponentExists G
⊢ 0 ≠ 0 ↔ ExponentExists G

tactic: simp [h, @not_lt_zero' ℕ]
state_before: case pos
G : Type u
inst✝ : Monoid G
h : ExponentExists G
⊢ Nat.find h ≠ 0 ↔ ExponentExists G
state_after: no goals

tactic: tauto
state_before: case neg
G : Type u
inst✝ : Monoid G
h : ¬ExponentExists G
⊢ 0 ≠ 0 ↔ ExponentExists G
state_after: no goals
Theorem: IsPathConnected.image'
File: Mathlib/Topology/Connected/PathConnected.lean

tactic: rcases hF with ⟨x, x_in, hx⟩
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
hF : IsPathConnected F
f : X → Y
hf : ContinuousOn f F
⊢ IsPathConnected (f '' F)
state_after: case intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
f : X → Y
hf : ContinuousOn f F
x : X
x_in : x ∈ F
hx : ∀ {y : X}, y ∈ F → JoinedIn F x y
⊢ IsPathConnected (f '' F)

tactic: use f x, mem_image_of_mem f x_in
state_before: case intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
f : X → Y
hf : ContinuousOn f F
x : X
x_in : x ∈ F
hx : ∀ {y : X}, y ∈ F → JoinedIn F x y
⊢ IsPathConnected (f '' F)
state_after: case right
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
f : X → Y
hf : ContinuousOn f F
x : X
x_in : x ∈ F
hx : ∀ {y : X}, y ∈ F → JoinedIn F x y
⊢ ∀ {y : Y}, y ∈ f '' F → JoinedIn (f '' F) (f x) y

tactic: rintro _ ⟨y, y_in, rfl⟩
state_before: case right
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y z : X
ι : Type u_3
F : Set X
f : X → Y
hf : ContinuousOn f F
x : X
x_in : x ∈ F
hx : ∀ {y : X}, y ∈ F → JoinedIn F x y
⊢ ∀ {y : Y}, y ∈ f '' F → JoinedIn (f '' F) (f x) y
state_after: case right.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z : X
ι : Type u_3
F : Set X
f : X → Y
hf : ContinuousOn f F
x : X
x_in : x ∈ F
hx : ∀ {y : X}, y ∈ F → JoinedIn F x y
y : X
y_in : y ∈ F
⊢ JoinedIn (f '' F) (f x) (f y)

tactic: refine ⟨(hx y_in).somePath.map' ?_, fun t ↦ ⟨_, (hx y_in).somePath_mem t, rfl⟩⟩
state_before: case right.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z : X
ι : Type u_3
F : Set X
f : X → Y
hf : ContinuousOn f F
x : X
x_in : x ∈ F
hx : ∀ {y : X}, y ∈ F → JoinedIn F x y
y : X
y_in : y ∈ F
⊢ JoinedIn (f '' F) (f x) (f y)
state_after: case right.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z : X
ι : Type u_3
F : Set X
f : X → Y
hf : ContinuousOn f F
x : X
x_in : x ∈ F
hx : ∀ {y : X}, y ∈ F → JoinedIn F x y
y : X
y_in : y ∈ F
⊢ ContinuousOn f (range ⇑⋯.somePath)

tactic: exact hf.mono (range_subset_iff.2 (hx y_in).somePath_mem)
state_before: case right.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x✝ y✝ z : X
ι : Type u_3
F : Set X
f : X → Y
hf : ContinuousOn f F
x : X
x_in : x ∈ F
hx : ∀ {y : X}, y ∈ F → JoinedIn F x y
y : X
y_in : y ∈ F
⊢ ContinuousOn f (range ⇑⋯.somePath)
state_after: no goals
Theorem: Polynomial.natDegree_multiset_prod_le
File: Mathlib/Algebra/Polynomial/BigOperators.lean

tactic: simpa using natDegree_list_prod_le
state_before: R : Type u
ι : Type w
s : Finset ι
inst✝ : CommSemiring R
f : ι → R[X]
t : Multiset R[X]
⊢ ∀ (a : List R[X]), (prod ⟦a⟧).natDegree ≤ (Multiset.map natDegree ⟦a⟧).sum
state_after: no goals
Theorem: MeasureTheory.FinStronglyMeasurable.neg
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: refine ⟨fun n => -hf.approx n, fun n => ?_, fun x => (hf.tendsto_approx x).neg⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
m0 : MeasurableSpace α
μ : Measure α
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
hf : FinStronglyMeasurable f μ
⊢ FinStronglyMeasurable (-f) μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
m0 : MeasurableSpace α
μ : Measure α
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
hf : FinStronglyMeasurable f μ
n : ℕ
⊢ μ (support ↑((fun n => -hf.approx n) n)) < ⊤

tactic: suffices μ (Function.support fun x => -(hf.approx n) x) < ∞ by convert this
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
m0 : MeasurableSpace α
μ : Measure α
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
hf : FinStronglyMeasurable f μ
n : ℕ
⊢ μ (support ↑((fun n => -hf.approx n) n)) < ⊤
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
m0 : MeasurableSpace α
μ : Measure α
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
hf : FinStronglyMeasurable f μ
n : ℕ
⊢ μ (support fun x => -↑(hf.approx n) x) < ⊤

tactic: rw [Function.support_neg (hf.approx n)]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
m0 : MeasurableSpace α
μ : Measure α
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
hf : FinStronglyMeasurable f μ
n : ℕ
⊢ μ (support fun x => -↑(hf.approx n) x) < ⊤
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
m0 : MeasurableSpace α
μ : Measure α
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
hf : FinStronglyMeasurable f μ
n : ℕ
⊢ μ (support ↑(hf.approx n)) < ⊤

tactic: exact hf.fin_support_approx n
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
m0 : MeasurableSpace α
μ : Measure α
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
hf : FinStronglyMeasurable f μ
n : ℕ
⊢ μ (support ↑(hf.approx n)) < ⊤
state_after: no goals

tactic: convert this
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
m0 : MeasurableSpace α
μ : Measure α
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
hf : FinStronglyMeasurable f μ
n : ℕ
this : μ (support fun x => -↑(hf.approx n) x) < ⊤
⊢ μ (support ↑((fun n => -hf.approx n) n)) < ⊤
state_after: no goals
Theorem: MeasureTheory.Content.innerContent_comap
File: Mathlib/MeasureTheory/Measure/Content.lean

tactic: refine (Compacts.equiv f).surjective.iSup_congr _ fun K => iSup_congr_Prop image_subset_iff ?_
state_before: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
f : G ≃ₜ G
h : ∀ ⦃K : Compacts G⦄, (fun s => ↑(μ.toFun s)) (Compacts.map ⇑f ⋯ K) = (fun s => ↑(μ.toFun s)) K
U : Opens G
⊢ μ.innerContent ((Opens.comap f.toContinuousMap) U) = μ.innerContent U
state_after: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
f : G ≃ₜ G
h : ∀ ⦃K : Compacts G⦄, (fun s => ↑(μ.toFun s)) (Compacts.map ⇑f ⋯ K) = (fun s => ↑(μ.toFun s)) K
U : Opens G
K : Compacts G
⊢ ↑K ⊆ ↑((Opens.comap f.toContinuousMap) U) → (fun s => ↑(μ.toFun s)) ((Compacts.equiv f) K) = (fun s => ↑(μ.toFun s)) K

tactic: intro hK
state_before: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
f : G ≃ₜ G
h : ∀ ⦃K : Compacts G⦄, (fun s => ↑(μ.toFun s)) (Compacts.map ⇑f ⋯ K) = (fun s => ↑(μ.toFun s)) K
U : Opens G
K : Compacts G
⊢ ↑K ⊆ ↑((Opens.comap f.toContinuousMap) U) → (fun s => ↑(μ.toFun s)) ((Compacts.equiv f) K) = (fun s => ↑(μ.toFun s)) K
state_after: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
f : G ≃ₜ G
h : ∀ ⦃K : Compacts G⦄, (fun s => ↑(μ.toFun s)) (Compacts.map ⇑f ⋯ K) = (fun s => ↑(μ.toFun s)) K
U : Opens G
K : Compacts G
hK : ↑K ⊆ ↑((Opens.comap f.toContinuousMap) U)
⊢ (fun s => ↑(μ.toFun s)) ((Compacts.equiv f) K) = (fun s => ↑(μ.toFun s)) K

tactic: simp only [Equiv.coe_fn_mk, Subtype.mk_eq_mk, Compacts.equiv]
state_before: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
f : G ≃ₜ G
h : ∀ ⦃K : Compacts G⦄, (fun s => ↑(μ.toFun s)) (Compacts.map ⇑f ⋯ K) = (fun s => ↑(μ.toFun s)) K
U : Opens G
K : Compacts G
hK : ↑K ⊆ ↑((Opens.comap f.toContinuousMap) U)
⊢ (fun s => ↑(μ.toFun s)) ((Compacts.equiv f) K) = (fun s => ↑(μ.toFun s)) K
state_after: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
f : G ≃ₜ G
h : ∀ ⦃K : Compacts G⦄, (fun s => ↑(μ.toFun s)) (Compacts.map ⇑f ⋯ K) = (fun s => ↑(μ.toFun s)) K
U : Opens G
K : Compacts G
hK : ↑K ⊆ ↑((Opens.comap f.toContinuousMap) U)
⊢ ↑(μ.toFun (Compacts.map ⇑f ⋯ K)) = ↑(μ.toFun K)

tactic: apply h
state_before: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
f : G ≃ₜ G
h : ∀ ⦃K : Compacts G⦄, (fun s => ↑(μ.toFun s)) (Compacts.map ⇑f ⋯ K) = (fun s => ↑(μ.toFun s)) K
U : Opens G
K : Compacts G
hK : ↑K ⊆ ↑((Opens.comap f.toContinuousMap) U)
⊢ ↑(μ.toFun (Compacts.map ⇑f ⋯ K)) = ↑(μ.toFun K)
state_after: no goals
Theorem: JoinedIn.joined_subtype
File: Mathlib/Topology/Connected/PathConnected.lean

tactic: fun_prop
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : JoinedIn F x y
⊢ Continuous fun t => ⟨h.somePath t, ⋯⟩
state_after: no goals

tactic: simp
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : JoinedIn F x y
⊢ { toFun := fun t => ⟨h.somePath t, ⋯⟩, continuous_toFun := ⋯ }.toFun 0 = ⟨x, ⋯⟩
state_after: no goals

tactic: simp
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
h : JoinedIn F x y
⊢ { toFun := fun t => ⟨h.somePath t, ⋯⟩, continuous_toFun := ⋯ }.toFun 1 = ⟨y, ⋯⟩
state_after: no goals
Theorem: CategoryTheory.Sheaf.isLocallyInjective_sheafToPresheaf_map_iff
File: Mathlib/CategoryTheory/Sites/LocallyInjective.lean

tactic: rfl
state_before: C : Type u
inst✝² : Category.{v, u} C
D : Type u'
inst✝¹ : Category.{v', u'} D
inst✝ : ConcreteCategory D
J : GrothendieckTopology C
F₁ F₂ : Sheaf J D
φ : F₁ ⟶ F₂
⊢ Presheaf.IsLocallyInjective J ((sheafToPresheaf J D).map φ) ↔ IsLocallyInjective φ
state_after: no goals
Theorem: Set.toFinset_ssubset_univ
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [← coe_ssubset, coe_toFinset, coe_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s✝ t : Set α
inst✝¹ : Fintype α
s : Set α
inst✝ : Fintype ↑s
⊢ s.toFinset ⊂ Finset.univ ↔ s ⊂ univ
state_after: no goals
Theorem: Cubic.toPoly_eq_zero_iff
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: rw [← zero, toPoly_injective]
state_before: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P✝ Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
P : Cubic R
⊢ P.toPoly = 0 ↔ P = 0
state_after: no goals
Theorem: strictMono_mersenne
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: gcongr
state_before: m n : ℕ
h : m < n
⊢ 2 ^ m < 2 ^ n
state_after: case h
m n : ℕ
h : m < n
⊢ 1 < 2

tactic: norm_num1
state_before: case h
m n : ℕ
h : m < n
⊢ 1 < 2
state_after: no goals
Theorem: divp_eq_iff_mul_eq
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [divp_mul_cancel]
state_before: α : Type u
inst✝ : Monoid α
a b c x : α
u : αˣ
y : α
⊢ x /ₚ u * ↑u = y * ↑u ↔ y * ↑u = x
state_after: α : Type u
inst✝ : Monoid α
a b c x : α
u : αˣ
y : α
⊢ x = y * ↑u ↔ y * ↑u = x

tactic: exact ⟨Eq.symm, Eq.symm⟩
state_before: α : Type u
inst✝ : Monoid α
a b c x : α
u : αˣ
y : α
⊢ x = y * ↑u ↔ y * ↑u = x
state_after: no goals
Theorem: Mon_.one_mul_hom
File: Mathlib/CategoryTheory/Monoidal/Mon_.lean

tactic: rw [tensorHom_def'_assoc, M.one_mul, leftUnitor_naturality]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M : Mon_ C
Z : C
f : Z ⟶ M.X
⊢ (M.one ⊗ f) ≫ M.mul = (λ_ Z).hom ≫ f
state_after: no goals
Theorem: CategoryTheory.Functor.preservesZeroMorphisms_of_iso
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Zero.lean

tactic: simp only [← cancel_epi (e.hom.app X), ← e.hom.naturality,
F₁.map_zero, zero_comp, comp_zero]
state_before: C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
E : Type u₃
inst✝⁴ : Category.{v₃, u₃} E
inst✝³ : HasZeroMorphisms C
inst✝² : HasZeroMorphisms D
inst✝¹ : HasZeroMorphisms E
F₁ F₂ : C ⥤ D
inst✝ : F₁.PreservesZeroMorphisms
e : F₁ ≅ F₂
X Y : C
⊢ F₂.map 0 = 0
state_after: no goals
Theorem: CategoryTheory.Pretriangulated.Triangle.isZero₃_iff
File: Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean

tactic: refine (isZero₂_iff _ (rot_of_distTriang _ hT)).trans ?_
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ IsZero T.obj₃ ↔ T.mor₂ = 0 ∧ T.mor₃ = 0
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ T.rotate.mor₁ = 0 ∧ T.rotate.mor₂ = 0 ↔ T.mor₂ = 0 ∧ T.mor₃ = 0

tactic: dsimp
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ T.rotate.mor₁ = 0 ∧ T.rotate.mor₂ = 0 ↔ T.mor₂ = 0 ∧ T.mor₃ = 0
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ T.mor₂ = 0 ∧ T.mor₃ = 0 ↔ T.mor₂ = 0 ∧ T.mor₃ = 0

tactic: tauto
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ T.mor₂ = 0 ∧ T.mor₃ = 0 ↔ T.mor₂ = 0 ∧ T.mor₃ = 0
state_after: no goals
Theorem: RatFunc.denom_div_dvd
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: by_cases hq : q = 0
state_before: K : Type u
inst✝ : Field K
p q : K[X]
⊢ ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).denom ∣ q
state_after: case pos
K : Type u
inst✝ : Field K
p q : K[X]
hq : q = 0
⊢ ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).denom ∣ q

case neg
K : Type u
inst✝ : Field K
p q : K[X]
hq : ¬q = 0
⊢ ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).denom ∣ q

tactic: rw [denom_div _ hq, C_mul_dvd]
state_before: case neg
K : Type u
inst✝ : Field K
p q : K[X]
hq : ¬q = 0
⊢ ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).denom ∣ q
state_after: case neg
K : Type u
inst✝ : Field K
p q : K[X]
hq : ¬q = 0
⊢ q / gcd p q ∣ q

case neg
K : Type u
inst✝ : Field K
p q : K[X]
hq : ¬q = 0
⊢ (q / gcd p q).leadingCoeff⁻¹ ≠ 0

tactic: simp [hq]
state_before: case pos
K : Type u
inst✝ : Field K
p q : K[X]
hq : q = 0
⊢ ((algebraMap K[X] (RatFunc K)) p / (algebraMap K[X] (RatFunc K)) q).denom ∣ q
state_after: no goals

tactic: exact EuclideanDomain.div_dvd_of_dvd (gcd_dvd_right p q)
state_before: case neg
K : Type u
inst✝ : Field K
p q : K[X]
hq : ¬q = 0
⊢ q / gcd p q ∣ q
state_after: no goals

tactic: simpa only [Ne, inv_eq_zero, Polynomial.leadingCoeff_eq_zero] using right_div_gcd_ne_zero hq
state_before: case neg
K : Type u
inst✝ : Field K
p q : K[X]
hq : ¬q = 0
⊢ (q / gcd p q).leadingCoeff⁻¹ ≠ 0
state_after: no goals
Theorem: MeasureTheory.restrict_dirac
File: Mathlib/MeasureTheory/Measure/Dirac.lean

tactic: split_ifs with has
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
a : α
inst✝¹ : MeasurableSingletonClass α
inst✝ : Decidable (a ∈ s)
⊢ (dirac a).restrict s = if a ∈ s then dirac a else 0
state_after: case pos
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
a : α
inst✝¹ : MeasurableSingletonClass α
inst✝ : Decidable (a ∈ s)
has : a ∈ s
⊢ (dirac a).restrict s = dirac a

case neg
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
a : α
inst✝¹ : MeasurableSingletonClass α
inst✝ : Decidable (a ∈ s)
has : a ∉ s
⊢ (dirac a).restrict s = 0

tactic: apply restrict_eq_self_of_ae_mem
state_before: case pos
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
a : α
inst✝¹ : MeasurableSingletonClass α
inst✝ : Decidable (a ∈ s)
has : a ∈ s
⊢ (dirac a).restrict s = dirac a
state_after: case pos.hs
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
a : α
inst✝¹ : MeasurableSingletonClass α
inst✝ : Decidable (a ∈ s)
has : a ∈ s
⊢ ∀ᵐ (x : α) ∂dirac a, x ∈ s

tactic: rwa [ae_dirac_eq]
state_before: case pos.hs
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
a : α
inst✝¹ : MeasurableSingletonClass α
inst✝ : Decidable (a ∈ s)
has : a ∈ s
⊢ ∀ᵐ (x : α) ∂dirac a, x ∈ s
state_after: no goals

tactic: rw [restrict_eq_zero, dirac_apply, indicator_of_not_mem has]
state_before: case neg
α : Type u_1
β : Type u_2
δ : Type u_3
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s : Set α
a : α
inst✝¹ : MeasurableSingletonClass α
inst✝ : Decidable (a ∈ s)
has : a ∉ s
⊢ (dirac a).restrict s = 0
state_after: no goals
Theorem: Cardinal.nfp_lt_ord_of_isRegular
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rw [hc.cof_eq]
state_before: α : Type u_1
r : α → α → Prop
f : Ordinal.{u_2} → Ordinal.{u_2}
c : Cardinal.{u_2}
hc : c.IsRegular
hc' : c ≠ ℵ₀
hf : ∀ i < c.ord, f i < c.ord
a : Ordinal.{u_2}
⊢ ℵ₀ < c.ord.cof
state_after: α : Type u_1
r : α → α → Prop
f : Ordinal.{u_2} → Ordinal.{u_2}
c : Cardinal.{u_2}
hc : c.IsRegular
hc' : c ≠ ℵ₀
hf : ∀ i < c.ord, f i < c.ord
a : Ordinal.{u_2}
⊢ ℵ₀ < c

tactic: exact lt_of_le_of_ne hc.1 hc'.symm
state_before: α : Type u_1
r : α → α → Prop
f : Ordinal.{u_2} → Ordinal.{u_2}
c : Cardinal.{u_2}
hc : c.IsRegular
hc' : c ≠ ℵ₀
hf : ∀ i < c.ord, f i < c.ord
a : Ordinal.{u_2}
⊢ ℵ₀ < c
state_after: no goals
Theorem: Ordinal.cof_zero
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: refine LE.le.antisymm  ?_ (Cardinal.zero_le _)
state_before: α : Type u_1
r : α → α → Prop
⊢ cof 0 = 0
state_after: α : Type u_1
r : α → α → Prop
⊢ cof 0 ≤ 0

tactic: rw [← card_zero]
state_before: α : Type u_1
r : α → α → Prop
⊢ cof 0 ≤ 0
state_after: α : Type u_1
r : α → α → Prop
⊢ cof 0 ≤ card 0

tactic: exact cof_le_card 0
state_before: α : Type u_1
r : α → α → Prop
⊢ cof 0 ≤ card 0
state_after: no goals
Theorem: CochainComplex.mappingCone.ext_to
File: Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean

tactic: simpa [snd] using h₂
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
i j : ℤ
hij : i + 1 = j
A : C
f g : A ⟶ (mappingCone φ).X i
h₁ : f ≫ (↑(fst φ)).v i j hij = g ≫ (↑(fst φ)).v i j hij
h₂ : f ≫ (snd φ).v i i ⋯ = g ≫ (snd φ).v i i ⋯
⊢ f ≫ homotopyCofiber.sndX φ i = g ≫ homotopyCofiber.sndX φ i
state_after: no goals
Theorem: disjoint_nhdsWithin_of_mem_discrete
File: Mathlib/Topology/Separation.lean

tactic: rw [inter_assoc, h', compl_inter_self]
state_before: X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
s : Set X
inst✝ : DiscreteTopology ↑s
x : X
hx : x ∈ s
V : Set X
h : V ∈ 𝓝 x
h' : V ∩ s = {x}
⊢ {x}ᶜ ∩ V ∩ s = ∅
state_after: no goals
Theorem: Stream'.cons_injective2
File: Mathlib/Data/Stream/Init.lean

tactic: rw [← get_zero_cons x s, h, get_zero_cons]
state_before: α : Type u
β : Type v
δ : Type w
x y : α
s t : Stream' α
h : x :: s = y :: t
⊢ x = y
state_after: no goals

tactic: rw [← get_succ_cons n _ x, h, get_succ_cons]
state_before: α : Type u
β : Type v
δ : Type w
x y : α
s t : Stream' α
h : x :: s = y :: t
n : ℕ
⊢ s.get n = t.get n
state_after: no goals
Theorem: TypeVec.eq_of_drop_last_eq
File: Mathlib/Data/TypeVec.lean

tactic: refine funext (fun x => ?_)
state_before: n : ℕ
α : TypeVec.{u_1} (n + 1)
β : TypeVec.{u_2} (n + 1)
f g : α ⟹ β
h₀ : dropFun f = dropFun g
h₁ : lastFun f = lastFun g
⊢ f = g
state_after: n : ℕ
α : TypeVec.{u_1} (n + 1)
β : TypeVec.{u_2} (n + 1)
f g : α ⟹ β
h₀ : dropFun f = dropFun g
h₁ : lastFun f = lastFun g
x : Fin2 (n + 1)
⊢ f x = g x

tactic: cases x
state_before: n : ℕ
α : TypeVec.{u_1} (n + 1)
β : TypeVec.{u_2} (n + 1)
f g : α ⟹ β
h₀ : dropFun f = dropFun g
h₁ : lastFun f = lastFun g
x : Fin2 (n + 1)
⊢ f x = g x
state_after: case fz
n : ℕ
α : TypeVec.{u_1} (n + 1)
β : TypeVec.{u_2} (n + 1)
f g : α ⟹ β
h₀ : dropFun f = dropFun g
h₁ : lastFun f = lastFun g
⊢ f Fin2.fz = g Fin2.fz

case fs
n : ℕ
α : TypeVec.{u_1} (n + 1)
β : TypeVec.{u_2} (n + 1)
f g : α ⟹ β
h₀ : dropFun f = dropFun g
h₁ : lastFun f = lastFun g
a✝ : Fin2 n
⊢ f a✝.fs = g a✝.fs

tactic: apply h₁
state_before: case fz
n : ℕ
α : TypeVec.{u_1} (n + 1)
β : TypeVec.{u_2} (n + 1)
f g : α ⟹ β
h₀ : dropFun f = dropFun g
h₁ : lastFun f = lastFun g
⊢ f Fin2.fz = g Fin2.fz
state_after: no goals

tactic: apply congr_fun h₀
state_before: case fs
n : ℕ
α : TypeVec.{u_1} (n + 1)
β : TypeVec.{u_2} (n + 1)
f g : α ⟹ β
h₀ : dropFun f = dropFun g
h₁ : lastFun f = lastFun g
a✝ : Fin2 n
⊢ f a✝.fs = g a✝.fs
state_after: no goals