1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: one_le_div
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [le_div_iff hb, one_mul]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 < b
⊢ 1 ≤ a / b ↔ b ≤ a
state_after: no goals
Theorem: ClassGroup.integralRep_mem_nonZeroDivisors
File: Mathlib/RingTheory/ClassGroup.lean

tactic: rwa [mem_nonZeroDivisors_iff_ne_zero, ne_eq, FractionalIdeal.num_eq_zero_iff]
state_before: R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : DecidableEq L
inst✝⁶ : Algebra R K
inst✝⁵ : IsFractionRing R K
inst✝⁴ : Algebra K L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra R L
inst✝¹ : IsScalarTower R K L
inst✝ : IsDomain R
I : FractionalIdeal R⁰ (FractionRing R)
hI : I ≠ 0
⊢ I.num ∈ (Ideal R)⁰
state_after: no goals
Theorem: Nat.totient_mul_of_prime_of_not_dvd
File: Mathlib/Data/Nat/Totient.lean

tactic: rw [totient_mul _, totient_prime hp]
state_before: p n : ℕ
hp : Prime p
h : ¬p ∣ n
⊢ φ (p * n) = (p - 1) * φ n
state_after: p n : ℕ
hp : Prime p
h : ¬p ∣ n
⊢ p.Coprime n

tactic: simpa [h] using coprime_or_dvd_of_prime hp n
state_before: p n : ℕ
hp : Prime p
h : ¬p ∣ n
⊢ p.Coprime n
state_after: no goals
Theorem: RatFunc.denom_algebraMap
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: convert denom_div p one_ne_zero <;> simp
state_before: K : Type u
inst✝ : Field K
p : K[X]
⊢ ((algebraMap K[X] (RatFunc K)) p).denom = 1
state_after: no goals
Theorem: Mathlib.Tactic.LinearCombination.eq_of_add
File: Mathlib/Tactic/LinearCombination.lean

tactic: rw [← sub_eq_zero] at p ⊢
state_before: α : Type u_1
a b a' b' : α
inst✝ : AddGroup α
p : a = b
H : a' - b' - (a - b) = 0
⊢ a' = b'
state_after: α : Type u_1
a b a' b' : α
inst✝ : AddGroup α
p : a - b = 0
H : a' - b' - (a - b) = 0
⊢ a' - b' = 0

tactic: rwa [sub_eq_zero, p] at H
state_before: α : Type u_1
a b a' b' : α
inst✝ : AddGroup α
p : a - b = 0
H : a' - b' - (a - b) = 0
⊢ a' - b' = 0
state_after: no goals
Theorem: RingHom.charP_iff_charP
File: Mathlib/Algebra/CharP/Defs.lean

tactic: simp only [charP_iff, ← f.injective.eq_iff, map_natCast f, map_zero f]
state_before: R : Type u_1
K : Type u_2
L : Type u_3
inst✝² : DivisionRing K
inst✝¹ : Semiring L
inst✝ : Nontrivial L
f : K →+* L
p : ℕ
⊢ CharP K p ↔ CharP L p
state_after: no goals
Theorem: Ordinal.pred_eq_iff_not_succ'
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simpa using pred_eq_iff_not_succ
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{u_4}
⊢ o.pred = o ↔ ∀ (a : Ordinal.{u_4}), o ≠ succ a
state_after: no goals
Theorem: Nat.add_choose_mul_factorial_mul_factorial
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: rw [← choose_mul_factorial_mul_factorial (Nat.le_add_left _ _), Nat.add_sub_cancel_right,
  Nat.mul_right_comm]
state_before: i j : ℕ
⊢ (i + j).choose j * i ! * j ! = (i + j)!
state_after: no goals
Theorem: Multipliable.of_inv
File: Mathlib/Topology/Algebra/InfiniteSum/Group.lean

tactic: simpa only [inv_inv] using hf.inv
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : CommGroup α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalGroup α
f g : β → α
a a₁ a₂ : α
hf : Multipliable fun b => (f b)⁻¹
⊢ Multipliable f
state_after: no goals
Theorem: ENNReal.smul_toNNReal
File: Mathlib/Data/ENNReal/Real.lean

tactic: change ((a : ℝ≥0∞) * b).toNNReal = a * b.toNNReal
state_before: a✝ b✝ c d : ℝ≥0∞
r p q a : ℝ≥0
b : ℝ≥0∞
⊢ (a • b).toNNReal = a * b.toNNReal
state_after: a✝ b✝ c d : ℝ≥0∞
r p q a : ℝ≥0
b : ℝ≥0∞
⊢ (↑a * b).toNNReal = a * b.toNNReal

tactic: simp only [ENNReal.toNNReal_mul, ENNReal.toNNReal_coe]
state_before: a✝ b✝ c d : ℝ≥0∞
r p q a : ℝ≥0
b : ℝ≥0∞
⊢ (↑a * b).toNNReal = a * b.toNNReal
state_after: no goals
Theorem: IsAtom.le_iff
File: Mathlib/Order/Atoms.lean

tactic: rw [le_iff_lt_or_eq, h.lt_iff]
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
a b x : α
h : IsAtom a
⊢ x ≤ a ↔ x = ⊥ ∨ x = a
state_after: no goals
Theorem: SimpleGraph.TripartiteFromTriangles.cliqueFinset_eq_map
File: Mathlib/Combinatorics/SimpleGraph/Triangle/Tripartite.lean

tactic: simp [cliqueFinset_eq_image, map_eq_image]
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 : α × β × γ
ε : 𝕜
inst✝⁶ : DecidableEq α
inst✝⁵ : DecidableEq β
inst✝⁴ : DecidableEq γ
inst✝³ : Fintype α
inst✝² : Fintype β
inst✝¹ : Fintype γ
inst✝ : NoAccidental t
⊢ (graph t).cliqueFinset 3 = map toTriangle t
state_after: no goals
Theorem: ConvexOn.map_integral_le
File: Mathlib/Analysis/Convex/Integral.lean

tactic: simpa only [average_eq_integral] using hg.map_average_le hgc hsc hfs hfi hgi
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : CompleteSpace E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
μ : Measure α
s : Set E
t : Set α
f : α → E
g : E → ℝ
C : ℝ
inst✝ : IsProbabilityMeasure μ
hg : ConvexOn ℝ s g
hgc : ContinuousOn g s
hsc : IsClosed s
hfs : ∀ᵐ (x : α) ∂μ, f x ∈ s
hfi : Integrable f μ
hgi : Integrable (g ∘ f) μ
⊢ g (∫ (x : α), f x ∂μ) ≤ ∫ (x : α), g (f x) ∂μ
state_after: no goals
Theorem: Polynomial.monic_of_isUnit_leadingCoeff_inv_smul
File: Mathlib/Algebra/Polynomial/Monic.lean

tactic: rw [Monic.def, leadingCoeff_smul_of_smul_regular _ (isSMulRegular_of_group _), Units.smul_def]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
⊢ (h.unit⁻¹ • p).Monic
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
⊢ ↑h.unit⁻¹ • p.leadingCoeff = 1

tactic: obtain ⟨k, hk⟩ := h
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit p.leadingCoeff
⊢ ↑h.unit⁻¹ • p.leadingCoeff = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
k : Rˣ
hk : ↑k = p.leadingCoeff
⊢ ↑(IsUnit.unit ⋯)⁻¹ • p.leadingCoeff = 1

tactic: simp only [← hk, smul_eq_mul, ← Units.val_mul, Units.val_eq_one, inv_mul_eq_iff_eq_mul]
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
k : Rˣ
hk : ↑k = p.leadingCoeff
⊢ ↑(IsUnit.unit ⋯)⁻¹ • p.leadingCoeff = 1
state_after: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
k : Rˣ
hk : ↑k = p.leadingCoeff
⊢ k = ⋯.unit * 1

tactic: simp [Units.ext_iff, IsUnit.unit_spec]
state_before: case intro
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
k : Rˣ
hk : ↑k = p.leadingCoeff
⊢ k = ⋯.unit * 1
state_after: no goals
Theorem: PartENat.dom_of_le_natCast
File: Mathlib/Data/Nat/PartENat.lean

tactic: exact dom_of_le_some h
state_before: x : PartENat
y : ℕ
h : x ≤ ↑y
⊢ x.Dom
state_after: no goals
Theorem: MeasureTheory.average_eq_integral
File: Mathlib/MeasureTheory/Integral/Average.lean

tactic: rw [average, measure_univ, inv_one, one_smul]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : CompleteSpace E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
μ ν : Measure α
s t : Set α
f✝ g : α → E
inst✝ : IsProbabilityMeasure μ
f : α → E
⊢ ⨍ (x : α), f x ∂μ = ∫ (x : α), f x ∂μ
state_after: no goals
Theorem: Submodule.FG.map
File: Mathlib/RingTheory/Finiteness.lean

tactic: rw [span_image, ht.2]
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
P : Type u_3
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
f : M →ₗ[R] P
N : Submodule R M
hs : N.FG
t : Set M
ht : t.Finite ∧ span R t = N
⊢ span R (⇑f '' t) = Submodule.map f N
state_after: no goals
Theorem: dist_right_midpoint
File: Mathlib/Analysis/NormedSpace/AddTorsor.lean

tactic: rw [dist_comm, dist_midpoint_right]
state_before: α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁹ : SeminormedAddCommGroup V
inst✝⁸ : PseudoMetricSpace P
inst✝⁷ : NormedAddTorsor V P
inst✝⁶ : NormedAddCommGroup W
inst✝⁵ : MetricSpace Q
inst✝⁴ : NormedAddTorsor W Q
𝕜 : Type u_6
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedSpace 𝕜 W
inst✝ : Invertible 2
p₁ p₂ : P
⊢ dist p₂ (midpoint 𝕜 p₁ p₂) = ‖2‖⁻¹ * dist p₁ p₂
state_after: no goals
Theorem: RingHom.map_adjugate
File: Mathlib/LinearAlgebra/Matrix/Adjugate.lean

tactic: ext i k
state_before: m : Type u
n : Type v
α : Type w
inst✝⁶ : DecidableEq n
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : CommRing α
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
⊢ f.mapMatrix M.adjugate = (f.mapMatrix M).adjugate
state_after: case a
m : Type u
n : Type v
α : Type w
inst✝⁶ : DecidableEq n
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : CommRing α
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
i k : n
⊢ f.mapMatrix M.adjugate i k = (f.mapMatrix M).adjugate i k

tactic: have : Pi.single i (1 : S) = f ∘ Pi.single i 1 := by
  rw [← f.map_one]
  exact Pi.single_op (fun _ => f) (fun _ => f.map_zero) i (1 : R)
state_before: case a
m : Type u
n : Type v
α : Type w
inst✝⁶ : DecidableEq n
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : CommRing α
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
i k : n
⊢ f.mapMatrix M.adjugate i k = (f.mapMatrix M).adjugate i k
state_after: case a
m : Type u
n : Type v
α : Type w
inst✝⁶ : DecidableEq n
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : CommRing α
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
i k : n
this : Pi.single i 1 = ⇑f ∘ Pi.single i 1
⊢ f.mapMatrix M.adjugate i k = (f.mapMatrix M).adjugate i k

tactic: rw [adjugate_apply, RingHom.mapMatrix_apply, map_apply, RingHom.mapMatrix_apply, this, ←
  map_updateRow, ← RingHom.mapMatrix_apply, ← RingHom.map_det, ← adjugate_apply]
state_before: case a
m : Type u
n : Type v
α : Type w
inst✝⁶ : DecidableEq n
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : CommRing α
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
i k : n
this : Pi.single i 1 = ⇑f ∘ Pi.single i 1
⊢ f.mapMatrix M.adjugate i k = (f.mapMatrix M).adjugate i k
state_after: no goals

tactic: rw [← f.map_one]
state_before: m : Type u
n : Type v
α : Type w
inst✝⁶ : DecidableEq n
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : CommRing α
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
i k : n
⊢ Pi.single i 1 = ⇑f ∘ Pi.single i 1
state_after: m : Type u
n : Type v
α : Type w
inst✝⁶ : DecidableEq n
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : CommRing α
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
i k : n
⊢ Pi.single i (f 1) = ⇑f ∘ Pi.single i 1

tactic: exact Pi.single_op (fun _ => f) (fun _ => f.map_zero) i (1 : R)
state_before: m : Type u
n : Type v
α : Type w
inst✝⁶ : DecidableEq n
inst✝⁵ : Fintype n
inst✝⁴ : DecidableEq m
inst✝³ : Fintype m
inst✝² : CommRing α
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
i k : n
⊢ Pi.single i (f 1) = ⇑f ∘ Pi.single i 1
state_after: no goals
Theorem: Batteries.UnionFind.find_root_2
File: .lake/packages/batteries/Batteries/Data/UnionFind/Basic.lean

tactic: simp [find, findAux_root, rootD]
state_before: self : UnionFind
x : Fin self.size
⊢ ↑(self.find x).snd.val = self.rootD ↑x
state_after: no goals
Theorem: Subgroup.normal_mul
File: Mathlib/Algebra/Group/Subgroup/Pointwise.lean

tactic: rw [← set_mul_normal_comm, sup_comm, mul_normal]
state_before: α : Type u_1
G : Type u_2
A : Type u_3
S : Type u_4
inst✝² : Group G
inst✝¹ : AddGroup A
s : Set G
N H : Subgroup G
inst✝ : N.Normal
⊢ ↑(N ⊔ H) = ↑N * ↑H
state_after: no goals
Theorem: MulAction.Quotient.mk_smul_out'
File: Mathlib/GroupTheory/GroupAction/Quotient.lean

tactic: rw [← Quotient.smul_mk, QuotientGroup.out_eq']
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : Group α
inst✝² : Monoid β
inst✝¹ : MulAction β α
H : Subgroup α
inst✝ : QuotientAction β H
b : β
q : α ⧸ H
⊢ ↑(b • Quotient.out' q) = b • q
state_after: no goals
Theorem: antitone_of_hasDerivAt_nonpos
File: Mathlib/Analysis/Calculus/MeanValue.lean

tactic: rw [(hf _).deriv]
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f f' : ℝ → ℝ
hf : ∀ (x : ℝ), HasDerivAt f (f' x) x
hf' : f' ≤ 0
x : ℝ
⊢ deriv f x ≤ 0
state_after: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f f' : ℝ → ℝ
hf : ∀ (x : ℝ), HasDerivAt f (f' x) x
hf' : f' ≤ 0
x : ℝ
⊢ f' x ≤ 0

tactic: exact hf' _
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f f' : ℝ → ℝ
hf : ∀ (x : ℝ), HasDerivAt f (f' x) x
hf' : f' ≤ 0
x : ℝ
⊢ f' x ≤ 0
state_after: no goals
Theorem: Mathlib.Tactic.Ring.inv_add
File: Mathlib/Tactic/Ring/Basic.lean

tactic: subst_vars
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₁ : ℕ
b₁ : R
a₂ : ℕ
b₂ : R
x✝¹ : ↑a₁ = b₁
x✝ : ↑a₂ = b₂
⊢ ↑(a₁ + a₂) = b₁ + b₂
state_after: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₁ a₂ : ℕ
⊢ ↑(a₁ + a₂) = ↑a₁ + ↑a₂

tactic: simp
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₁ a₂ : ℕ
⊢ ↑(a₁ + a₂) = ↑a₁ + ↑a₂
state_after: no goals
Theorem: MeasureTheory.lintegral_rpow_nnnorm_lt_top_of_snorm'_lt_top
File: Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean

tactic: rw [lintegral_rpow_nnnorm_eq_rpow_snorm' hq0_lt]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
hfq : snorm' f q μ < ⊤
⊢ ∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ < ⊤
state_after: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
hfq : snorm' f q μ < ⊤
⊢ snorm' f q μ ^ q < ⊤

tactic: exact ENNReal.rpow_lt_top_of_nonneg (le_of_lt hq0_lt) (ne_of_lt hfq)
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
hfq : snorm' f q μ < ⊤
⊢ snorm' f q μ ^ q < ⊤
state_after: no goals
Theorem: ZMod.cast_mul
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n : ℕ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ n
a b : ZMod n
⊢ (a * b).cast = a.cast * b.cast
state_after: case zero
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ 0
a b : ZMod 0
⊢ (a * b).cast = a.cast * b.cast

case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ (a * b).cast = a.cast * b.cast

tactic: symm
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ (a * b).cast = a.cast * b.cast
state_after: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ a.cast * b.cast = (a * b).cast

tactic: dsimp [ZMod, ZMod.cast]
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ a.cast * b.cast = (a * b).cast
state_after: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ ↑a.val * ↑b.val = ↑(val (a * b))

tactic: erw [← Nat.cast_mul, ← sub_eq_zero, ← Nat.cast_sub (Nat.mod_le _ _),
  @CharP.cast_eq_zero_iff R _ m]
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ ↑a.val * ↑b.val = ↑(val (a * b))
state_after: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ m ∣ a.val * b.val - a.val * b.val % n✝.succ

tactic: exact h.trans (Nat.dvd_sub_mod _)
state_before: case succ
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
n✝ : ℕ
h : m ∣ n✝ + 1
a b : ZMod (n✝ + 1)
⊢ m ∣ a.val * b.val - a.val * b.val % n✝.succ
state_after: no goals

tactic: apply Int.cast_mul
state_before: case zero
R : Type u_1
inst✝¹ : Ring R
m : ℕ
inst✝ : CharP R m
h : m ∣ 0
a b : ZMod 0
⊢ (a * b).cast = a.cast * b.cast
state_after: no goals
Theorem: Set.subset_pair_iff
File: Mathlib/Data/Set/Basic.lean

tactic: simp [subset_def]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
⊢ s ⊆ {a, b} ↔ ∀ x ∈ s, x = a ∨ x = b
state_after: no goals
Theorem: CategoryTheory.MorphismProperty.LeftFraction.map_comp_map_s
File: Mathlib/CategoryTheory/Localization/CalculusOfFractions.lean

tactic: letI := hL _ φ.hs
state_before: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
W : MorphismProperty C
X Y : C
φ : W.LeftFraction X Y
L : C ⥤ D
hL : W.IsInvertedBy L
⊢ φ.map L hL ≫ L.map φ.s = L.map φ.f
state_after: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
W : MorphismProperty C
X Y : C
φ : W.LeftFraction X Y
L : C ⥤ D
hL : W.IsInvertedBy L
this : IsIso (L.map φ.s) := hL φ.s φ.hs
⊢ φ.map L hL ≫ L.map φ.s = L.map φ.f

tactic: simp [map]
state_before: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
W : MorphismProperty C
X Y : C
φ : W.LeftFraction X Y
L : C ⥤ D
hL : W.IsInvertedBy L
this : IsIso (L.map φ.s) := hL φ.s φ.hs
⊢ φ.map L hL ≫ L.map φ.s = L.map φ.f
state_after: no goals
Theorem: NNReal.coe_le_one
File: Mathlib/Data/NNReal/Basic.lean

tactic: rw [← coe_le_coe, coe_one]
state_before: r r₁ r₂ : ℝ≥0
x y : ℝ
⊢ ↑r ≤ 1 ↔ r ≤ 1
state_after: no goals
Theorem: Finset.prod_X_add_C_coeff
File: Mathlib/RingTheory/Polynomial/Vieta.lean

tactic: rw [Finset.prod, prod_X_add_C_coeff' _ r h, Finset.esymm_map_val]
state_before: R : Type u_1
inst✝ : CommSemiring R
σ : Type u_2
s : Finset σ
r : σ → R
k : ℕ
h : k ≤ s.card
⊢ (∏ i ∈ s, (X + C (r i))).coeff k = ∑ t ∈ Finset.powersetCard (s.card - k) s, ∏ i ∈ t, r i
state_after: R : Type u_1
inst✝ : CommSemiring R
σ : Type u_2
s : Finset σ
r : σ → R
k : ℕ
h : k ≤ s.card
⊢ ∑ t ∈ Finset.powersetCard (card s.val - k) s, t.prod r = ∑ t ∈ Finset.powersetCard (s.card - k) s, ∏ i ∈ t, r i

tactic: rfl
state_before: R : Type u_1
inst✝ : CommSemiring R
σ : Type u_2
s : Finset σ
r : σ → R
k : ℕ
h : k ≤ s.card
⊢ ∑ t ∈ Finset.powersetCard (card s.val - k) s, t.prod r = ∑ t ∈ Finset.powersetCard (s.card - k) s, ∏ i ∈ t, r i
state_after: no goals
Theorem: HasFDerivAtFilter.const_sub
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

tactic: simpa only [sub_eq_add_neg] using hf.neg.const_add c
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
hf : HasFDerivAtFilter f f' x L
c : F
⊢ HasFDerivAtFilter (fun x => c - f x) (-f') x L
state_after: no goals
Theorem: Stream'.get?_take
File: Mathlib/Data/Stream/Init.lean

tactic: rw [take_succ, List.get?, get?_take (Nat.lt_of_succ_lt_succ h), get_succ]
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
k n : ℕ
h : k + 1 < n + 1
⊢ (take (n + 1) s).get? (k + 1) = some (s.get (k + 1))
state_after: no goals
Theorem: Multiset.mem_singleton_self
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [← cons_zero]
state_before: α : Type u_1
β : Type v
γ : Type u_2
a : α
⊢ a ∈ {a}
state_after: α : Type u_1
β : Type v
γ : Type u_2
a : α
⊢ a ∈ a ::ₘ 0

tactic: exact mem_cons_self _ _
state_before: α : Type u_1
β : Type v
γ : Type u_2
a : α
⊢ a ∈ a ::ₘ 0
state_after: no goals
Theorem: Set.one_lt_ncard
File: Mathlib/Data/Set/Card.lean

tactic: simp_rw [ncard_eq_toFinset_card _ hs, Finset.one_lt_card, Finite.mem_toFinset]
state_before: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hs : autoParam s.Finite _auto✝
⊢ 1 < s.ncard ↔ ∃ a ∈ s, ∃ b ∈ s, a ≠ b
state_after: no goals
Theorem: gc_nhds
File: Mathlib/Topology/Order.lean

tactic: rw [le_nhds_iff]
state_before: α : Type u
β : Type v
a : α
f : Filter α
t : TopologicalSpace α
⊢ nhdsAdjoint a f ≤ t ↔ f ≤ (fun t => 𝓝 a) t
state_after: α : Type u
β : Type v
a : α
f : Filter α
t : TopologicalSpace α
⊢ nhdsAdjoint a f ≤ t ↔ ∀ (s : Set α), a ∈ s → IsOpen s → s ∈ f

tactic: exact ⟨fun H s hs has => H _ has hs, fun H s has hs => H _ hs has⟩
state_before: α : Type u
β : Type v
a : α
f : Filter α
t : TopologicalSpace α
⊢ nhdsAdjoint a f ≤ t ↔ ∀ (s : Set α), a ∈ s → IsOpen s → s ∈ f
state_after: no goals
Theorem: SimpleGraph.Walk.IsTrail.of_append_right
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rw [isTrail_def, edges_append, List.nodup_append] at h
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w✝ x y u v w : V
p : G.Walk u v
q : G.Walk v w
h : (p.append q).IsTrail
⊢ q.IsTrail
state_after: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w✝ x y u v w : V
p : G.Walk u v
q : G.Walk v w
h : p.edges.Nodup ∧ q.edges.Nodup ∧ p.edges.Disjoint q.edges
⊢ q.IsTrail

tactic: exact ⟨h.2.1⟩
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w✝ x y u v w : V
p : G.Walk u v
q : G.Walk v w
h : p.edges.Nodup ∧ q.edges.Nodup ∧ p.edges.Disjoint q.edges
⊢ q.IsTrail
state_after: no goals
Theorem: Nat.succ_mod_two_add_mod_two
File: Mathlib/Algebra/Ring/Parity.lean

tactic: rw [add_comm, mod_two_add_succ_mod_two]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
m✝ n m : ℕ
⊢ (m + 1) % 2 + m % 2 = 1
state_after: no goals
Theorem: Bool.not_eq_false_eq_eq_true
File: Mathlib/Init/Data/Bool/Lemmas.lean

tactic: cases a <;> simp
state_before: a : Bool
⊢ ((!a) = false) = (a = true)
state_after: no goals