tasksource/leandojo huggingface dataset:
Theorem: Filter.tendsto_atTop
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simp only [atTop, tendsto_iInf, tendsto_principal, mem_Ici]
state_before: ι : Type ?u.47181
ι' : Type ?u.47184
α : Type u_2
β : Type u_1
γ : Type ?u.47193
inst✝ : Preorder β
m : α → β
f : Filter α
⊢ Tendsto m f atTop ↔ ∀ (b : β), ∀ᶠ (a : α) in f, b ≤ m a
Theorem: Equiv.Perm.cycleOf_apply
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: dsimp only [cycleOf]
state_before: ι : Type ?u.2112614
α : Type u_1
β : Type ?u.2112620
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y✝ : α
f : Perm α
x y : α
⊢ ↑(cycleOf f x) y = if SameCycle f x y then ↑f y else y

tactic: split_ifs with h
state_before: ι : Type ?u.2112614
α : Type u_1
β : Type ?u.2112620
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y✝ : α
f : Perm α
x y : α
⊢ ↑(↑ofSubtype (subtypePerm f (_ : ∀ (x_1 : α), SameCycle f x x_1 ↔ SameCycle f x (↑f x_1)))) y =
    if SameCycle f x y then ↑f y else y

tactic: apply ofSubtype_apply_of_mem
state_before: case inl
ι : Type ?u.2112614
α : Type u_1
β : Type ?u.2112620
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y✝ : α
f : Perm α
x y : α
h : SameCycle f x y
⊢ ↑(↑ofSubtype (subtypePerm f (_ : ∀ (x_1 : α), SameCycle f x x_1 ↔ SameCycle f x (↑f x_1)))) y = ↑f y

tactic: exact h
state_before: case inl.ha
ι : Type ?u.2112614
α : Type u_1
β : Type ?u.2112620
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y✝ : α
f : Perm α
x y : α
h : SameCycle f x y
⊢ SameCycle f x y

tactic: apply ofSubtype_apply_of_not_mem
state_before: case inr
ι : Type ?u.2112614
α : Type u_1
β : Type ?u.2112620
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y✝ : α
f : Perm α
x y : α
h : ¬SameCycle f x y
⊢ ↑(↑ofSubtype (subtypePerm f (_ : ∀ (x_1 : α), SameCycle f x x_1 ↔ SameCycle f x (↑f x_1)))) y = y

tactic: exact h
state_before: case inr.ha
ι : Type ?u.2112614
α : Type u_1
β : Type ?u.2112620
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y✝ : α
f : Perm α
x y : α
h : ¬SameCycle f x y
⊢ ¬SameCycle f x y
Theorem: Eq.congr_left
File: Mathlib/Logic/Basic.lean

tactic: rw [h]
state_before: α : Sort u_1
x y z : α
h : x = y
⊢ x = z ↔ y = z
Theorem: Quaternion.normSq_add
File: Mathlib/Algebra/Quaternion.lean

tactic: simp_rw [normSq_def, star_add, add_mul, mul_add, add_re]
state_before: S : Type ?u.911149
T : Type ?u.911152
R : Type u_1
inst✝ : CommRing R
r x y z : R
a✝ b✝ c a b : ℍ[R]
⊢ ↑normSq (a + b) = ↑normSq a + (a * star b).re + ((b * star a).re + ↑normSq b)

tactic: abel
state_before: S : Type ?u.911149
T : Type ?u.911152
R : Type u_1
inst✝ : CommRing R
r x y z : R
a✝ b✝ c a b : ℍ[R]
⊢ ↑normSq a + (a * star b).re + ((b * star a).re + ↑normSq b) =
    ↑normSq a + ↑normSq b + ((a * star b).re + (b * star a).re)

tactic: rw [← add_re, ← star_mul_star a b, self_add_star', coe_re]
state_before: S : Type ?u.911149
T : Type ?u.911152
R : Type u_1
inst✝ : CommRing R
r x y z : R
a✝ b✝ c a b : ℍ[R]
⊢ ↑normSq a + ↑normSq b + ((a * star b).re + (b * star a).re) = ↑normSq a + ↑normSq b + 2 * (a * star b).re
Theorem: IsGδ.inter
File: Mathlib/Topology/GDelta.lean

tactic: rw [inter_eq_iInter]
state_before: α : Type u_1
β : Type ?u.6095
γ : Type ?u.6098
ι : Type ?u.6101
inst✝ : TopologicalSpace α
s t : Set α
hs : IsGδ s
ht : IsGδ t
⊢ IsGδ (s ∩ t)

tactic: exact isGδ_iInter (Bool.forall_bool.2 ⟨ht, hs⟩)
state_before: α : Type u_1
β : Type ?u.6095
γ : Type ?u.6098
ι : Type ?u.6101
inst✝ : TopologicalSpace α
s t : Set α
hs : IsGδ s
ht : IsGδ t
⊢ IsGδ (⋂ (b : Bool), bif b then s else t)
Theorem: PNat.sub_coe
File: Mathlib/Data/PNat/Basic.lean

tactic: change (toPNat' _ : ℕ) = ite _ _ _
state_before: a b : ℕ+
⊢ ↑(a - b) = if b < a then ↑a - ↑b else 1

tactic: split_ifs with h
state_before: a b : ℕ+
⊢ ↑(toPNat' (↑a - ↑b)) = if b < a then ↑a - ↑b else 1

tactic: exact toPNat'_coe (tsub_pos_of_lt h)
state_before: case inl
a b : ℕ+
h : b < a
⊢ ↑(toPNat' (↑a - ↑b)) = ↑a - ↑b

tactic: rw [tsub_eq_zero_iff_le.mpr (le_of_not_gt h : (a : ℕ) ≤ b)]
state_before: case inr
a b : ℕ+
h : ¬b < a
⊢ ↑(toPNat' (↑a - ↑b)) = 1

tactic: rfl
state_before: case inr
a b : ℕ+
h : ¬b < a
⊢ ↑(toPNat' 0) = 1
Theorem: RatFunc.intDegree_add_le
File: Mathlib/FieldTheory/RatFunc.lean

tactic: by_cases hx : x = 0
state_before: K : Type u
inst✝ : Field K
x y : RatFunc K
hy : y ≠ 0
hxy : x + y ≠ 0
⊢ intDegree (x + y) ≤ max (intDegree x) (intDegree y)

tactic: rw [intDegree_add hxy, ←
  natDegree_num_mul_right_sub_natDegree_denom_mul_left_eq_intDegree hx y.denom_ne_zero,
  mul_comm y.denom, ←
  natDegree_num_mul_right_sub_natDegree_denom_mul_left_eq_intDegree hy x.denom_ne_zero,
  le_max_iff, sub_le_sub_iff_right, Int.ofNat_le, sub_le_sub_iff_right, Int.ofNat_le, ←
  le_max_iff, mul_comm y.num]
state_before: case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hy : y ≠ 0
hxy : x + y ≠ 0
hx : ¬x = 0
⊢ intDegree (x + y) ≤ max (intDegree x) (intDegree y)

tactic: exact natDegree_add_le _ _
state_before: case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hy : y ≠ 0
hxy : x + y ≠ 0
hx : ¬x = 0
⊢ natDegree (num x * denom y + denom x * num y) ≤ max (natDegree (num x * denom y)) (natDegree (denom x * num y))

tactic: simp [hx] at hxy
state_before: case pos
K : Type u
inst✝ : Field K
x y : RatFunc K
hy : y ≠ 0
hxy : x + y ≠ 0
hx : x = 0
⊢ intDegree (x + y) ≤ max (intDegree x) (intDegree y)

tactic: simp [hx, hxy]
state_before: case pos
K : Type u
inst✝ : Field K
x y : RatFunc K
hy : y ≠ 0
hx : x = 0
hxy : ¬y = 0
⊢ intDegree (x + y) ≤ max (intDegree x) (intDegree y)
Theorem: Int.natAbs_eq_iff_mul_self_eq
File: Mathlib/Data/Int/Order/Lemmas.lean

tactic: rw [← abs_eq_iff_mul_self_eq, abs_eq_natAbs, abs_eq_natAbs]
state_before: a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ natAbs a = natAbs b ↔ a * a = b * b

tactic: exact Int.coe_nat_inj'.symm
state_before: a✝ b✝ : ℤ
n : ℕ
a b : ℤ
⊢ natAbs a = natAbs b ↔ ↑(natAbs a) = ↑(natAbs b)
Theorem: Submonoid.LocalizationMap.mulEquivOfLocalizations_left_inv_apply
File: Mathlib/GroupTheory/MonoidLocalization.lean

tactic: simp
state_before: M : Type u_3
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_1
inst✝² : CommMonoid N
P : Type u_2
inst✝¹ : CommMonoid P
f : LocalizationMap S N
g : M →* P
hg : ∀ (y : { x // x ∈ S }), IsUnit (↑g ↑y)
T : Submonoid P
Q : Type ?u.2924282
inst✝ : CommMonoid Q
k : N ≃* P
x : N
⊢ ↑(mulEquivOfLocalizations f (ofMulEquivOfLocalizations f k)) x = ↑k x
Theorem: Set.prod_sUnion
File: Mathlib/Data/Set/Lattice.lean

tactic: simp_rw [sUnion_eq_biUnion, biUnion_image, prod_iUnion₂]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.229496
ι : Sort ?u.229499
ι' : Sort ?u.229502
ι₂ : Sort ?u.229505
κ : ι → Sort ?u.229510
κ₁ : ι → Sort ?u.229515
κ₂ : ι → Sort ?u.229520
κ' : ι' → Sort ?u.229525
s : Set α
C : Set (Set β)
⊢ s ×ˢ ⋃₀ C = ⋃₀ ((fun t => s ×ˢ t) '' C)
Theorem: Nat.ord_compl_pos
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: cases' em' p.Prime with pp pp
state_before: n p : ℕ
hn : n ≠ 0
⊢ 0 < n / p ^ ↑(factorization n) p

tactic: exact Nat.div_pos (ord_proj_le p hn) (ord_proj_pos n p)
state_before: case inr
n p : ℕ
hn : n ≠ 0
pp : Prime p
⊢ 0 < n / p ^ ↑(factorization n) p

tactic: simpa [Nat.factorization_eq_zero_of_non_prime n pp] using hn.bot_lt
state_before: case inl
n p : ℕ
hn : n ≠ 0
pp : ¬Prime p
⊢ 0 < n / p ^ ↑(factorization n) p
Theorem: algebraMap_apply
File: Mathlib/Topology/ContinuousFunction/Algebra.lean

tactic: rw [Algebra.algebraMap_eq_smul_one]
state_before: α : Type u_2
inst✝⁹ : TopologicalSpace α
R : Type u_3
inst✝⁸ : CommSemiring R
A : Type u_1
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type ?u.1480657
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
k : R
a : α
⊢ ↑(↑(algebraMap R C(α, A)) k) a = k • 1

tactic: rfl
state_before: α : Type u_2
inst✝⁹ : TopologicalSpace α
R : Type u_3
inst✝⁸ : CommSemiring R
A : Type u_1
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type ?u.1480657
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
k : R
a : α
⊢ ↑(k • 1) a = k • 1
Theorem: Subalgebra.finrank_bot
File: Mathlib/LinearAlgebra/Finrank.lean

tactic: simp
state_before: K : Type u
V : Type v
F : Type u_1
E : Type u_2
inst✝⁵ : CommRing F
inst✝⁴ : Ring E
inst✝³ : Algebra F E
inst✝² : StrongRankCondition F
inst✝¹ : NoZeroSMulDivisors F E
inst✝ : Nontrivial E
⊢ Module.rank F { x // x ∈ ⊥ } = ↑1
Theorem: Monoid.exponent_eq_zero_iff_range_orderOf_infinite
File: Mathlib/GroupTheory/Exponent.lean

tactic: have := exponent_ne_zero_iff_range_orderOf_finite h
state_before: G : Type u
inst✝ : Monoid G
h : ∀ (g : G), 0 < orderOf g
⊢ exponent G = 0 ↔ Set.Infinite (Set.range orderOf)

tactic: rwa [Ne.def, not_iff_comm, Iff.comm] at this
state_before: G : Type u
inst✝ : Monoid G
h : ∀ (g : G), 0 < orderOf g
this : exponent G ≠ 0 ↔ Set.Finite (Set.range orderOf)
⊢ exponent G = 0 ↔ Set.Infinite (Set.range orderOf)
Theorem: Submonoid.induction_of_closure_eq_top_left
File: Mathlib/GroupTheory/Submonoid/Membership.lean

tactic: rw [hs]
state_before: M : Type u_1
A : Type ?u.87242
B : Type ?u.87245
inst✝ : Monoid M
s : Set M
p : M → Prop
hs : closure s = ⊤
x : M
H1 : p 1
Hmul : ∀ (x : M), x ∈ s → ∀ (y : M), p y → p (x * y)
⊢ x ∈ closure s

tactic: exact mem_top _
state_before: M : Type u_1
A : Type ?u.87242
B : Type ?u.87245
inst✝ : Monoid M
s : Set M
p : M → Prop
hs : closure s = ⊤
x : M
H1 : p 1
Hmul : ∀ (x : M), x ∈ s → ∀ (y : M), p y → p (x * y)
⊢ x ∈ ⊤
Theorem: Polynomial.opRingEquiv_op_monomial
File: Mathlib/RingTheory/Polynomial/Opposites.lean

tactic: simp only [opRingEquiv, RingEquiv.coe_trans, Function.comp_apply,
  AddMonoidAlgebra.opRingEquiv_apply, RingEquiv.op_apply_apply, toFinsuppIso_apply, unop_op,
  toFinsupp_monomial, Finsupp.mapRange_single, toFinsuppIso_symm_apply, ofFinsupp_single]
state_before: R : Type u_1
inst✝ : Semiring R
n : ℕ
r : R
⊢ ↑(opRingEquiv R) (op (↑(monomial n) r)) = ↑(monomial n) (op r)
Theorem: Fin.natAdd_subNat_cast
File: Mathlib/Data/Fin/Basic.lean

tactic: simp [← cast_addNat]
state_before: n m : ℕ
i : Fin (n + m)
h : n ≤ ↑i
⊢ ↑(natAdd n) (subNat n (↑(cast (_ : n + m = m + n)) i) h) = i
Theorem: padicValNat.self
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: have neq_one : ¬p = 1 ↔ True := iff_of_true hp.ne' trivial
state_before: p : ℕ
hp : 1 < p
⊢ padicValNat p p = 1

tactic: have eq_zero_false : p = 0 ↔ False := iff_false_intro (zero_lt_one.trans hp).ne'
state_before: p : ℕ
hp : 1 < p
neq_one : ¬p = 1 ↔ True
⊢ padicValNat p p = 1

tactic: simp [padicValNat, neq_one, eq_zero_false]
state_before: p : ℕ
hp : 1 < p
neq_one : ¬p = 1 ↔ True
eq_zero_false : p = 0 ↔ False
⊢ padicValNat p p = 1
Theorem: Fin.pred_inj
File: Mathlib/Data/Fin/Basic.lean

tactic: simp only [mk_zero, ne_eq, not_true] at ha
state_before: n m : ℕ
isLt✝ : 0 < n + 1
x✝¹ : Fin (n + 1)
ha : { val := 0, isLt := isLt✝ } ≠ 0
x✝ : x✝¹ ≠ 0
⊢ pred { val := 0, isLt := isLt✝ } ha = pred x✝¹ x✝ ↔ { val := 0, isLt := isLt✝ } = x✝¹

tactic: simp only [mk_zero, ne_eq, not_true] at hb
state_before: n m i : ℕ
isLt✝¹ : i + 1 < n + 1
isLt✝ : 0 < n + 1
x✝ : { val := i + 1, isLt := isLt✝¹ } ≠ 0
hb : { val := 0, isLt := isLt✝ } ≠ 0
⊢ pred { val := i + 1, isLt := isLt✝¹ } x✝ = pred { val := 0, isLt := isLt✝ } hb ↔
    { val := i + 1, isLt := isLt✝¹ } = { val := 0, isLt := isLt✝ }

tactic: simp [Fin.eq_iff_veq]
state_before: n m i : ℕ
hi : i + 1 < n + 1
j : ℕ
hj : j + 1 < n + 1
ha : { val := i + 1, isLt := hi } ≠ 0
hb : { val := j + 1, isLt := hj } ≠ 0
⊢ pred { val := i + 1, isLt := hi } ha = pred { val := j + 1, isLt := hj } hb ↔
    { val := i + 1, isLt := hi } = { val := j + 1, isLt := hj }
Theorem: List.length_add_eq_lengthTRAux
File: src/lean/Init/Data/List/Basic.lean

tactic: induction as generalizing n with
| nil  => simp [length, lengthTRAux]
| cons a as ih =>
  simp [length, lengthTRAux, ← ih, Nat.succ_add]
  rfl
state_before: α : Type u
β : Type v
γ : Type w
as : List α
n : Nat
⊢ length as + n = lengthTRAux as n

tactic: simp [length, lengthTRAux]
state_before: case nil
α : Type u
β : Type v
γ : Type w
n : Nat
⊢ length nil + n = lengthTRAux nil n

tactic: simp [length, lengthTRAux, ← ih, Nat.succ_add]
state_before: case cons
α : Type u
β : Type v
γ : Type w
a : α
as : List α
ih : ∀ (n : Nat), length as + n = lengthTRAux as n
n : Nat
⊢ length (a :: as) + n = lengthTRAux (a :: as) n

tactic: rfl
state_before: case cons
α : Type u
β : Type v
γ : Type w
a : α
as : List α
ih : ∀ (n : Nat), length as + n = lengthTRAux as n
n : Nat
⊢ Nat.succ (length as + n) = length as + Nat.succ n
Theorem: continuousOn_dslope
File: Mathlib/Analysis/Calculus/Dslope.lean

tactic: refine' ⟨fun hc => ⟨hc.of_dslope, continuousAt_dslope_same.1 <| hc.continuousAt h⟩, _⟩
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a b : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
⊢ ContinuousOn (dslope f a) s ↔ ContinuousOn f s ∧ DifferentiableAt 𝕜 f a

tactic: rintro ⟨hc, hd⟩ x hx
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a b : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
⊢ ContinuousOn f s ∧ DifferentiableAt 𝕜 f a → ContinuousOn (dslope f a) s

tactic: rcases eq_or_ne x a with (rfl | hne)
state_before: case intro
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a b : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
hc : ContinuousOn f s
hd : DifferentiableAt 𝕜 f a
x : 𝕜
hx : x ∈ s
⊢ ContinuousWithinAt (dslope f a) s x

tactic: exacts [(continuousAt_dslope_same.2 hd).continuousWithinAt,
  (continuousWithinAt_dslope_of_ne hne).2 (hc x hx)]
state_before: case intro.inl
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
b : 𝕜
s : Set 𝕜
hc : ContinuousOn f s
x : 𝕜
hx : x ∈ s
h : s ∈ 𝓝 x
hd : DifferentiableAt 𝕜 f x
⊢ ContinuousWithinAt (dslope f x) s x

case intro.inr
𝕜 : Type u_1
E : Type u_2
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f : 𝕜 → E
a b : 𝕜
s : Set 𝕜
h : s ∈ 𝓝 a
hc : ContinuousOn f s
hd : DifferentiableAt 𝕜 f a
x : 𝕜
hx : x ∈ s
hne : x ≠ a
⊢ ContinuousWithinAt (dslope f a) s x
Theorem: one_div_mul_one_div_rev
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.23437
G : Type ?u.23440
inst✝ : DivisionMonoid α
a b c : α
⊢ 1 / a * (1 / b) = 1 / (b * a)
Theorem: String.extract.go₁_append_right
File: Std/Data/String/Lemmas.lean

tactic: cases t <;> simp [go₁, go₂]
state_before: t : List Char
i : Nat
e : Pos
⊢ go₁ ([] ++ t) { byteIdx := i } { byteIdx := utf8Len [] + i } e = go₂ t { byteIdx := utf8Len [] + i } e

tactic: simp [go₁, Pos.ext_iff, ne_add_csize_add_self, Pos.addChar_eq]
state_before: c : Char
cs t : List Char
i : Nat
e : Pos
⊢ go₁ (c :: cs ++ t) { byteIdx := i } { byteIdx := utf8Len (c :: cs) + i } e =
    go₂ t { byteIdx := utf8Len (c :: cs) + i } e

tactic: apply go₁_append_right
state_before: c : Char
cs t : List Char
i : Nat
e : Pos
⊢ go₁ (cs ++ t) { byteIdx := i + csize c } { byteIdx := utf8Len cs + csize c + i } e =
    go₂ t { byteIdx := utf8Len cs + csize c + i } e

tactic: rw [Nat.add_right_comm, Nat.add_assoc]
state_before: case a
c : Char
cs t : List Char
i : Nat
e : Pos
⊢ utf8Len cs + csize c + i = utf8Len cs + (i + csize c)
Theorem: toIcoMod_eq_toIcoMod
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: refine' ⟨fun h => ⟨toIcoDiv hp a c - toIcoDiv hp a b, _⟩, fun h => _⟩
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
⊢ toIcoMod hp a b = toIcoMod hp a c ↔ ∃ n, c - b = n • p

tactic: conv_lhs => rw [← toIcoMod_add_toIcoDiv_zsmul hp a b, ← toIcoMod_add_toIcoDiv_zsmul hp a c]
state_before: case refine'_1
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h : toIcoMod hp a b = toIcoMod hp a c
⊢ c - b = (toIcoDiv hp a c - toIcoDiv hp a b) • p

tactic: rw [h, sub_smul]
state_before: case refine'_1
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h : toIcoMod hp a b = toIcoMod hp a c
⊢ toIcoMod hp a c + toIcoDiv hp a c • p - (toIcoMod hp a b + toIcoDiv hp a b • p) =
    (toIcoDiv hp a c - toIcoDiv hp a b) • p

tactic: abel
state_before: case refine'_1
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h : toIcoMod hp a b = toIcoMod hp a c
⊢ toIcoMod hp a c + toIcoDiv hp a c • p - (toIcoMod hp a c + toIcoDiv hp a b • p) =
    toIcoDiv hp a c • p - toIcoDiv hp a b • p

tactic: rcases h with ⟨z, hz⟩
state_before: case refine'_2
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n : ℤ
h : ∃ n, c - b = n • p
⊢ toIcoMod hp a b = toIcoMod hp a c

tactic: rw [sub_eq_iff_eq_add] at hz
state_before: case refine'_2.intro
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n z : ℤ
hz : c - b = z • p
⊢ toIcoMod hp a b = toIcoMod hp a c

tactic: rw [hz, toIcoMod_zsmul_add]
state_before: case refine'_2.intro
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a b c : α
n z : ℤ
hz : c = z • p + b
⊢ toIcoMod hp a b = toIcoMod hp a c
Theorem: Polynomial.splits_id_iff_splits
File: Mathlib/Data/Polynomial/Splits.lean

tactic: rw [splits_map_iff, RingHom.id_comp]
state_before: F : Type u
K : Type v
L : Type w
inst✝² : CommRing K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
f : K[X]
⊢ Splits (RingHom.id L) (map i f) ↔ Splits i f
Theorem: measurable_fract
File: Mathlib/MeasureTheory/Function/Floor.lean

tactic: intro s hs
state_before: α : Type ?u.3014
R : Type u_1
inst✝⁶ : MeasurableSpace α
inst✝⁵ : LinearOrderedRing R
inst✝⁴ : FloorRing R
inst✝³ : TopologicalSpace R
inst✝² : OrderTopology R
inst✝¹ : MeasurableSpace R
inst✝ : BorelSpace R
⊢ Measurable Int.fract

tactic: rw [Int.preimage_fract]
state_before: α : Type ?u.3014
R : Type u_1
inst✝⁶ : MeasurableSpace α
inst✝⁵ : LinearOrderedRing R
inst✝⁴ : FloorRing R
inst✝³ : TopologicalSpace R
inst✝² : OrderTopology R
inst✝¹ : MeasurableSpace R
inst✝ : BorelSpace R
s : Set R
hs : MeasurableSet s
⊢ MeasurableSet (Int.fract ⁻¹' s)

tactic: exact MeasurableSet.iUnion fun z => measurable_id.sub_const _ (hs.inter measurableSet_Ico)
state_before: α : Type ?u.3014
R : Type u_1
inst✝⁶ : MeasurableSpace α
inst✝⁵ : LinearOrderedRing R
inst✝⁴ : FloorRing R
inst✝³ : TopologicalSpace R
inst✝² : OrderTopology R
inst✝¹ : MeasurableSpace R
inst✝ : BorelSpace R
s : Set R
hs : MeasurableSet s
⊢ MeasurableSet (⋃ (m : ℤ), (fun x => x - ↑m) ⁻¹' (s ∩ Ico 0 1))
Theorem: MeasureTheory.DominatedFinMeasAdditive.zero
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: refine' ⟨FinMeasAdditive.zero, fun s _ _ => _⟩
state_before: α : Type u_1
E : Type ?u.97713
F : Type ?u.97716
F' : Type ?u.97719
G : Type ?u.97722
𝕜 : Type ?u.97725
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m✝ : MeasurableSpace α
μ✝ : Measure α
β : Type u_2
inst✝ : SeminormedAddCommGroup β
T T' : Set α → β
C C' : ℝ
m : MeasurableSpace α
μ : Measure α
hC : 0 ≤ C
⊢ DominatedFinMeasAdditive μ 0 C

tactic: rw [Pi.zero_apply, norm_zero]
state_before: α : Type u_1
E : Type ?u.97713
F : Type ?u.97716
F' : Type ?u.97719
G : Type ?u.97722
𝕜 : Type ?u.97725
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m✝ : MeasurableSpace α
μ✝ : Measure α
β : Type u_2
inst✝ : SeminormedAddCommGroup β
T T' : Set α → β
C C' : ℝ
m : MeasurableSpace α
μ : Measure α
hC : 0 ≤ C
s : Set α
x✝¹ : MeasurableSet s
x✝ : ↑↑μ s < ⊤
⊢ ‖OfNat.ofNat 0 s‖ ≤ C * ENNReal.toReal (↑↑μ s)

tactic: exact mul_nonneg hC toReal_nonneg
state_before: α : Type u_1
E : Type ?u.97713
F : Type ?u.97716
F' : Type ?u.97719
G : Type ?u.97722
𝕜 : Type ?u.97725
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m✝ : MeasurableSpace α
μ✝ : Measure α
β : Type u_2
inst✝ : SeminormedAddCommGroup β
T T' : Set α → β
C C' : ℝ
m : MeasurableSpace α
μ : Measure α
hC : 0 ≤ C
s : Set α
x✝¹ : MeasurableSet s
x✝ : ↑↑μ s < ⊤
⊢ 0 ≤ C * ENNReal.toReal (↑↑μ s)
Theorem: succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul
File: Mathlib/Algebra/Associated.lean

tactic: simpa [mul_comm, pow_add, hx, hy, mul_assoc, mul_left_comm] using hz
state_before: α : Type u_1
β : Type ?u.104187
γ : Type ?u.104190
δ : Type ?u.104193
inst✝ : CancelCommMonoidWithZero α
a✝ p : α
hp : Prime p
a b : α
k l : ℕ
x✝² : p ^ k ∣ a
x✝¹ : p ^ l ∣ b
x✝ : p ^ (k + l + 1) ∣ a * b
x : α
hx : a = p ^ k * x
y : α
hy : b = p ^ l * y
z : α
hz : a * b = p ^ (k + l + 1) * z
⊢ p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z)

tactic: rwa [mul_right_inj' hp0] at h
state_before: α : Type u_1
β : Type ?u.104187
γ : Type ?u.104190
δ : Type ?u.104193
inst✝ : CancelCommMonoidWithZero α
a✝ p : α
hp : Prime p
a b : α
k l : ℕ
x✝² : p ^ k ∣ a
x✝¹ : p ^ l ∣ b
x✝ : p ^ (k + l + 1) ∣ a * b
x : α
hx : a = p ^ k * x
y : α
hy : b = p ^ l * y
z : α
hz : a * b = p ^ (k + l + 1) * z
h : p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z)
hp0 : p ^ (k + l) ≠ 0
⊢ x * y = p * z

tactic: simp [*, pow_succ, mul_comm, mul_left_comm, mul_assoc]
state_before: α : Type u_1
β : Type ?u.104187
γ : Type ?u.104190
δ : Type ?u.104193
inst✝ : CancelCommMonoidWithZero α
a✝ p : α
hp : Prime p
a b : α
k l : ℕ
x✝³ : p ^ k ∣ a
x✝² : p ^ l ∣ b
x✝¹ : p ^ (k + l + 1) ∣ a * b
x : α
hx : a = p ^ k * x
y : α
hy : b = p ^ l * y
z : α
hz : a * b = p ^ (k + l + 1) * z
h : p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z)
hp0 : p ^ (k + l) ≠ 0
hpd : p ∣ x * y
x✝ : p ∣ x
d : α
hd : x = p * d
⊢ a = p ^ (k + 1) * d

tactic: simp [*, pow_succ, mul_comm, mul_left_comm, mul_assoc]
state_before: α : Type u_1
β : Type ?u.104187
γ : Type ?u.104190
δ : Type ?u.104193
inst✝ : CancelCommMonoidWithZero α
a✝ p : α
hp : Prime p
a b : α
k l : ℕ
x✝³ : p ^ k ∣ a
x✝² : p ^ l ∣ b
x✝¹ : p ^ (k + l + 1) ∣ a * b
x : α
hx : a = p ^ k * x
y : α
hy : b = p ^ l * y
z : α
hz : a * b = p ^ (k + l + 1) * z
h : p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z)
hp0 : p ^ (k + l) ≠ 0
hpd : p ∣ x * y
x✝ : p ∣ y
d : α
hd : y = p * d
⊢ b = p ^ (l + 1) * d
Theorem: LucasLehmer.two_lt_q
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: refine (minFac_prime (one_lt_mersenne ?_).ne').two_le.lt_of_ne' ?_
state_before: p' : ℕ
⊢ 2 < q (p' + 2)

tactic: exact le_add_left _ _
state_before: case refine_1
p' : ℕ
⊢ 1 < p' + 2

tactic: rw [Ne.def, minFac_eq_two_iff, mersenne, Nat.pow_succ']
state_before: case refine_2
p' : ℕ
⊢ minFac (mersenne (p' + 2)) ≠ 2

tactic: exact Nat.two_not_dvd_two_mul_sub_one (Nat.one_le_two_pow _)
state_before: case refine_2
p' : ℕ
⊢ ¬2 ∣ 2 * 2 ^ (p' + 1) - 1
Theorem: nhdsWithin_biUnion
File: Mathlib/Topology/ContinuousOn.lean

tactic: simp
state_before: α : Type u_2
β : Type ?u.14101
γ : Type ?u.14104
δ : Type ?u.14107
inst✝ : TopologicalSpace α
ι : Type u_1
I : Set ι
hI : Set.Finite I
s : ι → Set α
a : α
⊢ 𝓝[⋃ (i : ι) (_ : i ∈ ∅), s i] a = ⨆ (i : ι) (_ : i ∈ ∅), 𝓝[s i] a

tactic: simp only [hT, nhdsWithin_union, iSup_insert, biUnion_insert]
state_before: α : Type u_2
β : Type ?u.14101
γ : Type ?u.14104
δ : Type ?u.14107
inst✝ : TopologicalSpace α
ι : Type u_1
I : Set ι
hI : Set.Finite I
s : ι → Set α
a : α
a✝ : ι
s✝ : Set ι
x✝¹ : ¬a✝ ∈ s✝
x✝ : Set.Finite s✝
hT : 𝓝[⋃ (i : ι) (_ : i ∈ s✝), s i] a = ⨆ (i : ι) (_ : i ∈ s✝), 𝓝[s i] a
⊢ 𝓝[⋃ (i : ι) (_ : i ∈ insert a✝ s✝), s i] a = ⨆ (i : ι) (_ : i ∈ insert a✝ s✝), 𝓝[s i] a